AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   HELP !!! Make Part Of TEXT colored in sma file (https://forums.alliedmods.net/showthread.php?t=198675)

ston3dmorrow 10-19-2012 10:05

HELP !!! Make Part Of TEXT colored in sma file
 
Please help me, i need to text what printed to player when i use this command on player.
Like : An admin has given you invisibility.

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>

public plugin_init()
{
    
register_plugin("Invisibility","0.1","SweatyBanana")
    
register_clcmd("amx_invisible","invisible",ADMIN_BAN,"Invisibility On")
    
register_clcmd("amx_visible","visible",ADMIN_BAN,"Invisibility Off")
}

public 
invisible(id,level,cid)
{
    if (!(
get_user_flags(id)&ADMIN_BAN))
    {
        return 
PLUGIN_HANDLED
    
}

    new 
TARGET[32]
    
read_argv(1,TARGET,31)

    new 
PLAYER cmd_target(id,TARGET,7)

    
set_user_rendering(PLAYER,kRenderFxNone,0,0,0,kRenderTransAlpha,0)
    
client_print(PLAYER,print_chat,"An admin has given you invisibility.")

    return 
PLUGIN_HANDLED
}

public 
visible(id,level,cid)
{
    if (!(
get_user_flags(id)&ADMIN_BAN))
    {
        return 
PLUGIN_HANDLED
    
}

    new 
TARGET[32]
    
read_argv(1,TARGET,31)

    new 
PLAYER cmd_target(id,TARGET,7)

    
set_user_rendering(PLAYER,kRenderFxNone,0,0,0,kRenderTransAlpha,255)
    
client_print(PLAYER,print_chat,"An admin has taken away your invisibility.")

    return 
PLUGIN_HANDLED
}

public 
client_disconnect(id)
    
set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAlpha,255


wickedd 10-19-2012 12:21

Re: HELP !!! Make Part Of TEXT colored in sma file
 
Search "ColorChat" or post in the request section.

xDrugz 10-19-2012 15:56

Re: HELP !!! Make Part Of TEXT colored in sma file
 
you mean "colorchat" or "chatcolor"
search it with these keywords.

tyin 10-20-2012 22:29

Re: HELP !!! Make Part Of TEXT colored in sma file
 
ColorChat Guide

PHP Code:

#include <colorchat>
.
.
.
ColorChat(PLAYER,GREEN,"An admin ^1has taken away your invisibility."



All times are GMT -4. The time now is 09:26.

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