Playing Hour System?
#6

Quote:
Originally Posted by grand.Theft.Otto
Посмотреть сообщение
Something like this I guess:

pawn Код:
// under OnGameModeInit

SetTimer("LevelUp",3600000,1); // 60 minutes

// bottom of script

forward LevelUp(playerid);
public LevelUp(playerid)
{
    // use your variables / playerinfo information here like if(PlayerInfo[playerid][LoggedIn] == 1) etc..
   
    SendClientMessage(playerid,-1,"You've Played For An Hour!  Received +1 Score.");
    SetPlayerScore(playerid,GetPlayerScore(playerid) +1);

    return 1;
}
That wouldn't work, and wouldn't be accurate.
1) Since variable 'playerid' isn't passed, it always will be 0.
2) If a player connects at 7:59, then at 8:00 he will receive +1 played hour, although he has been playing only for 1 minute.
3) Timer will execute 1 hour later after the server has been started, so if the server was turned on at 5:45, then the timer will execute at 6:45 (7:45, 8:45...), not 6:00 (7:00, 8:00...)
Reply


Messages In This Thread
Playing Hour System? - by seanny - 20.10.2011, 18:02
Re: Playing Hour System? - by grand.Theft.Otto - 20.10.2011, 18:07
Re: Playing Hour System? - by seanny - 20.10.2011, 18:54
Re: Playing Hour System? - by Stigg - 20.10.2011, 18:55
Re: Playing Hour System? - by seanny - 20.10.2011, 18:56
Re: Playing Hour System? - by Macluawn - 20.10.2011, 19:03
Re: Playing Hour System? - by grand.Theft.Otto - 20.10.2011, 19:04
Re: Playing Hour System? - by seanny - 20.10.2011, 19:05
Re: Playing Hour System? - by Macluawn - 20.10.2011, 19:09
Re: Playing Hour System? - by seanny - 20.10.2011, 19:13

Forum Jump:


Users browsing this thread: 1 Guest(s)