/ban command (rep)
#3

PHP код:
command(banplayeridparams[])
{
    new 
idreason[128], string[128];
    if(
sscanf(params"uz"idreason))
    {
        if(
Player[playerid][AdminLevel] >= 2)
        {
            
SendClientMessage(playeridWHITE"SYNTAX: /ban [playerid] [reason]");
        }
    }
    else
    {
        if(
Player[playerid][AdminLevel] >= 2)
        {
            if(
IsPlayerConnectedEx(id))
            {
                if(
Player[id][AdminLevel] >= Player[playerid][AdminLevel])
                {
                    
SendClientMessage(playeridWHITE"You do not have the authority to do that (higher rank, or the same).");
                }
                else
                {
                    if(
strlen(reason) >= 1)
                    {
                        new 
hourminuteseconddayyearmonth;
                        
gettime(hourminutesecond);
                        
getdate(yearmonthday);
                        
format(stringsizeof(string), "You have been banned for %s."reason);
                        
SendClientMessage(idGREYstring);
                        
Ban(id);
                    }
                    else
                    {
                        
SendClientMessage(playeridWHITE"SYNTAX: /ban [playerid] [reason]");
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridWHITE"That player is not connected or isn't logged in.");
                return 
1;
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
/ban command (rep) - by iPentagon - 12.02.2012, 02:24
Re: /ban command (rep) - by RicaNiel - 12.02.2012, 02:39
Re: /ban command (rep) - by Nuke547 - 12.02.2012, 02:45
Re: /ban command (rep) - by Dr.Heinz - 12.02.2012, 02:47
Re: /ban command (rep) - by RicaNiel - 12.02.2012, 02:48

Forum Jump:


Users browsing this thread: 3 Guest(s)