AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Adding custom weapons (https://forums.alliedmods.net/showthread.php?t=245641)

EpicKiller 08-05-2014 02:35

Adding custom weapons
 
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?

hornet 08-05-2014 03:34

Re: Adding custom weapons
 
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.

EpicKiller 08-05-2014 05:06

Re: Adding custom weapons
 
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! :)

Kia 08-05-2014 05:16

Re: Adding custom weapons
 
Quote:

Originally Posted by EpicKiller (Post 2179082)
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")

EpicKiller 08-05-2014 08:59

Re: Adding custom weapons
 
Quote:

Originally Posted by Kia (Post 2179140)
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?

Kia 08-05-2014 10:11

Re: Adding custom weapons
 
Quote:

Originally Posted by ANTICHRISTUS REX
player and w_ world, v_ view


EpicKiller 08-05-2014 15:26

Re: Adding custom weapons
 
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.

YamiKaitou 08-05-2014 19:25

Re: Adding custom weapons
 
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

EpicKiller 08-05-2014 19:52

Re: Adding custom weapons
 
Yeah, I probably am using that function unproperly. Could you please give me a sample of the proper using of that?

YamiKaitou 08-05-2014 22:25

Re: Adding custom weapons
 
entity_set_model(EntityIndex, "ModelPath");


All times are GMT -4. The time now is 13:16.

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