Raised This Month: $ Target: $400
 0% 

Get weapon info on ground, give weapon to player...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 06-07-2004 , 13:56  
Reply With Quote #3

Heres what I got so far...

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #define MAX_NAME_LENGTH 32 #define MAX_ENTITIES 1200 new bool:canpickup[33] public plugin_init() {     register_plugin("MultiWeapons","0.1","ThantiK")     register_clcmd("drop","cant_drop")     return PLUGIN_CONTINUE } public cant_drop(id) { canpickup[id] = false new ident[1] ident[0] = id set_task(0.4,"can_drop",2300+id,ident,1) return PLUGIN_CONTINUE } public can_drop(ident[]) { canpickup[ident[0]] = true return PLUGIN_HANDLED } public pfn_touch(ptr, ptd) { if ((ptd>=1 && ptd<=32) && is_user_connected(ptd)) { new Model[32], wp, wpname[32] if(!canpickup[ptd]) { return PLUGIN_CONTINUE } entity_get_string(ptr, EV_SZ_model, Model, 31) wp = getWpFromModel(Model) get_weaponname(wp, wpname, 31) give_item(ptd, wpname) } return PLUGIN_CONTINUE } getWpFromModel(wp[]) { if (equali(wp, "models/w_p228")) { return CSW_P228 } else if (equali(wp, "models/w_scout.mdl")) { return CSW_SCOUT } else if (equali(wp, "models/w_hegrenade.mdl")) { return CSW_HEGRENADE } else if (equali(wp, "models/w_xm1014.mdl")) { return CSW_XM1014 } else if (equali(wp, "models/w_c4.mdl")) { return CSW_C4 } else if (equali(wp, "models/w_mac10.mdl")) { return CSW_MAC10 } else if (equali(wp, "models/w_aug.mdl")) { return CSW_AUG } else if (equali(wp, "models/w_smokegrenade.mdl")) { return CSW_SMOKEGRENADE } else if (equali(wp, "models/w_elite.mdl")) { return CSW_ELITE } else if (equali(wp, "models/w_fiveseven.mdl")) { return CSW_FIVESEVEN } else if (equali(wp, "models/w_ump45.mdl")) { return CSW_UMP45 } else if (equali(wp, "models/w_sg550.mdl")) { return CSW_SG550 } else if (equali(wp, "models/w_galil.mdl")) { return CSW_GALIL } else if (equali(wp, "models/w_famas.mdl")) { return CSW_FAMAS } else if (equali(wp, "models/w_usp.mdl")) { return CSW_USP } else if (equali(wp, "models/w_glock18.mdl")) { return CSW_GLOCK18 } else if (equali(wp, "models/w_awp.mdl")) { return CSW_AWP } else if (equali(wp, "models/w_mp5navy.mdl")) { return CSW_MP5NAVY } else if (equali(wp, "models/w_m249.mdl")) { return CSW_M249 } else if (equali(wp, "models/w_m3.mdl")) { return CSW_M3 } else if (equali(wp, "models/w_m4a1.mdl")) { return CSW_M4A1 } else if (equali(wp, "models/w_tmp.mdl")) { return CSW_TMP } else if (equali(wp, "models/w_g3sg1.mdl")) { return CSW_G3SG1 } else if (equali(wp, "models/w_flashbang.mdl")) { return CSW_FLASHBANG } else if (equali(wp, "models/w_deagle.mdl")) { return CSW_DEAGLE } else if (equali(wp, "models/w_sg552.mdl")) { return CSW_SG552 } else if (equali(wp, "models/w_ak47.mdl")) { return CSW_AK47 } else if (equali(wp, "models/w_knife.mdl")) { return CSW_KNIFE } else if (equali(wp, "models/w_p90.mdl")) { return CSW_P90 } return 0 }

Thats how I go about doing it right now...
If the /90 is stored in backpack, I dont need to be worrying about that then. I just need to worry about the ammo that currently is in the weapon then. I dont get how to incorportate your way of using faketouch.
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
 



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:44.


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