AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with menu selection (https://forums.alliedmods.net/showthread.php?t=189416)

mumbot123 07-06-2012 22:26

Help with menu selection
 
Hello all Allied Modders, i have made a menu and i am wanting that when the player clicks the menu selection Forklift There skin will change to the forklift in CS_assault

PHP Code:

else if (menu_item == 3)
    {
        
SetMenuTitle(menu"Shadow-test\n-------------");
        
        
AddMenuItem(menu"""forklift");
        
        } 


This is the model: models/props/cs_assault/forklift.mdl

thanks :)

dasha 07-06-2012 22:39

Re: Help with menu selection
 
menu_additem(menu, "\wforklift", "1")

in handler:

cs_set_user_model(id, "forklift")

Liverwiz 07-06-2012 22:49

Re: Help with menu selection
 
Quote:

Originally Posted by mumbot123 (Post 1745100)
Hello all Allied Modders, i have made a menu and i am wanting that when the player clicks the menu selection Forklift There skin will change to the forklift in CS_assault

lmfao. oh shit....as soon as i stop laughing i'll figure out how to do that for you.

PHP Code:

set_pdata_string(id491"models/props/cs_assault/forklift.mdl"

don't forget to make sure forklift is precached
Mind you....this isn't the best way, just the first one i found. :P



Quote:

Originally Posted by dasha (Post 1745109)
menu_additem(menu, "\wforklift", "1")

in handler:

cs_set_user_model(id, "forklift")

This only sets CS models i.e. "SPTEZNAZ", "ARCTIC" etc

Kreation 07-07-2012 00:24

Re: Help with menu selection
 
Quote:

Originally Posted by Liverwiz (Post 1745113)
lmfao. oh shit....as soon as i stop laughing i'll figure out how to do that for you.

This only sets CS models i.e. "SPTEZNAZ", "ARCTIC" etc

1: Rude.
2: It does? I was unaware.

Liverwiz 07-07-2012 00:37

Re: Help with menu selection
 
Quote:

Originally Posted by Kreation (Post 1745146)
1: Rude.
2: It does? I was unaware.

1. I was imagining a forklift running around the map shooting people. Hilarious to me. If i thought it was funny in a dumb way....i wouldn't bother helping.
2. read the wiki http://www.amxmodx.org/funcwiki.php?go=func&id=191
Quote:

model is set as "gign" or "leet", for example, NOT "models/player/gign/gign.mdl".
This implies that you can only set default CS models. Not specially defined ones.

dasha 07-07-2012 00:45

Re: Help with menu selection
 
Quote:

Originally Posted by Liverwiz (Post 1745113)
This only sets CS models i.e. "SPTEZNAZ", "ARCTIC" etc



Has I think he/she have a const, so I have not writed it.

YamiKaitou 07-07-2012 06:22

Re: Help with menu selection
 
Quote:

Originally Posted by Liverwiz (Post 1745152)
2. read the wiki http://www.amxmodx.org/funcwiki.php?go=func&id=191

This implies that you can only set default CS models. Not specially defined ones.

It implies nothing, it is an example showing you how to use the function. The below works just fine
PHP Code:

precache_model("models/player/liverwiz/liverwiz.mdl");
cs_set_user_model(id"liverwiz"); 


Kreation 07-07-2012 08:05

Re: Help with menu selection
 
Quote:

Originally Posted by YamiKaitou (Post 1745260)
It implies nothing, it is an example showing you how to use the function. The below works just fine
PHP Code:

precache_model("models/player/liverwiz/liverwiz.mdl");
cs_set_user_model(id"liverwiz"); 


Thank you.

Liverwiz 07-07-2012 11:30

Re: Help with menu selection
 
Quote:

Originally Posted by YamiKaitou (Post 1745260)
It implies nothing, it is an example showing you how to use the function. The below works just fine
PHP Code:

precache_model("models/player/liverwiz/liverwiz.mdl");
cs_set_user_model(id"liverwiz"); 


Oh really? Well then.....i apologize all that i confused. Glad we have smart people like YamiKaitou around to tell me when i'm dumb. :3


All times are GMT -4. The time now is 15:24.

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