consulta horas
#6

El sistema de niveles del servidor esta diseсado de esa manera, si queres hacerlo de otra forma entonces tendrнas que hacer uno nuevo, una idea :

pawn Код:
zcmd(subirnivel, playerid, params[])
    {
new horasjugando = Info[playerid][pExp];
        if(Info[playerid][pLevel] >= 0)
        {
if( horasjugando >= 200 && horasjugando < 300  ) { Info[playerid][pLevel] = 2;  }
else if( horasjugando >= 300 && horasjugando < 400  ) { Info[playerid][pLevel] = 3; }
else if( horasjugando >= 400 && horasjugando < 500   ) { Info[playerid][pLevel] = 4;  }
else if( horasjugando >= 500 && horasjugando < 600  ) { Info[playerid][pLevel] = 5;  }
else if( horasjugando >= 600 && horasjugando < 700  ) { Info[playerid][pLevel] = 6;  }
else if( horasjugando >= 700 && horasjugando < 800  ) { Info[playerid][pLevel] = 7;  }
else if( horasjugando >= 800 && horasjugando < 900  ) { Info[playerid][pLevel] = 8;  }
else if( horasjugando >= 900 && horasjugando < 1000  ) { Info[playerid][pLevel] = 9;  }
else if( horasjugando >= 1000 && horasjugando < 1100  ) { Info[playerid][pLevel] = 10;  }
else if( horasjugando >= 1100) { Info[playerid][pLevel] = 11;  }
else
{
SendClientMessage(playerid, -1, "No tienes suficiente experiencia para subir de nivel");
return 1;
}
        }
        new infostring[128];
                format(infostring, sizeof(infostring), "~g~~h~Nivel %d!", Info[playerid][pLevel]);
                GameTextForPlayer(playerid, infostring, 5000, 1);
                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                Info[playerid][pExp] = horasjugando;
                OnPlayerSavedStats(playerid);

        return 1;
    }
Aunque hacerlo de esta manera seria algo trivial, saludos.
Reply


Messages In This Thread
consulta horas - by Jeree10 - 08.06.2014, 15:53
Respuesta: consulta horas - by LeonardoEscobar - 08.06.2014, 23:11
Respuesta: consulta horas - by Jeree10 - 09.06.2014, 00:44
Respuesta: consulta horas - by LeonardoEscobar - 09.06.2014, 00:50
Respuesta: consulta horas - by Jeree10 - 09.06.2014, 01:08
Re: consulta horas - by LeonardoEscobar - 09.06.2014, 03:03
Respuesta: consulta horas - by Jeree10 - 09.06.2014, 03:18
Re: consulta horas - by LeonardoEscobar - 09.06.2014, 03:28

Forum Jump:


Users browsing this thread: 1 Guest(s)