Raised This Month: $ Target: $400
 0% 

format [Problem] ( Solved )


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-18-2014 , 11:54   format [Problem] ( Solved )
Reply With Quote #1

the plugin works fine but when you say its dosent change the color!WHY?

PHP Code:
/* Plugin generated by AMXX-Studio */
     
#include <amxmodx>
#include <amxmisc>
//#include <vip>
     
#define PLUGIN "[VIP] Chat Prefix"
#define VERSION "1.0"
#define AUTHOR "Natsheh"
     

enum 

Udead 0,
Ualive 
}
     
new const 
prefix[] = "[VIP]"
     
new const stats_prefix[][] = { 
"*DEAD*"
"*ALIVE*"
}
     
new const 
team_prefix[][] = {
"*Spectator*",
"*Terrorist*",
"*CT*"
}
     
new 
msgid_saytext
     
public plugin_init()
{
register_plugin(PLUGINVERSIONAUTHOR)

msgid_saytext get_user_msgid("SayText")

register_message(msgid_saytext"vip_cmd_saytext")
}
     
public 
vip_cmd_saytext(msgidmsgdestid)
{
if(
/*!is_user_vip(id) && */!is_user_connected(id)) return

new 
sMsg[192], sBuffer[192], szArgs[64], szName[32], szChannel[32]

get_user_name(idszName32-1)
get_msg_arg_string(4szArgs64-1)
get_msg_arg_string(2szChannel32-1)

if(
equal(szChannel"#Cstrike_Chat_All"16))
{
format(sBuffer191"%s %c%s %c%s: %s"stats_prefix[is_user_alive(id) ? Ualive:Udead],
'^x04'prefix'^x01'szNameszArgs)
}
else
{
format(sBuffer191"%s %c%s %c%s %c%s: %s"stats_prefix[is_user_alive(id) ? Ualive:Udead],
'^x03'team_prefix[get_user_team(id)], '^x04'prefix'^x01'szNameszArgs)
}

add(sMsg191sBuffer)
set_msg_arg_string(2sMsg)


Last edited by YamiKaitou; 12-20-2014 at 11:04.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-18-2014 , 11:56   Re: format [Problem]
Reply With Quote #2

Where is the rest of the code?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-18-2014 , 11:57   Re: format [Problem]
Reply With Quote #3

Quote:
Originally Posted by YamiKaitou View Post
Where is the rest of the code?
i updated it take a look
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Old 12-18-2014, 12:12
Natsheh
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-18-2014 , 12:36   Re: format [Problem]
Reply With Quote #5

Fixed :SSS

PHP Code:

public vip_cmd_saytext(msgidmsgdestid)
{
    if(
/*!is_user_vip(id) && */!is_user_connected(id)) return
    
    new 
sMsg[192], sBuffer[192], szArgs[64], szName[32], szChannel[32]
    
    
get_user_name(idszName32-1)
    
get_msg_arg_string(4szArgs64-1)
    
get_msg_arg_string(2szChannel32-1)
    
    if(
equal(szChannel"#Cstrike_Chat_All"16))
    {
        
format(sBuffer191"%s %c%s %c%s%c: %c%s"stats_prefix[is_user_alive(id) ? Ualive:Udead],
        
'^x04'prefix'^x01'szName'^x03''^x01'szArgs)
    }
    else
    {
        
format(sBuffer191"%s %c%s %c%s %c%s%c: %c%s"stats_prefix[is_user_alive(id) ? Ualive:Udead],
        
'^x03'team_prefix[get_user_team(id)], '^x04'prefix'^x01'szName'^x03''^x01'szArgs)
    }
    
    
add(sMsg191"^x01")
    
add(sMsg191sBuffer)
    
set_msg_arg_string(2sMsg)

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Kuma77
Senior Member
Join Date: Sep 2014
Location: Behind PC
Old 12-20-2014 , 10:54   Re: format [Problem] ( Solved )
Reply With Quote #6

Why you dont show us what is problem and how it is sloved to make people benefit
__________________
SPACE TIME
Kuma77 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 15:26.


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