Raised This Month: $ Target: $400
 0% 

loop through all players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hypheni
Senior Member
Join Date: Jul 2011
Location: India
Old 02-13-2013 , 12:29   Re: loop through all players
Reply With Quote #1

Quote:
print_message(id, const msg[])
{
message_begin(id ? MSG_ONE : MSG_ALL, gmsgSayText, _, id)
write_byte(id)
write_string(msg)
message_end()
}
So for sending message to all players I need to pass 0 as 1st param and actual message as 2nd.

Actually I don't understand this write_byte() function. It says write bytes to message. In C char is 1 byte. So how these bytes are calculated here for particular message which need to be sent to client.
hypheni is offline
Send a message via Skype™ to hypheni
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:11.


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