[HELP]OnPlayerKeyStateChanged!
#1

Hey guys, was wondering if you could possibly help me out here.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  new string[128];
  new sendername[MAX_PLAYER_NAME];
    if(newkeys == KEY_FIRE)//Horn
    {
  if(IsPlayerArmy(playerid) || IsPlayerPolice(playerid) || IsPlayerFBI(playerid) || IsPlayerSwat(playerid))
    {
        if(PlayerToPoint(15, playerid, 96.669350, 1920.033936, 18.855873))//Aread 51 Entrance Gate
        {
          if(agStatus == 1)
          {
            MoveObject(aGate, 96.669350, 1925.953735, 18.855873, 4);
                        format(string, sizeof(string), "** %s presses a button and lifts the Area 51 elevator!", sendername);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            agStatus = 0;
            SetTimer("ObjectTimers", 5000, false);
            return 1;
            }
        }
            if(PlayerToPoint(10, playerid, 214.337631, 1875.739136, 13.162411))//Area 51 Garage Shutter
        {
            if(ag2Status == 1)
            {
                MoveObject(aGate2, 214.337631, 1875.739136, 9.000, 4);
                        format(string, sizeof(string), "** %s presses a button and lifts the Area 51 elevator!", sendername);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            ag2Status = 0;
            SetTimer("ObjectTimers", 5000, false);
                return 1;
          }
        }
        if(PlayerToPoint(25, playerid, 281.667694, 1821.519043, 16.701317))//Area 51 Lift
        {
          if(alStatus == 1)
          {
            MoveObject(aLift, 281.667694, 1821.519043, 23.451214, 4);
            MoveObject(aLift2, 290.248383, 1821.519043, 23.451214, 4);
            MoveObject(aLift3, 275.712830, 1821.519043, 23.451214, 4);
            MoveObject(aLift4, 296.168213, 1821.519043, 23.451214, 4);
                    format(string, sizeof(string), "** %s presses a button and lifts the Area 51 elevator!", sendername);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            alStatus = 0;
            SetTimer("ObjectTimers", 5000, false);
            return 1;
            }
          }
          else{ SendClientMessage(playerid, COLOR_GRAD1, "You are too far away from the Gate/Garage/Elevator"); return 1; }
        }
        if(PlayerToPoint(15, playerid, 96.669350, 1920.033936, 18.855873))//Aread 51 Entrance Gate
        {
          if(AccountInfo[playerid][Logged] == 1)
          {
            OpenLSPDGate(playerid, 3.0, 1, 30000);
            format(string, sizeof(string), "** %s presses a button and opens the LSPD gate!", sendername);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            return 1;
            }
        }
            if(PlayerToPoint(10, playerid, 214.337631, 1875.739136, 13.162411))//Area 51 Garage Shutter
        {
            if(ag2Status == 1)
            {
                OpenSFPDGate(playerid, 3.0, 1, 30000);
                    format(string, sizeof(string), "** %s presses a button and opens the SFPD gate!", sendername);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
          }
        }
        if(PlayerToPoint(25, playerid, 281.667694, 1821.519043, 16.701317))//Area 51 Lift
        {
          if(alStatus == 1)
          {
            OpenLVPDGate(playerid, 3.0, 1, 30000);
                        format(string, sizeof(string), "** %s presses a button and opens the LVPD gate!", sendername);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            return 1;
            }
          }
          else{ SendClientMessage(playerid, COLOR_GRAD1, "You are too far away from the Gate/Garage/Elevator"); return 1; }
        }
     }
    return 1;
    }
Errors:
pawn Код:
C:\Users\Mike\Desktop\Games\GTA\San Andreas\Advanced-Gaming\0.3 Beta\gamemodes\nyrp.pwn(4565) : error 010: invalid function or declaration
Line 4565:
pawn Код:
return 1;
Any ideas?
Reply


Messages In This Thread
[HELP]OnPlayerKeyStateChanged! - by [NYRP]Mike. - 18.10.2009, 01:00
Re: [HELP]OnPlayerKeyStateChanged! - by Ritchie999 - 18.10.2009, 01:02
Re: [HELP]OnPlayerKeyStateChanged! - by [NYRP]Mike. - 18.10.2009, 01:02
Re: [HELP]OnPlayerKeyStateChanged! - by Ritchie999 - 18.10.2009, 01:11
Re: [HELP]OnPlayerKeyStateChanged! - by [NYRP]Mike. - 18.10.2009, 01:16
Re: [HELP]OnPlayerKeyStateChanged! - by Tannz0rz - 18.10.2009, 01:23
Re: [HELP]OnPlayerKeyStateChanged! - by Ritchie999 - 18.10.2009, 01:47
Re: [HELP]OnPlayerKeyStateChanged! - by [NYRP]Mike. - 18.10.2009, 01:52
Re: [HELP]OnPlayerKeyStateChanged! - by Ritchie999 - 18.10.2009, 01:57

Forum Jump:


Users browsing this thread: 1 Guest(s)