SA-MP Forums Archive
Some questions - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Some questions (/showthread.php?tid=343136)



Some questions - MarinacMrcina - 16.05.2012

Hi guys,I'm new to pawno scripting and I don't know whats the best saving system.I have alredy started my script with with dini bit if there is a better way so i could change it before its too late.What about SQLite?Do you need a server for that or it just saves in scriptfiles?What command processor should I use and how should i hash passwords?


Re: Some questions - doreto - 16.05.2012

for command processor i can suggest you to use ZCMD becose it fast and easy to use link

edit:about SQLITE it doesnt need mysql db it save it into scriptfiles


Re: Some questions - MeDaKewlDude - 16.05.2012

i would strongly recommend dudb. it includes almost everything you would need. it even hashes the passwords.
http://dracoblue.net/download/dudb-24/31/

natives:
native udb_Exists(nickname[]);
native udb_Remove(nickname[]);
native udb_UserSetInt(nickname[],key[],value);
native udb_UserSetFloat(nickname[],key[],Float:value);
native udb_UserSet(nickname[],key[],value[]);
native udb_User(nickname[],key[]);
native udb_UserFloat(nickname[],key[]);
native udb_UserInt(nickname[],key[]);
native udb_CheckLogin(nickname[],pwd[]);
native udb_Create(nickname[],pwd[]);
native udb_hash(buf[]);
native udb_encode(nickname[]);
native udb_decode(nickname[]);

as for the command prosseser, i prefer dcmd, but you might want to try zcmd because dcmd is a bit more code to script


Re: Some questions - MarinacMrcina - 16.05.2012

Are databases faster or easy than dini?
Is dini easy than yini?


AW: Some questions - EthanR - 16.05.2012

Dini or Dudb are cool if you want easy scripting and don't care about the speed of your script (later on once your script reaches ~50k lines that is).

Dini/Dudb have the disadvantage that they close/open files and loop through them with their seperate Dini_Set and udb_UserSet which is way slower than if you properly use pure fwrite. (which those tools also use, but in a less effective way)


EDIT: Look at the dini include file and see what "Dini_Set" does. Instead of opening the file repeatively 10 times you could just fopen(FileName, io_read); it once and then fwrite the values into it.


Re: Some questions - MarinacMrcina - 07.06.2012

Is SQLite easier to code and script when you learn it than using yini?


Re: Some questions - Littlehelper - 07.06.2012

Quote:
Originally Posted by MarinacMrcina
View Post
Hi guys,I'm new to pawno scripting and I don't know whats the best saving system.I have alredy started my script with with dini bit if there is a better way so i could change it before its too late.What about SQLite?Do you need a server for that or it just saves in scriptfiles?What command processor should I use and how should i hash passwords?
Hello,
The best saving system is MySQL, IMO.
dini is just wayyy too slower then other saving systems. YCMD is the fastest command processor at the moment and i recommend you to use it.
Also use Whirlpool to hash passwords.


Re: Some questions - MarinacMrcina - 08.06.2012

Yeah but i don't have a website to save it(php admin) so i would use sqlite,is it easier with SQLite to make saving systems,house system,car systems than with dini?