Guest User

Untitled

a guest
Mar 9th, 2014
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.38 KB | None | 0 0
  1. else if(strcmp(x_nr,"buy",true) == 0)
  2. {
  3. new car = 1;
  4. new model = GetVehicleModel(idcar);
  5. if(IsASalesVehicle(idcar))
  6. {
  7. if(PlayerInfo[playerid][pLevel] < 2)
  8. {
  9. SendClientMessage(playerid, COLOR_GREY, "Morate biti lvl2 da bi kupili kola!");
  10. return 1;
  11. }
  12. if(PlayerInfo[playerid][pPcarkey] != 9999 && PlayerInfo[playerid][pPcarkey2] != 9999 && PlayerInfo[playerid][pPcarkey3] != 9999)
  13. {
  14. SendClientMessage(playerid, COLOR_GREY,"* Dostigli ste limit u broju automobila za vas level.!");
  15. return 1;
  16. }
  17. else
  18. if(GetPlayerMoney(playerid) >= GetVehiclePrice(idcar))
  19. {
  20. if (GetPlayerMoney(playerid) > ScriptMoney[playerid])
  21. {
  22. new y,m,d;
  23. new h,mi,s;
  24. getdate(y,m,d);
  25. gettime(h,mi,s);
  26. if(admins == 0 || afkadmins == admins)
  27. {
  28. format(string, sizeof(string), "%s (%d), je kikovan zbog money hacka.", sendername, playerid);
  29. SendClientMessageToAll(COLOR_NICERED, string);
  30. format(string, sizeof(string), "Kikovani ste zbog money hacka ($%d)",(GetPlayerMoney(playerid) - ScriptMoney[playerid]));
  31. SendClientMessage(playerid,COLOR_LIGHTBLUE, string);
  32. format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for: Money Hacking",d,m,y,h,mi,s,sendername);
  33. KickLog(string);
  34. Kick(playerid);
  35. }
  36. format(string, sizeof(string), "[AntiCheat]: %s (%d) verovatno koristi Money Hack; Proverite ga odmah!! /fixmoney [playerID/DeoImena]", sendername,playerid);
  37. SendGmMessage(COLOR_YELLOW, string);
  38. format(string, sizeof(string), "[AntiCheat]:%s (%d) novac je popravljen ($%d).", sendername, playerid, (GetPlayerMoney(playerid) - ScriptMoney[playerid]));
  39. SendAdminMessage(COLOR_LIGHTRED, string);
  40. SetRealMoney(playerid, ScriptMoney[playerid]);
  41. PlayerSuspicious[playerid] = 1;
  42. PlayerMoneyHacking[playerid] = 1;
  43. PlayerSuspiciousMoney[playerid] = (GetPlayerMoney(playerid) - ScriptMoney[playerid]);
  44. PlayerGotSpottedRecently[playerid] = 1;
  45. SetTimerEx("ResetAcWarn", 90000, 0, "i", playerid);
  46. SendClientMessage(playerid, COLOR_CREAM, "* Transakcija stopirana, vase novcano stanje je neuravnotezeno, molimo vas pozovite admine.");
  47. return 1;
  48. }
  49. if(PlayerInfo[playerid][pCarLic] == 1)
  50. {
  51. for(new h = 1; h < sizeof(CarInfo); h++)
  52. {
  53. if(CarInfo[h][cOwned] == 0)
  54. {
  55. car = h;
  56. h = 9999;
  57. }
  58. }
  59. format(string, sizeof(string),"NooBotRP/Vehicles/%d.ini",car)
  60. dini_Create(string);
  61.  
  62. if(PlayerInfo[playerid][pPcarkey] == 9999)
  63. {
  64. PlayerInfo[playerid][pPcarkey] = car;
  65. }
  66. else if(PlayerInfo[playerid][pLevel] >= 10)
  67. {
  68. if(PlayerInfo[playerid][pPcarkey2] == 9999)
  69. {
  70. PlayerInfo[playerid][pPcarkey2] = car;
  71. }
  72. }
  73. else { return 1; }
  74. CarInfo[car][cOwned] = 1;
  75. strmid(CarInfo[car][cOwner], sendername, 0, strlen(sendername), 999);
  76. SafeGivePlayerMoney(playerid,-GetVehiclePrice(idcar));
  77. if(IsModelAPlane(idcar) || IsModelAHeli(idcar))
  78. {
  79. CarInfo[car][cLocationx] = 2113.8909;
  80. CarInfo[car][cLocationy] = -2443.8997;
  81. CarInfo[car][cLocationz] = 13.5469;
  82. CarInfo[car][cAngle] = 359.2072;
  83. CarInfo[car][cReg] = 0;
  84. OnPropUpdate(4,car);
  85. SendClientMessage(playerid, COLOR_YELLOW2, "Vas avion je isporucen na LS aerodrom!");
  86. SendClientMessage(playerid, COLOR_YELLOW2, "Vas avion je otkljucan, mozete nekome platiti da ga doveze!");
  87. SendClientMessage(playerid, COLOR_NICERED, "Napomena: Obavezno preparkirajte vas avion, inace ce biti prodat od strane administratora!");
  88. GameTextForPlayer(playerid, "~p~Cestitamo~n~~w~Ne zaboravite da uzmete vas avion na ~b~Los Santos aerodromu!", 5000, 3);
  89. }
  90. else if(IsModelABoat(idcar))
  91. {
  92. CarInfo[car][cLocationx] = -1568.9614;
  93. CarInfo[car][cLocationy] = 169.0118;
  94. CarInfo[car][cLocationz] = -0.6016;
  95. CarInfo[car][cAngle] = 208.7506;
  96. CarInfo[car][cReg] = 0;
  97. OnPropUpdate(4,car);
  98. SendClientMessage(playerid, COLOR_YELLOW2, "Vas brod je isporucen na dokove u SF-u!");
  99. SendClientMessage(playerid, COLOR_YELLOW2, "Vas brod je otkljucan, mozete nekome platiti da ga doveze!");
  100. SendClientMessage(playerid, COLOR_NICERED, "Napomena: Obavezno preparkirajte vas brod, inace ce biti prodat od strane administratora!");
  101. GameTextForPlayer(playerid, "~p~Cestitamo~n~~w~Ne zaboravite da uzmete vas brod na ~b~San Fierro Dokovima!", 5000, 3);
  102. }
  103. else
  104. {
  105. CarInfo[car][cLocationx] = 1590.3740;
  106. CarInfo[car][cLocationy] = -1026.0565;
  107. CarInfo[car][cLocationz] = 23.9063;
  108. CarInfo[car][cAngle] = 317.1649;
  109. CarInfo[car][cReg] = 0;
  110. OnPropUpdate(4,car);
  111. SendClientMessage(playerid, COLOR_YELLOW2, "Vase vozilo je isporuceno na parking kod banke!");
  112. SendClientMessage(playerid, COLOR_YELLOW2, "Vase vozilo je otkljucano, mozete platiti nekome da ih doveze do vas!");
  113. SendClientMessage(playerid, COLOR_NICERED, "Napomena: Obavezno preparkirajte vase vozilo, inace ce biti prodato od strane administratora!");
  114. GameTextForPlayer(playerid, "~p~Cestitamo~n~~w~Ne zaboravite da uzmete vasa kola na ~b~parkingu kod banke!", 5000, 3);
  115. }
  116. CarInfo[car][cModel] = model;
  117. CarInfo[car][cVirWorld] = 0;
  118. CarInfo[car][cPaintjob] = 999;
  119. CarInfo[car][cColorOne] = 1;
  120. CarInfo[car][cColorTwo] = 1;
  121. CarInfo[car][cComponent0] = 0;
  122. CarInfo[car][cComponent1] = 0;
  123. CarInfo[car][cComponent2] = 0;
  124. CarInfo[car][cComponent3] = 0;
  125. CarInfo[car][cComponent4] = 0;
  126. CarInfo[car][cComponent5] = 0;
  127. CarInfo[car][cComponent6] = 0;
  128. CarInfo[car][cComponent7] = 0;
  129. CarInfo[car][cComponent8] = 0;
  130. CarInfo[car][cComponent9] = 0;
  131. CarInfo[car][cComponent10] = 0;
  132. CarInfo[car][cComponent11] = 0;
  133. CarInfo[car][cComponent12] = 0;
  134. CarInfo[car][cComponent13] = 0;
  135. CarInfo[car][cReg] = 0;
  136. DestroyVehicle(car);
  137. ownedcar[car] = CreateVehicle(CarInfo[car][cModel],CarInfo[car][cLocationx],CarInfo[car][cLocationy],CarInfo[car][cLocationz],90.0,1,1,30000);
  138. PlayerPlayMusic(playerid);
  139. SendClientMessage(playerid, COLOR_GRAD2, "Cestitamo na novoj kupovini!");
  140. SendClientMessage(playerid, COLOR_GRAD2, "Kucajte /vozilo da vidite nove komande!");
  141. gEngine[playerid] = 0;
  142. engineOn[GetPlayerVehicleID(playerid)] = false;
  143. new pass[24];
  144. format(pass, sizeof(pass),"%d%d%d",random(9),random(9),random(9));
  145. CarInfo[car][cCode] = strval(pass);
  146. OnPropUpdate(4,car);
  147. SetVehicleToRespawn(car);
  148. OnPlayerUpdateEx(playerid);
  149. }
  150. else
  151. {
  152. SendClientMessage(playerid, COLOR_WHITE, "* Iz sigurnosnih razloga, potrebna vam je vozacka dozvola da bi kupili kola!");
  153. return 1;
  154. }
  155. }
  156. else
  157. {
  158. SendClientMessage(playerid, COLOR_GREY, " Nemate dovoljno novca kod sebe ! ");
  159. return 1;
  160. }
  161. }
  162. }
Advertisement
Add Comment
Please, Sign In to add comment