SA-MP Forums Archive
A problem with saving skins to a file when a player leaves - 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: A problem with saving skins to a file when a player leaves (/showthread.php?tid=351626)



A problem with saving skins to a file when a player leaves - [NWA]Hannes - 16.06.2012

Hello, I am currently beginning a small project, and I want the skin to save when somebody disconnects from the server.

I have made a small /skin command to change your skin in-game.

The problem is, I connect to the game for the first time, set my skin to 294 for example, then I leave and reconnect I get skin 0 again.

I go in-game, set my skin to 294 with /skin, and leave the server. I go into my scriptfiles folder and check, and its empty, and my skin gets 0 when I join the server.

Here is my properly indented code that I put in a pastebin file so it gets easier to view.
http://pastebin.com/peh27e0u

All help is appreciated!


Re: A problem with saving skins to a file when a player leaves - [NWA]Hannes - 16.06.2012

Fixed: Forgot to create the file before I saved the skin