Raised This Month: $ Target: $400
 0% 

How do you use set_user_godmode with a menu? (read the doc)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Stealth Penguin
Junior Member
Join Date: Jan 2005
Old 02-15-2005 , 16:57   How do you use set_user_godmode with a menu? (read the doc)
Reply With Quote #1

Hello, my last post may have been to broad so this is a narrowed down one. I have read the documentation and tutorials for amx and amxx over and over and still cannot figure out how to make this certain part of the plugin I'm making work. I can't figure out how to get a command executed on a person who is chosen through a menu. Here is the part of the code that I believe is causing the problem:
Code:
public TGOMenuCommand(id,key) {     new player = g_menuPlayers[id][g_nTGOMenuPosition[id] * 7 + key]     new name[32], name2[32], authid[32],authid2[32]     get_user_name(player,name2,31)     get_user_authid(id,authid,31)     get_user_authid(player,authid2,31)     get_user_name(id,name,31)     new userid2 = get_user_userid(player)         switch (key) {         case 7: {         ++g_menuOption[id]         g_menuOption[id] %= 3       switch(g_menuOption[id])       {       case 0: g_menuSettings[id] = 0       case 1: g_menuSettings[id] = 5       case 2: g_menuSettings[id] = 60       }     ShowTGOMenu(id,g_nTGOMenuPosition[id])     }     case 8: ShowTGOMenu(id,++g_nTGOMenuPosition[id])     case 9: ShowTGOMenu(id,--g_nTGOMenuPosition[id])     default: {     log_amx("GodmodeOther: ^"%s<%d><%s><>^" ban and kick ^"%s<%d><%s><>^" (minutes ^"%d^")",         name,get_user_userid(id),authid, name2,userid2,authid2, g_menuSettings[id] )     switch (get_cvar_num("amx_show_activity")) {         case 2: client_print(0,print_chat,"%L",LANG_PLAYER,"ADMIN_BAN_2",name,name2)         case 1: client_print(0,print_chat,"%L",LANG_PLAYER,"ADMIN_BAN_1",name2)     }              g_menuPlayers[id]         if(get_user_godmode(player, 0 ) == 1)         {         set_user_godmode(player, 1 ) // turn on         }     else         { // if already on         set_user_godmode(player, 0 ) // turn off         }     }     server_exec()     ShowTGOMenu(id,g_nTGOMenuPosition[id])     } }   return PLUGIN_HANDLED }

Any help would be appreciated very much.
Stealth Penguin is offline
Send a message via ICQ to Stealth Penguin Send a message via AIM to Stealth Penguin Send a message via Yahoo to Stealth Penguin
 



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 19:21.


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