Offline Command
#4

Why get IP ? its worse
Player IP can change everytime they leave or connect I prefer to load User Data Better its more worth
try this ( this is example idea )
PHP код:
//top of scripts
#define strcpy(%0,%1) \
    
strcat((%0[0] = '\0', %0), %1)
#define MAX_PLAYERS_FILE 9000
new offlineplayerstr[64];
new 
tmpstr[64];
CMD:offlineinfo(playerid,params[])
{
    if(
PlayerInfo[playerid][Level] >= 1)
    {
        
        if(
sscanf(params"s[25]"offlineplayerstr)) return SendClientMessage(playeridCOLOR_RED1"[SYSTEM][EXPLAIN] :/offlineinfo (playername)")
        else
        {
            
LoadPlayerInfoOffline();
            
SCM(playerid,COLOR_YELLOW,tmpstr);
        }
    } else return 
SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}
LoadPlayerInfoOffline()
{
        for (new 
i=MAX_PLAYERS_FILE i++)
        {
             new 
file[100];
             new 
tmploadname[64],tmpip[28];
            
format(file,sizeof(file),"saveuser/%s.ini",offlineplayerstr);
            if(!
dini_Exists(file)) 
                         {
              
/*get player info blahg blah your condition
                like example of this*/
                
strcpy(tmpip,dini_Get(file,"Player IP:"),28); //copy str need strcpy
                
                
format(tmpstr,sizeof(tmpstr),"Player Name %s , Player IP %s",offlineplayerstr,tmpip);
              }
            
        }
        return 
tmpstr;

*Edit : Change public to stock if you can do better just write it down , I made it for public function just simple ideas make easy to understand so he can adapt to his server or he can re-scripts & if its wrong you just write it new one not better ? , hmm... if you asking different here https://sampforum.blast.hk/showthread.php?tid=281094 if you ask its for correct just write it and make it correct , apologize my fools code too and sorry for my bad grammar I still newbie noob so you are professional Genius just make it correct so its' good or another people and owner then
Reply


Messages In This Thread
Offline Command - by Miller007 - 01.05.2016, 19:43
Re: Offline Command - by MarikAshtar - 01.05.2016, 23:43
Re: Offline Command - by colonel-top - 02.05.2016, 04:17
Re: Offline Command - by colonel-top - 02.05.2016, 04:22
Re: Offline Command - by SyS - 02.05.2016, 05:57
Re: Offline Command - by Sew_Sumi - 02.05.2016, 06:32
Re: Offline Command - by jlalt - 02.05.2016, 06:49
Re: Offline Command - by MarikAshtar - 02.05.2016, 07:28
Re: Offline Command - by Stinged - 02.05.2016, 07:49
Re: Offline Command - by MarikAshtar - 02.05.2016, 08:16

Forum Jump:


Users browsing this thread: 1 Guest(s)