[Ajuda] relogio up
#1

Eae galera eu ponhei um relogio up aqui de um site ele conta certo de 10 minutos bom, ele ta de acordo com meu UP

for(new i=0;i<MAX_PLAYERS;i++){
if(IsPlayerConnected(i)){
new string[256];
new aname[MAX_PLAYER_NAME];
GetPlayerName(i, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(AFK[i] == 0){
dini_IntSet(file, "Tempo", dini_Int(file, "Tempo")+1);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Exp
if(dini_Int(file, "Tempo") >=10){
dini_IntSet(file, "EXP", dini_Int(file, "EXP")+1);
format(string, sizeof(string), "(~){CCCCFF} Vocк ganhou +1 Exp - [ %d/5 ]",dini_Int(file, "EXP"));
PlayerPlaySound(i, 1057, 0, 0, 0);
SendClientMessage(i, 0x75EA00AA, 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), "(~) Vocк ganhou 1 level [ Level Atual: %d ] ",dini_Int(file, "Level"));
SendClientMessage(i, 0x75EA00AA, string);
PlayerPlaySound(i, 1057, 0, 0, 0);
dini_IntSet(file, "EXP",0);
//dini_IntSet(file, "rouboubanco", 0);
dini_IntSet(file, "CriouBarreira", 0);
}


mais tipo o relogio up ele conta de 10 minutos mais nгo conta que nem os 10 minutos pra ganhar 1 experiencia
quando eu saio do jogo o relogio up ele volta a contar dos 9:59 ele nгo para da onde ele paro alguem me ajuda a deixa tudu certim?
public OnGameModeInit()
{
ReloginhoUP = TextDrawCreate(518.000000, 4.000000, "~y~UP~p~: ~w~10~p~:~w~00");
TextDrawBackgroundColor(ReloginhoUP, 255);
TextDrawFont(ReloginhoUP, 1);
TextDrawLetterSize(ReloginhoUP, 0.460000, 1.799999);
TextDrawColor(ReloginhoUP, -1);
TextDrawSetOutline(ReloginhoUP, 1);
TextDrawSetProportional(ReloginhoUP, 1);
reloginhoup = SetTimer("RelogioUPs", 1000, 1);

public RelogioUPs()
{
minu2++;
TempoReloginho--;
new string[50];
if(minu2>=59)
{
minu2 = 0;
foicount1 ++;
TempoReloginho = 59;
}
if(foicount1 == 1) format(string, 50,"~y~UP~p~: ~w~9~p~:~w~%d", TempoReloginho);
else if(foicount1 == 2) format(string, 50,"~y~UP~p~: ~w~8~p~:~w~%d", TempoReloginho);
else if(foicount1 == 3) format(string, 50,"~y~UP~p~: ~w~7~p~:~w~%d", TempoReloginho);
else if(foicount1 == 4) format(string, 50,"~y~UP~p~: ~w~6~p~:~w~%d", TempoReloginho);
else if(foicount1 == 5) format(string, 50,"~y~UP~p~: ~w~5~p~:~w~%d", TempoReloginho);
else if(foicount1 == 6) format(string, 50,"~y~UP~p~: ~w~4~p~:~w~%d", TempoReloginho);
else if(foicount1 == 7) format(string, 50,"~y~UP~p~: ~w~3~p~:~w~%d", TempoReloginho);
else if(foicount1 == format(string, 50,"~y~UP~p~: ~w~2~p~:~w~%d", TempoReloginho);
else if(foicount1 == 9) format(string, 50,"~y~UP~p~: ~w~1~p~:~w~%d", TempoReloginho);
else if(foicount1 == 10) format(string, 50,"~y~UP~p~: ~w~0~p~:~w~%d", TempoReloginho);
TextDrawSetString(ReloginhoUP,string);
TextDrawShowForAll(ReloginhoUP);
if(foicount1 == 11)
{
foicount1 = 1;
for(new i=0; i<MAX_PLAYERS; i++)
{
//Coloka a variavel da exp aki
}
}
return 1;
}
Reply
#2

[pawn] [*/pawn]

Sem o asterisco.
Reply
#3

pawn Код:
for(new i=0;i<MAX_PLAYERS;i++){
if(IsPlayerConnected(i)){
new string[256];
new aname[MAX_PLAYER_NAME];
GetPlayerName(i, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(AFK[i] == 0){
dini_IntSet(file, "Tempo", dini_Int(file, "Tempo")+1);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Exp
if(dini_Int(file, "Tempo") >=10){
dini_IntSet(file, "EXP", dini_Int(file, "EXP")+1);
format(string, sizeof(string), "(~){CCCCFF} Vocк ganhou +1 Exp - [ %d/5 ]",dini_Int(file, "EXP"));
PlayerPlaySound(i, 1057, 0, 0, 0);
SendClientMessage(i, 0x75EA00AA, 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), "(~) Vocк ganhou 1 level [ Level Atual: %d ] ",dini_Int(file, "Level"));
SendClientMessage(i, 0x75EA00AA, string);
PlayerPlaySound(i, 1057, 0, 0, 0);
dini_IntSet(file, "EXP",0);
//dini_IntSet(file, "rouboubanco", 0);
dini_IntSet(file, "CriouBarreira", 0);
}

mais tipo o relogio up ele conta de 10 minutos mais nгo conta que nem os 10 minutos pra ganhar 1 experiencia
quando eu saio do jogo o relogio up ele volta a contar dos 9:59 ele nгo para da onde ele paro alguem me ajuda a deixa tudu certim?
public OnGameModeInit()
{
ReloginhoUP = TextDrawCreate(518.000000, 4.000000, "~y~UP~p~: ~w~10~p~:~w~00");
TextDrawBackgroundColor(ReloginhoUP, 255);
TextDrawFont(ReloginhoUP, 1);
TextDrawLetterSize(ReloginhoUP, 0.460000, 1.799999);
TextDrawColor(ReloginhoUP, -1);
TextDrawSetOutline(ReloginhoUP, 1);
TextDrawSetProportional(ReloginhoUP, 1);
reloginhoup = SetTimer("RelogioUPs", 1000, 1);

public RelogioUPs()
{
minu2++;
TempoReloginho--;
new string[50];
if(minu2>=59)
{
minu2 = 0;
foicount1 ++;
TempoReloginho = 59;
}
if(foicount1 == 1) format(string, 50,"~y~UP~p~: ~w~9~p~:~w~%d", TempoReloginho);
else if(foicount1 == 2) format(string, 50,"~y~UP~p~: ~w~8~p~:~w~%d", TempoReloginho);
else if(foicount1 == 3) format(string, 50,"~y~UP~p~: ~w~7~p~:~w~%d", TempoReloginho);
else if(foicount1 == 4) format(string, 50,"~y~UP~p~: ~w~6~p~:~w~%d", TempoReloginho);
else if(foicount1 == 5) format(string, 50,"~y~UP~p~: ~w~5~p~:~w~%d", TempoReloginho);
else if(foicount1 == 6) format(string, 50,"~y~UP~p~: ~w~4~p~:~w~%d", TempoReloginho);
else if(foicount1 == 7) format(string, 50,"~y~UP~p~: ~w~3~p~:~w~%d", TempoReloginho);
else if(foicount1 ==  format(string, 50,"~y~UP~p~: ~w~2~p~:~w~%d", TempoReloginho);
else if(foicount1 == 9) format(string, 50,"~y~UP~p~: ~w~1~p~:~w~%d", TempoReloginho);
else if(foicount1 == 10) format(string, 50,"~y~UP~p~: ~w~0~p~:~w~%d", TempoReloginho);
TextDrawSetString(ReloginhoUP,string);
TextDrawShowForAll(ReloginhoUP);
if(foicount1 == 11)
{
foicount1 = 1;
for(new i=0; i<MAX_PLAYERS; i++)
{
//Coloka a variavel da exp aki
}
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)