AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Name registration issue (https://forums.alliedmods.net/showthread.php?t=65069)

zimis 12-31-2007 06:57

Name registration issue
 
Hello, i have little problem. I wrote simple registration plugin wich uses mysql to store info, kicks players who didn't register, or setinfo their passwords, and plugin works just fine, but with one issue. When player name is longer than one word such like "hello there" or "new player" plugin does nothing :|

Code:
PHP Code:

#include <amxmodx>
#include <dbi>

new Sql:mysql
new Result:ieskom

public plugin_init(){
    
register_plugin("Vartotoju registracija","BETA 2","ZiMiS")


public 
client_putinserver(id){
new 
name[32], pass[32], pass2[32]
get_user_info(id,"login",pass,31)
get_user_info(id,"name",name,31)
mysql dbi_connect("localhost","root","","amx")
ieskom dbi_query(mysql,"SELECT * FROM vartotojai where login = '%s'",name)
if (!
ieskom){
    
server_cmd("kick %s Serveryje reikalinga registracija. Uzsiregistruok: http://cs.anet.lt/regme",name)
    } else {
        while (
dbi_nextrow(ieskom) > 0)    {  
        
dbi_result(ieskom"pass"pass2,31)
        }
        if (!
equal(pass,pass2)){    
            
server_cmd("kick %s Neteisingas slaptazodis. Pasikeiskite: setinfo login ******",name)
        }
}
}


public 
plugin_end(){
    
dbi_close(mysql)


Any ideas? :oops::?::wink:

zimis 12-31-2007 11:58

Re: Name registration issue
 
someone? :(

zimis 12-31-2007 18:46

Re: Name registration issue
 
new year 2008 :/ anyone in this year smart enuogh to help me? :)

M249-M4A1 01-01-2008 03:38

Re: Name registration issue
 
Nope (stop bumping so soon)

Drak 01-01-2008 05:00

Re: Name registration issue
 
Try changing
Code:
get_user_info(id,"name",name,31)
to:
Code:
 get_user_name(id,name,31);

zimis 01-01-2008 10:22

Re: Name registration issue
 
Quote:

Originally Posted by Drak (Post 568810)
Try changing
Code:
get_user_info(id,"name",name,31)
to:
Code:
 get_user_name(id,name,31);

Thank's but still the same :cry:

_Master_ 01-01-2008 10:46

Re: Name registration issue
 
Try ^"%s^" in the kick command

zimis 01-01-2008 10:57

Re: Name registration issue
 
Quote:

Originally Posted by _Master_ (Post 568854)
Try ^"%s^" in the kick command

Thanks a lot :wink: it works now :up:


All times are GMT -4. The time now is 11:07.

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