textdraw error
#1

I make a textdraw for each player join , is not global text draw but i block there

PHP код:
D:\Server de samp\filterscripts\textdraw.pwn(18) : warning 213tag mismatch 
D
:\Server de samp\filterscripts\textdraw.pwn(19) : warning 213tag mismatch 
D
:\Server de samp\filterscripts\textdraw.pwn(20) : warning 213tag mismatch 
D
:\Server de samp\filterscripts\textdraw.pwn(21) : warning 213tag mismatch 
D
:\Server de samp\filterscripts\textdraw.pwn(22) : warning 213tag mismatch 
D
:\Server de samp\filterscripts\textdraw.pwn(23) : warning 213tag mismatch 
D
:\Server de samp\filterscripts\textdraw.pwn(24) : warning 213tag mismatch 
D
:\Server de samp\filterscripts\textdraw.pwn(25) : warning 213tag mismatch 
D
:\Server de samp\filterscripts\textdraw.pwn(26) : warning 213tag mismatch 
D
:\Server de samp\filterscripts\textdraw.pwn(27) : warning 213tag mismatch 
D
:\Server de samp\filterscripts\textdraw.pwn(28) : warning 213tag mismatch 
D
:\Server de samp\filterscripts\textdraw.pwn(29) : warning 213tag mismatch 
D
:\Server de samp\filterscripts\textdraw.pwn(30) : warning 213tag mismatch 
PHP код:
new Text:textdraw1[MAX_PLAYERS]; 
PHP код:
    textdraw1[playerid] = CreatePlayerTextDraw(playerid, -28.000000348.812500""); 
    
PlayerTextDrawLetterSize(playeridtextdraw1[playerid], 0.0000000.000000); 
    
PlayerTextDrawTextSize(playeridtextdraw1[playerid], 90.00000090.000000); 
    
PlayerTextDrawAlignment(playeridtextdraw1[playerid], 1); 
    
PlayerTextDrawColor(playeridtextdraw1[playerid], -1); 
    
PlayerTextDrawSetShadow(playeridtextdraw1[playerid], 0); 
    
PlayerTextDrawSetOutline(playeridtextdraw1[playerid], 0); 
    
PlayerTextDrawBackgroundColor(playeridtextdraw1[playerid], 0); 
    
PlayerTextDrawFont(playeridtextdraw1[playerid], 5); 
    
PlayerTextDrawSetProportional(playeridtextdraw1[playerid], 0); 
    
PlayerTextDrawSetShadow(playeridtextdraw1[playerid], 0); 
    
PlayerTextDrawSetPreviewModel(playeridtextdraw1[playerid], 0); 
    
PlayerTextDrawSetPreviewRot(playeridtextdraw1[playerid], 0.0000000.00000015.0000001.000000); 
    
TextDrawShowForPlayer(playerid,Text:textdraw1[playerid]); 
What can be?Thanks for help
Reply
#2

Simply make it new Text:textdraw1; instead of new Text:textdraw1[MAX_PLAYERS]; (also make changes under OnGameModeInit if it was a gamemode or under OnFilterScriptInit)

and when player CONNECT write the final line under

OnPlayerConnect(playerid)

so it should be looking like this:

PHP код:
public OnPlayerConnect(playerid)
{
     
TextDrawShowForPlayer(playeridtextdraw1);
     return 
1;

The whole code:

PHP код:
new Text:textdraw1;
public 
OnFilterScriptInit()
{
    
textdraw1 CreatePlayerTextDraw(playerid, -28.000000348.812500"");  
    
PlayerTextDrawLetterSize(playeridtextdraw10.0000000.000000);  
    
PlayerTextDrawTextSize(playeridtextdraw190.00000090.000000);  
    
PlayerTextDrawAlignment(playeridtextdraw11);  
    
PlayerTextDrawColor(playeridtextdraw1, -1);  
    
PlayerTextDrawSetShadow(playeridtextdraw10);  
    
PlayerTextDrawSetOutline(playeridtextdraw10);  
    
PlayerTextDrawBackgroundColor(playeridtextdraw10);  
    
PlayerTextDrawFont(playeridtextdraw15);  
    
PlayerTextDrawSetProportional(playeridtextdraw10);  
    
PlayerTextDrawSetShadow(playeridtextdraw10);  
    
PlayerTextDrawSetPreviewModel(playeridtextdraw10);  
    
PlayerTextDrawSetPreviewRot(playeridtextdraw10.0000000.00000015.0000001.000000);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
   
TextDrawShowPlayer(playeridtextdraw1);
   return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)