[FilterScript] Mounted Miniguns for Patriots
#1

Mounted Miniguns for Patriot
(version 1.6b)


- - - - - - - - - - - - - - - - - - -

Introduction

- - - - - - - - - - - - - - - - - - -
Hello everyone, this is my 'Minigun for Patriots' script, which I've been actually working for quite a long time(not sure why :l)
- - - - - - - - - - - - - - - - - - -

Features

- - - - - - - - - - - - - - - - - - -
* (re-)attach and remove the minigun.
* change its gun fire modes(tap(semi-automatic) and burst-fire)
* damage(and destroy) vehicles, kill people.
* abuse-free remove and reattach 'system' (the bullets get saved, so no infinite ammo.)
* supports teamdeath match and stunt servers(for dm servers just uncomment the "if(GetPlayerTeam ....")
- - - - - - - - - - - - - - - - - - -

Bugs

- - - - - - - - - - - - - - - - - - -
Due to server/player lag, the object sometimes doesn't show up, or the burst-fire mode gets bugged, although, I've added a small fix for the burst-fire, but I haven't tested it.
Should avoid burst-fire spam though.
- - - - - - - - - - - - - - - - - - -

"To Be Added" list

- - - - - - - - - - - - - - - - - - -
Special zone(s) where you can refill the Miniguns ammo(It hasn't been implemented yet because I'm not sure where to put it/them)
- - - - - - - - - - - - - - - - - - -

Video & Download links

- - - - - - - - - - - - - - - - - - -
Version 1.6b
https://www.mediafire.com/?mozexovtqlaep22
Version 1.6
https://mega.co.nz/#!tVwjnYhR!I2oxm-...qcsl5ln-G3xgc0 or https://mega.co.nz/#!tVwjnYhR
https://www.mediafire.com/?kno025hnje5w13t
Version 1.5
https://mega.co.nz/#!ZI5RjJQZ or https://mega.co.nz/#!ZI5RjJQZ!MRkHZQ...PTpPiFWDbEXdJc
https://www.mediafire.com/?ofbbv0ulgub1zla

[ame]http://www.youtube.com/watch?v=0InM8OGYKgA[/ame]
- - - - - - - - - - - - - - - - - - -

Stuff you need

- - - - - - - - - - - - - - - - - - -
foreach - By Y_INI, used for loops.
zCMD - by Zeex, TO BE USED for 'refill ammo' command.
- - - - - - - - - - - - - - - - - - -

Changelog

- - - - - - - - - - - - - - - - - - -
VERSION 1.6
Код:
+ Added 4 'weapon factory zones', where you can re-fill the Miniguns ammo;
   * K.A.C.C Military Fuels, (WeaponFactory[3])
   * Area 69, (WeaponFactory[2])
   * Easter Basin Aircraft Carrier, (WeaponFactory[1])
   * Port of Los Santos. (WeaponFactory[0])
