SA-MP Forums Archive
Two weapons in hands - 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: Two weapons in hands (/showthread.php?tid=464299)



Two weapons in hands - NeXoR - 16.09.2013

Can anyone give me the code/function of two weapons in hand ?


Re: Two weapons in hands - Dragonsaurus - 16.09.2013

Put this under OnGameModeInit:
pawn Код:
UsePlayerPedAnims();



Re: Two weapons in hands - NeXoR - 16.09.2013

Quote:
Originally Posted by Dragonsaurus
Посмотреть сообщение
Put this under OnGameModeInit:
pawn Код:
UsePlayerPedAnims();
Doesn't working


Re: Two weapons in hands - Dragonsaurus - 16.09.2013

It should. Make sure you did it right and recompile.
Quote:
Originally Posted by Wiki
Note: Not using this function causes two-handed weapons to be held in only one hand.
pawn Код:
public OnGameModeInit()
{
    UsePlayerPedAnims();
    return 1;
}



Re: Two weapons in hands - Kyance - 16.09.2013

If you're talking about the Uzi/Tec-9/Colt-45/sawn-off
Then try this:

public OnPlayerSpawn(playerid)
{
SetPlayerSkillLevel(playerid, WEAPONSKILL_*WEAPON*, 1000);
return 1;
}
-

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


Re: Two weapons in hands - Dragonsaurus - 16.09.2013

If it works, you found it by yourself ^_^.


Re: Two weapons in hands - NeXoR - 16.09.2013

Quote:
Originally Posted by Dragonsaurus
Посмотреть сообщение
Put this under OnGameModeInit:
pawn Код:
UsePlayerPedAnims();
Quote:
Originally Posted by Kyance
Посмотреть сообщение
If you're talking about the Uzi/Tec-9/Colt-45/sawn-off
Then try this:

public OnPlayerSpawn(playerid)
{
SetPlayerSkillLevel(playerid, WEAPONSKILL_*WEAPON*, 1000);
return 1;
}
-

Resource:
https://sampwiki.blast.hk/wiki/SetPlayerSkillLevel
Would you give me the exact line for Tec-9 ? Only for this weapon


Re: Two weapons in hands - Omar55555 - 16.09.2013

man the tutoiral in my signature


Re: Two weapons in hands - Wizza - 16.09.2013

Quote:
Originally Posted by NeXoR
Посмотреть сообщение
Would you give me the exact line for Tec-9 ? Only for this weapon
He already told you just change "Weapon" to the id of tec9 for example "29"


Re: Two weapons in hands - Konstantinos - 16.09.2013

Quote:
Originally Posted by NeXoR
Посмотреть сообщение
Would you give me the exact line for Tec-9 ? Only for this weapon
Let's see the parameters:
SetPlayerSkillLevel(playerid, skill, level);

playerid - The ID of the player to set the weapon skill of.
skill - The weapon type you want to set the skill of.
level - The skill level to set for that weapon, ranging from 0 to 999. (A level out of range will max it out)

Weapon Types: (a.k.a skill)
0 - WEAPONSKILL_PISTOL
1 - WEAPONSKILL_PISTOL_SILENCED
2 - WEAPONSKILL_DESERT_EAGLE
3 - WEAPONSKILL_SHOTGUN
4 - WEAPONSKILL_SAWNOFF_SHOTGUN
5 - WEAPONSKILL_SPAS12_SHOTGUN
6 - WEAPONSKILL_MICRO_UZI
7 - WEAPONSKILL_MP5
8 - WEAPONSKILL_AK47
9 - WEAPONSKILL_M4
10 - WEAPONSKILL_SNIPERRIFLE


So, let's get started again.
pawn Код:
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 999);
// playerid - the player
// skill - WEAPONSKILL_MICRO_UZI (tec9)
// level - 999 (max)
Was it so difficult?