17.01.2012, 13:15
(
Последний раз редактировалось Justify16; 17.01.2012 в 13:16.
Причина: Esqueci da tag
)
PHP код:
#define MAX_TURFS 10
enum zInfo
{
zName[24],
Float:zMinX,
Float:zMinY,
Float:zMaxX,
Float:zMaxY
};
new TurfsCoords[MAX_TURFS][zInfo] = {
{"Morro", 2117.333, -1069.962, 2261.841, -959.4252},
{"Skate", 1861.9410,-1450.6462,1976.5867,-1351.4069},
{"Clube", 786.6261, -1247.0078, 674.3234, -1309.2305},
{"Shop", 1061.1545,-1566.9081,1190.9424,-1411.1282},
{"Aero", 1395.7454,-2368.6396,1566.4358,-2204.4346},
{"Farol", 133.1268, -1968.3923, 178.0602, -1880.1589},
{"Bangu", -200.0000,1650.0000,450.0000,2550.0000},
{"Usina", -907.0000,1365.0000,-480.0000,2148.0000},
{"Fabrica", -447.7593,-1535.479,-316.0,-1334.634},
{"Pier", 318.0144, -2120.061, 437.1136, -1993.733}
};
new AllowedOrgs[MAX_TURFS][] = {
{1, 5, 6, 10, 11, 12, 13, 15, 18, 19, 20, 24},
{1, 5, 6, 10, 11, 12, 13, 15, 18, 19, 20, 24},
{1, 5, 6, 10, 11, 12, 13, 15, 18, 19, 20, 24},
{1, 5, 6, 10, 11, 12, 13, 15, 18, 19, 20, 24},
{1, 5, 6, 10, 11, 12, 13, 15, 18, 19, 20, 24},
{1, 5, 6, 10, 11, 12, 13, 15, 18, 19, 20, 24},
{3, 22},
{3, 22},
{2,16,17},
{1, 5, 6, 10, 11, 12, 13, 15, 18, 19, 20, 24}
};
O detalhe й que o Pier jб estava no gm sу que estava como comentбrio
// {"Pier", 318.0144, -2120.061, 437.1136, -1993.733}
Daн eu tirei as barras e funcinou...Nada de errado com minhas coordenadas, tem? :S
Pq nгo vi mais NADINHA no cуdigo... sу isso, mas jб fiz tb:
PHP код:
stock IsPlayerInClube(playerid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if(x >= 786.6261 && y >= -1247.0078 && x <= 674.3234 && y <= -1309.2305) return 1;
else return 0;
}
stock IsPlayerInShop(playerid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if(x >= 1061.1545 && y >= -1566.9081 && x <= 1190.9424 && y <= -1411.1282) return 1;
else return 0;
}
PHP код:
new lol = 0;
new sd;
if(zoneid <= 6 || zoneid == 10)
sd = 12;
else if(zoneid == 7 || zoneid == 8)
sd = 2;
else if(zoneid == 9)
sd = 3;
for(new i = 0; i < sd; i ++)
{
if(AllowedOrgs[zoneid][i] == attack_gang)
lol = 1;
}
if(lol == 0)
{