Raised This Month: $ Target: $400
 0% 

Registration menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
intoxicadooo
Veteran Member
Join Date: Mar 2009
Location: Argentina, Misiones
Old 09-04-2009 , 05:02   Registration menu
Reply With Quote #1

hello, well you know that I wanted them grabbing a plugin, a tutorial package that hiso Startsailor, the problem is I'm not very good at scripting, and would need to help me build it.
this is the link of the tutorial http://forums.alliedmods.net/showthr...egistrar+nicks
I, I'm almost finished.
The problem of the three warnings that throws me is that I am not going very well the plugin.
If they can fixear se los agradeceria much, and also if I explain that changed simultaneously so learn from already thank you very much.
Sorry about my English, I use translator at this time.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fvault>

#define PLUGIN "Menu de Registracion"
#define VERSION "1.0"
#define AUTHOR "starsailor eddit itoxicadooo"
#define MAX_NAMES 99999

new const g_reg[] = "registracioon"
new pwstore[MAX_NAMES][32]
new 
namestore[MAX_NAMES][32]
new 
numlista
new cvar_password_prefijo

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /reg""menu_registrar")
    
    
//Comandos
    
register_concmd("zp_nicks_list""taglist"ADMIN_LEVEL_G)
    
cvar_password_prefijo register_cvar("tut_password_prefijo""_zp")
    
    
register_message(get_user_msgid("SayText"), "nocambiartag")
}
public 
client_putinserver(id)
{
    
set_task(0.5,"menu_registrar",id)
}
public 
menu_registrar(id)
{
    new 
reg menu_create("\yMenu de Registracion:""abrirmenureg")
    
    
menu_additem(reg"\wRegistrarse\r(Recomendado)""1"0)
    
menu_additem(reg"\wNo registrarse\r(No Recomendado)""2"0)
    
    
menu_setprop(regMPROP_EXITMEXIT_ALL)
    
    
menu_display(idreg0)
}

public 
abrirmenureg(idregitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(reg)
        return 
PLUGIN_HANDLED
    
}
    new 
data[6], iName[64]
    new 
accesscallback
    menu_item_getinfo
(regitemaccessdata,5iName63callback)
    
    switch(
str_to_num(data))
    {
        case 
1:
        {
            
registrar(id);
        }
        case 
2:
        {
            
console_print(id"lala")
        }
    }
    
menu_destroy(reg)
    return 
PLUGIN_HANDLED
}
public 
registrar(id)
{
    switch(
registracion(id))
    {
        case 
1:
        {
            
client_print(idprint_chat"[ZPanic] Este nick ya posee una cuenta")
            return 
PLUGIN_HANDLED
        
}
        
        case 
2:
        {
            
client_print(idprint_chat"[ZPanic] Ya estas logueado")
            return 
PLUGIN_HANDLED
        
}
    }
    
    
client_cmd(id"messagemode contrasenia")
    
    return 
PLUGIN_CONTINUE
}
public 
client_disconnect(id)
{
    
savereg(id)
}
public 
savereg(id)
{
    new 
data[128], name[32], password[32]
    
    
get_datos(idnamepassword)
    
    
formatex(datacharsmax(data), "%s"password)
    
fvault_set_data(g_regnamedata)
}
registracion(id)
{
new 
data[64], name[32], password[32], password_en_archivo[32]
new 
ios
get_datos
(idnamepassword)

if(!
fvault_get_data(g_regnamedatacharsmax(data)))
    
    
parse(datapassword_en_archivocharsmax(password_en_archivo))
    
    if(
equal(password_en_archivopassword))
        
ios 2
}
public 
client_connect(id)
{
    new 
data[64], name[32], password[32], password_en_archivo[32]
    new 
ios
    get_datos
(idnamepassword)
    
    if(!
fvault_get_data(g_regnamedatacharsmax(data)))
    {
        
parse(datapassword_en_archivocharsmax(password_en_archivo))
        
        if(
equal(password_en_archivopassword))
        
        
ios 2
    
}
    else
    {
        
ios 1
    
}
    switch(
ios)
    {
        case 
1:
        {
            new 
lReason[64]
            
server_cmd("kick #%d ^"Tu Contrasenia es incorrecta^""get_user_userid(id), lReason)
        }
        case 
2:
        {
            
client_cmd(id,"echo ** Tu Nick & Password han sido autorizados! (Name: %s | Pw: %s)"namepassword)
        }
    }
}
public 
taglist(id,level,cid)
{
    
    if (!
cmd_access(id,level,cid,1))
        return 
PLUGIN_HANDLED
    
    console_print
(id,"^nEntradas en el archivo^nNick - Password")
    
    
    for(new 
0numlista; ++i)
        
console_print(id,"%s - %s"namestore[i], pwstore[i])
    
    
console_print(id,"Total %d"numlista)
    
    return 
PLUGIN_HANDLED
}
public 
client_infochanged(id)
{
    
    if(
is_user_connected(id))
    {
        
        new 
newname[32], servname[32]
        
        
get_user_info(id"name"newname,31)
        
get_user_name(id,servname,31//Nombre que tiene cuando entra al sv
        
        
if (!equal(servnamenewname))
        {
            
            
client_print(id,print_chat,"[ZPanic]No puedes cambiarte de nombre")
            
set_user_info(id,"name"servname)
        }
    }
}

public 
nocambiartag(msg_idmsg_destreceiver)
{
    new 
info[64]
    
    
get_msg_arg_string(2info63)
    
    if(!
equali(info"#Cstrike_Name_Change")) return PLUGIN_CONTINUE
    
    
return PLUGIN_HANDLED
}

get_datos(idname[32], password[32])
{
new 
prefijo[8]

get_user_name(idnamecharsmax(name))
get_pcvar_string(cvar_password_prefijoprefijocharsmax(prefijo))
get_user_info(idprefijopasswordcharsmax(password))

__________________
Intoxicadooo // G^nXa
Steam:gonxa_capostrike
Msn: [email protected]

Last edited by intoxicadooo; 09-04-2009 at 05:08.
intoxicadooo is offline
Send a message via MSN to intoxicadooo
Reply


Thread Tools
Display Modes

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 15:03.


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