Raised This Month: $ Target: $400
 0% 

adding weapon skins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
superfly19092
Member
Join Date: Jun 2006
Old 08-16-2006 , 16:29   adding weapon skins
Reply With Quote #1

if i have a plugin script like this (the one cheep suit made)

#include <amxmodx>
#include <engine>
#include <fakemeta>

new VIEW_MODEL[] = "models/v_<model name>.mdl"
new PLAYER_MODEL[] = "models/p_<model name>.mdl"
new WORLD_MODEL[] = "models/w_<model name>.mdl"

new OLDWORLD_MODEL[] = "models/w_<model name>.mdl" // the world model you want replaced

new PLUGIN_NAME[] = "Custom Weapon 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)
{
// might not work for other mods
new weaponID = read_data(2)

// eg, if weapon is not ak then continue
if(weaponID != CSW_AK47)
return PLUGIN_CONTINUE

// this set's the view model (what you see when holding the gun)
entity_set_string(id, EV_SZ_viewmodel, VIEW_MODEL)

// this set's the player model (what you see when people holding the gun)
entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODEL)

return PLUGIN_CONTINUE
}

public fw_SetModel(entity, model[])
{
// check if its a valid entity or else we'll get errors
if(!is_valid_ent(entity))
return FMRES_IGNORED

// checks if it's the model we want to change
if(!equali(model, OLDWORLD_MODEL))
return FMRES_IGNORED

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

// dropped weapons map weapons c4 + grenades
if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
{
// set's the world model (what you see on the ground)
entity_set_model(entity, WORLD_MODEL)
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}

what do i do for just a v model or just 1 of just 2 or something insted of all three, like if i had a knife. only the v model
__________________
condtion zero

209.67.214.5:27015

website is www.freewebs.com/fpkserver
superfly19092 is offline
HexD
Member
Join Date: Nov 2005
Location: England
Old 08-16-2006 , 16:52   Re: adding weapon skins
Reply With Quote #2

i cant help you, but you should edit your post and use the proper tags to wrap your code.
HexD is offline
Send a message via MSN to HexD
superfly19092
Member
Join Date: Jun 2006
Old 08-20-2006 , 16:24   Re: adding weapon skins
Reply With Quote #3

o ok thanks =) how do i do that thing in the whire box thing?
__________________
condtion zero

209.67.214.5:27015

website is www.freewebs.com/fpkserver
superfly19092 is offline
SNipy
Junior Member
Join Date: Aug 2006
Location: In my house.
Old 08-20-2006 , 16:46   Re: adding weapon skins
Reply With Quote #4

Just type but without spaces :p [ CODE ][ / CODE ]
[ CODE ]Code Here[ / CODE ]
__________________
This Guy Want To Script. Somebody wants to learn it hem ?
SNipy is offline
Send a message via AIM to SNipy Send a message via MSN to SNipy Send a message via Skype™ to SNipy
Old 08-22-2006, 22:30
superfly19092
This message has been deleted by superfly19092.
Old 08-22-2006, 22:31
superfly19092
This message has been deleted by superfly19092.
superfly19092
Member
Join Date: Jun 2006
Old 08-22-2006 , 22:34   Re: adding weapon skins
Reply With Quote #5

[ hi ]
__________________
condtion zero

209.67.214.5:27015

website is www.freewebs.com/fpkserver
superfly19092 is offline
superfly19092
Member
Join Date: Jun 2006
Old 08-22-2006 , 22:35   Re: adding weapon skins
Reply With Quote #6

ahhh i cant get it
__________________
condtion zero

209.67.214.5:27015

website is www.freewebs.com/fpkserver
superfly19092 is offline
SNipy
Junior Member
Join Date: Aug 2006
Location: In my house.
Old 08-23-2006 , 06:10   Re: adding weapon skins
Reply With Quote #7

I mean use [ with the word in it. Just type same but without spaces :
[ CODE ]hi[ / CODE ] =
Code:
hi
__________________
This Guy Want To Script. Somebody wants to learn it hem ?
SNipy is offline
Send a message via AIM to SNipy Send a message via MSN to SNipy Send a message via Skype™ to SNipy
-=[DaW]=-
Senior Member
Join Date: Jun 2006
Location: Canada
Old 08-24-2006 , 08:55   Re: adding weapon skins
Reply With Quote #8

Superfly if you need any help just let me know ill make the code.
__________________
-=[DaW]=- is offline
Send a message via MSN to -=[DaW]=-
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 08-24-2006 , 12:08   Re: adding weapon skins
Reply With Quote #9

Try quoting a post and see how its shown
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
SNipy
Junior Member
Join Date: Aug 2006
Location: In my house.
Old 08-27-2006 , 05:56   Re: adding weapon skins
Reply With Quote #10

Yeah, but than its Like This
__________________
This Guy Want To Script. Somebody wants to learn it hem ?
SNipy is offline
Send a message via AIM to SNipy Send a message via MSN to SNipy Send a message via Skype™ to SNipy
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 00:28.


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