/report problem
#1

hey guyz
i have a script for a report command.
it works a little because when i do "/report" it sends the admin a message "report from MeNMyselv".
and i want that when you do "/report" that it sends a client message like "Usage: /report [ID/username] [Reason]"

and when i do for a test "/report 0 spawnkill"
it says Unknown Command.

Here's the code:
Код:
    if (strcmp("/report", cmdtext, true, 10) == 0)
 	{
	    new str[200];
	    new idx;
	    GetPlayerName(playerid, str, 24);
	    new length = strlen(cmdtext);
	    while ((idx < length) && (cmdtext[idx] <= ' '))
	    {
	        idx++;
	    }
	    new offset = idx;
	    new result[96];
	    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
	    {
	        result[idx - offset] = cmdtext[idx];
	        idx++;
	    }
	    result[idx - offset] = EOS;
	    if(!strlen(result)) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /report [ID] [Reason]");
	    format(str, sizeof str, "Report from [%d] %s: %s", playerid, str, result);
	    for(new i = 0; i < MAX_PLAYERS; i ++) { if(IsPlayerAdmin(i)) SendClientMessage(i, 0xFFFF00FF, str); }
	    SendClientMessage(playerid, 0xFFFF00FF, "Your report message was sent to online administrators, thank you.");
	    SendClientMessage(playerid, 0xFFFF00FF, "We will find a solution soon. We will let you know what we did.");
	    return 1;
	}
plz help me hope you can fix it

srry if bad English but im Dutch
THNX for interest and maybe for helping
Reply


Messages In This Thread
/report problem - by MeNMyselv - 12.07.2011, 15:05
Re: /report problem - by Shadoww5 - 12.07.2011, 15:38
Re: /report problem - by MeNMyselv - 12.07.2011, 15:39
Re: /report problem - by MeNMyselv - 12.07.2011, 15:41
Re: /report problem - by MeNMyselv - 12.07.2011, 15:44
Re: /report problem - by MeNMyselv - 12.07.2011, 16:04
Re: /report problem - by Unte99 - 12.07.2011, 16:16
Re: /report problem - by MeNMyselv - 12.07.2011, 16:48
Re: /report problem - by Unte99 - 12.07.2011, 17:46
Re: /report problem - by Shadoww5 - 12.07.2011, 20:11

Forum Jump:


Users browsing this thread: 3 Guest(s)