[Help} SetPlayerScore
#1

Код:
forward TimeOnServer(playerid);
public TimeOnServer(playerid)
{
PlayerInfo[playerid][Sec] ++;
if(PlayerInfo[playerid][Sec]>=60)
{
PlayerInfo[playerid][Min]++;
PlayerInfo[playerid][Sec]=0;
}
if(PlayerInfo[playerid][Min]>=60)
{
PlayerInfo[playerid][Min]=0;
PlayerInfo[playerid][Hour]++;
new LevScore;
LevScore = PlayerInfo[playerid][Hour];
SetPlayerScore(playerid, LevScore);
}
}
why this dont sets my score on tab ?
Reply
#2

Have you a timer or something ?
Reply
#3

yes 1 sec timer on "TimeOnServer"

TimeTimer = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
Reply
#4

Код:
SetTimer("playerscore", 60000, true);
First set a timer
Код:
forward playerscore();
public playerscore()
{
    for(new x; x<MAX_PLAYERS; x++)
    {
        if(!IsPlayerConnected(x)) continue;
        SetPlayerScore(x, GetPlayerScore(x) + 1);
    }
    return 1;
}
This, the player will get 1 score per minute.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)