Raised This Month: $32 Target: $400
 8% 

Print a message in chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ericsp
Junior Member
Join Date: Apr 2018
Old 04-14-2018 , 19:41   Print a message in chat
Reply With Quote #1

Hi guys!!! Thanks a lot for all the help so far
I need your help again unfortunately (can't bring myself NOT to post )

Basically a plugin where if a player (dead or alive) says !vip in chat, then the player (ONLY the player, not all server) sees this :

Code:
{red}VIPii {default}au urmatoarele avantaje:
- acces la {green}!trails
- ‎{green}skin special {default}la alegere
Pret: {blue}2€/luna {default}sau {blue}10€ permanent
where {red} etc are colors that I've seen before in this plugin: https://forums.alliedmods.net/showthread.php?t=155705

Thaaaanks a lot!!!
ericsp is offline
PinHeaDi
Senior Member
Join Date: Jul 2013
Location: Bulgaria
Old 04-15-2018 , 07:09   Re: Print a message in chat
Reply With Quote #2

PHP Code:
#include <sourcemod>
#include <multicolors>

#pragma semicolon 1
#pragma newdecls required

public void OnPluginStart()
{
    
RegConsoleCmd("sm_vip"Vip);
}

public 
Action Vip(int clientint args)
{
    
CPrintToChat(client"{lightred}VIPii {default}au urmatoarele avantaje:");
    
CPrintToChat(client"- acces la {green}!trails");
    
CPrintToChat(client"- ‎{green}skin special {default}la alegere");
    
CPrintToChat(client"Pret: {blue}2€/luna {default}sau {blue}10€ permanent");

You need Multicolors to compile it.
__________________

Last edited by PinHeaDi; 04-15-2018 at 07:12.
PinHeaDi is offline
michaelrw
Senior Member
Join Date: Jul 2017
Old 04-17-2018 , 14:42   Re: Print a message in chat
Reply With Quote #3

if sm_vip is already registered by another plugin, then youd either need to integrate PinHeadDi's code into that plugin, or add a chat listener for !vip and conditionally print to chat (if im thinking about this correctly)
__________________

michaelrw 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 17:45.


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