Change user skin
Hi guys, I have a own menu for changing team in my server and personalized skins, and with instant auto team balance, even with the player models of connor, sometimes some users have T skin on CT side, or CT skin on T side...
I tryed this way to fix it, and it works, but when the server have a lot of players there, sometimes some players overflow... PHP Code:
I already tryed to save in a bool if the user was team ballanced but it doesnt work and I dont know why... |
Re: Change user skin
if(is_user_connected(id))
you forgot to add is_user_alive(id) are you going to set models on dead players? And before setting task, remove if another has been set if(is_user_connected(i)) { if(task_exists(i)) remove_task(i) set_task(3.0, "models", i) } |
Re: Change user skin
If is for all players, add:
PHP Code:
|
Re: Change user skin
Quote:
At the topic of the plugin : PHP Code:
PHP Code:
And you can use : PHP Code:
|
Re: Change user skin
overflowed as same
|
Re: Change user skin
PHP Code:
|
Re: Change user skin
Quote:
Yes, but remove get players and loop at round start event :D Use this code: PHP Code:
|
Re: Change user skin
You're right, sirius, if is for all players, dont need get_players because functions that have not a id, like models() dont need that and set_task(TASK_SETMODEL), just add set_task(3.0,"models")
Like PHP Code:
|
Re: Change user skin
No, we need ID because if there happens new round before 3 seconds passed then function will be called again.
Like : new round, set task after 1 second: new round, set task After 2 seconds - function, after 1 second - function. It just calls the function too frequent and early. |
Re: Change user skin
PHP Code:
|
| All times are GMT -4. The time now is 18:39. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.