Portal SAMP
[Ajuda] Desativar dual weapon - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] Desativar dual weapon (/showthread.php?tid=2748)



Desativar dual weapon - RosaScripter - 01/09/2022

Existe alguma função nativa que desativa a dual weapon 9mm entre outras?


RE: Desativar dual weapon - zBL4CK - 01/09/2022

(01/09/2022 22:16)RosaScripter Escreveu: Existe alguma função nativa que desativa a dual weapon 9mm entre outras?

SetPlayerSkillLevel


RE: Desativar dual weapon - xbruno1000x - 01/09/2022

Existe sim, você pode utilizar SetPlayerSkillLevel. Essa função faz o equivalente ao stat de perícia com as armas no GTA SA Offline. Então basta setar as armas que permitem dual weapon para um valor baixo de skill, como no código abaixo:

Código:
public OnPlayerSpawn(playerid)
{
    SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
    // This will make the player use single-handed sawn-off shotguns.
    return 1;
}

Documentação:
https://open.mp/pt-BR/docs/scripting/functions/SetPlayerSkillLevel