Raised This Month: $32 Target: $400
 8% 

hook classic joinclass


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Neon123
Senior Member
Join Date: Jan 2016
Old 01-06-2022 , 14:01   hook classic joinclass
Reply With Quote #1

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
Neon123 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 01-06-2022 , 23:50   Re: hook classic joinclass
Reply With Quote #2

have you tried to hook message ShowMenu?
PHP Code:
register_message(get_user_msgid("ShowMenu"), "FWD_ShowMenu"
__________________
My plugin:
Celena Luna is offline
Neon123
Senior Member
Join Date: Jan 2016
Old 01-07-2022 , 11:56   Re: hook classic joinclass
Reply With Quote #3

yes, i hooked but not worked when you select a class, only work when you select a team
Neon123 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 01-09-2022 , 23:20   Re: hook classic joinclass
Reply With Quote #4

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
__________________
My plugin:

Last edited by Celena Luna; 01-09-2022 at 23:23.
Celena Luna is offline
Reply


Thread Tools
Display Modes

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 08:14.


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