SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 29/03/2010, 08:37 PM   #1
Manuel20
Little Clucker
 
Join Date: Jan 2010
Posts: 16
Reputation: 0
Default GameTextForPlayer doesn`t Work

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
Manuel20 is offline  
Old 29/03/2010, 08:46 PM   #2
Babul
High-roller
 
Babul's Avatar
 
Join Date: Sep 2009
Location: in a cement block
Posts: 1,781
Reputation: 266
Default Re: GameTextForPlayer doesn`t Work

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 ^^
__________________
FireWorks

new sscanf2 custom specifiers available for Download, read the Release Topic
Babul is offline  
Old 29/03/2010, 08:50 PM   #3
Manuel20
Little Clucker
 
Join Date: Jan 2010
Posts: 16
Reputation: 0
Default Re: GameTextForPlayer doesn`t Work

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.. -.-
Manuel20 is offline  
Old 29/03/2010, 11:03 PM   #4
Manuel20
Little Clucker
 
Join Date: Jan 2010
Posts: 16
Reputation: 0
Default Re: GameTextForPlayer doesn`t Work

help pls
Manuel20 is offline  
Old 30/03/2010, 12:05 AM   #5
Babul
High-roller
 
Babul's Avatar
 
Join Date: Sep 2009
Location: in a cement block
Posts: 1,781
Reputation: 266
Default Re: GameTextForPlayer doesn`t Work

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...
__________________
FireWorks

new sscanf2 custom specifiers available for Download, read the Release Topic
Babul is offline  
Old 30/03/2010, 01:11 PM   #6
Manuel20
Little Clucker
 
Join Date: Jan 2010
Posts: 16
Reputation: 0
Default Re: GameTextForPlayer doesn`t Work

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 ?
Manuel20 is offline  
Old 30/03/2010, 01:15 PM   #7
[03]Garsino
Guest
 
Posts: n/a
Default Re: GameTextForPlayer doesn`t Work

Try making the time to display the GameText longer, because 2000ms isn't long.
 
Old 30/03/2010, 01:16 PM   #8
Drake1994
Big Clucker
 
Drake1994's Avatar
 
Join Date: Jun 2008
Posts: 111
Reputation: 54
Default Re: GameTextForPlayer doesn`t Work

Put this OnGameModeinit:
Code:
SetTimer("GateGameText",500,false);
Drake1994 is offline  
Old 30/03/2010, 01:17 PM   #9
Manuel20
Little Clucker
 
Join Date: Jan 2010
Posts: 16
Reputation: 0
Default Re: GameTextForPlayer doesn`t Work

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
Manuel20 is offline  
Old 30/03/2010, 01:20 PM   #10
[03]Garsino
Guest
 
Posts: n/a
Default Re: GameTextForPlayer doesn`t Work

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
One stupid error and my Admin Script doesn`t work BaFTa Help Archive 3 30/05/2010 04:33 PM
Script doesn´t work on Public Server Ice-J44 Server Support 6 05/03/2010 01:56 PM
Gta doesn`t work.PLS HELP!!! tilenko Client Support 1 11/06/2009 11:24 AM
OnPlayerDeath doesn´t work! Ciona Help Archive 5 19/05/2009 07:11 PM


All times are GMT. The time now is 01:35 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.