[Duda] Variables PVars
#7

Quote:
Originally Posted by oOFotherOo
Посмотреть сообщение
Muchas gracias en verdad las arrays son mas rapidas, aunque se llevan poco en diferencia.

Test:
pawn Код:
#include <a_samp>

#undef MAX_PLAYERS
#define MAX_PLAYERS     (1000000)  

enum pData
{
  array,
};
new PlayerInfo[MAX_PLAYERS][pData];

public OnFilterScriptInit()
{
    //==========================================================================

    new
        dCount = GetTickCount();

    for(new i; i < MAX_PLAYERS; ++i)
    {
        PlayerInfo[i][array] = 1;
    }

    printf("[Array] Funciуn: %d - Tiempo: %d", MAX_PLAYERS,(GetTickCount()  - dCount));

    //==========================================================================

    new
        bCount = GetTickCount();
    for(new i; i < MAX_PLAYERS; ++i)
    {
        SetPVarInt(i, "array", 1);
    }
    printf("[PVars] Funciуn: %d - Tiempo: %d", MAX_PLAYERS,(GetTickCount()  - bCount));

    //==========================================================================
    return true;
}
el test estб mal, las pvars no funcional con ids arriba de max_players definido en en server.cfg ademбs que el jugador debe estar conectado para poderle asignar un valor.
Reply


Messages In This Thread
[Duda] Variables PVars - by oOFotherOo - 26.11.2012, 13:01
Respuesta: [Duda] Variables PVars - by TheChaoz - 26.11.2012, 13:42
Respuesta: [Duda] Variables PVars - by oOFotherOo - 26.11.2012, 14:07
Respuesta: [Duda] Variables PVars - by TheChaoz - 26.11.2012, 14:27
Respuesta: [Duda] Variables PVars - by oOFotherOo - 26.11.2012, 14:53
Respuesta: [Duda] Variables PVars - by Fluid016 - 26.11.2012, 15:49
Re: Respuesta: [Duda] Variables PVars - by Daniel-92 - 26.11.2012, 17:07
Respuesta: [Duda] Variables PVars - by oOFotherOo - 26.11.2012, 19:53
Re: [Duda] Variables PVars - by Daniel-92 - 27.11.2012, 00:37
Respuesta: [Duda] Variables PVars - by DesingMyCry - 27.11.2012, 01:32

Forum Jump:


Users browsing this thread: 2 Guest(s)