Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: [Serious]Sam on Jul 06, 2016, 06:53 PM

Title: Deleting cars?
Post by: [Serious]Sam on Jul 06, 2016, 06:53 PM
Just deleting all vehicles from world)
function vehdel(){
local cnt = GetVehicleCount();
local i=1;
   for(i;i<=cnt;i++){
     local v = FindVehicle(i);
     v.Delete();
v = null;
    }
}
And how i can reboot my server and don't shutdown him?
Title: Re: Deleting cars?
Post by: vito on Jul 06, 2016, 07:15 PM
if(v) is not needed, yep?
Title: Re: Deleting cars?
Post by: [Serious]Sam on Jul 06, 2016, 07:17 PM
:(
Hell yeah, you're right.
But i think on this script about 10 mins, and you like a boss say my problm, no hell no(
Title: Re: Deleting cars?
Post by: [Serious]Sam on Jul 06, 2016, 07:18 PM
Quote from: vito on Jul 06, 2016, 07:15 PMif(v) is not needed, yep?
And thnx to you)
Title: Re: Deleting cars?
Post by: . on Jul 06, 2016, 08:56 PM
What is this doing in the snippets section?

Poking @Thijn
Title: Re: Deleting cars?
Post by: KAKAN on Jul 07, 2016, 04:37 AM
Wrong. If you want to delete from only a world,use this:-
http://pastebin.com/PyQLffTT

Anyway, Thijn move it to Squirrel Scripting.