11.10.2012, 19:40
pawn Код:
dcmd_adjail(playerid,params[])
{
new string[128], ID, cmdtime, reason;
if(sscanf(params, "uis[128]", ID, cmdtime, reason))
{
SendClientMessage(playerid,COLOR_ERROR,"AeroBot: /adjail (Player Name/ID) (Seconds) (Reason)");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot jail them.");
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(IsSpawned[ID] != 1)
{
format(string,sizeof(string),"%s(%d) is not spawned. You cannot jail them.");
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
format(string,sizeof(string),"[ADMIN] Administrator has jailed %s(%d) to San Fierro Prison for %d seconds. Reason: %d",PlayerName(ID),ID,cmdtime,reason);
SendClientMessageToAll(COLOR_ADMIN,string);
format(string,sizeof(string),"9[ADMIN] Administrator has jailed %s(%d) to San Fierro Prison for %d seconds. Reason: %d",PlayerName(ID),ID,cmdtime,reason);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
}