Delete cars
#1

So, i have two car spawn commands, one is admin vehicles and one is normal vehicles, i can delete the admin ones but not the normal ones, it says that its static,

pawn Code:
if(Dead[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command When Dead.");
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You Must Be In A Vehicle To Use This Command.");
        if(AdminCar[GetPlayerVehicleID(playerid)] == 0) return SendClientMessage(playerid, COLOR_RED, "You Cannot Delete A Static Car.");
        format(log, sizeof log, "Admin %s Has Deleted Vehicle ID %d. Model: %d.", PlayerName(playerid), GetPlayerVehicleID(playerid), GetVehicleModel(GetPlayerVehicleID(playerid)));
        DestroyVehicle(GetPlayerVehicleID(playerid));
        return 1;
    }
    else if(!sscanf(params, "d", vehid))
    {
        if(!IsValidVehicle(vehid)) return SendClientMessage(playerid, COLOR_RED, "This Vehicle Doesn't Exist In The Server.");
        if(AdminCar[vehid] == 0) return SendClientMessage(playerid, COLOR_RED, "You Cannot Delete A Static Car.");
        format(log, sizeof log, "Admin %s Has Deleted Vehicle ID %d. Model: %d.", PlayerName(playerid), vehid, GetVehicleModel(vehid));
        DestroyVehicle(vehid);
        return 1;

    }
Ive tryed adding

pawn Code:
if(AdminCar[vehid] && NormalCar[vehid] == 0)
but it doesnt work...
Reply
#2

if(AdminCar[vehid] == 0) return SendClientMessage(playerid, COLOR_RED, "You Cannot Delete A Static Car.");
remove it
maybe it will work
Reply
#3

What?

Stop posting non-sense stuff please....
Reply
#4

Show me full cmd start to end
then i can understand what you need
Reply
#5

if(AdminCar[vehid] == 0) this won't let u delete any other veh
Reply
#6

It lets me to remove the admin car and not static vehicles which is good, but i want to add NormalCar too
Reply
#7

Bump
Reply
#8

this will return if the car is not admin car it doesn't matter if it's any else car it wont let u delete it until it's admin car
Reply
#9

But it does
Reply
#10

this means if it's not admin car it wont let u delete it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)