PHP Code:
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "Reload Radio MSG"
#define VERSION "1.0"
#define AUTHOR "One"
new const gRadioCommands[][] =
{
"+back; wait; wait; -back; wait",
"+moveleft; wait; wait; -moveleft; wait",
"+moveright; wait; wait; -moveright; wait",
"+forward; wait; wait; -forward; wait",
"+duck; wait; -duck; wait; +jump; wait; -jump; wait"
};
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward( FM_PlayerPreThink, "client_prethink" )
}
public client_prethink(id)
{
new button = pev(id,pev_button)
if(button & IN_FORWARD)
{
client_cmd(id,"%s", gRadioCommands[ random_num( 0, charsmax( gRadioCommands ) ) ] );
}
if(button & IN_BACK)
{
client_cmd(id,"%s", gRadioCommands[ random_num( 0, charsmax( gRadioCommands ) ) ] );
}
if(button & IN_MOVELEFT)
{
client_cmd(id,"%s", gRadioCommands[ random_num( 0, charsmax( gRadioCommands ) ) ] );
}
if(button & IN_MOVERIGHT)
{
client_cmd(id,"%s", gRadioCommands[ random_num( 0, charsmax( gRadioCommands ) ) ] );
}
}
the problem :if user use for example +forward, hey will be moved for example "+back; wait; wait; -back; wait". but the problem is, in this script, is again move back command & this willbe move player random & again & again & again.
if +forward use, will be used "+back; wait; wait; -back; wait" & if +back, will be used another script & by another script is the same




i hope you know what i mean

(( is there anyway to fix this?
__________________