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

Equiping weapons and checking player iventory


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpirT
Senior Member
Join Date: Sep 2018
Location: Portugal
Old 05-24-2020 , 06:17   Equiping weapons and checking player iventory
Reply With Quote #1

Hello,

I am trying to do something for my CS:GO Servers. I want to equip a deagle to all players when the round starts and then I want to check if client has a Smoke and a HE grenade. If he doesn't have one of them or any of them, I want him to receive it.

How should the code be?

PS: Is it possible to do:
PHP Code:
int newitem GivePlayerItem(client"weapon_deagle");
EquipPlayerWeapon(clientnewitem); 
Best Regards,

SpirT.
__________________

Last edited by SpirT; 05-24-2020 at 06:17.
SpirT is offline
Tilex
Junior Member
Join Date: May 2020
Old 05-24-2020 , 07:59   Re: Equiping weapons and checking player iventory
Reply With Quote #2

I just came across this: http://gshbitbucket.mydan.de/project...1v1_AWPDuel.sp

Not really answering the whole question, but it should help as a first pointer.

Also, you may want to make use of this: GetClientWeapon
https://sm.alliedmods.net/api/index....d=show&id=425&

For a list of weapons in CS:GO, check this out:
https://wiki.alliedmods.net/Counter-...ensive_Weapons

Now, if you find a library, which allows to do something like:
bool isWeaponFullauto(weaponname);
then drop me a PM. I need this and I'm afraid, I need to fill my own array
Tilex is offline
SpirT
Senior Member
Join Date: Sep 2018
Location: Portugal
Old 05-24-2020 , 11:46   Re: Equiping weapons and checking player iventory
Reply With Quote #3

Quote:
Originally Posted by Tilex View Post
I just came across this: http://gshbitbucket.mydan.de/project...1v1_AWPDuel.sp

Not really answering the whole question, but it should help as a first pointer.

Also, you may want to make use of this: GetClientWeapon
https://sm.alliedmods.net/api/index....d=show&id=425&

For a list of weapons in CS:GO, check this out:
https://wiki.alliedmods.net/Counter-...ensive_Weapons

Now, if you find a library, which allows to do something like:
bool isWeaponFullauto(weaponname);
then drop me a PM. I need this and I'm afraid, I need to fill my own array
Thanks for the reply! I will try that later.
Answering your question, doesn't SmLib has a similar functions or some functions that allow you to do that?
__________________
SpirT 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 02:03.


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