OpenDayZ Guru!

the hpp files are class defintions and I dont think they are able to have any conditional statements.
But in the file that loads that class definition you should be able to place your condition. What exactly do you want to do?
post your work in progress ...

Member

I konw what I have here is WAY off the mark, but it might give you an idea of what I was thinking of achieving.
It's really not very important for me to get this type of thing working, but I thought it might come in useful for my server somewhere down the line...

I dont have a working dayz server at the moment so havent tested any of this but ... with a bit of debugging it should work.
And the script that adds these 'right-clicks' is us_selectslot.sqf. Down on line 57 this code parses the extra_rc.hpp file and adds in the actions. THIS is where you can use that IF block for the players. The erc_cfgActions is an array with all the classes that are contained in extra_rc.hpp (I think). It loops through each one and adds the uiControl with that text and the script to run when you click on the control. So like the machete example:
Below the _text would be "Clear Grass" and the _script would be clearbrush.sqf and they are added to the player.
So, theoretically, you should be able to test the player UID and if he is allowed to "Clear Grass" you continue the rest of the loop, if he isnt allowed to Clear Grass then you skip to the end of the loop and continue with the next item.

The easiest way to check the players allowed events would be to assign a variable to each player with what they are allowed to use.
When player joins, do this ... player setvariable["cleargrass" true];
Then in ui_selectslot.sqf you check that variable:
_allowed = player getvariable["cleargrass", true/false]; <--set the default to true or false