SA-MP Forums Archive
[Include] Useful Functions v1.0 (MySQL) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Useful Functions v1.0 (MySQL) (/showthread.php?tid=346400)

Pages: 1 2


Useful Functions v1.0 (MySQL) - Spookie98 - 28.05.2012

Useful Functions v1.0
Based on MySQL
Introduction
Useful functions is based on MySQL, wich uses just functions, no queries. It gots 10 functions, based on a log that can be activated and dezactivated, with them you can set all what you need, by strings.
Theres nothing copied, all these fuctions are made from scratch. The author is PAWN++ Team (Romania), we usually make scripts for money, this is a free script.

Features
Using the following systems and plugins. Functions Install

1. Place it to the top of the script:

pawn Код:
#include <useful_functions>
2. Add these defines and fill them:

pawn Код:
#define PAWN_HOST "" // The IP of the server
#define PAWN_USER "" // The user of the server
#define PAWN_PASSWORD "" // The password of the server
#define PAWN_DATABASE "" // The name of the DataBase
2. Add the folder 'UF' with 'log.ini' in the directory scriptfiles.

Examples
Bugs

We found no bug, if you find a bug, please contact us.

Author: PAWN++ Team
Credits: BlueG, Spookie
Download: Click
Password: pawnteam
Help: If you want to help us, send me a Private Message.

PAWN++
* We are sorry for that we missed to place the File Password, thanks for understanding.
Thanks.


Re: Useful Functions v1.0 (MySQL) - Hoss - 28.05.2012

Good job


Re: Useful Functions v1.0 (MySQL) - Shadow_ - 28.05.2012

Great job!


Re: Useful Functions v1.0 (MySQL) - Calgon - 28.05.2012

This is pointless and ruins the efficiency with MySQL.

Look at BUD and see how Slice does it - you can save multiple variables at once and you still maintain efficient code. This is like the DINI of MySQL.


Re: Useful Functions v1.0 (MySQL) - Spookie98 - 28.05.2012

Calgon, theres no need for the INC to be advanced, a lot of people want to use MySQL but don`t know how. Maybe in the next version the it will be more advanced.


Re: Useful Functions v1.0 (MySQL) - Calgon - 28.05.2012

There's always a need for efficiency, especially with SA-MP and MySQL. You're encouraging use of bad methods.


Re: Useful Functions v1.0 (MySQL) - WaLLy.SAMP - 28.05.2012

Thanks.Useful for newbie:d


Re: Useful Functions v1.0 (MySQL) - The__ - 28.05.2012

This is extremely useful.


Re: Useful Functions v1.0 (MySQL) - Spookie98 - 28.05.2012

Calgo, we don`t think that it is a Bad Method and about the Difficulty of the INC, we made this especally for newbies, we never wanted to say that BUD or any other INC is worse than our, we said that our INC is better for someone that doesen`t know what MySQL means, but wants to learn it.


Re: Useful Functions v1.0 (MySQL) - Calgon - 29.05.2012

Quote:
Originally Posted by Spookie98
Посмотреть сообщение
Calgo, we don`t think that it is a Bad Method and about the Difficulty of the INC, we made this especally for newbies, we never wanted to say that BUD or any other INC is worse than our, we said that our INC is better for someone that doesen`t know what MySQL means, but wants to learn it.
I'm not saying the idea of the include is a bad idea - I'm sure it's very useful to newbies. But you don't use the most efficient methods to save data (or to load it), which you really should if you're encouraging newbies to use it. Those who base their scripts on this will have hell in the future.

Consider using caching, threading and functions with support for multiple parameters.

Take a look at BUD - https://sampforum.blast.hk/showthread.php?tid=187720 - there's multiSet and multiGet, for roleplay servers, there's on average probably around 100-200 fields for each player, that's 200 select queries just to login, then 200 to save everything. If you made a function like multiSet or multiGet, the code would be a lot more efficient, you could reduce those queries by much more than half.


Re: Useful Functions v1.0 (MySQL) - Spookie98 - 29.05.2012

Dear Calgon, we`re sure that the INC can be much better, be sure that we`ll improve it in the future, if the newbies will use this include they should keep an eye on this Topic, there will be more updates in the future.


Pawn++ School Member,
Spookie


Re: Useful Functions v1.0 (MySQL) - Edvin - 29.05.2012

Very nice release!

5/5!


Re: Useful Functions v1.0 (MySQL) - Spookie98 - 29.05.2012

Thanks for all comments ! Waiting for more comments out here


Re: Useful Functions v1.0 (MySQL) - Spookie98 - 04.06.2012

Password added. Sorry for that.


Re: Useful Functions v1.0 (MySQL) - Slice - 04.06.2012

Why is this called "useful functions"? Very misleading..


Re: Useful Functions v1.0 (MySQL) - TheLazySloth - 04.06.2012

Calgon was pointing out how he could make his script more efficient and then actually showed him how he could improve his code a little bit more so this isn't directed at him completely, but Slice comes along and posts a totally un-necessarily comment.

Didn't realize how cocky high-rollers were on this forum, forgetting the fact that most of the stuff posted in the filterscripts section of this forum is all noob created for noob use.

Besides, most here only think they know Pawn because they could script a "really efficient server", when in actuality if it came to it wouldn't be able to do anything else with the language.

Not to mention years ago, you were in the same exact shoes as this guy, because we all start somewhere.

Back to on-topic: Keep up the good work!


Re: Useful Functions v1.0 (MySQL) - Spookie98 - 04.06.2012

@TheLazySloth thanks a lot ! We respect both, Slice and Calgo, and you too. Everyone can post his opinnion about our work. About Slice`s post, @Slice, its called Useful Functions because you are not using Queries anymore, so it makes MySql much easy for begginers. Thats the reason for Useful Functions title.

