[HELP] Can you see a problem?
#1

Need some help, the command itself works but for some reason administrators cannot see the report? can anyone help:

Quote:

if(strcmp(cmd, "/report", true) == 0)
{
tmp = strtok(cmdtext, idx);
new otherplayer = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /report [playerid] [reason]");
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /report [playerid] [reason]");
if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Player ID.");
GetPlayerName(playerid, playrname, sizeof(playrname));
switch (Lang[playerid])
{
case 0:
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Report Message sent to the Admins.");
return 1;
}
}
format(string,sizeof(string),"Report from \"%s\": [ID:%d Reason: %s.]", playrname, otherplayer, result);
for(new i=0;i<MAX_PLAYERS;i++)
if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 1)
SendClientMessage(i,COLOR_ORANGE,string);
{
{
}
}
return 1;
}

Reply
#2

Bump
Reply
#3

You say theres no errors?

Maybe its the last loop?

pawn Код:
for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i) && PlayerInfo[pAdmin] >= 1)
        {
            SendClientMessage(i,COLOR_ORANGE,string);
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)