22.08.2015, 18:01
Mano eu fiz mais ele fica so aparecendo e desaparecendo na tela, como posso arrumar??
olha o codigo
olha o codigo
pawn Код:
public RelogioUP(playerid)
{
foreach(Player, i)
{
new string[256];
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(IsPlayerConnected(i))
{
if(segUP[playerid] == 0 && minUP[playerid] == 0)
{
if(PlayerInfo[playerid][Logado] == 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, "EXP"));
PlayerPlaySound(playerid, 1057, 0, 0, 0);
GameTextForPlayer(playerid, "~w~UP!", 3000, 6);
SendClientMessage(playerid, 0x75EA00AA, string);
dini_IntSet(file, "Tempo",0);
}
if(dini_Int(file, "EXP") >=5) {
dini_IntSet(file, "Level", dini_Int(file, "Level")+1);
SetPlayerScore(playerid,dini_Int(file, "Level"));
format(string, sizeof(string), "| UP | Vocк juntou 5 experiкncias, e ganhou +1 level. (Level: %d) ",dini_Int(file, "Level"));
SendClientMessage(playerid, 0x75EA00AA, string);
PlayerPlaySound(playerid, 1057, 0, 0, 0);
dini_IntSet(file, "EXP",0);
Up(playerid);
}
//else {
//SendClientMessage(playerid, Vermelho, "| ANTI - AFK | Vocк estб no modo ausente, e nгo recebeu uma experiкncia!");
}
}
}
if(segUP[playerid] == -1) {
if(minUP[playerid] == 0)
minUP[playerid] = 10;
segUP[playerid] = 59;
minUP[playerid]--;
}
format(string, sizeof(string), "~w~+~b~~h~UP: ~w~~h~%02d:%02d", minUP[playerid],segUP[playerid]);
TextDrawSetString(UPRelogio[playerid],string);
segUP[playerid] --;
if(dini_Int(filene(aname),"RelogioUP") == 1 && dini_Int(filene(aname),"RelogioUPOn") == 1){
TextDrawShowForPlayer(i,UPRelogio[i]);
} else TextDrawHideForPlayer(i, UPRelogio[i]);
}else{
TextDrawHideForPlayer(i, UPRelogio[i]);
}
}
return 1;
}