HelpMe #5 [+REP]
#6

pawn Код:
CMD:ban(playerid, params[])
{
       if(!IsPlayerAdmin(playerid))
                return SendClientMessage(playerid, -1, "You're not allowed to use this command.");

       new pID, reason[128], string[128], pName[MAX_PLAYER_NAME], pSenderName[MAX_PLAYER_NAME];
       if(sscanf(params,"us[128]",id, string))
               return SendClientMessage(playerid, -1, "Usage: /ban [PlayerID] [Reason]");

       GetPlayerName(pID, pName, MAX_PLAYER_NAME);
       GetPlayerName(playerid, pSenderName, MAX_PLAYER_NAME);
       format(string, sizeof string, "Admin %s banned you for %s.", pSenderName, reason);
       SendClientMessage(pID, -1, string);
       format(string, sizeof string, "You banned %s for %s", pName, reason);
       SendClientMessage(playerid, -1, string;
       Ban(pID, reason);
       return 1;
}
Reply


Messages In This Thread
HelpMe #5 [+REP] - by NessaHD - 06.11.2011, 21:20
Re: HelpMe #5 [+REP] - by iNorton - 06.11.2011, 21:24
Re: HelpMe #5 [+REP] - by Sascha - 06.11.2011, 21:25
Re: HelpMe #5 [+REP] - by NessaHD - 06.11.2011, 21:27
Re: HelpMe #5 [+REP] - by Sascha - 06.11.2011, 21:28
Re: HelpMe #5 [+REP] - by antonio112 - 06.11.2011, 21:29
Re: HelpMe #5 [+REP] - by iNorton - 06.11.2011, 21:30
Re: HelpMe #5 [+REP] - by Sascha - 06.11.2011, 21:32
Re: HelpMe #5 [+REP] - by iNorton - 06.11.2011, 21:34
Re: HelpMe #5 [+REP] - by Sascha - 06.11.2011, 21:36

Forum Jump:


Users browsing this thread: 4 Guest(s)