19.08.2010, 07:18
I Have a menu....
On Top
OnGameModeInit()
All thing work exept SetPlayerCameraPos
OnPlayerSelectedMenuRow(playerid, row)
OnPlayerExitedMenu(playerid)
On Top
pawn Код:
new Menu:tsm1bmas;
pawn Код:
tsm1bmasa = CreateMenu("Alien Bodykit Parts", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(tsm1bmasa, 0, "Front Bumper");
AddMenuItem(tsm1bmasa, 0, "Rear Bumper");
AddMenuItem(tsm1bmasa, 0, "Spoiler");
AddMenuItem(tsm1bmasa, 0, "Sideskirt");
AddMenuItem(tsm1bmasa, 0, "Roof");
AddMenuItem(tsm1bmasa, 0, "Exhaust");
All thing work exept SetPlayerCameraPos
OnPlayerSelectedMenuRow(playerid, row)
pawn Код:
if(current == tsm1bmasa)
{
switch(row)
{
case 0:
{
HideMenuForPlayer(tsm1bmasa, playerid);
ShowMenuForPlayer(tsm1bmasafb, playerid);
AddVehicleComponent(vehicleid, 1171);
SetPlayerCameraPos(playerid, 1601.0812, -1885.2516, 942.1389);
}
case 1:
{
HideMenuForPlayer(tsm1bmasa, playerid);
ShowMenuForPlayer(tsm1bmasarb, playerid);
AddVehicleComponent(vehicleid, 1149);
SetPlayerCameraPos(playerid, 1609.1083, -1882.4520, 942.1389);
}
case 2:
{
HideMenuForPlayer(tsm1bmasa, playerid);
ShowMenuForPlayer(tsm1bmasasp, playerid);
AddVehicleComponent(vehicleid, 1147);
SetPlayerCameraPos(playerid, 1608.3770, -1886.4465, 943.7663);
}
case 3:
{
HideMenuForPlayer(tsm1bmasa, playerid);
ShowMenuForPlayer(tsm1bmasass, playerid);
AddVehicleComponent(vehicleid, 1040);
AddVehicleComponent(vehicleid, 1036);
SetPlayerCameraPos(playerid, 1603.0118, -1887.3169, 942.5385);
}
case 4:
{
HideMenuForPlayer(tsm1bmasa, playerid);
ShowMenuForPlayer(tsm1bmasarf, playerid);
AddVehicleComponent(vehicleid, 1038);
SetPlayerCameraPos(playerid, 1602.8588, -1884.0482, 943.3430);
}
case 5:
{
HideMenuForPlayer(tsm1bmasa, playerid);
ShowMenuForPlayer(tsm1bmasaex, playerid);
AddVehicleComponent(vehicleid, 1034);
SetPlayerCameraPos(playerid, 1609.3939, -1883.8730, 941.2430);
}
}
}
OnPlayerExitedMenu(playerid)
pawn Код:
if(current == tsm1bmasa)
{
ShowMenuForPlayer(tsm1bmas, playerid);
}