Question,
#1

When i test the command it will say Player Not connected.
I don't know what i did wrong

PHP код:
CMD:acceptreport(playeridparams[])
{
    new 
pIDsendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
    if(
PlayerInfo[playerid][pAdmin] < 1) return SCM(playeridCOLOR_LIGHTRED,"[C-RP]: {FFFFFF}You are not authorized to use this");
    if(
sscanf(params,"u"pID)) return SCM(playeridCOLOR_LIGHTRED,"[C-RP]: {FFFFFF}/acceptreport [playerid]");
    if(!
IsPlayerConnected(pID)) return SCM(playeridCOLOR_LIGHTRED,"[C-RP]: {FFFFFF}Player not connected");
    else
    {
        if(
PlayerReport[pID] == 1)
        {
            
PlayerReport[pID] = 0;
             
GetPlayerName(playeridsendernamesizeof(sendername));
            
GetPlayerName(pIDnamesizeof(name));
            
format(stringsizeof(string), "[C-RP Admin]: {FFFFFF}%s has just accepted the report of [ID:%d]%s."sendernamepIDname);
            
ABroadCast(COLOR_LIGHTREDstring1);
            
format(stringsizeof(string), "[C-RP Admin]: {FFFFFF}%s has accepted your report and will assist you shortly."playeridsendername);
            
SendClientMessage(pIDCOLOR_LIGHTREDstring);
        }
        else return 
SCM(playeridCOLOR_LIGHTRED,"[C-RP]: {FFFFFF}That player didn't send a report!");
    }
    return 
1;

Reply
#2

If you are using 0.3d server package, the 'u' parameter in sscanf isnt working YET. Use the parameter 'i' or 'd' instead.
Reply
#3

Ahh, thanks.
Reply
#4

Dont use 0.3d, It aint stable (YET)
Reply
#5

It's for scripting so he can use it, I use it too.
Reply
#6

same as user above i use 0.3d
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)