#1

Gates
Hello, I was trying to make my /gate command to work with two gates but the 2nd one doesn't want to work. Please help me out. Frist one works perfect.

pawn Код:
COMMAND:gate(playerid, params[])
{
    if(PlayerInfo[playerid][pFaction] == 1)
    {
        if(IsPlayerInRangeOfPoint(playerid,7.0,1544.4863,-1627.2356,13.6044))
        {
            MoveObject(LSPDbar,1544.6999500,-1630.8000500,13.3000000, 0.0001, 0.0000000, 9.0000000, 90.0000000);
            timer[playerid] = SetTimerEx("gateclose",10000,false,"i",playerid);
        }
        else if(IsPlayerInRangeOfPoint(playerid,7.0,1588.1267,-1637.9401,13.4202))
        {
            MoveObject(LSPDGate,1599.1999500,-1638.0999800,14.8001000, 0.0001); //object(airportgate) (1)
            timer[playerid] = SetTimerEx("gateclose2",10000,false,"i",playerid);
        }
    }
    return 1;
}
Thanks for those have helped, I shall give you one +Rep for helping as an reward.

Thanks for advanced.

Kind Regards,
Death 1300.
Reply
#2

Bump?
Reply
#3

i dont understand this: 0.0001+1599.1999500,-1638.0999800,14.8001000, 0.0001
Reply
#4

x,y,z,how fast....
Reply
#5

Remove the 0.0001+ and check if the coords are correct for both is playerinrangeifpoint and the coords for the gate.

Goodluck!
Reply
#6

I don't see an issue here with your code. It could be either the coords or the gate name variables are conflicting somehow. And you could just use '1560.2' instead of '0.0001+1599.1999500', just for the sake of simplicity.

Would be cool if you clarified aswell what you dont mean under 'doesn't want to work'.
Does the gate even move when the command is sent?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)