AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Team Menu (https://forums.alliedmods.net/showthread.php?t=309031)

Apb hq 07-11-2018 04:00

Team Menu
 
Hi everyone i have a question , i have tried to hook chooseteam command and replace it with my own custom menu , and now i wanted to add for case 0 this team menu which appears just after you connect to the server

when i use client_cmd(id, "jointeam") i don't have spectator option so i wanted to know if it's possible to show to the client the menu on the picture and how to do that

Ghosted 07-11-2018 05:27

Re: Team Menu
 
check if players' team is CT/T, if not then don't block that menu;

Apb hq 07-11-2018 07:07

Re: Team Menu
 
I use auto team join for that but i wanted to know if it's possible to open the menu on the pic in order to change your team or go to spec while you are already in T or CT

Ghosted 07-11-2018 07:35

Re: Team Menu
 
Quote:

Originally Posted by Apb hq (Post 2602891)
I use auto team join for that but i wanted to know if it's possible to open the menu on the pic in order to change your team or go to spec while you are already in T or CT

Thats vanilla menu when client connects that appears :wtf:

^SmileY 07-11-2018 08:36

Re: Team Menu
 
search for it, already been made

Apb hq 07-11-2018 08:39

Re: Team Menu
 
Quote:

Originally Posted by Ghosted (Post 2602892)
Thats vanilla menu when client connects that appears :wtf:

Is it possible to show that “vanilla menu” again to the players even after the first connect (when you are already in CT or T) , as i previously said client_cmd(id, “jointeam”) gives me the same menu but without spec option and i really need spec in this menu

Edit: smiley i was searching bro but i can’t find the code which will show the menu that i need... i have found this
Code:

  register_message(get_user_msgid("ShowMenu"), "message_ShowMenu");
Which detects whether the menu is shown i haven’t found how to make it reappear again

Ghosted 07-11-2018 09:00

Re: Team Menu
 
I have looked up in ReGameDLL project & if player has flag DEAD_NO then Spectator can not be selected from teams menu.

Apb hq 07-16-2018 15:41

Re: Team Menu
 
I have almost found the solution but i have one issue and i don't know how to fix it , if the player is in ct or t and if he is DEAD and i try to this cs_set_user_team(id, CS_TEAM_SPECTATOR) , the player goes to spec and nextround he goes back to the team where he was before going to spec any idea why is this happening thanks in advance


All times are GMT -4. The time now is 12:50.

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