Advertisement
ykos

Untitled

Jun 28th, 2021
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1.  
  2. stock UpdateTaxiTimerCountTD(playerid, order) {
  3. if(!PlayerTaxiTimerCountShow[playerid]) return 1;
  4.  
  5. new h, m, s;
  6. if(order != -1) {
  7. if(TaxiOrder[order][torder_status] == 3) {
  8. if(TaxiOrder[order][torder_driverid] == playerid || TaxiOrder[order][torder_clientid] == playerid) {
  9. s = TaxiOrder[order][torder_time];
  10. format(mainString, 10, "%d$", TaxiOrder[order][torder_price]);
  11. }
  12. }
  13. }
  14. else {
  15. if(PlayerTaxiNotOrder[playerid] != -1) {
  16. s = PlayerTaxiDriver[PlayerTaxiNotOrder[playerid]][tdriver_notorder_time];
  17. format(mainString, 10, "%d$", TaxiPrice[playerid]);
  18. }
  19. else if(PlayerTaxiDriver[playerid][tdriver_notorder_playerid] != -1) {
  20. s = PlayerTaxiDriver[playerid][tdriver_notorder_time];
  21. format(mainString, 10, "%d$", TaxiPrice[PlayerTaxiDriver[playerid][tdriver_notorder_playerid]]);
  22. }
  23. }
  24.  
  25. PlayerTextDrawSetString(playerid, PTD_TaxiTimerCount[playerid][15], mainString);
  26.  
  27. // time
  28. h = s / 3600;
  29. if(h) {
  30. s -= h * 3600;
  31. }
  32. m = s / 60;
  33. if(s) {
  34. s -= m*60;
  35. }
  36.  
  37. format(mainString, 10, "%02d", h);
  38. PlayerTextDrawSetString(playerid, PTD_TaxiTimerCount[playerid][9], mainString); // hour
  39.  
  40. format(mainString, 10, "%02d", m);
  41. PlayerTextDrawSetString(playerid, PTD_TaxiTimerCount[playerid][10], mainString); // min
  42.  
  43. format(mainString, 10, "%02d", s);
  44. PlayerTextDrawSetString(playerid, PTD_TaxiTimerCount[playerid][11], mainString); // sec
  45. return 1;
  46. }
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement