SA-MP Forums Archive
Help with player textdraws - 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 with player textdraws (/showthread.php?tid=496630)



Help with player textdraws - Fixed - redneckvideogamer - 23.02.2014

EDIT:Fixed

Hey everyone, I want to do the following:

pawn Code:
command(test,playerid,params[])
{
    for(new i; i < MAX_HOME_TDS; i++)
    {
        PlayerTextDrawShow(playerid, PlayerText:custscr[i][playerid]);
    }
    return 1;
}
It shows no error on PAWN, however, when i try to perform the command ingame, it shows me the "unknown command" error message.

Thank you in advance


Re: Help with player textdraws - Raza2013 - 23.02.2014

pawn Code:
PlayerTextDrawUseBox(playerid, custscr[0][playerid], true);



Re: Help with player textdraws - redneckvideogamer - 23.02.2014

Quote:
Originally Posted by Raza2013
View Post
pawn Code:
PlayerTextDrawUseBox(playerid, custscr[0][playerid], true);
?? That's already in the code! Therefore it does not work


Re: Help with player textdraws - MP2 - 23.02.2014

Array index out of bounds most likely. Show the declaration of 'custscr'.


Re: Help with player textdraws - redneckvideogamer - 23.02.2014

new PlayerText:custscr[12][MAX_PLAYERS];;

And I have TDs from 0-11.

Now, I changed it to [13], and I don't get the unknown command anymore, however the textdraws still dont show up


Re: Help with player textdraws - Scenario - 23.02.2014

Run the crashdetect plugin, it'll tell you what's wrong.


Re: Help with player textdraws - redneckvideogamer - 23.02.2014

Fixed: Code was misplaced, should've been in "OnPlayerConnect" this whole time..