Help with script!

Forum for Skins, Maps, Configs etc.

Moderators: Moderators, Mappers

Post Reply
lorota
is connecting
Posts: 15
Joined: Wed Sep 08, 2004 10:06 am
Location: br

Help with script!

Post 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!
Lotus
killed itself
Posts: 401
Joined: Tue Dec 28, 2004 1:52 pm
In-game Name: kk'lok
Location: oslo
Mouse: diamondback
Location: no
Contact:

Post 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 ;<
I pleasure myself, everyday.
>kk'lok
lorota
is connecting
Posts: 15
Joined: Wed Sep 08, 2004 10:06 am
Location: br

Post by lorota »

im using nocheat 2.40, but i can use apr1.20, thanks
emu
Syndrome of a Down
Posts: 1444
Joined: Thu Jul 31, 2003 10:38 pm
Location: no
Contact:

Post by emu »

so when you have sniper you want that huge ugly model to show ?

:?
Call me your valentine call me once tonight
Lotus
killed itself
Posts: 401
Joined: Tue Dec 28, 2004 1:52 pm
In-game Name: kk'lok
Location: oslo
Mouse: diamondback
Location: no
Contact:

Post 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.
I pleasure myself, everyday.
>kk'lok
Clown
unpossible??!?!!
Posts: 1750
Joined: Sun Jul 27, 2003 7:38 am
Location: en

Post by Clown »

emu wrote:so when you have sniper you want that huge ugly model to show ?

:?
The opposite. Read the thread.
I don't give a shit.
emu
Syndrome of a Down
Posts: 1444
Joined: Thu Jul 31, 2003 10:38 pm
Location: no
Contact:

Post 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.
Call me your valentine call me once tonight
lorota
is connecting
Posts: 15
Joined: Wed Sep 08, 2004 10:06 am
Location: br

Post by lorota »

what is the name of the weapons variable?
i can make the script with if and else in aprq...
Suxz
joined the game
Posts: 45
Joined: Mon Dec 25, 2006 12:05 pm
Location: no

Post 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)
Stric
needs some Pepto Bismol
Posts: 730
Joined: Tue Jul 29, 2003 5:41 am
Location: si
Contact:

Post 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.
Image
Image
^stric^
Caracol
was picked off
Posts: 1152
Joined: Wed Sep 01, 2004 8:11 am
Location: cl
Contact:

Post by Caracol »

Oh, interesting.
Ne quid nimis.
Suxz
joined the game
Posts: 45
Joined: Mon Dec 25, 2006 12:05 pm
Location: no

Post by Suxz »

Its working, but "wait 120" are a bit much to sacrifice for me
Stric
needs some Pepto Bismol
Posts: 730
Joined: Tue Jul 29, 2003 5:41 am
Location: si
Contact:

Post by Stric »

That depends and it doesnt work other way.
Image
Image
^stric^
Post Reply