nvault double dimonsional array
how should i save an double-dimensional array ?
like i have skinCT[33][33] PHP Code:
|
Re: nvault double dimonsional array
It will be alot easier to explain what's that thing you're trying to achieve!
|
Re: nvault double dimonsional array
i m trying to create a shop menu where you can buy csgo agents. i want to do 2 things:
https://imgur.com/a/92F9j9Z in this menu, when i already have that skin, show me ON/OFF when i don't have that skin show me [PRICE: 2000$] or something like this. also, i want to save that things. so i was trying this skinCT[0][id] (first skin from counter-terrorists list) = 0 means you didn t bought it skinCT[0][id] = 1 you have bought that skin skinCT[0][id] = 2 you selected that skin when i select another skin (skinCT[1][id] -> second one) the new value of skinCT[0][id] will become 1 I don't know if it's correct, I thought while writing and I don't even know how to use double-dimensional array |
Re: nvault double dimonsional array
why don't you work with bits :) it will be much easier.
here's an example Code:
Edit: Altho you will be limited for 32 skins which i think it will be more than enough |
Re: nvault double dimonsional array
can i do this
PHP Code:
|
Re: nvault double dimonsional array
how's this related to your first issue i don't get it?
|
Re: nvault double dimonsional array
i made this topic for dd array, i can t do what u told me i have to use dd array.
|
Re: nvault double dimonsional array
Quote:
I've simply shown you how to deal with bits way . The proper solution would be using the bits since it's more easy and less complicated. |
Re: nvault double dimonsional array
I misunderstood the problem.
It looks like the first column of the skinCT variable represent the index of the models and second one the index of the players, and you want to save the values of the first column by player authid. If that's the case, the code you provided already does the job, otherwise you need to be more specific. As for the menu, something like this Code:
#include <amxmodx> |
Re: nvault double dimonsional array
i will try later, thanks!
|
| All times are GMT -4. The time now is 14:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.