Jump to content

lee1hy

Member
  • Content Count

    57
  • Joined

  • Last visited

  • Medals

Posts posted by lee1hy


  1. im so freaking tired dead by one shot even wearing vest+plate

    i tested below script. AI is god mode is invincible running the script below, then it not work if script apply to player

    what is the problem? AI is god mode but not player

    http://forums.bistudio.com/showthread.php?88078-Script-based-body-armor

    ;Body armor script by Celery

    _exectime=time

    _unit=_this select 0

    _bodypart=_this select 1

    _damage=_this select 2

    _source=_this select 3

    _ammo=_this select 4

    ?_bodypart=="head_hit":CLY_headhit=[_exectime,_unit,_bodypart,_damage,_source,_ammo]

    ?_bodypart=="body":CLY_bodyhit=[_exectime,_unit,_bodypart,_damage,_source,_ammo]

    ?_bodypart=="hands":CLY_handshit=[_exectime,_unit,_bodypart,_damage,_source,_ammo]

    ?_bodypart=="legs":CLY_legshit=[_exectime,_unit,_bodypart,_damage,_source,_ammo]

    ;Proceed to the next stage when all body parts are accounted for

    ?(CLY_headhit select 0)==_exectime and (CLY_bodyhit select 0)==_exectime and (CLY_handshit select 0)==_exectime and (CLY_legshit select 0)==_exectime:goto "damage"

    exit

    #damage

    _headd=CLY_headhit select 3

    _bodyd=CLY_bodyhit select 3

    _handsd=CLY_handshit select 3

    _legsd=CLY_legshit select 3

    ;Find the body part that was hit (normally all of them get some damage)

    _bigger=_headd max _bodyd

    _bigger=_bigger max _handsd

    _bigger=_bigger max _legsd

    ;Different body parts have different damage multipliers (otherwise every legshot would be fatal)

    ;In this case the body is protected with armor, giving it a damage threshold of 2

    ?_bigger==_headd:_damage=_headd*0.5-damage _unit;goto "finaldamage"

    ?_bigger==_bodyd:_damage=(_bodyd-damage _unit*0.75-2)*0.5;goto "finaldamage"

    ?_bigger==_handsd:_damage=_handsd*0.25-damage _unit*0.1;goto "finaldamage"

    ?_bigger==_legsd:_damage=_legsd*0.25-damage _unit*0.1;goto "finaldamage"

    exit

    #finaldamage

    ?_damage<0:exit

    _unit setDamage damage _unit+_damage

    exit


  2. oh!! i think its work, but not show hint string, and

    but why sometime work somtime not work?? single shot working but full auto can kill

    ---------- Post added at 06:41 ---------- Previous post was at 06:40 ----------

    Try this:

    player1_tk=0;this addeventhandler ["fired",{if ((_this select 0) in list plsdontkill) then {player1_tk=player1_tk+1;if (player1_tk>=3) then {hintc "OMG very bad guy";_this select 0 setdamage 1;player1_tk=0} else {hintc "No. Bad guy."};deletevehicle (_this select 6)}}] 

    It disables weapons, bombs, grenades etc. Create a trigger named "plsdontkill" and set "activation" to "blufor" for west spawn zone, "opfor" for east respawn.

    I didnt test it in mp, but it I think it should work.

    ---------- Post added at 07:01 ---------- Previous post was at 06:41 ----------

    Yes Is, too. however, punishiment is too weak. that hope to prevent more than anything

×