AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Spawning a gun (https://forums.alliedmods.net/showthread.php?t=6151)

Twilight Suzuka 09-22-2004 18:40

Spawning a gun
 
I need to know how to make a model appear in someones hand, or to everyone else. Help?

Freecode 09-22-2004 18:41

change model?
create entity and dispatch it?

Twilight Suzuka 09-22-2004 18:57

I want to make them have a new gun model, but would making an ent and dispatching it do that?

johnjg75 09-22-2004 19:01

u mean switching the way the gun looks by replacing it with another model? :roll:

Freecode 09-22-2004 19:03

yes make a new weapon entity under a person and dispatch it then drop the players current weapon. or u can change the current weapon model

Twilight Suzuka 09-22-2004 20:25

And could you give me an example of how to do this?

Ingram 09-22-2004 22:39

couldn't u just change the weapon model ent var?

its a string, but some mods use a number, i guess thats the number of the allocated string, so just allocate a string for those mods or something

Votorx 09-23-2004 13:15

Quote:

couldn't u just change the weapon model ent var?
Nope, doesn't change the actual weapon, only how it looks. There's actually several things that can happen you can:

1. Have a scout
2. The scout can look like an AK47 to you
3. It can look like a glock to everyone else.

Changing the model itself won't change how the gun operates so even if you changed the model of your glock to an ak47, it will still act like a glock and look like one to everyone else but you (mattering of course, which model you change)

Ingram 09-23-2004 14:55

so jsut check for the buttons IN_ATTACK, IN_ATTACK2, and IN_RELOAD and make them do whatever u want

so its really just a model

Votorx 09-23-2004 16:48

Quote:

so jsut check for the buttons IN_ATTACK, IN_ATTACK2, and IN_RELOAD and make them do whatever u want
Won't work that way, your just going to have to replace the weapon they have.


All times are GMT -4. The time now is 17:19.

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