Raised This Month: $ Target: $400
 0% 

[HELP] Moving from spec to team issue


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
GoldNux
Senior Member
Join Date: Mar 2018
Old 05-12-2018 , 16:32   Re: [HELP] Moving from spec to team issue
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
Not sure if this will fix it but try ExecuteHam( Ham_CS_RoundRespawn , id )
Where is the best place to insert that?

Players being transferred to spec from a team, and then assigned to a team are not experiencing any problems.
It's when you are already in spec, and then transferred to a team that this issue occurs.
Note that there is a line preventing spectators from being moved to spec, so this is not the issue.

Thank you.

Code:
public balance(id, level, cid) {     if (!cmd_access(id, level, cid, 2))     {         return PLUGIN_HANDLED     }     new arg1[4]     read_argv(1, arg1, charsmax(arg1))     randPercent = str_to_num(arg1)     new players[32]     new playercount     get_players(players, playercount)     SortCustom1D(players, playercount, "compareByKD")     new i     for (i = 0; i < playercount; i++)     {         new id = players[i]         if (!is_user_hltv(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR)         {             cs_set_user_team(id, CS_TEAM_SPECTATOR)                         new data[2]             data[0] = id             data[1] = i             set_task((1.0 * i) + 4.0, "assignUserTeam", _, data, sizeof(data))         }     }         set_task((1.0 * i) + 4.0, "restartRound")     return PLUGIN_CONTINUE } public restartRound() {     console_cmd(0, "sv_restart 1") } public assignUserTeam(data[]) {     new id = data[0]     new order = data[1]     cs_set_user_team(id, order % 2 == 0 ? CS_TEAM_CT : CS_TEAM_T)     new name[40]     get_user_name(id, name, 40)         console_cmd(0,"say %s has a kill / death ratio of: %f", name, getKD(id)) }
__________________
Try my version of de_dust2, I think it's great and you should check it out!
https://gamebanana.com/mods/83731

Last edited by GoldNux; 05-12-2018 at 16:42.
GoldNux is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode