21.03.2018, 18:14
Okay so i have this command:
Ignore the bugged text, its not the problem here.
The problem is i want to tell the player that is kicked before he is actually kicked.
I test it myself i typed to kick myself and it worked the command, but doesn't say in the chat that myname is kicked by administrator myname [reason: asd] [EXAMPLE]
So how do to that it shows the message before the player is actually kicked?
I learned that i need to make a timer, but i don't know how. If anyone can give me timer for this command to work , to show the message, before the player is kicked.
Thanks anyway.
Код:
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, "Този играч не е в сървъра!");
format(str, sizeof(str), "{FF1E00}ADMIN: '%s' е кикнат от администратор '%s'. [Причина: %s]", Playername, Adminname, reason);
SendClientMessageToAll(COLOR_SYSTEM, str);
Kick(PID);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Трябва да сте поне 1 левел Админ!");
}
return 1;
}
The problem is i want to tell the player that is kicked before he is actually kicked.
I test it myself i typed to kick myself and it worked the command, but doesn't say in the chat that myname is kicked by administrator myname [reason: asd] [EXAMPLE]
So how do to that it shows the message before the player is actually kicked?
I learned that i need to make a timer, but i don't know how. If anyone can give me timer for this command to work , to show the message, before the player is kicked.
Thanks anyway.

