[HowTo] Using dudb 2.4 to save money/stats/whatever (0.2#Ready)
#61

Ok man do this:

1) Re~download the Sa-mp server package onto your desktop
2) In here (your new server package folder) goto \pawno\include
3) Download the latest Dudb/Dutils/Dini" include files from DracoBlue
4) Place all three .inc files in your new folder \pawno\include
5) Go to your old "Criminal Town\Pawno" folder and copy your gamemode
6) Paste your gamemode into your new Pawno folder (in your new server package folder)
7) Load it up (right click open with Pawn)
8 ) Change the lines at the top to this:

pawn Код:
#include <a_samp>
#include <DUDB>
9) Hit F5

Now come back and tell us what errors you have, but only come back and post AFTER you have done the above and do not skip or change anything just do exactly what has been suggested (follow the steps 1 - 9).

Donny

PS. the error messages, the lines of code in them are fine btw. It's your setup.....
Reply
#62

Now:
Код:
C:\DOCUME~1\Neo_plus\0016~1\server\GAMEMO~1\src\lvdm.pwn(41) : warning 202: number of arguments does not match definition
C:\DOCUME~1\Neo_plus\0016~1\server\GAMEMO~1\src\lvdm.pwn(41) : warning 202: number of arguments does not match definition
C:\DOCUME~1\Neo_plus\0016~1\server\GAMEMO~1\src\lvdm.pwn(61) : error 017: undefined symbol "dUserINT"
C:\DOCUME~1\Neo_plus\0016~1\server\GAMEMO~1\src\lvdm.pwn(61) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Neo_plus\0016~1\server\GAMEMO~1\src\lvdm.pwn(61) : error 033: array must be indexed (variable "-unknown-")
C:\DOCUME~1\Neo_plus\0016~1\server\GAMEMO~1\src\lvdm.pwn(61) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.0.3367			Copyright © 1997-2005, ITB CompuPhase


4 Errors.
But the line 41:
Код:
  if (udb_Create(PlayerName(playerid),params)) return SystemMsg(playerid,"Account successfully created. Login with '/login password' now.");
And line 61 is:
Код:
   GivePlayerMoney(playerid,dUserINT(PlayerName(playerid)).("money")-GetPlayerMoney(playerid));
Reply
#63

thx^^
Reply
#64

Well no errors in the compiler when i run the script, but the client crashes when i use /register OR it says "You may not register on this server"
Reply
#65

Quote:
Originally Posted by Webghost
Well no errors in the compiler when i run the script, but the client crashes when i use /register OR it says "You may not register on this server"
This might be because you don't have a Scriptfiles folder in your sa-mp folder.

@WSAD_RealNapster, Read through every page on this topic and you might be able to get rid of your errors. If you still have errors after that, then paste your script onto http://pastebin.ca/ and then paste the link you get on here so that we can look at your script and try to help.
Reply
#66

I want to save the money, position and bank...

money and position operates..

but how i can save the bank

please help
Reply
#67

In which vars are the bankcontents saved in your scrip?
Reply
#68

can someone can give me compiled file and pwn file with this /register and /login script?

when i did everything and tried to say /register pass then i've got back massage: "Server Unknow command"
Reply
#69

Nobody is going to give you a script like that as its very hard to create a /register and
/login command.It takes months to make it.
Reply
#70

Really?, it only took me about an hour to make a register command using draco's tutorial!
Reply
#71



WTF is wrong
Reply
#72



Here is
Reply
#73

Add a " ; " to the lines 1077 and 1078.
Reply
#74

im glad that u included the link to the save pos one, i couldnt find it and my own atempt was kinda off...it sorta spawned the player then droped them through the floor...
Reply
#75

Quote:
Originally Posted by fandos
can someone can give me compiled file and pwn file with this /register and /login script?

when i did everything and tried to say /register pass then i've got back massage: "Server Unknow command"
http://forum.sa-mp.com/index.php?topic=4799

and its posted in first post.
Reply
#76

Cool script! Nice work
PS RUSSIA Cool
Reply
#77

I have a question.

I know that for the money, stats and whatever we use the

dUserINT(PlayerName(playerid)).("mitra");

command, but what about for saving x y and z or whatever with the commas?

'cs i tryed saving coordinates with dUserINT command, but it writes strange numbers.
Reply
#78

did you tried to write dUserFLOAT ?

I didn't implemented it by default, but it should be easy to copy and paste the dUserINT definition and make a dUserFLOAT from it.

If you can't create this on your own, I'll give you an example.

Kind regards,
Jan (DracoBlue)
Reply
#79

yes. thanks.

gimme an example.

Maybe you think editing the .inc file?
Reply
#80

Yes. Since this isn't a default function, you need to add it to the dudb.inc .

I'll look if I can give you an example this evening when I am back at home.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)