Any ideas regarding a way to create this function/idea?
#1

Hello guys. I have coordinates for some gang zones I created and I am thinking of making gang zones, and saving them using MySQL, with names (Say, the gang zone near the PD = PDGang_Zone). You could get the name using a stock GetNameOfGangZone. And then a player could /take the gangzone for themselves, which would set the 'controlled' field in the mysql table to 1.

That's all easy, but the stock and setting names for the zones and actually getting them is difficult/I have no idea on how to do it. Can you'all please provide some? I thought of using an array, but it would be hard to pin point specific zones out of it.
Reply
#2

make a table in database like
PHP код:
DROP TABLE IF EXISTS `gangzones`;
CREATE TABLE IF NOT EXISTS `gangzones` (
  `
IDint(11NOT NULL,
  `
Descriptionvarchar(20COLLATE utf8_bin NOT NULL DEFAULT '',
  `
Xvarchar(20NOT NULL DEFAULT '0.0000',//its on string, its better to work in string than float, some issues happening when use float in mysql
  
`Yvarchar(20NOT NULL DEFAULT '0.0000',
  `
cXvarchar(20NOT NULL DEFAULT '0.0000',
  `
cYvarchar(20NOT NULL DEFAULT '0.0000',
  `
Ownedvarchar(20NOT NULL DEFAULT '0',
  
UNIQUE KEY `ID` (`ID`)
); 
and after make a public which on gm on load them, and on gm off save it into mysql, also make a function like to save id of gangzone like SaveGangZone(id), rest go on
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)