25.03.2010, 01:10
This is a continuation from the function I posted earlier, which was IsPlayerInAmmunation.
pawn Код:
stock IsPlayerInClothesStore(playerid) {
new Float: Clothes_Stores[][3] = {
{ 207.737991,-109.019996,1005.132812 },
{ 204.332992,-166.694992,1000.523437 },
{ 207.054992,-138.804992,1003.507812 },
{ 203.777999,-48.492397,1001.804687 },
{ 226.293991,-7.431529,1002.210937 },
{ 161.391006,-93.159156,1001.804687 }
}
for(new cs = 0; cs < sizeof(Clothes_Stores); cs++) {
if(IsPlayerInRangeOfPoint(playerid, 70.0, Clothes_Stores[cs][0], Clothes_Stores[cs][1], Clothes_Stores[cs][2])) return 1;
}
return 0;
}
pawn Код:
stock IsPlayerInGym(playerid) {
new Float: Gyms[][3] = {
{ 772.111999,-3.898649,1000.728820 },
{ 774.213989,-48.924297,1000.585937 },
{ 773.579956,-77.096694,1000.655029 }
}
for(new gy = 0; gy < sizeof(Gyms); gy ++) {
if(IsPlayerInRangeOfPoint(playerid, 70.0, Gyms[gy][0], Gyms[gy][1], Gyms[gy][2])) return 1;
}
return 0;
}
pawn Код:
stock IsPlayerInAShop(playerid) { // 24-7
new Float: Shops[][3] = {
{ -25.884498,-185.868988,1003.546875 },
{ 6.091179,-29.271898,1003.549438 },
{ -30.946699,-89.609596,1003.546875 },
{ -25.132598,-139.066986,1003.546875 },
{ -27.312299,-29.277599,1003.557250 },
{ -26.691598,-55.714897,1003.546875 }
}
for(new s = 0; s < sizeof(Shops); s++ ) {
if(IsPlayerInRangeOfPoint(playerid, 70.0, Shops[0], Shops[1], Shops[2])) return 1;
}
return 0;
}