Raised This Month: $51 Target: $400
 12% 

Help with menu selection


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mumbot123
Junior Member
Join Date: Jul 2012
Old 07-06-2012 , 22:26   Help with menu selection
Reply With Quote #1

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
mumbot123 is offline
Old 07-06-2012, 22:33
dasha
This message has been deleted by dasha. Reason: Missed.
dasha
Senior Member
Join Date: Apr 2012
Location: \%STEAM -> $_SESSION
Old 07-06-2012 , 22:39   Re: Help with menu selection
Reply With Quote #2

menu_additem(menu, "\wforklift", "1")

in handler:

cs_set_user_model(id, "forklift")
dasha is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 07-06-2012 , 22:49   Re: Help with menu selection
Reply With Quote #3

Quote:
Originally Posted by mumbot123 View Post
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.



Quote:
Originally Posted by dasha View Post
menu_additem(menu, "\wforklift", "1")

in handler:

cs_set_user_model(id, "forklift")
This only sets CS models i.e. "SPTEZNAZ", "ARCTIC" etc
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 07-06-2012 at 23:10. Reason: typo
Liverwiz is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 07-07-2012 , 00:24   Re: Help with menu selection
Reply With Quote #4

Quote:
Originally Posted by Liverwiz View Post
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.
__________________
Hi.
Kreation is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 07-07-2012 , 00:37   Re: Help with menu selection
Reply With Quote #5

Quote:
Originally Posted by Kreation View Post
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.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
dasha
Senior Member
Join Date: Apr 2012
Location: \%STEAM -> $_SESSION
Old 07-07-2012 , 00:45   Re: Help with menu selection
Reply With Quote #6

Quote:
Originally Posted by Liverwiz View Post
This only sets CS models i.e. "SPTEZNAZ", "ARCTIC" etc


Has I think he/she have a const, so I have not writed it.
dasha is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-07-2012 , 06:22   Re: Help with menu selection
Reply With Quote #7

Quote:
Originally Posted by Liverwiz View Post
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"); 
__________________
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
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 07-07-2012 , 08:05   Re: Help with menu selection
Reply With Quote #8

Quote:
Originally Posted by YamiKaitou View Post
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.
__________________
Hi.
Kreation is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 07-07-2012 , 11:30   Re: Help with menu selection
Reply With Quote #9

Quote:
Originally Posted by YamiKaitou View Post
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.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz 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 14:53.


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