destroy ownervehicle
#1

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
Reply
#2

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)