SA-MP Forums Archive
It dont sending it to the player! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: It dont sending it to the player! (/showthread.php?tid=404198)



It dont sending it to the player! - R9 - 02.01.2013

I got a problem there, when i write /tr [reportid [reason] when i write in reason it's not sending it to the player how to fix it?

Quote:

CMD:tr(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new string[128],reason[128], reportid;
if(sscanf(params, "ds[128]", reportid,reason)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /tr [reportid] [reason]");

if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!"); return 1; }
if(Reports[reportid][BeingUsed] == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
return 1;
}
if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
{
SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
Reports[reportid][ReportFrom] = 999;
Reports[reportid][BeingUsed] = 0;
return 1;
}
format(string, sizeof(string), "AdmCmd: %s has trashed the report from %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]));
ABroadCast(COLOR_ORANGE, string, 2);
format(string, sizeof(string), "%s has marked your report invalid. It will not be reviewed. Please check /reporttips", GetPlayerNameEx(playerid));
SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
PlayerInfo[playerid][pTrashReport]++;
Reports[reportid][ReportFrom] = 999;
Reports[reportid][BeingUsed] = 0;
Reports[reportid][TimeToExpire] = 0;
strmid(Reports[reportid][Report], "None", 0, 4, 4);
}
return 1;
}




Re: It dont sending it to the player! - JaKe Elite - 02.01.2013

Can you use [ pawn ] [ /pawn ] instead of [ code ] [ /code ].
Because it's unreadable.


Re: It dont sending it to the player! - R9 - 02.01.2013

Quote:
Originally Posted by Romel
Посмотреть сообщение
Can you use [ pawn ] [ /pawn ] instead of [ code ] [ /code ].
Because it's unreadable.
Sure, here you got it

pawn Код:
CMD:tr(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new string[128],reason[128], reportid;
if(sscanf(params, "ds[128]", reportid,reason)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /tr [reportid] [reason]");

if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!"); return 1; }
if(Reports[reportid][BeingUsed] == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
return 1;
}
if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
{
SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
Reports[reportid][ReportFrom] = 999;
Reports[reportid][BeingUsed] = 0;
return 1;
}
format(string, sizeof(string), "AdmCmd: %s has trashed the report from %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]));
ABroadCast(COLOR_ORANGE, string, 2);
format(string, sizeof(string), "%s has marked your report invalid. It will not be reviewed. Please check /reporttips", GetPlayerNameEx(playerid));
SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
PlayerInfo[playerid][pTrashReport]++;
Reports[reportid][ReportFrom] = 999;
Reports[reportid][BeingUsed] = 0;
Reports[reportid][TimeToExpire] = 0;
strmid(Reports[reportid][Report], "None", 0, 4, 4);
}
return 1;
}