[Include] samp-account
#10

This has been updated to escape values retrieved via pointer by SaveAccountData. Note that the plain text from RegisterPlayer and LoginPlayer are left alone. This is as these values are hashed via Whirlpool prior to be executed.

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
pawn Код:
enum PlayerData {
    pAdmin,
    pHide,
    pKills,
    pDeaths
}

new pInfo[MAX_PLAYERS][PlayerData];
If i were to guess i would say that wont work, but these is why im asking (so that i know for sure and not just guess).

While these should:
pawn Код:
new pInfo[PlayerData][MAX_PLAYERS];
Right?
I haven't really tested this with enums. Most modes written now days are done so in modules which removes the need for monstrous "player enums". My guess would be the second version should work.

Quote:
Originally Posted by Gammix
Посмотреть сообщение
I really like the idea and i'd love to see some benchmarks, i know it's going to be slower than direct SQL queries but i want to see how much slower.

And if it performs out pretty well, you could implement a MySQL version of this and even take this further and create something like my EasyDB tried to achieve, but this would be way better approach!
Thanks! I highly doubt there would be a mentionable difference in speed unless pointers.inc introduces something. If you take a look at the implementation of LoadAccountData and SaveAccountData, they are both essentially just query calls. They just build the query dynamically. Wouldn't hurt to run some tests though.
Reply


Messages In This Thread
samp-account - by nG Inverse - 04.10.2018, 20:32
Re: samp-account - by Calisthenics - 04.10.2018, 21:27
Re: samp-account - by nG Inverse - 04.10.2018, 23:11
Re: samp-account - by DTV - 04.10.2018, 23:39
Re: samp-account - by Variable™ - 05.10.2018, 00:54
Re: samp-account - by DRIFT_HUNTER - 05.10.2018, 23:35
Re: samp-account - by J0sh... - 05.10.2018, 23:51
Re: samp-account - by Dayrion - 06.10.2018, 19:55
Re: samp-account - by Gammix - 06.10.2018, 20:26
Re: samp-account - by nG Inverse - 07.10.2018, 03:23
Re: samp-account - by Sasino97 - 07.10.2018, 18:43
Re: samp-account - by corne - 24.10.2018, 06:44
Re: samp-account - by nG Inverse - 31.10.2018, 05:57
Re: samp-account - by corne - 31.10.2018, 06:55
Re: samp-account - by nG Inverse - 10.11.2018, 09:08

Forum Jump:


Users browsing this thread: 1 Guest(s)