This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Brass Knuckles (Cheap_Suit)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FunHouseMadness
Junior Member
Join Date: Jan 2009
Old 02-01-2009 , 13:34   Re: Brass Knuckles (Cheap_Suit)
Reply With Quote #1

would it be possible for you or someone else to set this up to replace the knife? permanently, the reason i am asking is, I am making a gungame server, with knive zone, and this would be a nice addon to the server.

nvm i just saw your post THANKS! i think this is what i was looking for!!!

Last edited by FunHouseMadness; 02-01-2009 at 13:39.
FunHouseMadness is offline
CrawDad
Junior Member
Join Date: Nov 2009
Old 12-14-2009 , 18:17   Re: Brass Knuckles (Cheap_Suit)
Reply With Quote #2

I seem to be unable to get the knux to work. I have used them on another server (Kronik rox) but I cannot load them onto PAX with success.

Any suggestions would be gratefully appreciated.
CrawDad is offline
spunko
Senior Member
Join Date: Jun 2005
Location: Ecuador
Old 02-20-2006 , 20:31  
Reply With Quote #3

i replaced the sopund when u hit a box or a wall.. but i still cant make the models appear.. when i set the models to work with the Twilight Suzuka plugin the v_model works, but somethings wrong with the p_ model.. it shows the knife and when u open de p_ model with hl model viewer it says Error post-loading model
spunko is offline
Send a message via MSN to spunko
DrO
Junior Member
Join Date: Jan 2006
Old 02-21-2006 , 00:49  
Reply With Quote #4

Quote:
Originally Posted by spunko
i replaced the sopund when u hit a box or a wall.. but i still cant make the models appear.. when i set the models to work with the Twilight Suzuka plugin the v_model works, but somethings wrong with the p_ model.. it shows the knife and when u open de p_ model with hl model viewer it says Error post-loading model
how did u fix the sound when hittin a wall?
__________________
cs.mi6-clan.net:27015
DrO is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 02-21-2006 , 01:19  
Reply With Quote #5

Code:
register_forward(FM_EmitSound, "EmitSound")
He checked whenever the hit wall sound was called and then he A. emitted a new sound and B. stopped the old sound.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
MattOG
Senior Member
Join Date: May 2005
Old 02-21-2006 , 02:27  
Reply With Quote #6

Quote:
Originally Posted by GHW_Chronic
Code:
register_forward(FM_EmitSound, "EmitSound")
He checked whenever the hit wall sound was called and then he A. emitted a new sound and B. stopped the old sound.
rofl, my money says he just changed the .wav file.
__________________

+Karma If I helped
MattOG is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 02-21-2006 , 03:42  
Reply With Quote #7

no, he did as I said. Leave scripting to the scriptors.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-21-2006 , 05:27  
Reply With Quote #8

Quote:
Originally Posted by MattOG
Quote:
Originally Posted by GHW_Chronic
Code:
register_forward(FM_EmitSound, "EmitSound")
He checked whenever the hit wall sound was called and then he A. emitted a new sound and B. stopped the old sound.
rofl, my money says he just changed the .wav file.
Yeah 'cause registers a forward just for the hell of it. I do that all of the time, to be more efficient and optimized, of course.

Look at the source before criticizing him.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
spunko
Senior Member
Join Date: Jun 2005
Location: Ecuador
Old 02-21-2006 , 10:39  
Reply With Quote #9

