17.04.2011, 22:55
Here is a fast command i made...
v
How to make it like if you dont type any reason.. just "/kick 1" then the %s (reason) should be replaced with "No specific reason"
v
pawn Код:
COMMAND:kick(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_ERROR, "You are not autorized to use this command.");
{
new targetid, reason[128], string[128];
if(sscanf(params, "ds[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_ERROR, "USAGE: /kick (id) (option: reason)");
{
if(IsPlayerOnline(playerid))
{
format(string, sizeof(string), "%s(%d) has been {FF0000}kicked {FFFFFF}by an server admin. | Reason: %s", PlayerName(targetid), targetid, reason);
SendClientMessageToAll(COLOR_INFO, string);
Kick(targetid);
}
}
return 1;
}
}