Raised This Month: $ Target: $400
 0% 

Remember selection.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 01-24-2009 , 10:07   Remember selection.
Reply With Quote #1

Ok here you are code,I need like in csdm,remember last selected guns and look at code.
Thx.

PHP Code:
public SelevtWhatyouwant(id)
{
    new 
menu menu_create("\yPrimary Weapons:""main")

    
menu_additem(menu"\wChoose Weapons""1"0)
    
menu_additem(menu"\w!!!!!!!Remember Selection!!!!!!""2"0)


    
menu_setprop(menuMPROP_EXITMEXIT_ALL)

    
menu_display(idmenu0)

}
public 
main(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    new 
data[6], iName[64]
    new 
accesscallback
    menu_item_getinfo
(menuitemaccessdata,5iName63callback)
    new 
key str_to_num(data)

    switch(
key)
    {
        case 
1:{
                        
Primary(id)
        }
        case 
2:{
                              
REMEMBER SELECTION!!!    
        }

        }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}
public 
Primary(id)
{
    new 
menu menu_create("\yPrimary Weapons:""prim_handle")

    
menu_additem(menu"\wAK-GP30""1"0)
    
menu_additem(menu"\wBenelli M3 Super90""2"0)
    
menu_additem(menu"\wDesert M4A1""3"0)
    
menu_additem(menu"\wSig 552""4"0)
    
menu_additem(menu"\wBenelli XM1014""5"0)

    
menu_setprop(menuMPROP_EXITMEXIT_ALL)

    
menu_display(idmenu0)

}
public 
prim_handle(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    new 
data[6], iName[64]
    new 
accesscallback
    menu_item_getinfo
(menuitemaccessdata,5iName63callback)
    new 
key str_to_num(data)

    switch(
key)
    {
        case 
1:{
            
fm_give_item(id"weapon_ak47")
            
fm_set_user_bpammo(idCSW_AK4790)
                        
Secondary(id)
        }
        case 
2:{
            
fm_give_item(id"weapon_m3")
            
fm_set_user_bpammo(idCSW_M332)
                        
Secondary(id)
        }
        case 
3:{
            
fm_give_item(id"weapon_m4a1")
            
fm_set_user_bpammo(idCSW_M4A190)
                        
Secondary(id)
        }
        case 
4:{
            
fm_give_item(id"weapon_sg552")
            
fm_set_user_bpammo(idCSW_SG55290)
                        
Secondary(id)
        }
        case 
5:{
            
fm_give_item(id"weapon_xm1014")
            
fm_set_user_bpammo(idCSW_XM101432)
                        
Secondary(id)
        }
        }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}
public 
Secondary(id)
{
    new 
menu menu_create("\ySecondary Weapons:""second_handle")

    
menu_additem(menu"\wColt Trooper mk. III""1"0)
    
menu_additem(menu"\wColt M1911A2""2"0)
    
menu_additem(menu"\wBeretta M92""3"0)

    
menu_setprop(menuMPROP_EXITMEXIT_ALL)

    
menu_display(idmenu0)

}
public 
second_handle(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    new 
data[6], iName[64]
    new 
accesscallback
    menu_item_getinfo
(menuitemaccessdata,5iName63callback)
    new 
key str_to_num(data)

    switch(
key)
    {
        case 
1:{
            
fm_give_item(id"weapon_deagle")
            
fm_set_user_bpammo(idCSW_DEAGLE35)
        }
        case 
2:{
            
fm_give_item(id"weapon_p228")
            
fm_set_user_bpammo(idCSW_P22852)
        }
        case 
3:{
            
fm_give_item(id"weapon_usp")
            
fm_set_user_bpammo(idCSW_USP100)
        }
        }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

xbatista is offline
Send a message via Skype™ to xbatista
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-24-2009 , 10:18   Re: Remember selection.
Reply With Quote #2

This should be moved to Scripting Help.

Ontopic: use search next time.
http://forums.alliedmods.net/showthread.php?t=76411
__________________
xPaw is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 01-24-2009 , 10:19   Re: Remember selection.
Reply With Quote #3

I don't like this http://forums.alliedmods.net/showthread.php?t=76411
And I request someone to do this.
xbatista is offline
Send a message via Skype™ to xbatista
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-24-2009 , 10:49   Re: Remember selection.
Reply With Quote #4

just watch how it done there and do it for your.
__________________
xPaw is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 01-24-2009 , 11:22   Re: Remember selection.
Reply With Quote #5

There are a lot of unknown things and hard to understood
xbatista is offline
Send a message via Skype™ to xbatista
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-24-2009 , 18:28   Re: Remember selection.
Reply With Quote #6

Moved to Scripting Help.

Also, if this is too difficult, then stop trying to attempt something that you can't handle.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 01:51.


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