SA-MP Forums Archive
[Include] [0.3c] Vehicle Missiles - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] [0.3c] Vehicle Missiles (/showthread.php?tid=229111)

Pages: 1 2 3


[0.3c] Vehicle Missiles - Small update - Backwardsman97 - 21.02.2011

[0.3c] Vehicle Missiles

Info:
This is a pretty simple include that allows you to add two missiles to a vehicle. After I put up a video of this, people seemed to like it and wanted the code so here you go.

Functions: Callbacks: Media:

Offsets: 1.1, -0.2


Offsets: 1, -0.2


Offsets: 1.2, 0.1




[ame]http://www.youtube.com/watch?v=TwDCXVj1_WQ[/ame]

Instructions:
For this include to work, you must add the following to your script.

Top of your script.
pawn Код:
#include <VM>
Under OnPlayerKeyStateChange:
pawn Код:
VM_OnPlayerKeyStateChange(playerid,newkeys);
Somewhere not in a function.
pawn Код:
public VM_OnVehicleFire(vehicleid,slot)
{
    return 1;
}
Download:
Pastebin(Copy and paste into VM.inc)

Notes:

You can change certain things about the include with the defines. Just open VM.inc and edit the following lines.
pawn Код:
#define MISSILE_DETONATE_TIME 500   //milliseconds
#define MISSILE_EXPLODE_TYPE 10
#define MISSILE_EXPLODE_RADIUS 10.0
#define MISSILE_SPEED 40.0
#define MISSILE_FIRE_KEY 1
You may also want to call the RemoveVehicleMissiles function whenever you destroy a vehicle.

Have fun.

UPDATE: There was a bug. Updated as of 9/26/2011. Thanks for pointing that out Pablo Borsellino. Also, here's an example script. http://pastebin.com/AJN5qGUJ


Respuesta: [0.3c] Vehicle Missiles - anonymousx - 21.02.2011

Pretty nice, I' ll use it.


Re: [0.3c] Vehicle Missiles - Master_Gangster - 21.02.2011

pretty advanced and cool. I might use it as well (: good job.


Re: [0.3c] Vehicle Missiles - barneystinson - 21.02.2011

Hmm maybe cos its late and im so tired but all i get is -

warning 202: number of arguments does not match definition

guess i will try another time when im not so tired


Re: [0.3c] Vehicle Missiles - Backwardsman97 - 21.02.2011

You have to give an x and z offset when using AddVehicleMissiles.


Re: [0.3c] Vehicle Missiles - barneystinson - 21.02.2011

I used the one shown in your pic above 1,-0.2


Re: [0.3c] Vehicle Missiles - Karlip - 21.02.2011

Nice job.

Using the particle was quite clever too.


Re: [0.3c] Vehicle Missiles - Unknown123 - 21.02.2011

Код:
C:\Users\Unknown\Documents\Server\pawno\include\vehiclemissiles.inc(125) : error 004: function "VM_OnVehicleFire" is not implemented
C:\Users\Unknown\Documents\Server\pawno\include\vehiclemissiles.inc(151) : error 004: function "VM_OnVehicleFire" is not implemented
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: [0.3c] Vehicle Missiles - Zh3r0 - 21.02.2011

Quote:
Originally Posted by Unknown123
Посмотреть сообщение
Код:
C:\Users\Unknown\Documents\Server\pawno\include\vehiclemissiles.inc(125) : error 004: function "VM_OnVehicleFire" is not implemented
C:\Users\Unknown\Documents\Server\pawno\include\vehiclemissiles.inc(151) : error 004: function "VM_OnVehicleFire" is not implemented
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Add the public somewhere into your gamemode/filterscript whatever.


Good job backwardsman! I saw this on the videos secshun, loved it


Re: [0.3c] Vehicle Missiles - Infamous - 21.02.2011

That's awesome, I'm gonna give this a test.


Re: [0.3c] Vehicle Missiles - Luis- - 21.02.2011

Haha, Looks cool.


Respuesta: [0.3c] Vehicle Missiles - Code8976Man - 21.02.2011

Thats fucking cool!!


Re: [0.3c] Vehicle Missiles - Michael@Belgium - 21.02.2011

Whoah NICEEEE!!


Re: [0.3c] Vehicle Missiles - wups - 21.02.2011

I like the tuning sound!


Re: [0.3c] Vehicle Missiles - Backwardsman97 - 21.02.2011

There actually was an error in the include. I've fixed it and updated it now.


Re: [0.3c] Vehicle Missiles - Raven_Silkwood - 21.02.2011

That looks quite good! I'll try it out later.


Re: [0.3c] Vehicle Missiles - daroczif - 22.02.2011

What is the command?Because I do not work!How will the car of the weapon?Please write more about the use of.


Re: [0.3c] Vehicle Missiles - Stigg - 22.02.2011

Thats a proper riot that m8, great fun.

Peace...


Re: [0.3c] Vehicle Missiles - Floul1 - 22.02.2011

I've got 2 errors within the include
Код:
C:\Users\Owen\Desktop\samp03\pawno\include\vm.inc(57) : error 001: expected token: ",", but found "]"
C:\Users\Owen\Desktop\samp03\pawno\include\vm.inc(57) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Any Help?


Re: [0.3c] Vehicle Missiles - Tomboeg - 22.02.2011

Awesome!!