Slipknight wrote: Good job copy and pasting myne ^^
wow what a dumb prick, this ek announcer was coded by XtraKrazzy.
I kind of disrespect you by making up such nonsense, each person around the world could create a function like this. Dax however has a Little *sarcastic* bit more experience which makes it kind of an insult to say something like that.
Heres your rewrite..
Perfect..
Helbreath II Project Manager & All round Developer. <br><i>(Don't worry, we're not dead)</i>
Slipknight wrote: Good job copy and pasting myne ^^
wow what a dumb prick, this ek announcer was coded by XtraKrazzy.
Ffs.. This is the last time i'm going to say this.. Xtra and whoever the fuck else had ek announcers at the time both had bugs! That is why this was written. Locobans asked me to fix xtra's and when i saw it all i did was highlight it and hit delete. I coded this ground up and it could be almost 2 lines if you wanted. There lies another point. It could be 2 lines for a reason. The code to make it is pretty fucking standard.
The minimum required to make an ek announcer:
2 parts Sequence (Set the message and display the message)
1 part Selection (Check if the receiving client is active)
1 part Repetition (Get all the clients currently on the server)
1000 people could code this and 999 of them would probably code the exact same fucking thing. And the 1 who didn't end up with the same thing was probably spanish..
Next fucking retard to start this bullshit will get bitch slapped.
[EDIT]
Shetar wrote:
Dump this code and rewrite it. This time, work as efficient as possible and make it flexible (for others slash noobs) to use it.
wsprintf(G_cTxt, "%s killed %s", cAttackerName, m_pClientList[iClientH]->m_cCharName);
for (i = 1; i < DEF_MAXCLIENTS; i++) if (m_pClientList[i] != NULL) SendNotifyMsg(NULL, i, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, G_cTxt);
None of you probably thought it was possible when i said this before.. 2 line ek announcer.
Put that before the last return in CGame::ClientKilledHandler.
If you can't use this code it's pretty fucking obvious you should'nt be using any code at all.
You all just got fucking rolled so drop this bullshit about code ripping.
i dont know about "idontremember" but im sure there exists printf clone that returns text.
Oh lol. Yeah that would work too..
But it's written to a buffer for a reason. This way before the for loop is initiated the message variable is written. So every time the loop finds an active client it's only sending a variable it already has ready..
Your way requires the loop to rewrite the message var each time the server finds an active client. So it should remain in a buffer for the sake of efficiency.
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>