Raised This Month: $ Target: $400
 0% 

how to get back the unknown string of two public ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-25-2007 , 08:29   Re: how to get back the unknown string of two public ?
Reply With Quote #1

Something is rong in menu when i press 3 is not working but w/e (I don't like "old style menu") ! This works

Code:
#include <amxmodx> 
 
#define PLUGIN "G-HK Private Messaging" 
#define VERSION "1.0" 
#define AUTHOR "Yin" 
 
new g_number[33][3]
 
public plugin_init() { 
 register_clcmd( "test","testmenu", -1, "test menu" ) 
 register_menucmd(register_menuid("\yTest Menu:"), 1023, "MenuCommand" ) 
} 
 
public testmenu(id) 
{ 
 new szMenuBody[256] 
 new keys 
 
 g_number[id][0] =  random(256)
 g_number[id][1] =  random(256) 
 g_number[id][2] =  random(256) 
 
 new nLen = format( szMenuBody, 255, "\yTest Menu:^n" ) 
 nLen += format( szMenuBody[nLen], 255-nLen, "^n\r1. %d",g_number[id][0]) 
 nLen += format( szMenuBody[nLen], 255-nLen, "^n\r2. %d",g_number[id][1]) 
 nLen += format( szMenuBody[nLen], 255-nLen, "^n\r3. %d",g_number[id][2]) 
 nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w2. Exit" ) 
 
 keys = (1<<0|1<<1) 
 
 show_menu( id, keys, szMenuBody, -1 ) 
 return PLUGIN_CONTINUE 
} 
 
public MenuCommand( id, key ) 
{ 
 switch( key ) 
 { 
  case 0: client_print(id,print_chat,"Number: %d",g_number[id][0]) // This is the result number i you press 1.
 
  case 1: client_print(id,print_chat,"Number: %d",g_number[id][1]) // _,,_ if you press 2.
 
  case 2: client_print(id,print_chat,"Number: %d",g_number[id][2]) // _,,_ if you press 3.
 
  case 3: client_print(id, print_chat, "exit test menu.") 
 
 }  
 return PLUGIN_HANDLED 
}
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 06-25-2007 at 10:52.
Alka is offline
Reply



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


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