This code instead of re-spawning cars, they remove it.
#1

pawn Код:
forward VehicleReset();
public VehicleReset()
{
    new inVeh;
    for( new i = 0; i < MAX_VEHICLES; i++ )
    {
    inVeh = false;
        for( new j = 0; j < MAX_PLAYERS; j++ )
        {
        if(IsPlayerInVehicle( j, i ))
            {
                inVeh = true;
                break;
            }
        }
        if(!inVeh)
        {
            SetVehicleToRespawn(i);
            DestroyVehicle(i);
        }
    }
}
Reply
#2

Whats your problem? If you dont wanna destroy them just delete DestroyVehicle.
Reply
#3

Quote:
Originally Posted by Fedee!
Whats your problem? If you dont wanna destroy them just delete DestroyVehicle.
That doesn't work, It respawns a car, but not the same one that was moved.
Reply
#4

that was Epic delete destroyvehicle lol
Reply
#5

Quote:
Originally Posted by HydraX
Quote:
Originally Posted by Fedee!
Whats your problem? If you dont wanna destroy them just delete DestroyVehicle.
That doesn't work, It respawns a car, but not the same one that was moved.
If I understanded, you wanna delete the car first, and then put it to respawn?
Reply
#6

Quote:
Originally Posted by Fedee!
Quote:
Originally Posted by HydraX
Quote:
Originally Posted by Fedee!
Whats your problem? If you dont wanna destroy them just delete DestroyVehicle.
That doesn't work, It respawns a car, but not the same one that was moved.
If I understanded, you wanna delete the car first, and then put it to respawn?
Shbingo.
Reply
#7

Quote:
Originally Posted by [GM
LeGenDy ]
that was Epic delete destroyvehicle lol
You don't even know what were talking about do you? Post something useful instead.
Reply
#8

Try thisNot TESTED!)
Quote:
Originally Posted by HydraX
pawn Код:
#include <gl_common>
forward VehicleReset();
public VehicleReset()
{
    new inVeh;
    for( new i = 0; i < MAX_VEHICLES; i++ )
    {
    inVeh = false;
        for( new j = 0; j < MAX_PLAYERS; j++ )
        {
        if(IsPlayerInVehicle( j, i ))
            {
                inVeh = true;
                break;
            }
        }
        if(!inVeh)
        {
            SetVehicleToRespawn(i);
            DestroyVehicle(i);
              total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/vehicles.cfg"); //Put a file on yourserver/scripfiles/vehicles called vehicles.cfg and you put it like this : modelid,x,y,z,rot,color1,color2
        }
    }
}
That should work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)