Need help with closereport.
#5

don't use more strings you can do it with 1 string try this

PHP код:
CMD:cr(playeridparams[])
{
    if(
pInfo[playerid][AdminLevel] > 0)
    {
        new 
otheridaName[MAX_PLAYER_NAME], string[256], othername[MAX_PLAYER_NAME], reason[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.");
        if (
sscanf(params"us"otheridreason))
        {
            
            
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(stringsizeof(string), "> Admin %s: %s"aNameparams);
            
submitToHelpersAndAdmins(stringCOLOR_YELLOW);
            
SendClientMessage(playerid, -1"Your report has been closed.");
            
        }
        else
        {
            
format(stringsizeof(string), "> Admin %s: %s"aNameparams);
            
submitToHelpersAndAdmins(stringCOLOR_YELLOW);
            
format(stringsizeof(string), "Admin %s: %s"aNameparams);
            
SendClientMessage(otherid, -1string);
            
SendClientMessage(playerid, -1"Your report has been closed.");
        }
        
pInfo[otherid][HasReport] = 0;
        
pInfo[otherid][ReportAccepted] = 0;
    }
    else return 
SendClientMessage(playerid0xFF0000FF"Error: You are not authorized to use this command!");
    return 
1;

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)