[FilterScript] [WIP] Landmine system
#1

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"10001);
public 
isPlayerInArea()
   {
       new 
Float:XFloat:YFloat:Z//
       
for(new i=0MAX_PLAYERSi++) //This line defines a name for all player, the name is "i"
       
{
           
GetPlayerPos(iXYZ); //
           
if (<= -3915 && >= -3694 && <= 401 && >= 37)
           {
               
SetPlayerHealth(i, -999999.9); //Player is killed as he enters the area
           
}
       }
               
PlayerPlaySound(playerid1159XYZ);
   } 
Pretty much I'd just like to get some additions from you.
Reply
#2

Atleast add a explosion
Reply
#3

Sound or?
Reply
#4

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.
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)