TonyVk

Untitled

Nov 7th, 2015
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. CMD:tehnickipregled(playerid, params[])
  2. {
  3. /*if(IsPlayerInRangeOfPoint(playerid,6.0,1004.9180,-1084.9906,23.8281))
  4. {*/
  5. if(ProcesReganja[playerid] == 1)
  6. {
  7. new id1 = PlayerInfo[playerid][pPosedovanjeAuta];
  8. //new id2 = PlayerInfo[playerid][pPosedovanjeAuta2];
  9. if(GetPlayerVehicleID(playerid) == VoziloInfo[id1][vID] /*|| GetPlayerVehicleID(playerid) == VoziloInfo[id2][vID]*/)//OVAJ DRUGI DIO JE ZA VOZILO 2 AKO BUDETE DODAVALI I TAJ SISTEM
  10. {
  11. new Float:vheal;
  12. new vehara = GetPlayerVehicleID(playerid);
  13. GetVehicleHealth(vehara, vheal);
  14. if(vheal < 900)
  15. {
  16. SCM(playerid,GRAD2,"Vozilo vam nije proslo tehnicki pregled,popravite ga,osigurajte opet i dovedite ga na tehnicki pregled!");
  17. ProcesReganja[playerid] = 0;
  18. DisablePlayerCheckpoint(playerid);
  19. }
  20. else
  21. {
  22. ProcesReganja[playerid] = 2;
  23. if(GetPlayerVehicleID(playerid) == VoziloInfo[id1][vID]){RegistriraVozilo[playerid] = id1;}
  24. //if(GetPlayerVehicleID(playerid) == VoziloInfo[id2][vID]){RegistriraVozilo[playerid] = id2;}
  25. SendClientMessage(playerid,GRAD2,"Prosli ste tehnicki pregled vozila!");
  26. SendClientMessage(playerid,GRAD2,"Idite na zadanu lokaciju u interijeru vjecnice i kucajte /tablice!");
  27. DisablePlayerCheckpoint(playerid);
  28. }
  29. }else{SendClientMessage(playerid,GRAD2,"Niste u svom osobnom vozilu!");}
  30. }else{SendClientMessage(playerid,GRAD2,"Vi niste zapoceli proces registracije ili niste na ovom djelu registracije!");}
  31. //}else{SendClientMessage(playerid,CRVENA,"Niste na mjestu gdje se registrira vozilo!");}
  32. return 1;
  33. }
  34. CMD:tablice(playerid, params[])
  35. {
  36. /*if(IsPlayerInRangeOfPoint(playerid,6.0,1520.1443,-1806.9636,-33.2141))
  37. {*/
  38. if(ProcesReganja[playerid] == 2)
  39. {
  40. new str[123];
  41. ProcesReganja[playerid] = 0;
  42. new id = RegistriraVozilo[playerid];
  43. RegistriraVozilo[playerid] = 0;
  44. if(VoziloInfo[id][vID] < 10){format(VoziloInfo[id][Tablice],24,"{33CCFF}MC-00%d",VoziloInfo[id][vID]);}
  45. else if(VoziloInfo[id][vID] < 100){format(VoziloInfo[id][Tablice],24,"{33CCFF}MC-0%d",VoziloInfo[id][vID]);}
  46. else {format(VoziloInfo[id][Tablice],24,"{33CCFF}MC-%d",VoziloInfo[id][vID]);}
  47. format(str,sizeof(str),"Registrirali ste vozilo, Tablice: %s",VoziloInfo[id][Tablice]);
  48. SCM(playerid,GRAD2,"Postavite su vam tablice na vozilo!");
  49. SendClientMessage(playerid,GRAD2,str);
  50. new Float:VehPoza[4];
  51. GetVehiclePos(VoziloInfo[id][vID],VehPoza[0],VehPoza[1],VehPoza[2]);
  52. GetVehicleZAngle(VoziloInfo[id][vID],VehPoza[3]);
  53. SetVehicleNumberPlate(VoziloInfo[id][vID], VoziloInfo[id][Tablice]);
  54. SetVehicleToRespawn(VoziloInfo[id][vID]);
  55. SetVehiclePos(VoziloInfo[id][vID],VehPoza[0],VehPoza[1],VehPoza[2]);
  56. SetVehicleZAngle(VoziloInfo[id][vID],VehPoza[3]);
  57. SacuvajVozilo(id);
  58. }
  59. //}
  60. return 1;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment