03.12.2011, 21:27
Since 0.3d is out for full with the ability to remove default GTA: SA objects, I'm requesting an application that optimizes RemoveBuildingForPlayer code (for example code generated from JernejL's map editor).
What I mean by this is: You enter the code you would like to optimize and the program does some mathematical calculation that can replace 50 RemoveBuildingForPlayer lines with 1 line (centered X, Y, Z position based on all the objects with a set range that deletes all the 50 objects - but not anything outside it (or similar, doesn't have to be so strict on the part after the -).
For example:
would turn into
Thank you,
MrObviousPotato.
What I mean by this is: You enter the code you would like to optimize and the program does some mathematical calculation that can replace 50 RemoveBuildingForPlayer lines with 1 line (centered X, Y, Z position based on all the objects with a set range that deletes all the 50 objects - but not anything outside it (or similar, doesn't have to be so strict on the part after the -).
For example:
pawn Код:
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 1.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 2.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 3.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 4.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 5.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 6.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 7.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 8.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 9.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 10.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 11, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 12.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 13.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 14.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 15.0, 0.25);
//
RemoveBuildingForPlayer(playerid, 1337, 0.0, 1.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 2.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 3.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 4.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 5.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 6.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 7.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 8.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 9.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 10.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 11.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 12.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 13.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 14.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 0.0, 15.0, 0.0, 0.25);
//
RemoveBuildingForPlayer(playerid, 1337, 1.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 2.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 3.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 4.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 5.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 6.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 7.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 8.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 9.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 10.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 11.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 12.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 13.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 14.0, 0.0, 0.0, 0.25);
RemoveBuildingForPlayer(playerid, 1337, 15.0, 0.0, 0.0, 0.25);
pawn Код:
RemoveBuildingForPlayer(playerid, 1337, 0.0, 0.0, 0.0, 15.0); // This would have the same effect as the code above seeing as all the lines above are in a 15.0 radius from co-ordinates 0.0, 0.0, 0.0
MrObviousPotato.