.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Offtopic (http://forums.bots-united.com/forumdisplay.php?f=23)
-   -   "What weapon am I using" script (http://forums.bots-united.com/showthread.php?t=1039)

nocturnal 09-03-2004 15:16

"What weapon am I using" script
 
I think this is the most ideal spot to post this:

i'm using high fps weapon models, which is basically just invisible weapons because my comp is very low-end. I'm in need of a script which for ex. if i'm using my ak there's a text like in the upper-left saying "AK is selected". Preferably text that stays there until i select a new weapon instead of the text dissappearing after 3 or 4 secs.

OR i would really like it if i could have the pic of the weapon, like the sprite of the c4 when you have the c4.

I would have posted this in the gamespy forums, but it wouldn't let me log-in for sum reason.

Thanks to neone who could help me!

Pierre-Marie Baty 09-03-2004 16:00

Re: "What weapon am I using" script
 
Scripts can only do what a normal client is allowed to do, hence you can not display text at arbitrary locations on the screen nor display sprites or icons. What you can do though, is record the name of each weapon in a .WAV sound file, put them all in the sounds folder and then have your script issue the command:
play "weapon_name.wav"
when you select this weapon.
Since play commands are client only commands only you will hear that sound, it will not be propagated on the network.

Lazy 09-03-2004 16:06

Re: "What weapon am I using" script
 
There is a way to do this but you would not be able to go on secure servers.

What you need to do basically is hook the half-life client and use the standard engine functions to display the information.

I do not reccommend this though since not only does VAC ban every hook, but the half-life community paints all hooks with the same brush. Most don't care what it does or what its used for and just label it as a cheat.

Terran 09-03-2004 16:46

Re: "What weapon am I using" script
 
What you could do:

Create your own weapon models. Make them very small and you should get what you want ;).
But don't ask me how to do this, I just don't know anything about modelling 9_9.

>BKA< T Wrecks 09-03-2004 17:53

Re: "What weapon am I using" script
 
Well, I don't know if models with less polygons than those included in CS by default would actually be possible. The p- and w-models are already ugly slabs (I mean, come on, the default AWM when lying on the ground resembles a wooden board painted green), and the v-models are far from being complex, too. It might be possible to create even less detailed models, but a) nobody would do such a thing and b) you'd hardly be able to distinguish them if they're all ugly greyish blocks... :)

nocturnal 09-03-2004 20:46

Re: "What weapon am I using" script
 
no forget using uglier models, my fps would still go down. There isn't a way where if i push 1 to get my primary weapon, and i could sorta 'echo primary weapon selected' on my gaming screen like in the console?

Terran 10-03-2004 09:44

Re: "What weapon am I using" script
 
If that's what you want/need than it can be done like this:

Code:

  topcolor "primary weapon selected"
  developer 1
  topcolor
  developer 0


nocturnal 11-03-2004 12:38

Re: "What weapon am I using" script
 
Quote:

Originally Posted by Terran
If that's what you want/need than it can be done like this:

Code:

topcolor "primary weapon selected"
developer 1
topcolor
developer 0


Sorry but i have no clue what you do with that. Is that what i put into my autoexec.cfg?

Terran 11-03-2004 12:58

Re: "What weapon am I using" script
 
This is a code snipet, you have to integrate it into your own script.

E.g.
Code:

alias sel_w_1 "weapon_mp5navy;weapon_xm1014;weapon_m3;weapon_p90"
 alias sel_w_2 "weapon_tmp;weapon_ak47;weapon_mac10;weapon_sg552"
 alias sel_w_3 "weapon_m4a1;weapon_aug;weapon_scout;weapon_awp"
 alias sel_w_4 "weapon_g3sg1;weapon_m249;weapon_ump45;weapon_sg550"
 alias sel_w_5 "weapon_galil;weapon_famas"
 alias priw_selected "topcolor 'primary weapon selected'; developer 1; topcolor; developer 0"
 alias sel_prim "sel_w_1;sel_w_2;sel_w_3;sel_w_4;sel_w_5;priw_selected"
 
 bind x sel_prim


Terran 11-03-2004 13:04

Re: "What weapon am I using" script
 
sometimes the [ code ] function behaves really strange... There is no space in the
alias sel_prim "sel_w_1;sel_w_2;sel_w_3;sel_w_4;sel_w_5;priw_sele cted"
line in "priw_selected"...


All times are GMT +2. The time now is 18:20.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.