SA-MP Forums Archive
timer doesnt work - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: timer doesnt work (/showthread.php?tid=658166)



timer doesnt work - PepsiCola23 - 25.08.2018

the gate opens,doesnt close.

PHP код:
        if(PlayerInfo[playerid][pMember] == 5) { // porti
            
if(PlayerToPoint(10.0playerid,1144.55141367.778610.4297)) {
                
MoveDynamicObject(gatebogati1123.57871363.238912.51081.5);
                
SetTimer("gatebogaticlose"5000false);
                return 
1;
            }
        } 
PHP код:
function gatebogaticlose() return MoveObject(gatebogati1133.53871363.238912.51081.5); 



Re: timer doesnt work - KieranDyer - 25.08.2018

Hi Pepsi,

Give this a try.

PHP код:
forward gatebogaticlose();
public 
gatebogaticlose() return MoveObject(gatebogati1133.53871363.238912.51081.5); 



Re: timer doesnt work - PepsiCola23 - 25.08.2018

thats how function is defined...


Re: timer doesnt work - UFF - 25.08.2018

Код:
 
forward gatebogaticlose(); 
public gatebogaticlose() 
{
  MoveDynamicObject(gatebogati, 1133.5387, 1363.2389, 12.5108, 1.5);  
  return true;
}



Re: timer doesnt work - KDyer - 25.08.2018

wasn't aware function is defined as forward and public. wanted to make sure that you wasn't trying to do it on a stock or plain type.


Re: timer doesnt work - Shinja - 25.08.2018

You must use MoveDynamicObject
PHP код:
function gatebogaticlose() return MoveDynamicObject(gatebogati1133.53871363.238912.51081.5);