Return to Base
#1

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

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 :]
Reply
#3

Thanks, i will try this out and let you know
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)