Пользователь
- Регистрация
- 31 Июл 2024
- Сообщения
- 66
- Автор темы
- #1
MYSQL Подключил верно, бд тоже подключил, айпи тоже подключил.
вот коды
Вот код еще Server.cfg
Вот файлы в Plugins
Вот код MYSQL
Что не так? Пишет просто БД не подключена хотя она правильна написана сравнивал 2 часа и хз чё делать.
вот коды
stock CreateMySQLConnection(host[], user[], db[], pass[])
{
connects = mysql_connect(host, user, db, pass);
if(mysql_errno()==0)
{
print("------- БД Youtube RP -----");
printf("Подключение к базе успешно!");
}
else
{
print("--------- БД Youtube RP -------");
printf("Подключиться к базе не удалось!");
}
mysql_function_query(connects,"SET NAMES cp1251",false,"","");
mysql_function_query(connects,"set character_set_client=\'cp1251\'",false,"","");
mysql_function_query(connects,"set character_set_results=\'cp1251\'",false,"","");
mysql_function_query(connects,"set collation_connection=\'cp1251_general_ci\'",false,"","");
mysql_function_query(connects, "UPDATE `accounts` SET `pHotvet` = '0', `pOnlineYes` = `day_online`, `day_online` = '0', `pAfkYes` = `pDayAfk`, `pDayAfk` = '0'", false, "", "");
mysql_function_query(connects, "UPDATE `bizz` SET `bProduct` = '100000'", false, "", "");
mysql_function_query(connects,"SELECT * FROM `"TABLE_BIZZ"`", true, "LoadBizz", "");
mysql_function_query(connects,"SELECT * FROM `"TABLE_HOUSE"`",true,"LoadProperty","");
mysql_tquery(connects,"SELECT * FROM `gzlogo`", "LoadGZLogo","");
mysql_function_query(connects,"SELECT * FROM `"TABLE_GANGZONE"`", true, "OnLoadGzCallback", "");
mysql_function_query(connects,"SELECT * FROM `"TABLE_OTHER"`", true, "OnLoadOtherCallback", "");
mysql_function_query(connects,"SELECT * FROM `"TABLE_MERIA"`", true, "OnLoadMeriaCallback", "");
mysql_function_query(connects,"SELECT * FROM `"TABLE_PICK"`", true, "LoadPick", "");
mysql_function_query(connects,"SELECT * FROM `"TABLE_GREENZONE"`", true, "LoadZone", "");
mysql_function_query(connects,"SELECT * FROM `family_system`", true, "family_loading", "" ) ;
mysql_function_query(connects, "SELECT * FROM `dropped_items` WHERE `storage_type` = '11'", true, "LoadPlantsCallBack", "");
mysql_function_query(connects, "DELETE FROM `dropped_items` WHERE `drop_time` < UNIX_TIMESTAMP()-5760 AND `storage_type` != '11'", false, "", "");
mysql_function_query(connects, "SELECT * FROM dropped_items WHERE `storage_type` != '11'", true, "LoadDItems", "");
mysql_function_query(connects,"SELECT * FROM `bank`", true, "TotalBankCeck", "" ) ;
mysql_tquery(connects,"SELECT * FROM `fraction_ranks`","OnFracRankLoad","");
mysql_tquery(connects,"SELECT * FROM `realtors`", "LoadRealtors", "");
mysql_function_query(connects, "SELECT * FROM `config`", true, "LoadConfig", "");
mysql_function_query(connects, "SELECT * FROM `hostnames`", true, "LoadNames", "");
mysql_function_query(connects, "SELECT * FROM `AntiCheat`", true, "LoadSettings", "");
return 1;
}
{
connects = mysql_connect(host, user, db, pass);
if(mysql_errno()==0)
{
print("------- БД Youtube RP -----");
printf("Подключение к базе успешно!");
}
else
{
print("--------- БД Youtube RP -------");
printf("Подключиться к базе не удалось!");
}
mysql_function_query(connects,"SET NAMES cp1251",false,"","");
mysql_function_query(connects,"set character_set_client=\'cp1251\'",false,"","");
mysql_function_query(connects,"set character_set_results=\'cp1251\'",false,"","");
mysql_function_query(connects,"set collation_connection=\'cp1251_general_ci\'",false,"","");
mysql_function_query(connects, "UPDATE `accounts` SET `pHotvet` = '0', `pOnlineYes` = `day_online`, `day_online` = '0', `pAfkYes` = `pDayAfk`, `pDayAfk` = '0'", false, "", "");
mysql_function_query(connects, "UPDATE `bizz` SET `bProduct` = '100000'", false, "", "");
mysql_function_query(connects,"SELECT * FROM `"TABLE_BIZZ"`", true, "LoadBizz", "");
mysql_function_query(connects,"SELECT * FROM `"TABLE_HOUSE"`",true,"LoadProperty","");
mysql_tquery(connects,"SELECT * FROM `gzlogo`", "LoadGZLogo","");
mysql_function_query(connects,"SELECT * FROM `"TABLE_GANGZONE"`", true, "OnLoadGzCallback", "");
mysql_function_query(connects,"SELECT * FROM `"TABLE_OTHER"`", true, "OnLoadOtherCallback", "");
mysql_function_query(connects,"SELECT * FROM `"TABLE_MERIA"`", true, "OnLoadMeriaCallback", "");
mysql_function_query(connects,"SELECT * FROM `"TABLE_PICK"`", true, "LoadPick", "");
mysql_function_query(connects,"SELECT * FROM `"TABLE_GREENZONE"`", true, "LoadZone", "");
mysql_function_query(connects,"SELECT * FROM `family_system`", true, "family_loading", "" ) ;
mysql_function_query(connects, "SELECT * FROM `dropped_items` WHERE `storage_type` = '11'", true, "LoadPlantsCallBack", "");
mysql_function_query(connects, "DELETE FROM `dropped_items` WHERE `drop_time` < UNIX_TIMESTAMP()-5760 AND `storage_type` != '11'", false, "", "");
mysql_function_query(connects, "SELECT * FROM dropped_items WHERE `storage_type` != '11'", true, "LoadDItems", "");
mysql_function_query(connects,"SELECT * FROM `bank`", true, "TotalBankCeck", "" ) ;
mysql_tquery(connects,"SELECT * FROM `fraction_ranks`","OnFracRankLoad","");
mysql_tquery(connects,"SELECT * FROM `realtors`", "LoadRealtors", "");
mysql_function_query(connects, "SELECT * FROM `config`", true, "LoadConfig", "");
mysql_function_query(connects, "SELECT * FROM `hostnames`", true, "LoadNames", "");
mysql_function_query(connects, "SELECT * FROM `AntiCheat`", true, "LoadSettings", "");
return 1;
}
Вот код еще Server.cfg
87echo Executing Server Config...
lanmode 0
rcon_password
maxplayers 1000
hostname YOUTUBE RP | BETA TEST!
gamemode0 youtube
filterscripts
announce 1
bind 1*4.9*.2.22*
port 66**
query 1
weburl
maxnpc 0
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
plugins crashdetect.so streamer.so mysql_static.so pawncmd.so regex.so SKY.so sscanf.so mysql.so pawnbots.so pawnraknet.so
lanmode 0
rcon_password
maxplayers 1000
hostname YOUTUBE RP | BETA TEST!
gamemode0 youtube
filterscripts
announce 1
bind 1*4.9*.2.22*
port 66**
query 1
weburl
maxnpc 0
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
plugins crashdetect.so streamer.so mysql_static.so pawncmd.so regex.so SKY.so sscanf.so mysql.so pawnbots.so pawnraknet.so
Вот файлы в Plugins
crashdetect.so
mysql.so
mysql_static.so
pawnbots.so
pawncmd.so
pawnraknet.cfg
pawnraknet.so
regex.so
SKY.so
sscanf.so
streamer.so
mysql.so
mysql_static.so
pawnbots.so
pawncmd.so
pawnraknet.cfg
pawnraknet.so
regex.so
SKY.so
sscanf.so
streamer.so
Вот код MYSQL
#define sqlhost "127.0.0.1" // Адрес хоста
#define sqluser "user4**28" // Имя пользователя
#define sqlpass "*SK**fL**dqE" // Пароль
#define sqldb "user4**28" // Имя Базы данных
#define sqluser "user4**28" // Имя пользователя
#define sqlpass "*SK**fL**dqE" // Пароль
#define sqldb "user4**28" // Имя Базы данных
Что не так? Пишет просто БД не подключена хотя она правильна написана сравнивал 2 часа и хз чё делать.