[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


Messages In This Thread
[WIP] Landmine system - by Twizted - 29.06.2013, 21:35
Re: [WIP] Landmine system - by Boolean - 30.06.2013, 21:22
Re: [WIP] Landmine system - by Twizted - 04.07.2013, 11:40
Re: [WIP] Landmine system - by Facerafter - 05.07.2013, 17:32
Re: [WIP] Landmine system - by Pottus - 05.07.2013, 18:07

Forum Jump:


Users browsing this thread: 1 Guest(s)