Killing players in ESF
Im stuck at one point, and im wondering, how can i kill all clients on the enemy team by using for example: .KillSpecial?
I was thinking about using user_kill, but i cant use it to kill all players on enemy team, cause with it i cant determine which players are enemies :S |
Code:
That should kill everyone not on the same team as the id passed into the function. |
Alternately, if you want it to have a better chance of working and have it optimized a bit at the same time...
Code:
|
If you want to get even craftier still... you can add the "e" flag in get_players() as well and pass in the name of the other team so that you don't have to do any checks within the loop itself.
|
Yeah, my bad, yours won't work either though Brad.
Mine had an error in the user_kill section, should have been iPlayers[iCount], but Brad optimized it (incorrectly). Here's a fixed version: Code:
|
Er, I actually optimized it correctly. What I failed to do was hug the 'for' block. Not an optimizing error. More a syntax error. :)
|
Yeah, whatever. Both of ours were wrong anyways so it doesn't really matter.
|
I was just pointing out your false statement. No 'tude involved.
@Rixorster: Let us know how this works for you. |
Quote:
|
Hawk, kindly stop being asinine. A strong statement was made and no effort was put forth to qualify the statement with factual evidence. I also would have been concerned, not because of my pride, but because it could be confusing to new people looking for code examples.
For the record, it is best to use good grammar when calling someone out for their blatant use of slang. Best, -Marticus |
| All times are GMT -4. The time now is 20:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.