[HELP] Compile
#4

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;
}
Moved the "CP = SetPlayerCheckpoint etc." to OnPlayerSpawn, and added the missing "speed" parameter of the MoveObject function. Should at least get rid of the warnings and errors. Won't get rid of this: symbol is assigned a value that is never used: "CP", but don't worry about that for now, your script will run alright with this warning.
Reply


Messages In This Thread
[HELP] Compile - by Hot - 26.02.2009, 18:07
Re: [HELP] Compile - by yom - 26.02.2009, 18:09
Re: [HELP] Compile - by Hot - 26.02.2009, 18:15
Re: [HELP] Compile - by 1337pr0 - 26.02.2009, 18:52

Forum Jump:


Users browsing this thread: 1 Guest(s)