Print Trailer to txt
#4

Try something like this

PHP код:
stock SaveTrailers(trailerID) {
    new
        
sz_Entry[128],
        
FilefileHandle fopen("trailers.txt"io_append),
        
Float:tmpCoords[3];
    new 
trailerModel GetVehicleModel(trailerID);
    
GetVehiclePos(trailerIDtmpCoords[0], tmpCoords[1], tmpCoords[2]);
    
format(sz_Entrysizeof(sz_Entry), "CreateVehicle(%d, %f, %f, %f, 0, -1, -1, 6000000);"trailerModeltmpCoords[0], tmpCoords[1], tmpCoords[2]);
    
fwrite(fileHandlesz_Entry);
    return 
fclose(fileHandle);

PHP код:
CMD:printtrailer(playeridparams[])
{
    
SaveTrailers(GetPlayerVehicleID(playerid));
    
SendClientMessageToAll(-1"Saved this Trailer");
    return 
1;

Not tested it, but it should work.
Reply


Messages In This Thread
Print Trailer to txt - by DerickClark - 09.07.2018, 18:24
Re: Print Trailer to txt - by Florin48 - 09.07.2018, 19:15
Re: Print Trailer to txt - by DerickClark - 09.07.2018, 19:28
Re: Print Trailer to txt - by ItsRobinson - 09.07.2018, 19:37
Re: Print Trailer to txt - by DerickClark - 09.07.2018, 19:45
Re: Print Trailer to txt - by Florin48 - 09.07.2018, 19:48

Forum Jump:


Users browsing this thread: 2 Guest(s)