AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   print chat (https://forums.alliedmods.net/showthread.php?t=195507)

SPT1 09-08-2012 11:59

print chat
 
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!")



Liverwiz 09-08-2012 13:32

Re: print chat
 
loop through all players, checking if they player has ADMIN_LEVEL_G then print to that id

SPT1 09-08-2012 14:07

Re: print chat
 
show me how to do?

ConnorMcLeod 09-08-2012 14:13

Re: print chat
 
This is basic code, if you can't do it, just give up.

fysiks 09-08-2012 14:17

Re: print chat
 
And, it's been asked a million times and is in a million plugins.

SPT1 09-08-2012 15:01

Re: print chat
 
Give any link from which i can learn

EpicMonkey 09-08-2012 15:20

Re: print chat
 
here's a link , the search link :3

ColdWar 09-08-2012 15:31

Re: print chat
 
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..

Liverwiz 09-08-2012 16:06

Re: print chat
 
Quote:

Originally Posted by SPT1 (Post 1794508)
Give any link from which i can learn

http://www.amxmodx.org/doc/index.htm...%2Fscripts.htm

Torge 09-08-2012 18:34

Re: print chat
 
Quote:

Originally Posted by ColdWar (Post 1794527)
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 ?


All times are GMT -4. The time now is 08:12.

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