AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   HL -> Event for rocket launch? (https://forums.alliedmods.net/showthread.php?t=16824)

DahVid 08-21-2005 01:05

HL -> Event for rocket launch?
 
I'm trying to change rpg_rocket's model. I don't want to do a set_task because it's a waist. Is there a event for rpg fire??

XxAvalanchexX 08-21-2005 01:07

If you just want to change the model then you can catch FM_SetModel

DahVid 08-21-2005 01:08

Sorry, I don't understand how to do that... Further explain?
EDITTED**
I Try to do now, using forward.

DahVid 08-21-2005 01:55

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta> public plugin_init() {     register_plugin("Drevil Ammo","0.1","DahVid")     register_forward(FM_SetModel,"ChangeAmmo",1) } public plugin_precache() {     precache_model("models/zombie.mdl") } public ChangeAmmo(entity,model[]) {     if(equali(model,"models/rpgrocket.mdl")==1) {         entity_set_string(entity,EV_SZ_model,"models/zombie.mdl")     }     return FMRES_IGNORED }
Not working.

XxAvalanchexX 08-21-2005 02:04

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta> public plugin_init() {     register_plugin("Drevil Ammo","0.1","DahVid")     register_forward(FM_SetModel,"ChangeAmmo",0) } public plugin_precache() {     precache_model("models/zombie.mdl") } public ChangeAmmo(entity,model[]) {     if(equali(model,"models/rpgrocket.mdl")==1) {         entity_set_model(entity,"models/zombie.mdl")         return FMRES_SUPERCEDE     }     return FMRES_IGNORED }

DahVid 08-21-2005 02:09

Thankyou, again, for expanding my knowledge on the fakemeta module!


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

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