Skill for Weapon
#1

hey everyone...
sorry i'm newbie for scripting...
i want to ask about skill for weapons...
so if i kill someone with M4, make M4 skill +10 and for any weapons
and they can see his skill..

can someone help me??

sorry for my bad english T_T
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerSkillLevel
And Make a rank system for an example

pawn Код:
if(Rank == 1 )  {
    SetPlayerSkillLevel( blah blah );
}
Reply
#3

hm...
i'm use it right now...
but it didn't effective @_@

any other option??
Reply
#4

Quote:
Originally Posted by deshane
Посмотреть сообщение
hm...
i'm use it right now...
but it didn't effective @_@

any other option??
Is this what you mean ?

http://forum.sa-mp.com/showthread.ph...=Weapon+Damage
Reply
#5

hm....
if players keep practicing his weapon...
it will upgrade into hitman....

lol sorry for my bad english
Reply
#6

Make them when they get 1 kill the post i did on here SetPlayerSkillLevel will do the job for newbie how in GTA SA Single Player when you couldn't move when you shoot to higher this most likely would be ranking.
Reply
#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
#8

hm... thx grim... that's help me a lot...
but if i don't want to reset skill after he logged in again...
Reply
#9

up up..
can someone help me?
Reply
#10

https://sampwiki.blast.hk/wiki/SetPlayerSkillLevel
https://sampwiki.blast.hk/wiki/Skillweapons

Hope this help you.

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)