SA-MP Forums Archive
vehicle spawner question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: vehicle spawner question (/showthread.php?tid=308590)



vehicle spawner question - the.et - 04.01.2012

Hi ,
i am new to SAMP , i have one question stuck in my mind right now.

When i put a vehicle on map , and a player drives it away , how can make it respawn within a certain peroid.
(it will not respawn if its not being driven away)

I hope someone can guide me.
Thankss


Re: vehicle spawner question - mineralo - 04.01.2012

well, when you adding vehicles there are a interval of spawn of vehicle https://sampwiki.blast.hk/wiki/CreateVehicle
if you want a cmd then look here >>
pawn Код:
if(strcmp(cmdtext,"/rv", true) == 0)
    {
        if(GetPlayerAdminz(playerid) < 1) return 0;
        if(IsPlayerInAnyVehicle(playerid))
        {
            SetVehicleToRespawn(GetPlayerVehicleID(playerid));
            SendClientMessage(playerid,COLOR_GREEN,"( ! ) Vehicle respawned !");
        }
        else
        {
        SendClientMessage(playerid,c_r,"( ! ) You must be in the vehicle you want to respawn !");
        }
        return 1;
    }
if you want you can remove checking if is admin for use this cmd


Re: vehicle spawner question - the.et - 04.01.2012

thanks.