Skill for Weapon - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Skill for Weapon (
/showthread.php?tid=243229)
Skill for Weapon -
deshane - 22.03.2011
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
Re: Skill for Weapon -
Kitten - 22.03.2011
https://sampwiki.blast.hk/wiki/SetPlayerSkillLevel
And Make a rank system for an example
pawn Код:
if(Rank == 1 ) {
SetPlayerSkillLevel( blah blah );
}
Re: Skill for Weapon -
deshane - 22.03.2011
hm...
i'm use it right now...
but it didn't effective @_@
any other option??
Re: Skill for Weapon -
Stigg - 22.03.2011
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
Re: Skill for Weapon -
deshane - 23.03.2011
hm....
if players keep practicing his weapon...
it will upgrade into hitman....
lol sorry for my bad english
Re: Skill for Weapon -
Kitten - 23.03.2011
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.
Re: Skill for Weapon -
Grim_ - 23.03.2011
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;
}
Re: Skill for Weapon -
deshane - 23.03.2011
hm... thx grim... that's help me a lot...
but if i don't want to reset skill after he logged in again...
Re: Skill for Weapon -
deshane - 25.03.2011
up up..
can someone help me?
Re: Skill for Weapon -
Davz*|*Criss - 25.03.2011
https://sampwiki.blast.hk/wiki/SetPlayerSkillLevel
https://sampwiki.blast.hk/wiki/Skillweapons
Hope this help you.
Thanks.