Help with player textdraws
#1

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
Reply
#2

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

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
Reply
#4

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

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
Reply
#6

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)