Raised This Month: $ Target: $400
 0% 

Adding custom weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 08-05-2014 , 02:35   Adding custom weapons
Reply With Quote #1

Hey there! How could I add custom weapons? I don't need something entirely new, something based on existing weapons would suit my needs. Let me explain: what I need is a vip menu, made of four elements: crystal awp, golden awp, crystal deagle and golden deagle.

I could not find a function that sets a different skin to a weapon, so I thought of the custom weapon thing as the only way of doing it.

So... my question: how could I do the custom weapons?
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 08-05-2014 , 03:34   Re: Adding custom weapons
Reply With Quote #2

There's a lot of information regarding this subject. You should try searching, try what you find, and then come back here with the issues you encountered.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 08-05-2014 , 05:06   Re: Adding custom weapons
Reply With Quote #3

Ok. I'll do that. I've done that before, but didn't really find much. Anyway, I'll try a more accurate search these days. I'll be back here in a couple of days, after a complete search. Thanks!
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 08-05-2014 , 05:16   Re: Adding custom weapons
Reply With Quote #4

Quote:
Originally Posted by EpicKiller View Post
I could not find a function that sets a different skin to a weapon, so I thought of the custom weapon thing as the only way of doing it.
Code:
entity_set_string(id, EV_SZ_viewmodel, "models/v_sexyawp.mdl") entity_set_string(id, EV_SZ_weaponmodel, "models/w_sexyawp.mdl")
__________________

Last edited by Kia; 08-05-2014 at 05:16.
Kia is offline
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 08-05-2014 , 08:59   Re: Adding custom weapons
Reply With Quote #5

Quote:
Originally Posted by Kia View Post
Code:
entity_set_string(id, EV_SZ_viewmodel, "models/v_sexyawp.mdl") entity_set_string(id, EV_SZ_weaponmodel, "models/w_sexyawp.mdl")
Thank you so much! This solved my problem for sure. I got one final question, though. v_model stand vor view. w stand for world. I knew those three, but I forgot what the p_ stand for. Could you please tell me that?
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 08-05-2014 , 10:11   Re: Adding custom weapons
Reply With Quote #6

Quote:
Originally Posted by ANTICHRISTUS REX
player and w_ world, v_ view
__________________
Kia is offline
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 08-05-2014 , 15:26   Re: Adding custom weapons
Reply With Quote #7

I found this in AMXX Documentation, regarding that function: "Do not use this to set models, use entity_set_model." Should I use that function with the same entity?

EDIT: Apparently, using those entities with entity_set_model returns compiling errors.

EDIT2: I've done some searching in the includes, the "entity_set_model" function has been replaced with "fm_entity_set_model". Now... the plugin compiles clean. I'm gonna test it to see how it works (if it does) and I will be back with another edit, the third, hopefully the last.
__________________
~ Swiftly and with style ~

Last edited by EpicKiller; 08-05-2014 at 16:43.
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-05-2014 , 19:25   Re: Adding custom weapons
Reply With Quote #8

Don't use anything from fakemeta_util, you can do it much faster without it

You are probably using entity_set_model incorrectly if you are getting compile errors
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 08-05-2014 , 19:52   Re: Adding custom weapons
Reply With Quote #9

Yeah, I probably am using that function unproperly. Could you please give me a sample of the proper using of that?
__________________
~ Swiftly and with style ~
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-05-2014 , 22:25   Re: Adding custom weapons
Reply With Quote #10

entity_set_model(EntityIndex, "ModelPath");
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 13:16.


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