Script is not working? - 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: Script is not working? (
/showthread.php?tid=370654)
Script is not working? -
ValentinLaw - 20.08.2012
PHP код:
forward bomb(playerid, vehicleid);
Under OnGameModeInit
PHP код:
SetTimer("bomb", 5000, false);
And I got this code:
PHP код:
public bomb(playerid, vehicleid)
{
if(IsPlayerInRangeOfPoint(playerid,700,-1952.4735,661.1452,118.8698))
{
new Float:x, Float:y, Float:z;
GetVehiclePos(vehicleid, x, y, z);
CreateExplosion(x, y, z, 12, 10.0);
}
return 1;
}
I can compile it very well.
Re: Script is not working? -
Kirollos - 20.08.2012
my question, in what callback you write
pawn Код:
SetTimer("bomb", 5000, false);
?
Re: Script is not working? -
Stigg - 20.08.2012
Try reading up on timers:
https://sampwiki.blast.hk/wiki/SetTimer
Re: Script is not working? -
ValentinLaw - 20.08.2012
Ah, I see..
Yet I set it now on TRUE but it's not working...
Re: Script is not working? -
Kirollos - 21.08.2012
Quote:
Originally Posted by ValentinLaw
Ah, I see..
Yet I set it now on TRUE but it's not working...
|
you didnt answer my question.
where did you put the SetTimer ?
Re: Script is not working? -
ValentinLaw - 21.08.2012
Quote:
Originally Posted by kirollos
you didnt answer my question.
where did you put the SetTimer ?
|
OnGameModeInit