01.07.2014, 11:41
pawn Код:
zcmd(subirnivel, playerid, params[])
{
if(Info[playerid][pLevel] >= 0)
{
new nxtlevel = Info[playerid][pLevel]+6;
new expamount = nxtlevel*explevel;
if(Info[playerid][pExp] < expamount)
{
new infostring[128];
format(infostring, 128, "Necesitas %i puntos de respeto mбs para subir de nivel, tienes %d.",expamount,Info[playerid][pExp]);
SendClientMessageEx(playerid, COLOR_GRAD1, infostring);
return 1;
}
else
{
new infostring[64];
format(infostring, sizeof(infostring), "~g~~h~Nivel %d!", nxtlevel);
GameTextForPlayer(playerid, infostring, 5000, 1);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
Info[playerid][pLevel]++;
Info[playerid][pExp] = Info[playerid][pExp]-expamount;
OnPlayerSavedStats(playerid);
if(Info[playerid][pLevel] == 5) SendClientMessageEx(playerid, COLOR_GRAD1, "[LEVEL 5]: El canal de ayuda serб deshabilitado automбticamente al ingresar al servidor");
}
}
if(Info[playerid][pLevel] <= 1)
{
new nxtlevel = Info[playerid][pLevel]+6;//modifica este valor
new expamount = nxtlevel*explevel;
if(Info[playerid][pExp] < expamount)
{
new infostring[128];
format(infostring, 128, "Necesitas %i puntos de respeto mбs para subir de nivel, tienes %d.",expamount,Info[playerid][pExp]);
SendClientMessageEx(playerid, COLOR_GRAD1, infostring);
return 1;
}
else
{
new infostring[64];
format(infostring, sizeof(infostring), "~g~~h~Nivel %d!", nxtlevel);
GameTextForPlayer(playerid, infostring, 5000, 1);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
Info[playerid][pLevel]++;
Info[playerid][pExp] = Info[playerid][pExp]-expamount;
OnPlayerSavedStats(playerid);
if(Info[playerid][pLevel] == 5) SendClientMessageEx(playerid, COLOR_GRAD1, "[LEVEL 5]: El canal de ayuda serб deshabilitado automбticamente al ingresar al servidor");
}
return 1;
}