server lagg
#6

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Looks like thats your problem, your server is more or less doing an infinite loop. If i was you I'd find a better way of doing that. "IsVehicleCloseSpike" probably has a loop too (and range check maybe) so your embedding loops in a callback that gets called many times per second - per player..
here is function
pawn Код:
stock IsVehicleCloseSpike(playerid, vehicleid, Float:range)
{
    new Float:vX, Float:vY, Float:vZ;
    GetVehiclePos(vehicleid, vX, vY, vZ);
    for(new i = 0; i < sizeof(SpikeData); i++)
    {
        if(IsPlayerInRangeOfPoint(playerid, range, SpikeData[i][SpikeX], SpikeData[i][SpikeY], SpikeData[i][SpikeZ])
        && IsPlayerInRangeOfPoint(playerid, range, vX, vY, vZ) && IsPlayerInAnyVehicle(playerid))
        {
            if(SpikeData[i][SpikeCreated] == 1)
            {
                return true;
            }
        }
    }
    return false;
}
so this create lagg? how can i do it then, i must pop tier if close spike
Reply


Messages In This Thread
server lagg - by Unknown123 - 28.09.2011, 16:43
Re: server lagg - by [MWR]Blood - 28.09.2011, 16:46
Re: server lagg - by Unknown123 - 28.09.2011, 16:47
Re: server lagg - by Kingunit - 28.09.2011, 16:49
Re: server lagg - by iggy1 - 28.09.2011, 17:00
Re: server lagg - by Unknown123 - 28.09.2011, 17:26
Re: server lagg - by [MWR]Blood - 28.09.2011, 17:29
Re: server lagg - by Vince - 28.09.2011, 17:50
Re: server lagg - by Unknown123 - 28.09.2011, 17:56
Re: server lagg - by [MWR]Blood - 28.09.2011, 18:05

Forum Jump:


Users browsing this thread: 1 Guest(s)