Page 1 of 1
Help with script!
Posted: Sun Jan 14, 2007 5:35 pm
by lorota
I dont know how to do this, so came here and waiting some help!
This is the idea:
if weapon == sniper {set hand 2}
else {set hand 0}
how can i do some like this?
got the idea? when use the sniper (that have a big model) set hand 2 (dont show the model) else (for any weapon) set hand 0 (model in right)
Thanks!
Posted: Mon Jan 15, 2007 5:13 am
by Lotus
What client do use?
If you´re using a client which is working with triggers it´s np.
But to me it´s a lot of work ;<
Posted: Mon Jan 15, 2007 12:46 pm
by lorota
im using nocheat 2.40, but i can use apr1.20, thanks
Posted: Mon Jan 15, 2007 1:09 pm
by emu
so when you have sniper you want that huge ugly model to show ?
Posted: Tue Jan 16, 2007 4:00 am
by Lotus
Well, If I recall NC2.40 is eligeable with triggers.
But it´s easy to learn. When you dl apr1.20 I think there´s a text file there, which explain how it works.
Or else, contact the cheerful admins.
Posted: Tue Jan 16, 2007 8:16 am
by Clown
emu wrote:so when you have sniper you want that huge ugly model to show ?
The opposite. Read the thread.
Posted: Tue Jan 16, 2007 11:43 am
by emu
Clown wrote:emu wrote:so when you have sniper you want that huge ugly model to show ?
The opposite. Read the thread.
arf.
Posted: Thu Jan 18, 2007 4:03 pm
by lorota
what is the name of the weapons variable?
i can make the script with if and else in aprq...
Posted: Sat Nov 10, 2007 7:22 pm
by Suxz
Anyone know a solution on this???
Whould be a super thing, I also want hand 2 when sniper, and I want to use it in combo with a script (auto execing of the script)
Posted: Sun Nov 11, 2007 8:04 am
by Stric
This is tricky because there is no other way to check players holding weapon expect you manually do. That means, you need to put short alias to your script that send if statement and checks for carrying weapon. All fine but still this aint so nice as it might sound because engine sets macro when model is at position to use and not when you press the button. In practical usage that means if you use script like ( bind X use special;alias_of_IF_statement ) it wont work because it will be executed same frame as you send changing weapon request. At this point we might use wait N cvar. I`ll stop bullshit now cause I know you don't get it.
My solution:
Code: Select all
bind X "use special;wait 120;chk_wp_ssg"
alias chk_wp_ssg "if ${cl_weaponmodel} == models/weapons/v_sniper/tris.md2 then hand 2 else hand 0"
Its not that perfect as it should be but it practically works.
Posted: Mon Nov 12, 2007 9:38 am
by Caracol
Oh, interesting.
Posted: Mon Nov 12, 2007 12:11 pm
by Suxz
Its working, but "wait 120" are a bit much to sacrifice for me
Posted: Mon Nov 12, 2007 1:17 pm
by Stric
That depends and it doesnt work other way.