y_ini - 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: y_ini (
/showthread.php?tid=369304)
y_ini -
BigGroter - 16.08.2012
I can't for the love of God get y_ini to work.
I want to save a player's position, interior and faction/rank basically. It's never working out for me, help is appreciated.
#include <YST\y_ini is at the top, I don't even know if this is correct.
Re: y_ini -
Avi57 - 16.08.2012
put :
[pawn]#include <YSI/y_ini>
Download include from here :
https://sampforum.blast.hk/showthread.php?tid=175565
Rep me if helped
Re: y_ini -
BigGroter - 16.08.2012
That's exactly what I've done. I can't seem to get it working though.
Re: y_ini -
ThePhenix - 16.08.2012
Quote:
Originally Posted by BigGroter
That's exactly what I've done. I can't seem to get it working though.
|
PUT IT in your PAWNO script
NOT USE IT:
/ and \, The right is \
--------------------------------------------------------------------------------------------------------------
Rep me if it work!
Re: y_ini -
Sandiel - 16.08.2012
You want to save his pos & skin? sure.
pawn Код:
// On top of your script:
#define PATH "/Users/%s.ini"
new PlayerLeaveSkin[MAX_PLAYERS];
new Float:lastX;
new Float:lastY;
new Float:lastZ;
new Float:lastA;
stock UserPath(playerid)
{
new string[128],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),PATH,pName);
return string;
}
stock SaveAccount(playerid)
{
GetPlayerPos(playerid, lastX, lastY, lastZ);
GetPlayerFacingAngle(playerid, lastA);
PlayerLeaveSkin[playerid] = GetPlayerSkin(playerid);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteFloat(File,"LastX",lastX);
INI_WriteFloat(File,"LastY",lastY);
INI_WriteFloat(File,"LastZ",lastZ);
INI_WriteFloat(File,"LastA",lastA);
INI_WriteInt(File,"Skin",PlayerLeaveSkin[playerid]);
INI_Close(File);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SaveAccount(playerid);
return 1;
}
Re: y_ini -
BigGroter - 16.08.2012
How do I give you rep?