Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(dialogid == DIALOG_GPS)
- {
- if(response)
- {
- if(listitem == 0)// czyli opcja to GPS
- {
- new stationid1 = -1;
- for(new slotid, Float:distance1 = 10000.0, Float:distance2; slotid != MAX_FUEL_STATIONS; slotid++)
- {
- distance2 = GetPlayerDistanceFromPoint(playerid, FuelStationPos[slotid][0], FuelStationPos[slotid][1], FuelStationPos[slotid][2]);
- if(distance2 < distance1)
- {
- distance1 = distance2;
- stationid1 = slotid;
- }
- SetPlayerCheckpoint(playerid, FuelStationPos[stationid1][1], FuelStationPos[stationid1][1], FuelStationPos[stationid1][2], 3);
- SendClientMessage(playerid, 0x00FF00FF, "GPS >>Stacje: {FFFFFF}Najbliższa stacja została zaznaczona czerwonym punktem na mapie!");
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment