Help !!! Problam with the TextDraw i don't know what to do
#1

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.000000393.000000"_");
        
TextDrawBackgroundColor(NitroStuck[playerid], 255);
        
TextDrawFont(NitroStuck[playerid], 1);
        
TextDrawLetterSize(NitroStuck[playerid], -0.7899980.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(playeridNitroStuck[playerid]);
     }
     if(
newstate == PLAYER_STATE_DRIVER)
     {
            
TextDrawShowForPlayer(playeridNitroStuck[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
Reply
#2

Try this:

pawn Код:
new Text:NitroStuck[MAX_PLAYERS] = {Text:INVALID_TEXT_DRAW, ...};
Reply
#3

Ok i try it.. can you explain me please what did you do here?
Reply
#4

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 ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)