14.03.2011, 13:54
ok, this work well, but don't ask for reazon... just ban! I want this to tell the reazin too! But in my script form... Or just tell me what to add! THANKS
pawn Код:
COMMAND:iban(playerid, params[])
{
new id;
if(IsPlayerConnected(id))
{
if(IsPlayerAdmin(playerid))
{
if(!sscanf(params, "ui", id))
{
new string[64];
new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "You has been banned by %s.", name);
SendClientMessage(playerid, 0x0259EAAA, string);
format(string, sizeof(string), "You banned %s.", id);
SendClientMessage(playerid, 0x0259EAAA, string);
Ban(id);
return 1;
}
else return SendClientMessage(playerid, 0x0259EAAA, "USAGE: /ban [PlayerId/PartOfName]");
}
else return SendClientMessage(playerid, 0x0259EAAA, "You are not admin.");
}
else return SendClientMessage(playerid, 0x0259EAAA, "Player is not connected.");
}