.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > YappA > Offtopic
Offtopic Just anything. You have time to waste ? Prove it !!!

Reply
 
Thread Tools
"What weapon am I using" script
Old
  (#1)
nocturnal
Member
 
Status: Offline
Posts: 134
Join Date: Jan 2004
Default "What weapon am I using" script - 09-03-2004

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!
  
Reply With Quote
Re: "What weapon am I using" script
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 4643'60N 043'0W 0.187A
Default Re: "What weapon am I using" script - 09-03-2004

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.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: "What weapon am I using" script
Old
  (#3)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Re: "What weapon am I using" script - 09-03-2004

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.
  
Reply With Quote
Re: "What weapon am I using" script
Old
  (#4)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: "What weapon am I using" script - 09-03-2004

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.
  
Reply With Quote
Re: "What weapon am I using" script
Old
  (#5)
>BKA< T Wrecks
Moderator [PBmm/Waypointing]& PODBot mm waypointer
 
>BKA< T Wrecks's Avatar
 
Status: Offline
Posts: 1,492
Join Date: Feb 2004
Location: C.C.A.A., Germania
Default Re: "What weapon am I using" script - 09-03-2004

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...
  
Reply With Quote
Re: "What weapon am I using" script
Old
  (#6)
nocturnal
Member
 
Status: Offline
Posts: 134
Join Date: Jan 2004
Default Re: "What weapon am I using" script - 09-03-2004

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?
  
Reply With Quote
Re: "What weapon am I using" script
Old
  (#7)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: "What weapon am I using" script - 10-03-2004

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

Code:
  topcolor "primary weapon selected"
  developer 1
  topcolor
  developer 0
  
Reply With Quote
Re: "What weapon am I using" script
Old
  (#8)
nocturnal
Member
 
Status: Offline
Posts: 134
Join Date: Jan 2004
Default Re: "What weapon am I using" script - 11-03-2004

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?
  
Reply With Quote
Re: "What weapon am I using" script
Old
  (#9)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: "What weapon am I using" script - 11-03-2004

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

Last edited by Terran; 11-03-2004 at 14:01..
  
Reply With Quote
Re: "What weapon am I using" script
Old
  (#10)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: "What weapon am I using" script - 11-03-2004

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"...
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com