Hi all can you help me for this code. I need create a menu for the last CT and T who the lastman say /last a menu's open and 2 choice possible (shoot for shoot and knife duel). When I choose the knife duel or shoot for shoot my enemy have 15 second for acept or decline. (disarm 2 player and give just knife for knife duel and deagle for shoot for shoot).
But i'm noob for make this menu.
Can you help me please
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#define PLUGIN "last_menu"
#define AUTHOR "spirit"
#define VERSION "1.0"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event( "DeathMsg", "Event_DeathMsg", "a" );
register_clcmd( "say /last","lastman");
register_clcmd( "say_team /last","lastman");
register_clcmd( "say_team /last","lastman");
}
public Event_DeathMsg()
{
new Players[ 32 ];
new Num;
new Count;
get_players( Players, Num, "a" );
for ( new i = 0; i < Num; i++ )
{
switch( cs_get_user_team( Players ) )
{
case CS_TEAM_T:
{
Count++
}
case CS_TEAM_CT:
{
Count++
}
}
}
}
public lastman(id)
{
new menu = menu_create("\lastman:", "last_menu") //menu
menu_additem(menu, "\wknife duel", "1", 0);
menu_additem(menu, "\wshoot for shoot", "2", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
public last_menu (id)
//help code
switch(key)
{
case 1:
{
if( is_user_alive(id) )
give_item(id, "weapon_knife");
set_user_health(id, 100);
set_hudmessage(50, 255)
//disarm all
strip_user_weapons
show_hudmessage(0,"You have choose knife duel.")
}
case 2:
{
if( is_user_alive(id) )
//disarm team
strip_user_weapons
// they delay them has 100hp as well as a deagle
set_user_health(id, 100);
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,200)
set_hudmessage(50, 255)
show_hudmessage(0,"You have choose shoot for shoot.")
}
}
// addition of the time of answer with 2 choices possible
Can you help me is different of last request because it's for last CT and T and it have a time of answer.