public JatekosBelep(playerid){ new sorok_szama = cache_get_row_count(); if(sorok_szama == 0) return ShowPlayerDialog(playerid, d_belep, DIALOG_STYLE_PASSWORD, \"Bejelentkezés\", \"{FFFFFF}Üdv a szerveren!\\nJatekosInfo regisztráltál!Kérlek add meg a jelszavad, amivel regisztráltált!\\n\\n{FF0000}Hibás jelszó!\", \"Regisztrál!\", \"Kilép!\"); SendClientMessage(playerid, 0xFFFFFFFF, \"Sikeresen bejelentkeztél!\"); SetSpawnInfo(playerid, 0, 7, cache_get_field_content_float(0, \"X\"), cache_get_field_content_float(0, \"Y\"), cache_get_field_content_float(0, \"Z\"), 90.0, 0, 0, 0, 0, 0, 0); TogglePlayerSpectating(playerid, false); SpawnPlayer(playerid); JatekosInfo[playerid][Penz] = cache_get_field_content_int(0, \"Penz\"); JatekosInfo[playerid][Admin] = cache_get_field_content_int(0, \"Admin\"); return 1;}
public OnPlayerDisconnect(playerid, reason){new string[256];GetPlayerPos(playerid, JatekosInfo[playerid][X], JatekosInfo[playerid][Y], JatekosInfo[playerid][Z]);mysql_format(kapcsolat, string, 256, \"UPDATE jatekosok SET Admin=\'%d\', Penz=\'%d\',X=\'%f\',Y=\'%f\',Z=\'%f\', WHERE Nev=\'%s\'\", JatekosInfo[playerid][Admin],JatekosInfo[playerid][Penz], JatekosInfo[playerid][X], JatekosInfo[playerid][Y], JatekosInfo[playerid][Z],JatekosInfo[playerid][Nev]);mysql_tquery(kapcsolat, string);return 1;}
CMD:adminad(playerid, params[]){if(IsPlayerAdmin(playerid) || JatekosInfo[playerid][Admin] >= ADMIN_SUPERADMIN){ new ki; new LVL; new string[128]; if(sscanf(params,\"ud\",ki,LVL)) return SendClientMessage(playerid, -1, \"Használat : /adminad < ID > < Szint >\"); { JatekosInfo[ki][Admin] = LVL; format(string,128,\"Kaptál %d szintű admint\",LVL); SendClientMessage(ki,-1,string); }}else SendClientMessage(playerid, -1, \"Nem vagy Admin!\");return 1;}
Logging started at 19:09, 03.08.2015Time Function Status Message19:09:01 mysql_connect OK host: \"127.0.0.1\", user: \"root\", database: \"rpg\", password: \"****\", port: 3306, autoreconnect: true, pool_size: 219:09:01 CMySQLHandle::Create OK creating new connection..19:09:01 CMySQLHandle::CMySQLHandle OK constructor called19:09:01 CMySQLHandle::Create OK connection created (id: 1)19:09:01 CMySQLConnection::Connect OK establishing connection to database...19:09:01 CMySQLConnection::Connect OK connection was successful19:09:01 CMySQLConnection::Connect OK auto-reconnect has been enabled19:09:01 mysql_errno OK connection: 119:09:01 CMySQLConnection::Connect OK establishing connection to database...19:09:01 CMySQLConnection::Connect OK establishing connection to database...19:09:01 CMySQLConnection::Connect OK establishing connection to database...19:09:01 CMySQLConnection::Connect OK connection was successful19:09:01 CMySQLConnection::Connect OK auto-reconnect has been enabled19:09:01 CMySQLConnection::Connect OK connection was successful19:09:01 CMySQLConnection::Connect OK auto-reconnect has been enabled19:09:01 CMySQLConnection::Connect OK connection was successful19:09:01 CMySQLConnection::Connect OK auto-reconnect has been enabled19:09:35 mysql_format OK connection: 1, len: 256, format: \"SELECT ID,Nev FROM jatekosok WHERE Nev=\'%e\' LIMIT 1\"19:09:35 mysql_tquery OK connection: 1, query: \"SELECT ID,Nev FROM jatekosok WHERE Nev=\'Mark_Johnson\' LIMIT 1\", callback: \"RegEllenorzes\", format: \"d\"19:09:35 CMySQLQuery::Execute[RegEllenorzes] OK starting query execution19:09:35 CMySQLQuery::Execute[RegEllenorzes] OK query was successfully executed within 0.910 milliseconds19:09:35 CMySQLResult::CMySQLResult() OK constructor calledIn callback \"RegEllenorzes\"19:09:35 cache_get_row_count OK connection: 119:09:35 CMySQLResult::~CMySQLResult() OK deconstructor called19:09:38 mysql_format OK connection: 1, len: 256, format: \"SELECT * FROM jatekosok WHERE Nev=\'%e\' AND Jelszo=SHA1(\'%e\')\"19:09:38 mysql_tquery OK connection: 1, query: \"SELECT * FROM jatekosok WHERE Nev=\'Mark_Johnson\' AND Jelszo=SHA1\", callback: \"JatekosBelep\", format: \"d\"19:09:38 CMySQLQuery::Execute[JatekosBelep] OK starting query execution19:09:38 CMySQLQuery::Execute[JatekosBelep] OK query was successfully executed within 0.856 milliseconds19:09:38 CMySQLResult::CMySQLResult() OK constructor calledIn callback \"JatekosBelep\"19:09:38 cache_get_row_count OK connection: 119:09:38 cache_get_field_content_float OK row: 0, field_name: \"Z\", connection: 119:09:38 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Z\", data: \"27.688\"19:09:38 cache_get_field_content_float OK row: 0, field_name: \"Y\", connection: 119:09:38 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Y\", data: \"136.956\"19:09:38 cache_get_field_content_float OK row: 0, field_name: \"X\", connection: 119:09:38 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"X\", data: \"-1982.11\"19:09:38 cache_get_field_content_int OK row: 0, field_name: \"Penz\", connection: 119:09:38 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Penz\", data: \"185000\"19:09:38 cache_get_field_content_int OK row: 0, field_name: \"Admin\", connection: 119:09:38 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Admin\", data: \"0\"19:09:38 CMySQLResult::~CMySQLResult() OK deconstructor called19:09:44 mysql_format OK connection: 1, len: 384, format: \"UPDATE `jatekosok` SET `Penz` =\'%d\',`X`=\'%f\',`Y`=\'%f\',`Z`=\'%f\' WHERE `Nev` =\'%s\'\"19:09:44 mysql_tquery OK connection: 1, query: \"UPDATE `jatekosok` SET `Penz` =\'185000\',`X`=\'-2016.928\',`Y`=\'136\", callback: \"(null)\", format: \"(null)\"19:09:44 CMySQLQuery::Execute[] OK starting query execution19:09:44 CMySQLQuery::Execute[] OK query was successfully executed within 58.210 milliseconds19:09:44 CMySQLQuery::Execute[] OK no callback specified, skipping result saving19:10:05 mysql_format OK connection: 1, len: 256, format: \"SELECT ID,Nev FROM jatekosok WHERE Nev=\'%e\' LIMIT 1\"19:10:05 mysql_tquery OK connection: 1, query: \"SELECT ID,Nev FROM jatekosok WHERE Nev=\'Mark_Johnson\' LIMIT 1\", callback: \"RegEllenorzes\", format: \"d\"19:10:05 CMySQLQuery::Execute[RegEllenorzes] OK starting query execution19:10:05 CMySQLQuery::Execute[RegEllenorzes] OK query was successfully executed within 0.616 milliseconds19:10:05 CMySQLResult::CMySQLResult() OK constructor calledIn callback \"RegEllenorzes\"19:10:05 cache_get_row_count OK connection: 119:10:05 CMySQLResult::~CMySQLResult() OK deconstructor called19:10:08 mysql_format OK connection: 1, len: 256, format: \"SELECT * FROM jatekosok WHERE Nev=\'%e\' AND Jelszo=SHA1(\'%e\')\"19:10:08 mysql_tquery OK connection: 1, query: \"SELECT * FROM jatekosok WHERE Nev=\'Mark_Johnson\' AND Jelszo=SHA1\", callback: \"JatekosBelep\", format: \"d\"19:10:08 CMySQLQuery::Execute[JatekosBelep] OK starting query execution19:10:08 CMySQLQuery::Execute[JatekosBelep] OK query was successfully executed within 1.29 milliseconds19:10:08 CMySQLResult::CMySQLResult() OK constructor calledIn callback \"JatekosBelep\"19:10:08 cache_get_row_count OK connection: 119:10:08 cache_get_field_content_float OK row: 0, field_name: \"Z\", connection: 119:10:08 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Z\", data: \"27.738\"19:10:08 cache_get_field_content_float OK row: 0, field_name: \"Y\", connection: 119:10:08 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Y\", data: \"136.956\"19:10:08 cache_get_field_content_float OK row: 0, field_name: \"X\", connection: 119:10:08 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"X\", data: \"-2016.93\"19:10:08 cache_get_field_content_int OK row: 0, field_name: \"Penz\", connection: 119:10:08 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Penz\", data: \"185000\"19:10:08 cache_get_field_content_int OK row: 0, field_name: \"Admin\", connection: 119:10:08 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Admin\", data: \"0\"19:10:08 CMySQLResult::~CMySQLResult() OK deconstructor called19:11:01 mysql_format OK connection: 1, len: 384, format: \"UPDATE `jatekosok` SET `Penz` =\'%d\',`X`=\'%f\',`Y`=\'%f\',`Z`=\'%f\' WHERE `Nev` =\'%s\'\"19:11:01 mysql_tquery OK connection: 1, query: \"UPDATE `jatekosok` SET `Penz` =\'185000\',`X`=\'-2016.143\',`Y`=\'135\", callback: \"(null)\", format: \"(null)\"19:11:01 mysql_close OK connection: 119:11:01 CMySQLConnection::Disconnect OK connection was closed19:11:01 CMySQLConnection::Disconnect OK connection was closed19:11:01 CMySQLConnection::Disconnect OK connection was closed19:11:01 CMySQLHandle::~CMySQLHandle OK deconstructor called19:11:13 mysql_connect OK host: \"127.0.0.1\", user: \"root\", database: \"rpg\", password: \"****\", port: 3306, autoreconnect: true, pool_size: 219:11:13 CMySQLHandle::Create OK creating new connection..19:11:13 CMySQLHandle::CMySQLHandle OK constructor called19:11:13 CMySQLHandle::Create OK connection created (id: 1)19:11:13 CMySQLConnection::Connect OK establishing connection to database...19:11:13 CMySQLConnection::Connect OK connection was successful19:11:13 CMySQLConnection::Connect OK auto-reconnect has been enabled19:11:13 mysql_errno OK connection: 119:11:13 mysql_format OK connection: 1, len: 256, format: \"SELECT ID,Nev FROM jatekosok WHERE Nev=\'%e\' LIMIT 1\"19:11:13 mysql_tquery OK connection: 1, query: \"SELECT ID,Nev FROM jatekosok WHERE Nev=\'Mark_Johnson\' LIMIT 1\", callback: \"RegEllenorzes\", format: \"d\"19:11:13 CMySQLConnection::Connect OK establishing connection to database...19:11:13 CMySQLConnection::Connect OK establishing connection to database...19:11:13 CMySQLConnection::Connect OK establishing connection to database...19:11:13 CMySQLConnection::Connect OK connection was successful19:11:13 CMySQLConnection::Connect OK auto-reconnect has been enabled19:11:13 CMySQLConnection::Connect OK connection was successful19:11:13 CMySQLConnection::Connect OK auto-reconnect has been enabled19:11:13 CMySQLConnection::Connect OK connection was successful19:11:13 CMySQLConnection::Connect OK auto-reconnect has been enabled19:11:13 CMySQLQuery::Execute[RegEllenorzes] OK starting query execution19:11:13 CMySQLQuery::Execute[RegEllenorzes] OK query was successfully executed within 0.660 milliseconds19:11:13 CMySQLResult::CMySQLResult() OK constructor calledIn callback \"RegEllenorzes\"19:11:13 cache_get_row_count OK connection: 119:11:13 CMySQLResult::~CMySQLResult() OK deconstructor called19:11:16 mysql_format OK connection: 1, len: 256, format: \"SELECT * FROM jatekosok WHERE Nev=\'%e\' AND Jelszo=SHA1(\'%e\')\"19:11:16 mysql_tquery OK connection: 1, query: \"SELECT * FROM jatekosok WHERE Nev=\'Mark_Johnson\' AND Jelszo=SHA1\", callback: \"JatekosBelep\", format: \"d\"19:11:16 CMySQLQuery::Execute[JatekosBelep] OK starting query execution19:11:16 CMySQLQuery::Execute[JatekosBelep] OK query was successfully executed within 0.896 milliseconds19:11:16 CMySQLResult::CMySQLResult() OK constructor calledIn callback \"JatekosBelep\"19:11:16 cache_get_row_count OK connection: 119:11:16 cache_get_field_content_float OK row: 0, field_name: \"Z\", connection: 119:11:16 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Z\", data: \"27.738\"19:11:16 cache_get_field_content_float OK row: 0, field_name: \"Y\", connection: 119:11:16 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Y\", data: \"136.956\"19:11:16 cache_get_field_content_float OK row: 0, field_name: \"X\", connection: 119:11:16 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"X\", data: \"-2016.93\"19:11:16 cache_get_field_content_int OK row: 0, field_name: \"Penz\", connection: 119:11:16 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Penz\", data: \"185000\"19:11:16 cache_get_field_content_int OK row: 0, field_name: \"Admin\", connection: 119:11:16 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Admin\", data: \"0\"19:11:16 CMySQLResult::~CMySQLResult() OK deconstructor called19:11:21 mysql_format OK connection: 1, len: 384, format: \"UPDATE `jatekosok` SET `Admin` =\'%d\',`Penz` =\'%d\',`X`=\'%f\',`Y`=\'%f\',`Z`=\'%f\' WHERE `Nev` =\'%s\'\"19:11:21 mysql_tquery OK connection: 1, query: \"UPDATE `jatekosok` SET `Admin` =\'5\',`Penz` =\'185000\',`X`=\'-2017.\", callback: \"(null)\", format: \"(null)\"19:11:21 CMySQLQuery::Execute[] OK starting query execution19:11:21 CMySQLQuery::Execute[] OK query was successfully executed within 41.594 milliseconds19:11:21 CMySQLQuery::Execute[] OK no callback specified, skipping result saving19:11:47 mysql_format OK connection: 1, len: 256, format: \"SELECT ID,Nev FROM jatekosok WHERE Nev=\'%e\' LIMIT 1\"19:11:47 mysql_tquery OK connection: 1, query: \"SELECT ID,Nev FROM jatekosok WHERE Nev=\'Mark_Johnson\' LIMIT 1\", callback: \"RegEllenorzes\", format: \"d\"19:11:47 CMySQLQuery::Execute[RegEllenorzes] OK starting query execution19:11:47 CMySQLQuery::Execute[RegEllenorzes] OK query was successfully executed within 0.673 milliseconds19:11:47 CMySQLResult::CMySQLResult() OK constructor calledIn callback \"RegEllenorzes\"19:11:47 cache_get_row_count OK connection: 119:11:47 CMySQLResult::~CMySQLResult() OK deconstructor called19:11:49 mysql_format OK connection: 1, len: 256, format: \"SELECT * FROM jatekosok WHERE Nev=\'%e\' AND Jelszo=SHA1(\'%e\')\"19:11:49 mysql_tquery OK connection: 1, query: \"SELECT * FROM jatekosok WHERE Nev=\'Mark_Johnson\' AND Jelszo=SHA1\", callback: \"JatekosBelep\", format: \"d\"19:11:49 CMySQLQuery::Execute[JatekosBelep] OK starting query execution19:11:49 CMySQLQuery::Execute[JatekosBelep] OK query was successfully executed within 0.803 milliseconds19:11:49 CMySQLResult::CMySQLResult() OK constructor calledIn callback \"JatekosBelep\"19:11:49 cache_get_row_count OK connection: 119:11:49 cache_get_field_content_float OK row: 0, field_name: \"Z\", connection: 119:11:49 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Z\", data: \"27.899\"19:11:49 cache_get_field_content_float OK row: 0, field_name: \"Y\", connection: 119:11:49 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Y\", data: \"136.956\"19:11:49 cache_get_field_content_float OK row: 0, field_name: \"X\", connection: 119:11:49 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"X\", data: \"-2017.65\"19:11:49 cache_get_field_content_int OK row: 0, field_name: \"Penz\", connection: 119:11:49 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Penz\", data: \"185000\"19:11:49 cache_get_field_content_int OK row: 0, field_name: \"Admin\", connection: 119:11:49 CMySQLResult::GetRowDataByName OK row: \'0\', field: \"Admin\", data: \"5\"19:11:49 CMySQLResult::~CMySQLResult() OK deconstructor called19:12:20 mysql_format OK connection: 1, len: 384, format: \"UPDATE `jatekosok` SET `Admin` =\'%d\',`Penz` =\'%d\',`X`=\'%f\',`Y`=\'%f\',`Z`=\'%f\' WHERE `Nev` =\'%s\'\"19:12:20 mysql_tquery OK connection: 1, query: \"UPDATE `jatekosok` SET `Admin` =\'5\',`Penz` =\'185000\',`X`=\'-2022.\", callback: \"(null)\", format: \"(null)\"19:12:20 CMySQLQuery::Execute[] OK starting query execution19:12:20 CMySQLQuery::Execute[] OK query was successfully executed within 65.925 milliseconds19:12:20 CMySQLQuery::Execute[] OK no callback specified, skipping result saving19:12:27 mysql_close OK connection: 119:12:27 CMySQLConnection::Disconnect OK connection was closed19:12:27 CMySQLConnection::Disconnect OK connection was closed19:12:27 CMySQLConnection::Disconnect OK connection was closed19:12:27 CMySQLHandle::~CMySQLHandle OK deconstructor called
mysql_format(kapcsolat, string, 256, \"UPDATE jatekosok SET Admin=\'%d\', Penz=\'%d\',X=\'%f\',Y=\'%f\',Z=\'%f\' WHERE Nev=\'%s\'\", JatekosInfo[playerid][Admin],JatekosInfo[playerid][Penz], JatekosInfo[playerid][X], JatekosInfo[playerid][Y], JatekosInfo[playerid][Z],JatekosInfo[playerid][Nev]);
public OnPlayerDisconnect(playerid, reason){ new string[256]; GetPlayerPos(playerid, JatekosInfo[playerid][X], JatekosInfo[playerid][Y], JatekosInfo[playerid][Z]); mysql_format(kapcsolat, string, 256, \"UPDATE `jatekosok` SET `Admin`=\'%d\', `Penz`=\'%d\',`X`=\'%f\',`Y`=\'%f\',`Z`=\'%f\', WHERE `Nev`=\'%s\'\",// ` `jelek JatekosInfo[playerid][Admin],JatekosInfo[playerid][Penz], JatekosInfo[playerid][X], JatekosInfo[playerid][Y], JatekosInfo[playerid][Z],JatekosInfo[playerid][Nev]); mysql_query(kapcsolat, string);//sima query (ne kérdezd miért, nekem így működik xD) return 1;}
new nev[MAX_PLAYER_NAME];cache_get_field_content(0,\"Nev\",nev);strmid(JatekosInfo[playerid][Nev],nev,0,strlen(nev),MAX_PLAYER_NAME);