Weapon skills - 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)
+--- Thread: Weapon skills (
/showthread.php?tid=604902)
Weapon skills -
JamalMaddox - 11.04.2016
How to add weapons skill?
For example some weapons like Sawnoff shotgun be 100?
Re: Weapon skills -
saffierr - 11.04.2016
How do You mean with 100 ? Do You mean score 100? Then first check if the player is 100 or lower by this code:
PHP код:
if (GetPlayerScore (playerid) < 100) return SendClientMessage (playerid, COLOR_RED, "bla bla");
Is this what you mean?
Re: Weapon skills -
Gammix - 11.04.2016
https://sampwiki.blast.hk/wiki/SetPlayerSkillLevel
Re: Weapon skills -
Dreni - 21.01.2017
E.x this maybe willhelp you
public OnPlayerConnect(playerid)
{
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 400);
// When player connect if he have lower than 100 score hes shooting skill will be low he will shoot like Cj in san andreas when you start playing for the first time with missions
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPlayerScore(playerid) > 100) return SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 999);
// if player score is more than 100 his skill gona be normal
return 1;
}
// sorry for my low english
if i helped you +rep me