Quote:
Originally Posted by DrO
Quote:
Originally Posted by spunko
i replaced the sopund when u hit a box or a wall.. but i still cant make the models appear.. when i set the models to work with the Twilight Suzuka plugin the v_model works, but somethings wrong with the p_ model.. it shows the knife and when u open de p_ model with hl model viewer it says Error post-loading model
how did u fix the sound when hittin a wall?
just find the sound when hiting a wall in sound/wepons and add this line to the .sma in public EmitSound
Code:
else if(equal(sample,"weapons/knife_hitwall1.wav"))             {                 emit_sound(id, CHAN_WEAPON, "bknuckles/knife_stab.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                     return FMRES_SUPERCEDE             }

so it should be like this
Code:
#include <amxmodx> #include <fakemeta> #include <engine> #include <cstrike> new PLUGIN_NAME[] = "Brass Knuckles" new PLUGIN_VERSION[] =  "1.0" new PLUGIN_AUTHOR[] =   "Cheap_Suit" new bool:g_bknuckles[33] public plugin_init() {     register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)     register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")     register_event("Damage", "Event_Damage", "be", "2!0")     register_event("DeathMsg", "Event_Death", "a")     register_forward(FM_EmitSound, "EmitSound")     register_clcmd("say /buybk", "cmdBuy") } public plugin_precache() {     precache_model("models/p_bknuckles.mdl")     precache_model("models/v_bknuckles.mdl")     precache_sound("bknuckles/knife_hit1.wav")     precache_sound("bknuckles/knife_hit2.wav")     precache_sound("bknuckles/knife_hit3.wav")     precache_sound("bknuckles/knife_hit4.wav")     precache_sound("bknuckles/knife_stab.wav") } public client_connect(id) g_bknuckles[id] = false public Event_Death() g_bknuckles[read_data(2)] = false public cmdBuy(id) {     new Cost = 5000, Money = cs_get_user_money(id)     if(!is_user_alive(id))         client_print(id, print_chat, "Sorry, You need to be alive")     else if(Money < Cost)         client_print(id, print_chat, "Sorry, You need %d to buy", Cost)     else if(g_bknuckles[id])         client_print(id, print_chat, "Sorry, You already bought a pair of brass knuckles")     else     {         g_bknuckles[id] = true         cs_set_user_money(id, Money - Cost)         client_print(id, print_chat, "You bought a pair of brass knuckles")     }     return PLUGIN_HANDLED } public Event_Damage(id) {     if(!is_user_alive(id) || !is_user_connected(id))         return PLUGIN_CONTINUE             new AttakerWeapon, AttakerPartHit     new Attacker = get_user_attacker(id, AttakerWeapon, AttakerPartHit)         if(AttakerWeapon != CSW_KNIFE)         return PLUGIN_CONTINUE         if(!g_bknuckles[Attacker])         return PLUGIN_CONTINUE         new Float:Random_Float[3]     for(new i = 0; i < 3; i++) Random_Float[i] = random_float(100.0, 150.0)     Punch_View(id, Random_Float)     return PLUGIN_CONTINUE } public Event_CurWeapon(id) {     if(!is_user_alive(id) || !is_user_connected(id))         return PLUGIN_CONTINUE             new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])     if(weapon == CSW_KNIFE)     {         if(g_bknuckles[id])         {             entity_set_string(id, EV_SZ_viewmodel, "models/v_bknuckles.mdl")             entity_set_string(id, EV_SZ_weaponmodel, "models/p_bknuckles.mdl")         }     }     return PLUGIN_CONTINUE } public EmitSound(id, channel, sample[]) {     if(!is_user_alive(id) || !is_user_connected(id))         return FMRES_IGNORED     new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])     if(weapon == CSW_KNIFE)     {         if(g_bknuckles[id])         {             if(equal(sample,"weapons/knife_hit1.wav"))             {                 emit_sound(id, CHAN_WEAPON, "bknuckles/knife_hit1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/knife_hit2.wav"))             {                 emit_sound(id, CHAN_WEAPON, "bknuckles/knife_hit2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                  return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/knife_hit3.wav"))             {                 emit_sound(id, CHAN_WEAPON, "bknuckles/knife_hit3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                  return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/knife_hit4.wav"))             {                 emit_sound(id, CHAN_WEAPON, "bknuckles/knife_hit4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/knife_stab.wav"))             {                 emit_sound(id, CHAN_WEAPON, "bknuckles/knife_stab.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                  return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/knife_hitwall1.wav"))             {                 emit_sound(id, CHAN_WEAPON, "bknuckles/knife_stab.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                  return FMRES_SUPERCEDE             }         }     }     return FMRES_IGNORED } stock Punch_View(id, Float:ViewAngle[3]) {     entity_set_vector(id, EV_VEC_punchangle, ViewAngle) }

im not sure if the sound is knife_hitwall1, im in college now so i cant tell u for sure, better check it in ur sound/weapon folder...

PD: Can anyone help me whith the models.. i dunno why the plugin doesnt show themm im runnig 2 plugins with models and they work fine..[/small]
spunko is offline
Send a message via MSN to spunko
MattOG
Senior Member
Join Date: May 2005
Old 02-21-2006 , 11:36  
Reply With Quote #10

Quote:
Originally Posted by v3x
Quote:
Originally Posted by MattOG
Quote:
Originally Posted by GHW_Chronic
Code:
register_forward(FM_EmitSound, "EmitSound")
He checked whenever the hit wall sound was called and then he A. emitted a new sound and B. stopped the old sound.
rofl, my money says he just changed the .wav file.
Yeah 'cause registers a forward just for the hell of it. I do that all of the time, to be more efficient and optimized, of course.

Look at the source before criticizing him.
point taken
__________________

+Karma If I helped
MattOG is offline
Reply



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


All times are GMT -4. The time now is 23:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode