SA-MP Forums Archive
GetPlayerSkillLevel - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GetPlayerSkillLevel (/showthread.php?tid=173662)



GetPlayerSkillLevel - DragonBlaster50 - 03.09.2010

Hey guys, I noticed there is SetPlayerSkillLevel, but not GetPlayerSkillLevel, Is their someone Witch has it for me or Something? As I need it. Thanks.


Re: GetPlayerSkillLevel - Voldemort - 03.09.2010

By setting skill, you will also getting, because these things can't be chaned without using setskilllevel, so you just need to make a script which remeber what value you set.

Also you can make your own function like
new Skill[MAX_PLAYERS][10]; // I dont remeber how much type there was
GetPlayerSKillLevel(playerid,weapon)
{
return Skill[playerid][weapon];
}

}


Re: GetPlayerSkillLevel - DragonBlaster50 - 03.09.2010

How would I be able to get it by using SetPlayerSkillLevel?


Re: GetPlayerSkillLevel - SpaZ (Ed) - 03.09.2010

Quote:
Originally Posted by DragonBlaster50
Посмотреть сообщение
How would I be able to get it by using SetPlayerSkillLevel?
Something like:

pawn Код:
enum Weapons {
Sawnoff,
Deagle,
M4,
9mm
}

new Skill[MAX_PLAYERS][Weapons]
then, whenever you use SetPlayerSkillLevel you will also set Skill[playerid][weaponid] = skill value

Example

pawn Код:
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 200);
Skill[playerid][Sawnoff] = 200;
and when you need the player's skill level just use the Skill array.