Guest User

Untitled

a guest
Jul 18th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.57 KB | None | 0 0
  1. //POZOVI Komanda za mog Jaska! <3!
  2. if(strcmp(cmd, "/pozovi", true) == 0)
  3. {
  4. if(IsPlayerConnected(playerid))
  5. {
  6. tmp = strtok(cmdtext, idx);
  7. if(!strlen(tmp))
  8. {
  9. SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}Koristi: {FFFFFF}/pozovi [Igracev Broj]");
  10. return 1;
  11. }
  12. if(PlayerInfo[playerid][pPnumber] == 0)
  13. {
  14. SendClientMessage(playerid, COLOR_GRAD2, " Nemate telefon!");
  15. return 1;
  16. }
  17. GetPlayerName(playerid, sendername, sizeof(sendername));
  18. format(string, sizeof(string), "* %s je uzeo telefon iz dzepa.", sendername);
  19. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
  20. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  21. new phonenumb = strval(tmp);
  22. if(phonenumb == 555)
  23. {
  24. new mechanicworkers = 0;
  25. for(new i = 0; i < MAX_PLAYERS; i++)
  26. {
  27. if(PlayerInfo[i][pJob] == 7 && JobDuty[i] == 1)
  28. {
  29. mechanicworkers++;
  30. }
  31. }
  32. if(mechanicworkers < 1)
  33. {
  34. SendClientMessage(playerid, COLOR_GREY, " Javili su se.");
  35. SendClientMessage(playerid, 0xBBE1F2AA, "Vlasnik (telefon): Zao nam je ali trenutno nemamo slobodnih automehanicara.");
  36. SendClientMessage(playerid, COLOR_GREY, " They hang up.");
  37. return 1;
  38. }
  39. GetPlayerName(playerid, sendername, sizeof(sendername));
  40. format(string, sizeof(string), "** %s-u treba automehanicar. (kucajte /prihvati mechanic da prihvatite poziv)", sendername);
  41. SendJobMessage(7, COLOR_WHITE, string);
  42. SendClientMessage(playerid, COLOR_GREY, " Prihvatili su poziv.");
  43. SendClientMessage(playerid, 0xBBE1F2AA, "Vlasnik (telefon): Svim mehanicarima je javljeno o vasem pozivu.");
  44. SendClientMessage(playerid, COLOR_GREY, " Prekinuli su.");
  45. MechanicCall = playerid;
  46. return 1;
  47. }
  48. if(phonenumb == PlayerInfo[playerid][pPnumber])
  49. {
  50. SendClientMessage(playerid, COLOR_GRAD2, " Zauzeto je...");
  51. return 1;
  52. }
  53. if(Mobile[playerid] != 255)
  54. {
  55. SendClientMessage(playerid, COLOR_GRAD2, " Vec zovete nekog...");
  56. return 1;
  57. }
  58. for(new i = 0; i < MAX_PLAYERS; i++)
  59. {
  60. if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
  61. {
  62. giveplayerid = i;
  63. Mobile[playerid] = giveplayerid; //caller connecting
  64. if(IsPlayerConnected(giveplayerid))
  65. {
  66. if(giveplayerid != INVALID_PLAYER_ID)
  67. {
  68. if(PhoneOnline[giveplayerid] > 0)
  69. {
  70. SendClientMessage(playerid, COLOR_GREY, " Taj igrac je offline!");
  71. return 1;
  72. }
  73. if (Mobile[giveplayerid] == 255)
  74. {
  75. format(string, sizeof(string), "Zvoni vam telefon, kucajte (/pickup) CallerID: %s", sendername);
  76. SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  77. GetPlayerName(giveplayerid, sendername, sizeof(sendername));
  78. RingTone[giveplayerid] = 10;
  79. format(string, sizeof(string), "* %s-ov telefon zvoni.", sendername);
  80. SendClientMessage(playerid, COLOR_WHITE, "Podjsetnik: Sada koristite ~ ili T da pricate preko telefona, kucajte /hangup ili /h da prekinete");
  81. ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  82. CellTime[playerid] = 1;
  83. return 1;
  84. }
  85. }
  86. }
  87. }
  88. }
  89. SendClientMessage(playerid, COLOR_GRAD2, " Zauzeto je...");
  90. }
  91. return 1;
  92. }
Add Comment
Please, Sign In to add comment