Raised This Month: $ Target: $400
 0% 

How to change terorists knife model?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Turkish
Junior Member
Join Date: Jul 2010
Old 07-16-2010 , 01:40   How to change terorists knife model?
Reply With Quote #1

How to change terorists knife model?
I want to use it in zombie(not plague or biohazard), jailbreak, deathrun
Can u help me?
__________________
Map Maker
Turkish is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-16-2010 , 02:08   Re: How to change terorists knife model?
Reply With Quote #2

http://forums.alliedmods.net/showthr...odels+extended
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Turkish
Junior Member
Join Date: Jul 2010
Old 07-16-2010 , 03:23   Re: How to change terorists knife model?
Reply With Quote #3

Thanks but how can i make this plugin only for terorist?
Quote:
#include <amxmodx>
#include <engine>
#include <fakemeta>

new VIEW_MODEL[] = "models/v_newKnife.mdl"
new PLAYER_MODEL[] = "models/p_newKnife.mdl"
new WORLD_MODEL[] = "models/w_knife.mdl"

new OLDWORLD_MODEL[] = "models/w_knife.mdl"

new PLUGIN_NAME[] = "Custom Knife Model"
new PLUGIN_AUTHOR[] = "Cheap_Suit"
new PLUGIN_VERSION[] = "1.0"

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_event("CurWeapon", "Event_CurWeapon", "be","1=1")
register_forward(FM_SetModel, "fw_SetModel")
}

public plugin_precache()
{
precache_model(VIEW_MODEL)
precache_model(PLAYER_MODEL)
precache_model(WORLD_MODEL)
}

public Event_CurWeapon(id)
{
new weaponID = read_data(2)

if(weaponID != CSW_KNIFE)
return PLUGIN_CONTINUE

set_pev(id, pev_viewmodel2, VIEW_MODEL)
set_pev(id, pev_weaponmodel2, PLAYER_MODEL)

return PLUGIN_CONTINUE
}

public fw_SetModel(entity, model[])
{
if(!is_valid_ent(entity))
return FMRES_IGNORED

if(!equali(model, OLDWORLD_MODEL))
return FMRES_IGNORED

new className[33]
entity_get_string(entity, EV_SZ_classname, className, 32)

if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
{
engfunc(EngFunc_SetModel, entity, WORLD_MODEL)
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}
__________________
Map Maker

Last edited by Turkish; 07-16-2010 at 03:25. Reason: added code
Turkish is offline
EpicFail.
Senior Member
Join Date: May 2010
Old 07-16-2010 , 04:03   Re: How to change terorists knife model?
Reply With Quote #4

How i can make it only for CT and Sepc..

Last edited by EpicFail.; 07-16-2010 at 04:13.
EpicFail. is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 07-16-2010 , 04:21   Re: How to change terorists knife model?
Reply With Quote #5

PHP Code:
if( cs_get_user_teamid ) == CS_TEAM_CT || cs_get_user_teamid ) == CS_TEAM_SPECTATOR )
{
     
// stuff

__________________
Hi.
Kreation is offline
Turkish
Junior Member
Join Date: Jul 2010
Old 07-16-2010 , 04:27   Re: How to change terorists knife model?
Reply With Quote #6

So like this:
Code:
#include <amxmodx> 
#include <engine> 
#include <fakemeta> 

new VIEW_MODEL[] = "models/v_newKnife.mdl" 
new PLAYER_MODEL[] = "models/p_newKnife.mdl" 
new WORLD_MODEL[] = "models/w_knife.mdl"

new OLDWORLD_MODEL[] = "models/w_knife.mdl"

new PLUGIN_NAME[] = "Custom Knife Model" 
new PLUGIN_AUTHOR[] = "Cheap_Suit" 
new PLUGIN_VERSION[] = "1.0" 

public plugin_init() 
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR) 
register_event("CurWeapon", "Event_CurWeapon", "be","1=1")
register_forward(FM_SetModel, "fw_SetModel")
} 

public plugin_precache() 
{ 
precache_model(VIEW_MODEL) 
precache_model(PLAYER_MODEL) 
precache_model(WORLD_MODEL)
} 

