02.05.2016, 04:22
(
Последний раз редактировалось colonel-top; 02.05.2016 в 06:57.
)
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 )
*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
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(playerid, COLOR_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=0 ; 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;
}