A few simple questions I guess..
#1

Hello everyone,

I am kinda of new to creating databases and to scripting at all. So I was wondering how could I create a database, which will save all the character information, points, k/d, and such...

Another question of mine, is how to create filterscripts, I mean what shall I code in, and how to mix it with the GM itself so it will take effect.

Thanks in advance to those who answer.
Reply
#2

I'm not very skilled in MySQL databases, sorry, but I can help you with the other two questions-

A filterscript is just a mini script. It is coded the exact same as a gamemode (except you are supposed to add a "#define FILTERSCRIPT" at the top of a filterscript). Some examples of filterscripts are headlight scripts, vehicle customization systems, and weapon drop systems.

A filterscript is just SA-MP pawn code, anotherwords, putting the code from a filterscript into a gamemode will work just as well (though this can cause ownership issues later on). You can have up to 16 filterscripts in your server at a time, they are added by having the .amx file in your "filterscripts" folder and by having the name of the filterscript in the server.cfg next to the word "filterscripts"


Filterscripts are good for new scripters and for developers, however when you become experienced enough it's best not to use very many, as you have little administrative control over them in most cases (besides RCON).
Reply
#3

First, for beginners use Y_INI saving system, it's easy and not complicated
https://sampforum.blast.hk/showthread.php?tid=273088

Second question, you open a "new" pwn file, open pawno, then menu > new
and it'll post codes for you, just fill in the information
and On‌GameModeInIt = OnFilterscriptInIt I guess
On‌GameModeExit = OnFilterscriptExit

and general publics are used normally.
Reply
#4

MySQL isn't complex at all. You can download the plugin of your choice, connect to your mysql host, then run a query-> CREATE TABLE IF NOT EXISTS `UserInfo`(`Username` VARCHAR(24), `Password` VARCHAR(100)); inside the gamemode, or outside.


https://sampforum.blast.hk/showthread.php?tid=305994

The link is outdated, but gives some understanding of what you need and how it's done.
Reply
#5

EDIT: Do not mention that, figured out by myself lol.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)