Guest User

Untitled

a guest
Feb 10th, 2020
115
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Problema PNS intru in PNS si ma teleporteaza la altul cod:
  2.  
  3. new Float: PutVehiclePNS[4][4] = {
  4. {2075.7385,-1831.3799,13.1911,271.4610},
  5. {1024.8359,-1025.1244,31.8286,1.4482},
  6. {1975.3617,2162.3789,10.7974,268.9753},
  7. {720.1006,-458.8903,16.0630,0.0031}
  8. };
  9.  
  10. new Float: ExitVehiclePNS[4][4] = {
  11. {2075.7385,-1831.3799,13.1911,271.4610},
  12. {1024.9517,-1034.4995,31.4208,177.5887},
  13. {1963.0897,2162.2114,10.5474,89.7477},
  14. {720.1700,-467.4203,16.0688,178.9350}
  15. };
  16.  
  17. function PutVehicleInPNS(playerid, idd) {
  18. LastPns[playerid] = idd;
  19. SetVehiclePos(GetPlayerVehicleID(playerid), PutVehiclePNS[idd][0], PutVehiclePNS[idd][1], PutVehiclePNS[idd][2]);
  20. SetVehicleZAngle(GetPlayerVehicleID(playerid), PutVehiclePNS[idd][3]);
  21. GetVehicleHealth(GetPlayerVehicleID(playerid), VehicleHealth[playerid]);
  22. TogglePlayerControllable(playerid, false);
  23. PnsTimer[playerid] = gettime()+5;
  24. return true;
  25. }
  26. Key code
  27. next:
  28. if(PnsTimer[playerid] != -1) return true;
  29. for(new i = 1; i <= GpsBizzType[14]; i++) {
  30. idd = BizzTypeID[14][i];
  31. if(!PlayerToPoint(3, playerid, BizzInfo[idd][bEntranceX], BizzInfo[idd][bEntranceY], BizzInfo[idd][bEntranceZ]))
  32. continue;
  33.  
  34. PutVehicleInPNS(playerid, i-1);
  35. cc = true;
  36. break;
  37. }
  38. if(cc) return true;
  39. for(new i = 1; i <= GpsBizzType[12]; i++) {
  40. idd = BizzTypeID[12][i];
  41. if(PlayerToPoint(20, playerid, BizzInfo[idd][bEntranceX], BizzInfo[idd][bEntranceY], BizzInfo[idd][bEntranceZ])) {
  42. new idcar = GetPlayerVehicleID(playerid);
  43. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  44. return true;
  45.  
  46. if(GetPVarInt(playerid, "Engine") == 1)
  47. return SCM(playerid,COLOR_GREY,"* Motorul este pornit, opreste-l.");
  48.  
  49. if(Gas[idcar] == 100)
  50. return SCM(playerid, COLOR_LGREEN, "Eroare: Ai facut deja plinul.");
  51.  
  52. TogglePlayerControllable(playerid, 0);
  53. GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~the tank is loaded~n~~w~~h~Wait...",RefuelWait,3);
  54. defer Fillup(playerid);
  55. Refueling[playerid] = 1;
  56. break;
  57. }
  58. }
  59. return true;
  60. }
  61. }
  62.  
  63. function RepairVehiclePns(i) {
  64. if(GetPlayerState(i) != PLAYER_STATE_DRIVER)
  65. return true;
  66.  
  67. new idd, veh = GetPlayerVehicleID(i);
  68.  
  69. for(new h = 1; h <= GpsBizzType[14]; h++) {
  70. idd = BizzTypeID[14][h];
  71. if(IsPlayerInRangeOfPoint(i, 30.0,BizzInfo[idd][bEntranceX], BizzInfo[idd][bEntranceY], BizzInfo[idd][bEntranceZ])) {
  72. GivePlayerCash(i, 0, 1000);
  73. BizzInfo[idd][bBalance] += BizzInfo[idd][bFee];
  74. for(new m; m < 2; m++) {
  75. if(PlayerInfo[i][pDailyMission][m] == 19) CheckMission(i, m);
  76. }
  77. }
  78. }
  79. PnsTimer[i] = -1;
  80. TogglePlayerControllable(i, true);
  81. new carid = FindSpawnID(veh), b = LastPns[i];
  82. if(carid != -1) SetVehicleHealth(veh, CarInfo[carid][cVip] ? 2000 : 999);
  83. else SetVehicleHealth(veh, 999);
  84. ChangeVehicleColor(veh, VehicleStats[veh][vColorOne], VehicleStats[veh][vColorTwo]);
  85. SetVehiclePos(veh, ExitVehiclePNS[b][0], ExitVehiclePNS[b][1], ExitVehiclePNS[b][2]);
  86. SetVehicleZAngle(veh, ExitVehiclePNS[b][3]);
  87. return true;
  88. }
RAW Paste Data