SA-MP Forums Archive
Problem with vehicle system - 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: Problem with vehicle system (/showthread.php?tid=529996)



Problem with vehicle system - FullCircle - 04.08.2014

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


Respuesta: Problem with vehicle system - FullCircle - 05.08.2014

anyone?