+ Added textdraw information for the Weapon Factory zones(if you're in it or not, shows the name too.)
+ Added /refillammo to refill the miniguns ammo(must be in a "Weapon Factory")
* Removed the crashdetect include since it wasn't really needed.
VERSION 1.6B
Код:
* Minor script optimizations & bug-fixes(mainly in the loops)
EDIT: awh, song* is too loud for you to hear the gun shot noise.. well, its similar to the m4.. or the slap noise some servers use
Reply
#2

Looks pretty cool, the video doesn't work tho mind fixing it?
Reply
#3

Quote:
Originally Posted by LeGGGeNNdA
Посмотреть сообщение
Looks pretty cool, the video doesn't work tho mind fixing it?
Uploaded!

Thanks
Reply
#4

Now that I saw the video it seems pretty epic. Good job You've earned yourself some reps.
Reply
#5

EPIC work!
Reply
#6

can not see the video, but I imagine it to be good: 3 good job
Reply
#7

Quote:
Originally Posted by IamPRO
Посмотреть сообщение
EPIC work!
Quote:
Originally Posted by !R1Ch@rD!
Посмотреть сообщение
can not see the video, but I imagine it to be good: 3 good job
Thanks.
Why can't you see the video, and error or? D:
Reply
#8

Is it like aimbot so you don't have to point at people to kill em?
Reply
#9

Quote:
Originally Posted by Jimmy0wns
Посмотреть сообщение
Is it like aimbot so you don't have to point at people to kill em?
Yeah :l
I tried to making it so it rotates to where you look, but I messed many things up then.
EDIT: Well, the 'target' must be in-front of your patriot though.
Reply
#10

Wtf nice.
Reply
#11

Quote:
Originally Posted by momo123
View Post
Wooow Nice Work +rep
Quote:
Originally Posted by Godsmazk
View Post
Wtf nice.
Thanks a lot

Any future version suggestions?
Reply
#12

Good job Dude .
Reply
#13

Quote:
Originally Posted by Kyance
Посмотреть сообщение
Yeah :l
I tried to making it so it rotates to where you look, but I messed many things up then.
EDIT: Well, the 'target' must be in-front of your patriot though.
This would not be hard, you would just have to detect KEY_LOOK_BEHIND KEY_LOOK_LEFT and KEY_LOOK_RIGHT to avoid abuse... Or maybe it should be like the firetrucks water cannon...
Reply
#14

Rather than keys, camera functions would be better. You can get the player's pos and front vector coordinates. Look - https://sampwiki.blast.hk/wiki/GetPlayerCameraFrontVector

Here's a function created by RyDeR`, it sets the object face to the coordinates specified.
Code:
stock SetObjectFaceCoords3D(iObject, Float: fX, Float: fY, Float: fZ, Float: fRollOffset = 0.0, Float: fPitchOffset = 0.0, Float: fYawOffset = 0.0) {
    new
        Float: fOX,
        Float: fOY,
        Float: fOZ,
        Float: fPitch
    ;
    GetObjectPos(iObject, fOX, fOY, fOZ);

    fPitch = floatsqroot(floatpower(fX - fOX, 2.0) + floatpower(fY - fOY, 2.0));
    fPitch = floatabs(atan2(fPitch, fZ - fOZ));

    fZ = atan2(fY - fOY, fX - fOX) - 90.0; // Yaw

    SetObjectRot(iObject, fRollOffset, fPitch + fPitchOffset, fZ + fYawOffset);
}
Reply
#15

Quote:
Originally Posted by Lordzy
View Post
Rather than keys, camera functions would be better. You can get the player's pos and front vector coordinates. Look - https://sampwiki.blast.hk/wiki/GetPlayerCameraFrontVector

Here's a function created by RyDeR`, it sets the object face to the coordinates specified.
Code:
stock SetObjectFaceCoords3D(iObject, Float: fX, Float: fY, Float: fZ, Float: fRollOffset = 0.0, Float: fPitchOffset = 0.0, Float: fYawOffset = 0.0) {
    new
        Float: fOX,
        Float: fOY,
        Float: fOZ,
        Float: fPitch
    ;
    GetObjectPos(iObject, fOX, fOY, fOZ);

    fPitch = floatsqroot(floatpower(fX - fOX, 2.0) + floatpower(fY - fOY, 2.0));
    fPitch = floatabs(atan2(fPitch, fZ - fOZ));

    fZ = atan2(fY - fOY, fX - fOX) - 90.0; // Yaw

    SetObjectRot(iObject, fRollOffset, fPitch + fPitchOffset, fZ + fYawOffset);
}
and you combine that with this
Code:
//untested but here
new Float:VX, Float:VY, Float:A;
GetPlayerCameraFrontVector(playerid, VX, VY, A);
A = atan2(VY, VX) + 270.0;
A is the angle you should face the object on Z param... (PS: very tired, on phone bleh...)
Reply
#16

Quote:
Originally Posted by Crayder
View Post
and you combine that with this
Code:
//untested but here
new Float:VX, Float:VY, Float:A;
GetPlayerCameraFrontVector(playerid, VX, VY, A);
A = atan2(VY, VX) + 270.0;
A is the angle you should face the object on Z param... (PS: very tired, on phone bleh...)
o.o

Yeah, but, then you have to do math stuff( i guess ), so the gun-flare, laser( bullet ) appears in the correct positions & angles. :l

Anyways, version 1.6.
Changelog:
Code:
+ Added 4 'weapon factory zones', where you can re-fill the Miniguns ammo;
   * K.A.C.C Military Fuels, (WeaponFactory[3])
   * Area 69, (WeaponFactory[2])
   * Easter Basin Aircraft Carrier, (WeaponFactory[1])
   * Port of Los Santos. (WeaponFactory[0])
+ Added textdraw information for the Weapon Factory zones(if you're in it or not, shows the name too.)
+ Added /refillammo to refill the miniguns ammo(must be in a "Weapon Factory")
* Removed the crashdetect include since it wasn't really needed.
Links:
https://www.mediafire.com/?kno025hnje5w13t
https://mega.co.nz/#!tVwjnYhR!I2oxm-...qcsl5ln-G3xgc0 or https://mega.co.nz/#!tVwjnYhR
Reply
#17

have many errors that minigun.
must go behind the minigun in non passenger seat.


[ame]www.youtube.com/watch?v=o6nyCQB_yEY[/ame]
Reply
#18

Quote:
Originally Posted by OTACON
View Post
have many errors that minigun.
must go behind the minigun in non passenger seat.


videohere
I didn't understand, what errors.

And It's supposed to work from the passenger seat ..
Reply
#19

Quote:
Originally Posted by Kyance
View Post
o.o

Yeah, but, then you have to do math stuff( i guess ), so the gun-flare, laser( bullet ) appears in the correct positions & angles. :l

Anyways, version 1.6.
Changelog:
Code:
+ Added 4 'weapon factory zones', where you can re-fill the Miniguns ammo;
   * K.A.C.C Military Fuels, (WeaponFactory[3])
   * Area 69, (WeaponFactory[2])
   * Easter Basin Aircraft Carrier, (WeaponFactory[1])
   * Port of Los Santos. (WeaponFactory[0])
+ Added textdraw information for the Weapon Factory zones(if you're in it or not, shows the name too.)
+ Added /refillammo to refill the miniguns ammo(must be in a "Weapon Factory")
* Removed the crashdetect include since it wasn't really needed.
Links:
https://www.mediafire.com/?kno025hnje5w13t
https://mega.co.nz/#!tVwjnYhR!I2oxm-...qcsl5ln-G3xgc0 or https://mega.co.nz/#!tVwjnYhR
Thats why I put the vectors on there, that is where it would go...
Reply
#20

Quote:
Originally Posted by Crayder
View Post
Thats why I put the vectors on there, that is where it would go...
Ooh
Well, will test it out today, thanks


Anyways, Version 1.6b
Changelog:
Code:
* Minor script optimizations & bug-fixes(mainly in the loops)
https://www.mediafire.com/?mozexovtqlaep22
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)