playerskin
#1

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

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

thanks but i want in INI_WriteInt not on dini
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)