All pastes #619571 Raw Edit

Something

public text v1 · immutable
·published 2007-07-14 21:10 UTC
rendered paste body
public OnPlayerExitedMenu(playerid)
{
	new Menu:Current = GetPlayerMenu(playerid);
  	if(Current == Commands[ playerid ]) {
    	TogglePlayerControllable(playerid,1);
    	DestroyMenu(Commands[playerid]);
    }
    if (Current == Amunation[playerid]) {
        TogglePlayerControllable(playerid,1);
        SetTimerEx("shopingunset", 2000, 0, "i", playerid);
        DestroyMenu(Amunation[playerid]);
    }
    if (Current == AmunationPistols[playerid]) {
        TogglePlayerControllable(playerid,1);
        SetTimerEx("shopingunset", 2000, 0, "i", playerid);
        DestroyMenu(AmunationPistols[playerid]);
    }
    if (Current == AmunationAssualt[playerid]) {
        TogglePlayerControllable(playerid,1);
        SetTimerEx("shopingunset", 2000, 0, "i", playerid);
        DestroyMenu(AmunationAssualt[playerid]);
    }
    if (Current == AmunationRifles[playerid]) {
        TogglePlayerControllable(playerid,1);
        SetTimerEx("shopingunset", 2000, 0, "i", playerid);
        DestroyMenu(AmunationRifles[playerid]);
    }
    if (Current == AmunationSMG[playerid]) {
        TogglePlayerControllable(playerid,1);
        SetTimerEx("shopingunset", 2000, 0, "i", playerid);
        DestroyMenu(AmunationSMG[playerid]);
    }
    if (Current == AmunationArmor[playerid]) {
        TogglePlayerControllable(playerid,1);
        SetTimerEx("shopingunset", 2000, 0, "i", playerid);
        DestroyMenu(AmunationArmor[playerid]);
    }
    if (Current == AmunationShotguns[playerid]) {
        TogglePlayerControllable(playerid,1);
        SetTimerEx("shopingunset", 2000, 0, "i", playerid);
        DestroyMenu(AmunationShotguns[playerid]);
    }
    if (Current == AmunationMicrosmg[playerid]) {
        TogglePlayerControllable(playerid,1);
        SetTimerEx("shopingunset", 2000, 0, "i", playerid);
        DestroyMenu(AmunationMicrosmg[playerid]);
    }
	return 1;
}