SA-MP Forums Archive
Weapon skill problem - 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 skill problem (/showthread.php?tid=431779)



Weapon skill problem - Don_Cage - 19.04.2013

I want all weapons exept the dual guns to be skill 1000 when you login and the dual guns to be set to 0 but it dont work..
This is what i have on my onplayerconnect
pawn Код:
public OnPlayerConnect(playerid)
{
    SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 0);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 0);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 0);



Re: Weapon skill problem - DaTa[X] - 19.04.2013

work in the Callback OnPlayerSpawn
pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1000);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 0);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 0);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 0);
    return 1;
}



Re: Weapon skill problem - Don_Cage - 20.04.2013

Thanks! +REP