[FilterScript] [FS] Artillery Filterscript 0.95
#1

Here Im back again. Sorry for those of you waiting for this, but time did not allow me to finnish it earlier. At least I hold my promise of releasing it before Sa-MP 0.3

But here it is, part II of my explosive filterscripts, the Artillery filterscript

1. What is it?
With this FS you are able to place "artillery bases" everywhere on the map. There are several ways to control them, more about this later, and so they are able to fire rockets whereever you want. Sounds easy, but it is completely based on physically rules, so the trajectory of the fired bombs is calculated in a very realistic way.

Check the video topic for a visual impression.

2. How to install?
Now, with Kye's MapAndreas Plugin it ahs become much easier to get the FS running. With Version 0.95 you just have to download and install the MapAndreas plugin, download and compile (maybe mod something) the FS and add both to your server config.
0.93 in the MySQL and no-mysql version will still keep available, but i strongly suggest to use the new one.


3. How to use?
My Bombing FS was hard to install, but easy to use, but here it is the other way round
Controlling the artillery bases might be hard the first time, but if you got all the commands and tricks it is just fun.
In the following ill explain all the commands available, most of them need a base id, this is just an unique id to show which base is meant:

General:
  • /addbase: This adds a base at your current positions. You need to be an admin for this command to prevent abuse
  • /removebase <base id>: Removes the specified base. It is also admin-only.
  • /listbases: new This lists all the bases, you are allowed to see, more about this later.
  • /sscan <base id>: easiest way to aim, you will see the map from above. Move with the directional keys, "fly" up and down with SHIFT and CTRL, use C (duck) to mark and aim the target in the middle of the screen, and use TAB to exit. When marked, the chosen base will aim at your target and is ready for fire.*
  • /check <base id>: Displays the current attributes of the base.
  • /autofire <base id> <radius> <warning time>: new Sets the base in autofire mode, meaning, everyone who isnt allowed to be in the <radius> around the base will be fired at, after the <warning time> (in ms).*
  • /stopautofire <base id>: new Deactivates the autofire mode.
  • /fire <list of base ids>: Most important command. This fires the specified turrets with their current attributes. You may give more than one base id to fire more towers at once (e.g.: /fire 0 1 4)
Manual aiming:
  • /setpower <base id> <power>: This sets the shooting power. The higher it is, the longer and faster the bomb flies.
  • /setrotation <base id> <rotation>: This sets the horizontal rotation of the tower in degree.
  • /setangle <base id> <angle>: Use this to set the vertical angle. "angle" should be between 0 and 90.
  • /setfirecount <base id> <value>: A value between 0 and the max number of bombs allowed. This determines how many bombs get fired on /fire.
  • /setdelay <base id> <delay>: Sets the delay in ms between fires when firecount > 1.
  • /setspread <base id> <spread>: The spread controlls a random generator, to spread off the bombs. The higher it is, the bigger is the possible area, where the bombs get down.
  • /follow <baseid> <playerid>: This is more for fun than for fair play. The tower continous follows the given player, adjusting rotation and power, to hit him when fired.*
  • /stopfollow <baseid>: Stops the given base following.
*: Every autoaim adjusts the rotation and the power of a turret, the angle is not affected, if you change it you will have to re-autoaim.

Thats the main use, there are still some old commands for testing and debugging, I forgot to delete before uploading. Just ignore them or check the source code for use.

4. How to adjust the source to my needs?
As in the Bombing FS, I put great care in the flexibility. At the moment, the code is a bit confusing, but there are some things to adjust easily:
  • All the MYSQL constants: check the bombing topic for info how to change them. (only in the deprecated version)
  • atime: this float specifies the update time for the bomb movement in seconds. If the FS takes too much CPU time, try to put it to higher values.
  • MAX_BOMBS: This constant sets the maximum number of bombs of one base being in air.
  • MAX_BASES: This constant sets the maximum number of bases being added.
  • float:g: the physical gravity factor used for calulations
  • HasPlayerControl: This new function is a great improvement for controlling the FS. It has 4 different "types" for which you can add checks and conditions to determine if a player is allowed to do something with a base. For more info check the comments in the source code.
For other modifies you have to look through the code. There are two predefined bases, one on LV Airport, the other in Area 69, if you dont need them or want to change them, check OnFiliterScriptInit()

5. What else?
At first, I want to thank you for your patience.
Use the FS whereever you like and modify it, but please do not re-release it or a modified version without my permission.
Id call this version a beta, because I tested and corrected a lot of bugs, but there are still a handful, which i could not fix yet, so maybe there will be future releases.
The FS has become quite long, if you need help finding through it, feel free to ask.
I will still try to give support for the 0.93 and the MySQL stuff, but only use it, if you cant use MapAndreas-


