gangzone messages help
#1

ive got a gangzone , but how can i make it so when you enter it a message appears?
Reply
#2

Use a timer + loop to check all the players positions and see if they're in the zone
Reply
#3

ummmm , how , thats way above my level of scripting.
Reply
#4

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
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)