AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Don't set model index (https://forums.alliedmods.net/showthread.php?t=155609)

bogdyuttzu 04-24-2011 11:13

Don't set model index
 
I have this stock from zombie plague


PHP Code:

// Set the precached model index (updates hitboxes server side)
stock fm_cs_set_user_model_index(idvalue)
{
    
set_pdata_int(idOFFSET_MODELINDEXvalueOFFSET_LINUX)


But don't work and I try pev_modelindex but no effect

So?

pRoxxxDD 04-25-2011 16:28

Re: Don't set model index
 
Its work,

Test plugin from my tutorial.
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Администратор"

#define OFFSET_MODELINDEX 491

new indexdefaultindex
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say poison""model")
    
RegisterHam(Ham_Spawn"player""spawn_p"1)
}

public 
plugin_precache()
{
    
index precache_model("models/player/uac_zombie_poison/uac_zombie_poison.mdl")
    
defaultindex precache_model("models/player.mdl")
    
}


public 
model(id)
{
    
cs_set_user_model(id"uac_zombie_poison")
    
fm_set_user_model_index(idindex)

    
}

public 
spawn_p(id)
{
    
cs_reset_user_model(id)
    
fm_set_user_model_index(iddefaultindex)
    
}

stock fm_set_user_model_index(idvalue)
{
    
set_pdata_int(idOFFSET_MODELINDEXvalue)




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

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