Streamer Checkpoints
#1

So I have played around with Checkpoints, but it seems that the server is lagging too much when I am detecting checkpoints. This is what I've got.

pawn Код:
public OnPlayerUpdate(playerid)
{
    new wID = GetPlayerVirtualWorld(playerid);
    for(new o = 1; o<1000; o++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5, hInfo[o][hEx], hInfo[o][hEy], hInfo[o][hEz]) && hInfo[o][CP] == 0)
        {
            hInfo[o][CP] = CreateDynamicCP(hInfo[o][hEx], hInfo[o][hEy], hInfo[o][hEz], 1, -1, -1, -1, 100);
        }
        if(!IsPlayerInRangeOfPoint(playerid, 5, hInfo[o][hEx], hInfo[o][hEy], hInfo[o][hEz]) && hInfo[o][CP] != 0)
        {
            DestroyDynamicCP(hInfo[o][CP]);
            hInfo[o][CP] = 0;
        }
        if(!IsPlayerInRangeOfPoint(playerid, 2, hInfo[wID][hExitx], hInfo[wID][hExity], hInfo[wID][hExitz]) && AtHExit[playerid] == 1)
        {
            AtHExit[playerid] = 0;
            PlayerTextDrawHide(playerid, DoorDraw[playerid]);
        }
    }
}
Any help would be appreciated.
Reply
#2

Bump, plz help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)