27.12.2014, 20:19
I made a command
I want to add the player name who kicked the other player instead of "name here" how to make it ??
PHP код:
CMD:kick(playerid, params[])
{
new id;
if(sscanf(params,"u", id)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /kick [id]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "This is player is not connected");
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has been kicked by //name here", name);
SendClientMessageToAll(COLOR_RED, string);
SetTimerEx("KickDelay", 2000, false, "i", playerid);
return 1;
}