Raised This Month: $ Target: $400
 0% 

Movement


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-30-2009 , 10:34   Movement
Reply With Quote #1

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(PLUGINVERSIONAUTHOR)
    
register_forwardFM_PlayerPreThink"client_prethink" )
}
public 
client_prethink(id)
{
    new 
button pev(id,pev_button)
 
    if(
button IN_FORWARD)
    {
        
client_cmd(id,"%s"gRadioCommandsrandom_num0charsmaxgRadioCommands ) ) ] );
    }
    if(
button IN_BACK)
    {
        
client_cmd(id,"%s"gRadioCommandsrandom_num0charsmaxgRadioCommands ) ) ] );
    }
    if(
button IN_MOVELEFT)
    {
        
client_cmd(id,"%s"gRadioCommandsrandom_num0charsmaxgRadioCommands ) ) ] );
    }
    if(
button IN_MOVERIGHT)
    {
        
client_cmd(id,"%s"gRadioCommandsrandom_num0charsmaxgRadioCommands ) ) ] );
    }

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?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
 



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 08:52.


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