Afternoon fella's, 2 parta for you
Was up till 5am last night searching ofpec and bi forums with no luck
1st partSo bassicly I've got the artillery script to only execute when the player has battery's for the Custom Radio
I tried using the "hasweapon" command but the radio i have is classed as a Binocular in the config.cpp and the trigger wont execute at all
Cond:
(vehicle player) in thisList && (""RadioBattery"" In (Magazines player))
Act:
[] exec "artillery1.sqs"
Now once the player has requested artillery, ive got it to decrease the battery magazine, Only problem is that it removes a battery from all players carrying a battery. Preferably id like it to only remove a battery from the player that issued the artillery request. Is this possible?
cmd im using is
player removeMagazine "RadioBattery"
I know its going to remove them from all players just didnt know if i could remove it from specific players
2nd Part
Ties into the 1st part as in when the player has run out of batteries then the "artillery_disable.sqs" will run "just null's all the radio commands"
Only problem is i need some sort of check to see if the player has less than 1 battery, this trigger can excute on all players
eg
(vehicle player) in thisList && (""RadioBattery"" count (Magazines player) <1)
im unsure bout this as its my first real attempt at scripting, still aint found any decent tutroials on Evenhandlers and how to pass the innit line to the script
Cheers for any help