SA-MP Forums Archive
I'm thinkin about it.. - Is it imposible? - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I'm thinkin about it.. - Is it imposible? (/showthread.php?tid=109946)



I'm thinkin about it.. - Is it imposible? - Lynax - 23.11.2009

Hello
I'm making a TDM mod.
Okay lets tell you what i am thinking..
For example Player's health under 30 , her/his screen can like drunk?
we can make drunk with SetPlayerDrunkLevel but the other one? is it imposible ?
If is it can you send me a template?


Re: I'm thinkin about it.. - Is it imposible? - [XST]O_x - 23.11.2009

Template?
Anyway you need to use a timer.
Top:
pawn Код:
forward HealthTimer(playerid);
OnGameModeInit:
pawn Код:
SetTimer("HealthTimer",1000,1);
Bottom:
pawn Код:
public HealthTimer(playerid)
{
    new Float:health;
  GetPlayerHealth(playerid,health);
  if (health < 30.0)
  {
    SetPlayerDrunkLevel(playerid,50000);
  }
}
Something like that.