Raised This Month: $ Target: $400
 0% 

Problem with client_print_color


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 10-29-2021 , 12:24   Re: Problem with client_print_color
Reply With Quote #1

Quote:
Originally Posted by Grav3yardman View Post
Hi
I inserted colors for the text in the script. When I do the compile there are no errors, but when I log in to the server and type timeleft nothing happens (The text from the script that should be in color does not appear). Does anyone know what the problem is?
The code I use is:

Code:
#include<amxmodx>
#include<amxmisc>

new MaxRounds
new RoundCount

public plugin_init() {
	
	register_plugin("timeleft", "", "Muhammet Kaya")
	register_logevent("round_end", 2, "1=Round_End")
	register_event("TextMsg", "new_map_or_restart", "a", "2&#Game_C", "2&#Game_w")
	register_clcmd("say timeleft","ShowRoundsLeft")
	MaxRounds = get_cvar_pointer("mp_maxrounds")
}
public round_end() 
{ 
	RoundCount++ 
}

public new_map_or_restart() 
{ 
	RoundCount = 0
}
public ShowRoundsLeft(id)
{
	if(get_pcvar_num(MaxRounds) == 0)
	{
		client_print_color(id,print_chat, "!g[KGB] !nNema ogranicenja rundi!")
	}
	if(get_pcvar_num(MaxRounds) >0)
	{
		client_print_color(id,print_chat, "!g[KGB] !nPreostalo rundi: !t%d", get_pcvar_num(MaxRounds) - RoundCount)
	}
}


/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1050\\ f0\\ fs16 \n\\ par }
*/
https://www.amxmodx.org/api/amxmodx/client_print_color
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
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:38.


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