OnPlayerClickMap problem - 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: OnPlayerClickMap problem (
/showthread.php?tid=497084)
OnPlayerClickMap problem -
Garr - 25.02.2014
Код:
forward OnPlayerClickMap();
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
SendClientMessage(playerid, -1, "Mortar strike set for go, starting in 5 second!");
SetTimerEx("mortar", 5000, false, "if", playerid, fX, fY, fZ);
return 1;
}
forward mortar(playerid, fX, fY, fZ);
public mortar(playerid, fX, fY, fZ)
{
CreateExplosion(Float:fX, Float:fY, Float:fZ, 0, 10.0);
return 1;
}
Okay, so I'm essentially making a script so that when a player makes a waypoint, the place will explode 5 seconds later, when I do this I'm unable to see the explosion happen but I can hear it.
Re: OnPlayerClickMap problem -
Avi Raj - 25.02.2014
As your explosion type is 0, try changing it.
https://sampwiki.blast.hk/wiki/CreateExplosion
Click on types and select which suits you.
Re: OnPlayerClickMap problem -
Garr - 25.02.2014
I've tried it with a bunch of explosions, I can hear them but I can't see. I also tried elevating the Z at the thought that the explosion might be under the ground but I can only hear it.
Re: OnPlayerClickMap problem -
newbienoob - 25.02.2014
The Z coord of OnPlayerClickMap is not accurate.
https://sampwiki.blast.hk/wiki/OnPlayerClickMap
Use map andreas plugin.
Re: OnPlayerClickMap problem -
MP2 - 25.02.2014
Change "if" to "ifff" in SetTimerEx. You're passing on integer (playerid) and 3 floats (xyz).
As said though, the z height is very inaccurate - use MapAndreas.