Raised This Month: $51 Target: $400
 12% 

[SOLVED] adminchat ..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 07-03-2016 , 09:25   [SOLVED] adminchat ..
Reply With Quote #1

Fixed Here
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |

Last edited by Dr Zayd; 07-03-2016 at 21:57. Reason: Fixed
Dr Zayd is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 07-03-2016 , 11:40   Re: [HELP] adminchat ..
Reply With Quote #2

PHP Code:
    if (said[0] != '@' || said[0] == '#'
        return 
PLUGIN_HANDLED 

Last edited by redivcram; 07-17-2016 at 19:32. Reason: forgot to fix solution
redivcram is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-03-2016 , 15:51   Re: [HELP] adminchat ..
Reply With Quote #3

Quote:
Originally Posted by redivcram View Post
PHP Code:
    if (said[0] != '@' || said[0] == '#'
        return 
PLUGIN_CONTINUE 
No, you should block by returning HANDLED; and check if message contains # not if first symbol is #.

You should do:

PHP Code:
public cmdSayAdmin(id

    new 
said[2
    
read_argv(1said1
     
    if (
said[0] != '@'
        return 
PLUGIN_CONTINUE 
     
    
new message[192], name[32], authid[32], userid 
    
new players[32], inum 
     
    read_args
(message191
    
remove_quotes(message

    if(
contain(message"#") != -1)
    return 
PLUGIN_HANDLED;

    
get_user_authid(idauthid31
    
get_user_name(idname31
    
userid get_user_userid(id
     
    
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^""nameuseridauthidmessage[1]) 
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")"nameuseridauthidmessage[1]) 
     
    if (
is_user_admin(id)) 
        
format(message191"(%L) %s :  %s"id"ADMIN"namemessage[1]) 
    else 
        
format(message191"(%L) %s :  %s"id"PLAYER"namemessage[1]) 

    
get_players(playersinum
     
    for (new 
0inum; ++i
    { 
        
// dont print the message to the client that used the cmd if he has ADMIN_CHAT to avoid double printing 
        
if (players[i] != id && get_user_flags(players[i]) & g_AdminChatFlag
            
client_print(players[i], print_chat"%s"message
    } 
     
    
client_print(idprint_chat"%s"message
     
    return 
PLUGIN_HANDLED 

siriusmd99 is offline
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 07-03-2016 , 20:38   Re: [HELP] adminchat ..
Reply With Quote #4

Ah thanks for help guys.
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd is offline
Amine Belokda
Senior Member
Join Date: Oct 2015
Location: ML_NOT_FOUND
Old 07-05-2016 , 01:49   Re: [SOLVED] adminchat ..
Reply With Quote #5

-_- Dr Zayd Briti Itzadk Post Bach tbadal dik sen membre 7SALTI
__________________
Amine Belokda is offline
Send a message via MSN to Amine Belokda
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 20:26.


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