kick command
#1

I created /kick command, but when I kick player In message to all players been writed what I kicked myself, but I kicked another player: https://imgur.com/a/0hoj0qi

Code:
Quote:

CMD:kick(playerid, params[])
{
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid, RAUDONA, "KLAIDA: {559ABD}Tik Kūrėjų Komanda gali naudoti љią komandą!");
new userid, reason[128], string[128];
new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Adminname, sizeof(Adminname));
GetPlayerName(userid, Playername, sizeof(Playername));
if (sscanf(params, "us[64]", userid, reason))return SendClientMessage(playerid, MELYNA, "Naudojimas: /kick [ID] [Prieћastis]");
if(!IsPlayerConnected(userid))return SendClientMessage(playerid, RAUDONA, "Tokio ћaidėjo nėra!");
format(string, sizeof(string), "[KICK] Administratorius %s iљmetė %s iљ serverio. (Prieћastis: %s)", Adminname, Playername, reason);
SendClientMessageToAll(GELTONA, string);
Kick(userid);
return 1;
}

Pastebin https://pastebin.com/TAWE4C9p
Reply


Messages In This Thread
kick command - by Heress - 28.07.2018, 14:25
Re: kick command - by SyS - 28.07.2018, 14:48
Re: kick command - by Hunud - 28.07.2018, 14:51
Re: kick command - by Heress - 28.07.2018, 14:56

Forum Jump:


Users browsing this thread: 1 Guest(s)