Need help with closereport.
#2

Why are you using 'r' in sccanf to get player's id?
Try this:
PHP код:
CMD:cr(playeridparams[])
{
    if(
pInfo[playerid][AdminLevel] > 0)
    {
        new 
otheridaName[MAX_PLAYER_NAME], string[256], othername[MAX_PLAYER_NAME], string2[256], string3[256];
        
GetPlayerName(playeridaNamesizeof(aName));
        
GetPlayerName(otheridothernamesizeof(othername));
        if(
sscanf(params"u"otherid)) return SendClientMessage(playeridCOLOR_GREY"Usage: {FFFFFF}/cr [playerid/name] + [reason]");
        {
            if(
otherid == INVALID_PLAYER_ID) return SendClientMessage(playeridCOLOR_GREY"That player is not connected."); 
            if(
pInfo[otherid][HasReport] == 0) return SendClientMessage(playeridCOLOR_GREY"That player does not have any reports available."); 
            
format(stringsizeof(string), "* Admin %s has closed the report from %s [%d, level %d]: %s"aNameothernameotheridpInfo[otherid][Level], pInfo[otherid][Report]);
            
submitToHelpersAndAdmins(stringCOLOR_HOTORANGE);
            
format(string2sizeof(string2), "> Admin %s: %s"aNameparams);
            
submitToHelpersAndAdmins(stringCOLOR_YELLOW);
            
SendClientMessage(playerid, -1"Your report has been closed.");
            
pInfo[otherid][HasReport] = 0;
            
pInfo[otherid][ReportAccepted] = 0;
        }
        if(
sscanf(params"rs"otheridparams)) return SendClientMessage(playeridCOLOR_GREY"Usage: {FFFFFF}/cr [playerid/name] + [reason]");
        {
            
format(string2sizeof(string2), "> Admin %s: %s"aNameparams);
            
submitToHelpersAndAdmins(string2COLOR_YELLOW);
            
format(string3sizeof(string3), "Admin %s: %s"aNameparams);
            
SendClientMessage(otherid, -1string3);
            
SendClientMessage(playerid, -1"Your report has been closed.");
            
pInfo[otherid][HasReport] = 0;
            
pInfo[otherid][ReportAccepted] = 0;
        }
    }
    else return 
SendClientMessage(playerid, -1NotAdmin);
    return 
1;
    
}
If 
didn't work, explain me whats wrong with it. 
Reply


Messages In This Thread
Need help with closereport. - by danielpalade - 27.12.2015, 12:27
Re: Need help with closereport. - by iKarim - 27.12.2015, 12:40
Re: Need help with closereport. - by ikey07 - 27.12.2015, 12:41
Re: Need help with closereport. - by danielpalade - 27.12.2015, 12:56
Re: Need help with closereport. - by IceBilizard - 27.12.2015, 17:54

Forum Jump:


Users browsing this thread: 1 Guest(s)