GivePlayerWeapon under OnPlayerRequestClass
#1

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.
Reply
#2

Use this because you didn't spawn yet

PHP код:
AddPlayerClass(skinFloat:xFloat:yFloat:zFloat:Angleweapon1weapon1_ammoweapon2weapon2_ammoweapon3weapon3_ammo
if i helped you +REP
Reply
#3

Quote:
Originally Posted by amirab
Посмотреть сообщение
Use this because you didn't spawn yet

PHP код:
AddPlayerClass(skinFloat:xFloat:yFloat:zFloat:Angleweapon1weapon1_ammoweapon2weapon2_ammoweapon3weapon3_ammo
if i helped you +REP
No... What I want is for the player to hold a weapon while in class selection.
Reply
#4

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.
Reply
#5

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

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

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


Forum Jump:


Users browsing this thread: 3 Guest(s)