10.06.2009, 04:28
Well, for some reason now my menu crashes the server, it never used to before.
Global...
OnGameModeInit()...
in my dcmd
^ calls correctly, tested
OnExitedMenu
It crashes the SERVER when i call it.. Why?
Global...
Код:
new Menu:CarColorMenu;
Код:
CarColorMenu = CreateMenu("Car Color", 1, 200.0, 150.0, 130.0, 0.0); AddMenuItem(CarColorMenu, 0, "Black"); AddMenuItem(CarColorMenu, 0, "White"); AddMenuItem(CarColorMenu, 0, "Blue"); AddMenuItem(CarColorMenu, 0, "Red"); AddMenuItem(CarColorMenu, 0, "Green"); AddMenuItem(CarColorMenu, 0, "Pink"); AddMenuItem(CarColorMenu, 0, "Yellow");
Код:
if (GetPlayerVehicleID(playerid) == Player[playerid][cID]) { TogglePlayerControllable(playerid, 0); ShowMenuForPlayer(CarColorMenu, playerid); return 1; }
OnExitedMenu
Код:
public OnPlayerExitedMenu(playerid) { TogglePlayerControllable(playerid, 1); return 1; }