Raised This Month: $ Target: $400
 0% 

print chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SPT1
Senior Member
Join Date: Aug 2012
Old 09-08-2012 , 11:59   print chat
Reply With Quote #1

how will i print a text only for guys with ADMIN_LEVE_G
i tried this but didn't work
PHP Code:
public PrintText(id)

    if(
get_user_flags(id) & ADMIN_LEVEL_G)
{
 
client_print(idprint_chat"you have the flag ADMIN_LEVEL_G!")

__________________
AMXMODX

Last edited by SPT1; 09-08-2012 at 12:03.
SPT1 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 09-08-2012 , 13:32   Re: print chat
Reply With Quote #2

loop through all players, checking if they player has ADMIN_LEVEL_G then print to that id
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
SPT1
Senior Member
Join Date: Aug 2012
Old 09-08-2012 , 14:07   Re: print chat
Reply With Quote #3

show me how to do?
__________________
AMXMODX
SPT1 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-08-2012 , 14:13   Re: print chat
Reply With Quote #4

This is basic code, if you can't do it, just give up.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-08-2012 , 14:17   Re: print chat
Reply With Quote #5

And, it's been asked a million times and is in a million plugins.
__________________
fysiks is offline
SPT1
Senior Member
Join Date: Aug 2012
Old 09-08-2012 , 15:01   Re: print chat
Reply With Quote #6

Give any link from which i can learn
__________________
AMXMODX
SPT1 is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 09-08-2012 , 15:20   Re: print chat
Reply With Quote #7

here's a link , the search link
EpicMonkey is offline
ColdWar
Member
Join Date: Aug 2012
Old 09-08-2012 , 15:31   Re: print chat
Reply With Quote #8

Lool, You even used a register_clcmd or a set_task to activate the mod?
Even, client_putinserver...
Use this:
PHP Code:
#include <amxmodx>

public client_putinserver(id)
{
           
set_task(2.0,"Flags",id)
}

public 
Flags(id)
{
        if(
get_user_flags(id) & ADMIN_LEVEL_G)
    {
               
client_print(id,print_chat,"You Have ADMIN_LEVEL_G Flag!")
    }

When you will connect to the server you will see a message, after 2 seconds..

Last edited by ColdWar; 09-08-2012 at 15:34.
ColdWar is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 09-08-2012 , 16:06   Re: print chat
Reply With Quote #9

Quote:
Originally Posted by SPT1 View Post
Give any link from which i can learn
http://www.amxmodx.org/doc/index.htm...%2Fscripts.htm
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 09-08-2012 at 16:07.
Liverwiz is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 09-08-2012 , 18:34   Re: print chat
Reply With Quote #10

Quote:
Originally Posted by ColdWar View Post
Lool, You even used a register_clcmd or a set_task to activate the mod?
Even, client_putinserver...
Use this:
PHP Code:
#include <amxmodx>

public client_putinserver(id)
{
           
set_task(2.0,"Flags",id)
}

public 
Flags(id)
{
        if(
get_user_flags(id) & ADMIN_LEVEL_G)
    {
               
client_print(id,print_chat,"You Have ADMIN_LEVEL_G Flag!")
    }

When you will connect to the server you will see a message, after 2 seconds..
Shouldn't be there a loop ?
Torge 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 08:12.


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