state displayammocounter
getplayer[THISACTOR].curr_weapon CURWEAP
switch CURWEAP
  case 1
  getplayer[THISACTOR].ammo_amount CURWEAP AMMO
  digitalnumberz DIGITALNUM 25 18 AMMO 0 0 0 ZERO ZERO xdim ydim 40000
  break
  case 3
  getplayer[THISACTOR].ammo_amount CURWEAP AMMO
  digitalnumberz DIGITALNUM 31 15 AMMO 0 0 0 ZERO ZERO xdim ydim 40000
  break
  case 4
  getplayer[THISACTOR].ammo_amount CURWEAP AMMO
  digitalnumberz DIGITALNUM 35 20 AMMO 0 0 0 ZERO ZERO xdim ydim 40000
  break
  case 9
  getplayer[THISACTOR].ammo_amount CURWEAP AMMO
  digitalnumberz DIGITALNUM 40 20 AMMO 0 0 0 ZERO ZERO xdim ydim 40000
  break
endswitch
ends

state displayscorecounter
ifvarl PSCORE 10
digitalnumberz 2930 320 13 PSCORE 0 0 0 ZERO ZERO xdim ydim 80000
else
ifvarl PSCORE 100
digitalnumberz 2930 315 13 PSCORE 0 0 0 ZERO ZERO xdim ydim 80000
else
ifvarl PSCORE 1000
digitalnumberz 2930 308 13 PSCORE 0 0 0 ZERO ZERO xdim ydim 80000
else
ifvarl PSCORE 10000
digitalnumberz 2930 300 13 PSCORE 0 0 0 ZERO ZERO xdim ydim 80000
else
ifvarl PSCORE 100000
digitalnumberz 2930 290 13 PSCORE 0 0 0 ZERO ZERO xdim ydim 80000
else
ifvarl PSCORE 1000000
digitalnumberz 2930 280 13 PSCORE 0 0 0 ZERO ZERO xdim ydim 80000
else
ifvarl PSCORE 10000000
digitalnumberz 2930 270 13 PSCORE 0 0 0 ZERO ZERO xdim ydim 80000
ends

// state displayscorecounter
// digitalnumberz DIGITALNUM 310 10 PSCORE 0 0 0 ZERO ZERO xdim ydim 80000 
// ends

state displaypistolweapon
rotatesprite 15 9 30000 0 15001 0 0 0 0 0 xdim ydim
ends

state displaymgunweapon
rotatesprite 19 9 30000 0 15002 0 0 0 0 0 xdim ydim
ends

state displayrpgweapon
rotatesprite 22 10 30000 0 15003 0 0 0 0 0 xdim ydim
ends

state displayflameweapon
rotatesprite 23 10 30000 0 15004 0 0 0 0 0 xdim ydim
ends

state displayarmour
rotatesprite 19 30 30000 0 15005 0 0 0 0 0 xdim ydim
ends

state displayjailkey
rotatesprite 5 31 30000 0 15007 0 0 0 0 0 xdim ydim
ends

state displaypolicehud
rotatesprite 160 100 20500 0 15009 0 0 0 0 0 xdim ydim
ends

state displaycarhud1
rotatesprite 160 100 20500 0 15010 0 0 0 0 0 xdim ydim
ends

state displaycarhud2
rotatesprite 160 119 20500 0 15011 0 0 0 0 0 xdim ydim
ends

onevent EVENT_DISPLAYREST
setvar cameradist 350000
state displayscorecounter
ifvare currentweapon 1 state displaypistolweapon state displayammocounter
ifvare currentweapon 3 state displaymgunweapon
ifvare currentweapon 4 state displayrpgweapon
ifvare currentweapon 9 state displayflameweapon
ifphealthl 10 nullop else state displayarmour
ifpinventory GET_ACCESS 1 state displayjailkey
ifvare PINCOPCAR 1 ifvarn F7VIEW 1 { state displaypolicehud }
ifvare PINAMBO 1 ifvarn F7VIEW 1 { state displaycarhud1 }
ifvare PINCORVETTE 1 ifvarn F7VIEW 1 { state displaycarhud2 }
endevent

onevent EVENT_DISPLAYMENU
getplayer[THISACTOR].gm TEMP
ifvarand TEMP 1 {
rotatesprite 160 100 65536 0 8000 0 0 0 0 0 xdim ydim } // 41
endevent

onevent EVENT_GETMENUTILE
setvar RETURN 8000
endevent

onevent EVENT_GETLOADTILE
setvar RETURN 8000
endevent

onevent EVENT_DISPLAYMENUREST
getplayer[THISACTOR].gm TEMP
ifvarand TEMP 1 {
rotatesprite 27 175 32768 0 8008 0 0 0 0 0 xdim ydim }
getplayer[THISACTOR].gm TEMP
ifvarand TEMP 1 {
rotatesprite 290 175 40768 0 8009 0 0 0 0 0 xdim ydim }
endevent

onevent EVENT_QUICKKICK
setvar RETURN -1
endevent

onevent EVENT_JUMP 
setvar RETURN -1
endevent

onevent EVENT_CROUCH 
setvar RETURN -1
endevent

onevent EVENT_LOOKUP
setvar RETURN 1
randvar PLAYERSOUNDE 4
ifvare PINCOPCAR 0
ifvare PINAMBO 0
ifvare PINCORVETTE 0
switch PLAYERSOUNDE
  case 1
  ifvare PLAYERSOUNDE 1
  ifrnd 128
  soundonce PLAYEREFFECT1
  break
  case 2
  ifvare PLAYERSOUNDE 2
  ifrnd 128
  soundonce PLAYEREFFECT2
  break
  endswitch
  ifvarg PLAYERSOUNDE 50 { nullop }

ifvare PINCOPCAR 1
soundonce AMBOSIREN
ifvare PINAMBO 1
soundonce AMBOSIREN
ifvare PINCORVETTE 1
sound CARHORN1
endevent

