OnPlayerClickMap problem
#1

Код:
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.
Reply
#2

As your explosion type is 0, try changing it.
https://sampwiki.blast.hk/wiki/CreateExplosion

Click on types and select which suits you.
Reply
#3

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.
Reply
#4

The Z coord of OnPlayerClickMap is not accurate.
https://sampwiki.blast.hk/wiki/OnPlayerClickMap
Use map andreas plugin.
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)