[FilterScript] Minigun on tanks
#1

What this does, is it puts a MINIGUN onto your tank and you can shoot it by holding the handbrake key (default = space). You can also kill someone with it!

How to install?
First, open up the script and edit the MAX_PLAYERS definition to your slots, if you have more than 5 tanks in your server also change the MAX_MINIGUNS define, and then find this part in the filterscript:

pawn Код:
public OnPlayerDeath( playerid, killerid, reason ) {
    // Paste your OnPlayerDeath here!
    return 1;
}
Paste your OnPlayerDeath in there so it can get called when you kill someone with the minigun, calls with CallLocalFunction.

Screenshots/videos?
Of course:


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

Download:
Pastebin!

Worktime: ~4 hours.

Feel free to edit!

Credits:
Mean for most of the stuff,
decondelite because he has some M4's on some cars in his server, but not tanks, so I wanted to make it for tanks... So basically for the idea,
****** for GetXYInFrontOfPlayer.

EDIT:
Small bug found!
Replace:
pawn Код:
new Float:hp;
GetPlayerHealth( u, hp );
SetPlayerHealth( u, hp - 5 );
PlayerPlaySound( u, 1135, 0.0, 0.0, 0.0 );
if( hp < 1 )
    CallLocalFunction( "OnPlayerDeath", "ddd", u, i, 38 );
with:
pawn Код:
new
    Float:hp
    ,Float:hp2
;
GetPlayerHealth( u, hp );
SetPlayerHealth( u, hp - 5 );
GetPlayerHealth( u, hp2 );
PlayerPlaySound( u, 1135, 0.0, 0.0, 0.0 );
if( hp2 < 1 )
    CallLocalFunction( "OnPlayerDeath", "ddd", u, i, 38 );
If you don't do this, OnPlayerDeath won't get called properly.
Reply
#2

Wow nice. 1st!

Testing now
Reply
#3

Looks good !
Reply
#4

Thanks. By the way: you can remove the a_npc include because I needed it for something and I removed that part, forgot to remove the include.
Reply
#5

Does it really have that firing effect?
Reply
#6

Yes, you may try it. It's a particle.
Reply
#7

Good release Mean. =)

Whoever does a positive reply will like decondelite's works too
Reply
#8

Thanks, that's true.
Reply
#9

OO euh gonna try it this is awйsome
Reply
#10

Can you make a video?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)