[Include] [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED
#1

[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




Reply


Messages In This Thread
[INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by @TheShadow@ - 15.03.2010, 20:12
Re: [INC]Spring Guns - Mounted Miniguns - by KrypToN_ - 15.03.2010, 20:17
Re: [INC]Spring Guns - Mounted Miniguns - by iron_war_lord - 15.03.2010, 20:19
Re: [INC]Spring Guns - Mounted Miniguns - by thiaZ_ - 15.03.2010, 20:22
Re: [INC]Spring Guns - Mounted Miniguns - by [03]Garsino - 15.03.2010, 20:36
Re: [INC]Spring Guns - Mounted Miniguns - by MrDeath537 - 15.03.2010, 20:50
Re: [INC]Spring Guns - Mounted Miniguns - by Finn - 15.03.2010, 21:09
Re: [INC]Spring Guns - Mounted Miniguns - by iron_war_lord - 15.03.2010, 21:19
Re: [INC]Spring Guns - Mounted Miniguns - by XRVX - 15.03.2010, 21:28
Re: [INC]Spring Guns - Mounted Miniguns - by Hijolion - 16.03.2010, 01:39
Re: [INC]Spring Guns - Mounted Miniguns - by RenisiL - 16.03.2010, 05:04
Re: [INC]Spring Guns - Mounted Miniguns - by Lejo - 16.03.2010, 05:14
Re: [INC]Spring Guns - Mounted Miniguns - by MaykoX - 16.03.2010, 05:35
Re: [INC]Spring Guns - Mounted Miniguns - by Roperr - 16.03.2010, 06:27
Re: [INC]Spring Guns - Mounted Miniguns - by Tenshi - 16.03.2010, 06:57
Re: [INC]Spring Guns - Mounted Miniguns - by Deat_Itself - 16.03.2010, 08:29
Re: [INC]Spring Guns - Mounted Miniguns - by Chivits - 16.03.2010, 08:30
Re: [INC]Spring Guns - Mounted Miniguns - by V1ceC1ty - 16.03.2010, 09:04
Re: [INC]Spring Guns - Mounted Miniguns - by Kurence - 16.03.2010, 09:08
Re: [INC]Spring Guns - Mounted Miniguns - by V1ceC1ty - 16.03.2010, 09:44
Re: [INC]Spring Guns - Mounted Miniguns - by Lejo - 16.03.2010, 10:57
Re: [INC]Spring Guns - Mounted Miniguns - by Kurence - 16.03.2010, 10:58
Re: [INC]Spring Guns - Mounted Miniguns - by @TheShadow@ - 16.03.2010, 12:42
Re: [INC]Spring Guns - Mounted Miniguns - by biltong - 16.03.2010, 16:30
Re: [INC]Spring Guns - Mounted Miniguns - by @TheShadow@ - 16.03.2010, 16:46
Re: [INC]Spring Guns - Mounted Miniguns - by [KMA]Lord_Deji - 17.03.2010, 14:33
Re: [INC]Spring Guns - Mounted Miniguns - by Thrarod - 17.03.2010, 15:20
Re: [INC]Spring Guns - Mounted Miniguns - by Correlli - 17.03.2010, 15:24
Re: [INC]Spring Guns - Mounted Miniguns - by @TheShadow@ - 17.03.2010, 17:34
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by Chrisspartan - 21.05.2010, 10:31
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by biltong - 07.06.2010, 16:14
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by cuvip - 11.06.2010, 06:46
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by DJDhan - 11.06.2010, 09:10
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by @TheShadow@ - 17.06.2010, 15:06
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by cyber01 - 17.06.2010, 19:38
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by billiout - 30.07.2010, 18:12
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by billiout - 31.07.2010, 07:48
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by Ace_Menace - 31.07.2010, 08:18
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by WillyP - 09.08.2010, 14:20
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by sergio_xd - 09.08.2010, 17:31
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by WillyP - 09.08.2010, 17:32
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by lewismichaelbbc - 13.08.2010, 16:07
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by doodle210 - 02.10.2010, 16:58
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by Basicz - 03.10.2010, 03:55
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by GNGification - 02.03.2011, 19:06
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by Dex007HLH - 02.03.2011, 19:18
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by [ProX]BlueFire - 02.03.2011, 19:41
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by Michael@Belgium - 03.03.2011, 07:47
AW: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by [DR]Reaper[GEARS] - 03.03.2011, 08:10
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by GNGification - 03.03.2011, 11:05
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by [ProX]BlueFire - 03.03.2011, 11:24
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by jordy.kiesebrink - 22.03.2011, 19:01
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by Dutchmen0031 - 22.03.2011, 19:38
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by GangsTa_ - 01.05.2011, 06:54
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by cruising - 04.07.2011, 20:41
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by Ballu Miaa - 22.12.2011, 01:12
Re: [INC]Spring Guns - Mounted Miniguns v. 1.1 - BUGS FIXED - by xRandomGuy - 22.12.2011, 01:19

Forum Jump:


Users browsing this thread: 1 Guest(s)