26.05.2010, 18:16
Tenta isso
pawn Код:
if (strcmp(cmd, "/adquirirnivel", true) == 0)
{
new nxtlevel = PlayerInfo[targetid][pLevel]+1;
new expquantidade = PlayerInfo[playerid][pExp];
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] != 0)
{
if(PlayerInfo[playerid][pLevel] >= 0)
{
new infostring[256];
if (PlayerInfo[playerid][pExp] ,expquantidade)
{
format(infostring, 256, " Vocк precisa de %d pontos de respeito, vocк tem [%d] !",expquantidade, PlayerInfo[playerid][pExp]);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
return 1;
}
else
{
format(string, sizeof(string), "~g~LEVEL adquirido~n~~w~agora voce esta no level %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 estб Logado");
}
}
return 1;
}