07.04.2017, 11:54
Hi guys MySQL doesnt save the datas.
(scores, money kills and so on)
When i sign up and log in to the game, the data doesnt come to MySQL.
But when i banned in the game it comes to the MySQL ban list table wheres the problem ? :/
I can send the my mode to someone who can help.
(scores, money kills and so on)
When i sign up and log in to the game, the data doesnt come to MySQL.
But when i banned in the game it comes to the MySQL ban list table wheres the problem ? :/
I can send the my mode to someone who can help.
Код:
#include <a_mysql>
Код:
#define SQL_HOST "localhost" #define SQL_USER "root" #define SQL_PASS " " #define SQL_DB "samp" #define mysql_fetch_row(%1) mysql_fetch_row_format(%1,"|")
Код:
public WarnSave(adminid,kickerid,sebep[]) { new query[256],AdminIP[20],PidIP[20],hour,minute,second,year,month,day; if(adminid != -1){ GetPlayerIp(adminid,AdminIP,20); GetPlayerIp(kickerid, PidIP, 20); gettime(hour, minute, second); getdate(year, month, day); format(query, sizeof(query), "INSERT INTO `kayitlar` (kayittip, kayit, kayitip, admin, adminip, sebep, zaman, tarih) VALUES(\"WARN\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%d:%d:%d\", \"%d.%d.%d\")", getName(kickerid), PidIP, getName(adminid), AdminIP, code(sebep), hour, minute, second, day, month, year); mysql_query(query); //mysql_free_result(); }else{ GetPlayerIp(kickerid, PidIP, 20); gettime(hour, minute, second); getdate(year, month, day); format(query, sizeof(query), "INSERT INTO `kayitlar` (kayittip, kayit, kayitip, admin, adminip, sebep, zaman, tarih) VALUES(\"WARN\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%d:%d:%d\", \"%d.%d.%d\")", getName(kickerid), PidIP, "Sistem", "localhost", code(sebep), hour, minute, second, day, month, year); mysql_query(query); //mysql_free_result(); } }