gangzone messages help
#5

Quote:
Originally Posted by Ritchie999
i tried doing it using "strcmp" and "IsPlayerInArea" but it doesnt come up automatically, you have to type the command to see the message, and even so, you can still type it even if you are outside the area.. no one told me yet how to use a timer and loop
This will show a gametext when your IN the gangzone. (Doesn't disappears until you get out the ganzone)
Код:
//Somewhere in your script
stock IsPlayerInArea(playerid,Float:minX,Float:minY,Float:maxX,Float:maxY)
{
	new Float:pX,Float:pY,Float:pZ;
	GetPlayerPos(playerid,pX,pY,pZ);
	if(pX >= minX && pX <= maxX && pY >= minY && pY <= maxY) return 1;
	else return 0;
}

//OnPlayerUpdate
public OnPlayerUpdate(playerid)
{
	if(IsPlayerInArea(playerid,-210.2018, 1599.869, 548.8602, 2312.219)) //Same coords as your gangzone
		{
				GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Location Gangzone", 3000, 3);
		}

	return 1;
}
Have fun with it (:
Reply


Messages In This Thread
gangzone messages help - by kennyist - 05.11.2009, 17:05
Re: gangzone messages help - by dice7 - 05.11.2009, 17:10
Re: gangzone messages help - by kennyist - 05.11.2009, 17:11
Re: gangzone messages help - by Ritchie999 - 05.11.2009, 17:13
Re: gangzone messages help - by Nameless303 - 06.11.2009, 01:14

Forum Jump:


Users browsing this thread: 3 Guest(s)