Problem With /report .. -
Hey Guys .. I have a prob with /report, when the players sent the report, the admins online didn't receive it .. Here is the code
Код:
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;
}
case 1:
{
SendClientMessage(playerid, COLOR_BRIGHTRED, ".дъмерд рщмзд мцееъ дагойрйн");
return 1;
}
case 2:
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Informe Mensaje enviado a los Administradores.");
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_LIGHTBLUE, string);
}
return 1;
}
Re : Problem With /report .. -
Re : Problem With /report .. -