[Include] Dynamic bomb system [Draft] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Dynamic bomb system [Draft] (
/showthread.php?tid=372769)
Dynamic bomb system [Draft] -
Siralos - 28.08.2012
This is just a draft of a bomb system, but may be useful for you in some ways.
It has just one command: /plantbomb [Delay (Seconds)] [Car ID]
The bomb can be detonated in various ways:
- Waiting for the Delay timer to end
- Shooting at it
- If another bomb explodes near it
- Wearing a detonator and pressing 'Y' key
Car ID: If 0 is specified, the bomb is planted at your feet. If more than 0, the bomb is attached to the vehicle.
Plugins used:
Vectoral Pawn - By Rancho (
https://sampforum.blast.hk/showthread.php?tid=364285)
Streamer - By Incognito (
https://sampforum.blast.hk/showthread.php?tid=102865)
MapAndreas - By Kalcor/Mauzen (
https://sampforum.blast.hk/showthread.php?tid=275492)
Includes used:
y_hooks - By ****** (
https://sampforum.blast.hk/showthread.php?tid=166016)
Download:
http://pastebin.com/jADEP1SP
Please let me know if you have some suggestion for future improvement
Thanks and regards,
Siralos
Re: Dynamic bomb system [Draft] -
davelord - 28.08.2012
Nice, it's pretty cool and useful for some.
Re: Dynamic bomb system [Draft] -
Niko_boy - 28.08.2012
mm so this is one of usage of that Vecotral Pawn Plugin .. :d
i dont know what it exactly do may be your include help out O;
Respuesta: Re: Dynamic bomb system [Draft] -
Siralos - 28.08.2012
Quote:
Originally Posted by Niko_boy
mm so this is one of usage of that Vecotral Pawn Plugin .. :d
i dont know what it exactly do may be your include help out O;
|
I started using some days ago and I find it very useful.
What I do here is:
cmap -> store the data of the bomb
cvector -> store all the bomb cmaps
Example:
PHP код:
BombMap = cmap();
BombVector = cvector();
cmap_insert_float(BombMap, "posX", posx)
cmap_insert(BombMap, "player", playerid)
cvector_push_back(BombVector, BombMap);
This way we will have an 'unlimited' array of bombs, each one with its unique information.
It can also be done with static arrays, but I was testing the Vectoral pawn with this.