|
BANNED
Join Date: Jul 2009
Location: Argentina, Rosario
|
12-23-2009
, 21:14
Re: [ES] AYUDA CONTRUCION DE MENU
|
#7
|
Quote:
Originally Posted by MaNuCs
a
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx> #include <fun>
#define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author"
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd( "/vida","PlayerMenu"); }
public PlayerMenu(id) { new menu = menu_create("\rEscoje Al Jugador:", "menu_handler"); new players[32], pnum, tempid; new szName[32], szTempid[10]; get_players(players, pnum);
for( new i; i<pnum; i++ ) { tempid = players[i]; get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0);
} menu_display(id, menu, 0); } public menu_handler(id, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; }
new data[6], iName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
if( is_user_alive(tempid) ) set_user_health(tempid, 150);
menu_destroy(menu); return PLUGIN_HANDLED; }
grrr hasler te me adelantaste t.t!
|
no anda ese xD
|
|
|
|