Home   Help Search Login Register  

Author Topic: under arrest  (Read 461 times)

0 Members and 1 Guest are viewing this topic.

Offline Killzone

  • Members
  • *
  • War is the true Enemy
under arrest
« on: 27 May 2004, 21:20:22 »
I am trying a script where if I shoot a civillian and then an MP comes to where I am standing and arrest me and takes away my weapon (no problems so far)

I am trying to figure out how do I make it so that the MP will not shoot me unless I am trying to escape. If I get lets say 15 feet or further from him he will shoot me.  My problem is he takes my weapons then shoot me. I am not very good at scripting but here is my crude script

~1
police sidechat" WHAT THE HELL ARE YOU DOING!!!"
~1
police domove getpos soldier
~1
? sean distance police <8

~2
police sidechat "you are under arrest. I am taking your weapons"
~2
removeallweapons soldier
~1
? sean distance police <15
police sidechat "Please stay where you are"
police domove getpos soldier
police dotarget soldier
police dofire soldier


thanks for the help
« Last Edit: 27 May 2004, 21:21:23 by Killzone »
"Everyone dies so deal with it and move on"

                                                      ME

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:under arrest
« Reply #1 on: 27 May 2004, 21:43:23 »
I'm a beginner at scripting myself, but I think this might help solve your problem:

~1
police sidechat" WHAT THE HELL ARE YOU DOING!!!"
~1

#loop1
police domove getpos sean
? sean distance police <8 : goto "takegun"
~0.5
goto "loop1"

#takegun
~2
police sidechat "you are under arrest. I am taking your weapons"
~2
removeallweapons sean
~1

#loop2
? sean distance police > 15 : goto "warning"
~0.5
goto "loop2"

#warning
police sidechat "Please stay where you are"
police domove getpos sean
police dotarget sean
police dofire sean

exit

 See if that helps.   :)

Offline Killzone

  • Members
  • *
  • War is the true Enemy
Re:under arrest
« Reply #2 on: 28 May 2004, 04:43:03 »
Perfect thank you.  ;D
"Everyone dies so deal with it and move on"

                                                      ME