Raised This Month: $ Target: $400
 0% 

VIP Models Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zEEDu
Junior Member
Join Date: Jan 2013
Location: Vaasa, Finland
Old 01-21-2013 , 09:31   VIP Models Help
Reply With Quote #1

Yo, need some help with some stuff

Models:

When i'm ingame and choose ex. Mr Smith model and then if i want another one or maybe reset the model but i i can't. Neither the message appears.
Why?

PHP Code:
public ModelMenuCTid 

    new 
menu menu_create("\yVIP Menu^n\wCounter-Terrorist Models^n\d -www.Scandic-Gamers.com""HandleModelsMenuCT"
    
menu_additemmenu"Mr Smith""1"); 
    
menu_additemmenu"Master Chief""2"); 
    
menu_additemmenu"\yReset Model""3");     
    
menu_setpropmenuMPROP_EXITMEXIT_ALL );  
    
menu_displayidmenu); 


public 
ModelMenuTid 

    new 
menu menu_create("\yVIP Menu^n\wTerrorist Models^n\d -www.Scandic-Gamers.com""HandleModelsMenuTerr"
    
menu_additemmenu"Rebel""1"); 
    
menu_additemmenu"50 Cent""2"); 
    
menu_additemmenu"\yReset Model""3"); 
    
menu_setpropmenuMPROP_EXITMEXIT_ALL );  
    
menu_displayidmenu); 



public 
HandleModelsMenuCT(idkeymenuitem) {  
   if(
is_user_alive(id))
   {   
    switch(
key)
    {
        case 
0: {
            
cs_set_user_model(id,"VIP_CT"
            
ColorChat(idBLUE"%s Selected Model loaded successfully!"prefix)
        }
        case 
1: {
            
cs_set_user_model(id,"VIP_CT2"
            
ColorChat(idBLUE"%s Selected Model loaded successfully!"prefix)
        }
        case 
2: {
            
cs_reset_user_model(id
            
ColorChat(idBLUE"%s Model resetted sucessfully!"prefix)
       }
        }
    }
    return 
PLUGIN_HANDLED


public 
HandleModelsMenuTerr(idkeymenuitem) {  
   if(
is_user_alive(id))
   {   
    switch(
key)
    {
        case 
0: {
            
cs_set_user_model(id,"VIP_T"
            
ColorChat(idRED"%s Selected Model loaded successfully!"prefix)
        }
        case 
1: {
            
cs_set_user_model(id,"VIP_T2"
            
ColorChat(idRED"%s Selected Model loaded successfully!"prefix)
        }
        case 
2: {
            
cs_reset_user_model(id
            
ColorChat(idRED"%s Model resetted sucessfully!"prefix)
       }
        }
    }
    return 
PLUGIN_HANDLED

Toggles:

I need a VIP tag in scoreboard that and so a player writes with green color (colorchat) that you can choose from a menu if you want it OFF or ON.
Ex.

1. Scoreboard Tag [ON] = Enabled & OFF = Disabled
2. Green Chat [ON] = Enabled & OFF = Disabled

How do i do this?

Thanks in advance!
__________________
PM for Private Work!

Scandinavian Gaming Association

Last edited by zEEDu; 01-21-2013 at 09:48. Reason: ..
zEEDu is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 01-21-2013 , 14:34   Re: VIP Models Help
Reply With Quote #2

Do it like this


Code:
public ModelMenuCT( id ) {
new menu = menu_create("Model:", "Model_handler")
new szTemp[32]
formatex(szTemp, charsmax(szTemp), "\yMr Smith [\r%s\y]", Model[id] ? "ON" : "OFF")
menu_additem(menu, szTemp, "1")
menu_display(id, menu)
}
public Model_handler(id, menu, item) {
    if(item == MENU_EXIT) {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    
    if((Model[id] = !Model[id])) {
            cs_set_user_model(id,"VIP_CT") 
            ColorChat(id, BLUE, "%s Model is on", prefix)
        }
    }
    else {
            cs_reset_user_model(id) 
            ColorChat(id, BLUE, "%s Model is off", prefix)
    }
    ModelMenuCT(id)
    return PLUGIN_CONTINUE
}
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
zEEDu
Junior Member
Join Date: Jan 2013
Location: Vaasa, Finland
Old 01-21-2013 , 14:49   Re: VIP Models Help
Reply With Quote #3

Quote:
Originally Posted by ironskillz1 View Post
Do it like this


Code:
public ModelMenuCT( id ) {
new menu = menu_create("Model:", "Model_handler")
new szTemp[32]
formatex(szTemp, charsmax(szTemp), "\yMr Smith [\r%s\y]", Model[id] ? "ON" : "OFF")
menu_additem(menu, szTemp, "1")
menu_display(id, menu)
}
public Model_handler(id, menu, item) {
    if(item == MENU_EXIT) {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    
    if((Model[id] = !Model[id])) {
            cs_set_user_model(id,"VIP_CT") 
            ColorChat(id, BLUE, "%s Model is on", prefix)
        }
    }
    else {
            cs_reset_user_model(id) 
            ColorChat(id, BLUE, "%s Model is off", prefix)
    }
    ModelMenuCT(id)
    return PLUGIN_CONTINUE
}
Thanks, but no thanks.
I don't need a on/off function, i already had that but i changed my mind.

So anyone else?
__________________
PM for Private Work!

Scandinavian Gaming Association
zEEDu is offline
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 01-21-2013 , 17:06   Re: VIP Models Help
Reply With Quote #4

i think because your handler incorrect:
menu_handler(id, menu, item)
http://forums.alliedmods.net/showthread.php?t=46364
__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT
AngeIII is offline
Send a message via Skype™ to AngeIII
zEEDu
Junior Member
Join Date: Jan 2013
Location: Vaasa, Finland
Old 01-22-2013 , 03:12   Re: VIP Models Help
Reply With Quote #5

Quote:
Originally Posted by AngeIII View Post
i think because your handler incorrect:
menu_handler(id, menu, item)
http://forums.alliedmods.net/showthread.php?t=46364
Oh, yeah. You're right, didn't see that, didn't even think about it

I'll take a look at it when i get home, i'm in school now..
__________________
PM for Private Work!

Scandinavian Gaming Association
zEEDu is offline
zEEDu
Junior Member
Join Date: Jan 2013
Location: Vaasa, Finland
Old 01-22-2013 , 10:04   Re: VIP Models Help
Reply With Quote #6

Thanks, i got it figured out

But what about the other things, the greenchat and VIP tag? I don't know how to put the functions into the toggle.
__________________
PM for Private Work!

Scandinavian Gaming Association
zEEDu 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:44.


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