SA-MP Forums Archive
Help with a level timer - 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 a level timer (/showthread.php?tid=318691)



Help with a level timer - Dark Crow - 16.02.2012

I am trying to make a lvl up sistem on time i have this

Код:
public levelup(playerid)
{
    SetTimer("levelup",60000,true);
	if PlayerInfo[playerid][pLevel] = 1;
	PlayerInfo[playerid][pLevel]++;
	
}
What do i need to change so i can make it 1 lvl 3 hour then for 2 level 6 hours and so on but like 3 hours complete and then 3 + 3 for lvl 2 if anyone can help


Re: Help with a level timer - Da' J' - 16.02.2012

This what you showed
pawn Код:
public levelup(playerid)
{
    SetTimer("levelup",60000,true);
    if(PlayerInfo[playerid][pLevel] = 1);
    {
    PlayerInfo[playerid][pLevel]++;
   
}
I belive it sets you one level per each hour. Also you should define that timer aswell.
Pro's, am I right?


Re: Help with a level timer - PrawkC - 16.02.2012

Something on the lines of this will work.

http://pastebin.com/2wm2F1qh


Re: Help with a level timer - Dark Crow - 18.02.2012

I don't get how to put it in the script about the public i know but i get many errors!


Re: Help with a level timer - Soumi - 18.02.2012

You should forward the public first.


Re: Help with a level timer - Dark Crow - 18.02.2012

i get an error undefiend simbol player at this line

Код:
switch(Player[i][pLevel])
how can i fix this? because for me its the first time to work with switch


Re: Help with a level timer - Madd Kat - 18.02.2012

well that should be part of your player enum
replace that with what you use in your system.


Re: Help with a level timer - Dark Crow - 18.02.2012

ohh k then i don't really know how to use enums i will have to first learn how to use those enums then to start making this thx anyways


Re: Help with a level timer - Madd Kat - 18.02.2012

yeah youll need something that saves the users values in an ini, mysql or raw file.
once you have a system like that then try adding this.

good luck.