Raised This Month: $ Target: $400
 0% 

problem with changing HE nade properties


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 10-12-2007 , 13:39   problem with changing HE nade properties
Reply With Quote #1

what i am doing here wrong?
Code:
#include <amxmodx>
#include <engine>
#include <cstrike>
public plugin_init() {
    register_plugin("High He Damage", "1.0", "P34nut")
    
   register_cvar("sv_grenadedamageenabled", "1")
    register_cvar("sv_grenadedamage", "150")
    
 //  register_event("SendAudio","GrenadeHandler","bc","2=%!MRAD_FIREINHOLE")
}
/*
public GrenadeHandler() {
    if(get_cvar_num("sv_grenadedamageenabled") >= 1) {
        new Data[1]
        Data[0] = read_data(1)
        
        set_task(0.15, "Grenade", _, Data, 1)
    }
    return PLUGIN_CONTINUE
}
*/

public grenade_throw( index,greindex,wId )
{
     new Data[1]
        Data[0] = read_data(1)
        set_task(0.15, "Grenade", _, Data, 1)
}


public Grenade(Data[]) {
    new id = Data[0]
    new Gren = get_grenade(id)
    if(Gren) {
        new Model[32]
        entity_get_string(Gren, EV_SZ_model, Model, 31)
            
        if(equali(Model, "models/w_hegrenade.mdl")) {
            entity_set_float(Gren, EV_FL_dmg, get_cvar_float("sv_grenadedamage"))
         entity_set_float(Gren, EV_FL_gravity, 1.0)
          entity_set_float(Gren, EV_FL_health, 25.0)
          entity_set_float(Gren, EV_FL_dmgtime, get_gametime() + 1.6)
     entity_set_float(Gren, EV_FL_takedamage, 1.0)
     }          
    }
    return PLUGIN_HANDLED
}
__________________

Last edited by Voi; 10-12-2007 at 13:56.
Voi is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 10-12-2007 , 14:45   Re: problem with changing HE nade properties
Reply With Quote #2

What is the problem ?! And btw you must include <csx> :S
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 10-12-2007 , 14:48   Re: problem with changing HE nade properties
Reply With Quote #3

the problem is that the properties arent set

Quote:
and btw you must include <csx> :S
strange, im using this in other plugin without including csx and it works(changing global fire in the hole sound to emit_sount from player)
__________________

Last edited by Voi; 10-12-2007 at 14:55.
Voi is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 10-12-2007 , 15:02   Re: problem with changing HE nade properties
Reply With Quote #4

Code:
public grenade_throw( index,greindex,wId )
csx forward... :/
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 10-12-2007 , 15:19   Re: problem with changing HE nade properties
Reply With Quote #5

included csx but still doesnt work

edit:

hello? anybody could help ?:p


edit2:

lolz it suddenly started to work :O

edit3:

it works only if i throw grenade :O
__________________

Last edited by Voi; 10-12-2007 at 18:18.
Voi 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 16:16.


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