Raised This Month: $ Target: $400
 0% 

Name registration issue


Post New Thread Reply   
 
Thread Tools Display Modes
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
zimis
Junior Member
Join Date: Dec 2007
Location: Lithuania
Old 12-31-2007 , 11:58   Re: Name registration issue
Reply With Quote #2

someone?
zimis is offline
Send a message via Skype™ to zimis
zimis
Junior Member
Join Date: Dec 2007
Location: Lithuania
Old 12-31-2007 , 18:46   Re: Name registration issue
Reply With Quote #3

new year 2008 :/ anyone in this year smart enuogh to help me?
zimis is offline
Send a message via Skype™ to zimis
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 01-01-2008 , 03:38   Re: Name registration issue
Reply With Quote #4

Nope (stop bumping so soon)
__________________
M249-M4A1 is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 01-01-2008 , 05:00   Re: Name registration issue
Reply With Quote #5

Try changing
Code:
get_user_info(id,"name",name,31)
to:
Code:
 get_user_name(id,name,31);
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
zimis
Junior Member
Join Date: Dec 2007
Location: Lithuania
Old 01-01-2008 , 10:22   Re: Name registration issue
Reply With Quote #6

Quote:
Originally Posted by Drak View Post
Try changing
Code:
get_user_info(id,"name",name,31)
to:
Code:
 get_user_name(id,name,31);
Thank's but still the same
zimis is offline
Send a message via Skype™ to zimis
_Master_
Senior Member
Join Date: Dec 2006
Old 01-01-2008 , 10:46   Re: Name registration issue
Reply With Quote #7

Try ^"%s^" in the kick command
_Master_ is offline
zimis
Junior Member
Join Date: Dec 2007
Location: Lithuania
Old 01-01-2008 , 10:57   Re: Name registration issue
Reply With Quote #8

Quote:
Originally Posted by _Master_ View Post
Try ^"%s^" in the kick command
Thanks a lot it works now
zimis is offline
Send a message via Skype™ to zimis
Reply



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