Raised This Month: $ Target: $400
 0% 

[SNIPPET][CSGO] Safely remove weapons without crashes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 10-04-2016 , 12:11   Re: [SNIPPET][CSGO] Safely remove weapons without crashes
Reply With Quote #9

Quote:
Originally Posted by xCoderx View Post
...
So instead of doing:
PHP Code:
RemovePlayerItem(iClientiWeapon);
AcceptEntityInput(iWeapon"Kill"); 
You would do this:
PHP Code:
SafeRemoveWeapon(iClientiWeapon); // True on success. 
...
Quote:
Originally Posted by Neuro Toxin View Post
Just calling AcceptEntityInput with "Kill" has worked for donkies years without side effects.
...
Some time ago a read in a thread to use SDKHooks_DropWeapon instead of RemovePlayerItem or CS_DropWeapon. But unfortunately I can't find it or remember the advanced of using SDKHooks instead. Also, I never recognized a crash related to RemovePlayerItem.

PHP Code:
SDKHooks_DropWeapon(clientweaponNULL_VECTORNULL_VECTOR); 
AcceptEntityInput(iWeapon"Kill"); 
__________________
coding & free software

Last edited by shanapu; 10-04-2016 at 15:13. Reason: typo
shanapu is offline
 



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 18:56.


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