முதன்மை உள்ளடக்கத்துக்குச் செல்லவும்

GetPlayerSkillLevel

எச்சரிக்கை

செயல்பாடு என்பது omp v1.1.0.2612 பதிப்பில் சேர்க்கப்பட்டது. இது முந்தைய பதிப்புகளில் இயங்காது!

Description​

Get the player skill level of a certain weapon type.

NameDescription
playeridThe ID of the player.
WEAPONSKILL:skillThe weapon to get the skill of.

Returns​

0 - failure (invalid weapon skill).

Otherwise, it returns the skill level of the weapon type.

Examples​

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/skill", true))
{
new string[64];

new skill = GetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL);

format(string, sizeof(string), "Your pistol skill level is %d", skill);
SendClientMessage(playerid, 0xFFFF00FF, string);
return 1;
}
return 0;
}

Notes​

எச்சரிக்கை

The skill parameter is NOT the weapon ID, it is the skill type. Click here for a list of skill types.

Related Functions

Related Information

  • Weapon Skills: List of weapon skills that are used to set player's skill level.