Raised This Month: $ Target: $400
 0% 

Fatal Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jim_yang
Veteran Member
Join Date: Aug 2006
Old 12-25-2006 , 01:15   Re: Fatal Error
Reply With Quote #1

Code:
stock g_WeaponSlots[] = {         0,         2,        //CSW_P228         0,         1,        //CSW_SCOUT         4,        //CSW_HEGRENADE         1,        //CSW_XM1014         5,        //CSW_C4         1,        //CSW_MAC10         1,        //CSW_AUG         4,        //CSW_SMOKEGRENADE         2,        //CSW_ELITE         2,        //CSW_FIVESEVEN         1,        //CSW_UMP45         1,        //CSW_SG550         1,        //CSW_GALIL         1,        //CSW_FAMAS         2,        //CSW_USP         2,        //CSW_GLOCK18         1,        //CSW_AWP         1,        //CSW_MP5NAVY         1,        //CSW_M249         1,        //CSW_M3         1,        //CSW_M4A1         1,        //CSW_TMP         1,        //CSW_G3SG1         4,        //CSW_FLASHBANG         2,        //CSW_DEAGLE         1,        //CSW_SG552         1,        //CSW_AK47         3,        //CSW_KNIFE         1        //CSW_P90 }; stock drop_primary_weapon(id) {         new clip,bpammo;         new Weapon = get_user_weapon(id,clip,bpammo);         if(g_WeaponSlots[Weapon] == 1)         {                 client_cmd(id,"+drop")                 return true;         }         else return false; }
besides get_user_weapon only return player current holding weapon
so if you want to drop primary weapons, you need to get_user_weapons, then loop to check and drop
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 12-25-2006 , 02:17   Re: Fatal Error
Reply With Quote #2

Thanks Jim Your the greatest . I had to use magic numbers (cstrike enumeration numbers) for the other function. But it is way more efficiant then the way I had it .

So my last questions are , What is cuasing the fatal errors . And I need a way to convert my current ammo and weapon index system, into a multi-dimensional array or enum or something. But I have never used them , I need to store the g_WeaponENt(index)[ammo in gun] .
The Specialist is offline
Send a message via AIM to The Specialist
cybermind
Senior Member
Join Date: Oct 2004
Old 12-25-2006 , 04:30   Re: Fatal Error
Reply With Quote #3

The "NO FREE EDICTS" error means there are too many entities.
cybermind 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 22:22.


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