If-statement problems...
Ok this function is called when a player dies,
Code:
But this if statement is always executed no matter what team ' id ' or ' i ' is on. :/ Code:
I would apperciate any help :) Thnx --Zenith77 |
Would you mind terribly if I just rewrote your entire function?
|
Try using this for maxplayers:
Code:
|
Thats not the problem, and i dont like using get_players(), i dont know why, i just dont.
|
If its for C-strike you could try using the 'cs_get_user_team'
|
I thought about that, it really woudnt make a difference since they both return the same numbers.
|
My style of programming is slightly different and some of my variables could probably be named better but...
Code:
|
Look beyond the code... actually, look above it, at the function header:
Code:
I'm assuming this function is a hook of DeathMsg. DeathMsg is a global event and is sent to everyone. Use read_data(2) to get the victim, I'm not sure what id actually holds, but I'm fairly confident it's not the id of the player receiving the message (since it is only sent once, to everyone). |
Thanks for looking outside the box, Avalanche.
|
Quote:
not really must, but it the easiest way. |
| All times are GMT -4. The time now is 23:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.