[AJUDA] Sistema UP upando para 1 player -
Chis - 18.01.2012
O level nгo esta indo para 2+ players, ta indo sу pra 1
pawn Код:
public LevelUP()
{
new
string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
EXP[i]++; // Dando Exp pro Player
GameTextForPlayer(i,"~g~+1 ~n~ ~y~Exp",3000,1);
if(EXP[i] == 4)
{ //aki ele irб checar se o jogador tem a exp nescessaria
//Level[i]++;
dini_IntSet(arquivo, "Level", dini_Int(arquivo, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк juntou 4 Exp, portanto vocк ganhou +1 level. [ Level Atual %d] ",dini_Int(arquivo, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
}
if(EXP[i] == 8)
{
//Level[i]++;
dini_IntSet(arquivo, "Level", dini_Int(arquivo, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк juntou 8 Exp, portanto vocк ganhou +1 level. [ Level Atual %d] ",dini_Int(arquivo, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
}
if(EXP[i] == 16)
{
//Level[i]++;
dini_IntSet(arquivo, "Level", dini_Int(arquivo, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк juntou 16 Exp, portanto vocк ganhou +1 level. [ Level Atual %d] ",dini_Int(arquivo, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
}
if(EXP[i] == 24)
{
//Level[i]++;
dini_IntSet(arquivo, "Level", dini_Int(arquivo, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк juntou 24 Exp, portanto vocк ganhou +1 level. [ Level Atual %d] ",dini_Int(arquivo, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
}
if(EXP[i] == 28)
{
//Level[i]++;
dini_IntSet(arquivo, "Level", dini_Int(arquivo, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк juntou 28 Exp, portanto vocк ganhou +1 level. [ Level Atual %d] ",dini_Int(arquivo, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
}
if(EXP[i] == 32)
{
//Level[i]++;
dini_IntSet(arquivo, "Level", dini_Int(arquivo, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк juntou 32 Exp, portanto vocк ganhou +1 level. [ Level Atual %d] ",dini_Int(arquivo, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
}
if(EXP[i] == 36)
{
Level[i]++;
format(string, sizeof(string), "(INFO) Vocк juntou 36 Exp, portanto vocк ganhou +1 level. [ Level Atual %d] ",dini_Int(arquivo, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
}
if(EXP[i] == 40)
{
//Level[i]++;
dini_IntSet(arquivo, "Level", dini_Int(arquivo, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк juntou 40 Exp, portanto vocк ganhou +1 level. [ Level Atual %d] ",dini_Int(arquivo, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
}
if(EXP[i] == 44)
{
Level[i]++;
//dini_IntSet(arquivo, "Level", dini_Int(arquivo, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк juntou 44 Exp, portanto vocк ganhou +1 level. [ Level Atual %d] ",dini_Int(arquivo, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
}
if(EXP[i] == 48)
{
//Level[i]++;
dini_IntSet(arquivo, "Level", dini_Int(arquivo, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк juntou 48 Exp, portanto vocк ganhou +1 level. [ Level Atual %d] ",dini_Int(arquivo, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
}
if(EXP[i] == 52)
{
Level[i]++;
format(string, sizeof(string), "(INFO) Vocк juntou 52 Exp, portanto vocк ganhou +1 level. [ Level Atual %d] ",dini_Int(arquivo, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
}
if(EXP[i] == 56)
{
//Level[i]++;
dini_IntSet(arquivo, "Level", dini_Int(arquivo, "Level")+1);
format(string, sizeof(string), "(INFO) Vocк juntou 56 Exp, portanto vocк ganhou +1 level. [ Level Atual %d] ",dini_Int(arquivo, "Level"));
GameTextForPlayer(i,"~g~Level ~n~ ~y~UP",3000,1);
SendClientMessage(i, 0x75EA00AA, string);
}
}
}
}
Respuesta: [AJUDA] Sistema UP upando para 1 player -
Chis - 18.01.2012
.....
Re: [AJUDA] Sistema UP upando para 1 player -
Cristhian - 18.01.2012
pode explicar melhor ?
-
Chis - 19.01.2012
Tipo, apenas um player que recebe os respeito e level, por exemplo, ja tem um player no servidor, ai eu entro, e aparece para todo mundo Vocк recebe respeito e ganho level e tal, mais apenas 1 player recebe o respeito e level, aparece a mensagem para mim tambйm, mais essa mensagem que eu ganhei respeito e level e de outro player e nгo meu!
Re: [AJUDA] Sistema UP upando para 1 player -
DrTHE - 19.01.2012
pawn Код:
public LevelUP()
{
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") >=1)
{
dini_IntSet(file, "EXP", dini_Int(file, "EXP")+1);
format(string, sizeof(string), "» Vocк ganhou +1 exp.(%d)",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);
}
}
else
{
}
}
}
}
-
Chis - 19.01.2012
Precisa mudar algo? apareceu esses erro:
\gamemodes\ATUAL.pwn(1115) : error 017: undefined symbol "file"
\gamemodes\ATUAL.pwn(1115) : error 017: undefined symbol "file"
\gamemodes\ATUAL.pwn(1115) : error 029: invalid expression, assumed zero
\gamemodes\ATUAL.pwn(1115) : fatal error 107: too many error messages on one line
pawn Код:
[B]1115[/B] format(file, sizeof(file), PASTA_CONTAS, aname);
Re: [AJUDA] Sistema UP upando para 1 player -
Hardware - 19.01.2012
Respuesta: [AJUDA] Sistema UP upando para 1 player -
Chis - 19.01.2012
gamemodes\ATUAL.pwn(1116) : error 017: undefined symbol "AFK"
gamemodes\ATUAL.pwn(1116) : warning 215: expression has no effect
gamemodes\ATUAL.pwn(1116) : error 001: expected token: ";", but found "]"
gamemodes\ATUAL.pwn(1116) : error 029: invalid expression, assumed zero
gamemodes\ATUAL.pwn(1116) : fatal error 107: too many error messages on one line
Re: [AJUDA] Sistema UP upando para 1 player -
Hardware - 19.01.2012
Respuesta: [AJUDA] Sistema UP upando para 1 player -
Chis - 19.01.2012
(1185) : warning 203: symbol is never used: "EXP"
(1185) : warning 203: symbol is never used: "Level"
Linha nгo existe