15.03.2010, 20:12 
	
	
	[INC] Spring Guns
currently at version 1.1
What is it ?:
Why do i need this?:
Functions:
The most important function: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:
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)
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;
}
pawn Код:
CreateMinigun(2921.0871,-2052.1616,2.5480,268.9445,10.0000,4,1);// blub

_________________________________________________
How to get it working?:
Ok that's quite easy:
_________________________________________________
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 !
 <<< 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.
 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:
Tell me about BUGS please!
Changelog:
Ok that's quite easy:
- put #include <a_miniguns> at the beginning of your Script
- put OnMinigunInit() under OnGamemodeInit() (and add your Miniguns there)

_________________________________________________
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 !
 <<< 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.
 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





 
	






