08.04.2015, 11:11
Bom o meu problema й o seguinte o relogio estб funcionando certinho й tals mas acontece que quando o player sai do servidor e volta nгo salva o tempo por exemplo, ele entrou ai comeзou a contar 9:59... e ele saiu no 6:15 por exemplo ai quando ele volta o relogio volta pro 9:59 como arruma isso ?
Cуdigo:
Cуdigo:
pawn Код:
forward RelogioUP(playerid);
public RelogioUP(playerid)
{
new string[256];
if(segUP[playerid] == 0 && minUP[playerid] == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(PlayerInfo[playerid][pLogged] == 1)
{
if(AFK[playerid] == 0)
{
dini_IntSet(file, "Tempo", dini_Int(file, "Tempo")+1);
//====== [EXP] ======
if(dini_Int(file, "Tempo") >=1)
{
dini_IntSet(file, "EXP", dini_Int(file, "EXP")+1);
format(string, sizeof(string), "| UP | Vocк ganhou +1 de experiкncia! [ %d / 5 ]",dini_Int(file, "pExpe"));
PlayerPlaySound(playerid, 1133, 0, 0, 0);
SendClientMessage(playerid, 0x33AAFFFF, string);
dini_IntSet(file, "Tempo",0);
}
if(dini_Int(file, "EXP") >=5)
{
dini_IntSet(file, "Level", dini_Int(file, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк juntou 5 de respeito, e ganhou +1 level. (%d) ",dini_Int(file, "pLevel"));
SendClientMessage(playerid, 0x75EA00AA, string);
PlayerPlaySound(playerid, 1057, 0, 0, 0);
dini_IntSet(file, "pExpe",0);
}
}
}
}
if(segUP[playerid] == 0)
{
if(minUP[playerid] == 0)
minUP[playerid] = 9;
segUP[playerid] = 59;
minUP[playerid] --;
}
format(string, sizeof(string), "UP: %02d:%02d", minUP[playerid], segUP[playerid]);
TextDrawSetString(UPRelogio[playerid], string);
segUP[playerid] --;
return 1;
}