11.01.2016, 19:57
(
Последний раз редактировалось kalanerik99; 12.01.2016 в 16:24.
)
Hello guys
I have 1 problem
I am editing an old script and I used easy mysql then..
Now I store IP and it stores corectly
But when I load it it loads wrong like [Database:127.0.0.1 InGame:53]
Here it should work ..I am on the same IP 100% sure but it doesnt! I dont get it ... why?
I have 1 problem
I am editing an old script and I used easy mysql then..
Now I store IP and it stores corectly
But when I load it it loads wrong like [Database:127.0.0.1 InGame:53]
Код:
CreateDataBase() { new handle = SQL::Open(SQL::CREATE, "players"); SQL::AddTableEntry(handle, "IP", SQL_TYPE_VCHAR, 20); SQL::Close(handle); }
Код:
public OnPlayerConnect(playerid) { PlayerInfo[playerid][LoggedIn] = 0; new handle = SQL::OpenEx(SQL::READ, "players", "Name", PlayerName(playerid)); SQL::ReadString(handle, "Password", PlayerInfo[playerid][Password], 64); SQL::ReadInt(handle, "ID", PlayerInfo[playerid][ID]); SQL::ReadInt(handle, "AutoLogin", PlayerInfo[playerid][AutoLogin]); SQL::ReadString(handle, "IP", PlayerInfo[playerid][IP]); SQL::Close(handle); return 1; }
Код:
if(!strcmp(ip,PlayerInfo[playerid][IP],true)) {