SA-MP Forums Archive
[Include] [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - 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] [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED (/showthread.php?tid=134226)

Pages: 1 2 3


[INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - @TheShadow@ - 15.03.2010

[INC] Spring Guns
currently at version 1.1


What is it ?:
  • You can create mounted Miniguns that shoot everyone in range (except Admins)
  • You can do several things with them (explained below in Functions)
_________________________________________________

Why do i need this?:
  • You can protect Admin Areas with it for example
  • Hey it's sexy :P
  • The noobs are scared of it
_________________________________________________

Functions:

The most important function:
pawn Код:
CreateMinigun(Float:x,Float:y,Float:z,Float:rotation,firerange,damage,bool:activated)
Float:x & Float:y & Float:z    ~> The position of the Minigun
Float:rotation          ~> The facing angle (is changed when somebody is in range of the minigun so it's not that important)
firerange             ~> How near you have to be to make the minigun fire at you
damage              ~> Damage that the Minigun is dealing (every time the timer (default: 500ms) is called you lose that amount of HP)
activated             ~> Is the Minigun turned on or off ( true = Shoots | false = there's just the object, but nothing happens when you are in range)

EXAMPLE: CreateMinigun(2898.921,-2049.009,2.405,0,5,3,true);
This is a activated Minigun with a Range of 5 and it's dealing 3 Damage half a second (when you are using the default timer ) It's located at LS Beach

Some other functions (they are pretty self explaining^^):
pawn Код:
GetMinigunPosition(minigunid,&Float:x,&Float:y,&Float:z) // Come on that's not so difficult to understand^^ Just like GetPlayerPos
IsMinigunActive(minigunid)// Checks if the Minigun is turned on
SetMinigunActive(minigunid, bool:activated) // true (1) turns the minigun on | false (0) turns it off so it shoots at nobody
GetAngleToXY(Float:X, Float:Y, Float:CurrentX, Float:CurrentY, &Float:Angle) // You don't need that, but the script does :P
IsValidMinigun(minigunid) // Checks if the Minigun is created
DestroyMinigun(minigunid) //Destroys the minigun^^
public SaveMinigunDataToLog(minigunid,comment[]) // Watch below for an example (new in v. 1.1)
With this function you can create miniguns and they are saved to the "miniguns.txt" file which gets created in scriptfiles automaticly.
pawn Код:
if (strcmp("/miniguncreate", cmdtext, true, 14) == 0)
    {
    new Float:createx, Float:createy, Float:createz, Float:Rotation;
    GetPlayerPos(playerid,createx,createy,createz);
    GetPlayerFacingAngle(playerid,Rotation);
    SaveMinigunDataToLog(CreateMinigun(createx,createy,createz -1,Rotation,10,4,true),"blub");
     return 1;
    }
The code looks like this in the miniguns.txt:
pawn Код:
CreateMinigun(2921.0871,-2052.1616,2.5480,268.9445,10.0000,4,1);// blub
That's the easiest way to create your Miniguns



_________________________________________________
How to get it working?:
Ok that's quite easy:
  • put #include <a_miniguns> at the beginning of your Script
  • put OnMinigunInit() under OnGamemodeInit() (and add your Miniguns there)
And you are done
_________________________________________________
Huh i don't understand it You got a Video?:
Sure there it is (it's short but just look at the minigun object and my healthbar) :
Click me to come to my ******* Video!
I hope that it's online, cuz ******* sometimes sucks as many of you may know

_________________________________________________
OH NO! D: I can't find the Downloadlinks:
No panic here they are :P
Pastebin: Click me! I AM A LINK <<< Version 1.1 with the FIX !
It's also in the attachment.
Hm don't think you hate pastebin If you want another link, just tell me.
_________________________________________________
What about a Version 2 ?:
I am sure i'll make a version 2, maybe even in a week.
The new features will be:
  • smooth rotation
  • hm maybe a sound, but i don't know one that sounds like a gun ( got a tip ?? )
  • New functions
  • if YOU got any wishes then tell me

Tell me about BUGS please!

Changelog:
  • The 2 Errors are fixed in version 1.1 ! I just forgot one bracket :S
  • I added a new function: SaveMinigunDataToLog







Re: [INC]Spring Guns - Mounted Miniguns - KrypToN_ - 15.03.2010

cool


Re: [INC]Spring Guns - Mounted Miniguns - iron_war_lord - 15.03.2010

Sick!!!!


Re: [INC]Spring Guns - Mounted Miniguns - thiaZ_ - 15.03.2010

haha, nice shadow, well done.


Re: [INC]Spring Guns - Mounted Miniguns - [03]Garsino - 15.03.2010

Looks AWESOME


Re: [INC]Spring Guns - Mounted Miniguns - MrDeath537 - 15.03.2010

Wow, it looks cool, and is cool :P


Re: [INC]Spring Guns - Mounted Miniguns - Finn - 15.03.2010

Those miniguns have auto-aim? So you can't run past them very fast without getting shot?


Re: [INC]Spring Guns - Mounted Miniguns - iron_war_lord - 15.03.2010

Quote:
Originally Posted by Finn
Those miniguns have auto-aim? So you can't run past them very fast without getting shot?
No, speed hacks are not the answer to war, love is...


Re: [INC]Spring Guns - Mounted Miniguns - XRVX - 15.03.2010

great work man
very cool



Re: [INC]Spring Guns - Mounted Miniguns - Hijolion - 16.03.2010

Awesome.


Re: [INC]Spring Guns - Mounted Miniguns - RenisiL - 16.03.2010

Nice include


Re: [INC]Spring Guns - Mounted Miniguns - Lejo - 16.03.2010

This is pretty sweet, bro. I'm definitely going to be using this.


Re: [INC]Spring Guns - Mounted Miniguns - MaykoX - 16.03.2010

Let's play Call Of Duty Modern Warfare 2 SAMP, Verrrryy good work. Useful for TDM and maybe freeroam


Re: [INC]Spring Guns - Mounted Miniguns - Roperr - 16.03.2010

That is awesome!
Tell me: Can you increase the damage it does?
If not I'll just put like 10 of em, and let the party start. DANCE BITCHES DANCE


Re: [INC]Spring Guns - Mounted Miniguns - Tenshi - 16.03.2010

just put it on a FS to test this feature, and this is what i come up with:
Код:
~\include\a_miniguns.inc(62) : error 017: undefined symbol "PlayerToPoint"
~\include\a_miniguns.inc(72) : warning 213: tag mismatch
~\include\a_miniguns.inc(75) : error 017: undefined symbol "GetAngleToXY"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Fixes?



Re: [INC]Spring Guns - Mounted Miniguns - Deat_Itself - 16.03.2010

lol cool


Re: [INC]Spring Guns - Mounted Miniguns - Chivits - 16.03.2010

Quote:
Originally Posted by Tenshi ™
just put it on a FS to test this feature, and this is what i come up with:
Код:
~\include\a_miniguns.inc(62) : error 017: undefined symbol "PlayerToPoint"
~\include\a_miniguns.inc(72) : warning 213: tag mismatch
~\include\a_miniguns.inc(75) : error 017: undefined symbol "GetAngleToXY"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Fixes?
Fixes? І


Re: [INC]Spring Guns - Mounted Miniguns - V1ceC1ty - 16.03.2010

Sweeet, could turn smoother though.


Re: [INC]Spring Guns - Mounted Miniguns - Kurence - 16.03.2010

create invisible eplosion under ground as sound of shooting
Or smallest explosion on it as firing :P



Re: [INC]Spring Guns - Mounted Miniguns - V1ceC1ty - 16.03.2010

Quote:
Originally Posted by Kurence
create invisible eplosion under ground as sound of shooting
Or smallest explosion on it as firing :P
The smallest explosion is still too big.