24.03.2018, 15:51
So when my friend types a command that needs to kick me it needs to say:
<MYNAME> was kicked by <MYFRIENDNAME>.
But when my friend does the command on me i mean he type /kick <MYNAME>
It says <MYFRIENDNAME> was kicked by <MYFRIENDNAME> WHY??
Why it says when my friend kick me says that he kicked himself but he kicked me
Please help me.
Here is the command: (IGNORE THE BUGGED TEXT, IT WAS ON DIFFERENT LANGUAGE)
<MYNAME> was kicked by <MYFRIENDNAME>.
But when my friend does the command on me i mean he type /kick <MYNAME>
It says <MYFRIENDNAME> was kicked by <MYFRIENDNAME> WHY??
Why it says when my friend kick me says that he kicked himself but he kicked me

Please help me.
Here is the command: (IGNORE THE BUGGED TEXT, IT WAS ON DIFFERENT LANGUAGE)
Код:
CMD:kick(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new PID;
new reason[64];
new str[128];
new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Adminname, sizeof(Adminname));
GetPlayerName(PID, Playername, sizeof(Playername));
if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_SYSTEM, "SERVER: {FF1E00}/kick [playerid] [причина]");
if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, COLOR_GREY, "Този играч не е в сървъра!");
if(PID == playerid) return SendClientMessage(playerid, COLOR_GREY, "Не можете да използвате тази команда върху себе си!");
format(str, sizeof(str), "{FF1E00}ADMIN: %s е кикнат от администратор %s. [Причина: %s]", Playername, Adminname, reason);
SendClientMessageToAll(COLOR_SYSTEM, str);
KickEx(PID);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Трябва да сте поне 1 левел Админ!");
}
return 1;
}


