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 stop( id )
{
new arg1[ 32 ], name[ 32 ]
read_argv( 1, arg1, 31 )
new player = find_player( "bl" )//also tryed with: cmd_target( id, arg1, 31 ) and cmd_target( id, arg1, 0 ), none works
if( player > 0 )
{
get_user_name( player, name, 31 )
kuldaun[ player ] = false
ColorChat( 0, TEAM_COLOR, "^4[Mini-Ban]^3 %s^1 je ipak ubedio admine da ne koristi zabranjene komande." )//this not metter
}
else
{
ColorChat( 0, TEAM_COLOR, "No player founds" )
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
thanks.