Raised This Month: $ Target: $400
 0% 

Problem with colored text


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
J4CK
Member
Join Date: Dec 2008
Location: India
Old 11-27-2010 , 22:53   Problem with colored text
Reply With Quote #1

lang file:
PHP Code:
SCAN_CLEAN human
SCAN_INFECTED 
zombie
SCAN_RESULTS 
= [ZombieModYou are
zm mod:
PHP Code:
public task_newround()
{
    static 
players[32], numiidnewzombie
    get_players
(playersnum"a")

    
newzombie players[_random(num)]
    if(
num && is_user_connected(g_zombieoftheround))
    {
        while(
g_zombieoftheround == newzombie)
            
newzombie players[_random(num)]
    }
    
g_zombieoftheround newzombie

    
for(0numi++)
    {
        
id players[i]
        
ColorChat(idRED"%L %L"id"^x04SCAN_RESULTS"idg_zombieoftheround == id "^x03SCAN_INFECTED" "^x04SCAN_CLEAN")
    }
    
    if(
get_pcvar_num(cvar_randomspawn))
        
randomly_place_everyone()

need:
[ZombieMod] You are: human
[ZombieMod] You are: zombie
J4CK is offline
Jacob
Senior Member
Join Date: Oct 2010
Old 11-28-2010 , 00:32   Re: Problem with colored text
Reply With Quote #2

^x04%L instead of ^x04SCAN_RESULTS
Jacob is offline
J4CK
Member
Join Date: Dec 2008
Location: India
Old 12-09-2010 , 22:08   Re: Problem with colored text
Reply With Quote #3

Quote:
Originally Posted by Jacob View Post
^x04%L instead of ^x04SCAN_RESULTS
(Nooooo) all text will be green

Quote:
I want, if player is normal: (text will be)
[ZombieMod] You are: human

If player is zombie: (text will be)
[ZombieMod] You are: zombie

i'm not understand why my method don't works

PHP Code:
ColorChat(idRED"%L %L"id"^x04SCAN_RESULTS"idg_zombieoftheround == id "^x03SCAN_INFECTED" "^x04SCAN_CLEAN"
J4CK is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-09-2010 , 22:12   Re: Problem with colored text
Reply With Quote #4

Remove the color codes from the lang names.

Code:
if(g_zombieoftheround == id) {     ColorChat(id, RED, "^x04%L ^x03%L", id, "SCAN_RESULTS", id, "SCAN_INFECTED") } else {     ColorChat(id, GREEN, "%L %L", id, "SCAN_RESULTS", id, "SCAN_CLEAN") }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Jacob
Senior Member
Join Date: Oct 2010
Old 12-09-2010 , 22:51   Re: Problem with colored text
Reply With Quote #5

Quote:
Originally Posted by J4CK View Post
(Nooooo) all text will be green




i'm not understand why my method don't works

PHP Code:
ColorChat(idRED"%L %L"id"^x04SCAN_RESULTS"idg_zombieoftheround == id "^x03SCAN_INFECTED" "^x04SCAN_CLEAN"
I just want to tell you that ^04 should not be before SCAN_RESULTS,
Jacob 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 11:14.


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