16.04.2014, 16:14
Hello, I have problem with kick command. When I tipe /kick it kick the player but don't send him a message.
There is the code:
And other:
There is the code:
pawn Код:
CMD:kick(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
new PID;
new reason[64];
new str[127];
new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Adminname, sizeof(Adminname));
GetPlayerName(PID, Playername, sizeof(Playername));
if(sscanf(params, "us", PID,reason)) return SendClientMessage(playerid, ZALIA, "Naudojimas: /kick [Vardas] [Priezastis]");
if(!IsPlayerConnected(PID))
return SendClientMessage(playerid, RAUDONA, "Юaidлjas neprisijunges!");
format(str, sizeof(str), "[KICK] %s iрmetл %s uю [%s] ", Playername, Adminname, reason);
kickzinute[playerid] = SendClientMessageToAll(GELTONA, str);
SetTimer("kickzinutestimeris", 10, false);
Kick(PID);
}
else
{
SendClientMessage(playerid, RAUDONA, "Рia komanda gali naudotis tik Administratoriai");
}
return 1;
}
pawn Код:
forward kickzinutestimeris(playerid);
public kickzinutestimeris(playerid)
{
SendClientMessageToAll(GELTONA, kickzinute[playerid]);
}