#1

i need warn command in dcmd
and sccanf and kick some one if in the 3rd warn
pawn Код:
enum gPInfo
{
        Logged,
        Regged,
        Level,
        Mute,
        uhm,
        svm,
        freeze,
        jail,
        VIP,
        Tester,
        Tele,
        pm
};
Reply
#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
#3

I Got 6 Warning And 6 Errors!
Код:
E:\Freeroam World\filterscripts\admin.pwn(1343) : error 017: undefined symbol "ID"
E:\Freeroam World\filterscripts\admin.pwn(1345) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
E:\Freeroam World\filterscripts\admin.pwn(1347) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
E:\Freeroam World\filterscripts\admin.pwn(1349) : error 017: undefined symbol "ID"
E:\Freeroam World\filterscripts\admin.pwn(1351) : error 017: undefined symbol "ID"
E:\Freeroam World\filterscripts\admin.pwn(1353) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
E:\Freeroam World\filterscripts\admin.pwn(1355) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
E:\Freeroam World\filterscripts\admin.pwn(1357) : error 017: undefined symbol "ID"
E:\Freeroam World\filterscripts\admin.pwn(1359) : error 017: undefined symbol "ID"
E:\Freeroam World\filterscripts\admin.pwn(1362) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
E:\Freeroam World\filterscripts\admin.pwn(1364) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
E:\Freeroam World\filterscripts\admin.pwn(1366) : error 017: undefined symbol "ID"
Reply
#4

Quote:
Originally Posted by misho1
Посмотреть сообщение
I Got 6 Warning And 6 Errors!
Код:
E:\Freeroam World\filterscripts\admin.pwn(1343) : error 017: undefined symbol "ID"
E:\Freeroam World\filterscripts\admin.pwn(1345) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
E:\Freeroam World\filterscripts\admin.pwn(1347) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
E:\Freeroam World\filterscripts\admin.pwn(1349) : error 017: undefined symbol "ID"
E:\Freeroam World\filterscripts\admin.pwn(1351) : error 017: undefined symbol "ID"
E:\Freeroam World\filterscripts\admin.pwn(1353) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
E:\Freeroam World\filterscripts\admin.pwn(1355) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
E:\Freeroam World\filterscripts\admin.pwn(1357) : error 017: undefined symbol "ID"
E:\Freeroam World\filterscripts\admin.pwn(1359) : error 017: undefined symbol "ID"
E:\Freeroam World\filterscripts\admin.pwn(1362) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
E:\Freeroam World\filterscripts\admin.pwn(1364) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
E:\Freeroam World\filterscripts\admin.pwn(1366) : error 017: undefined symbol "ID"
ID is the Admin Warning Chat(If you have), replace it with your define.
Reply
#5

i don't have it
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)