Hood Life Roleplay
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Welcome to Hood Life Roleplay.
 
HomeSearchLatest imagesRegisterLog in

 

 Suggestuin fir damians faction

Go down 
+4
omar ahmed
Damian
Ipone
Daoud_Sogoba
8 posters
AuthorMessage
Daoud_Sogoba




Posts : 30
Join date : 2010-04-04

Suggestuin fir damians faction Empty
PostSubject: Suggestuin fir damians faction   Suggestuin fir damians faction EmptyFri Apr 16, 2010 9:20 pm

http://forum.sa-mp.com/index.php?topic=140857.0
video at the webpage
you should put these around your base and have it shoot down unathourized aircarft/vehicle
This is my first release.

What is it?

This include is a dynamic system of Surface-to-Air-Missile batteries. Better known the Anti-Air guns at Area 69. With this include you can place one of these systems ANYWHERE around San Andreas.

How does it work?

The system is built with two timers that update the SAM's and the missiles. When you trigger the SAM site it will fire what looks to be a missile, which is actually a hydra flare. The missile travels at selected speed and once it gets close to you it triggers 3 explosions and destroys your plane/helicopter. The system works on ALL aircraft, civilian and military.



SA:MP Surface to Air Missiles by Awaran[Enemy_Plus] 0.1.2 DQ | by Aeva


How to install?

Place the file "SAMsites##.inc" into your "pawno/include/" folder in your SA:MP Server directory.

To install into the GameMode place this at the top of your script under "#include <a_samp>"


PAWN Code:
#include <SAMsites##>## = version

So you do not get these four errors:


PAWN Code:
pawno\include\SAMsites0.4.inc(**) : error 004: function "OnSamSiteUpdate" is not implemented
pawno\include\SAMsites0.4.inc(**) : error 004: function "OnSamSiteUpdate" is not implemented
pawno\include\SAMsites0.4.inc(**) : error 004: function "OnSamSiteRestarted" is not implemented
pawno\include\SAMsites0.4.inc(**) : error 004: function "OnSamSiteRestarted" is not implemented

add this into your script:


PAWN Code:
public OnSamSiteRestarted()
{
return 1;
}

public OnSamSiteUpdate(samid, playerid)
{
return 1;
}

Place this into your OnGameModeInit()


PAWN Code:
SAM_start();WARNING: Make sure this function goes UNDER all your SAM Site creating functions

How to add SAM Sites?

There are 4 ways to create SAM Sites, which are the following:


PAWN Code:
native AddStaticSAM(samid,Float:X, Float:Y, Float:Z);
native AddStaticSAMEx(samid, Float:X, Float:Y, Float:Z, srange, sspeed);
native CreateSAM(samid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ); // BUGGED
native CreateSAMEx(samid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, srange, sspeed); // BUGGED

AddStaticSAM(Ex) is for creating a SAM Site system over an existing SAM Site object.
CreateSAM(Ex) is for creating a SAM Site System and SAM Site object.

You can choose the range and missile speeds for each SAM Site you create. This is done by using AddStaticSAMEx and CreateSAMEx.

For speed, anything lower than 60 will just be really slow, and you have to travel really slow for it to catch you. (Not for hydra)

You need to return the SAM with a variable. The system will return an ID but you can use your variable as reference.

By default you only have 20 SAM sites. You can change this by seeking the SAMsites##.inc file.

Find System Config and change


PAWN Code:
#define MAX_SAMS 32
to what ever it is you want. I suggest not going for an extreme number.

Team Compatibility:

WARNING: As of v0.3 the default team compatibility has been removed, see below.

The new callback "OnSamSiteUpdate" allows for you to cancel a SAM from firing. This can now host any team script like gTeam.

Example:

PAWN Code:
public OnSamSiteUpdate(samid, playerid)
{
if(samid == 1)
{
if(gTeam[playerid] == TEAM_ARMY)
{
SAM_cancel(samid);
}
}
return 1;
}

How to return SAMS with variables?

The system does support variable returned samid's.

Create a new variable at the top of your script and add the variable's name followed by a '=' before any of your SAM Site creation functions.

SAM Site Labels

Now it is possible to add 3D Text labels to your SAM Sites through the script, basically no work at all.

Simply add under SAM_start(); in OnGameModeInit()


PAWN Code:
CreateSamLabel(samid, label[], color, Float:DrawDistance, LOS);
Area 69 SAM locations:


PAWN Code:
AddStaticSAM(237.5797,1698.6908,23.8673);
AddStaticSAM(15.3281,1720.9646,23.8673);
AddStaticSAM(188.2694,2083.4644,23.9063);
AddStaticSAM(354.5453,2030.3062,23.8750);

Dead Sam Bug

In v0.4 there is an attempt to fix the SAMS from dying after a while. You have a define called RESTART_INTERVAL.

Change this to your desired time in milliseconds for the sams to restart. This timer will call a callback, also resetting all SAMSite information to 0 and all IDs to INVALID_SAM_ID.

The callback is used by getting everything (excluding SamLabel functions) you used with the SAMSites include that create SAMsites and place this inside this callback. Then at the bottom place SAM_start(); if not there already.

Example:


PAWN Code:
public OnGameModeInit()
{
AddStaticSAM(237.5797,1698.6908,23.8673);
AddStaticSAM(15.3281,1720.9646,23.8673);
AddStaticSAM(188.2694,2083.4644,23.9063);
AddStaticSAM(354.5453,2030.3062,23.8750);
SAM_start();
return 1;
}

