21.04.2011, 17:43
pawn Код:
new Float:CordGZs[GZS_CRIADAS][4] [4] = {
{1356.766, -2396.403, 1596.345, -2195.068}, // Aero
{1493.668, -1160.76, 1847.332, -912.0523}, // Estacionamento
{337.6059, -1839.771, 520.142, -1666.071}, // Bar
{1828.318, -1287.088, 2094.516, -1113.3871} // Parque
};
pawn Код:
for (new i = 0; i <GZS_CRIADAS; i++) // Loop
{
GangZoneShowForPlayer(playerid, GZCriadas[i], 0xFFFFFFFF);
printf("Gang Zone %s criada com sucesso!",NomesGZs[i]);
}
return 1;
}
pawn Код:
if(!strcmp(cmdtext, "/dominar", true))
{
if(!IsAreaInGangCheck(playerid)) SendClientMessage(playerid, COLOR_RED, "Vocк nгo estб em nenhuma Gang Zone!");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new name[MAX_PLAYER_NAME], string[44];
GetPlayerName(playerid, name, sizeof(name));
for (new i=0; i < GZS_CRIADAS; i++)
{
if (x > CordGZs[i][0] && y > CordGZs[i][1] && x < CordGZs[i][2] && y < CordGZs[i][3]&& z < 500)
{
format(string, sizeof(string), "Informaзгo: %s comeзou a dominar a Gang Zone %s!",name,NomesGZs[i]);
}
SendClientMessageToAll(0xFFFF00AA, string);
GangZoneFlashForAll(GZCriadas[i], GetPlayerColor(playerid))
SetTimer("Terminar",60000,false);
}
return 1;
}