SA-MP Forums Archive
toilet - 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)
+--- Thread: toilet (/showthread.php?tid=460202)



toilet - romka - 27.08.2013

Hello samp forum.

How i can make toilet system.When toilet time get 100% you need do go toilet.When you dont go to toilet then your hp going littlebit down.

Sorry bad english


Thanks


Re: toilet - Scrillex - 27.08.2013

So you need to make a timmer..

Something like

forward toilet();

public OnGameModeInnit()
{
SetTimer("toilet",10000,0);
}
toilet = your timer.

10000 - Time in milliseconds (10 seconds).
0 - Non-repeating.

public Toilet()
{
SendClientMessageToAll(0xFFFF00AA,"10 seconds has passed and you need to go to toilet");
//Do all stuff here.. put some textdraw or something...
}

To kill timer

new toilet1;

public OnGameModeInnit()
{
toilet1 = SetTimer("toilet",10000,0);
}

and when you want to stop it put under your coude

KillTimer(timer1);