/warn
#2

well i recommand zcmd because its the easiest.
pawn Код:
dcmd_warn(playerid, params[])
{
        new id,IDWarn[MAX_PLAYERS],name[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME];
        if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"USAGE: /warn [playerid / partofname]");
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is not connected");
        GetPlayerName(playerid,name,24);
        GetPlayerName(id,pname,24);
        if(IDWarn[ID] == 0)
        {
                format(params,sizeof(params),"Admin %s has warned you (1/3)",name);
                SendClientMessage(id,0xFF0000FF,params);
                format(params,sizeof(params),"You have warned %s (1/3)",pname);
                SendClientMessage(playerid,0xFF0000FF,params);
                IDWarn[ID] = 1;
        }
        else if(IDWarn[ID] == 1)
        {
                format(params,sizeof(params),"Admin %s has warned you (2/3)",name);
                SendClientMessage(id,0xFF0000FF,params);
                format(params,sizeof(params),"You have warned %s (2/3)",pname);
                SendClientMessage(playerid,0xFF0000FF,params);
                IDWarn[ID] = 2;
        }
        else if(IDWarn[ID] == 2)
        {

                format(params,sizeof(params),"Admin %s has warned you (3/3)",name);
                SendClientMessage(id,0xFF0000FF,params);
                format(params,sizeof(params),"You have warned %s (3/3)",pname);
                SendClientMessage(playerid,0xFF0000FF,params);
                IDWarn[ID] = 3;
                Kick(id);
        }
        return 1;
}
Reply


Messages In This Thread
/warn - by misho1 - 09.03.2012, 16:31
Re: /warn - by Tanush123 - 09.03.2012, 20:00
Re: /warn - by misho1 - 10.03.2012, 06:55
Re: /warn - by Medardo4Life - 10.03.2012, 06:57
Re: /warn - by misho1 - 10.03.2012, 06:59

Forum Jump:


Users browsing this thread: 1 Guest(s)