Zmajk0

Untitled

Apr 9th, 2020
61
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //OnPlayerSpawn
  2. if(Death[playerid] == 1)
  3. {
  4. new
  5. Float: Hospital1 = GetPlayerDistanceFromPoint(playerid, 2034.1149,-1414.9154,16.9922), //133.3335
  6. Float: Hospital2 = GetPlayerDistanceFromPoint(playerid, 1182.1077,-1324.0918,13.5815), //270.4434
  7. Float: Hospital3 = GetPlayerDistanceFromPoint(playerid, 1244.3423,331.9934,19.5547), //335.6859
  8. Float: Hospital4 = GetPlayerDistanceFromPoint(playerid, 1607.6090,1821.0934,10.8280), //0.7354
  9. Float: Hospital5 = GetPlayerDistanceFromPoint(playerid, -317.0090,1056.6217,19.7422), //358.9579
  10. Float: Hospital6 = GetPlayerDistanceFromPoint(playerid, -1514.7358,2527.0601,55.7455), //359.0611
  11. Float: Hospital7 = GetPlayerDistanceFromPoint(playerid, -2661.2441,633.7098,14.4531), //180.1544
  12. Float: Hospital8 = GetPlayerDistanceFromPoint(playerid, -2198.7803,-2306.5793,30.6250); //320.6338
  13.  
  14. }
  15.  
  16. //OnPlayerSpawn
  17. if(Death[playerid] == 1)
  18. {
  19. new
  20. Float: HospitalDistance[8],
  21. closest = -1,
  22. Float: tmp_distance = -1.0;
  23.  
  24. HospitalDistance[0] = GetPlayerDistanceFromPoint(playerid, 2034.1149,-1414.9154,16.9922);
  25. HospitalDistance[1] = GetPlayerDistanceFromPoint(playerid, 1182.1077,-1324.0918,13.5815);
  26. HospitalDistance[2] = GetPlayerDistanceFromPoint(playerid, 1244.3423,331.9934,19.5547);
  27. HospitalDistance[3] = GetPlayerDistanceFromPoint(playerid, 1607.6090,1821.0934,10.8280);
  28. HospitalDistance[4] = GetPlayerDistanceFromPoint(playerid, -317.0090,1056.6217,19.7422);
  29. HospitalDistance[5] = GetPlayerDistanceFromPoint(playerid, -1514.7358,2527.0601,55.7455);
  30. HospitalDistance[6] = GetPlayerDistanceFromPoint(playerid, -2661.2441,633.7098,14.4531);
  31. HospitalDistance[7] = GetPlayerDistanceFromPoint(playerid, -2198.7803,-2306.5793,30.6250);
  32.  
  33. for (new i; i != sizeof (HospitalDistance); ++i)
  34. {
  35. if (HospitalDistance[i] > tmp_distance)
  36. {
  37. tmp_distance = HospitalDistance[i];
  38. closest = i;
  39. }
  40. }
  41.  
  42. // set player's pos
  43. switch (closest)
  44. {
  45. case 0:
  46. {
  47. // 2034.1149,-1414.9154,16.9922
  48. }
  49. case 1:
  50. {
  51. // 1182.1077,-1324.0918,13.5815
  52. }
  53. case 2:
  54. {
  55. // 1244.3423,331.9934,19.5547
  56. }
  57. case 3:
  58. {
  59. // 1607.6090,1821.0934,10.8280
  60. }
  61. case 4:
  62. {
  63. // -317.0090,1056.6217,19.7422
  64. }
  65. case 5:
  66. {
  67. //-1514.7358,2527.0601,55.7455
  68. }
  69. case 6:
  70. {
  71. // -2661.2441,633.7098,14.4531
  72. }
  73. case 7:
  74. {
  75. // -2198.7803,-2306.5793,30.6250
  76. }
  77. }
  78. }
RAW Paste Data