Karmafied

Prison Access setVariable

4 posts in this topic

I have an .sqf in my mission file called onPlayerRespawn that has this code:

waitUntil {vehicle player == player};
waituntil {!isnull (finddisplay 46)};
waitUntil {alive vehicle player};	
waitUntil {typeOF player != "Exile_Unit_GhostPlayer"};
player setVariable ["copLevel",1,true];

Is there a way to make it so every player has access to the Prison/Police Stations EXCEPT if they are in the Bambi_Overall clothing?

Would THIS work?

waitUntil {vehicle player == player};
waituntil {!isnull (finddisplay 46)};
waitUntil {alive vehicle player};
waitUntil {typeOF player != "Exile_Unit_GhostPlayer", "bambi_overall"};
player setVariable ["copLevel",1,true];
Edited by Karmafied

Share this post


Link to post
Share on other sites

No that won't work  just run a check on clothing. On phone so csnt give example ATM. 

Share this post


Link to post
Share on other sites
Advertisement
waituntil {!isnull (finddisplay 46) && {alive player} && {typeOF player != "Exile_Unit_GhostPlayer"}};
if(uniform player != "Exile_Uniform_BambiOverall")then{player setVariable ["copLevel",1,true];};

 

2 people like this

Share this post


Link to post
Share on other sites
Advertisement

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 account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.