Help me with a variable plz
Moderators: Moderators, Mappers
Help me with a variable plz
hi, I need to know if the name of the last player that I shot is recorded in some variable, like %P
i try with "set variable %P" but its doesn't work... lol
(sorry but my english is a shit xD )
i try with "set variable %P" but its doesn't work... lol
(sorry but my english is a shit xD )
I've asked Maniac about this, he said it isn't possible. However, you can get the last hit, by doing this:
Code: Select all
trigger "set lasthit head" "You hit*in the head"
trigger "set lasthit stom" "You hit*in the stomach"
trigger "set lasthit legs" "You hit*in the legs"
trigger "set lasthit vest" "*has a kevlar vest*"
trigger "set lasthit chest" "You hit*in the chest"
Here's the sniper and knife enemyhit code; just change anything you want.
Code: Select all
trigger "enemyhit_check1;enemyhit_check2" "*in the head"
trigger "enemyhit_check1;enemyhit_check2" "*in the stomach"
trigger "enemyhit_check1;enemyhit_check2" "*in the chest"
trigger "enemyhit_check1;enemyhit_check2" "*has a Kevlar Vest - AIM FOR THE HEAD!"
trigger "enemyhit_check1;enemyhit_check2" "*too bad you have AP rounds..."
trigger "enemyhit_check1;enemyhit_check2" "*in the legs"
alias enemyhit_check1 "if sniper isin $cl_weaponmodel then enemyhit"
alias enemyhit_check2 "if knife isin $cl_weaponmodel then enemyhit"
alias enemyhit "say_team :: [%P] with [%F] hit at [%S] :: [%D] with [%W] ::"