Ellman 9 Posted January 9, 2016 Hello. I've been searching forever (several months) for a script that allows me to setup a trigger and have it setup to a selected amount of Player UID/PID's. And then if someone who is not on that list of ID's enters the area, then they get teleported outside the area. Pretty much to create a restricted area. Hopefully someone on this forum knows how to do it or has a script that does it. Thank you Share this post Link to post Share on other sites
Guest Posted January 9, 2016 Hello. I've been searching forever (several months) for a script that allows me to setup a trigger and have it setup to a selected amount of Player UID/PID's. And then if someone who is not on that list of ID's enters the area, then they get teleported outside the area. Pretty much to create a restricted area. Hopefully someone on this forum knows how to do it or has a script that does it. Thank you Setup a trigger and in activation you can put this : [] execVM isPlayerWhitelisted; isPlayerWhitelisted.sqf playerList = ["05848741784847777","SomeRandomUID"]; if (!(player in playerList)) then { player setPos getMarkerPos "MyMarker"; // player setPos [15154,154841,64]; // player setPos getPos _myobject; }; Here you go, tell me if you need more explaination. Share this post Link to post Share on other sites
Theassassinzz 7 Posted February 14, 2017 I can't seem to get this to work Here is what I have in the .sqf playerList = [ 00000000000000000/* Assassin */, 00000000000000000/* Kadaire */, 00000000000000000/* Halvix */, 00000000000000000/* Elikat */, 00000000000000000/* BigSky */, 00000000000000000/* Snakebite */, 00000000000000000/* Grunt */ ]; if (player in playerList) then { titleText ["Welcome Member!", "PLAIN"]; }; if (!(player in playerList)) then { titleText ["This is a Members only area!", "BLACK OUT"]; sleep 2; titleText ["You will now be teleported!", "BLACK IN"]; sleep 2; player setPos (getMarkerPos "locked_area_portal"); }; I also have tried using quotes around the uid list. Here is what I have for activation. null = thisList execVM "Assassin\map\lock.sqf"; I have tested it on a dedicated server and on single player Share this post Link to post Share on other sites
celludriel 79 Posted February 14, 2017 Don't you have to use https://community.bistudio.com/wiki/getPlayerUID ? like: playerList = [ 00000000000000000/* Assassin */, 00000000000000000/* Kadaire */, 00000000000000000/* Halvix */, 00000000000000000/* Elikat */, 00000000000000000/* BigSky */, 00000000000000000/* Snakebite */, 00000000000000000/* Grunt */ ]; _uid = getPlayerUID player; if (_uid in playerList) then { titleText ["Welcome Member!", "PLAIN"]; }; if (!(_uid in playerList)) then { titleText ["This is a Members only area!", "BLACK OUT"]; sleep 2; titleText ["You will now be teleported!", "BLACK IN"]; sleep 2; player setPos (getMarkerPos "locked_area_portal"); }; 1 1 Share this post Link to post Share on other sites
Theassassinzz 7 Posted February 14, 2017 4 minutes ago, celludriel said: Don't you have to use https://community.bistudio.com/wiki/getPlayerUID ? like: playerList = [ 00000000000000000/* Assassin */, 00000000000000000/* Kadaire */, 00000000000000000/* Halvix */, 00000000000000000/* Elikat */, 00000000000000000/* BigSky */, 00000000000000000/* Snakebite */, 00000000000000000/* Grunt */ ]; _uid = getPlayerUID player; if (_uid in playerList) then { titleText ["Welcome Member!", "PLAIN"]; }; if (!(_uid in playerList)) then { titleText ["This is a Members only area!", "BLACK OUT"]; sleep 2; titleText ["You will now be teleported!", "BLACK IN"]; sleep 2; player setPos (getMarkerPos "locked_area_portal"); }; And it works! Thanks boss, been stumped for a good hour or two. Still getting back into the scripting. . . . . 1 Share this post Link to post Share on other sites
celludriel 79 Posted February 14, 2017 Your welcome, sometimes the answer stares you in the face, been there done that , glad I could help enjoy your scripting adventure Share this post Link to post Share on other sites
killzone_kid 1331 Posted February 14, 2017 16 minutes ago, Theassassinzz said: And it works! UIDs in the list should be in quotes Share this post Link to post Share on other sites
Theassassinzz 7 Posted February 14, 2017 Just now, killzone_kid said: UIDs in the list should be in quotes Roger that, I know that "getPlayerUID player" doesn't work in single player so I used _uid = 000000000000000 instead. Thanks for the help man. Share this post Link to post Share on other sites