SA-MP Forums Archive
Will This Work? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Will This Work? (/showthread.php?tid=68207)



Will This Work? - StrickenKid - 08.03.2009

im making a turf wars server and im now making some areas that are neutral or no killing zones, and i couldn't find a callback for isplayeringangzone
so i found this:
Код:
stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)
{
	new Float:X, Float:Y, Float:Z;
	GetPlayerPos(playerid, X, Y, Z);
	if(X <= max_x && X >= min_x && Y <= max_y && Y >= min_y) return 1;
	return 0;
}
now im wondering, if i just match up the min_x, max_x, min_y,max_y with the same co ords as the gang zone that it will work.

Then i can do,
Код:
OnPlayerDeath
if(IsPlayerInArea(killerid,..,..,..,..,...))
{
kick(killerid);
return 1;
}
thx in advance



Re: Will This Work? - Burridge - 08.03.2009

if its a turf wars, why would you want non-killing areas, when the whole point is to dm lol's

and abotu this code im not sure.


Re: Will This Work? - 56avenue - 08.03.2009

Quote:
Originally Posted by DanielBurridge
if its a turf wars, why would you want non-killing areas, when the whole point is to dm lol's
Could be a safe zone.
Quote:
Originally Posted by DanielBurridge
and abotu this code im not sure.
Why reply?..
And I'm pretty sure that'll work


Re: Will This Work? - StrickenKid - 08.03.2009

thx, ill try it, and yes, its for a safe zone.


Re: Will This Work? - Burridge - 08.03.2009

i replyed because i wanted to know why he wanted a safe area in a tdm gm

thats all