26.12.2010, 06:28
OK, so i am trying to make it where this dcmd command, shows the reason. this script mainly came from another website, but i customized it a little. I do not get what is wrong with the 'reason' part, as it does not show up.
pawn Код:
dcmd_kick(playerid, params[])
{
new id, reason[64];
if(IsPlayerAdmin(playerid))
{
if (sscanf(params, "dz", id, reason))
{
SendClientMessage(playerid, COLOR_ORANGE, "Usage: /kick [playerid] [reason]");
return 1;
}
else if (!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "Invalid id");
{
SendClientMessage(id, COLOR_RED, "You have been kicked from the server %s!");
Kick(id);
SendClientMessage(playerid, COLOR_YELLOW, "Player kicked.");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not an admin!");
return 1;
}
return 1;
}