26.02.2009, 18:52
pawn Код:
#include <a_samp>
#define COLOR_RED 0xFF0000AA
new Menu:ElevatorMenu;
new CP;
public OnFilterScriptInit()
{
ElevatorMenu = CreateMenu("ElevatorMenu", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(ElevatorMenu, 0, "Elevator up");
AddMenuItem(ElevatorMenu, 0, "Call Elevator");
AddMenuItem(ElevatorMenu, 0, "Cancel");
return 1;
}
public OnPlayerSpawn(playerid)
{
CP = SetPlayerCheckpoint(playerid, 1840.252563, -1662.095337, 58.791744, 3.00);
return 1;
}
public OnPlayerSelectedMenuRow(playerid,row)
{
new Menu:current;
current = GetPlayerMenu(playerid);
if(current == ElevatorMenu)
{
switch(row)
{
case 0:{
MoveObject(980,1840.252563,-1662.095337,112.666771,3);
}
case 1:{
MoveObject(980,1840.252563,-1662.095337,58.791744,3);
}
case 2:{
SendClientMessage(playerid, COLOR_RED, "Menu canceled.");
}
}
}
return 1;
}