AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   would like help with get_user_menu (https://forums.alliedmods.net/showthread.php?t=2671)

FlyingMongoose 06-13-2004 06:19

would like help with get_user_menu
 
I would just like to know the proper way to use get_user_menu in an if statement, say a user being in the skin selection menu. If anyone could help me that would be great.

Burnzy 06-13-2004 10:48

i bet im wrong but i think its 'cs_get_user_menu'
dont take my word for it!

FlyingMongoose 06-13-2004 13:28

cs_get_user_menu isn't a function anywhere in the includes. I just want to do a detection, I wrote an auto-assign script that doesn't select skins (cuz of a menu closing problem) so now I want to do a detection to detect whether a user still has the skin menu open after 30 seconds basically stating that he is AFK and did not select a skin in time. and get_user_menu is the only way I think this might be possible, and now it seems like my timer (I'm using get_user_time) will lock up the server when it starts to run through the loop for the checks until a player reaches the certain seconds he is in the server (it locks up before complete connect), someone mind helping me with code that will do everything I'm trying to do, cuz it's pissing me off, lol

FlyingMongoose 06-13-2004 14:15

alright, I came up with a more efficient way of doing my timer check (much more stable) but I still need to detect whether the player is in the skin selection menu or not

Burnzy 06-13-2004 14:20

well in the 'lastmanbets' plugin
they use plain our get_user_menu

FlyingMongoose 06-13-2004 14:21

maybe I'll look into it...
what I have going so far is...a set_task after 35 seconds
Code:
public check_time(id){     new menu,keys     get_user_menu(id,menu,keys)     /*if(menu==)     {         server_cmd("kick #%d ^"You failed to select a skin in time^"",id)     }*/ }

I know that code is wrong, I'm not sure entirely how to do this right, can anybody help? right now in testing it calls the function after 10 seconds (I don't wanna wait 30 seconds for it to execute every test >.< and yes, I know there's comments in there, but of course if you read them the condition has nothing cuz I'm not sure what to do with it!

IceMouse[WrG] 06-13-2004 15:52

That'll never work... They can stay at the select team thing as long as they want... I'm not sure, but do some checking on what ther "model" infokey is while they're on the menu

FlyingMongoose 06-13-2004 15:56

could you give me an example? would it be get_user_info or something? and I want this to work in amx 9.8 as well so, cs_get_user_model is out of the question (at least I think)...can someone please help me?

IceMouse[WrG] 06-13-2004 19:20

get_user_info(id, "model")

FlyingMongoose 06-13-2004 19:23

wouldn't that always return "gordon" tho?


All times are GMT -4. The time now is 14:54.

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