19.06.2011, 02:21
Veja se funciona.
PHP код:
//Topo
new VIP[MAX_PLAYERS], Horas[MAX_PLAYERS];
//GAMEMODE INIT
public OnGameModeInit()
{
SetTimer("Time",1000,true);
return true;
}
//FIM DO GM
forward Time();
public Time() {
for(new x = 0; x != MAX_PLAYERS; ++x) {
if(IsPlayerConnected(x) && VIP[x] == 0) //Aqui ele vai checar se o jogador nгo й VIP
++Horas[x];
if(Horas[x] == 36000)
Horas[x] = 0, VIP[x] = 1; //Coloca o VIP
}
return true;
}
// O SEU SIST. DE SALVAMENTO \/
stock SalvarPlayer(playerid)
{
new Float:Vida, Float:Colete, Nome[MAX_PLAYER_NAME], String[50]
GetPlayerHealth(playerid, Vida); GetPlayerArmour(playerid, Colete);
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), CONTAS, Nome);
dini_IntSet(String,"Dinheiro", GetPlayerMoney(playerid));
dini_IntSet(String,"Matou", Matou[playerid]);
dini_IntSet(String,"Morreu", Morreu[playerid]);
dini_IntSet(String,"Logou", Logou[playerid]);
dini_IntSet(String,"Horas", Horas[playerid]);//SALVAR O HORAS
dini_IntSet(String,"Vip", VIP[playerid]);//SALVAR O VIP
return 0x01;
}