19.03.2017, 01:13
Se alguйm puder me ajudar <3
Quando digitar /do, gostaria que o sistema interpretasse o 'tr' assim:
new GZGanton[2];
GZGanton[1] = GangZoneCreate(2222.50,-1852.80,2632.80,-1722.30);
GZGanton[2] = GangZoneCreate(2222.50,-1722.30,2632.80,-1628.50);
Ao invйs de carregar o arquivo da pasta Territуrios
Comando para dominar um TR: http://pastebin.com/uB5zGYw1
Quando digitar /do, gostaria que o sistema interpretasse o 'tr' assim:
new GZGanton[2];
GZGanton[1] = GangZoneCreate(2222.50,-1852.80,2632.80,-1722.30);
GZGanton[2] = GangZoneCreate(2222.50,-1722.30,2632.80,-1628.50);
Ao invйs de carregar o arquivo da pasta Territуrios
Код:
stock CreateTr(Float:minx, Float:miny, Float:maxx, Float:maxy, trname[]) { new string[128]; for(new tr; tr != MAX_TERRITORIOS; tr++) { if(!trLS[tr][trCreated]) { format(string, sizeof string, "Territorios/TR_%d.ini", tr); if(!DOF2_FileExists(string)) { trLS[tr][trminX] = minx; trLS[tr][trminY] = miny; trLS[tr][trmaxX] = maxx; trLS[tr][trmaxY] = maxy; format(trLS[tr][trName], 128, trname); trLS[tr][trDono] = 0; trLS[tr][trColor] = 0xAAAAAAAA; trLS[tr][trCreated] = true; trLS[tr][trGZ] = GangZoneCreate(trLS[tr][trminX], trLS[tr][trminY], trLS[tr][trmaxX], trLS[tr][trmaxY]); trLS[tr][trArea] = CreateDynamicRectangle(trLS[tr][trminX], trLS[tr][trminY], trLS[tr][trmaxX], trLS[tr][trmaxY]); GangZoneShowForAll(trLS[tr][trGZ], trLS[tr][trColor]); DOF2_CreateFile(string); TrSave(tr); return 1; } } } return 1; } stock DestroyTr(trid) { new string[128]; if(trLS[trid][trCreated]) { format(string, sizeof string, "Territorios/TR_%d.ini", trid); if(DOF2_FileExists(string)) { trLS[trid][trCreated] = false; GangZoneDestroy(trLS[trid][trGZ]); DestroyDynamicArea(trLS[trid][trArea]); DOF2_RemoveFile(string); } } return 1; }