Advertisement
DiazSRB

Untitled

Jun 25th, 2020
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.32 KB | None | 0 0
  1. CMD:oport(playerid, params[])
  2. {
  3. if(PI[playerid][Admin] >= 1 || PI[playerid][ServerRank] == MAPPER || PI[playerid][ServerRank] == MAPPERVODJA || PI[playerid][GM] >= 1)
  4. {
  5. new odabir[20], id;
  6. if(sscanf(params, "s[20]i", odabir, id))
  7. {
  8. Usage(playerid, "/oport [ime] [ID]");
  9. SCM(playerid, BELA, "Dostupno: kuca, vikendica, hotel, stan, firma, garaza, grafit, trafika");
  10. SCM(playerid, BELA, "Dostupno: imanje, kapija, actor, org, radar, atm posao, kontejner, bilbord");
  11. return 1;
  12. }
  13. else {
  14. if(strcmp(odabir,"kuca",true) == 0) {
  15. if(!Kuce[id][kExist]) return Error(playerid, "Ta kuca(ID) ne postoji u bazi podataka!");
  16. Macak_SetPlayerPos(playerid, Kuce[id][UlazX], Kuce[id][UlazY], Kuce[id][UlazZ]);
  17. SetPlayerInterior(playerid, 0);
  18. SetPlayerVirtualWorld(playerid, 0);
  19. Info(playerid, "Teleportovali ste se do kuce ID: %s.", id);
  20. }
  21. if(strcmp(odabir,"vikendica",true) == 0) {
  22. if(!Vikendice[id][vExist]) return Error(playerid, "Ta vikendica(ID) ne postoji u bazi podataka!");
  23. Macak_SetPlayerPos(playerid, Vikendice[id][vUlazX], Vikendice[id][vUlazY], Vikendice[id][vUlazZ]);
  24. SetPlayerInterior(playerid, 0);
  25. SetPlayerVirtualWorld(playerid, 0);
  26. Info(playerid, "Teleportovali ste se do vikendice ID: %s.", id);
  27. }
  28. if(strcmp(odabir,"hotel",true) == 0) {
  29. //if(!Hoteli[id][hExist]) return Error(playerid, "Taj hotel(ID) ne postoji u bazi podataka!");
  30. Macak_SetPlayerPos(playerid, Hoteli[id][hUlazX], Hoteli[id][hUlazY], Hoteli[id][hUlazZ]);
  31. SetPlayerInterior(playerid, 0);
  32. SetPlayerVirtualWorld(playerid, 0);
  33. Info(playerid, "Teleportovali ste se do hotela ID %s.", id);
  34. }
  35. if(strcmp(odabir,"stan",true) == 0) {
  36. if(!Stanx[id][sExist]) return Error(playerid, "Taj stan(ID) ne postoji u bazi podataka!");
  37. Macak_SetPlayerPos(playerid, Stanx[id][sUlazX], Stanx[id][sUlazY], Stanx[id][sUlazZ]);
  38. SetPlayerInterior(playerid, 0);
  39. SetPlayerVirtualWorld(playerid, 0);
  40. Info(playerid, "Teleportovali ste se do stana ID: %s.", id);
  41. }
  42. if(strcmp(odabir,"firma",true) == 0) {
  43. if(!Firme[id][fExist]) return Error(playerid, "Ta firma(ID) ne postoji u bazi podataka!");
  44. Macak_SetPlayerPos(playerid, Firme[id][fUlazX], Firme[id][fUlazY], Firme[id][fUlazZ]);
  45. SetPlayerInterior(playerid, 0);
  46. SetPlayerVirtualWorld(playerid, 0);
  47. Info(playerid, "Teleportovali ste se do firme ID: %s.", id);
  48. }
  49. if(strcmp(odabir,"garaza",true) == 0) {
  50. if(!Garaze[id][gExist]) return Error(playerid, "Ta garaza(ID) ne postoji u bazi podataka!");
  51. Macak_SetPlayerPos(playerid, Garaze[id][gUlazX], Garaze[id][gUlazY], Garaze[id][gUlazZ]);
  52. SetPlayerInterior(playerid, 0);
  53. SetPlayerVirtualWorld(playerid, 0);
  54. Info(playerid, "Teleportovali ste se do garaze ID: %s.", id);
  55. }
  56. if(strcmp(odabir,"imanje",true) == 0) {
  57. if(!ImanjeInfo[id][iExist]) return Error(playerid, "To imanje(ID) ne postoji u bazi podataka!");
  58. Macak_SetPlayerPos(playerid, ImanjeInfo[id][iImanjeX], ImanjeInfo[id][iImanjeY], ImanjeInfo[id][iImanjeZ]);
  59. SetPlayerInterior(playerid, 0);
  60. SetPlayerVirtualWorld(playerid, 0);
  61. Info(playerid, "Teleportovali ste se do imanja ID: %s.", id);
  62. }
  63. if(strcmp(odabir,"kapija",true) == 0) {
  64. if(!KapijaInfo[id][kExist]) return Error(playerid, "Ta kapija(ID) ne postoji u bazi podataka!");
  65. Macak_SetPlayerPos(playerid, KapijaInfo[id][kapPoz][0], KapijaInfo[id][kapPoz][1], KapijaInfo[id][kapPoz][2]);
  66. SetPlayerInterior(playerid, 0);
  67. SetPlayerVirtualWorld(playerid, 0);
  68. Info(playerid, "Teleportovali ste se do kapije ID: %s.", id);
  69. }
  70. if(strcmp(odabir,"org",true) == 0) {
  71. if(!OrgInfo[id][oExist]) return Error(playerid, "Ta organizacija(ID) ne postoji u bazi podataka!");
  72. Macak_SetPlayerPos(playerid, OrgInfo[id][oPozExtX], OrgInfo[id][oPozExtY], OrgInfo[id][oPozExtZ]);
  73. SetPlayerInterior(playerid, 0);
  74. SetPlayerVirtualWorld(playerid, 0);
  75. Info(playerid, "Teleportovali ste se do organizacije ID: %s.", id);
  76. }
  77. if(strcmp(odabir,"radar",true) == 0) {
  78. if(!RadarInfo[id][R_Exist]) return Error(playerid, "Taj radar(ID) ne postoji u bazi podataka!");
  79. Macak_SetPlayerPos(playerid, RadarInfo[id][R_Pos][0], RadarInfo[id][R_Pos][1], RadarInfo[id][R_Pos][2]);
  80. SetPlayerInterior(playerid, 0);
  81. SetPlayerVirtualWorld(playerid, 0);
  82. Info(playerid, "Teleportovali ste se do radara ID: %s.", id);
  83. }
  84. if(strcmp(odabir,"atm",true) == 0) {
  85. if(!AtmInfo[id][aExist]) return Error(playerid, "Taj atm(ID) ne postoji u bazi podataka!");
  86. Macak_SetPlayerPos(playerid, AtmInfo[id][aAtmX], AtmInfo[id][aAtmY], AtmInfo[id][aAtmZ]);
  87. SetPlayerInterior(playerid, 0);
  88. SetPlayerVirtualWorld(playerid, 0);
  89. Info(playerid, "Teleportovali ste se do bankomata ID: %s.", id);
  90. }
  91. if(strcmp(odabir,"grafit",true) == 0) {
  92. if(!GrafitInfo[id][gExist]) return Error(playerid, "Taj grafit(ID) ne postoji u bazi podataka!");
  93. Macak_SetPlayerPos(playerid, GrafitInfo[id][gGraffitX], GrafitInfo[id][gGraffitY], GrafitInfo[id][gGraffitZ]);
  94. SetPlayerInterior(playerid, 0);
  95. SetPlayerVirtualWorld(playerid, 0);
  96. Info(playerid, "Teleportovali ste se do grafita ID: %s.", id);
  97. }
  98. if(strcmp(odabir,"trafika",true) == 0) {
  99. if(!TrafikaInfo[id][tExist]) return Error(playerid, "Ta trafika(ID) ne postoji u bazi podataka!");
  100. Macak_SetPlayerPos(playerid, TrafikaInfo[id][trX2], TrafikaInfo[id][trY2], TrafikaInfo[id][trZ2]);
  101. SetPlayerInterior(playerid, 0);
  102. SetPlayerVirtualWorld(playerid, 0);
  103. Info(playerid, "Teleportovali ste se do trafike ID: %s.", id);
  104. }
  105. if(strcmp(odabir,"bilbord",true) == 0) {
  106. if(!Bilbordi[id][bExist]) return Error(playerid, "Ta trafika(ID) ne postoji u bazi podataka!");
  107. Macak_SetPlayerPos(playerid, Bilbordi[id][bilUlazX], Bilbordi[id][bilUlazY], Bilbordi[id][bilUlazZ]);
  108. SetPlayerInterior(playerid, 0);
  109. SetPlayerVirtualWorld(playerid, 0);
  110. Info(playerid, "Teleportovali ste se do bilborda ID: %s.", id);
  111. }
  112. if(strcmp(odabir,"actor",true) == 0) {
  113. if(!ActorInfo[id][aExist]) return Error(playerid, "Ta trafika(ID) ne postoji u bazi podataka!");
  114. Macak_SetPlayerPos(playerid, ActorInfo[id][aPozX], ActorInfo[id][aPozY], ActorInfo[id][aPozZ]);
  115. SetPlayerInterior(playerid, 0);
  116. SetPlayerVirtualWorld(playerid, 0);
  117. Info(playerid, "Teleportovali ste se do actora ID: %s.", id);
  118. }
  119. if(strcmp(odabir,"posao",true) == 0) {
  120. if(id < 1 || id > MAX_JOBS) return Error(playerid, "Taj posao(ID) ne postoji u bazi podataka(1-18)!");
  121. id--;
  122. Macak_SetPlayerPos(playerid, jobsInfos[id][jPos][0], jobsInfos[id][jPos][1], jobsInfos[id][jPos][2]);
  123. SetPlayerInterior(playerid, 0);
  124. SetPlayerVirtualWorld(playerid, 0);
  125. Info(playerid, "Teleportovali ste se do posla %s.", jobsInfos[id][jName]);
  126. }
  127. if(strcmp(odabir,"kontejner",true) == 0) {
  128. if(!KontInfo[id][koExist]) return Error(playerid, "Taj kontejner (ID) ne postoji u bazi podataka!");
  129. Macak_SetPlayerPos(playerid, KontInfo[id][koObjPos][0]+2, KontInfo[id][koObjPos][1], KontInfo[id][koObjPos][2]);
  130. SetPlayerInterior(playerid, 0);
  131. SetPlayerVirtualWorld(playerid, 0);
  132. Info(playerid, "Teleportovali ste se do kontejnera ID %d", id);
  133. }
  134. }
  135. }
  136. else return Error(playerid, "Niste u mogucnosti koristiti ovu komandu.");
  137. return 1;
  138. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement