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);
}
}
}
}
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 Код:
PS: Isto nгo esta ne um 'fs' ou 'inc' estб no gm , obvio q nao vou postar o gm todo aqui '-' |
public LevelUP() // Fim GameMode.
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new
string[256],
aname[MAX_PLAYER_NAME]
;
GetPlayerName(i, aname, MAX_PLAYER_NAME);
if(AFK[i] == 0 && 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(string, sizeof(string), "| UP | Vocк ganhou +1 de experiкncia! [ %d / 5 ]",dini_Int(file, "EXP"));
PlayerPlaySound(i, 1133, 0, 0, 0);
SendClientMessage(i, 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, "Level"));
SendClientMessage(i, 0x75EA00AA, string);
PlayerPlaySound(i, 1057, 0, 0, 0);
dini_IntSet(file, "EXP",0);
}
}
}
}