Return to Base - 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: Return to Base (
/showthread.php?tid=114744)
Return to Base -
Pilot Jack - 20.12.2009
Hi,
I am making a deathmatch server but it is only in one area. I have put boundries around that area but i wanted to make it so that if a player went out of these boundries, then they would spawn back at their base/spawn point.
But this is not to affect the admins.
Can anyone help?
Thanks
Re: Return to Base -
LarzI - 20.12.2009
In a timer:
pawn Код:
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 ) //remember to change MAX_X etc to the correct coords
{
SetPlayerPos( playerid, SPAWN_X, SPAWN_Y, SPAWN_Z );
//SpawnPlayer( playerid );
//Remember, you shouldn't use both ;P
}
Good luck :]
Re: Return to Base -
Pilot Jack - 20.12.2009
Thanks, i will try this out and let you know