[FilterScript] Radioactive Zone
#1

My first scripts.Consist in the area51 is a radioactive zone , coming down your health and you get dizzy.Sorry for my english,iam uruguayan.

Credits:
Ygzeb(help in SetTimer)
Irinel and Otacon(areas tutorial)





pawn Код:
//Zona radioactiva by smoke - Radioactive Zone by smoke
 

 
#include <a_samp>
#include <streamer>
#pragma tabsize 0
 
new VidaTimer[MAX_PLAYERS];
new smoke;
new radiacion_smoke;
 
 
public OnPlayerEnterDynamicArea(playerid, areaid)
{
if(areaid == smoke)
    {
      GameTextForPlayer(playerid, "~w~You have entered a radioactive area , ~r~ care", 4000, 3);
      SetPlayerDrunkLevel(playerid,50000);
      VidaBajando(playerid);
      }
    return 1;
}
 
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
     if(areaid == smoke)
    {
        GameTextForPlayer(playerid, "~w~You have left the radioactive zone,~n~~b~you are now safe!", 4000, 3);
        SetPlayerDrunkLevel(playerid,0);
        }
    return 1;
      }
 
    forward VidaBajando(playerid);
        public VidaBajando(playerid)
        {
        new Float:Health;
        GetPlayerHealth(playerid,Health);
        SetPlayerHealth(playerid,Health-5);
        return VidaTimer[playerid]=SetTimerEx("VidaBajando", 3000,0,"d",playerid);
        }
 
public OnGameModeInit()
{
smoke = CreateDynamicRectangle(-81.74512, 1623.225, 397.0478, 2183.763, -1, -1, -1);
radiacion_smoke = GangZoneCreate(-93.423, 1611.547, 420.4035, 2148.729);
return 1;
}
 
public OnPlayerSpawn(playerid)
{
GangZoneShowForPlayer(playerid, radiacion_smoke, 0xFF000096);//default colour is red
return 1;
}
 
public OnPlayerDisconnect(playerid, reason)
{
KillTimer(VidaTimer[playerid]);
return 1;
}
Reply


Messages In This Thread
Radioactive Zone - by Smoke123 - 31.12.2014, 01:33
Re: Radioactive Zone - by Vasco - 31.12.2014, 01:51
Respuesta: Radioactive Zone - by PolloLoko - 31.12.2014, 02:03
Re: Radioactive Zone - by Crayder - 31.12.2014, 03:43
Re: Radioactive Zone - by Boot - 31.12.2014, 04:06
Re: Radioactive Zone - by Smoke123 - 31.12.2014, 04:52
Re: Radioactive Zone - by xXxMauroxXx - 31.12.2014, 13:13
AW: Radioactive Zone - by Flori - 01.01.2015, 09:34
Re: Radioactive Zone - by Maximun - 01.01.2015, 13:12

Forum Jump:


Users browsing this thread: 1 Guest(s)