TextDraw not show
#1

The textdraw not show, is not global textdraw, why don't show and why i have warnings?

Variables !
PHP код:
new PlayerText:textdraw2;
new 
PlayerText:textdraw3
CODE :
PHP код:
public OnPlayerConnect(playerid

    
// WELCOME BACK
    
textdraw2 CreatePlayerTextDraw(playerid634.500000311.187500"Welcome back");
    
PlayerTextDrawLetterSize(playeridtextdraw20.4000001.600000);
    
PlayerTextDrawAlignment(playeridtextdraw23);
    
PlayerTextDrawColor(playeridtextdraw2, -1);
    
PlayerTextDrawSetShadow(playeridtextdraw20);
    
PlayerTextDrawSetOutline(playeridtextdraw21);
    
PlayerTextDrawBackgroundColor(playeridtextdraw2255);
    
PlayerTextDrawFont(playeridtextdraw22);
    
PlayerTextDrawSetProportional(playeridtextdraw21);
    
PlayerTextDrawSetShadow(playeridtextdraw20);
    
textdraw3 CreatePlayerTextDraw(playerid606.000000331.312500"andrei !");
    
PlayerTextDrawLetterSize(playeridtextdraw30.4000001.600000);
    
PlayerTextDrawAlignment(playeridtextdraw33);
    
PlayerTextDrawColor(playeridtextdraw3, -1);
    
PlayerTextDrawSetShadow(playeridtextdraw30);
    
PlayerTextDrawSetOutline(playeridtextdraw3, -1);
    
PlayerTextDrawBackgroundColor(playeridtextdraw3255);
    
PlayerTextDrawFont(playeridtextdraw32);
    
PlayerTextDrawSetProportional(playeridtextdraw31);
    
PlayerTextDrawSetShadow(playeridtextdraw30);
    return 
1

PHP код:
public OnPlayerSpawn(playerid)
{
    
TextDrawShowForPlayer(playerid,textdraw2);
    
TextDrawShowForPlayer(playerid,textdraw3);
    return 
1;

PHP код:
textdraw.pwn(61) : warning 213tag mismatch
textdraw
.pwn(62) : warning 213tag mismatch 
This errors show at OnPlayerSpawn
Reply
#2

Your problem is that you mix between Global Textdraw and Player Textdraw

PHP код:
new PlayerText:textdraw2[MAX_PLAYERS]; 
new 
PlayerText:textdraw3[MAX_PLAYERS];
public 
OnPlayerConnect(playerid)  
{  
    
// WELCOME BACK 
    
textdraw2[playerid] = CreatePlayerTextDraw(playerid634.500000311.187500"Welcome back"); 
    
PlayerTextDrawLetterSize(playeridtextdraw2[playerid], 0.4000001.600000); 
    
PlayerTextDrawAlignment(playeridtextdraw2[playerid], 3); 
    
PlayerTextDrawColor(playeridtextdraw2[playerid], -1); 
    
PlayerTextDrawSetShadow(playeridtextdraw2[playerid], 0); 
    
PlayerTextDrawSetOutline(playeridtextdraw2[playerid], 1); 
    
PlayerTextDrawBackgroundColor(playeridtextdraw2[playerid], 255); 
    
PlayerTextDrawFont(playeridtextdraw2[playerid], 2); 
    
PlayerTextDrawSetProportional(playeridtextdraw2[playerid], 1); 
    
PlayerTextDrawSetShadow(playeridtextdraw2[playerid], 0); 
    
textdraw3[playerid] = CreatePlayerTextDraw(playerid606.000000331.312500"andrei !"); 
    
PlayerTextDrawLetterSize(playeridtextdraw3[playerid], 0.4000001.600000); 
    
PlayerTextDrawAlignment(playeridtextdraw3[playerid], 3); 
    
PlayerTextDrawColor(playeridtextdraw3[playerid], -1); 
    
PlayerTextDrawSetShadow(playeridtextdraw3[playerid], 0); 
    
PlayerTextDrawSetOutline(playeridtextdraw3[playerid], -1); 
    
PlayerTextDrawBackgroundColor(playeridtextdraw3[playerid], 255); 
    
PlayerTextDrawFont(playeridtextdraw3[playerid], 2); 
    
PlayerTextDrawSetProportional(playeridtextdraw3[playerid], 1); 
    
PlayerTextDrawSetShadow(playeridtextdraw3[playerid], 0); 
    return 
1;  
}  
public 
OnPlayerSpawn(playerid

    
PlayerTextDrawShow(playeridtextdraw2[playerid]);
    
PlayerTextDrawShow(playeridtextdraw3[playerid]);
    return 
1

Reply
#3

thanks man <3
Reply
#4

Quote:
Originally Posted by Maximun
Посмотреть сообщение
Your problem is that you mix between Global Textdraw and Player Textdraw

PHP код:
new PlayerText:textdraw2[MAX_PLAYERS]; 
new 
PlayerText:textdraw3[MAX_PLAYERS];
public 
OnPlayerConnect(playerid)  
{  
    
// WELCOME BACK 
    
textdraw2[playerid] = CreatePlayerTextDraw(playerid634.500000311.187500"Welcome back"); 
    
PlayerTextDrawLetterSize(playeridtextdraw2[playerid], 0.4000001.600000); 
    
PlayerTextDrawAlignment(playeridtextdraw2[playerid], 3); 
    
PlayerTextDrawColor(playeridtextdraw2[playerid], -1); 
    
PlayerTextDrawSetShadow(playeridtextdraw2[playerid], 0); 
    
PlayerTextDrawSetOutline(playeridtextdraw2[playerid], 1); 
    
PlayerTextDrawBackgroundColor(playeridtextdraw2[playerid], 255); 
    
PlayerTextDrawFont(playeridtextdraw2[playerid], 2); 
    
PlayerTextDrawSetProportional(playeridtextdraw2[playerid], 1); 
    
PlayerTextDrawSetShadow(playeridtextdraw2[playerid], 0); 
    
textdraw3[playerid] = CreatePlayerTextDraw(playerid606.000000331.312500"andrei !"); 
    
PlayerTextDrawLetterSize(playeridtextdraw3[playerid], 0.4000001.600000); 
    
PlayerTextDrawAlignment(playeridtextdraw3[playerid], 3); 
    
PlayerTextDrawColor(playeridtextdraw3[playerid], -1); 
    
PlayerTextDrawSetShadow(playeridtextdraw3[playerid], 0); 
    
PlayerTextDrawSetOutline(playeridtextdraw3[playerid], -1); 
    
PlayerTextDrawBackgroundColor(playeridtextdraw3[playerid], 255); 
    
PlayerTextDrawFont(playeridtextdraw3[playerid], 2); 
    
PlayerTextDrawSetProportional(playeridtextdraw3[playerid], 1); 
    
PlayerTextDrawSetShadow(playeridtextdraw3[playerid], 0); 
    return 
1;  
}  
public 
OnPlayerSpawn(playerid

    
PlayerTextDrawShow(playeridtextdraw2[playerid]);
    
PlayerTextDrawShow(playeridtextdraw3[playerid]);
    return 
1

instead of changing it to text you set it to player text!!!!! why, its just a a message thats just a waste of player text draws

keep the text draw dont switch to player textdraw


change

PHP код:
new PlayerText:textdraw2
new 
PlayerText:textdraw3
to

PHP код:
new Text:textdraw2
new 
Text:textdraw3
if fs:

PHP код:
public OnFilterScriptInit()
{
    
textdraw2 CreateTextDraw(634.500000311.187500"Welcome back");
    
TextDrawLetterSize(textdraw20.4000001.600000);
    
TextDrawAlignment(textdraw23);
    
TextDrawColor(textdraw2, -1);
    
TextDrawSetShadow(textdraw20);
    
TextDrawSetOutline(textdraw21);
    
TextDrawBackgroundColor(textdraw2255);
    
TextDrawFont(textdraw22);
    
TextDrawSetProportional(textdraw21);
    
TextDrawSetShadow(textdraw20);
    
textdraw3 CreateTextDraw(606.000000331.312500"andrei !");
    
TextDrawLetterSize(textdraw30.4000001.600000);
    
TextDrawAlignment(textdraw33);
    
TextDrawColor(textdraw3, -1);
    
TextDrawSetShadow(textdraw30);
    
TextDrawSetOutline(textdraw3, -1);
    
TextDrawBackgroundColor(textdraw3255);
    
TextDrawFont(textdraw32);
    
TextDrawSetProportional(textdraw31);
    
TextDrawSetShadow(textdraw30);
    return 
1;
}
public 
OnFilterScriptExit()
{
    
TextDrawDestroy(textdraw2);
    
TextDrawDestroy(textdraw2);
    return 
1;
}
public 
OnPlayerConnect(playerid// i think it was meant to be onconnect not spawn
{
    
TextDrawShowForPlayer(playeridtextdraw2);
    
TextDrawShowForPlayer(playeridtextdraw3);
    return 
1;

if gm

PHP код:
public OnGameModeInit()
{
    
textdraw2 CreateTextDraw(634.500000311.187500"Welcome back");
    
TextDrawLetterSize(textdraw20.4000001.600000);
    
TextDrawAlignment(textdraw23);
    
TextDrawColor(textdraw2, -1);
    
TextDrawSetShadow(textdraw20);
    
TextDrawSetOutline(textdraw21);
    
TextDrawBackgroundColor(textdraw2255);
    
TextDrawFont(textdraw22);
    
TextDrawSetProportional(textdraw21);
    
TextDrawSetShadow(textdraw20);
    
textdraw3 CreateTextDraw(606.000000331.312500"andrei !");
    
TextDrawLetterSize(textdraw30.4000001.600000);
    
TextDrawAlignment(textdraw33);
    
TextDrawColor(textdraw3, -1);
    
TextDrawSetShadow(textdraw30);
    
TextDrawSetOutline(textdraw3, -1);
    
TextDrawBackgroundColor(textdraw3255);
    
TextDrawFont(textdraw32);
    
TextDrawSetProportional(textdraw31);
    
TextDrawSetShadow(textdraw30);
    return 
1;
}
public 
OnGameModeExit()
{
    
TextDrawDestroy(textdraw2);
    
TextDrawDestroy(textdraw2);
    return 
1;
}
public 
OnPlayerConnect(playerid// i think it was meant to be onconnect not spawn
{
    
TextDrawShowForPlayer(playeridtextdraw2);
    
TextDrawShowForPlayer(playeridtextdraw3);
    return 
1;

Reply
#5

Quote:
Originally Posted by Lokii
Посмотреть сообщение
instead of changing it to text you set it to player text!!!!! why, its just a a message thats just a waste of player text draws
If you gave just 2 seconds on looking to his message, you will surely understand why I have done this. I don't just come and giving things in sky.
Reply
#6

1 maybe td3 needs string since he uses name but i dont see any set string in his textdraw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)