AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   hook classic joinclass (https://forums.alliedmods.net/showthread.php?t=335823)

Neon123 01-06-2022 14:01

hook classic joinclass
 
i need a way to hook the classic (non vgui) joinclass (not jointeam or chooseteam) menu (ct and terr) to print to player "you choosed class 1, 2, 3, 4)

image: https://ibb.co/v3h50KD

Celena Luna 01-06-2022 23:50

Re: hook classic joinclass
 
have you tried to hook message ShowMenu?
PHP Code:

register_message(get_user_msgid("ShowMenu"), "FWD_ShowMenu"


Neon123 01-07-2022 11:56

Re: hook classic joinclass
 
yes, i hooked but not worked when you select a class, only work when you select a team

Celena Luna 01-09-2022 23:20

Re: hook classic joinclass
 
hm...
If you are using ReAPI, you could try using this
PHP Code:

RegisterHookChain(RG_HandleMenu_ChooseTeam"RG_Hook_ChooseTeam"false);

public 
RG_Hook_ChooseTeam(const id, const MenuChooseTeam:slot)
{
    
//You code here
    //if(slot == MenuChoose_CT)


if you wonder what to check with slot param:
Spoiler


All times are GMT -4. The time now is 19:44.

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