SA-MP Forums Archive
[HELP]SetPlayerSkillLevel! - 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: [HELP]SetPlayerSkillLevel! (/showthread.php?tid=103244)



[HELP]SetPlayerSkillLevel! - [NYRP]Mike. - 19.10.2009

Hey guys i was wondering if i could get a command like:

/setskill [playerid] [weaponid] [level]

here is my Enum:

[pawn]
enum pInfo
{
pstat,
pbla,
pbla,
pSkillLvl, -- what i want to save
}
new PlayerInfo[playerid][pInfo];

so like: /setskill [playerid] 22(Colt) 1 - 1 hand it.

Thanks guys, also my admin system is Playerinfo[playerid][pAdmin] == 5)

-Mike.


Re: [HELP]SetPlayerSkillLevel! - Jason_Borne420 - 19.10.2009

Yea you can do something like that, but ive had this problem too...


SA-MP wiki says to use it like this
Код:
public OnPlayerSpawn(playerid)
{
  SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 200); //This will make them use single-handed sawnoff shotguns.
  return 1;
}
When you do that it makes them 1 handed... And it says to set it to 999 (or higher will max it out)

But... when i do this.... (on a command or anywhere)

Код:
if(strcmp(cmd,"/maxskill",true)==0)
{
  SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999); 
  return 1;
}
The player still has 1 handed gun.... Anyone help ??