oNLy4Cs CoMMuNiTy ! in dezvoltare !
oNLy4Cs CoMMuNiTy ! in dezvoltare !
oNLy4Cs CoMMuNiTy ! in dezvoltare !
Doriți să reacționați la acest mesaj? Creați un cont în câteva clickuri sau conectați-vă pentru a continua.


oNLy4Cs CoMMuNiTy !
 
AcasaUltimele imaginiCăutareÎnregistrareConectare

 

 Sayrestart

In jos 
3 participanți
AutorMesaj
waSpYe ;x
FouNdeR
FouNdeR



Bara Warm : Sayrestart 111010
Forum : Da
Ani : 14
Arma : m4a1, ak47, awP
Mesaje : 78
Data de inscriere : 01/03/2010

Sayrestart Empty
MesajSubiect: Sayrestart   Sayrestart I_icon_minitimeMar Mar 02, 2010 6:25 pm

Sallut la toti ! In accest tutorial va voi invata cum facem un SayRestart si amx_restart .
Sa incepem!

Mai intai avem asa :
Cod:
/* Script generated by Pawn Studio */

#include
#include

#define PLUGIN "New Plugin"
#define AUTHOR "Unknown"
#define VERSION "1.0"

public plugin_init() {
register_plugin(PLUGIN,VERSION,AUTHOR)

}



Adaugam comenzile :

Cod:
register_concmd("amx_restart","restart",ADMIN_KICK,"")
register_concmd("admin_restart","restart",ADMIN_KICK,"")
register_clcmd("say /restart","rr")
register_clcmd("say_team /restart","rr")



Acum adaugam publicul :
Cod:
public restart(id,level,cid)


Verificam daca are acces :
Cod:
if (!cmd_access(id, level, cid, 2))
return 1



Adaugam un argument si secundele :
Cod:
new arg[3]

read_argv(1,arg,3)
new restart = str_to_num(arg)


Apoi comanda pe care sa o execute serverul :
Cod:
server_cmd("sv_restartround %d", restart)


Ca sa arate mai fain adaugati si :
Cod:
static name[32]
get_user_name(id,name,31)

client_print(0, print_chat, "(Admin %s): da restart in %d secunde", name, restart);

return 1


DONE ! Partea 1.
Urmeaza Partea 2.

Adaugam publicul :
Cod:
public rr(id)


Verificam daca este admin :
Cod:
if(!is_user_admin(id)){
return PLUGIN_HANDLED


Apoi daca este admin , comanda sa fie executata :
Cod:
}
if(is_user_admin(id)){
server_cmd("sv_restart 1")
}
return PLUGIN_HANDLED
}




Iar la final a iesit asa :
Cod:
#include
#include


#define PLUGIN "New Plugin"
#define AUTHOR "Unknown"
#define VERSION "1.0"

public plugin_init() {
register_plugin(PLUGIN,VERSION,AUTHOR)
register_concmd("amx_restart","restart",ADMIN_KICK,"")
register_concmd("admin_restart","restart",ADMIN_KICK,"")
register_clcmd("say /restart","rr")
register_clcmd("say_team /restart","rr")
}

public restart(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
return 1

static name[32]
new arg[3]

read_argv(1,arg,3)
new restart = str_to_num(arg)
server_cmd("sv_restartround %d", restart)
get_user_name(id,name,31)

client_print(0, print_chat, "(Admin %s): da restart in %d secunde", name, restart);

return 1
}
public rr(id)
{
if(!is_user_admin(id)){
return PLUGIN_HANDLED
}
if(is_user_admin(id)){
server_cmd("sv_restart 1")
}
return PLUGIN_HANDLED
}
Sus In jos
aLyNn.;x
FouNdeR
FouNdeR
aLyNn.;x


Bara Warm : Sayrestart 111010
Pistol : Usp aNd DeaGLe
Forum : Da !
Ani : 15
Arma : Ak47 , M4a1 , AWP
Mesaje : 29
Data de inscriere : 01/03/2010

Sayrestart Empty
MesajSubiect: Re: Sayrestart   Sayrestart I_icon_minitimeMar Mar 02, 2010 6:39 pm

FoaRte folositor Gj !
Sus In jos
https://sdasd.forumgratuit.ro
SumI
MeMbeR
MeMbeR
SumI


Bara Warm : Sayrestart 111010
Pistol : deagle
Forum : da cum pot
Ani : 13
Arma : m4a1
Mesaje : 82
Data de inscriere : 01/03/2010
Varsta : 28
Localizare : deva

Sayrestart Empty
MesajSubiect: Re: Sayrestart   Sayrestart I_icon_minitimeMar Mar 02, 2010 7:40 pm

misto bv
Sus In jos
Continut sponsorizat





Sayrestart Empty
MesajSubiect: Re: Sayrestart   Sayrestart I_icon_minitime

Sus In jos
 
Sayrestart
Sus 
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
oNLy4Cs CoMMuNiTy ! in dezvoltare ! :: -oNLy4Cs # CounteR StrikE -  :: - TuToRiaLe Cs --
Mergi direct la: