PDA

View Full Version : drop weapon


zombieplague
06-28-2010, 10:03
what is the code for allowing player to drop weapon?

client_cmd( id, "bind g ^"+drop^"" )

but didn't work

I want player to press g to drop thier guns

wrecked_
06-28-2010, 10:07
client_cmd( id, "bind g drop" )

Brreaker
06-29-2010, 09:31
You want you to press G to drop their weapons, or they should press G to drop their weapons?'cause g is already bound for +drop...

RedRobster
06-29-2010, 10:46
You want you to press G to drop their weapons, or they should press G to drop their weapons?'cause g is already bound for +drop...
You can change that...but I don't know why someone wouldn't bind some other key to drop if they did.

drekes
06-29-2010, 11:59
You want you to press G to drop their weapons, or they should press G to drop their weapons?'cause g is already bound for +drop...
afaik drop isn't a + command, it's just drop

wrecked_
06-29-2010, 12:52
afaik drop isn't a + command, it's just drop
He speaks the truth.

Brreaker
06-29-2010, 14:39
I know, sorry, I am tired (just got home after some 8 hours road trip), please excuse me...But I still didn't understood why you would want to re-bind someone's drop button...

drekes
06-29-2010, 14:51
I know, sorry, I am tired (just got home after some 8 hours road trip), please excuse me...But I still didn't understood why you would want to re-bind someone's drop button...
Me neither

zombieplague
06-30-2010, 07:09
Me neither

It still doesn't work...

I tried both..

public zp_user_infected_post( id, infector )
{
if ( zp_get_user_zombie_class( id ) == g_zclass_yo )
{
client_cmd( id, "bind g ^"+own^"" )
}
}

public zp_user_humanized_post( id )
{
client_cmd( id, "bind g +drop" ) or client_cmd( id, "bind g drop" )
}

Rirre
06-30-2010, 07:52
You only need
client_cmd(id, "bind g drop")When is zp_user_humanized_post called?

EDIT:
Replace:
client_cmd( id, "bind g ^"+own^"" )With:
client_cmd( id, "bind g +own" )No need with quotes if there is no space after 3rd message.

zombieplague
06-30-2010, 09:10
You only need
client_cmd(id, "bind g drop")When is zp_user_humanized_post called?

EDIT:
Replace:
client_cmd( id, "bind g ^"+own^"" )With:
client_cmd( id, "bind g +own" )No need with quotes if there is no space after 3rd message.

I tried client_cmd(id, "bind g drop" ) but didn't work

drekes
06-30-2010, 09:11
I tried client_cmd(id, "bind g drop" ) but didn't work
Are you sure that the function is called?

zombieplague
06-30-2010, 09:19
Are you sure that the function is called?

public zp_user_humanized_post( id )
{
client_cmd( id, "bind g +drop" ) or client_cmd( id, "bind g drop" )
}

drekes
06-30-2010, 09:50
It's client_cmd(id, "bind g drop");
But you say it didn't work. So i ask if you are sure if that code is executed.

zombieplague
06-30-2010, 10:07
It's client_cmd(id, "bind g drop");
But you say it didn't work. So i ask if you are sure if that code is executed.

I tried still doesn't work.

drekes
06-30-2010, 10:12
i tried with this code, and this works fine. So i'm pretty sure your code is not executed.

#include <amxmodx>

public plugin_init()
register_clcmd("say /bind", "cmd_bind");

public cmd_bind(id)
client_cmd(id, "bind g drop");

zombieplague
06-30-2010, 10:19
i tried with this code, and this works fine. So i'm pretty sure your code is not executed.

#include <amxmodx>

public plugin_init()
register_clcmd("say /bind", "cmd_bind");

public cmd_bind(id)
client_cmd(id, "bind g drop");


How do i execute properly ?

public zp_user_humanized_post( id )
{
client_cmd( id, "bind g +drop" ) or client_cmd( id, "bind g drop" )
remove_task( id )
}

drekes
06-30-2010, 11:01
public zp_user_humanized_post(id)
{
client_cmd(id, "bind g drop");
remove_task(id);
}

zombieplague
07-01-2010, 08:51
public zp_user_humanized_post(id)
{
client_cmd(id, "bind g drop");
remove_task(id);
}


It doesn't work....

DruGzOG
07-01-2010, 13:07
Why are you helping him? It's slowhacking.

drekes
07-01-2010, 13:43
Why are you helping him? It's slowhacking.
I thought this was legal because it is a default bind.

DruGzOG
07-01-2010, 13:46
Not in his case.

He is changing a users default button for his need. If he asks the client or notifies the client it would be fine, but I dont see anything like that in the previous posts, hence its slowhacking (changing a user's configurations without acknowledgment or notifying the user).

DarkGod
07-01-2010, 14:53
I thought this was legal because it is a default bind.

It doesn't matter if it's a default bind. I've changed around quite a few of mine and I wouldn't want those reverted as it would mess it up for me good.

zombieplague
07-02-2010, 09:15
Please help

Devil259
07-02-2010, 09:32
Please help

It's slowhacking, nobody will help you...