[Ajuda] Level Up ._.
#1

Eai galera do forum-samp to aqui com um error ;s
tipo esse sistema de level: nгo passa passei 1 hr no meu gamemode do 0 q estou fazendo mas ele nгo conta os minutos..

pawn Код:
forward LevelUP(); // INicio ..

SetTimer("LevelUP", 60000, 1); // On GameMode Init

public LevelUP() // Fim GameMode.
{
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);
//EXP
if(dini_Int(file, "Tempo") >=2)
{
dini_IntSet(file, "EXP", dini_Int(file, "EXP")+1);
format(string, sizeof(string), "(INFO) Vocк Juntou +1 de Exp! (%d/5)",dini_Int(file, "EXP"));
PlayerPlaySound(i, 1057, 0, 0, 0);
SendClientMessage(i, 0x75EA00AA, string);
dini_IntSet(file, "TempoEXP",0);
}
//Upou
if(dini_Int(file, "EXP") >=5)
{
dini_IntSet(file, "Level", dini_Int(file, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк acumulou 5 de EXP, e Ganhou Mas Um Level! [Level Atual (%d) ] ",dini_Int(file, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
PlayerPlaySound(i, 1057, 0, 0, 0);
dini_IntSet(file, "EXP",0);
}
}
}
}
Entгo eu queria q o level passa-se normal .. ganhando sua exp.. ._.
PS: Isto nгo esta ne um 'fs' ou 'inc' estб no gm , obvio q nao vou postar o gm todo aqui '-'
Reply
#2

Pq tu n usa uma Stock pra ver a quantidade de Exp que o player tem e retornar ela? fica mais facil
Reply
#3

Hm.. boa ideia z.z vo fazer assim vlw ' '-'
Reply
#4

Quote:
Originally Posted by [LF]PlaYer
Посмотреть сообщение
Eai galera do forum-samp to aqui com um error ;s
tipo esse sistema de level: nгo passa passei 1 hr no meu gamemode do 0 q estou fazendo mas ele nгo conta os minutos..

pawn Код:
forward LevelUP(); // INicio ..

SetTimer("LevelUP", 60000, 1); // On GameMode Init

public LevelUP() // Fim GameMode.
{
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);
//EXP
if(dini_Int(file, "Tempo") >=2)
{
dini_IntSet(file, "EXP", dini_Int(file, "EXP")+1);
format(string, sizeof(string), "(INFO) Vocк Juntou +1 de Exp! (%d/5)",dini_Int(file, "EXP"));
PlayerPlaySound(i, 1057, 0, 0, 0);
SendClientMessage(i, 0x75EA00AA, string);
dini_IntSet(file, "TempoEXP",0);
}
//Upou
if(dini_Int(file, "EXP") >=5)
{
dini_IntSet(file, "Level", dini_Int(file, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк acumulou 5 de EXP, e Ganhou Mas Um Level! [Level Atual (%d) ] ",dini_Int(file, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
PlayerPlaySound(i, 1057, 0, 0, 0);
dini_IntSet(file, "EXP",0);
}
}
}
}
Entгo eu queria q o level passa-se normal .. ganhando sua exp.. ._.
PS: Isto nгo esta ne um 'fs' ou 'inc' estб no gm , obvio q nao vou postar o gm todo aqui '-'
PHP код:
public LevelUP() // Fim GameMode.
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            new
                
string[256],
                
aname[MAX_PLAYER_NAME]
            ;
            
GetPlayerName(ianameMAX_PLAYER_NAME);
            if(
AFK[i] == && PlayerInfo[i][Logged] == 1)
            {
                
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(stringsizeof(string), "| UP | Vocк ganhou +1 de experiкncia! [ %d / 5 ]",dini_Int(file"EXP"));
                
PlayerPlaySound(i1133000);
                
SendClientMessage(i0x33AAFFFFstring);
                
dini_IntSet(file"Tempo",0);
            }
            if(
dini_Int(file"EXP") >=5)
            {
                
dini_IntSet(file"Level"dini_Int(file"Level")+1);
                
format(stringsizeof(string), "(INFO) Vocк juntou 5 de respeito, e ganhou +1 level. (%d) ",dini_Int(file"Level"));
                
SendClientMessage(i0x75EA00AAstring);
                
PlayerPlaySound(i1057000);
                
dini_IntSet(file"EXP",0);
            }
        }
    }

aprenda a identar seus codigos =)
Reply
#5

Quote:
Originally Posted by [LF]PlaYer
Посмотреть сообщение
Hm.. boa ideia z.z vo fazer assim vlw ' '-'
seu cintura de ovo
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)