Skill for Weapon
#7

Increasing their skill level by 10 each time won't show immediate affect each time, so it will take time to get a higher level. Example of how this could be worked is shown below:
pawn Код:
public OnPlayerDeath( playerid, killerid, reason )
{
   if( reason == 31 ) // M4 weapon ID
   {
      SetPlayerSkillLevel( killerid, WEAPONSKILL_M4, M4_SKILL[ killerid ] + 10 );
      M4_SKILL[ killerid ] += 10;
      SendClientMessage( killerid, 0x00FF00FF, "Upgraded your M4 skill. Keep practicing!" );
   }
   return 1;
}
Of course, you will need to create the M4_SKILL variable for each player, like so:
pawn Код:
new M4_SKILL[ MAX_PLAYERS ];
Remember to also reset the skill level to 0 after the player connects to the server,
pawn Код:
public OnPlayerConnect( playerid )
{
   M4_SKILL[ playerid ] = 0;
   return 1;
}
Reply


Messages In This Thread
Skill for Weapon - by deshane - 22.03.2011, 04:17
Re: Skill for Weapon - by Kitten - 22.03.2011, 05:32
Re: Skill for Weapon - by deshane - 22.03.2011, 08:23
Re: Skill for Weapon - by Stigg - 22.03.2011, 08:29
Re: Skill for Weapon - by deshane - 23.03.2011, 02:43
Re: Skill for Weapon - by Kitten - 23.03.2011, 02:48
Re: Skill for Weapon - by Grim_ - 23.03.2011, 02:52
Re: Skill for Weapon - by deshane - 23.03.2011, 03:11
Re: Skill for Weapon - by deshane - 25.03.2011, 13:25
Re: Skill for Weapon - by Davz*|*Criss - 25.03.2011, 17:34

Forum Jump:


Users browsing this thread: 3 Guest(s)