check client disconnect or team == 0 ?
Hi
i have problem here in round_think this code check if zombie or human won or dead (spectate) to end the round .. but when zombie or human disconnect (this mean zombie or human == 0 ) the round does not end myb is there two way to check it ... as i think ! 1) check evry teams when becom 0 2) check it in client_disconnect function Can I find a particular example of this or myb other ways ..? game: valve PHP Code:
|
Re: check client deconnect or team == 0 ?
1) If the code is uncompleted, how can we help ?
2) Why to use tasks when you have events ? 3) Indent your code properly. 4) Your set_task usage is wrong, you have to use "b" flag to make it repeatable. 5) No need to return PLUGIN_CONTINUE. If I understood right, you just want to check when Zombies/Humans win so you can display a HUD message ? |
Re: check client deconnect or team == 0 ?
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
I hope that the idea becomes clear |
Re: check client deconnect or team == 0 ?
1) With that English? Yeah smoothly explained.
2) What kind of game is Valve ? 3) Nobody would want to work with a code indented like that. 4) "Round Think" PHP Code:
6) Quote:
|
Re: check client deconnect or team == 0 ?
1) Ok Sorry im little ENG and translate is bad to
2) valve -> HL1 3) i was trying to set short way 4) I did not understand what you intend to hint to him exactly 5) ok thx i will try that also Quote:
ex: g_human == team 1 g_zombie == team 2 im using systeam if players killed switched to spectator mod (like in CS rounds) in round_think up : PHP Code:
|
Re: check client deconnect or team == 0 ?
4) You're creating a task to act like a think, so that means it should be repeatable, but you didn't add the "b" flag which makes it repeatable, the current task will execute only once in 0.1 seconds. To make it execute every 0.1 second, you need to add "b" flag.
PHP Code:
|
Re: check client deconnect or team == 0 ?
Quote:
im said : Quote:
Quote:
|
Re: check client deconnect or team == 0 ?
Quote:
The best way to do it is to check if there are no more players in a team when a client disconnects. |
Re: check client disconnect or team == 0 ?
Wait, HLDM scripting isn't the same as CS ? I have never scripted for HL lol.
|
Re: check client disconnect or team == 0 ?
It's the same but most stocks are made for CS and thus they will not work properly, so one has to rely on Fakemeta/Engine.
|
| All times are GMT -4. The time now is 21:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.