28.07.2018, 14:25
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:
Pastebin https://pastebin.com/TAWE4C9p
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; } |