SA-MP Forums Archive
destroy ownervehicle - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: destroy ownervehicle (/showthread.php?tid=182263)



destroy ownervehicle - FrankC - 09.10.2010

Im trying to destroy a owned vehicle
but it only destroys the vehicle im in but i still got the vehicle? its just not there

Pretty hard to explaine if you didnt understand please let me know!

pawn Код:
if(strcmp(cmd, "/destroycar", true) == 0 )
        {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED," You are not in a vehicle !");
        //if(IsBuyableCar[vehicleid])
        if(Owned[vehicleid])
            {
            if (strmatch(VehicleSystem[IsBuyableCar[vehicleid]][Owner],PlayerName(playerid)))
                {
                DestroyVehicle(vehicleid);
                SendClientMessage(playerid,COLOR_GREEN," You have destroyed your vehicle !");
                RemovePlayerFromVehicle(playerid);
                SaveMYSQLCarID(vehicleid);
                }

            else
                {
                SendClientMessage(playerid,COLOR_RED," This is not your vehicle !");
                }
            }

        return 1;
        }
Never mind works now


Re: destroy ownervehicle - Scenario - 09.10.2010

It destroys the vehicle from the server, but when it restarts, the vehicle reappears. Am I correct?


Re: destroy ownervehicle - FrankC - 09.10.2010

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
It destroys the vehicle from the server, but when it restarts, the vehicle reappears. Am I correct?
Correct! Works now