/reports
#1

I have this command but when someone report someone, i need to check /reports!

/reports say there is no reports yet, when the player has reported! like!




Код:
CMD:reports(playerid,params[])
{
    #pragma unused params
    if(adlvl[playerid] >= 1) {
        new ReportCount;
		for(new i; i < MAX_REPORTS; i++) if(strcmp(Reports[i], "<none>", true)) {
			ReportCount++;
			SendClientMessage(playerid, COLOR_WHITE, Reports[i]);
		}
		if(ReportCount == 0)
			SendClientMessage(playerid, COLOR_WHITE, "There have been no reports");
    }
	else
		SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be level 1/Help moderator to use this command");
	return 1;
}
Reply
#2

Uh, You're showing us the /reports command...
you need to show the /report && /reports command

Otherwise 1 is useless without the other
Reply
#3

Код:
CMD:report(playerid, params[])
{
	new sstring[256], giveplayerid, reason[128], playername[25], giveplayer[25], string[128];
	if (sscanf(params, "us[128]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /report [playerid] [reason]");
	if (!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_RED, "Error: Inactive player id!");
	GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
	GetPlayerName(giveplayerid, giveplayer, MAX_PLAYER_NAME);
	format(sstring, sizeof(sstring), "%s reported player %s(%d) for %s.\r\n", playername, giveplayer, giveplayerid, reason);
	SendMessageToAdmins(COLOR_ORANGE, sstring);
	format(string, 128, "Your report regarding %s(%d) has been sent to server admins.", giveplayer, giveplayerid);
	SendClientMessage(playerid, COLOR_YELLOW, string);
	return 1;
}
Reply
#4

BUMP!
Reply
#5

Quote:
Originally Posted by Prokill911
Посмотреть сообщение
Uh, You're showing us the /reports command...
you need to show the /report && /reports command

Otherwise 1 is useless without the other
Why are you bumping when you haven't even read all the replies ? Look what this guy asked for!
Reply
#6

Yes, he told me he need to see /report i've show you /reports and and i've post /report!

So both is here!
Reply
#7

You don't even have any code that adds the report to a list there isn't anything wrong with your system it is simply not even coded. This is definitely some downloaded gamemode because you don't have the knowledge to even see the simplest of issues as this is read some tutorials.
Reply
#8

I didn't download anything, I just made it myself!

Ok i will try to fix this ty
Reply
#9

Quote:
Originally Posted by Pottus
Посмотреть сообщение
You don't even have any code that adds the report to a list there isn't anything wrong with your system it is simply not even coded. This is definitely some downloaded gamemode because you don't have the knowledge to even see the simplest of issues as this is read some tutorials.
Pretty much what he said..
All you're doing is giving the player params to send a report..

Once they fufill those params all it does is send them 2 messages..
1 With the report text
1 Saying it has been sent...
You're not storing the reports anywhere..

You'd be better off making your reports into Enum arrays.

Example
PHP код:
Reports[] = {
     
ReportID[MAX_REPORTS];
     
PlayerReported[MAX_PLAYER_NAME],
     
ReportedPlayer[MAX_PLAYER_NAME],
     
ReportReason[128],
}; 
Then just make it so when ever someone reports...
It counts +1 To the ID for each outstanding report.
An adds into each field per that ID.
Reply
#10

Try this :

PHP код:
CMD:reports(playerid,params[])
{
    
#pragma unused params
    
if(adlvl[playerid] >= 1) {
        new 
ReportCount;
        for(new 
iMAX_REPORTSi++) if(strcmp(Reports[i], "<none>"true)) {
            
ReportCount =1;
            
SendClientMessage(playeridCOLOR_WHITEReports[i]);
        }
        if(
ReportCount == 0)
            
SendClientMessage(playeridCOLOR_WHITE"There have been no reports");
    }
    else
        
SendClientMessage(playeridCOLOR_RED"ERROR: You need to be level 1/Help moderator to use this command");
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)