View Single Post
Author Message
Shion
Senior Member
Join Date: Dec 2008
Old 01-24-2011 , 04:24   Plugin que cambie el model del Knife
#1

Lo qise editar ase banda como a las 7 y no se modificaba u.u, ya esta, en lo posible cierren el post porfavor, gracias a los qe comentaron igual

Code:
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <hamsandwich>

#define PLUGIN "Cambiar mdls"
#define VERSION "1.0"
#define AUTHOR "alan_el_more"

new v_mdl[] = "models/v_newKnife.mdl"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("CurWeapon", "Event_CurWeapon", "be","1=1")
    
    RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
}

public plugin_precache()
{
    precache_model(v_mdl)
}

public Event_CurWeapon(id) 
{     
    if(read_data(2)  != CSW_KNIFE)
        return PLUGIN_CONTINUE

    entity_set_string(id, EV_SZ_viewmodel, v_mdl)
        
    return PLUGIN_CONTINUE 
}

public fw_PlayerSpawn_Post(id)
{
    if(is_user_alive(id) && get_user_flags(id) & ADMIN_BAN)
        cs_set_user_model(id, "vip")
} 

__________________

Last edited by Shion; 01-24-2011 at 11:27.
Shion is offline