errors[+REP]
#9

Try this.
pawn Код:
if(PRESSED(KEY_WALK))
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.5,298.2446, 201.8958, 889.5491))
        {
        MoveObject(PrisonGate1,296.96875000,207.98828125,892.72052002, 2.2500000);
        SetTimer("PrisonGate", 4500, false);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.5,295.3155, 211.4049, 889.5491))
        {
        MoveObject(PrisonGate1, 296.96875000, 207.98828125, 892.72052002, 2.2500000);
        SetTimer("PrisonGate", 4500, false);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.5,295.3083, 234.5880, 889.5491))
        {
        MoveObject(PrisonGate2, 299.06845093,231.52783203,888.54907227, 2.2500000);
        MoveObject(PrisonGate3, 299.00900269,228.50942993,888.54907227, 2.2500000);
        SetTimer("PrisonGate4Opens", 3000, false);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.5,299.8243, 227.9879, 889.5491))
        {
        MoveObject(PrisonGate2, 299.06845093,231.52783203,888.54907227, 2.2500000);
        MoveObject(PrisonGate3, 299.00900269,228.50942993,888.54907227, 2.2500000);
        SetTimer("PrisonGate4Opens", 3000, false);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.5, 323.8190, 230.1355, 889.5491))
        {
        MoveObject(PrisonGate5,318.01525879,231.82656860,891.18591309, 2.500000);
        SetTimer("PrisonGate", 4500, false);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.5, 335.1102, 220.0642, 889.5491))
        {
        MoveObject(PrisonGate6,335.65136719,222.08398438,892.64837646, 2.500000);
        SetTimer("PrisonGateForVisitors", 3500, false);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.5, 336.2267, 223.9015, 889.5491))
        {
        MoveObject(PrisonGate6,335.65136719,222.08398438,892.64837646, 2.500000);
        SetTimer("PrisonGateForVisitors", 3500, false);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.5, 320.2110,216.9101,889.5491))//From ENTER PRISON to PRISON
        {
        SetPlayerPos(playerid, 371.36816,183.34472,889.29827);
        SetPlayerInterior(playerid, 1);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.5, 371.36816,183.34472,889.29827))//From PRISON to ENTER PRISON
        {
        SetPlayerPos(playerid, 320.2110,216.9101,889.5491);
        SetPlayerInterior(playerid, 1);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.0, 410.4096,164.0016,895.9006))//Like down ^^
        {
        SetObjectRot(PrisonGate7,0.00000000,0.00000000,109.99514771);
        SetTimer("RotateObjectback", 4000, false);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.0, 410.2949,165.4837,895.9006))//Upper gates who can open only a police?
        {
        SetObjectRot(PrisonGate7,0.00000000,0.00000000,109.99514771);
        SetTimer("RotateObjectback", 4000, false);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.5, 369.2244,170.9349,889.5491))//Gates who opens only for police to ISO 1,2
        {
        MoveObject(PrisonGate8,368.68524170,169.67308044,888.54907227, 2.500000);
        SetTimer("InPrisonGate", 3000, false);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.0, 363.3798,155.9887,889.5491))//ISO 2
        {
        SetPlayerPos(playerid,304.12487793,158.95205688,886.36791992);
        SetPlayerInterior(playerid, 1);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.0, 362.9739,153.6197,889.5491))//ISO 1
        {
        SetPlayerPos(playerid,303.79785156,144.47070312,886.36791992);
        SetPlayerInterior(playerid, 1);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.0, 405.8181,181.2119,895.9006))//Open/Close cells dialog
        {
        ShowPlayerDialog(playerid, 1335, DIALOG_STYLE_LIST, " Please Choose what you want to do...","Open the Cells\nClose the Cells","Ok","Cancel");
        }
        else if(IsPlayerInRangeOfPoint(playerid, 2.0, 416.7481,159.0282,895.9077))//Gym enter?
        {
        SetPlayerPos(playerid,409.62695312,96.86425781,896.03515625);
        SetPlayerInterior(playerid, 1);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 1.0, 409.62695312,96.86425781,896.03515625))//GYM exit?
        {
        SetPlayerPos(playerid,416.7481,159.0282,895.9077);
        SetPlayerInterior(playerid, 1);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 5.0, 303.79785156,144.47070312,886.36791992))//From ISO 1 to PRISON
        {
        SetPlayerPos(playerid,362.9739,153.6197,889.5491);
        SetPlayerInterior(playerid, 1);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 5.0, 304.12487793,158.95205688,886.36791992))//From ISO 2 to PRISON
        {
        SetPlayerPos(playerid,363.3798,155.9887,889.5491);
        SetPlayerInterior(playerid, 1);
        }
    }
If it does not work, please post what you have used to define Pressed. Should look something like:
pawn Код:
#define PRESSED %2.2i < 9234 ...
or something weird like that. So yeah, please post that line if the code above does not work.
DO NOT COPY AND PASTE WHAT I HAVE PUT FOR DEFINING PRESSED!!
Reply


Messages In This Thread
errors[+REP] - by Chris_Morrison - 07.07.2012, 12:16
Re: errors[+REP] - by Cxnnor - 07.07.2012, 12:19
Re: errors[+REP] - by Chris_Morrison - 07.07.2012, 12:21
Re: errors[+REP] - by Chris_Morrison - 07.07.2012, 12:30
Re: errors[+REP] - by Chris_Morrison - 07.07.2012, 12:44
Re: errors[+REP] - by Chris_Morrison - 07.07.2012, 13:05
Re: errors[+REP] - by Chris_Morrison - 08.07.2012, 04:52
Re : errors[+REP] - by lelemaster - 08.07.2012, 05:36
Re: errors[+REP] - by clarencecuzz - 08.07.2012, 09:53
Re: errors[+REP] - by Josh_Main - 08.07.2012, 09:57

Forum Jump:


Users browsing this thread: 1 Guest(s)