if(PlayerToPoint(2.5,playerid,1277.9015,-1604.4323,-8.9047),
PlayerToPoint(2.5,playerid,1282.3475,-1603.8329,-8.9047),
PlayerToPoint(2.5,playerid,1246.1376,-1723.2724,-8.9135))
if(PlayerToPoint(2.5,playerid,1277.9015,-1604.4323,-8.9047) || PlayerToPoint(2.5,playerid,1282.3475,-1603.8329,-8.9047))
if(PlayerToPoint(2.5,playerid,1277.9015,-1604.4323,-8.9047)||
PlayerToPoint(2.5,playerid,1282.3475,-1603.8329,-8.9047)||
PlayerToPoint(2.5,playerid,1246.1376,-1723.2724,-8.9135))
Not like you have done it but u can like this using || not comma's.
pawn Код:
|
new Float:Yourname[3][3] = { //Where first 3 is how many coords you have
{1277.9015,-1604.4323,-8.9047},
{1282.3475,-1603.8329,-8.9047},
{1246.1376,-1723.2724,-8.913}
};
for(new i = 0; i <sizeof(Yourname); i++)
{
if(IsPlayerInRangeOfPoint(playerid,2.5,Yourame[i][0],Yourame[i][1],Yourame[i][2]))
{
//Do something here
}
}
enum PTPInfo {Float:Distance, Float:x, Float:y, Float:z}
new PTP[][PTPInfo] = {
{2.5,1277.9015,-1604.4323,-8.9047},
{2.5,1282.3475,-1603.8329,-8.9047},
{2.51246.1376,-1723.2724,-8.9135}
};
//The above could go anywhere in the script, maybe at the top for easy access to add more?
for(new i; i < sizeof(PTP); i++)
{
if(PlayerToPoint(PTP[i][Distance], playerid, PTP[i][x], PTP[i][y], PTP[i][z])
{
//Do you're thing here :)
}
}