Raised This Month: $32 Target: $400
 8% 

Change Server Hostage Models


Post New Thread Reply   
 
Thread Tools Display Modes
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 05-22-2011 , 10:45   Re: Change Server Hostage Models
Reply With Quote #41

lol why don't change model when hostage spawns?...
RegisterHam( Ham_Spawn, "hostage_entity or monster_scientist", "dsadsa", 1 )?
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-23-2011 , 00:26   Re: Change Server Hostage Models
Reply With Quote #42

Quote:
Originally Posted by Doctros View Post
Does anyone know if this plugin works with CS CZ?

And if it does not, can someone see if it can be made to work with CS CZ?

Thanks
It should, so just test it out.

Quote:
Originally Posted by tuty View Post
lol why don't change model when hostage spawns?...
RegisterHam( Ham_Spawn, "hostage_entity or monster_scientist", "dsadsa", 1 )?
Thread really old :}

But for future visitors:
Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>

new const g_szModel[] = "models/yourcustomhostage.mdl" // change this

public plugin_precache()
    precache_model(g_szModel)

public plugin_init()
{
    register_plugin("Custom hostage model", "0.1", "")

    RegisterHam(Ham_Spawn, "hostage_entity", "hostage_spawn", 1)
    RegisterHam(Ham_Spawn, "monster_scientist", "hostage_spawn", 1)
}

public hostage_spawn(ent)
    entity_set_model(ent, g_szModel)
__________________

Last edited by Hunter-Digital; 05-23-2011 at 09:10. Reason: okay then, no index.
Hunter-Digital is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-23-2011 , 04:57   Re: Change Server Hostage Models
Reply With Quote #43

Quote:
entity_set_int(ent, EV_INT_modelindex, g_iModelIndex) // update model's hitboxes
When you use SetModel, _modelindex is automatically filled. Nothing to do with updatiing hitboxes. You have to set _modelindex to g_ulModelIndexPlayer.
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

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 17:53.


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