• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Trucking mission issue
#1
Shocked 
Hello guys,?



i starded making some trucking missions in my server and all i got for now is that when player types /work server checks few things like is player wanted or is player in truck with trailer attached and then it picks random mission and put mission load cp for player.



My question is next : How to make player able to choose from few closest Load points to his position ?



If anyone played on Convoy Trucking im trying to make same thing because its kinda bad if u are in LS and u start ur truck mission there but u get ur load point in SF.
  Reply
#2
anyone ?
  Reply
#3
You need to define what ?close? means.



1. Find the closest x load points?



Iterate over the load points, measure the player?s distance to each one and sort them. Then pick the closest x load points and show them to the player in a dialog.



2. Find all load points in range x?



Iterate over the load points, and on each iteration, measure the distance to the player and save the ones below your range x in an array. Finally, show them to the player in a dialog.
  Reply
#4
(2021-02-13, 07:17 PM)JohnnyMP Wrote: Hello guys,?



i starded making some trucking missions in my server and all i got for now is that when player types /work server checks few things like is player wanted or is player in truck with trailer attached and then it picks random mission and put mission load cp for player.



My question is next : How to make player able to choose from few closest Load points to his position ?



If anyone played on Convoy Trucking im trying to make same thing because its kinda bad if u are in LS and u start ur truck mission there but u get ur load point in SF.



I also got a trucking script. Didn't implement any distance check tho.?



Use?GetPlayerDistanceFromPoint(playerid, x, y, z);
  Reply


Forum Jump: