10.09.2014, 20:55
The subject is quite explanatory itself. I'd like to know how I could detect a collision with the ground. Disregard any poor code optimization or errors, it's still a work in progress.
pawn Код:
new obj;
new Float:fXpos,
Float:fYpos,
Float:fZpos;
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
fX = fXpos;
fY = fYpos;
fZ = fZpos;
obj = CreateDynamicObject(3786, fX, fY, fZ + 50.0, 0.0, 0.0, 0.0, 100);
SendClientMessage(playerid, -1, "Information: You have called air support. The bomb will be dropped at:");
new str[129];
format(str, sizeof(str), "X: %f\nY: %f\n Z: %f", fXpos, fYpos, fZpos);
SendClientMessage(playerid, -1, str);
SetTimerEx("OBJ_CRASH", 4000, true, "i", playerid);
return 1;
}
public OBJ_CRASH(playerid);
public OBJ_CRASH(playerid)
{
SetObjectPos(obj, fXpos, fYpos, fZpos - 5.0);
return 1;
}