Need help with command
#1

Hello all today i have a problem with my records commands it will show player IP and their accounts on the IP so i am having the issue if i use this command with playerid its working good but i have added a function like if any one getting record through player ip example

/arecords 182.182 so its not getting the records with matching ip here is my code please help me to fix it.


PHP код:
CMD:arecords(playeridparams[])
{
    new 
givedplayeridpIP[256], playersname[25], str[256], options[128], str2[256];
    if (
adlvl[playerid] < 3) return 0;
    if (
sscanf(params"s[128]"options))
    {
        
SendClientMessage(playeridCOLOR_WHITE"Usage: /arecords [options]");
        
SendClientMessage(playeridCOLOR_WHITE"OPTIONS: IP | playerid");
        return 
1;
    }
    else if(!
strcmp(options"IP"true2))
    {
        if(
sscanf(params"s[128]s[128]"optionspIP))
        {
            
SendClientMessage(playeridCOLOR_WHITE"Usage: /arecords IP [IP Address]");
            return 
1;
        }
        
//format(str,sizeof(str),"|- IP: %s's Records -|", pIP);
        //SendClientMessage(playerid,-1,str);
            
new Filefile fopen("Records.txt"io_read), idxx=1;
            while(
fread(filestr))
            {
                    
format(strsizeof(str), "%s"str);
                    if (
strcmp(strpIPfalse) == 0)
                    {
                        
format(str2sizeof(str2), "%s"str);
                        
SendClientMessage(playeridCOLOR_ORANGEstr2);
                        
idxx ++;
                    }
            }
    }
    return 
1;

Reply
#2

Use MySQL instead of INI. I know what you expected. If you check ip address 127.0.0.1 it'll shows player name who has the same IP?
Reply
#3

it will show all records with that ip

EDIT: Fixed it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)