[Help] TextDraw problem :(
#1

yooo

Sorry my bad English

Canґt see textdraw on player request class.

When i go for first time can see all textdraws, but if i go for second time canґt see anyone.


Код:
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
public OnGameModeInit()
Код:
Textdraw0 = TextDrawCreate(637.000000,24.000000,"Sakura Racing Server 0.2X");
Textdraw1 = TextDrawCreate(637.000000,64.000000,"Adrenaline");
Textdraw2 = TextDrawCreate(637.000000,98.000000,"[Argentina/LatinoAmerica]");
Textdraw3 = TextDrawCreate(637.000000,415.000000,"/help");
Textdraw4 = TextDrawCreate(53.000000,429.000000,"/help - /command");
TextDrawAlignment(Textdraw4,2);
TextDrawBackgroundColor(Textdraw4,0x00ff0000);
TextDrawFont(Textdraw4,1);
TextDrawLetterSize(Textdraw4,0.299999,1.200000);
TextDrawColor(Textdraw4,0xffffff99);
TextDrawSetProportional(Textdraw4,1);
TextDrawSetShadow(Textdraw4,1);
public OnPlayerSpawn(playerid)
Код:
TextDrawDestroy(Textdraw0);
TextDrawDestroy(Textdraw1);
TextDrawDestroy(Textdraw2);
TextDrawDestroy(Textdraw3);
public OnPlayerConnect(playerid)
Код:
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);

Reply
#2

Because you destroy it when the player spawns. You need to just hide it with TextDrawHideForPlayer.
Reply
#3


Код:
Because you destroy it when the player spawns. You need to just hide it with TextDrawHideForPlayer.
Thanks backwardsman97 but not work.

Reply
#4

What did you try?
Reply
#5

use TextDrawShowForPlayer at OnPlayerRequestClass and TextDrawHideForPlayer at spawn (like backwardsman97 sayed)
Reply
#6

Quote:
Originally Posted by ArcticFox
use TextDrawShowForPlayer at OnPlayerRequestClass and TextDrawHideForPlayer at spawn (like backwardsman97 sayed)
I do that but not work

public OnPlayerRequestClass(playerid, classid)
Код:
public OnPlayerRequestClass(playerid, classid)
{
  SetPlayerInterior(playerid,0);
  SetPlayerPos(playerid,2520.000000, -1675.000000, 19.382625);
  SetPlayerFacingAngle(playerid, 211.813964);
  SetPlayerCameraPos(playerid,2522.000000,-1676.000000,20.45555);
  SetPlayerCameraLookAt(playerid,2482.000000,-1669.000000,13.000000);
  ApplyAnimation(playerid,"PED","IDLE_chat",4.1,0,1,1,1,1);
  PlaySoundForPlayer(playerid, 1097);

  TextDrawShowForPlayer(playerid, Textdraw0);
  TextDrawShowForPlayer(playerid, Textdraw1);
  TextDrawShowForPlayer(playerid, Textdraw2);
  TextDrawShowForPlayer(playerid, Textdraw3);
  TextDrawShowForPlayer(playerid, Textdraw4);

  return 1;
}
public OnPlayerSpawn(playerid)
Код:
public OnPlayerSpawn(playerid)
{
	if (gTrackTime>10)
	{
	    GridSetupPlayer(playerid);
		SetTimerEx("GridSetup", TIME_GIVE_CAR,0,"d", playerid);
	}
	else SendClientMessage(playerid,COLOR_DARKGREEN,"The track is changing, please wait..");
	PlaySoundForPlayer(playerid, 1186);
    spawned[playerid]=1;
    //SetPlayerVirtualWorld(playerid,0); //SetPlayerVirtualWorld(playerid,0)

	TextDrawHideForPlayer(playerid, Textdraw0); 
	TextDrawHideForPlayer(playerid, Textdraw1); 
	TextDrawHideForPlayer(playerid, Textdraw2);
	TextDrawHideForPlayer(playerid, Textdraw3); 
	TextDrawHideForPlayer(playerid, Textdraw4);
	
 	return 1;
}
Reply
#7

What doesn't work about it?
Reply
#8

also need to run it under OnPlayerRequestSpawn
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)