Hi there,
Firstly, let me say that I was STOKED!!! to see OFPEC return! I'm overjoyed at the thought that this site is back and it seems back for good! All hail the flashpoint gods!(and props to Armaholic!)
Okay to my question... I'm trying to work on a script but keep running into errors... the script by now is pretty much garbage due to all the tweaks I tried to implement
In the mission there are 13 west players (police) who hunt 1 east player (killer). The east player hunts civilians and will kill police if they get in the way. I have it scripted so far that the above works well.
I now need a script (ideally a "killed EH) to prevent police from team killing and deal punishment/display messges if this happens. If a tk does happen, I would like to Play a global cuttext message that reports the violator (to all players including east) that says he's been sent to jail for 3 minutes - then send the tk'ing player to a designated area (object Prison1) for 3 minutes. I would also like to add hint messages every 30seconds that inform the jailed player (only/locally), how much time is remaining, ending with a "You've been released!" hint and setpos'ing him out side the jail.
PROBLEMS so far...
I've tried to use an array that checks to see if the tk'ing player is on west side... only problem is if the player kills himself by accident... he gets sent to jail for tk'in himself lol. Also if he's in a vehicle, it doesn't recognize the player is a police officer (in west array). The few times I managed to get the tk'er in jail, their vehicle also goes to jail with them! I've also not being able to get the messages to play the appropriate local/global messages! The script is now a total mess and pretty useless!
I'm now losing my mind, so I took my therapists advice and came to you guys for help!
I'll try layout the concept of what I mean in my limited scripting knowledge
Event: West player killed
? was this death caused by east player?
If so play "officer has been shot"
hint messages to west players only. I use public variable "oges" to add a point earned by killer for killing a police officer)
? was this death caused by accident/fall/roadkill?
If so play "officer has died!"
hint messages to west players only. (no "oges" point awarded as killer didn't kill the officer- running down doesn't count as police kill)
? was this death a tk caused by another west player? (no "oges" point awarded as killer didn't kill the officer-)
If so play "officer %1 teamkilled a fellow police officer and has been sent to jail for 3 min"
cuttext message to west players only... (no "oges" point awarded as killer didn't kill the officer)
Then sent tk'ing officer to object jail and play hint messages every 30 seconds listing remaining jail time until this offending player is released.
I'm not sure if the above makes sense, like I said my mind has gone at this point. But if anyone could kickdown some code that may easy my weary mind... well I'd be forever grateful. Please fee free to ask for more information or explanation as to what I am trying to achieve!
Thanks guys!