Save Skin - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Save Skin (
/showthread.php?tid=106946)
Save Skin -
retart441 - 07.11.2009
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.
Re: Save Skin -
GTA967 - 07.11.2009
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).
Re: Save Skin -
retart441 - 07.11.2009
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.
Re: Save Skin -
Abernethy - 07.11.2009
dini_IntSet(file, "Skin", GetPlayerSkin(playerid)); ?
Re: Save Skin -
retart441 - 07.11.2009
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.