SA-MP Forums Archive
[FilterScript] Radioactive Zone - 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] Radioactive Zone (/showthread.php?tid=553704)



Radioactive Zone - Smoke123 - 31.12.2014

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;
}



Re: Radioactive Zone - Vasco - 31.12.2014

Nice and simple filterscript

Also, your translations to english are a little wrong :P

Fix:
pawn Код:
GameTextForPlayer(playerid, "~w~You have entered a radioactive zone,~n~~r~be careful!", 4000, 3);
and
pawn Код:
GameTextForPlayer(playerid, "~w~You have left the radioactive zone,~n~~b~you are now safe!", 4000, 3);



Respuesta: Radioactive Zone - PolloLoko - 31.12.2014

Very simple and very poorly defined

KillTimer(VidaTimer[playerid]); = Leave zone



Re: Radioactive Zone - Crayder - 31.12.2014

Good job for your skill level, keep it up! I remember when I sucked this bad, just don't give up.


Re: Radioactive Zone - Boot - 31.12.2014

I didn't know these functions you have used, gonna study them right now.

Nice filterscript .


Re: Radioactive Zone - Smoke123 - 31.12.2014

Quote:
Originally Posted by Crayder
Посмотреть сообщение
Good job for your skill level, keep it up! I remember when I sucked this bad, just don't give up.
Thanks

Quote:
Originally Posted by Vasco
Посмотреть сообщение
Nice and simple filterscript

Also, your translations to english are a little wrong :P

Fix:
pawn Код:
GameTextForPlayer(playerid, "~w~You have entered a radioactive zone,~n~~r~be careful!", 4000, 3);
and
pawn Код:
GameTextForPlayer(playerid, "~w~You have left the radioactive zone,~n~~b~you are now safe!", 4000, 3);
Thanks and fix translate in code

Quote:
Originally Posted by Boot
Посмотреть сообщение
I didn't know these functions you have used, gonna study them right now.

Nice filterscript .
Thanks!


Re: Radioactive Zone - xXxMauroxXx - 31.12.2014

Nice idea and good job


AW: Radioactive Zone - Flori - 01.01.2015

Nice one.


Re: Radioactive Zone - Maximun - 01.01.2015

Good work