Raised This Month: $ Target: $400
 0% 

Help with Drop-weapon script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
goodtod
New Member
Join Date: Dec 2004
Old 12-25-2004 , 19:03   Help with Drop-weapon script
Reply With Quote #1

I am writing a simple script for use with CSDM on scoutzknivez. The script should drop the scout whenever the player spawns(not just on a new round). Tell me what I'm doing wrong?
Code:
#include <amxmodx>


public plugin_init() { 
	
	register_plugin("scoutzknivez drop","0.1","goodman")
	new mapname[33]
	get_mapname(mapname,32)
	if(containi(mapname,"scoutzknivez") > -1 ) {  
		register_event("ResetHUD", "new_spawn", "be")
		}
} 

public new_spawn()
{
	client_cmd(0,"drop weapon_scout")
	return PLUGIN_CONTINUE
}
Thanks in advance you guys...
goodtod is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-25-2004 , 22:52   Re: Help with Drop-weapon script
Reply With Quote #2

Why don't you tell us what the problem is and then maybe we can tell you what you are doing wrong.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
doomy
Member
Join Date: Jul 2004
Location: Plano, Texas
Old 12-25-2004 , 23:17  
Reply With Quote #3

Use this:

Code:
client_cmd( 0, "drop" )

instead of this:

Code:
client_cmd(0,"drop weapon_scout")

if you want them to not start out with it u r going to have to use the event CurWeapon and set up som code to tell when its there first time getting their weapon and then drop it. OR you could just use a timer off of ResetHUD and wait like...ooo...half a second; then you could drop it.
doomy is offline
goodtod
New Member
Join Date: Dec 2004
Old 12-26-2004 , 00:52  
Reply With Quote #4

OK, sorry I didn't type the problem before, I thought I did.

Problem is that it takes like 5 seconds for the scout to be dropped when it needs to be dropped before the CSDM weapon selection comes up.

TIA
goodtod is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-26-2004 , 02:02  
Reply With Quote #5

I don't think I can help you, but in regards to doomy: "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.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 12-26-2004 , 04:33  
Reply With Quote #6

this
Code:
public new_spawn() {    client_cmd(0,"drop weapon_scout")    return PLUGIN_CONTINUE }

should be this
Code:
public new_spawn(id) {    client_cmd(id,"drop weapon_scout")    return PLUGIN_CONTINUE }
Freecode is offline
goodtod
New Member
Join Date: Dec 2004
Old 12-26-2004 , 17:37  
Reply With Quote #7

Quote:
Originally Posted by Freecode
should be this
Code:
public new_spawn(id) {    client_cmd(id,"drop weapon_scout")    return PLUGIN_CONTINUE }
Hmmm...That just made it stop working.
goodtod is offline
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 12-26-2004 , 21:47  
Reply With Quote #8

Here you go :
Code:
#include <amxmodx> public plugin_init() {        register_plugin("scoutzknivez drop","0.1","goodman")    new mapname[33]    get_mapname(mapname,32)    if(containi(mapname,"scoutzknivez") > -1 ) {       register_event("ResetHUD", "new_spawn", "be")       } } public new_spawn(id) {    client_cmd(id,"drop weapon_scout")    return PLUGIN_CONTINUE }
Peli is offline
Send a message via MSN to Peli
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