PlayerTextDrawSetString not working. - 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: PlayerTextDrawSetString not working. (
/showthread.php?tid=525222)
PlayerTextDrawSetString not working. -
Aerotactics - 10.07.2014
I have a very similar setup working in another FS, the only difference is it outputs using 3Dtext labels, and not player textdraws. I don't understand why it's not working, as it is nearly exactly the same as the other script, yet written from scratch. The issue is that it always outputs zero in that %d.
pawn Код:
stock UpdateGas(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
new str[128];
format(str,sizeof(str),"Gasoline: %d",vInfo[vehicleid][gas]);
PlayerTextDrawSetString(playerid, Textdraw6[playerid], str);
return 1;
}
EDIT: RESOLVED! For some reason, after updating my GM from the one over FTP, the script worked.
Re: PlayerTextDrawSetString not working. -
AlonzoTorres - 10.07.2014
Remember that if you change the text and/or image of a textdraw you have to hide it and then show it again for the change to apply.