stock IsAtATM(playerid) { if(IsPlayerConnected(playerid)) { if(IsPlayerInRangeOfPoint(playerid,3.0,2065.439453125, -1897.5510253906, 13.19670009613) || IsPlayerInRangeOfPoint(playerid,3.0,1497.7467041016, -1749.8747558594, 15.088212013245) || IsPlayerInRangeOfPoint(playerid,3.0,2093.5124511719, -1359.5474853516, 23.62727355957) || IsPlayerInRangeOfPoint(playerid,3.0,1155.6235351563, -1464.9141845703, 15.44321346283)) {//ATMS return 1; } else if(IsPlayerInRangeOfPoint(playerid,3.0,2139.4487304688, -1164.0811767578, 23.63508605957) || IsPlayerInRangeOfPoint(playerid,3.0,1482.7761230469, -1010.3353881836, 26.48664855957) || IsPlayerInRangeOfPoint(playerid,3.0,1482.7761230469, -1010.3353881836, 26.48664855957) || IsPlayerInRangeOfPoint(playerid,3.0,387.16552734375, -1816.0512695313, 7.4834146499634)) {//ATMS return 1; } else if(IsPlayerInRangeOfPoint(playerid,3.0,-24.385023117065, -92.001075744629, 1003.1897583008) || IsPlayerInRangeOfPoint(playerid,3.0,-31.811220169067, -58.106018066406, 1003.1897583008) || IsPlayerInRangeOfPoint(playerid,3.0,1212.7785644531, 2.451762676239, 1000.5647583008) || IsPlayerInRangeOfPoint(playerid,3.0,2324.4028320313, -1644.9445800781, 14.469946861267)) {//ATMS return 1; } else if(IsPlayerInRangeOfPoint(playerid,3.0,2228.39, -1707.78, 13.25) || IsPlayerInRangeOfPoint(playerid,3.0,651.19305419922, -520.48815917969, 15.978837013245) || IsPlayerInRangeOfPoint(playerid, 3.0, 45.78035736084, -291.80926513672, 1.5024013519287) || IsPlayerInRangeOfPoint(playerid,3.0,1275.7958984375, 368.31481933594, 19.19758605957) || IsPlayerInRangeOfPoint(playerid,3.0,2303.4577636719, -13.539554595947, 26.12727355957))/*End of Red County Random ATM's*/ {//ATMS return 1; } else if(IsPlayerInRangeOfPoint(playerid,3.0,294.80, -84.01, 1001.0) || /*Start of Red County Random ATM's*/IsPlayerInRangeOfPoint(playerid,3.0,691.08215332031, -618.5625, 15.978837013245) || IsPlayerInRangeOfPoint(playerid,3.0,173.23471069336, -155.07606506348, 1.2210245132446) || IsPlayerInRangeOfPoint(playerid,3.0,1260.8796386719, 209.30152893066, 19.19758605957) || IsPlayerInRangeOfPoint(playerid,3.0,2316.1015625, -88.522567749023, 26.12727355957))/*End of Red County Random ATM's*/ {//ATMS return 1; } else if(IsPlayerInRangeOfPoint(playerid,3.0,1311.0361,-1446.2249,0.2216)) {//ATMS return 1; } else if(IsPlayerInRangeOfPoint(playerid,3.0,2052.9246, -1660.6346, 13.1300) || IsPlayerInRangeOfPoint(playerid,3.0,-1980.6300,121.5300,27.3100)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid,3.0,-2453.7600,754.8200,34.8000) || IsPlayerInRangeOfPoint(playerid,3.0,-2678.6201,-283.3400,6.8000)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid,5.0,519.8157,-2890.8601,4.4609)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid,5.0,2565.667480, 1406.839355, 7699.584472) || IsPlayerInRangeOfPoint(playerid, 5.0, 3265.30004883, -631.90002441, 8423.90039062) || IsPlayerInRangeOfPoint(playerid, 5.0, 1829.5000, 1391.0000, 1464.0000) || IsPlayerInRangeOfPoint(playerid, 5.0, 1755.8000, 1434.1000, 2013.4000)) {// VIP Lounge ATM || Package Club Interior return 1; } else if(IsPlayerInRangeOfPoint(playerid,5.0,-665.975341, -4033.334716, 20.779014) || IsPlayerInRangeOfPoint(playerid,5.0,-1619.9645996094,713.67535400391, 19995.501953125)) {// Random Island ATM return 1; } // Famed Lounge else if(IsPlayerInRangeOfPoint(playerid, 3.0, 883.7170, 1442.4282, -82.3370)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2926.9199, -1529.9800, 10.6900)) return 1; //NGG Shop } return 0; }
IsPlayerInRangeOfPoint(playerid,3.0,2065.439453125, -1897.5510253906, 13.19670009613) // Take X,Y,Z coordinate from this code
Create3DTextLabel("ATM", -1, 2065.439453125, -1897.5510253906, 13.19670009613 + 1.0, 5.0, 0);
You can take the coordinates from your IsPlayerInRangeOfPoint x,y,z parameter.
Example: Код:
IsPlayerInRangeOfPoint(playerid,3.0,2065.439453125, -1897.5510253906, 13.19670009613) // Take X,Y,Z coordinate from this code Код:
Create3DTextLabel("ATM", -1, 2065.439453125, -1897.5510253906, 13.19670009613 + 1.0, 5.0, 0); |
//under the includes
new Float:ATMPos[][] =
{
{2065.439453125, -1897.5510253906, 13.19670009613},
{1497.7467041016, -1749.8747558594, 15.088212013245},
{2093.5124511719, -1359.5474853516, 23.62727355957},
{1155.6235351563, -1464.9141845703, 15.44321346283},
{2139.4487304688, -1164.0811767578, 23.63508605957},
{1482.7761230469, -1010.3353881836, 26.48664855957},
{1482.7761230469, -1010.3353881836, 26.48664855957},
{387.16552734375, -1816.0512695313, 7.4834146499634},
{-24.385023117065, -92.001075744629, 1003.1897583008},
{-31.811220169067, -58.106018066406, 1003.1897583008},
{1212.7785644531, 2.451762676239, 1000.5647583008},
{2324.4028320313, -1644.9445800781, 14.469946861267},
{2228.39, -1707.78, 13.25},
{651.19305419922, -520.48815917969, 15.978837013245},
{45.78035736084, -291.80926513672, 1.5024013519287},
{1275.7958984375, 368.31481933594, 19.19758605957},
{2303.4577636719, -13.539554595947, 26.12727355957},
{294.80, -84.01, 1001.0},
{691.08215332031, -618.5625, 15.978837013245},
{173.23471069336, -155.07606506348, 1.2210245132446},
{1260.8796386719, 209.30152893066, 19.19758605957},
{2316.1015625, -88.522567749023, 26.12727355957},
{1311.0361,-1446.2249,0.2216},
{2052.9246, -1660.6346, 13.1300},
{-1980.6300,121.5300,27.3100},
{-2453.7600,754.8200,34.8000},
{-2678.6201,-283.3400,6.8000},
{519.8157,-2890.8601,4.4609},
{2565.667480, 1406.839355, 7699.584472},
{3265.30004883, -631.90002441, 8423.90039062},
{1829.5000, 1391.0000, 1464.0000},
{1755.8000, 1434.1000, 2013.4000},
{-665.975341, -4033.334716, 20.779014},
{-1619.9645996094,713.67535400391, 19995.501953125},
{883.7170, 1442.4282, -82.3370},
{2926.9199, -1529.9800, 10.6900}
};
//e.g. in OnGameModeInit:
for(new i,j=sizeof(ATMPos);i<j;i++)
{
Create3DTextLabel("Here is an ATM",-1,ATMPos[i][0],ATMPos[i][1],ATMPos[i][2],10.0,0,0);
}
You can do it in an array and then you work with a loop.
![]() Like this: PHP код:
|