How to create command clan? -
NaTkAkN - 21.01.2012
Hello guys, I am new to forums so I do not know if this is the right section.
I'm Italian so my English is scarce asd.
Ok, I have a server, and I wanted to create the command / kickclan [CLANTAG] / banclan [TAGCLAN] / crashclan [TAGCLAN] with DCMD, however, after several attempts I who could help me out?
Thanks in advance
Re: How to create command clan? -
[XST]O_x - 21.01.2012
pawn Код:
dcmd_kickclan(playerid,params[])
{
new name[24];
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerName(i,name,24);
if(strfind(name,params,true) != -1)
{
kick(i);
}
}
return 1;
}
That's the basic, modify it however you want.
Re: How to create command clan? -
NaTkAkN - 21.01.2012
Thanks, now I try and tell you if it works ^ ^.
Re: How to create command clan? -
NaTkAkN - 21.01.2012
Ok, I tested and it works, but I wanted to ask because usually I do not ever be the case today gives me warning symbol is never used playerid? Corrects this problem with pragma unusued playerid but usually not by me ever since?
Re: How to create command clan? - HuSs3n - 21.01.2012
you should use playerid..
Код:
dcmd_kickclan(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
new name[24];
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerName(i,name,24);
if(strfind(name,params,true) != -1)
{
kick(i);
}
}
return 1;
}
if you dont do so , every player will be able to use the cmd (not only admins)
Re: How to create command clan? -
[XST]O_x - 21.01.2012
Quote:
Originally Posted by NaTkAkN
Ok, I tested and it works, but I wanted to ask because usually I do not ever be the case today gives me warning symbol is never used playerid? Corrects this problem with pragma unusued playerid but usually not by me ever since?
|
I told you that I gave you the most basic command possible and you can modify it yourself.
By modify I meant adding messages and admin permissions ETC.
Re: How to create command clan? -
NaTkAkN - 21.01.2012
ok thanks .