Jump to content
Sign in to follow this  
dachevs

Specific Player addaction

Recommended Posts

Hi I checked other posts that had something like this as there name but couldn't quite understand it. sad_o.gif

What I want to do, I have a cop and I want to have an action on a civilian to arrest the civilian, but right now the civilian has the action too. I tried putting in the Civs init, Cop addaction arrest, but then the cop can arrest him from anywhere, I want the cop to have to be at the civilian to arrest him.

Also I placed a building from Roleplay Objects where you can open cells, how do I remove the open cells action from the civilians?

Can anyone help. huh.gif

Share this post


Link to post
Share on other sites

I have never used it but I have seen it posted multiple times that the following should work.

1) Name the cop unit something unique, like cop1.

2) Use the following code:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (player == cop1) then {player addAction ["Arrest Civilian", "arrestcivlian.sqf"];};

This should only make the action available to the cop

Regarding the role play objects questions it depends. If the addactions are added via event handler scripting then you would just alter the code. If they are entered via configs in I believe class UserActions you would have to change the configs. It would be best to contact the author for specifics.

Share this post


Link to post
Share on other sites

YES! this is exactly what I needed. Thanks. thumbs-up.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×