Raised This Month: $ Target: $400
 0% 

Need simple print help!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZerroQ
Member
Join Date: Jun 2006
Location: European Union: Latvia
Old 06-26-2006 , 12:30   Need simple print help!
Reply With Quote #1

Greetings you all!
I really like the script Allow round finish! (made by: EKS)
But i've got an idea and it doesn't really go throught with my knowledges in thoose kind of scriptings.
(: So the point is: At the end of the finished round, starts the next round within changes the map to (nextmap).. when the last round is finished usually server opens the scores list and changes the map! I want at the same time print an text in the middle of screen. For example you can imagine, the printed text "Counter-Terorist win!"
Here's the code i believe in which i have to add that text:
Code:
public Event_EndRound()
{
	if(g_IsLastRound == 1)
	{
		client_print(0,print_chat,"The last round has ended!")
		client_print(0,print_center,"We appreciate your playing please wait untill the map changes!")
		set_task(5.0,"Task_DelayMapEnd",TASK_ID_DELAYMAPCHANGE,_,_,"a",1) // We delay the end of the map with a few sec, so the last guys death is viewable
	}
}
public server_changelevel(map[])
{
	if(g_IsLastRound == 1)
		Task_DelayMapEnd()
}
public Task_DelayMapEnd()
{
	remove_task(TASK_ID_DELAYMAPCHANGE)
	g_IsLastRound = 0
	if(get_cvar_num("mp_timelimit") == 0)
		server_cmd("mp_timelimit %d",g_OldTimelimit)
}
The line in red is what i have added to the script! Any suggestions, comments ?
Is it possible to change the color of the centered text ? ( IM ingame )
__________________
* we Create our own fate...

Last edited by ZerroQ; 06-26-2006 at 12:38.
ZerroQ is offline
Send a message via Skype™ to ZerroQ
BetaX
Member
Join Date: Nov 2005
Old 06-26-2006 , 20:40   Re: Need simple print help!
Reply With Quote #2

Quote:
Originally Posted by ZerroQ
The line in red is what i have added to the script! Any suggestions, comments ?
Is it possible to change the color of the centered text ? ( IM ingame )
Honestly, I'd use a hudmessage. They're pretty n' such. >_>

http://amxmodx.org/funcwiki.php?go=func&id=28

But if you wanted to change the color of text...
Code:
    // This is from Damaged Soul's post a while back...
    message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
    write_byte(id)
    write_string("^x03Team colored text ^x01Normal color")
    message_end()
Yeeea... You can only use Red, Green, White, though.

Tis' built into the game engine.

Sooo maybe...

Code:
       message_begin(MSG_ONE,get_user_msgid("SayText"),{0,0,0},0);
       write_byte(0)
       write_string(string[])
       message_end()
Would setting the id as 0 send it to everyone? I'm not very experienced with messages, honestly. :S
BetaX is offline
ZerroQ
Member
Join Date: Jun 2006
Location: European Union: Latvia
Old 06-28-2006 , 11:27   Re: Need simple print help!
Reply With Quote #3

I resolved this question by myself
Here's the code to print text in front of the crosshair ( in the middle of screen )
Code:
engclient_print(0,engprint_center, "Thank you for playing!^nLoading next map...")
__________________
* we Create our own fate...
ZerroQ is offline
Send a message via Skype™ to ZerroQ
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-30-2006 , 13:18   Re: Need simple print help!
Reply With Quote #4

Quote:
Originally Posted by ZerroQ
I resolved this question by myself
Here's the code to print text in front of the crosshair ( in the middle of screen )
Code:
engclient_print(0,engprint_center, "Thank you for playing!^nLoading next map...")
You can just use client_print(0,print_center... but whatever.

Code:
       message_begin(MSG_ONE,get_user_msgid("SayText"),{0,0,0},0);        write_byte(0)        write_string(string[])        message_end()

No, use MSG_BROADCAST rather than MSG_ONE.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Reply


Thread Tools
Display Modes

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 08:03.


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