Code:
stock Jammer_Info(playerid)
{
for(new i = 0; i <= MAX_DYNAMIC_CARS; i++) if(CJData[i][cjinfo])
{
new Float:x, Float:y, Float:z;
x = CJData[i][cjx];
y = CJData[i][cjy];
z = CJData[i][cjz];
new Float:x2, Float:y2, Float:z2;
new houseid = PlayerData[playerid][pHouse];
new bizid = PlayerData[playerid][pBusiness];
new eid = PlayerData[playerid][pEntrance];
x2 = HouseData[houseid][housePos][0];
y2 = HouseData[houseid][housePos][1];
z2 = HouseData[houseid][housePos][2];
if(GetPlayerInterior(playerid) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 60.0, x, y, z))
{
return SendErrorMessage(playerid, "Bu bölgedeki sinyaller kesilmiş!");
}
}
else
{
if(House_Inside(playerid) != -1)
{
if(IsPointInRangeOfPoint(x, y, z, x2, y2, z2, 60.0))
{
return SendErrorMessage(playerid, "Bu bölgedeki sinyaller kesilmiş!");
}
}
x2 = BusinessData[bizid][bizPos][0];
y2 = BusinessData[bizid][bizPos][1];
z2 = BusinessData[bizid][bizPos][2];
if(Business_Inside(playerid) != -1)
{
if(IsPointInRangeOfPoint(x, y, z, x2, y2, z2, 60.0))
{
return SendErrorMessage(playerid, "Bu bölgedeki sinyaller kesilmiş!");
}
}
x2 = EntranceData[eid][entrancePos][0];
y2 = EntranceData[eid][entrancePos][1];
z2 = EntranceData[eid][entrancePos][2];
if(Entrance_Inside(playerid) != -1)
{
if(IsPointInRangeOfPoint(x, y, z, x2, y2, z2, 60.0))
{
return SendErrorMessage(playerid, "Bu bölgedeki sinyaller kesilmiş!");
}
}
}
}
return -1;
}