#1

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.
Reply
#2

put :
[pawn]#include <YSI/y_ini>

Download include from here : https://sampforum.blast.hk/showthread.php?tid=175565

Rep me if helped
Reply
#3

That's exactly what I've done. I can't seem to get it working though.
Reply
#4

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

pawn Код:
#include <YSI\y_ini>
NOT USE IT:
pawn Код:
#include <YSI\y_ini>

/ and \, The right is \

--------------------------------------------------------------------------------------------------------------
Rep me if it work!
Reply
#5

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;
}
Reply
#6

How do I give you rep?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)