07.12.2014, 18:10
pawn Код:
#define <zcmd>
#define <sscaf2>
command(banear, playerid, params[])
{
if(EstaDuty[playerid] == false)
{
if(PI[playerid][Staff] == 2)
{
if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, COLOR_BLANCO, "administrador usa /banear [playerid/nombre].");
if(IsPlayerConnected(params[0])&& params[0] != INVALID_PLAYER_ID)
{
Mensaje(params[0], COLOR_BLANCO, "Te han baneado.");
Mensaje(playerid, COLOR_BLANCO, "Lo has baneado.");
Ban(params[0]);
}
else
{
SendClientMessage(playerid, -1, "Player no conectado.");
}
}
else
{
SendClientMessage(playerid, -1, "No eres administrador nivel 2");
}
}
else
{
SendClientMessage(playerid, -1, "Estas en duty.");
}
return true;
}