Problem with vehicle system
#1

I create a system vehicle with this tutorial: This!
And I create a command to delete vehicles:
pawn Код:
CMD:borrarvehiculo(playerid, params[])
{
    new vehicleID, string[128], File[25];
    if(sscanf(params, "d", vehicleID)) return SendClientMessage(playerid, -1, "{FF0000}« ! » {FFFFFF}/borrarvehiculo <vehicleid>");
    if(validcar[vehicleID] == false) return SendClientMessage(playerid, -1, "{FF0000}« ! » {FFFFFF}ID Invalida");
    validcar[vehicleID] = false;
    DestroyVehicle(vehicleID);
    format(File, sizeof(File), "/Vehiculos/%d.ini", vehicleID);
    fremove(File);
    return 1;
}
But when I remove the file and restart the server, The next car ID spawn with the Removed carID, and with his own carID (duplicate).
How to resolve this?
I try a loopback and remove the upper ID, but doesn't work
Reply
#2

anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)