Raised This Month: $318 Target: $400
 79%   Almost there!

Solved set user info not setting user's info

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Senior Member
Join Date: May 2020
Old 10-11-2021 , 09:51   set user info not setting user's info
Reply With Quote #1

Nvm, the problem is other
that i put somewhere to set info of the user "_vgui_menus" 0 and then "_vgui_menus" 1 after they pressed one of the buttons but for some reason it doesn't change.

Edit: More info, so, the plugin i told you about is a gender chooser which on putinserver displays a menu where you choose your gender, after you change it you are automatically put in a team and setted class and sets your info "_vgui_menus" to 1 but i see it doesn't set, why?

public client_putinserver(id)
		g_iGender[id] = random_num(1, 2)
	else {
		set_user_info(id, "_vgui_menus", "0")
		set_task(0.1, "joined", TASK_JOIN+id)

public ask(id)
	new text[200]
	format(text, charsmax(text), "\yChoose \wyour \rgender\w!^n^n\r1. \yMale^n\r2. \yFemale")
	show_menu(id, keys, text, _, "gendermenu")

public heheok(id, item)
		case 0:{
			g_iGender[id] = 1
			set_task(0.1, "jointeam", id)
		case 1:{
			g_iGender[id] = 2
			set_task(0.1, "jointeam", id)

public jointeam(id)
	new randnum = cso_round_started()
	//engclient_cmd(id, "jointeam", randnum ? "1" : "2")
	//rg_set_user_team(id, , randnum ? MODEL_CT_GIGN : MODEL_T_GUERILLA, true, false)
	rg_join_team(id, randnum ? TEAM_CT : TEAM_TERRORIST)
	show_menu(id, 0, "")
	engclient_cmd(id, "joinclass", "1")
	set_user_info(id, "_vgui_menus", "1")
	set_task(1.0, "respawn", id)

public joined(id)
	id -= TASK_JOIN
Solved: hooked "buy" and put the function of my buymenu in then returned PLUGIN_HANDLED;

Last edited by AnimalMonster; 10-11-2021 at 12:21.
AnimalMonster is offline

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 10:41.

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