i made this script to practise with all weapons, it will randomize my main weapon everytime i die.
type /rndwep ingame to set it on/off.
[SELECT ALL] Code:
//made by macm
alias on_death [
if (= $connected 1) [
if (= (alive) 1) [ded = 0; stp = 1] [
if (= $stp 1) [
if (= $ded 1) [] [rndwep1; //you can add anything you like in this line, it will be executed when you die (exp. me "died")
ded = 1] ]
[] ] ] [];
sleep 1 [on_death]
]
add2alias mapstartalways [stp = 0; on_death]
rndwep0 = 0
rndwep = [if (= $rndwep0 1) [rndwep0 = 0; echo "rndwep is now off"] [rndwep0 = 1; echo "rndwep is now on"]]
//this is the random weapon alias
alias rndwep1 [
if (= $rndwep0 1) [
rndwep2 = (rnd 4);
nextprimary (+ $rndwep2 2)
] []
]
type /rndwep ingame to set it on/off.