SA-MP Forums Archive
timer based on skill level problem - 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: timer based on skill level problem (/showthread.php?tid=613376)



timer based on skill level problem - MayaEU - 27.07.2016

Hi, is this the correct way to make a timer that is based on the players
skill level? I have tested it, but i dont think it works right

pawn Код:
new Level = PlayerInfo[playerid][pFishSkill], skilltime;
                    if(Level >= 0   && Level < 50)  { skilltime = RandomBetween(20000, 200000); }
                    else if(Level >= 50  && Level < 100) { skilltime = RandomBetween(15000, 180000); }
                    else if(Level >= 100 && Level < 200) { skilltime = RandomBetween(10000, 160000); }
                    else if(Level >= 200 && Level < 400) { skilltime = RandomBetween(8000, 140000); }
                    else if(Level >= 400 && Level < 500) { skilltime = RandomBetween(6000, 120000); }
                    else if(Level >= 500) { skilltime = RandomBetween(5000, 10000); }

                    fishtimer[playerid] = SetTimerEx("FishTimer", skilltime, false, "i", playerid);