Raised This Month: $ Target: $400
 0% 

Drop Weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-09-2005 , 19:48   Drop Weapon
Reply With Quote #1

Hey, I tried the simple code:
Code:
// ..     new clip, ammo     new weapon = get_user_weapon(id,clip,ammo)     if(weapon == CSW_SCOUT)     {         client_cmd(id,"drop")     }
But it makes em drop all weapons. How do I just make them drop that specific one?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
KCE
Senior Member
Join Date: Jan 2005
Location: Los Angeles, CA
Old 03-09-2005 , 20:23   Re: Drop Weapon
Reply With Quote #2

http://forums.alliedmods.net/showthr...?t=8778+weapon

What about making the client call the drop impulse?
KCE is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-09-2005 , 20:55  
Reply With Quote #3

Oh, so you have to put weapon_name behind it?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
KCE
Senior Member
Join Date: Jan 2005
Location: Los Angeles, CA
Old 03-09-2005 , 21:20  
Reply With Quote #4

Quote:
Originally Posted by v3x
Oh, so you have to put weapon_name behind it?
Quote:
Originally Posted by XxAvalanchexX
"drop weapon_scout" will work just as "drop". However, "drop" only works in dropping the scout if you have it selected; "drop weapon_scout" will drop the scout no matter what weapon you have out.
Quote:
Originally Posted by AMX Mod X Documentation
http://www.amxmodx.org/funcwiki.php?go=module&id=1#const_cswp
Code:
CS Weapon Constants: 

CSW_P228		1
CSW_SCOUT		3
CSW_HEGRENADE		4
CSW_XM1014		5
CSW_C4			6
CSW_MAC10		7
CSW_AUG			8
CSW_SMOKEGRENADE	9
CSW_ELITE		10
CSW_FIVESEVEN		11
CSW_UMP45		12
CSW_SG550		13
CSW_GALI		14
CSW_GALIL		14
CSW_FAMAS		15
CSW_USP			16
CSW_GLOCK18		17
CSW_AWP			18
CSW_MP5NAVY		19
CSW_M249		20
CSW_M3			21
CSW_M4A1		22
CSW_TMP			23
CSW_G3SG1		24
CSW_FLASHBANG		25
CSW_DEAGLE		26
CSW_SG552		27
CSW_AK47		28
CSW_KNIFE		29
CSW_P90			30
KCE is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-09-2005 , 21:34  
Reply With Quote #5

Alright, I know what I'll do then.. Make them drop everything, give them a Glock/USP depending on their team..

And yes I know about the weapon names .
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
KCE
Senior Member
Join Date: Jan 2005
Location: Los Angeles, CA
Old 03-09-2005 , 21:39  
Reply With Quote #6

Quote:
Originally Posted by v3x
Alright, I know what I'll do then.. Make them drop everything, give them a Glock/USP depending on their team..

And yes I know about the weapon names .
Here's some more code to help you if you need it:

Code:
new weapon_list[32] new weapon_num new i get_user_weapons(id, weapon_list,weapon_num) //SAVES ALL WEAPONS TO A LIST strip_user_weapons(id) //STRIPS ALL OF THE USER'S WEAPONS new weapon_name[33] for(i=0; i<32; i++){ //DO FOR EACH WEAPON IN LIST         get_weaponname(weapon_list[i], weapon_name,32)        //if(weapon_list[i] != weapon_pistol) //TO CHECK WHAT YOU ARE GIVING BACK }
KCE is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-09-2005 , 21:52  
Reply With Quote #7

Ok, thanks.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x 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:13.


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