gernika Posted March 27, 2017 Report Share Posted March 27, 2017 Hello im n new here, im from spain so scuse my english... I was trying to made a new script something simple .. i need to know how check if thers a player in a safezone Link to comment Share on other sites More sharing options...
0 juandayz Posted March 27, 2017 Report Share Posted March 27, 2017 hey there! welcome.. maybe something like this? _safezones = [[6325,7807,0],[4063,11664,0],[11447,11364,0],[1606,7803,0],[12944,12766,0],[4361.4937,2259.9526,0], [12060,12640,0]]; _safezonesRad = 150; _inSafezone = false; _player = player; if (_player distance _x < _safezonesRad) then { _inSafezone = true; }; } forEach _safezones; (Cherno coords) change it if ure using another map gernika 1 Link to comment Share on other sites More sharing options...
0 gernika Posted March 27, 2017 Author Report Share Posted March 27, 2017 thank you! added to my script and testing. Link to comment Share on other sites More sharing options...
0 gernika Posted March 27, 2017 Author Report Share Posted March 27, 2017 well thers something bad... nothing happend when the player is in the safezone. Link to comment Share on other sites More sharing options...
0 juandayz Posted March 27, 2017 Report Share Posted March 27, 2017 mmm i dont know exactly what your script does but,,, are you using a check for safezones??? example The first code i give you its only for check if is a player on a safezone _safezones = [[6325,7807,0],[4063,11664,0],[11447,11364,0],[1606,7803,0],[12944,12766,0],[4361.4937,2259.9526,0], [12060,12640,0]]; _safezonesRad = 150; _inSafezone = false; _player = player; if (_player distance _x < _safezonesRad) then { _inSafezone = true; }; } forEach _safezones; Now are you saying what happend if thers a player? this code if(_inSafezone ) then { //What happend if thers players in safezone }else{ //What happend if thers no players in safezones }; so its looks: private ["_safezones","_safezonesRad","_inSafezone","_player"]; _safezones = [[6325,7807,0],[4063,11664,0],[11447,11364,0],[1606,7803,0],[12944,12766,0],[4361.4937,2259.9526,0], [12060,12640,0]]; _safezonesRad = 150; _inSafezone = false; _player = player; if (_player distance _x < _safezonesRad) then { _inSafezone = true; }; } forEach _safezones; if(_inSafezone ) then { //What happend if thers players in safezone }else{ //What happend if thers no players in safezones }; gernika 1 Link to comment Share on other sites More sharing options...
0 gernika Posted March 27, 2017 Author Report Share Posted March 27, 2017 thank you so much! works! i jkust want to show a custom text in safezones Link to comment Share on other sites More sharing options...
0 juandayz Posted March 27, 2017 Report Share Posted March 27, 2017 nice,, if is only text.. maybe you can use the mission.sqm or the safezone.sqf (this have custom texts for default) this Spoiler this line for show msg when players are in safezones _msg = 'You entered a Safe Zone!'; this other when they leave _msg = 'You left the Safe Zone!'; gernika 1 Link to comment Share on other sites More sharing options...
0 gernika Posted March 27, 2017 Author Report Share Posted March 27, 2017 Thanks so much, gonna use your last suggestion. Thank you really thank you! Link to comment Share on other sites More sharing options...
Question
gernika
Hello im n new here, im from spain so scuse my english...
I was trying to made a new script something simple .. i need to know how check if thers a player in a safezone
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now