(error) symbol already defined: "@yH_OnGameModeInit@003"
#include "a_samp.inc"
#include "YSI_Coding\y_hooks.inc"
#include "a_mysql.inc"
#include "YSI_Coding\y_timers.inc"
#include "modules/core/connect.pwn"
#include "modules/core/init.pwn"
main()
{
}
public OnGameModeInit()
{
return true;
}
#include "YSI_Coding\y_hooks.inc"
#define SQL_HOST "localhost"
#define SQL_USERNAME "root"
#define SQL_PASSWORD ""
#define SQL_DATABASE "test"
new MySQL:handle;
hook OnGameModeInit()
{
mysql_log(ALL);
handle = mysql_connect(SQL_HOST, SQL_USERNAME, SQL_PASSWORD, SQL_DATABASE); // connect and check for cnnectiviti ->
if(mysql_errno(handle) != 0 || handle == MYSQL_INVALID_HANDLE) // shutdown server if conn not established ->
{
print("[CONNECTION] Mysql connection not established; Shuting down the server!");
SendRconCommand("exit");
return true;
}
return true;
}
#include "YSI_Coding\y_hooks.inc"
hook OnGameModeInit()
{
SetGameModeText("Test");
return true;
}
hook public OnGameModeInit
As far as I'm concerned that Y_hooks are used like that..
PHP код:
|
and as far as i am cOnCeRnEd, you don''t know what ur talking about.
|
#include "a_samp.inc"
#include "a_mysql.inc"
#include "YSI_Coding\y_timers.inc"
#include "modules/core/connect.pwn"
#include "modules/core/init.pwn"
#include "YSI_Coding\y_hooks.inc"
#define SQL_HOST "localhost"
#define SQL_USERNAME "root"
#define SQL_PASSWORD ""
#define SQL_DATABASE "test"
new MySQL:handle;
hook OnGameModeInit()
{
mysql_log(ALL);
handle = mysql_connect(SQL_HOST, SQL_USERNAME, SQL_PASSWORD, SQL_DATABASE); // connect and check for cnnectiviti ->
if(mysql_errno(handle) != 0 || handle == MYSQL_INVALID_HANDLE) // shutdown server if conn not established ->
{
print("[CONNECTION] Mysql connection not established; Shuting down the server!");
SendRconCommand("exit");
return true;
}
return true;
}
#include "YSI_Coding\y_hooks.inc"
#include "a_samp.inc"
#include "a_mysql.inc"
#include "YSI_Coding\y_timers.inc"
#include "modules/core/connect.pwn"
#include "modules/core/init.pwn"
#include "YSI_Coding\y_hooks.inc"
main()
{
}
public OnGameModeInit()
{
return true;
}
#include "YSI_Coding\y_hooks.inc"
#define SQL_HOST "localhost"
#define SQL_USERNAME "root"
#define SQL_PASSWORD ""
#define SQL_DATABASE "test"
new MySQL:handle;
hook OnGameModeInit()
{
mysql_log(ALL);
handle = mysql_connect(SQL_HOST, SQL_USERNAME, SQL_PASSWORD, SQL_DATABASE); // connect and check for cnnectiviti ->
if(mysql_errno(handle) != 0 || handle == MYSQL_INVALID_HANDLE) // shutdown server if conn not established ->
{
print("[CONNECTION] Mysql connection not established; Shuting down the server!");
SendRconCommand("exit");
return true;
}
return true;
}
#include "YSI_Coding\y_hooks.inc"
hook OnGameModeInit()
{
SetGameModeText("Test");
return true;
}