GivePlayerWeapon under OnPlayerRequestClass -
ProjectMan - 17.01.2014
GivePlayerWeapon under OnPlayerRequestClass doesn't seem to work. How do I make it so that when a player is choosing class, all of the classes are holding a weapon? It doesn't work when I put GivePlayerWeapon under OnPlayerRequestClass, but when I implement and use GivePlayerWeapon in a command WHILE in class selection, it works.
Re: GivePlayerWeapon under OnPlayerRequestClass -
amirab - 17.01.2014
Use this because you didn't spawn yet
PHP код:
AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
if i helped you
+REP
Re: GivePlayerWeapon under OnPlayerRequestClass -
ProjectMan - 17.01.2014
Quote:
Originally Posted by amirab
Use this because you didn't spawn yet
PHP код:
AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
if i helped you +REP
|
No... What I want is for the player to hold a weapon while in class selection.
Re: GivePlayerWeapon under OnPlayerRequestClass -
Konstantinos - 17.01.2014
Quote:
Originally Posted by ProjectMan
It doesn't work when I put GivePlayerWeapon under OnPlayerRequestClass, but when I implement and use GivePlayerWeapon in a command WHILE in class selection, it works.
|
So set a timer when a player connects so it will be called once while a player is in class selection and give the weapons you want.
Re: GivePlayerWeapon under OnPlayerRequestClass -
ProjectMan - 17.01.2014
Quote:
Originally Posted by Konstantinos
So set a timer when a player connects so it will be called once while a player is in class selection and give the weapons you want.
|
Yes, I have thought of this as the last resort. It's no harm asking for a 'cleaner' way to do this. Seems there isn't one. Thanks mate.
Re: GivePlayerWeapon under OnPlayerRequestClass -
BullseyeHawk - 17.01.2014
pawn Код:
AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
SetPlayerArmed(playerid, weapon1);
Or, if sa-mp weapon give is too fast, you should do a timer that runs in 30ms and sets the player holding the weapon.
I did not test this, but it looks common sence this would be the way.
Re: GivePlayerWeapon under OnPlayerRequestClass -
ProjectMan - 17.01.2014
Quote:
Originally Posted by BullseyeHawk
pawn Код:
AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); SetPlayerArmed(playerid, weapon1);
Or, if sa-mp weapon give is too fast, you should do a timer that runs in 30ms and sets the player holding the weapon.
I did not test this, but it looks common sence this would be the way.
|
This won't work. Thank you anyway.