Raised This Month: $32 Target: $400
 8% 

Showing results 1 to 7 of 7
Search took 0.00 seconds.
Search: Posts Made By: Black Rose
Forum: Code Snippets/Tutorials 09-24-2016, 13:44
Replies: 132
Sticky: nVault Tutorial
Views: 162,647
Posted By Black Rose
Re: nVault Tutorial

You would need 11 bytes for STEAM_0:X:X.
But pawn needs 11 cells, which is 4 bytes each, so 44 bytes.
Now that is bare minimum and only applies to 10 persons in the world (of which I'm guessing...
Forum: Code Snippets/Tutorials 09-24-2016, 11:52
Replies: 132
Sticky: nVault Tutorial
Views: 162,647
Posted By Black Rose
Re: nVault Tutorial

Not necessarily. It depends on each situation I guess but as long as you don't need the string again you're better off storing it as an int.
In this nVault situation it's better with the string.
Forum: Code Snippets/Tutorials 09-24-2016, 11:39
Replies: 132
Sticky: nVault Tutorial
Views: 162,647
Posted By Black Rose
Re: nVault Tutorial

create table if not exists inventory (SteamID int);
insert into inventory(SteamID) values(-2127214489);

Yes it's a string in the query but it is then stored as an integer inside the database...
Forum: Code Snippets/Tutorials 09-24-2016, 05:59
Replies: 132
Sticky: nVault Tutorial
Views: 162,647
Posted By Black Rose
Re: nVault Tutorial

You're right. I was wrong.

It was my intention to do it that way. i just didn't test it properly.
I do understand that converting it back is no use and in that case it's much better storing the...
Forum: Code Snippets/Tutorials 09-22-2016, 10:48
Replies: 132
Sticky: nVault Tutorial
Views: 162,647
Posted By Black Rose
Re: nVault Tutorial

EDIT: This is wrong as pointed out by Bugsy: That's the whole point. Compressing that long string into 1 cell which can be stored in exactly the same way. You don't have to convert it when saving or...
Forum: Code Snippets/Tutorials 09-21-2016, 15:28
Replies: 132
Sticky: nVault Tutorial
Views: 162,647
Posted By Black Rose
Re: nVault Tutorial

Yeah. Ignore the fact that I've been coding for AMXX for 11 years.

My example only calls get_user_authid() once on authorized.
EDIT: This is wrong as pointed out by Bugsy: Then it stores the...
Forum: Code Snippets/Tutorials 09-21-2016, 12:18
Replies: 132
Sticky: nVault Tutorial
Views: 162,647
Posted By Black Rose
Re: nVault Tutorial

What about it?

Arrays using player id as index should have the size of 33 for ease of use and avoid conflicts when using non-dedicated.

new iPlayerPoints = nvault_get( gNv, szAuthId[id][0] )...
Showing results 1 to 7 of 7

 
Forum Jump

All times are GMT -4. The time now is 04:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode