hi
i'm new to this scripting
after going through the tuts by red and PvtSmithFSSF .. i want to add a front end to some plugin(
user registration ). here is my menu i was able to get it display in game
Code:
.::WELCOME::.
1.pass protect ur nick(new comers )
2.login
but now comes the hard part for me

1.how to execute/run the plugin after user connects automatically(like that of join/left plugin)?
2.suppose user chose 1 or 2 option how to read the input frm user(password) and store it temporarily
PHP Code:
#include <amxmodx>
#define PLUGIN "GUIFORReg"
#define AUTHOR "am_amx"
#define VERSION "1.0"
// I WANT THE PLUGIN TO BE EXECUTED WHEN USER CONNECTS
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /reg","PMenu");
}
public PMenu(id)
{
new menu = menu_create("\r.:: WELCOME ::. ", "menu_handler");
menu_additem(menu, "\yREGISTER(NEW USER )", "1", 0);
menu_additem(menu, "\yLOGIN", "2", 0);
menu_additem(menu, "\yGET U R ASS KIKCED ", "3", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
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 key = str_to_num(data);
switch(key)
{
case 1:
{
//NEED SOME MAGIC CODE HERE
//GRRR
// LIKE SHOULD ASK USER TO ENTER PASSWORD AND STORE IN
//SAY 'PASS'(VARIABLE)
[URL="http://forums.alliedmods.net/showthread.php?t=59596"]amx_register[/URL] 1 PASS //COMPLETED THE REGISTRATION
}
case 2:
{
//NEED SOME MAGIC CODE HERE
//ENTER THE PASSWORD AND STORE IT IN VARIABLE 'PASSWOR'
[URL="http://forums.alliedmods.net/showthread.php?t=59596"]amx_login[/URL] PASSWOR // TO login with ALREADY REGISTRED password.
}
case 3:
{
//NEED SOME MAGIC CODE HERE
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}