SA-MP Forums Archive
Shorter Dini functions help - 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: Shorter Dini functions help (/showthread.php?tid=569735)



Shorter Dini functions help - aCloudy - 02.04.2015

Hello, Can someone tell me how to change this:

Code:
dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
TO
Code:
  		dini_IntSet(file, "Score",pScore);



Re: Shorter Dini functions help - SickAttack - 02.04.2015

It's practically the exact same thing.

But you could do something like this (referring to your code up there) - which I think is just useless:
pawn Code:
#define SCORE(%0) PlayerInfo[%0][pScore]

dini_IntSet(file, "Score", SCORE(playerid));



Re: Shorter Dini functions help - Crayder - 02.04.2015

Why would you want that? A single variable would cause a clash between all players. Also, why are you using dini? It's extremely outdated.


Re: Shorter Dini functions help - aCloudy - 02.04.2015

Quote:
Originally Posted by Crayder
View Post
Why would you want that? A single variable would cause a clash between all players. Also, why are you using dini? It's extremely outdated.
Everyone told me this, And i feel stupid when i read it, But, I cannot find Dudb thread to know how to make register/login system, All of them are dini..

Give me a link please.


Re: Shorter Dini functions help - Crayder - 02.04.2015

Quote:
Originally Posted by aCloudy
View Post
Everyone told me this, And i feel stupid when i read it, But, I cannot find Dudb thread to know how to make register/login system, All of them are dini..

Give me a link please.
Why do you insist on using Dudb? Why not just look at a YINI login/register tutorial on the tutorials section? Just do a search, "YINI login register".