SA-MP Forums Archive
playerskin - 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: playerskin (/showthread.php?tid=417359)



playerskin - blackdragon1 - 20.02.2013

i want when player /q the gam eand come back they have same skin.


and i am using like this.


INI_WriteInt(ufile, "pArrests", PlayerInfo[playerid][pArrests]);?? can u tell me how to make player skin will be saved and player can't changed skin when he login .


Re: playerskin - California_ - 20.02.2013

Make a folder called "save" in your /scriptfiles/. and use this.

pawn Код:
#define FILTERSCRIPT

#include <a_samp>
#include <Dini>
#include <Dutils>
#include <Dudb>

#define savefolder "/save/%s.ini"

#pragma unused ret_memcpy

new Killz[MAX_PLAYERS];
new Deathz[MAX_PLAYERS];



public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}


public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    new pname[128];
    new file[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), savefolder,pname);
    if(!dini_Exists(file)) {
        dini_Create(file);
        dini_IntSet(file, "Skin", 0);
        SetPlayerSkin(playerid, dini_Int(file, "Skin"));

    }
    else {
        SetPlayerSkin(playerid, dini_Int(file, "Skin"));
    }
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new pname[128];
    new file[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), savefolder,pname);
    if(!dini_Exists(file)) {
    }
    else {
        dini_IntSet(file, "Skin", GetPlayerSkin(playerid));
    }
    return 1;
}



public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}



Re: playerskin - blackdragon1 - 20.02.2013

thanks but i want in INI_WriteInt not on dini


Re: playerskin - Glad2BeHere - 20.02.2013

https://sampforum.blast.hk/showthread.php?tid=273088