Respawn nearby vehicles
#1

Hello, anybody know how to create hm command to respawn nearby vehicles?
Reply
#2

Quote:
Originally Posted by pziemczyk
Hello, anybody know how to create hm command to respawn nearby vehicles?
How you mean?

To spawn a whole new vehicle with a command like with /landstalker that it creates a vehicle ?

I don't get it, because vehicles are streamed already in samp 0.3
Reply
#3

here is one

http://forum.sa-mp.com/index.php?topic=74035.0
Reply
#4

Respawn = Reset
Reset to spawn nearby vehicles...
Reply
#5

UP, please help me with this problem.
Reply
#6

pawn Код:
RespawnNearbyVehicles(playerid, Float:radi)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    for(new i=1; i<MAX_VEHICLES; i++)
    {
        if(GetVehicleModel(i))
        {
            new Float:posx, Float:posy, Float:posz;
            new Float:tempposx, Float:tempposy, Float:tempposz;
            GetVehiclePos(i, posx, posy, posz);
            tempposx = (posx - x);
            tempposy = (posy - y);
            tempposz = (posz - z);
            if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
            {
                SetVehicleToRespawn(i);
            }
        }
    }
}
If you use RespawnNearbyVehicles(playerid, 10); then it will respawn all vehicles in radius of 10.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)