AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Trying to change the hostage model (https://forums.alliedmods.net/showthread.php?t=2959)

helpjoe 06-21-2004 20:48

Trying to change the hostage model
 
is it possible to change the hostage model!

well this is what i came up with, but when i put it in the server crashes?

i dnt know why either!

Code:

#include <amxmodx>
#include <cstrike>
#include <engine>

public plugin_init(){
        register_plugin("changemodel","0.1","0~~ sperm")
       
        register_event("ResetHUD","newRound","b")
        // Call newRound() when the round is over
       
}

public newRound(id){
  checkModel(id)
}

public plugin_precache(){
        precache_model("player/hostige/hostige.mdl")
        return PLUGIN_CONTINUE
        //
    // Just precache the model, so if the user does not have it, they have to download
    //
}

public checkModel(id){
        cs_get_hostage_id(id)

        if ( cs_get_hostage_id(id) )
        {
                entity_set_model(id, "player/hostige/hostige.mdl")
        }

        return PLUGIN_HANDLED
}

thank you

im trying to get it for my Diablo 3 server: 69.93.73.214:27015

kingpin 06-21-2004 21:07

well try a MM plugin called hostitron it changes the hostage skins their sounds etc.

AssKicR 06-22-2004 07:42

try this here.. Oh and can i get that model from ya :D

Code:
#include <amxmodx> #include <amxmisc> #include <engine> new hostagemodel[33] public SetHostageModel() {     new iHos = find_ent_by_class(-1, "hostage_entity")     while(iHos != 0)     {             entity_set_model(iHos, hostagemodel) //          client_print(id, 3,"[DEBUG] Hostage with id %d now has model %s", iHos, hosteagemodel)             iHos = find_ent_by_class(iHos, "hostage_entity")     }     new jHos = find_ent_by_class(-1, " monster_scientist")     while(jHos != 0)     {             entity_set_model(jHos, hostagemodel) //          client_print(id, 3,"[DEBUG] Hostage with id %d now has model %s", iHos, hosteagemodel)             iHos = find_ent_by_class(jHos, " monster_scientist")     }     return PLUGIN_CONTINUE } public plugin_init() {     register_plugin("Hostage Model", "1.0", "AssKicR")     register_event("RoundTime", "SetHostageModel", "bc") } public plugin_precache(){     format(hostagemodel,32,"player/hostige/hostige.mdl")     precache_model(hostagemodel) }


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

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