[Include] Set/GetPlayerSkillLevelEx
#1

Hello

I don't understand why a lot of people got problem with GetPlayerSkillLevel. Okey so i made it for lazy people what won't make this or they're too..

Description

I made this in few minutes. there's only two functions to use:
pawn Код:
native GetPlayerSkillLevelEx(playerid, weapon_skill_id);
native SetPlayerSkillLevelEx(playerid, weapon_skill_id, skill_value);
Saving & Loading?

I will show you how to do this by using Y_Ini system (by ******).

Saving:
pawn Код:
new INI:Account = INI_Open(PlayerFile(playerid));
INI_WriteInt(Account,     "WEAPON_SKILL_PISTOL",    GetPlayerSkillLevelEx(playerid, WEAPONSKILL_PISTOL));
INI_Close   (Account);
Loading:
pawn Код:
function LoadPlayerStats(playerid, name[], value[])
{
    if(!strcmp(name, "WEAPON_SKILL_PISTOL"))    GetPlayerSkillLevelEx(playerid, strval(value));
    return true;
}
Set when player spawn:
pawn Код:
INI_ParseFile(PlayerFile(playerid), "LoadPlayerStats", .bExtra = true, .extra = playerid);
SetPlayerSkillLevelEx(playerid, WEAPONSKILL_PISTOL, GetPlayerSkillLevelEx(playerid, WEAPONSKILL_PISTOL));
And that's all!

Bugs:

In my script? hah.. :>

Need help with saving?

Tell us about your saving & loading system and we (or me) will try to help you out your problem.

Download:

Reply


Messages In This Thread
Set/GetPlayerSkillLevelEx - by Riddick94 - 18.08.2011, 15:32
Re: Set/GetPlayerSkillLevelEx - by Kaperstone - 18.08.2011, 15:45
Re: Set/GetPlayerSkillLevelEx - by Riddick94 - 18.08.2011, 16:01
Re: Set/GetPlayerSkillLevelEx - by Toreno - 18.08.2011, 16:03
Re: Set/GetPlayerSkillLevelEx - by Darnell - 18.08.2011, 16:04
Re: Set/GetPlayerSkillLevelEx - by Riddick94 - 18.08.2011, 16:05
Re: Set/GetPlayerSkillLevelEx - by playbox12 - 18.08.2011, 16:15
Re: Set/GetPlayerSkillLevelEx - by Kaperstone - 18.08.2011, 16:20
Re: Set/GetPlayerSkillLevelEx - by Riddick94 - 18.08.2011, 16:28
Re: Set/GetPlayerSkillLevelEx - by Kaperstone - 18.08.2011, 16:30

Forum Jump:


Users browsing this thread: 1 Guest(s)