Bomb help [+rep]
#1

Hi SA-MP Community,

How to do like when a plane drops a bomb, CreateExplosion must be on the ground watever the height is of the plane. What should I do with the z co-ordinate? Is their a function for this?
Reply
#2

Maybe it can help you

https://sampforum.blast.hk/showthread.php?tid=120013
Reply
#3

How to get the co-ordinate of the lowest ground using the above plugin?
I extracted this from the sample FS:
pawn Код:
MapAndreas_FindZ_For2DCoord(X,Y,Z);        
format(msg,128,"Highest ground level: %f",Z);      
CreateExplosion(x, y, %f, 7, 2000.0);
I want to change this to find my lowest z co-ordinate then use it in my CreateExplosion:
pawn Код:
format(msg,128,"Highest ground level: %f",Z);
Help me.
Reply
#4

I do not understand why you need it.
Reply
#5

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
How to get the co-ordinate of the lowest ground using the above plugin?
I extracted this from the sample FS:
pawn Код:
MapAndreas_FindZ_For2DCoord(X,Y,Z);        
format(msg,128,"Highest ground level: %f",Z);      
CreateExplosion(x, y, %f, 7, 2000.0);
I want to change this to find my lowest z co-ordinate then use it in my CreateExplosion:
pawn Код:
format(msg,128,"Highest ground level: %f",Z);
Help me.
It's lol.
pawn Код:
CreateExplosion(x, y, Z, 7, 2000.0);
And Viniborn, you don't need to know why he needs it, you need to help him if you want.
Reply
#6

Help me guyz it didn't work.
Reply
#7

What do you do exactly?
I can't see reason to require the lowest coordinated Z.
Reply
#8

I need lowest Z co-ordiante to create an explosion when a plane drops a bomb from any height. Got it?
Reply
#9

I understand.

pawn Код:
new Float:VBPos[3];
GetVehiclePos(GetPlayerVehicleID(playerid),VBPos[0],VBPos[1],VBPos[2]);
MapAndreas_FindZ_For2DCoord(VBPos[0], VBPos[1], VBPos[2]);
CreateExplosion(VBPos[0], VBPos[1], VBPos[2], 7, 2000.0);
Reply
#10

Error:
pawn Код:
error 076: syntax error in the expression, or invalid function call
Here:
pawn Код:
GetVehiclePos(GetVehiclePos,VBPos[0],VBPos[1],VBPos[2]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)