Help !!! Problam with the TextDraw i don't know what to do - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help !!! Problam with the TextDraw i don't know what to do (
/showthread.php?tid=260502)
Help !!! Problam with the TextDraw i don't know what to do -
tal_peretz - 09.06.2011
I built a system of nitro, and everything work, but, after player id not 0 inside to car the TextDraw disappear!
* Not all the time, after somthing happend it's not showing at all for the player, but i don't know why
It's the only place where it appears -
PHP код:
new Text:NitroStuck[MAX_PLAYERS];
OnPlayerConnect
NitroStuck[playerid] = TextDrawCreate(604.000000, 393.000000, "_");
TextDrawBackgroundColor(NitroStuck[playerid], 255);
TextDrawFont(NitroStuck[playerid], 1);
TextDrawLetterSize(NitroStuck[playerid], -0.789998, 0.199998);
TextDrawColor(NitroStuck[playerid], -1);
TextDrawSetOutline(NitroStuck[playerid], 0);
TextDrawSetProportional(NitroStuck[playerid], 0);
TextDrawSetShadow(NitroStuck[playerid], 4);
TextDrawUseBox(NitroStuck[playerid], 1);
TextDrawBoxColor(NitroStuck[playerid], 397783295);
TextDrawTextSize(NitroStuck[playerid], 497.000000, -12.000000);
OnPlayerDisconnect
TextDrawDestroy(NitroStuck[playerid]);
OnPlayerStateChange
if(oldstate == PLAYER_STATE_DRIVER)
{
TextDrawHideForPlayer(playerid, NitroStuck[playerid]);
}
if(newstate == PLAYER_STATE_DRIVER)
{
TextDrawShowForPlayer(playerid, NitroStuck[playerid]);
}
[all the other is only change color box and TextDrawShowForPlayer so it's not matter i think ..]
I sitting on that for 8 hours !!! I'm desperate please help
Re: Help !!! Problam with the TextDraw i don't know what to do -
Vince - 09.06.2011
Try this:
pawn Код:
new Text:NitroStuck[MAX_PLAYERS] = {Text:INVALID_TEXT_DRAW, ...};
Re: Help !!! Problam with the TextDraw i don't know what to do -
tal_peretz - 09.06.2011
Ok i try it.. can you explain me please what did you do here?
Re: Help !!! Problam with the TextDraw i don't know what to do -
tal_peretz - 09.06.2011
I created the TextDraw when player enter to car and destroy when he quit from car and it's WORK, but... i think it's doing crash for player sometimes and i need to fix it, how ?