Code:
public TankBusterMenuHandler(Handle:menu, MenuAction:action, client, itemNum)
{
//Strip the CHEAT flag off of the "give" command
new flags = GetCommandFlags("give");
SetCommandFlags("give", flags & ~FCVAR_CHEAT);
if ( action == MenuAction_Select ) {
new String:info[32];
if (strcmp(info,"option1") == 0 ) {
{
//Give the player a rifle
FakeClientCommand(client, "give rifle");
}
else if ( strcmp(info,"option2") == 0 ) {
{
//Give the player a pipe_bomb
FakeClientCommand(client, "give pipe_bomb");
}
//Add the CHEAT flag back to "give" command
SetCommandFlags("give", flags|FCVAR_CHEAT);
}
__________________