24.03.2014, 11:00
First apologize for post this thread again because morning i hurry for my work don't forgot copy that code
but when i'm back that thread lost from board "Scripting Help" and i forgot answer name that thread
sorry if i post wrong section
i need IsPlayerInRangeOfPoint(playerid, 2.0, CarPlace[0][0],CarPlace[0][1],CarPlace[0][2])
Check all point , How can i do ?
Thank you for answer future
but when i'm back that thread lost from board "Scripting Help" and i forgot answer name that thread
sorry if i post wrong section
i need IsPlayerInRangeOfPoint(playerid, 2.0, CarPlace[0][0],CarPlace[0][1],CarPlace[0][2])
Check all point , How can i do ?
Thank you for answer future
Код:
new Float:CarPlace[61][3]={ {620.2542,-585.1610,16.8015}, // Start SAPDCars {618.3580,-585.1192,16.7945}, {616.4330,-585.0688,16.7916}, {614.6556,-585.0027,16.7884}, {612.8846,-601.5060,17.4597}, {612.6876,-596.9767,17.4549}, {622.0457,-605.7037,17.3850}, {621.9755,-610.5628,17.3760}, {612.9442,-602.5568,22.9025}, // End {864.9163,-581.0751,18.3875}, // Start SAMDCars {860.4417,-581.1045,18.3601}, {856.4764,-581.1141,18.3581}, {851.8925,-580.9927,18.3622}, {868.0797,-594.9819,18.2833}, {841.0754,-600.3878,18.5290}, {824.9916,-605.7476,16.5126}, // End {-70.3641,-1110.5826,1.7181}, // Start Petrol {-75.4261,-1108.7942,1.7195}, {-81.0820,-1134.7828,1.7110}, // End {2102.4294,-1786.4148,13.1560}, // Start Pizza {2102.2981,-1788.7549,13.1442}, {2106.6208,-1788.8529,13.1375}, {2106.5845,-1786.3721,13.1480}, {2110.4556,-1788.8522,13.0810}, {2110.4705,-1786.5559,13.0758}, // End {708.2000,-458.2786,16.2163}, // Start Mechanic Car {708.2116,-464.4827,16.2208}, {695.5049,-464.0798,16.2124}, {696.0159,-470.2163,16.2194}, {708.2069,-473.5880,16.2216}, // End {1085.6561,-294.5464,74.9692}, // Start Farmer Cars {1086.3818,-333.0886,74.9709}, {1060.7324,-311.2742,74.9851}, {1060.8530,-295.2395,74.9886}, {1072.2866,-295.0812,74.9859}, // End {-54.1143,86.1869,4.0927}, // Start DrugHarvest {-39.0122,-19.7210,4.0923}, {-34.2867,-9.5510,4.0883}, {-83.7403,-17.7843,4.0917}, // End {-89.8149,-316.8324,1.4192}, // Start TruckerCar {-94.7636,-316.9828,1.4250}, {-94.7128,-307.9709,1.4219}, {-90.0027,-308.0276,1.4226}, // End {592.4833,-1309.7670,13.4906},// Start SweeperCars {591.8651,-1305.3250,13.8887}, {596.5638,-1309.3870,13.4771}, {595.8945,-1304.9811,13.8752}, {601.2933,-1306.4874,13.7205},// End {949.6068,-1355.5992,12.9429}, // Start Chickbell {947.8060,-1355.9500,12.9233}, {948.1397,-1359.6423,12.9446}, {950.1915,-1359.7374,12.9219}, {950.2947,-1363.6675,12.8611},// End {694.6615,-645.5557,16.07751}, // Start FreeCar {634.5010,-513.9753,16.0422}, {656.1711,-470.0659,16.1536}, {667.4114,-546.0848,16.1537}, {1329.5901,-1060.0924,28.3835}, {1139.2948,-1025.7244,31.5759}, {831.7549,-1063.0664,24.9197}, {246.4301,-87.8420,1.9666} // End 61 cars }; if(strcmp(cmd,"/jackcar",true)==0|| strcmp(cmd, "/ja", true) == 0) { new newcar = GetPlayerVehicleID(playerid); if(!IsPlayerInRangeOfPoint(playerid, 2.0, CarPlace[0][0],CarPlace[0][1],CarPlace[0][2])) { SendClientMessage(playerid, COLOR_RED,"ผิดพลาด"COL_WHITE": คุณไม่ได้อยู่ใกล้รถ !"); return 1; } if(JackCars[playerid] >= 1) { SendClientMessage(playerid, COLOR_RED,"ผิดพลาด"COL_WHITE": คุณกำลังงัดรถอยู่นี่ไง !"); return 1; } if(VehicleJackLock[newcar] >= 1) { SendClientMessage(playerid, COLOR_RED,"ผิดพลาด"COL_WHITE": รถคันนี้ถูกงัดไว้แล้ว !"); return 1; } JackCars[playerid] = 1; SetTimerEx("JackCarTimer", 3500, 0, "i", playerid); SendClientMessage(playerid, COLOR_YELLOW, "*คุณกำลังงัดรถ"); format(string, sizeof(string), "** %s ได้พยายามงัดรถ", sendername); GameTextForPlayer(playerid, "~w~Jacking vehicle ...",2000,3); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); }