GameTextForPlayer doesn`t Work
#1

Hello I have problem here

Code:
else if(gTeam[playerid] == TEAM_TEST)
{
	if(PlayerToPoint(20.0, playerid,1541.6727,-1627.6631,13.3828))
	{
	  GameTextForPlayer(playerid,"~b~Command: /gate",2000,3);
    	if(TestTor2Status == 0)
    	{
			  	SetObjectRot(Test1,0.000000,0.000000,269.818847);
			  	GameTextForPlayer(playerid,"~w~Open",2000,3);
			  	TestTor2Status = 1;
			}
			else
			{
				SetObjectRot(Test1,0.000000,89.000000,269.818847);
		  		GameTextForPlayer(playerid,"~w~Close",2000,3);
				TestTor2Status = 0;
			}
	}
	else SendClientMessage(playerid,COLOR_RED,"Test");
}
else SendClientMessage(playerid,COLOR_RED,"You have no Gates");
Now allways works but the GameTextForPlayer(playerid,"~b~Command: /gate",2000,3); doesnt work -.- what is wrong ? can you help me please
Reply
#2

after your "Command" gametext, theres a if-statement which will always execute at "==0" or "else", so your old one gets overwritten.
to test that your 1st gametext IS working, add a simple chatoutput, you will see it works. its just too fast ^^
Reply
#3

sorry i understand you not so good xD can you make me an example of that what you mean please sorry for my bad english.. -.-
Reply
#4

help pls
Reply
#5

replacing
Code:
GameTextForPlayer(playerid,"~b~Command: /gate",2000,3);
with
Code:
SendClientMessage(playerid,0x5555aaff,"Command: /gate");
would fix it. a command information is best printed in chat, not as gametext imo...
Reply
#6

no i want when i go in this are the GameText on display is

now i have this

Code:
forward GateGameText(playerid);
public GateGameText(playerid)
{
	if(PlayerToPoint(15.0, playerid,2720.827,-2414.449,13.46094))
  {
		GameTextForPlayer(playerid,"~b~Command /gate",2000,3);
  }
	return 1;
}
Something is missing. but what ?
Reply
#7

Try making the time to display the GameText longer, because 2000ms isn't long.
Reply
#8

Put this OnGameModeinit:
Code:
SetTimer("GateGameText",500,false);
Reply
#9

Yeah but here missing a timer but i don`t now where i make the timer in the script can where make an example with my script
Reply
#10

pawn Code:
SetTimerEx("GateGameText",500,false, "i", playerid); // INSIDE ONPLAYERCONNECT
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)