Raised This Month: $ Target: $400
 0% 

[SNIPPET][CSGO] Safely remove weapons without crashes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 10-04-2016 , 02:02   Re: [SNIPPET][CSGO] Safely remove weapons without crashes
Reply With Quote #1

I still have crashes
here is Bacardi's code:
Spoiler

I try to apply command
Spoiler

But still crash, and i realy dont understand his code, because he first remove glock then equip knife that already exist on player
Spoiler

And this code also crash server like Bacari's
But if we change EquipPlayerWeapon(client, glock); = No crash
But:
Spoiler

= No crush
Now I realy dont understand nothing

Last edited by Indarello; 10-04-2016 at 02:10.
Indarello is offline
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 10-04-2016 , 10:20   Re: [SNIPPET][CSGO] Safely remove weapons without crashes
Reply With Quote #2

Quote:
Originally Posted by Indarello View Post
I still have crashes
here is Bacardi's code:
Spoiler

I try to apply command
Spoiler

But still crash, and i realy dont understand his code, because he first remove glock then equip knife that already exist on player
Spoiler

And this code also crash server like Bacari's
But if we change EquipPlayerWeapon(client, glock); = No crash
But:
Spoiler

= No crush
Now I realy dont understand nothing
What are you trying to do?

Take a look at these examples.

First include CSGOItems. Download here: https://bitbucket.org/SM91337/csgo-items/overview
PHP Code:
#include <csgoitems> 
If you want to remove all weapons except the clients knife you can do this:
PHP Code:
CSGOItems_RemoveAllWeapons(iClientCS_SLOT_KNIFE); 
If you want to remove just his knife, (without removing Zeus unlike other methods)
PHP Code:
CSGOItems_RemoveKnife(iClient); 
If you want to give the client a weapon (This function also auto equips knives and also with this function you don't have to remove the clients previous weapons, it will automatically handle that for you, though I suggest not giving knives since they will trigger a ban)
PHP Code:
CSGOItems_GiveWeapon(iClient"weapon_glock"); 
Same as above, but lets specify reserve and clip and also have it switch to his knife after.
PHP Code:
int iReserveAmmo 30;
int iClipAmmo 2;
CSGOItems_GiveWeapon(iClient"weapon_glock"iReserveAmmoiClipAmmoCS_SLOT_KNIFE); 
I have also implemented the crash workaround into CSGOItems.


Last edited by SM9; 10-04-2016 at 10:21.
SM9 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 18:56.


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