Raised This Month: $51 Target: $400
 12% 

Equip a weapon to a player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 10-06-2018 , 06:08   Equip a weapon to a player
Reply With Quote #1

I have a weapon index, I have a player index. How to attach them into one? Like not GivePlayerItem(client, "weapon_ak47") but more like GivePlayerWeapon(client, weapon);

EquipPlayerWeapon can create bugs.

Edit: NVM, I accidentally used it on a dead player, it's exactly what it needs
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 10-08-2018 at 14:09.
eyal282 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 10-08-2018 , 14:10   Re: Equip a weapon to a player
Reply With Quote #2

I'd like to add that if EquipPlayerWeapon is used to give a player an existing C4, the C4 will not be marked as owned by the player, and flash in the map as if it's grounded.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 10-08-2018 , 14:43   Re: Equip a weapon to a player
Reply With Quote #3

I believe in CSGO you can use AcceptEntityInput(entity, "Use", client); on the c4 to mimic it being picked up by the player. May be wrong on the inputs or if this would work.
Mitchell is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 10-09-2018 , 02:03   Re: Equip a weapon to a player
Reply With Quote #4

Quote:
Originally Posted by Mitchell View Post
I believe in CSGO you can use AcceptEntityInput(entity, "Use", client); on the c4 to mimic it being picked up by the player. May be wrong on the inputs or if this would work.
I am using it on player_use event. Infiloop
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 10-09-2018 , 02:32   Re: Equip a weapon to a player
Reply With Quote #5

Why would you call Use in the use event. Yes. Infinity loooooop
__________________
Neuro Toxin is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 10-09-2018 , 02:41   Re: Equip a weapon to a player
Reply With Quote #6

Quote:
Originally Posted by Neuro Toxin View Post
Why would you call Use in the use event. Yes. Infinity loooooop
When a player uses the bomb, he gets it. This is to solve stuck bombs.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode