Save Skin
#1

Alright so I have a dini saving system.

I want to add skins to the save file, so I added the slot to save it.
Код:
dini_IntSet(file, "skin", 0);
It works fine.

When the player logs in.

Код:
SetPlayerSkin(playerid, dini_IntSet(file, "Skin"));
Now that means everyone saves as CJ. But I want them to save as the skin they first choose. Or they change to later.

But I don't know how to get the skin their wearing, and save the ID. I tried formating it but I couldnt get it to work.

I think it would go under OnPlayerDisconnect.

Reply
#2

under OnPlayerDisconnect
try
PlayerInfoVar[playerid][Skin] = GetPlayerSkin(playerid);
replace "PlayerInfoVar" with whatever you use,and are you sure that its dini_IntSet to load data from an ini (not sure i dont use dini).
Reply
#3

Quote:
Originally Posted by GTA967
under OnPlayerDisconnect
try
PlayerInfoVar[playerid][Skin] = GetPlayerSkin(playerid);
replace "PlayerInfoVar" with whatever you use,and are you sure that its dini_IntSet to load data from an ini (not sure i dont use dini).
Whoops to load Data its just dini_Int.

And i don't quite get what you mean by replace it.
Reply
#4

dini_IntSet(file, "Skin", GetPlayerSkin(playerid)); ?
Reply
#5

Quote:
Originally Posted by Abernethy♥
dini_IntSet(file, "Skin", GetPlayerSkin(playerid)); ?
I tired it under On player disconnect

I checked the save file and It was still 0.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)