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

[CSGO] Spawning stock weapons


Post New Thread Reply   
 
Thread Tools Display Modes
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 04-28-2017 , 21:57   Re: [CSGO] Spawning stock weapons
Reply With Quote #11

Quote:
Originally Posted by Neuro Toxin View Post
Because changing m_iItemDefinitionIndex can get your server GSLT banned.

There is no good way to do this. If you want to avoid setting FollowCSGOServerGuidelines you can.

- Spawn the weapon to a client using GiveNamedItem
- When WeaponEquip is called inside GiveNamedItem block it
- Teleport the weapon

Edit/Note:

Teleporting the weapon inside the WeaponEquip hook should block another player from equipping it. It may also cause issues.
This is wrong, I have done tests on this and changing the item definition is safe as long as you don't change it to a knife, you can safely change it to anything else but you will need to turn off the core option.

Last edited by SM9; 04-28-2017 at 22:00.
SM9 is offline
peenut
Member
Join Date: Nov 2013
Old 04-28-2017 , 23:05   Re: [CSGO] Spawning stock weapons
Reply With Quote #12

In that case, maybe the exception should only trigger on indexes besides the stock items?
I don't want anyone to have to turn of this option when i know its not really necessary.

I'd vouch for that request.

Last edited by peenut; 04-28-2017 at 23:06.
peenut is offline
Austin
Senior Member
Join Date: Oct 2005
Old 04-30-2017 , 15:39   Re: [CSGO] Spawning stock weapons
Reply With Quote #13

Take a look at my CSGO plugin to see how I add items.
The items are spawned into the map right away, and a Stripper definition is written to the map.cfg file so they will be permanent. You obviously need stripper installed.

The added guns work fine.
https://forums.alliedmods.net/showthread.php?t=194665
Austin is offline
B3none
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 04-30-2017 , 16:21   Re: [CSGO] Spawning stock weapons
Reply With Quote #14

I was also doing this earlier however I was using the GivePlayerItem hook
__________________
B3none 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 14:01.


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