Y_INI fexist problem - 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: Y_INI fexist problem (
/showthread.php?tid=552223)
Y_INI fexist problem -
VincenzoDrift - 23.12.2014
Sorry for my bad english
Then I created a vehicle that works well .. I was trying to create a command that deletes a vehicle and its file in scriptfiles. Now the command works almost fine, but I make an example. If I create a vehicle and try to use the command, it does not work because it can not find the file of the vehicle. If I create the vehicle and close the gamemode and restart ... the command works. Y_ini creates files only on exit of the gamemode? I think that's the problem ...
ignored the language code
Код:
CMD:cancellaveicolo(playerid, params[])
{
new vehicleID;
if(!IsPlayerAdmin(playerid)) return MandaErrore(playerid, "Devi essere un admin di livello 6 per usare questo comando");
if(sscanf(params, "i", vehicleID)) return MandaUsa(playerid, "/cancellaveicolo [vehicleid]");
if(fexist(FileVeicolo(vehicleID)))
{
ResetVeicolo(vehicleID);
DestroyVehicle(vehicleID);
fremove(FileVeicolo(vehicleID));
format(stringa, sizeof(stringa), "Veicolo cancellato con successo | ID: %d", vehicleID);
MandaInfo(playerid, stringa);
}
else MandaErrore(playerid, "ID Veicolo non valido");
return 1;
}