SA-MP Forums Archive
Single Handed Weapons? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Single Handed Weapons? (/showthread.php?tid=100831)



Single Handed Weapons? - omriorion - 06.10.2009

Well me and about 20 friends are running a small Roleplay server and,
I spawned a Colt .45 to test the single handed, though it is still a dual.
I logged on another server and there they managed to set it one handed.

Searched the forum though didn't find it.
What do I need to do?

Peace.



Re: Single Handed Weapons? - Jay_ - 06.10.2009

Use the scripting function: SetPlayerSkillLevel.


Re: Single Handed Weapons? - omriorion - 06.10.2009

Which public is that?
And could you show me how do I put this in the code?


Re: Single Handed Weapons? - _Vortex - 06.10.2009

Damn, the wiki isn't loading, I cant give you the wiki page for SetPlayerSkillLevel ):

Basically, you can do it when they connect SetPlayerSkillLevel(playerid,weapon,skilllevel);


Re: Single Handed Weapons? - omriorion - 06.10.2009

Quote:
Originally Posted by [B
Vortex ]
Damn, the wiki isn't loading, I cant give you the wiki page for SetPlayerSkillLevel ):

Basically, you can do it when they connect SetPlayerSkillLevel(playerid,weapon,skilllevel);
Lol
I ain't good with scripting.

Do I put this in OnPlayerSpawn or in OnGameModInit?

And what do I type below it?
For example, if I want a single-handed Sawn, Colt 45, Tec9 and Uzi?


Re: Single Handed Weapons? - westre - 06.10.2009

OnPlayerSpawn(playerid)
Код:
SetPlayerSkill(playerid, WEAPON_PISTOL, 1)
Somewhere else...
Код:
GivePlayerWeapon(playerid,WEAPON_COLT45,100);



Re: Single Handed Weapons? - omriorion - 06.10.2009

Quote:
Originally Posted by WESTre
OnGamemodeInit
Код:
SetPlayerSkill(playerid, WEAPON_PISTOL, 1)
Somewhere else...
Код:
GivePlayerWeapon(playerid,WEAPON_COLT45,100);
Код:
error 017: undefined symbol "SetPlayerSkill"
Uh?


Re: Single Handed Weapons? - westre - 06.10.2009

Код:
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
My bad.


Re: Single Handed Weapons? - omriorion - 06.10.2009

Quote:
Originally Posted by WESTre
Код:
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
My bad.
Код:
error 017: undefined symbol "playerid"
Pfff what the hell? XD


Re: Single Handed Weapons? - westre - 06.10.2009

Try it under
Код:
OnPlayerSpawn(playerid)