27.10.2011, 21:55
Hello, What do I need to change in order for Jafet Macario's Basic Roleplay Script Level system to be changed into a Playing Hour System?
public SyncTime()
{
new string[64];
new tmphour;
new tmpminute;
new tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
FixHour(tmphour);
tmphour = shifthour;
if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
{
format(string, sizeof(string), "SERVER: The time is now %d:00 hours",tmphour);
SendClientMessageToAll(COLOR_WHITE,string);
ghour = tmphour;
Payday();
if (realtime)
{
SetWorldTime(tmphour);
}
}
}
public Payday()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new nxtlevel;
nxtlevel = PlayerInfo[i][pLevel]+1;
new string[128];
format(string, sizeof(string), "~y~PayDay~n~~w~Paycheck");
GameTextForPlayer(i, string, 5000, 1);
new payday = nxtlevel*1000;
GivePlayerCash(i,payday);
PlayerInfo[i][pExp]++;
}
}
return 1;
}