Help with conect time - 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: Help with conect time (
/showthread.php?tid=366911)
Help with conect time -
Taleski - 08.08.2012
Why the conect time is not goint UP?
and it's not giving payday to the players
Re: Help with conect time -
Jstylezzz - 08.08.2012
you will have to do like:
pawn Код:
new paydaytimer[MAX_PLAYERS];
OnPlayerSpawn(playerid)
{
paydaytimer[playerid] = SetTimerEx("Payday",60000,true,"i",playerid);//set a timer when the player spawns
}
forward Payday(playerid);
public Payday(playerid)
{
if(Paydaycount[playerid] == 0)//only go trough the payday code if the paydaycount has reached 0
{
//payday code here
paydaycount = 600;//reset the paydaycount to 0
}
paydaycount--;//every minute, take 1- from the paydaycount
}
public OnPlayerDisconnect(playerid)
{
KillTimer(paydaytimer[playerid]);
}
This is just a simple payday system...
it will obviously not work if you just copy paste it, so just try to understand what happens, and write it yourself