Raised This Month: $ Target: $400
 0% 

Name registration issue


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
zimis
Junior Member
Join Date: Dec 2007
Location: Lithuania
Old 12-31-2007 , 06:57   Name registration issue
Reply With Quote #1

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?
zimis is offline
Send a message via Skype™ to zimis
 



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 11:07.


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