13.03.2014, 18:57
So how should it look like?
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
Код:
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; } } }