[FilterScript] [WIP] Landmine system - 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)
+--- Thread: [FilterScript] [WIP] Landmine system (
/showthread.php?tid=447407)
[WIP] Landmine system -
Twizted - 29.06.2013
What is this?
This is basically something very simple. I used IsPlayerArea and added SetPlayerHealth. So basically when a player enters a specific area of the map (something very tiny usually, since it's a landmine), GameTextForPlayer will appear on the screen for 2 seconds, saying: "You have stepped on a landmine!" and the player's health will be set to 0. He will die. I've also added so when you enter the area, a sound will play.
PHP код:
forward isPlayerInArea();
SetTimer("isPlayerInArea", 1000, 1);
public isPlayerInArea()
{
new Float:X, Float:Y, Float:Z; //
for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
{
GetPlayerPos(i, X, Y, Z); //
if (X <= -3915 && X >= -3694 && Y <= 401 && Y >= 37)
{
SetPlayerHealth(i, -999999.9); //Player is killed as he enters the area
}
}
PlayerPlaySound(playerid, 1159, X, Y, Z);
}
Pretty much I'd just like to get some additions from you.
Re: [WIP] Landmine system -
Boolean - 30.06.2013
Atleast add a explosion
Re: [WIP] Landmine system -
Twizted - 04.07.2013
Sound or?
Re: [WIP] Landmine system -
Facerafter - 05.07.2013
He means seeing a explosing.
You can create one with
pawn Код:
CreateExplosion(Float:X, Float:Y, Float:Z, type, Float:radius)
Havn't tested it but looks good.
Try making a command, where you create and place a Landmine IG.
Would be good for some RP Army Factions.
Re: [WIP] Landmine system -
Pottus - 05.07.2013
I like the idea but not the implementation.
1) The area detection method is lousy.
Using dynamic areas witht the streamer plugin
https://sampforum.blast.hk/showthread.php?tid=102865 will eliminate the need for a timer.
2) There is no effects.
At least add some explosions.
3) There is no dynamic support functions CreateLandMine() DestroyLandMine()
This is probably the main point you want to be able to cover, the ability to create and destroy mines is essential.