AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   problem with changing HE nade properties (https://forums.alliedmods.net/showthread.php?t=61861)

Voi 10-12-2007 13:39

problem with changing HE nade properties
 
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
}


Alka 10-12-2007 14:45

Re: problem with changing HE nade properties
 
What is the problem ?! And btw you must include <csx> :S

Voi 10-12-2007 14:48

Re: problem with changing HE nade properties
 
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)

Alka 10-12-2007 15:02

Re: problem with changing HE nade properties
 
Code:

public grenade_throw( index,greindex,wId )
csx forward... :/

Voi 10-12-2007 15:19

Re: problem with changing HE nade properties
 
included csx but still doesnt work

edit:

hello?:D anybody could help ?:p


edit2:

lolz it suddenly started to work :O

edit3:

it works only if i throw grenade :O


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

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