Teleport script :) need someone to help adjust

Posts 1–14 of 14 · Page 1 of 1
Teleport script :) need someone to help adjust
This is a code to allow you to spawn every player in the game to your location (20 ft around you)

Code:
private["_pList", "j", "i", "_pArray", "v", "_dir", "_pos"];

_pList = playableUnits;
j = count _pList;
i = 0;
_pArray = [];

for "i" from 0 to j do
    {
        v = _pList select i;
		// Ignore Self :)
		if(player != v) then {
			_dir = getdir vehicle player;
			_pos = getPos vehicle player;
			_pos = [(_pos select 0)-10*sin(_dir),(_pos select 1)-10*cos(_dir),0];
			v setPos _pos;
		}

    };
    
};
If anyone could help me so it will teleport only one player to you, even if you need to add the players name to the script.
it would be helpful as i play with a friend and its common that we spawn miles away from each other.

Thanks in advance
Nevermind,
Got it

Code:
private["_pList", "j", "i", "_pArray", "v", "_dir", "_pos"];

_pList = playableUnits;
j = count _pList;
i = 0;
_pArray = [];

for "i" from 0 to j do
    {
        v = _pList select i;
        if(format[name v] == 'PLAYERS NAME HERE') then {
            _pos = getPos vehicle player;
            v setPos _pos;
        }

    };
The only problem is that it only spawns them next to you for around a second, but if you edit the code with the name of a player on your server who is pissing you off you could spawn them next to you and get a few shots into them and kill the bastards :P
I tried that it spawns him next to me for about 4 seconds then he is teleported back
aye I think there is a maximum distance you can teleport, i think its 150m
Quote Originally Posted by aboyd1991 View Post
aye I think there is a maximum distance you can teleport, i think its 150m
You are probably right. I tried to fix it but couldn't get any other outcome.
You can bypass the teleport restriction by setting the "lastPos" variable to 0, true.

eg:

Code:
player setVariable["lastPos",0, true];
Would you mind sending the whole script?
I second that notion, I don't know much about Arma scripting. Not sure where to put that line of code.
try this:
Code:
_mylastPos = getPosATL player;
	dayz_mylastPos = _mylastPos;
	dayz_areaAffect = _size;

	/*Bunch of useless code here*/

	sleep 2;

	_myPos = player getVariable["lastPos",[]];
	if (count _myPos > 0) then {
		player setVariable["lastPos",_mylastPos, true];
		player setVariable["lastPos",[]];
	};
	
	_lastPos = getPosATL player;	
	if (player == vehicle player) then {
		if (_mylastPos distance _lastPos > 200) then {
			if (alive player) then {
				player setPosATL _mylastPos;
			};
		};
	} else {
		if (_mylastPos distance _lastPos > 800) then {
			if (alive player) then {
				player setPosATL _mylastPos;
			};
		};
	};


---------- Post added at 01:59 PM ---------- Previous post was at 01:58 PM ----------

But use it on playground server or another that called *NO-CDKEY* cause bypass not working now, or u will be pernametnly banned
Quote Originally Posted by gogansol View Post
try this:
Code:
_mylastPos = getPosATL player;
	dayz_mylastPos = _mylastPos;
	dayz_areaAffect = _size;

	/*Bunch of useless code here*/

	sleep 2;

	_myPos = player getVariable["lastPos",[]];
	if (count _myPos > 0) then {
		player setVariable["lastPos",_mylastPos, true];
		player setVariable["lastPos",[]];
	};
	
	_lastPos = getPosATL player;	
	if (player == vehicle player) then {
		if (_mylastPos distance _lastPos > 200) then {
			if (alive player) then {
				player setPosATL _mylastPos;
			};
		};
	} else {
		if (_mylastPos distance _lastPos > 800) then {
			if (alive player) then {
				player setPosATL _mylastPos;
			};
		};
	};


---------- Post added at 01:59 PM ---------- Previous post was at 01:58 PM ----------

But use it on playground server or another that called *NO-CDKEY* cause bypass not working now, or u will be pernametnly banned
How do I use this Script? And where I have to put the player name?
Quote Originally Posted by gogansol View Post
try this:
Code:
_mylastPos = getPosATL player;
	dayz_mylastPos = _mylastPos;
	dayz_areaAffect = _size;

	/*Bunch of useless code here*/

	sleep 2;

	_myPos = player getVariable["lastPos",[]];
	if (count _myPos > 0) then {
		player setVariable["lastPos",_mylastPos, true];
		player setVariable["lastPos",[]];
	};
	
	_lastPos = getPosATL player;	
	if (player == vehicle player) then {
		if (_mylastPos distance _lastPos > 200) then {
			if (alive player) then {
				player setPosATL _mylastPos;
			};
		};
	} else {
		if (_mylastPos distance _lastPos > 800) then {
			if (alive player) then {
				player setPosATL _mylastPos;
			};
		};
	};


---------- Post added at 01:59 PM ---------- Previous post was at 01:58 PM ----------

But use it on playground server or another that called *NO-CDKEY* cause bypass not working now, or u will be pernametnly banned
'where do i insert players name
You should Execute that with script executer, or HxD or something else
i dont think its a player name based script i think he gave you a script for all players
player names will be inserted aoutomatiucaly, but it doesnt working, there was big upd, and i need some time to make a new maphack code, but my HDD on PC is broken, and i'm playing 24/7 Xbox & PS3 :3
Posts 1–14 of 14 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

Talk with us