SA-MP Forums Archive
Vehicle Deletion ? - 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 Deletion ? (/showthread.php?tid=336840)



Vehicle Deletion ? - DrGreen97 - 23.04.2012

Does anyone know a filterscript that allows you to delete vehicles. because there are somecars on my server that i just want to remove


Re: Vehicle Deletion ? - Tom1412 - 23.04.2012

just remove them then, cos they have to be in a script for them to be in the game. just goto that car and do /save nearest to it and look for the clostest to though cords in ur gm under addstaticveh or addstaticvehEx


Re: Vehicle Deletion ? - antonio112 - 24.04.2012

Or even better, get in the specific car by pressing F (enter as driver) then use /save. And in your My Documents, you should have the saved coordinates. Copy the line and use it to find your car in your gamemode.


Re: Vehicle Deletion ? - 2KY - 24.04.2012

I really don't think this is anything like he wanted...

If it's a static vehicle you've added, you can either delete the AddStaticVehicle(Ex) line, or use the DestroyVehicle function.

pawn Код:
AddStaticVehicle( MODEL, X, Y, Z, A, C1, C2 );
Of course these would be filled in with numbers, but if you're looking to do the DestroyVehicle method..

Find the vehicle ID. You can use a simple command like..

pawn Код:
if(!strcmp(cmdtext, "/getvid", true))
    {
        new vStr [ 64 ];
        format( vStr, sizeof( vStr ), "Current Vehicle ID: %d", GetPlayerVehicleID ( playerid ) );
        return SendClientMessage( playerid, -1, vStr );
    }
Use that command inside of a vehicle to find its ID, OR you could use a command such as ...

pawn Код:
if(!strcmp(cmdtext, "/destroyvehicle", true))
    {
        if( IsPlayerInAnyVehicle( playerid ) )
        {
            DestroyVehicle( GetPlayerVehicleID( playerid ) );
        }
        return true;
    }
And delete it in-game.