[FilterScript] [FS] Bombing Filterscript V0.95
#21

Quote:
Originally Posted by Mauzen
Atm it isnt possible without Mysql, sorry. Its the only way to detect where the ground is. Maybe ill do a Sqlite version after this, but its very slow and could cause lag on bg servers.
But it isnt very difficult to get it running with mysql, the only problem is that your server needs to support it
I have something like this, but not as advanced as what you're doing. With mine it scans 20m around the pilot and if there are any players in that radius, it creates an explosion drectly under the plane...but using the Z value of the player closest to the plane. If nobody is around it just say "Invalid Target" when you press fire.

In other words it IS possible to do without a DB...but its not at all realistic like a regular bomber.
Reply
#22

I'm sorta lost. What exactly is MySQL? Why do you need it to do such a thing?

I already read this
http://forum.sa-mp.com/index.php?topic=23931.0

And this
http://lostgangwarz.free.fr/samp_mysql_en.php
Reply
#23


Quote:
Originally Posted by kaisersouse
Quote:
Originally Posted by Mauzen
Atm it isnt possible without Mysql, sorry. Its the only way to detect where the ground is. Maybe ill do a Sqlite version after this, but its very slow and could cause lag on bg servers.
But it isnt very difficult to get it running with mysql, the only problem is that your server needs to support it
I have something like this, but not as advanced as what you're doing. With mine it scans 20m around the pilot and if there are any players in that radius, it creates an explosion drectly under the plane...but using the Z value of the player closest to the plane. If nobody is around it just say "Invalid Target" when you press fire.

In other words it IS possible to do without a DB...but its not at all realistic like a regular bomber.
Sounds nice. I thought about how to do it, but i did not have such an idea, in only thought about mapping all the ground.

So i have to agree with you


Quote:
Originally Posted by backwardsman97
I'm sorta lost. What exactly is MySQL? Why do you need it to do such a thing?

I already read this
http://forum.sa-mp.com/index.php?topic=23931.0

And this
http://lostgangwarz.free.fr/samp_mysql_en.php
MySQL is a serverbased database where you can read information faster than from hdd.
In it i have stored the z-coordinate of the ground for x/y-pairs, so the bomb knows where to explode

When you want to use the FS at the moment, you will need to have a server for such a database running on your server.
You will need the Sa-MP MySQL plugin, but i will write a tutorial how to install and use the fs, when i release it, which probably will be tomorrow, but dont blame me if it wont, blame my hardware
Reply
#24

Really Nice .

Good Job!
Reply
#25

Finally i got it, its released
Check the first post, but dont be afraid of the giant installation guide, i think it shouldnt be impossible to get it running
Reply
#26

How do you know what database to connect to? Or do you make one?
Reply
#27

You have to create one, or load the data into an existing one and use this. And the database stuff is set in the pwn file
Reply
#28

Код:
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(35) : error 001: expected token: ";", but found "new"
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(47) : error 001: expected token: ";", but found "new"
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(66) : error 001: expected token: ";", but found "new"
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(120) : warning 205: redundant code: constant expression is zero
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(129) : warning 205: redundant code: constant expression is zero
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(144) : warning 205: redundant code: constant expression is zero
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(147) : warning 205: redundant code: constant expression is zero
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(159) : warning 205: redundant code: constant expression is zero
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(164) : warning 205: redundant code: constant expression is zero
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(173) : warning 205: redundant code: constant expression is zero
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(176) : warning 205: redundant code: constant expression is zero
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(200) : warning 205: redundant code: constant expression is zero
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(221) : warning 205: redundant code: constant expression is zero
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(240) : warning 235: public function lacks forward declaration (symbol "GetKeyPressed")
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(250) : warning 235: public function lacks forward declaration (symbol "floatrandom")
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(257) : warning 235: public function lacks forward declaration (symbol "GetPlayerDistanceToPoint")
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(265) : warning 235: public function lacks forward declaration (symbol "GetGroundZ")
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(277) : warning 235: public function lacks forward declaration (symbol "GetVehicleStatID")
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(288) : warning 235: public function lacks forward declaration (symbol "DropBomb")
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(329) : warning 235: public function lacks forward declaration (symbol "BombTimer")
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(366) : warning 235: public function lacks forward declaration (symbol "DetonateBomb")
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(382) : warning 235: public function lacks forward declaration (symbol "CreateSpecialExplosion")
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(413) : warning 235: public function lacks forward declaration (symbol "ReactivateBomb")
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(417) : warning 235: public function lacks forward declaration (symbol "UpdateCarHealth")
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP Sever\filterscripts\bomber.pwn(425) : warning 235: public function lacks forward declaration (symbol "Poison")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
i get these errors :/
Reply
#29

