Two weapons in hands
#1

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

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

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

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;
}
Reply
#5

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
Reply
#6

If it works, you found it by yourself ^_^.
Reply
#7

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
Reply
#8

man the tutoiral in my signature
Reply
#9

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"
Reply
#10

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)