automatic pickup gates
#1

Why this gate code sorta lag. If i enter icon... and then re-enter it after gates are closed.. the gates starts to move... but in middle stops and fast goes back. It works perfect only 1 time. Then like i said.. move till middle of opening and fast goes back.
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == openjgin)
    {
    SetTimerEx("openjgintimer", 5000, true, "i", playerid);
   SendClientMessage(playerid,COLOR_GOLD,"You have 5 seconds to get out!");
    MoveStreamObject(jailgate,-345.25119018555, 1741.0574951172, 41.6875,3); // Opening gates
    
    }
    return 1;
}

forward openjgintimer(playerid);
public openjgintimer(playerid)
{
     if(IsPlayerConnected(playerid))
     {
     MoveStreamObject(jailgate,-344.23748779297, 1732.3273925781, 41.6875,1); // Closing gates
     }
     return 1;
}
Reply
#2

pawn Код:
SetTimerEx("openjgintimer", 5000, true, "i", playerid);
You're repeating the timer, or kill the timer, or change "true" to "false"
Reply
#3

thanks, changing to 'false' worked out!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)