Raised This Month: $ Target: $400
 0% 

cmd_target / find_player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JocAnis
Veteran Member
Join Date: Jun 2010
Old 03-21-2011 , 11:29   cmd_target / find_player
Reply With Quote #1

need help with find_player or cmd_target...i m trying to make code which will work like: say /stop Nick => stop command execute on Nick, here is my try:

PHP Code:
register_clcmd"say /stop""stop" )

public 
stopid )
{
    new 
arg132 ], name32 ]
    
read_argv1arg131 )
    
    new 
player find_player"bl" )//also tryed with: cmd_target( id, arg1, 31 ) and cmd_target( id, arg1, 0 ), none works
    
    
if( player )
    {
        
get_user_nameplayername31 )
        
kuldaunplayer ] = false
        ColorChat
0TEAM_COLOR"^4[Mini-Ban]^3 %s^1 je ipak ubedio admine da ne koristi zabranjene komande." )//this not metter
    
}
    else
    {
        
ColorChat0TEAM_COLOR"No player founds" )
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED

thanks.
JocAnis is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-21-2011 , 13:19   Re: cmd_target / find_player
Reply With Quote #2

If you register the command, the callback will never be triggered if you say something more than /stop.
You have to register only "say" command and then to check args (read_args, remove_quote, parse)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 23:44.


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