And one more time thanks @TheLazySloth for his pozitive comment. We`ll keep up the good work, I think that I`m going to release my first FS out here..Keep on eye on me too.


Re: Useful Functions v1.0 (MySQL) - Slice - 04.06.2012

Quote:
Originally Posted by TheLazySloth
Посмотреть сообщение
Calgon was pointing out how he could make his script more efficient and then actually showed him how he could improve his code a little bit more so this isn't directed at him completely, but Slice comes along and posts a totally un-necessarily comment.

Didn't realize how cocky high-rollers were on this forum, forgetting the fact that most of the stuff posted in the filterscripts section of this forum is all noob created for noob use.
His choice of name for this release was bad, and someone had to point that out. Being mildly critical isn't nearly the same as being cocky.

Quote:
Originally Posted by TheLazySloth
Посмотреть сообщение
Besides, most here only think they know Pawn because they could script a "really efficient server", when in actuality if it came to it wouldn't be able to do anything else with the language.
Who's that comment aimed at? I'm pretty sure both Calgon and I know how to "do anything else with the language".

Quote:
Originally Posted by TheLazySloth
Посмотреть сообщение
Not to mention years ago, you were in the same exact shoes as this guy, because we all start somewhere.
Yes, and I'm glad of all the mild/moderate criticism I was given. It made me improve.

More off-topic: Who pissed in your cereal this morning?

Back on-topic:

Quote:
Originally Posted by Spookie98
Посмотреть сообщение
About Slice`s post, @Slice, its called Useful Functions because you are not using Queries anymore, so it makes MySql much easy for begginers. Thats the reason for Useful Functions title.
Perhaps "Useful MySQL Functions" would be a better pick.

Also, you should use mysql_real_escape_string on all strings coming from outside the script. Your script currently has some very bad security flaws.


Re: Useful Functions v1.0 (MySQL) - Spookie98 - 04.06.2012

Thanks for the mysql_real_escape_String suggestion, maybe in the next version. And now, be serios,where is the difference bettwen Useful Functions (MySQL) and Useful MySql Functions ? Theres just placement difference. Please think twice before posting.


Re: Useful Functions v1.0 (MySQL) - Slice - 04.06.2012

I assumed that the name of this release is what's big and orange on the first page.