[HELP]what am i doing wrong ?
Hi all.
i've made this team swap and all seems good but when the round that cnrtolled by cvar comes the team does not swap, any idea why it doesn't work. Here the fixed Code : PHP Code:
|
Re: [HELP]what am i doing wrong ?
try to check iCount on round end
|
Re: [HELP]what am i doing wrong ?
Code:
Code:
|
Re: [HELP]what am i doing wrong ?
Because there's no "id" in the Swap function. It's a global function, so you need to loop through all players.
|
Re: [HELP]what am i doing wrong ?
@EFFx, thanks for your help it worked.
@OciXCrom, yeah i didn't know that also can it be done by read_data ?. |
Re: [HELP]what am i doing wrong ?
|
Re: [HELP]what am i doing wrong ?
so you mean that i can set the task for all player 0 no need for the id of the player :
like that : PHP Code:
i think like EFFx did is better and work fine. |
Re: [HELP]what am i doing wrong ?
set_task(length parameter, function, taskid) PS taskid is not the player id as you think!
|
Re: [HELP]what am i doing wrong ?
Just a little fix:
Code:
Code:
When you're gonna add a task for a player, add id+SOMENUMBERS and at your function, id -= SAMENUMBERS. Your code didn't work because you hadn't an id in your task while you added (id) at your function. The compiler readed Code:
Code:
Code:
This is the right way without an id. Code:
ID example: 12 12+20310 = 20322 Code:
23022 - 20310 = 12 This is the right way with an id. I recommend you always use a constant or define for set a task, it will be good if you want remove that task whenever you want even without an id. I mean: Code:
or Code:
Code:
Code:
|
Re: [HELP]what am i doing wrong ?
thanks EFFx for you usefull explaintion, i appreciate it.
|
| All times are GMT -4. The time now is 18:01. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.