[AYUDA] Comando /subirnivel
#3

Quote:
Originally Posted by C1ruj4n0
Посмотреть сообщение
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;
}
Ese cуdigo no se contradice? 'si es mayor o igual a 0 y luego si es menor o igual a 1'?
Reply


Messages In This Thread
[AYUDA] Comando /subirnivel - by EternoFus - 01.07.2014, 03:27
Respuesta: [AYUDA] Comando /subirnivel - by C1ruj4n0 - 01.07.2014, 11:41
Respuesta: [AYUDA] Comando /subirnivel - by aoEXE - 01.07.2014, 20:17

Forum Jump:


Users browsing this thread: 1 Guest(s)