/opengate..
#1

Do you see anything wrong with this command?

pawn Код:
dcmd_opengate(playerid, params[])
    {
        #pragma unused params
        if (PlayerToPoint(50.0, playerid, 1593.70690918, -1638.02673340, 12.91628456))
        {
            MoveObject(LSPD, 1593.70690918, -1638.02673340,12.91628456, 5.00);
            SetTimer("closeLSPD", 10000, 0);
            SendClientMessage(playerid, COLOR_RED, "[INFO] You are opening a gate it will close automaticly");
            return 1;
        }
        else if(PlayerToPoint(50.0, playerid,  1141.51489258, -1213.32067871, 19.88671112))
        {
            MoveObject(LF, 1141.51489258, -1213.32067871, 19.88671112, 5.00);
            SetTimer("closeLF", 10000, 0);
            SendClientMessage(playerid, COLOR_RED, "[INFO] You are opening a gate it will close automaticly");
            return 1;
        }
        return 0;
    }
Reply
#2

What are the problems 0.o?
Reply
#3

Quote:
Originally Posted by Claude
Посмотреть сообщение
What are the problems 0.o?
It is not working IG..
Reply
#4

I can't see the problem neither :O - what are those timers suppose to do?
Reply
#5

Quote:
Originally Posted by Claude
Посмотреть сообщение
I can't see the problem neither :O - what are those timers suppose to do?
Close them after 10 seconds

pawn Код:
public closeLF()
{
    MoveObject(LF, 1141.79187012, -1206.07446289, 19.88671112, 5.00);
    return 1;
}

public closeLSPD()
{
    MoveObject(LSPD, 1584.90625000, -1637.85046387, 12.69686508, 5.00);
    return 1;
}
Reply
#6

pawn Код:
SetTimer("closeLF", 10000, 0);
pawn Код:
SetTimer("closeLSPD", 10000, 0);
make a variable for them
on top

pawn Код:
new CloseLF;
pawn Код:
new CloseLSPD;
now switch the timers into this

pawn Код:
CloseLF = SetTimer("closeLF", 10000, 0);
pawn Код:
CloseLSPD = SetTimer("closeLSPD", 10000, 0);
pawn Код:
public closeLF()
{
    MoveObject(LF, 1141.79187012, -1206.07446289, 19.88671112, 5.00);
    KillTimer(CloseLF);
    return 1;
}

public closeLSPD()
{
    MoveObject(LSPD, 1584.90625000, -1637.85046387, 12.69686508, 5.00);
    KillTimer(CloseLSPD);
    return 1;
}
im not sure :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)