SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 05/10/2014, 06:36 PM   #5141
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 10,089
Reputation: 2655
Default Re: [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by Runn3R View Post
No download links for old plugins and includes.
Means it's time to upgrade. That'd be like going to Microsoft and saying "no download link for Windows 98". It's time to move on.
__________________
Vince is offline   Reply With Quote
Old 08/10/2014, 03:05 PM   #5142
wahyumahadir
Little Clucker
 
Join Date: Dec 2012
Location: Indonesia
Posts: 47
Reputation: 1
Default Re: [REL] MySQL Plugin (Now on github!)

i keep have same problem can you help me ?


----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3z, (C)2005-2014 SA-MP Team

[10:40:11]
[10:40:11] Server Plugins
[10:40:11] --------------
[10:40:11] Loading plugin: sscanf.so
[10:40:11]

[10:40:11] ===============================

[10:40:11] sscanf plugin loaded.

[10:40:11] Version: 2.8.1

[10:40:11] (c) 2012 Alex "******" Cole

[10:40:11] ===============================

[10:40:11] Loaded.
[10:40:11] Loading plugin: mysql.so
[10:40:11] Failed (libmysqlclient_r.so.15: cannot open shared object file: No such file or directory)
[10:40:11] Loading plugin: streamer.so
[10:40:11]

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[10:40:11] Loaded.
[10:40:11] Loading plugin: wp.so
[10:40:11]
[10:40:11] ==================
[10:40:11]
[10:40:11] Whirlpool loaded
[10:40:11]
[10:40:11] ==================
[10:40:11]
[10:40:11] Loaded.
[10:40:11] Loading plugin: geoip.so
[10:40:11] GeoIP_Plugin got loaded.
[10:40:11] Loaded.
[10:40:11] Loaded 4 plugins.

[10:40:12]
[10:40:12] Filterscripts
[10:40:12] ---------------
[10:40:12] Loading filterscript 'buttons.amx'...
[10:40:12] Loaded 1 filterscripts.

[10:40:12] Script[gamemodes/gg.amx]: Run time error 19: "File or function is not found"
[10:40:12] Number of vehicle models: 0

if you wanna help me call me in ******** https://www.********.com/wahyu.m.partii.33
wahyumahadir is offline   Reply With Quote
Old 11/10/2014, 04:24 AM   #5143
fonia5
Gangsta
 
fonia5's Avatar
 
Join Date: Jun 2014
Location: United Kingdom
Posts: 741
Reputation: 116
Default Re: [REL] MySQL Plugin (Now on github!)

I need R7 Windows files anybody have it?
fonia5 is offline   Reply With Quote
Old 11/10/2014, 07:24 AM   #5144
im
Huge Clucker
 
im's Avatar
 
Join Date: Mar 2012
Location: Romānia
Posts: 213
Reputation: 21
Default Re: [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by fonia5 View Post
I need R7 Windows files anybody have it?
http://forum.sa-mp.com/showpost.php?...postcount=5140
__________________
im is offline   Reply With Quote
Old 13/10/2014, 11:01 AM   #5145
Kapupc
Little Clucker
 
Join Date: Feb 2014
Posts: 37
Reputation: 0
Thumbs up Re: [REL] MySQL Plugin (Now on github!)

after I learn about orm and i got download basic account script.
i have some question about orm_destroy. how important that is.
because in the script don't have that fuction. and i worry about that.

Following this code.
Code:
enum E_PLAYERS
{
	ORM:ORM_ID,
	
	ID,
	Name[MAX_PLAYER_NAME],
	Password[129],
	Money,
	
	bool:IsLoggedIn,
	bool:IsRegistered,
	LoginAttempts,
	LoginTimer
};
new Player[MAX_PLAYERS][E_PLAYERS];

new MysqlRaceCheck[MAX_PLAYERS];
Code:
public OnPlayerConnect(playerid)
{
	MysqlRaceCheck[playerid]++;
	//reset player data
	for(new E_PLAYERS:e; e < E_PLAYERS; ++e)
	    Player[playerid][e] = 0;

	GetPlayerName(playerid, Player[playerid][Name], MAX_PLAYER_NAME);
	
	//create orm instance and register all needed variables
	new ORM:ormid = Player[playerid][ORM_ID] = orm_create("players", SQL);

	orm_addvar_int(ormid, Player[playerid][ID], "id");
	orm_addvar_string(ormid, Player[playerid][Name], MAX_PLAYER_NAME, "username");
	orm_addvar_string(ormid, Player[playerid][Password], 129, "password");
	orm_addvar_int(ormid, Player[playerid][Money], "money");
	orm_setkey(ormid, "username");
	
	//tell the orm system to load all data, assign it to our variables and call our callback when ready
	orm_load(ormid, "OnPlayerDataLoaded", "dd", playerid, MysqlRaceCheck[playerid]);
	return 1;
}
Code:
public OnPlayerDisconnect(playerid,reason)
{
	MysqlRaceCheck[playerid]++;
	if(Player[playerid][IsLoggedIn] && Player[playerid][ID] > 0)
	orm_save(Player[playerid][ORM_ID]); //if Player[playerid][ID] has a valid value, orm_save sends an UPDATE query, else an INSERT query
	return 1;
}
as u see in the OnPlayerDisconnect it doesn't destroy ORM instance what happen if i make it happen
when another player join new ORM also create ?
and so. if i use the same code when player disconnect and new player join with the same id number.
the ORM id will create a new one id. isn't it? or it use the old orm id or something else.

you can just explain the easyway with me.
(Just a newbie worry about his script please help )
Kapupc is offline   Reply With Quote
Old 13/10/2014, 01:21 PM   #5146
maddinat0r
Banned
 
Join Date: Jun 2010
Location: Germany
Posts: 845
Reputation: 482
Default Re: [REL] MySQL Plugin (Now on github!)

Whoops, that's indeed a mistake. The ORM instance should be destroyed in OnPlayerDisconnect and OnGameModeExit of course.
maddinat0r is offline   Reply With Quote
Old 13/10/2014, 01:43 PM   #5147
Cell_
Big Clucker
 
Join Date: May 2012
Posts: 118
Reputation: 29
Default Re: [REL] MySQL Plugin (Now on github!)

I want to load data into a seperate variable from a specific field and then save data from another variable into the same field. Will orm_delvar and then orm_addvar_string suffice or do I have to redo something..?
__________________
Cell_ is offline   Reply With Quote
Old 13/10/2014, 03:10 PM   #5148
Kapupc
Little Clucker
 
Join Date: Feb 2014
Posts: 37
Reputation: 0
Default Re: [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by maddinat0r View Post
Whoops, that's indeed a mistake. The ORM instance should be destroyed in OnPlayerDisconnect and OnGameModeExit of course.
lol feel abit happy im a love your script. thanks for answer i will place orm_destroy
Kapupc is offline   Reply With Quote
Old 13/10/2014, 03:16 PM   #5149
Kapupc
Little Clucker
 
Join Date: Feb 2014
Posts: 37
Reputation: 0
Default Re: [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by Cell_ View Post
I want to load data into a seperate variable from a specific field and then save data from another variable into the same field. Will orm_delvar and then orm_addvar_string suffice or do I have to redo something..?
like this ?
Code:
new  variable1, variable2;
orm_addvar_int(ormid, variable1, "Field");//first addvar
andthen you load data in before u save again just set the variable1 by normally function
such variable1 = variable2;
and then orm_save
Kapupc is offline   Reply With Quote
Old 13/10/2014, 03:39 PM   #5150
Cell_
Big Clucker
 
Join Date: May 2012
Posts: 118
Reputation: 29
Default Re: [REL] MySQL Plugin (Now on github!)

Quote:
Originally Posted by Kapupc View Post
like this ?
Code:
new  variable1, variable2;
orm_addvar_int(ormid, variable1, "Field");//first addvar
andthen you load data in before u save again just set the variable1 by normally function
such variable1 = variable2;
and then orm_save
What if I don't want to reset the first variable? Is there a better way to doing what I said?
__________________
Cell_ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
****** Project: Glass int3s0 Everything and Nothing 99 26/02/2013 05:22 PM
MySQL Plugin R5 plugin problem dud Scripting Help 12 05/12/2011 07:28 PM
Strikens Mysql vs BlueG's Mysql plugin PrawkC Scripting Help 4 30/09/2011 11:30 AM
[help][plugin] Can't load mysql plugin mariomako Help Archive 8 16/07/2011 03:37 PM
mysql plugin. loading plugin failed ikkentim Help Archive 2 10/02/2011 03:32 PM


All times are GMT. The time now is 06:58 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.