03.04.2013, 06:03
Hello!, some one know how to make when you kick someone say who and why kick you? I need a filter script Thank You
CMD:kick(playerid, params[])
{
new string[128];
new reason[128];
new id;
if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_GREY, "[USAGE]: /kick [playerid / part of name] [reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected to the server!");
format(string, sizeof(string), "Admin %s (%d) has kicked %s (%d) Reason: %s", GetName(playerid), playerid, GetName(id), id, reason);
SendClientMessageToAll(COLOR_RED, string);
format(string, sizeof(string), "You have kicked %s (%d) Reason: %s", GetName(id), id, reason);
SendClientMessage(playerid, COLOR_RED, string);
Kick(id);
return 1;
}
stock GetName(playerid)
{
new name[MAX_PLAYER_NAME];
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, name, sizeof(name));
}
return name;
}
Try using this:
pawn Код:
pawn Код:
|