public OnSamSiteRestarted()
{
AddStaticSAM(237.5797,1698.6908,23.8673);
AddStaticSAM(15.3281,1720.9646,23.8673);
AddStaticSAM(188.2694,2083.4644,23.9063);
AddStaticSAM(354.5453,2030.3062,23.8750);
SAM_start();
return 1;
}


Download:
(Older versions removed)

SA:MP SAMSites0.4.inc - See Attachments


Code: (Changelog)
0.1
- First Release
0.1.1
- Now doesn't fire missiles after you are dead from the first missile
- Now there is a "Drag" feature, if the missile is alive for more than 25 seconds, it will blow up.
0.1.2
- Now the missiles DO NOT stay at the place where the detonated.
---
0.2
- Added new functions.
- Added SAM Sites based on Team.
- Added ability to set custom Range and Speed of missiles per samid.
- Added functions that create a SAM Site object - Level to the ground.
---
0.3 BETA
- Added callback OnSamSiteUpdate
- Attempted to fix the missile chase id (should chase correct vehicle)
- Removed default team script
- Added new function
- Removed a function
0.3.1
- Variables cannot be samid's
- Fixed the Array error
- Fixed the Callback
0.3.2
- Variables can now be used as reference to the samid
- Fixed the tracking of missiles, missiles now SHOULD chase the right vehicle
- Added a restart timer, this restarts the SAMS system in attempt to stop a bug
- Added Sam Labels
0.3.3
- Fixed the buged SAMS at 0.0,0.0,0.0 - Credit to rs2fun111 for finding this bug
0.4
- Added new callback OnSamSiteRestarted
- Attempted fix of "Dead Sam Bug"
- Added 'under the radar' checking
- Updated the Default limit to SPEED and MAX_SAMS


Code: (Bugs)
- Sam Sites stop working after a period of time (Since 0.1)

Credits:

If you can add credits to me for this, and not re-release it under your own name it would be appreciated.


Please post any bugs that you may encounter. I unfortunately can't guarantee a fully bug-free script with this first release. None have been found so far.

Thank-you to Μαστερμινδ, lrZ^ aka LarzI and [HiC]TheKiller who helped with an array error.
Back to top Go down
Ipone

Ipone


Posts : 42
Join date : 2010-04-03
Age : 30
Location : Downtown, LS

Suggestuin fir damians faction Empty
PostSubject: Re: Suggestuin fir damians faction   Suggestuin fir damians faction EmptyFri Apr 16, 2010 9:39 pm

/support. This is gonna be like duck hunting lol Razz
Back to top Go down
Damian

Damian


Posts : 71
Join date : 2010-04-02
Age : 31
Location : Iceland

Suggestuin fir damians faction Empty
PostSubject: Re: Suggestuin fir damians faction   Suggestuin fir damians faction EmptyFri Apr 16, 2010 9:42 pm

It is nice but i am not the Army the army is out and my HQ is inside in the middle of los santos so that would be trouble with the cars and shit
Back to top Go down
https://hood-life-roleplay.rpg-board.net/
omar ahmed

omar ahmed


Posts : 159
Join date : 2010-04-03
Age : 31
Location : Egypt

Suggestuin fir damians faction Empty
PostSubject: Re: Suggestuin fir damians faction   Suggestuin fir damians faction EmptySat Apr 17, 2010 12:36 am

It would have been good if there was army but there is not.
Back to top Go down
Donnie Mariano

Donnie Mariano


Posts : 28
Join date : 2010-04-10

Suggestuin fir damians faction Empty
PostSubject: Re: Suggestuin fir damians faction   Suggestuin fir damians faction EmptySat Apr 17, 2010 1:00 pm

I think we don't need an army,i mean there are no terrists and driving with a Tank trought LS would be dumb
Back to top Go down
Abelino Maximiliano

Abelino Maximiliano


Posts : 77
Join date : 2010-04-07
Age : 30

Suggestuin fir damians faction Empty
PostSubject: Re: Suggestuin fir damians faction   Suggestuin fir damians faction EmptySat Apr 17, 2010 1:05 pm

Donnie Mariano wrote:
I think we don't need an army,i mean there are no terrists and driving with a Tank trought LS would be dumb

Yea I agree with this , I guess no need to the army,,
Back to top Go down
Yass




Posts : 11
Join date : 2010-04-17
Age : 29
Location : Australia.

Suggestuin fir damians faction Empty
PostSubject: Re: Suggestuin fir damians faction   Suggestuin fir damians faction EmptySun Apr 18, 2010 1:00 pm

Nosupport. Just not needed, I don't see the FBI running around with Rocket Propelled Grenades, let alone this.
Back to top Go down
Bishop




Posts : 14
Join date : 2010-04-03

Suggestuin fir damians faction Empty
PostSubject: Re: Suggestuin fir damians faction   Suggestuin fir damians faction EmptySun Apr 18, 2010 11:50 pm

IRL:

**Light turns red**
/me watches a tank cross in front of him digging about a foot into the pavement with its' tracks.
/me sees the tank take out a bunch of traffic lights as it passes and watches it start a "monster truck rally" by crushing 15 cars down the street.
**Light turns green**
/me drives into the tracks, bottoms out, and continues driving normally.
Back to top Go down
Sponsored content





Suggestuin fir damians faction Empty
PostSubject: Re: Suggestuin fir damians faction   Suggestuin fir damians faction Empty

Back to top Go down
 
Suggestuin fir damians faction
Back to top 
Page 1 of 1
 Similar topics
-
» LSPD Faction Requests
» About payment Suggestions!(Heads up faction leaders)

Permissions in this forum:You cannot reply to topics in this forum
Hood Life Roleplay :: Out-of-Character (OOC) :: Suggestions-
Jump to: