SetPlayerSkillLevel
From SA-MP Wiki
(Difference between revisions)
Revision as of 03:17, 11 April 2013 Smithy (Talk | contribs) ← Previous diff |
Revision as of 23:39, 31 January 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
- | {{Title}} | + | {{Scripting}} |
{{0.3Added|function|}} | {{0.3Added|function|}} | ||
Line 28: | Line 28: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | |||
+ | [[fr:SetPlayerSkillLevel]] |
Revision as of 23:39, 31 January 2014
Description:
Set the skill level of a certain weapon type for a player.
(playerid, skill, level)
playerid | The ID of the player to set the weapon skill of. |
skill | The weapon type you want to set the skill of. |
level | The skill level to set for that weapon, ranging from 0 to 999. (A level out of range will max it out) |
Return Values:
This function does not return any specific values.
Important | The skill parameter is NOT the weapon ID, it is the skill type. Click here for a list of skill types. |
public OnPlayerSpawn(playerid) { SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1); //This will make them use single-handed sawnoff shotguns. return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SetPlayerArmedWeapon: Set a player's armed weapon.
- GivePlayerWeapon: Give a player a weapon.