View Single Post
Author Message
bally
Senior Member
Join Date: Aug 2015
Old 12-20-2015 , 19:41   Need a good array for this...
Reply With Quote #1

Code:
"Locations"
{
	"Arena"
  	{
       		"ammo" 		"1"
       		"ctlocx" 	"535"
        	"ctlocy"	 "5290"
        	"ctlocz" 	"1924"
        	"tlocx" 	"4467"
        	"tlocy" 	"45361"
        	"tlocz" 	"375"
    	}
	"TradeRooms"
  	{
       		"ammo" 		"0"
       		"ctlocx" 	"535"
        	"ctlocy"	 "5290"
        	"ctlocz" 	"1924"
        	"tlocx" 	"4467"
        	"tlocy" 	"45361"
        	"tlocz" 	"375"
    	}
	"Surf"
  	{
       		"ammo" 		"0"
       		"ctlocx" 	"535"
        	"ctlocy"	 "5290"
        	"ctlocz" 	"1924"
        	"tlocx" 	"4467"
        	"tlocy" 	"45361"
        	"tlocz" 	"375"
    	}
	"Bhop"
  	{
       		"ammo" 		"0"
       		"ctlocx" 	"535"
        	"ctlocy"	 "5290"
        	"ctlocz" 	"1924"
        	"tlocx" 	"4467"
        	"tlocy" 	"45361"
        	"tlocz" 	"375"
    	}
}
Q.1 - I have this KeyValue Config which I'll need to use it later in my plugin. I need to store every section data in an adt_array in such form as it can be used later given the section name... How can I do it? I was thinking something like:
PHP Code:
tpos_adtArray CreateArray(32)(3)(1); 
However, I'm not sure.

(32) = section Name
(3) = pos
(1) = 1/0

Q.2 - After creating the multi-dimensional array what would be the best form to either add/use data from it?

Q.3 - Should I keep the keyvalues Handle opened, so I don't need to over-stress server?

Thank you very much for reading my questions. Have a great time.
__________________
Perhaps my lack of faith was my undoing,
bally is offline