Raised This Month: $51 Target: $400
 12% 

Brass Knuckles (Cheap_Suit)


Post New Thread Reply   
 
Thread Tools Display Modes
spunko
Senior Member
Join Date: Jun 2005
Location: Ecuador
Old 02-20-2006 , 20:31  
Reply With Quote #11

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 #12

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 #13

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 #14

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 #15

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 #16

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 #17

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 #18

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
Captain Tuffy
Member
Join Date: May 2005
Location: Royal Palm Beach, FL
Old 02-28-2006 , 12:39  
Reply With Quote #19

This plugin rocks. But 2 problems.

1st problem: Models don't load until the next round.
2nd problem: There is no cvar to disable the buying of the brass knuckles.

Thanx for the plugin. Is there a simple solution to the above problems?
__________________
Quote:
The apple never lies far from the tree.
-Common Sense

Travis's Strategic Cockfighting Forums
Captain Tuffy is offline
Soulseker
Senior Member
Join Date: Sep 2005
Old 03-08-2006 , 15:07  
Reply With Quote #20

nice ! plz add a screeny
Soulseker 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 21:05.


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