SA-MP Forums Archive
how can i make an rustler shoot likes an hydra and drop bombs? - 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: how can i make an rustler shoot likes an hydra and drop bombs? (/showthread.php?tid=339455)



how can i make an rustler shoot likes an hydra and drop bombs? - speediekiller2 - 03.05.2012

hello,

how can i make an rustler shoot likes an hydra and drop bombs using the mapandreas plugin??

thnx for helping,
speediekiller2


Re: how can i make an rustler shoot likes an hydra and drop bombs? - Accord - 03.05.2012

Can you explain yourself sir?


Re: how can i make an rustler shoot likes an hydra and drop bombs? - speediekiller2 - 03.05.2012

uhm yes i want te get my ruster (airplane) shoots likes an hydra with the rockets,
and i want that the rustler can drop some bombs an that the bomb hits the ground that they explode

greetingz speediekiller2


Re: how can i make an rustler shoot likes an hydra and drop bombs? - MadeMan - 03.05.2012

1) when player presses the shoot key (OnPlayerKeyStateChange) use CreateObject and MoveObject to create and move a bomb towards ground (use MapAndreas to get the Z coord)

2) when object has stopped moving (OnObjectMoved) destroy the object (DestroyObject) and create explosion (CreateExplosion)


Re: how can i make an rustler shoot likes an hydra and drop bombs? - speediekiller2 - 03.05.2012

thnx for helping


Re: how can i make an rustler shoot likes an hydra and drop bombs? - speediekiller2 - 03.05.2012

eeuhm but how can i got to explode the bomb when it hits the ground pls a quick tutorial


Re: how can i make an rustler shoot likes an hydra and drop bombs? - Marricio - 03.05.2012

pawn Code:
new Float:x, Float:y, Float:z;
GetPlayerPos( playerid, x, y, z );
z = 0.0;
GetPointZPos( x, y, z );
MoveObject(/*objectid*/, x, y, z, 2.0 );

//....
//public OnObjectMoved( objectid )
new Float:x, Float:y, Float:z;
GetObjectPos( objectid, x, y, z );
CreateExplosion( x, y, z, 4, 40 );
DestroyObject( objectid );
Just a quick one, not tested, maybe?


Re: how can i make an rustler shoot likes an hydra and drop bombs? - Faisal_khan - 03.05.2012

LOL my post first after his even though it is not visible! Did any admins remove it?
NVM,
Yeah you can make it using MapAndreas Plugin but I prefer to make it using an include with the same function I saw it last week but forgot it's name. You can try my FS it is in my Signature named Bomber Plane. WISH YOU LUCK.


Re: how can i make an rustler shoot likes an hydra and drop bombs? - Mauzen - 03.05.2012

I got an unfinished include for that job. Im gonna take a look at it to see if its worth finishing.


Re: how can i make an rustler shoot likes an hydra and drop bombs? - speediekiller2 - 03.05.2012

alright thnx for your help