Check for accounts
#1

Hello
i wanna make a command which checks how many account a player has.

Let's say i made 1 account, it should display this:

Exact_Name (IP) (IPBANNED: YES/NO)

when 4 accounts:

Exact_Name (IP) (IPBANNED: YES/NO)
Exact_Name (IP) (IPBANNED: YES/NO)
Exact_Name (IP) (IPBANNED: YES/NO)
Exact_Name (IP) (IPBANNED: YES/NO)

How do i do this?
Reply
#2

Check the IP on registration and/or login, then save it to your database and make a command that retrieves the data from the field content and inputs it to a dialog which will be showed to you.
Reply
#3

Quote:
Originally Posted by KevinExec
Посмотреть сообщение
Check the IP on registration and/or login, then save it to your database and make a command that retrieves the data from the field content and inputs it to a dialog which will be showed to you.
yes, how do i make a command that retrieves the data from the field.
i have no idea :3
Reply
#4

Quote:
Originally Posted by justjamie
Посмотреть сообщение
yes, how do i make a command that retrieves the data from the field.
i have no idea :3
We're here to help, not to write the code for you. I've told you what you have to do, now find out yourself how and do it. You wont learn otherwise.
Reply
#5

Quote:
Originally Posted by KevinExec
Посмотреть сообщение
We're here to help, not to write the code for you. I've told you what you have to do, now find out yourself how and do it. You wont learn otherwise.
i know.
i think i didn't correctly say the question i think.
When i do something like this:
PHP код:
IRCCMD:checkip(botidchannel[], user[], host[], params[])
{
new 
query[128],playerip[32];
format(query,sizeof(query),"SELECT * FROM ipbanned WHERE ip ='%s'",playerip);
mysql_function_query(dbhandle,query,true,"","");
return 
1;

Then it's only going to check the ip's.
What do i do after that?
How do i get the info further.
Reply
#6

What info? You can make a function and use cache_get_field_content and store it to strings, then display a dialog with these strings.
Reply
#7

Quote:
Originally Posted by KevinExec
Посмотреть сообщение
What info? You can make a function and use cache_get_field_content and store it to strings, then display a dialog with these strings.
ah.
Dont i have to use something like this?
for (i=0;i<MAX_PLAYERS;i++)
Reply
#8

PHP код:
IRCCMD:checkip(botidchannel[], user[], host[], params[])
{
if(!
IsEchoChannel(channel)) return iNoticeuserIRC_WRONG_CHANNEL);
new 
query[128],temp_username[35],temp_ip[40],string[128];
if(
sscanf(params"s"temp_ip)) return iEchoUse("!checkip [ IP ADRESS ]");
format(query,sizeof(query),"SELECT * FROM user WHERE regip ='%s'",temp_ip);
mysql_function_query(dbhandle,query,true,"","");
cache_get_field_content(0,"username",temp_username);
format(string,sizeof(string),"%s",temp_username);
iEcho(string);
return 
1;

Right now i got this.

When i do !checkip 127.0.0.1, nothing happends.
(127.0.0.1 is registered to 2 users in the db)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)