SA-MP Forums Archive
Saving my pickups - Printable Version

+- SA-MP Forums Archive (
+-- Forum: SA-MP Scripting and Plugins (
+--- Forum: Scripting Help (
+--- Thread: Saving my pickups (/showthread.php?tid=443124)

Saving my pickups - Sellize - 10.06.2013

So I have a dynamic pickup making system but how can I save them so they will be there after /gmx ?


Respuesta: Saving my pickups - Parka - 10.06.2013

pawn Код:
forward PickupLog( string[] );
public PickupLog( string[] )
    new entry[ 256 ];
    format( entry, sizeof entry, "%s\n", string);
    new File:hFile;
    hFile = fopen("Pickups.txt", io_append);
    fwrite(hFile, entry);

new string[128], Float:Pos[3];
GetPlayerPos( playerid, Pos[0], Pos[1], Pos[2] );
format( string, sizeof string, "Posx: %f, Posy: %f, Posz: %f ", Pos[0], Pos[1], Pos[2]);
PickupLog( string );