Gate opening with Mouse middle button
#1

Hi.
I made this command, it works perfectly when i am not in car, but doesn't work if i'm in car, It just doesn't do anything.
Code is here..
pawn Код:
if ( PRESSED(KEY_LOOK_BEHIND) )
    {
       new pName[64];
        GetPlayerName(playerid,pName,64);
        if(!strcmp(pName,"Steven_Hayen",true))
        {
            if(IsPlayerInRangeOfPoint(playerid, 14,323.3900,-1190.5800,76.0000))
                {
                    if(varav2 == 0)
                    {
                        MoveObject(gate, 321.25000000,-1188.27000000,69.66000000,2.00000000);
                        MoveObject(gate1, 319.14000000,-1190.06000000,68.31000000,2.00000000);
                        MoveObject(gate2, 319.14000000,-1190.06000000,70.48000000,2.000000000);
                        MoveObject(gate3, 321.44000000,-1188.21000000,68.31000000,2.000000000);
                        MoveObject(gate4, 321.45000000,-1188.22000000,70.48000000,2.000000000);
                        SendClientMessage(playerid, COLOR_BLUE,"Gate opened!");
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        varav2 = 1;
                    }
                    else
                    {
                        MoveObject(gate, 321.25000000,-1188.27000000,76.35000000,2.00000000);//CreateObject(971,321.35000000,-1188.27000000,76.35000000,0.00000000,0.00000000,38.33000000);
                        MoveObject(gate1, 319.14000000,-1190.06000000,75.00000000,2.00000000);
                        MoveObject(gate2, 319.14000000,-1190.06000000,77.17000000,2.00000000);
                        MoveObject(gate3, 321.44000000,-1188.21000000,75.00000000,2.00000000);
                        MoveObject(gate4, 321.45000000,-1188.22000000,77.17000000,2.00000000);
                        SendClientMessage(playerid, COLOR_BLUE,"Gate closed!");
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        varav2 = 0;
                    }
                }
            }
Reply


Messages In This Thread
Gate opening with Mouse middle button - by pliptm - 12.05.2011, 15:28
Re: Gate opening with Mouse middle button - by pliptm - 12.05.2011, 20:38
Re: Gate opening with Mouse middle button - by lowrida018 - 12.05.2011, 20:40
Re: Gate opening with Mouse middle button - by pliptm - 13.05.2011, 11:53
Re: Gate opening with Mouse middle button - by Mike Garber - 13.05.2011, 12:01
Re: Gate opening with Mouse middle button - by pliptm - 13.05.2011, 12:51
Re: Gate opening with Mouse middle button - by Laronic - 13.05.2011, 13:18
Re: Gate opening with Mouse middle button - by Biesmen - 13.05.2011, 13:56
Re: Gate opening with Mouse middle button - by wheelman_WM - 13.05.2011, 14:42
Re: Gate opening with Mouse middle button - by Gh0sT_ - 13.05.2011, 14:47

Forum Jump:


Users browsing this thread: 12 Guest(s)