Looks good.
Reply
#30

Very nice!
Reply
#31

Код:
E:\Server\filterscripts\dropbomb.pwn(127) : error 017: undefined symbol "MapAndreas_Init"
E:\Server\filterscripts\dropbomb.pwn(227) : error 017: undefined symbol "MapAndreas_FindZ_For2DCoord"
E:\Server\filterscripts\dropbomb.pwn(224) : warning 203: symbol is never used: "y"
E:\Server\filterscripts\dropbomb.pwn(224) : warning 203: symbol is never used: "x"
E:\Server\filterscripts\dropbomb.pwn(388) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#32

great man good work
Reply
#33

Saw the video, the sync b/w the plane and the bombs is superb!
Reply
#34

C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(125) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(127) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(140) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(144) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(146) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(159) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(160) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(162) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(177) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(17 : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(179) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(181) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(247) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(254) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(265) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(284) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(285) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(294) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(316) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(327) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(32 : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(334) : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(35 : warning 217: loose indentation
C:\Users\Gagliano\Desktop\Dv drift\Bomba.pwn(38 : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


24 Warnings.
Reply
#35

stock Float:GetPlayerDistanceToPoint(playerid, Float, Float:y, Float:z)
{
new Floatx;
new Floaty;
new Floatz;
if(!IsPlayerInAnyVehicle(playerid)) GetPlayerPos(playerid, px, py, pz);
else GetVehiclePos(GetPlayerVehicleID(playerid), px, py, pz);
return floatsqroot( floatadd( floatadd( floatpower(floatsub(x, px), 2), floatpower(floatsub(y, py), 2) ), floatpower(floatsub(z, pz), 2) ) );
}

stock Float:GetGroundZ(Float, Float:y)
Reply
#36

great man
Reply
#37

Fix mapandreas link please
Reply
#38

Very nice FS, thanks!


I have one question - This code here - could you please fill me in on what each value does?

pawn Код:
new gBombTypes[][bombEnum] = {
{"Nothing", 0, 0.0, 0.0, 0, 0, 0, 0, 0, 0},
{"Normal bombs", 11, 2.5, 6.0, 1636, 270, 500, 150, 1, 0},
{"Fire bombs",    1, 4.0, 8.0, 1636, 270,   0, 200, 1, 0},
{"Big bombs",     7, 4.5, 10.0, 3790, 270,  0, 750, 1, 0},
{"Laser-guided Bombs", 6, 5.0, 25.0, 1636, 270, 0, 1500, 1, 0},
{"Heavy bombs", -1, 5.0, 15.0, 345, 270, 0, 10000, 1, 0},                       //Negative Explosion IDs can be used for self-created explosions, for more info check CreateSpecialExplosion
{"Anti-Missile Flares", -2, 150.0, 35.0, 354, 0, 5000, 10000, 1, 0},            //Only has an effect together with my (act. unreleased) missile FS
{"Nuclear Bombs", -3, 4.0, 10.0, 3790, 270, 0, 10000, 1, 0},
{"Clusterbombs", 11, 2.5, 3.0, 1636, 270, 0, 15000, 12, 0},
{"Carpetbombs", 11, 2.5, 5.5, 1636, 270, 0, 15000, 12, 100},
};
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)