04.01.2011, 20:40
(
Последний раз редактировалось -GooGle-; 04.01.2011 в 23:30.
)
Fiz Agora, Toma Aqui: Edit : colocado Pegar Nome
Add isto no final do seu gm
pawn Код:
if(strcmp("/kick", cmdtext, true, 4) == 0)
{
new mandarnome[MAX_PLAYER_NAME];
GetPlayerName(playerid, mandarnome, sizeof(mandarnome));
new string[256];
new kickid[256];
kickid = KcmD(1, cmdtext);
new mandarnome2[MAX_PLAYER_NAME];
GetPlayerName(strval(kickid), mandarnome2, sizeof(mandarnome2));
if(!strlen(kickid))
{
SendClientMessage(playerid,Cor_Aqui,"Use: /kick [id]");
return 1;
}
format(string,sizeof(string),"%s Kickou %s do servidor",mandarnome,kickid);
SendClientMessageToAll(Cor_Aqui,string);
Kick(strval(kickid));
return 1;
}
pawn Код:
stock KcmD(param, cmdtext[])
{
new string[128], pos, var;
format(string, sizeof(string), "%s ", cmdtext);
while((pos = strfind(string, " ", true)) != -1) {
if(var == param) return string;
var++;
strdel(string, 0, pos + 1);
if(strcmp(string, " ", true, pos) == 0) goto end;
}
end:
string[0] = '\0';
return string;
}