need help with finding an plugin
#1

Hello,i have an mysql script and i have the mysql plugin,made by __ethan__ and now i wanted to add my script to serverFFS but their servers are running on linux,so can someone help me to find a linux script version of it.thank you

PS: i dont know what version it is

Код:
/**
 *       SA:MP MySQL Functions     
 *  © Copyright 2010, <__Ethan__>
 *
 **/

#if defined __mysql_included
	#endinput
#endif
#define __mysql_included
#pragma library mysql

// defines

#define INVALID_MYSQL_ID (-1)


#define LOG_OFF           (0)
#define LOG_ALL           (1)
#define LOG_ONLY_ERRORS   (2)

// plugin callbacks

forward OnMysqlQueryArray(resultid, extravars[], MySQL:connection);
forward OnMysqlQuery(resultid, spareid, MySQL:connection);
forward OnMysqlError(error[], errorid, MySQL:connection);

// plugin natives

native MySQL:mysql_connect(const host[], const user[], const pass[], const db[], auto_reconnect = 0);
native mysql_log(logtype, windowerrors = (1), MySQL:handle = (MySQL:0));
native mysql_close(MySQL:handle = (MySQL:0));
native mysql_reload(MySQL:handle = (MySQL:0));
native mysql_select_db(const db[], MySQL:handle = (MySQL:0));
native mysql_query(const query[], resultid = (-1), spareid = (0), MySQL:handle = (MySQL:0));
native mysql_query_array(const query[], resultid = (-1), {Float,_}:extravars[], MySQL:handle = (MySQL:0));
native mysql_store_result(MySQL:handle = (MySQL:0));
native mysql_free_result(MySQL:handle = (MySQL:0));
native mysql_result_stored(MySQL:handle = (MySQL:0));
native mysql_fetch_field(const fieldname[], dest[], MySQL:handle = (MySQL:0));
native mysql_fetch_field_num(fieldnum, dest[], MySQL:handle = (MySQL:0));
native mysql_fetch_row(dest[], const splitter[] = "|", MySQL:handle = (MySQL:0));
native mysql_fetch_row_data(MySQL:handle = (MySQL:0));
native mysql_real_escape_string(const string[], dest[], MySQL:handle = (MySQL:0));
native mysql_num_rows(MySQL:handle = (MySQL:0));
native mysql_num_fields(MySQL:handle = (MySQL:0));
native mysql_affected_rows(MySQL:handle = (MySQL:0));
native mysql_insert_id(MySQL:handle = (MySQL:0));
native mysql_ping(MySQL:handle = (MySQL:0));
native mysql_error(dest[], MySQL:handle = (MySQL:0));
native mysql_errno(MySQL:handle = (MySQL:0));
native mysql_warning_count(MySQL:handle = (MySQL:0));
native mysql_info(dest[], MySQL:handle = (MySQL:0));
native mysql_stat(dest[], MySQL:handle = (MySQL:0));
native mysql_get_server_info(dest[], MySQL:handle = (MySQL:0));
native mysql_get_host_info(dest[], MySQL:handle = (MySQL:0));
native mysql_data_seek(rownum, MySQL:handle = (MySQL:0));
native mysql_set_character_set(const csname[], MySQL:handle = (MySQL:0));
native mysql_fetch_int(MySQL:handle = (MySQL:0));
native Float:mysql_fetch_float(MySQL:handle = (MySQL:0));
native mysql_fetch_string(dest[], MySQL:handle = (MySQL:0));

// split function - thanks to Blacklite
stock split(const strsrc[], strdest[][], delimiter = '|')
{
	new i, li, aNum, len, srclen = strlen(strsrc);
	while(i <= srclen)
	{
		if (strsrc[i] == delimiter || i == srclen)
		{
			len = strmid(strdest[aNum], strsrc, li, i, 128);
			strdest[aNum][len] = 0;
			li = i + 1;
			aNum++;
		}
		i++;
	}
}
Reply
#2

That's icognitos Mysql plugin, find his static 2.1 one
Reply
#3

oh but from where?can ya tell me link or something please.?
Reply
#4

maybe - https://sampforum.blast.hk/showthread.php?tid=122983

win - http://www.strickenkid.com/mysql_plu....php?f=windows

hostedlinux - http://www.strickenkid.com/mysql_plu....php?f=windows

linux - http://www.strickenkid.com/mysql_plu...x_2.1.1.tar.gz
Reply
#5

i think its new version of it,i tried to compile with that inc and add the new plugins,but that what happened

Код:
SA-MP Dedicated Server
----------------------
v0.3c, ©2005-2010 SA-MP Team

[20:20:32] 
[20:20:32] Server Plugins
[20:20:32] --------------
[20:20:32]  Loading plugin: mysql
[20:20:32]  SA:MP MySQL Plugin v2.1.1 Loaded.
[20:20:32]   Loaded.
[20:20:32]  Loaded 1 plugins.

[20:20:32] [MySQL] Thread running. Threadsafe: Yes.
[20:20:32] 
[20:20:32] Filter Scripts
[20:20:32] ---------------
[20:20:32]   Loading filter script 'midostream.amx'...
[20:20:32]   Loaded 1 filter scripts.

[20:20:32] [MySQL] Error (0): Function: mysql_connect failed, mysql was not initialized on this handle.
and crash
Reply
#6

you can't compile your gamemode with 2.1.1?
Reply
#7

i compiled it,but i cant start it with 2.1.1
Reply
#8

with the 2.1.1's INC?
Reply
#9

yes.
Reply
#10

up...
now im getting this
Код:
SA-MP Dedicated Server
----------------------
v0.3c, ©2005-2010 SA-MP Team

[15:39:12] 
[15:39:12] Server Plugins
[15:39:12] --------------
[15:39:12]  Loading plugin: mysql
[15:39:12]  SA:MP MySQL Plugin v2.1.1 Loaded.
[15:39:12]   Loaded.
[15:39:12]  Loaded 1 plugins.

[15:39:12] [MySQL] Thread running. Threadsafe: Yes.
[15:39:12] 
[15:39:12] Filter Scripts
[15:39:12] ---------------
[15:39:12]   Loading filter script 'midostream.amx'...
[15:39:12]   Loaded 1 filter scripts.

[15:39:12] [MySQL] Error (0): Failed to connect. Access denied for user 'root'@'localhost' (using password: YES).
[15:39:12] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[15:39:12] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[15:39:12] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[15:39:12] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
thats how i connect:
Код:
#define HOST_ADDR   "localhost"
#define HOST_USER   "root"
#define HOST_DATA   "samp"
#define HOST_PASS   ""

public OnGameModeInit()
{
	mysql_init(LOG_ONLY_ERRORS, 1);

    mysql_connect( HOST_ADDR, HOST_USER, HOST_PASS, HOST_DATA);

.......
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)