textdraw problem
#2

Create the textdraw OnPlayerConnect, not OnGameModeInit. You can't pass a playerid parameter OnGameModeInit, hense why the looped value ( [ i ] ) is giving you an error.

OnPlayerConnect, do it like this..

pawn Код:
public OnPlayerConnect ( playerid )
{
    YourTextDraw [ playerid ] = TextDrawCreate(498.000000, 80.000000, "Cash: $");
    TextDrawBackgroundColor(YourTextDraw [ playerid ], 1711276202);
    TextDrawFont(YourTextDraw [ playerid ], 3);
    TextDrawLetterSize(YourTextDraw [ playerid ], 0.329998, 1.799999);
    TextDrawColor(YourTextDraw [ playerid ], -1);
    TextDrawSetOutline(YourTextDraw [ playerid ], 1);
    TextDrawSetProportional(YourTextDraw [ playerid ], 1);
    TextDrawUseBox(YourTextDraw [ playerid ], 1);
    TextDrawBoxColor(YourTextDraw [ playerid ], 255);
    TextDrawTextSize(YourTextDraw [ playerid ], 606.000000, 4.000000);
   
    TextDrawShowForPlayer( playerid, YourTextDraw [ playerid ] );
    return true;
}
Of course, after this, don't forget to set either a global or per-player timer to update the string every (1?) second or so.

SetTimerEx (per-player) or SetTimer will suffice for this.
Reply


Messages In This Thread
textdraw problem - by Face9000 - 03.05.2012, 20:16
Re: textdraw problem - by 2KY - 03.05.2012, 20:19
Re: textdraw problem - by Face9000 - 03.05.2012, 20:30
Re: textdraw problem - by 2KY - 03.05.2012, 20:31
Re: textdraw problem - by Face9000 - 03.05.2012, 20:45
Re: textdraw problem - by mickos - 03.05.2012, 20:49

Forum Jump:


Users browsing this thread: 1 Guest(s)