textdraw update - 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: textdraw update (
/showthread.php?tid=291770)
textdraw update -
marik1322 - 21.10.2011
i have that
PHP код:
format(newtext3, sizeof(newtext3), "Points:%d", GermanyPoints[playerid]);
TextDrawSetString(Textdraw6, newtext3);
TextDrawShowForAll(Textdraw6);
format(newtext2, sizeof(newtext2), "Points:%d", RussianPoints[playerid]);
TextDrawSetString(Textdraw7, newtext2);
TextDrawShowForAll(Textdraw7);
and i want to update the text draw when i use GermanyPoints[playerid] --; or GermanyPoints[playerid]);
how can i do that??
Re: textdraw update -
SmiT - 21.10.2011
https://sampwiki.blast.hk/wiki/OnPlayerUpdate
Re: textdraw update -
marik1322 - 21.10.2011
what i need to put info this public?
Re: textdraw update -
SmiT - 21.10.2011
pawn Код:
public OnPlayerUpdate( playerid )
{
TextDrawHideForPlayer( playerid, Textdraw6 );
TextDrawHideForPlayer( playerid, Textdraw7 );
format( newtext3, sizeof ( newtext3 ), "Points:%d", GermanyPoints[ playerid ] );
TextDrawSetString( Textdraw6, newtext3 );
TextDrawShowForPlayer( playerid, Textdraw6 );
format( newtext2, sizeof ( newtext2 ), "Points:%d", RussianPoints[ playerid ] );
TextDrawSetString( Textdraw7, newtext2 );
TextDrawShowForPlayer( playerid, Textdraw7 );
return true;
}