SetTimerEx
#10

So how should it look like?
Код:
if(NetStats_GetConnectedTime(playerid) >= 60000)
{
PlayerInfo[playerid][pMin]++;
if(PlayerInfo[playerid][pMin]>=60)
    {
        PlayerInfo[playerid][pHour]++;
        PlayerInfo[playerid][pMin]=0;
        if(PlayerInfo[playerid][pHour] < 24)
        {
        SendClientMessage(playerid, COLOR_GRAY, ""COL_YELLOW"[SERVER]: +1 Hour online! +5 Score and $5000");
        sGivePlayerMoney(playerid, 5000);
        PlayerInfo[playerid][pCash] += 5000;
        SetPlayerScore(playerid, GetPlayerScore(playerid)+5);
        PlayerInfo[playerid][pScore] += 5;
        }
        if(PlayerInfo[playerid][pHour]>=24)
    {
        PlayerInfo[playerid][pHour]=0;
        PlayerInfo[playerid][pDay]++;

        SendClientMessage(playerid, COLOR_GRAY, ""COL_YELLOW"[SERVER]: +1 Day online! +20 Score and $20000");
        sGivePlayerMoney(playerid, 20000);
        PlayerInfo[playerid][pCash] += 20000;
        SetPlayerScore(playerid, GetPlayerScore(playerid)+20);
        PlayerInfo[playerid][pScore] += 20;

    }
    }

    }
Something like this? It is not working on this way...because I can't set connected time on 0 so it will spam me every few seconds: +1hour...I put this on onplayerupdate
Reply


Messages In This Thread
SetTimerEx - by CroM256 - 13.03.2014, 17:58
Re: SetTimerEx - by Matess - 13.03.2014, 18:04
Re: SetTimerEx - by Ruben_Alonso - 13.03.2014, 18:05
Re: SetTimerEx - by CroM256 - 13.03.2014, 18:07
AW: SetTimerEx - by Macronix - 13.03.2014, 18:09
Re: SetTimerEx - by CroM256 - 13.03.2014, 18:11
Re: SetTimerEx - by Ruben_Alonso - 13.03.2014, 18:19
Re: SetTimerEx - by CroM256 - 13.03.2014, 18:23
Re: SetTimerEx - by Richie© - 13.03.2014, 18:26
Re: SetTimerEx - by CroM256 - 13.03.2014, 18:57

Forum Jump:


Users browsing this thread: 3 Guest(s)