21.02.2011, 02:22
(
Последний раз редактировалось Backwardsman97; 26.09.2011 в 18:54.
)
[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:
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.
Under OnPlayerKeyStateChange:
Somewhere not in a function.
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.
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
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:
- native IsVehicleHot(vehicleid)
- native AddVehicleMissiles(vehicleid,Floatffsetx,Float ffsetz)
- native RemoveVehicleMissiles(vehicleid)
- VM_OnVehicleFire(vehicleid,slot)
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>
pawn Код:
VM_OnPlayerKeyStateChange(playerid,newkeys);
pawn Код:
public VM_OnVehicleFire(vehicleid,slot)
{
return 1;
}
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
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