Help with a level timer
#1

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
Reply
#2

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?
Reply
#3

Something on the lines of this will work.

http://pastebin.com/2wm2F1qh
Reply
#4

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

You should forward the public first.
Reply
#6

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
Reply
#7

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

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
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)