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.0, playerid,1144.5514, 1367.7786, 10.4297)) {
MoveDynamicObject(gatebogati, 1123.5787, 1363.2389, 12.5108, 1.5);
SetTimer("gatebogaticlose", 5000, false);
return 1;
}
}
PHP код:
function gatebogaticlose() return MoveObject(gatebogati, 1133.5387, 1363.2389, 12.5108, 1.5);
Re: timer doesnt work -
KieranDyer - 25.08.2018
Hi Pepsi,
Give this a try.
PHP код:
forward gatebogaticlose();
public gatebogaticlose() return MoveObject(gatebogati, 1133.5387, 1363.2389, 12.5108, 1.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 Move
DynamicObject
PHP код:
function gatebogaticlose() return MoveDynamicObject(gatebogati, 1133.5387, 1363.2389, 12.5108, 1.5);