Ok......
Full code
/* Plugin generated by AMXX-Studio */
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "Prymary Guns for SP"
#define VERSION "1.0"
#define AUTHOR "Red #"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd( "say /guns" , "first" )
}
public first(id)
{
new menu = menu_create("\yPrimary Weapons:", "first_handle")
menu_additem(menu, "\wNew weapons", "1", 0)
menu_additem(menu, "\wLast weapons", "2", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}
public first_handle(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
new key = str_to_num(data)
switch(key)
{
case 1:{
second(id)
}
case 2:{
SAVE WEAPON
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
public second(id)
{
new menu = menu_create("\yPrimary Weapons:", "second_handle")
menu_additem(menu, "\wAK47", "1", 0)
menu_additem(menu, "\wM4A1", "2", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}
public second_handle(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
new key = str_to_num(data)
switch(key)
{
case 1:{
give_item(id, "weapon_ak47")
}
case 2:{
give_item(id, "weapon_m4a1")
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
I need the player to choose the weapons for the primary menu
then he wants the same option, select "Last weapons" and earn the same gun that he got earlier
I do not quite understand your explanation.
be able to help me again, I'll be very grateful
sorry my bad english