Draay Posted February 24, 2015 Report Share Posted February 24, 2015 Hey guys, I've tried several way of restricting the carepackage script from not running inside a safezone. Any help would be helpful. I know roughly that i need something in the first "if" section of the code, but i dont know what it is. I've tried everything i could think of. So what i want: If _hasbriefs and is NOT in a safezone. Thanks in advance! http://pastebin.com/CtFHNjYf Link to comment Share on other sites More sharing options...
0 Gr8 Posted February 24, 2015 Report Share Posted February 24, 2015 Replace this if (_hasBriefs >= _cost) then { With this if !(canbuild) exitWith { titleText ["You Cannot call a carepackage in a safezone","PLAIN DOWN"]; }; if (_hasBriefs >= _cost) then { Link to comment Share on other sites More sharing options...
0 Draay Posted February 24, 2015 Author Report Share Posted February 24, 2015 Thanks Gr8, testing it now. Will edit my post. EDIT: Ok i've tried that and it hasn't worked. I've also tried the following: if !(canbuild) exitWith { titleText ["You Cannot call a carepackage in a safezone","PLAIN DOWN"]; } else { if (_hasBriefs >= _cost) then { And adding a }; at the end. Neither have worked. It completely breaks it, it won't spawn one or give me errors. Checked RPT but no errors either. Link to comment Share on other sites More sharing options...
0 Gr8 Posted February 24, 2015 Report Share Posted February 24, 2015 Use this line and see if it works if(!(canbuild) || (inSafeZone)) exitWith { cutText ["\n\nYou are in a Safezone and cannot perform that action!" , "PLAIN DOWN"]; }; Draay 1 Link to comment Share on other sites More sharing options...
0 Draay Posted February 26, 2015 Author Report Share Posted February 26, 2015 That worked a treat. Thanks a lot! Link to comment Share on other sites More sharing options...
Question
Draay
Hey guys,
I've tried several way of restricting the carepackage script from not running inside a safezone.
Any help would be helpful. I know roughly that i need something in the first "if" section of the code, but i dont know what it is.
I've tried everything i could think of.
So what i want:
If _hasbriefs and is NOT in a safezone.
Thanks in advance!
http://pastebin.com/CtFHNjYf
Link to comment
Share on other sites
4 answers to this question
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