Randomize Teams
Hello,
Can any body help me with a plugin in which if an admin types /random the players of both team gets randomly put in both teams and it can only be used one time per map. |
Re: Randomize Teams
Code:
/* Plugin generated by AMXX-Studio */ |
Re: Randomize Teams
Thanks will try it out and give feedback :)
|
Re: Randomize Teams
raizo why're you creating a 33 sized array when 1 boolean variable will just do fine.
also checking if user is connected is useless since get_players function is guaranteed to return connected players on the runtime. an addition on creating variables inside a loop is highly not recommended + save your indexed array in an int variable rather than reindexing it everytime. Code:
for(new i=0;i<=num;i++) |
Re: Randomize Teams
The plugin works as expected but I was able to randomize many times in a round of course I tested it with bots and not real players on server. Would it affect?
|
Re: Randomize Teams
try this, i didn't test it.
PHP Code:
|
Re: Randomize Teams
He asked for the command to be used once per map not to be used for each player just once.
Also Napoleon if(iPlayers[i++] the I is post increment so it will return the old value. |
Re: Randomize Teams
You're totaly right, updated my code. Should all be fine now.
|
Re: Randomize Teams
your method of randomizing is kind incorrect and confusing.
here a simple way. PHP Code:
|
Re: Randomize Teams
Was thinking of doing it that way too first, but couldn't really figure out how to and didn't really want to spend too much time testing it.
|
All times are GMT -4. The time now is 19:54. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.