23.09.2012, 20:14
Eu coloquei tudo corretamente e o sistema de level e relogio up nao funciona, esperei os 10 minutos e n ganhei a EXP, e a textdraw do relogio up nao funciona fica sу UP: 00:00
Alguem se interessa em me ajudar pelo msn ?
Alguem se interessa em me ajudar pelo msn ?
pawn Code:
public RelogioUP(playerid)
{
new string[256];
if(segUP[playerid] == 0 && minUP[playerid] == 0)
{
new file[156],Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,sizeof(Name));
format(file,sizeof(file),FileUsers,Name);
if(!DOF2_FileExists(ReturnFileUser(playerid)))
{
if(AFK[playerid] == 0) {
DOF2_SetInt(ReturnFileUser(playerid), "Tempo", DOF2_GetInt(ReturnFileUser(playerid), "Tempo")+1);
//====== [EXP] ======
if(DOF2_GetInt(ReturnFileUser(playerid), "Tempo") >= 1)
{
DOF2_SetInt(ReturnFileUser(playerid), "EXP", DOF2_GetInt(ReturnFileUser(playerid), "EXP")+1);
format(string, sizeof(string), "| UP | Vocк ganhou +1 de experiкncia! [ %d / 5 ]",DOF2_GetInt(ReturnFileUser(playerid), "EXP"));
PlayerPlaySound(playerid, 1057, 0, 0, 0);
GameTextForPlayer(playerid, "~w~UP!", 3000, 6);
SendClientMessage(playerid, 0x75EA00AA, string);
DOF2_SetInt(ReturnFileUser(playerid), "Tempo",0);
}
if(DOF2_GetInt(ReturnFileUser(playerid), "EXP") >=5) {
DOF2_SetInt(ReturnFileUser(playerid), "Level", DOF2_GetInt(ReturnFileUser(playerid), "Level")+1);
SetPlayerScore(playerid,DOF2_GetInt(ReturnFileUser(playerid), "Level"));
format(string, sizeof(string), "| UP | Vocк juntou 5 experiкncias, e ganhou +1 level. (Level: %d) ",DOF2_GetInt(ReturnFileUser(playerid), "Level"));
SendClientMessage(playerid, 0x75EA00AA, string);
PlayerPlaySound(playerid, 1057, 0, 0, 0);
DOF2_SetInt(ReturnFileUser(playerid), "EXP",0);
}
}
else {
SendClientMessage(playerid, Vermelho, "[ANTI - AFK] Vocк estб afk, e nгo recebeu uma experiкncia!");
}
for(new i = 0; i < MAX_PLAYERS; i++)
if(PlayerAfkTicks[i] == MAX_IDLE_TIME*60) {
AFK[i]= 1;
SendClientMessage(i, Amarelo, "[ANTI - AFK] Vocк foi bloqueado(a) de upar!");
TextDrawHideForPlayer(i,UPRelogio[i]);
TextDrawShowForPlayer(i,AfkText);
TextDrawShowForPlayer(i,AfkBackText);
}
}
if(segUP[playerid] == -1) {
if(minUP[playerid] == 0)
minUP[playerid] = 10;
segUP[playerid] = 59;
minUP[playerid]--;
}
format(string, sizeof(string), "~w~UP~b~: ~w~%02d~b~:~w~%02d", minUP[playerid],segUP[playerid]);
TextDrawSetString(UPRelogio[playerid],string);
segUP[playerid] --;
return 1;
}
}