Double Handed Weapons (SetPlayerSkillLevel) -
Omar55555 - 12.09.2013
Well there was couple of people asking how to make the person get double handed weapons like sawn-offs etc..
Start:
Start of all u should find that in your
Game Mod Or FS
pawn Code:
public OnPlayerSpawn(playerid)
Well there is alot of weapons that can be double handed we will give examble
pawn Code:
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
That is the normal player skill it will be one handed thats the worst skill level while
pawn Code:
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 800);
If u made it like this it will make the shoot accurancy better and aiming etc...
While
pawn Code:
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999);
That is the double handed on every weapon .
While all the code should be
pawn Code:
public OnPlayerSpawn(playerid)
{
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999);
//This will make them use Double-handed sawnoff shotguns.
return 1;
}
and easily that is the code for the double handed weapons
pawn Code:
SetPlayerSkillLevel(playerid,weapon,999);
And by the way i got more easier way to make it for you to make
all weapons double handed
they are
Code:
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 to make it more easy just make this
pawn Code:
public OnPlayerSpawn(playerid)
{
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 999);
}
return 1;
Credits:
some things learned from here
https://sampwiki.blast.hk/wiki/SetPlayerSkillLevel
and the rest is me

Hope u learned
i now its kinda explained in wiki but i did it here step by step
and please nice comments or don't
if u want it to change to single handed weapon just change 999 to 0
Re: Double Handed Weapons (SetPlayerSkillLevel) -
Vince - 12.09.2013
Uhm, doesn't everyone get the maximum skill level by default?
Re: Double Handed Weapons (SetPlayerSkillLevel) -
NBR - 12.09.2013
Quote:
Originally Posted by Vince
Uhm, doesn't everyone get the maximum skill level by default?
|
I think yes, it gives.
Re: Double Handed Weapons (SetPlayerSkillLevel) -
Richie© - 12.09.2013
It is indeed on max by default, so this is obselete. You should edit the tutorial to single handed weapons.
Re: Double Handed Weapons (SetPlayerSkillLevel) -
Omar55555 - 12.09.2013
well every gamemod i see is only set as 0 not all gamemodes with level 999
and thanks for your comments
Re: Double Handed Weapons (SetPlayerSkillLevel) -
Konstantinos - 12.09.2013
Quote:
Originally Posted by Omar55555
u should find that in your Game Mod Not FS
|
Why that? That function can be used in filterscripts too.
Re: Double Handed Weapons (SetPlayerSkillLevel) -
Omar55555 - 12.09.2013
Thank you for informing me {edited}