if (strcmp(cmd, "/adquirirnivel", true) == 0) { if (gPlayerLogged[playerid] != 0) { if(PlayerInfo[playerid][pLevel] >= 0) { new infostring[256]; if (PlayerInfo[playerid][pExp] < expamount) { format(infostring, 256, " Vocк precisa de %d pontos de respeito, vocк tem [%d] !",expamount,PlayerInfo[playerid][pExp]); SendClientMessage(playerid, COLOR_GRAD1, infostring); return 1; } else { format(string, sizeof(string), "~g~LEVEL adquirido~n~~w~voce estЃ agora nўvel %d", nxtlevel); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); PlayerPlayMusic(playerid); PlayerInfo[playerid][pLevel]++; PlayerInfo[playerid][pExp] = 0; PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2; GameTextForPlayer(playerid, string, 5000, 1); format(infostring, 256, " Vocк ganhou %d pontos de atualizaзгo",PlayerInfo[playerid][gPupgrade]); SendClientMessage(playerid, COLOR_GRAD2, infostring); levelexp[playerid] = 4; if(PlayerInfo[playerid][pLevel] >= 8) { levelexp[playerid] = 5; } if(PlayerInfo[playerid][pLevel] >= 11) { levelexp[playerid] = 6; } if(PlayerInfo[playerid][pLevel] >= 14) { levelexp[playerid] = 7; } if(PlayerInfo[playerid][pLevel] >= 17) { levelexp[playerid] = 8; } } } return 1; } else { SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo fez o Loggin !"); } } return 1; }
jб tentei isso
o problema й que tipo quando o cara consegue respeito suficiente e usa o comando, a partir da segunda vez ele jб tб com 0 de respeito,mas consegue usar o comando mesmo com 0... |
if (strcmp(cmd, "/adquirirnivel", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] != 0)
{
if(PlayerInfo[playerid][pLevel] >= 0)
{
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
new infostring[256];
new expamount = PlayerInfo[playerid][pLevel]*2;
if (PlayerInfo[playerid][pExp] < expamount)
{
format(infostring, 256, " Vocк precisa de %d pontos de respeito, vocк tem [%d] !",expamount,PlayerInfo[playerid][pExp]);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
return 1;
}
else
{
format(string, sizeof(string), "~g~LEVEL adquirido~n~~w~voce estЃ agora nўvel %d", nxtlevel);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerPlayMusic(playerid);
PlayerInfo[playerid][pLevel]++;
PlayerInfo[playerid][pExp] = 0;
PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
GameTextForPlayer(playerid, string, 5000, 1);
levelexp[playerid] = 4;
if(PlayerInfo[playerid][pLevel] >= 8) { levelexp[playerid] = 5; }
if(PlayerInfo[playerid][pLevel] >= 11) { levelexp[playerid] = 6; }
if(PlayerInfo[playerid][pLevel] >= 14) { levelexp[playerid] = 7; }
if(PlayerInfo[playerid][pLevel] >= 17) { levelexp[playerid] = 8; }
}
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo fez o Loggin !");
}
}
return 1;
}