SA-MP Forums Archive
expirience system - 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: expirience system (/showthread.php?tid=356412)



expirience system - srcka< - 03.07.2012

i want exp system like this.. how i make it on textdraws and 1 level go up on evry 5 hours pleasee help me, how i made it ?


Re: expirience system - SKAzini - 03.07.2012

pawn Код:
forward 5HoursLevelUp(playerid);
SetTimerEx("5HoursLevelUp", 18000000, true,"i",playerid); // Level up each 5 hours, put on OnPlayerConnect
public 5HoursLevelUp(playerid)
{
PlayerInfo[playerid][pLevel] += 1; // Adds 1 more level to pLevel var (Y_INI saving system)
return 1;
}
new pLevel = PlayerInfo[playerid][pLevel];
gLevel = TextDrawCreate(320.0, 240.0, pLevel); // Well, tweak it as your likeing
TextDrawShowForPlayer(playerid, gLevel); // OnPlayerConnect, also use a TextDraw string updater