public Event_CurWeapon(id) 
{ 
new weaponID = read_data(2) 

if(weaponID != CSW_KNIFE || cs_get_user_team( id ) == CS_TEAM_T)
return PLUGIN_CONTINUE

set_pev(id, pev_viewmodel2, VIEW_MODEL)
set_pev(id, pev_weaponmodel2, PLAYER_MODEL)

return PLUGIN_CONTINUE 
}

public fw_SetModel(entity, model[])
{
if(!is_valid_ent(entity)) 
return FMRES_IGNORED

if(!equali(model, OLDWORLD_MODEL)) 
return FMRES_IGNORED

new className[33]
entity_get_string(entity, EV_SZ_classname, className, 32)

if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
{
engfunc(EngFunc_SetModel, entity, WORLD_MODEL)
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}
__________________
Map Maker
Turkish is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 07-16-2010 , 04:30   Re: How to change terorists knife model?
Reply With Quote #7

Test it.
__________________
Hi.
Kreation is offline
Ryokin
Senior Member
Join Date: Jan 2010
Old 07-16-2010 , 04:33   Re: How to change terorists knife model?
Reply With Quote #8

Quote:
Originally Posted by Turkish View Post
So like this:
Code:
#include <amxmodx> 
#include <engine> 
#include <fakemeta> 
 
new VIEW_MODEL[] = "models/v_newKnife.mdl" 
new PLAYER_MODEL[] = "models/p_newKnife.mdl" 
new WORLD_MODEL[] = "models/w_knife.mdl"
 
new OLDWORLD_MODEL[] = "models/w_knife.mdl"
 
new PLUGIN_NAME[] = "Custom Knife Model" 
new PLUGIN_AUTHOR[] = "Cheap_Suit" 
new PLUGIN_VERSION[] = "1.0" 
 
public plugin_init() 
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR) 
register_event("CurWeapon", "Event_CurWeapon", "be","1=1")
register_forward(FM_SetModel, "fw_SetModel")
} 
 
public plugin_precache() 
{ 
precache_model(VIEW_MODEL) 
precache_model(PLAYER_MODEL) 
precache_model(WORLD_MODEL)
} 
 
public Event_CurWeapon(id) 
{ 
new weaponID = read_data(2) 
 
if(weaponID != CSW_KNIFE || cs_get_user_team( id ) == CS_TEAM_T)
return PLUGIN_CONTINUE
 
set_pev(id, pev_viewmodel2, VIEW_MODEL)
set_pev(id, pev_weaponmodel2, PLAYER_MODEL)
 
return PLUGIN_CONTINUE 
}
 
public fw_SetModel(entity, model[])
{
if(!is_valid_ent(entity)) 
return FMRES_IGNORED
 
if(!equali(model, OLDWORLD_MODEL)) 
return FMRES_IGNORED
 
new className[33]
entity_get_string(entity, EV_SZ_classname, className, 32)
 
if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
{
engfunc(EngFunc_SetModel, entity, WORLD_MODEL)
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}
no wrong , look here :
PHP Code:
if(weaponID != CSW_KNIFE || cs_get_user_teamid ) == CS_TEAM_T)
return 
PLUGIN_CONTINUE 
->
PHP Code:
if(weaponID != CSW_KNIFE) return PLUGIN_CONTINUE
if(get_user_team(id) == 2) return PLUGIN_CONTINUE 
__________________
NH4CL + NaOH -> NH3 + H2O + NaCL
Ryokin is offline
EpicFail.
Senior Member
Join Date: May 2010
Old 07-16-2010 , 04:58   Re: How to change terorists knife model?
Reply With Quote #9

Quote:
Originally Posted by Ryokin View Post
no wrong , look here :
PHP Code:
if(weaponID != CSW_KNIFE || cs_get_user_teamid ) == CS_TEAM_T)
return 
PLUGIN_CONTINUE 
->
PHP Code:
if(weaponID != CSW_KNIFE) return PLUGIN_CONTINUE
if(get_user_team(id) == 2) return PLUGIN_CONTINUE 
Thanks its work
EpicFail. is offline
Turkish
Junior Member
Join Date: Jul 2010
Old 07-16-2010 , 07:47   Re: How to change terorists knife model?
Reply With Quote #10

oh i forgot to make it "or" to "and" thanks ill test
__________________
Map Maker
Turkish is offline
Reply



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 07:09.


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