SadBoy1981 Posted March 24, 2015 Report Share Posted March 24, 2015 I have side zones where enemy cant walk or fly inside. After few seconds they have been teleporting to salt lake, or other config, they die after 5 seconds. My question is, how to make teleporting back for 10m only? This is part of code what i use to teleport enemies to salt lake but i want teleport them only 10m back }forEach rects; if ( _flag && alive player ) then { titleText [format ["Go away, restriction zone, teleport after ---> %1 <<<---",_timer],"PLAIN",0];//Warning for other players _timer = _timer - 1; }else{ _timer = 5; }; if ( _timer == -1 ) then { player setpos [23671.1, 18626.1, 0.3]; //salt lake titleText ["","PLAIN",0]; }; Link to comment Share on other sites More sharing options...
SadBoy1981 Posted March 25, 2015 Author Report Share Posted March 25, 2015 bump Link to comment Share on other sites More sharing options...
happydayz Posted March 25, 2015 Report Share Posted March 25, 2015 A player can't be teleported if the origin is not within a few meters of the spawn box. Can't remember what controls it all ATM. Link to comment Share on other sites More sharing options...
happydayz Posted March 25, 2015 Report Share Posted March 25, 2015 Unless they are an admin of course. Link to comment Share on other sites More sharing options...
c0dyb1 Posted April 28, 2015 Report Share Posted April 28, 2015 I am looking for a way to restrict access to player bases based on UID, is this possible or adaptable from your script? Link to comment Share on other sites More sharing options...
Glenn Posted April 28, 2015 Report Share Posted April 28, 2015 I am looking for a way to restrict access to player bases based on UID, is this possible or adaptable from your script? So this means that if I make a base, I cant have others come to visit (even if I asked them) without them getting teleported away? Link to comment Share on other sites More sharing options...
SadBoy1981 Posted April 30, 2015 Author Report Share Posted April 30, 2015 Found answer from crafting code. _spawnPos = player modelToWorld [0,-50,0]; (vehicle player) setPosATL _spawnPos; This small code just spawn back players to 50m when they come into private base. Full code if ((getPlayerUID player) in ["11111" ,"11111" ,"11111" ,"11111" ,"11111" ,"11111" ,"11111" , "11111"]) exitWith { titleText [format ["%1 Welcome back to your base! ", name player], "PLAIN DOWN"]; }; _spawnPos = player modelToWorld [0,-50,0]; (vehicle player) setPosATL _spawnPos; titleText ["","PLAIN",0]; Link to comment Share on other sites More sharing options...
BenR Posted April 30, 2015 Report Share Posted April 30, 2015 You could do it group based instead of a hard coded array of UIDs, then anyone can setup one of these systems Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now