Skill system, help me again psz
#3

pawn Код:
public OnPlayerConnect(playerid)
{
    new pname[128];  // This get's the length of the player name
    new file[128];        // This get's the lenght of the file
    GetPlayerName(playerid, pname, sizeof(pname)); // This get's the player name with the lenght of the player name
    format(file, sizeof(file), savefolder,pname); // This describe's where to save and how to save it
    if(dini_Exists(file)) { // If the file exist
        Killz[playerid] = dini_Int(file, "Kills"); // Set's "Kills"
        Skillz_Pt[playerid] = dini_Int(file, "Skill_Pt"); // Set's "Skill_Weap"
        Skillz_Weap[playerid] = dini_Int(file, "Skill_Weap");
    Skillz_Armour[playerid] = dini_Int(file, "Skill_Armo"); // Set's "Skill_Weap"
        // and at last this set's the value which were on the file
    }
    return 1;
}
But this method is bad, because anyone who connects with existing username can get its stats. You should make proper registration system.
Reply


Messages In This Thread
Skill system, help me again psz - by DarK_FeneR - 13.05.2014, 16:12
Re: Skill system, help me again psz - by DarK_FeneR - 14.05.2014, 05:46
Re: Skill system, help me again psz - by Scottas - 14.05.2014, 05:54
Re: Skill system, help me again psz - by DarK_FeneR - 14.05.2014, 06:10
Re: Skill system, help me again psz - by Scottas - 14.05.2014, 07:01

Forum Jump:


Users browsing this thread: 1 Guest(s)