CMD:savevehicles(playerid,params[]){new i=1,str[128],Float:vX,Float:vY,Float:vZ,Float:vA;new File:hFile;hFile = fopen(\"vehicles.txt\", io_append);while(GetVehicleModel(i)){ GetVehiclePos(i,vX,vY,vZ); GetVehicleZAngle(i,vA); format(str,sizeof str,\"CreateVehicle(%d, %.4f, %.4f, %.4f, %.4f, %d, %d, %d); \\r\\n\",GetVehicleModel(i),vX,vY,vZ,vA,-1,-1,-1); if (hFile) fwrite(hFile, str); i++;}fclose(hFile);format(str,sizeof str,\"Sikeresen lementettél %d darab jármûvet!\",i);SendClientMessage(playerid,0xFFFFFFFF,str);return 1;}
public OnVehicleSpawn(vehicleid){new str[128],Float:vX,Float:vY,Float:vZ,Float:vA;new File:hFile;hFile = fopen(\"vehicles.txt\", io_append); GetVehiclePos(vehicleid,vX,vY,vZ); GetVehicleZAngle(vehicleid,vA); format(str,sizeof str,\"CreateVehicle(%d, %.4f, %.4f, %.4f, %.4f, %d, %d, %d); \\r\\n\",GetVehicleModel(vehicleid),vX,vY,vZ,vA,-1,-1,-1);if (hFile) fwrite(hFile, str);fclose(hFile);return 1;}
CMD:savevehicles(playerid,params[]){new i=1,str[128],Float:vX,Float:vY,Float:vZ,Float:vA;new File:hFile;hFile = fopen(\"vehicles.txt\", io_append);while(GetVehicleModel(i)){ GetVehiclePos(i,vX,vY,vZ); GetVehicleZAngle(i,vA); format(str,sizeof str,\"CreateVehicle(%d, %.4f, %.4f, %.4f, %.4f, %d, %d, %d); \\r\\n\",GetVehicleModel(i),vX,vY,vZ,vA,-1,-1,-1); if (hFile) fwrite(hFile, str); i++;}fclose(hFile);format(str,sizeof str,\"Sikeresen lementettél %d darab jármûvet!\",i);SendClientMessage(playerid,0xFFFFFFFF,str);return 1;} Vagy public OnVehicleSpawn(vehicleid){new str[128],Float:vX,Float:vY,Float:vZ,Float:vA;new File:hFile;hFile = fopen(\"vehicles.txt\", io_append); GetVehiclePos(vehicleid,vX,vY,vZ); GetVehicleZAngle(vehicleid,vA); format(str,sizeof str,\"CreateVehicle(%d, %.4f, %.4f, %.4f, %.4f, %d, %d, %d); \\r\\n\",GetVehicleModel(vehicleid),vX,vY,vZ,vA,-1,-1,-1);if (hFile) fwrite(hFile, str);fclose(hFile);return 1;} Zeli készítette.