[Help] Best method to make repair pickup(?)
#1

Hey
I want to make script with repair pickups, but there is bug with the pickup ID 14 in SAMP through objects.
Well, I thought to make with timer:
SetTimer("RepairPickup", 50, true);
and by loop:
PHP код:
forward RepairPickups();
public 
RepairPickups()
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i) && GetPlayerState(i) == 2)
        {
            for(new 
reprep 100rep++)
            {
                if(
IsPlayerInRangeOfPoint(i5RepairPickups[rep][Pos][0], RepairPickups[rep][Pos][1], RepairPickups[rep][Pos][2]))
                {
                    
RepairVehicle(GetPlayerVehicleID(i));
                }
            }
        }
    }

The question if that will make lags with 50+ players?
I did the timer to "50" because if someone driving to fast he can miss the pickup.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)