18.01.2018, 21:59
I followed this tutorial on how to make a airdrop system but the airdrop goes through the ground i dont know why but could someone help me please.
PHP код:
CreateAirdrop(Float:x, Float:y)
{
for(new i; i < MAX_AIRDROPS; i++)
{
if(! gAirdrop[i][AIRDROP_EXIST])
{
new Float:z;
MapAndreas_FindZ_For2DCoord(x, y, z);
z += (6.4653 + 1.0000);
gAirdrop[i][AIRDROP_OBJECT] = CreateDynamicObject(18849, x, y, (z + 100.0), 0.0, 0.0, 0.0);
MoveDynamicObject(gAirdrop[i][AIRDROP_OBJECT], x, y, z, 5.0);
gAirdrop[i][AIRDROP_POS][0] = x;
gAirdrop[i][AIRDROP_POS][1] = y;
gAirdrop[i][AIRDROP_POS][2] = (z - (6.4653 + 1.0000));
gAirdrop[i][AIRDROP_EXIST] = true;
gAirdrop[i][AIRDROP_EXPIRE] = -1;
gAirdrop[i][AIRDROP_PICKED] = true;
return i;
}
}
return -1;
}