6. Special thanks
At this place, I wanna thank some people for their work (just in chronological order, has nothing to do with how "much I thank you" )

Adrenaline-DJ for your MySQL plugin, even if it isnt used anymore in the new version, it was the first and only one I used, and it (almost ) never made problems

Chaser98 for calling my attention to the MapAndreas plugin, and for creating the first version using it (bombing FS)

Kye for the MapAndreas plugin. For me and my scripts it is the most useful plugin released till today. And of course for all your work on SA-mp itself



And of course here are the download links: (0.95 now)
New Pastebin (0.95, 16.1.10)
Ready-to-use AMX+PWN bundle (0.95, upped 16.7.10, if you have problems compiling it) (DOWN, use pastebin)

Pastebin (old 0.93, 27.8.09)
Pastebin (old 0.93, NoMySQL version, 27.8.09)

If you want to, give me some feedback. Bug reports, questions and suggestions of course are welcome too.


Have Fun!
Greets,
Mauzen

EDIT: Added bundle. Ay, exactly 6 months since the last version, time for a new one...
Reply
#2

nice!!!!
Reply
#3

Bien,

Je te souhaite bon courage pour tes autres FS
Dйsolй mais je ne parle pas Anglais:

Sorry, but i dont speak english..
Reply
#4

Quote:
Originally Posted by Huelvox
Sorry, but i dont speak english..
Is this Chinese?
Reply
#5

Quote:
Originally Posted by Huelvox
Bien,

Je te souhaite bon courage pour tes autres FS
Dйsolй mais je ne parle pas Anglais:

Sorry, but i dont speak english..
But you have to speak English in the regular topics. You can use your own language in personal messages. >_>
Reply
#6

Lol,

Je ne parle pas anglais, je suis en 4иme et je ne suit pas l'anglais,
C'est de la merde (( is a shit )) si on dit зa comme зa
maintenant je me casse de ce forum de merde.
Reply
#7

Quote:
Originally Posted by Huelvox
Lol,

Je ne parle pas anglais, je suis en 4иme et je ne suit pas l'anglais,
C'est de la merde (( is a shit )) si on dit зa comme зa
maintenant je me casse de ce forum de merde.
translate.******.com
Reply
#8

why is mysql used? can i use it withouth it?
Reply
#9

Nice work.
Reply
#10

i love you
Reply
#11

Do i have to configure in the script to use mysql?
Reply
#12

Thank you at first, and yes using it without mysql should be no problem, mysql is used to save the coordinates of the ground. But if you have no server configured it should switch to no-mysql mode and use the coordinates of the nearest player instead of this.
Reply
#13

if i complile i get this error

C:\Documents and Settings\Administrator\Bureaublad\artillery.pwn(49 2) : error 001: expected token: ";", but found "-identifier-"
Reply
#14

Quote:
Originally Posted by hipy
if i complile i get this error

C:\Documents and Settings\Administrator\Bureaublad\artillery.pwn(49 2) : error 001: expected token: ";", but found "-identifier-"
Show me your line.
Reply
#15

fixed 491 = without a ;

I created the tables xyz , is there more to do or is this all?
Reply
#16

this doesnt work, i am rcon but when i do /addbase i get command not found etc

it says this line 492(bottom) does not have ; i added it at line 491 no erros then but no commands work
Код:
sp[base][id] = floatsqroot( floatpower(speedo[base][id], 2) - 2 * speedo[base][id] * g * (flighttime[base][id] + 2 * atime) * floatsin(alpha[base][id], degrees) + floatpower(g, 2) * floatpower((flighttime[base][id] + 2 * atime), 2));
	
xo[base][id] = speedo[base][id] * floatcos(alpha[base][id], degrees) * (flighttime[base][id] + 2 * atime);
Reply
#17

Hmm i had no problems compiling it, even without setting the ; my compiler seems just to ignore it
Can you see the base at the airport hangar or in area 69? Maybe some error at startup blocking the fs
Reply
#18

nope i dont see the object either :S
can you upload your verson maby you uploaded something bugged since there is an error:S and it isnt fixed with doin g; at line 491
Reply
#19

Then it seems to be something at the very beginning, probably something with mysql, there is not much before this. What myqsql plugin do you use? Or do you use it without mysql?
Reply
#20

i tried both but do not see a message on loading if mysql or not is used. i tried on unix and windows on blank servers

i took tis out

Код:
//if(nomysql) print("Alternative GetZ-Mode is FORCED");
	//else if(!(samp_mysql_connect(MYSQL_ADDRESS, MYSQL_NAME, MYSQL_PW) == 1) || !(samp_mysql_select_db(MYSQL_DBNAME) == 1)) {
		 //  print("No Database available, using alternative mode...");
so it would automaticly will be a no mysql but doesnt work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)