18.02.2012, 00:00
Now i have this
And i do this
And now i don't have any errors, or Warnings, but it isn't working, i pass by the areas and nothing happend.
pawn Код:
forward IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY);
public IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
if(IsPlayerInArea(playerid, 2220, 2607, -1970, -1571)) //Grove
{
GameTextForPlayer(playerid,"Grove Street Territory",1000,1);
GangZoneShowForPlayer(playerid, GroveStreetZone, 0x00FF0081);
}
else
{
GangZoneHideForPlayer(playerid, GroveStreetZone);
}
if(IsPlayerInArea(playerid, 1832, 2166, -1748, -1141)) //Aztecas
{
GameTextForPlayer(playerid,"Aztecas Territory",1000,1);
GangZoneShowForPlayer(playerid, AztecasZone,0x00FFFF96);
}
else
{
GangZoneHideForPlayer(playerid, AztecasZone);
}
if(IsPlayerInArea(playerid, 2121, 2607, -1970, -1571)) //Ballas1
{
GameTextForPlayer(playerid,"Ballas Territory",1000,1);
GangZoneShowForPlayer(playerid, BallasZone1, 0x8080FF96);
}
else
{
GangZoneHideForPlayer(playerid, BallasZone1);
}
if(IsPlayerInArea(playerid, 2121, 2585, -1523, -1200)) //Ballas2
{
GameTextForPlayer(playerid,"Ballas Territory",1000,1);
GangZoneShowForPlayer(playerid, BallasZone2, 0x8080FF96);
}
else
{
GangZoneHideForPlayer(playerid, BallasZone2);
}
if(IsPlayerInArea(playerid, 2630, 2893, -2234, -1050)) //Vagos1
{
GameTextForPlayer(playerid,"Vagos Territory",1000,1);
GangZoneShowForPlayer(playerid, VagosZone1, 0xFFFF0096);
}
else
{
GangZoneHideForPlayer(playerid, VagosZone1);
}
if(IsPlayerInArea(playerid, 1969, 2790, -1121, -979)) //Vagos2
{
GameTextForPlayer(playerid,"Vagos Territory",1000,1);
GangZoneShowForPlayer(playerid, VagosZone2, 0xFFFF0096);
}
else
{
GangZoneHideForPlayer(playerid, VagosZone2);
}
return 0;
}
pawn Код:
/*stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}
*/

