Monthly Target: $400 Donations: $348
 87% 

Plugin que cambie el model del Knife


  
 
 
Thread Tools Display Modes
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
Tinchooo
BANNED
Join Date: Oct 2010
Old 01-24-2011 , 05:15   Re: [ES] Plugin que cambie el model del Knife
#2

ami me paasaron esto peros e bugea cuando cambias a la Fb y Volves al cuchi keres cambiar y se ekad el cuchi

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>

public plugin_init()
register_event("CurWeapon""cambiar_model""be")

public 
plugin_precache()
{
    
precache_model("models/v_knife_new.mdl")
}
public 
cambiar_model(id)
{
  if(
get_user_weapon(id) == CSW_KNIFE)
{
    
entity_set_string(idEV_SZ_viewmodel"models/v_knife_new.mdl")
  }

Tinchooo is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-24-2011 , 05:23   Re: [ES] Plugin que cambie el model del Knife
#3

Code:
#include <amxmodx> #include <hamsandwich> #include <fakemeta> #define PLUGIN "Change Model" #define VERSION "1.0" #define AUTHOR "Luqqas'" new const szModelKnife[] = "models/hereyoumodel.mdl" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     RegisterHam( Ham_Item_Deploy, "weapon_knife", "Knife_Hook" , 1) } public plugin_precache() precache_model(szModelKnife) public Knife_Hook( Knife ) {     new id = get_pdata_cbase( Knife, 41, 4 );         if( is_user_alive(id) || is_user_connected(id) )         set_pev( id, pev_viewmodel2, szModelKnife ) }

otras opcion , pero no lo probe asique si alguien me hace el gusto de chequearlo.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.

Last edited by lucas_7_94; 01-24-2011 at 06:49.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Tinchooo
BANNED
Join Date: Oct 2010
Old 01-24-2011 , 05:41   Re: [ES] Plugin que cambie el model del Knife
#4

nop no anda
Tinchooo is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-24-2011 , 06:35   Re: [ES] Plugin que cambie el model del Knife
#5

Quote:
Originally Posted by Tinchooo View Post
nop no anda
Code:
#include <amxmodx> #include <hamsandwich> #include <fakemeta> #define PLUGIN "Change Model" #define VERSION "1.0" #define AUTHOR "Luqqas'" new const szModelKnife[] = "models/zombie_plague/v_knife_2.mdl" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     RegisterHam( Ham_Item_Deploy, "weapon_knife", "Knife_Hook" , 1) } public plugin_precache() precache_model(szModelKnife)     public Knife_Hook( Knife ) {     new id = get_pdata_cbase( Knife, 41, 4 );         if( is_user_alive(id) || is_user_connected(id) )         set_pev( id, pev_viewmodel2, szModelKnife ) }

no cambie nada .

resultado



you failed , please die.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Tinchooo
BANNED
Join Date: Oct 2010
Old 01-24-2011 , 06:40   Re: [ES] Plugin que cambie el model del Knife
#6

si le agregastes el include
Tinchooo is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-24-2011 , 06:49   Re: [ES] Plugin que cambie el model del Knife
#7

we , pero por un include no significa qe no va a funcionar , tendrias que darte cuenta de eso , ni compilaria.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Exc3ll@N
Veteran Member
Join Date: Oct 2009
Location: Donde me lleve el viento
Old 01-24-2011 , 15:25   Re: [ES] Plugin que cambie el model del Knife
#8

lucas sos un master muchisimas gracias por dar ese ejemplo me re sirvio muchisimas gracias kapooo!!!!
__________________
Haz lo que sientas y te haga feliz.
Exc3ll@N is offline
Send a message via MSN to Exc3ll@N
 


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 20:04.


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