SA-MP Forums Archive
Problem with Textdraw - 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: Problem with Textdraw (/showthread.php?tid=335929)



Problem with Textdraw - Ld Est Ld - 20.04.2012

Hello

I have a problem with the textdraw.

If I'm in car, then the textdraw: "Fuel" not showing up.

There's the code. Made printf too, if I sit in car, the printf works.
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT) {
		TextDrawShowForPlayer(playerid, textdrawVariables[9]);//
		printf("showing textdraw");
}
}
TextDraw[9] :
Код:
textdrawVariables[9] = TextDrawCreate(123.0, 123.0, "Fuel: ");
	TextDrawBackgroundColor(textdrawVariables[9], 255);
	TextDrawFont(textdrawVariables[9], 2);
	TextDrawLetterSize(textdrawVariables[9], 0.500000, 1.300000);
	TextDrawColor(textdrawVariables[9], -1362045441);
	TextDrawSetOutline(textdrawVariables[9], 0);
	TextDrawSetProportional(textdrawVariables[9], 1);
	TextDrawSetShadow(textdrawVariables[9], 1);



Re: Problem with Textdraw - Ld Est Ld - 20.04.2012

Please Help?


Re: Problem with Textdraw - Faisal_khan - 20.04.2012

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
        if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
        {
            TextDrawShowForPlayer(playerid, textdrawVariables[9]);//
            printf("showing textdraw");
        }
        return 1;
}



Re: Problem with Textdraw - Ld Est Ld - 20.04.2012

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
        if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
        {
            TextDrawShowForPlayer(playerid, textdrawVariables[9]);//
            printf("showing textdraw");
        }
        return 1;
}
That's the same, I posted Above :fp
Thanks anyway


Re: Problem with Textdraw - Faisal_khan - 20.04.2012

I added return 1;.


Re: Problem with Textdraw - Ld Est Ld - 20.04.2012

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
I added return 1;.
Okk, still not working...


Re: Problem with Textdraw - Faisal_khan - 20.04.2012

Try this:
pawn Код:
textdrawVariables[9] = TextDrawCreate(123.0, 123.0, "Fuel: ");
    TextDrawBackgroundColor(textdrawVariables[9], 0xFFFFFFAA);
    TextDrawFont(textdrawVariables[9], 2);
    TextDrawLetterSize(textdrawVariables[9], 0.500000, 1.300000);
    TextDrawColor(textdrawVariables[9], 0x33AA33AA);
    TextDrawSetOutline(textdrawVariables[9], 0);
    TextDrawSetProportional(textdrawVariables[9], 1);
    TextDrawSetShadow(textdrawVariables[9], 1);