08.04.2014, 08:21
What you have to do is simply change the SkillLevel of a certain player.
Maybe you should try to make a command to start with..
ZCMD
Strcmp
These are the ID's of the Weapon skills:
The format of the function: SetPlayerSkillLevel is:
Maybe you should try to make a command to start with..
ZCMD
pawn Code:
CMD:skill(playerid, params[])
{
SetPlayerSkillLevel(playerid, 0, 5); // The 0 here stand for the Skill: WEAPONSKILL_PISTOL
return 1;
}
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/skill", true) == 0)
{
SetPlayerSkillLevel(playerid, 0, 5);
return 1;
}
return 0;
}
pawn Code:
0 - WEAPONSKILL_PISTOL
1 - WEAPONSKILL_PISTOL_SILENCED
2 - WEAPONSKILL_DESERT_EAGLE
3 - WEAPONSKILL_SHOTGUN
4 - WEAPONSKILL_SAWNOFF_SHOTGUN
5 - WEAPONSKILL_SPAS12_SHOTGUN
6 - WEAPONSKILL_MICRO_UZI
7 - WEAPONSKILL_MP5
8 - WEAPONSKILL_AK47
9 - WEAPONSKILL_M4
10 - WEAPONSKILL_SNIPERRIFLE
Code:
SetPlayerSkillLevel(playerid, ID_WEAPONSKILL, Skill_level);