[HELP] Regarding my /report command. - 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: [HELP] Regarding my /report command. (
/showthread.php?tid=432624)
[HELP] Regarding my /report command. -
Isolated - 23.04.2013
Hello basically, I'm having problems with my /report command. When I type /report in game it will show up, but it changes, instead of adding it to a list. Here is the command:
pawn Код:
CMD:report(playerid, params[])
{
if(!isnull(params))
{
new List = 1;
if(ReportList == 0)
{
List = 2;
ReportList = 1;
}
if(ReportList == 1)
{
List = 3;
ReportList = 2;
}
if(ReportList == 2)
{
List = 4;
ReportList = 3;
}
if(ReportList == 3)
{
List = 1;
ReportList = 0;
}
new String[128];
format(String, sizeof(String), "~r~%s(%i)~n~~w~%s", ReturnPlayerName(playerid), playerid, params);
TextDrawSetString(Reports[List], String);
TextDrawShowForPlayer(playerid, Reports[0]);
TextDrawShowForPlayer(playerid, Reports[List]);
ReportList = List;
}
return 1;
}
Also, I only show myself the textdraw for testing purposes.
Thanks. Any information needed can be provided.
Re: [HELP] Regarding my /report command. -
Isolated - 23.04.2013
****** there is a reason. As Reports[0] is the title. And Reports[1] onward is for reports. It all works, just doesn't add to a list. It just changes the list.