Advertisement
Guest User

Untitled

a guest
Mar 30th, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 184.24 KB | None | 0 0
  1. public OnPlayerClickPlayerTextDraw( playerid, PlayerText:playertextid )
  2. {
  3. if( playertextid != INVALID_TEXT_DRAW )
  4. {
  5. if( playertextid == BuyCar[ playerid ][ 1 ] )
  6. {
  7. new as = GetNearestSalon( playerid ), slotid = AutoSalon[ as ][ aIzlogVeh ];
  8. if( as != -1 )
  9. {
  10. if( ModelCar[ playerid ] == (AutoSalon[ as ][ aMaxVehModel ]-1) ) return 1;
  11.  
  12. ModelCar[ playerid ]++;
  13.  
  14. new string[ 128 ];
  15. format( string, sizeof( string ), "%s", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
  16. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 3 ], string );
  17.  
  18. format( string, sizeof( string ), "~w~%d$", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 1 ] );
  19. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 7 ], string );
  20.  
  21. format( string, sizeof( string ), "~w~%dg", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 2 ] );
  22. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 11 ], string );
  23.  
  24. PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 5 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
  25. PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 5 ] );
  26.  
  27. PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 12 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
  28. PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 12 ] );
  29.  
  30. PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 9 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
  31. PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 9 ] );
  32.  
  33. SetPlayerCameraPos( playerid, AutoSalon[ as ][ aCameraPos ][ 0 ], AutoSalon[ as ][ aCameraPos ][ 1 ], AutoSalon[ as ][ aCameraPos ][ 2 ] );
  34. SetPlayerCameraLookAt( playerid, AutoSalon[ as ][ aCameraLookAt ][ 0 ], AutoSalon[ as ][ aCameraLookAt ][ 1 ], AutoSalon[ as ][ aCameraLookAt ][ 2 ] );
  35.  
  36. Dimi_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
  37. VehicleInfo[ slotid ][ vID ] = Dimi_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], AutoSalonBojaVozila[ playerid ], AutoSalonBojaVozila[ playerid ], -1 );
  38. SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
  39. LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );
  40.  
  41. //==============================================================================//////
  42. if( VoziloJeDizel( VehicleInfo[ slotid ][ vID ] ) )
  43. {
  44. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Dizel" );
  45. }
  46. else if( VoziloJeBenzin( VehicleInfo[ slotid ][ vID ] ) )
  47. {
  48. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Benzin" );
  49. }
  50. else if( VoziloJeKerozin( VehicleInfo[ slotid ][ vID ] ) )
  51. {
  52. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Kerozin" );
  53. }
  54. else if( VoziloNemaGorivo( VehicleInfo[ slotid ][ vID ] ) )
  55. {
  56. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~N/A" );
  57. }
  58. //==============================================================================///////
  59. if( VoziloJe2Vrata( VehicleInfo[ slotid ][ vID ] ) )
  60. {
  61. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~2" );
  62. }
  63. else if( VoziloJe4Vrata( VehicleInfo[ slotid ][ vID ] ) )
  64. {
  65. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~4" );
  66. }
  67. else if( VoziloNemaVrata( VehicleInfo[ slotid ][ vID ] ) )
  68. {
  69. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~0" );
  70. }
  71. //==============================================================================////////////////
  72. if( SportVozilo( VehicleInfo[ slotid ][ vID ] ) )
  73. {
  74. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~sportsko" );
  75. }
  76. else if( PutnickoVozilo( VehicleInfo[ slotid ][ vID ] ) )
  77. {
  78. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~putnicko" );
  79. }
  80. else if( IsVehicleMotor( VehicleInfo[ slotid ][ vID ] ) )
  81. {
  82. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~motocikl" );
  83. }
  84. else if( IsVehicleBajs( VehicleInfo[ slotid ][ vID ] ) )
  85. {
  86. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~bicikl" );
  87. }
  88. else if( IsVehicleLetelica( VehicleInfo[ slotid ][ vID ] ) )
  89. {
  90. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~letilica" );
  91. }
  92. else if( IsVehicleBrod( VehicleInfo[ slotid ][ vID ] ) )
  93. {
  94. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~plovilo" );
  95. }
  96. else if( TeretnoVozilo( VehicleInfo[ slotid ][ vID ] ) )
  97. {
  98. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~teretno" );
  99. }
  100. else
  101. {
  102. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~N/A" );
  103. }
  104. //==============================================================================//////////
  105.  
  106.  
  107. new Cboja1 = AutoSalonBojaVozila[ playerid ];
  108. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ],Cboja1, Cboja1);
  109. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ],Cboja1, Cboja1);
  110. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ],Cboja1, Cboja1);
  111.  
  112. SelectTextDraw( playerid, TGBOJA );
  113. }
  114. return true;
  115. }
  116. if( playertextid == BuyCar[ playerid ][ 4 ] )
  117. {
  118. new as = GetNearestSalon( playerid ), slotid = AutoSalon[ as ][ aIzlogVeh ];
  119. if( as != -1 )
  120. {
  121. if( ModelCar[ playerid ] == 0 ) return 1;
  122. ModelCar[ playerid ]--;
  123.  
  124. new string[ 128 ];
  125. format( string, sizeof( string ), "%s", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
  126. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 3 ], string );
  127.  
  128. format( string, sizeof( string ), "~w~%d$", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 1 ] );
  129. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 7 ], string );
  130.  
  131. format( string, sizeof( string ), "~w~%dg", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 2 ] );
  132. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 11 ], string );
  133.  
  134. PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 5 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
  135. PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 5 ] );
  136. PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 12 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
  137. PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 12 ] );
  138. PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 9 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
  139. PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 9 ] );
  140.  
  141. SetPlayerCameraPos( playerid, AutoSalon[ as ][ aCameraPos ][ 0 ], AutoSalon[ as ][ aCameraPos ][ 1 ], AutoSalon[ as ][ aCameraPos ][ 2 ] );
  142. SetPlayerCameraLookAt( playerid, AutoSalon[ as ][ aCameraLookAt ][ 0 ], AutoSalon[ as ][ aCameraLookAt ][ 1 ], AutoSalon[ as ][ aCameraLookAt ][ 2 ] );
  143.  
  144. Dimi_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
  145. VehicleInfo[ slotid ][ vID ] = Dimi_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], AutoSalonBojaVozila[ playerid ], AutoSalonBojaVozila[ playerid ], -1 );
  146. SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
  147. LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );
  148.  
  149. //==============================================================================//////
  150. if( VoziloJeDizel( VehicleInfo[ slotid ][ vID ] ) )
  151. {
  152. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Dizel" );
  153. }
  154. else if( VoziloJeBenzin( VehicleInfo[ slotid ][ vID ] ) )
  155. {
  156. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Benzin" );
  157. }
  158. else if( VoziloJeKerozin( VehicleInfo[ slotid ][ vID ] ) )
  159. {
  160. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Kerozin" );
  161. }
  162. else if( VoziloNemaGorivo( VehicleInfo[ slotid ][ vID ] ) )
  163. {
  164. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~N/A" );
  165. }
  166. //==============================================================================///////
  167. if( VoziloJe2Vrata( VehicleInfo[ slotid ][ vID ] ) )
  168. {
  169. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~2" );
  170. }
  171. else if( VoziloJe4Vrata( VehicleInfo[ slotid ][ vID ] ) )
  172. {
  173. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~4" );
  174. }
  175. else if( VoziloNemaVrata( VehicleInfo[ slotid ][ vID ] ) )
  176. {
  177. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~0" );
  178. }
  179. //==============================================================================////////////////
  180. if( SportVozilo( VehicleInfo[ slotid ][ vID ] ) )
  181. {
  182. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~sportsko" );
  183. }
  184. else if( PutnickoVozilo( VehicleInfo[ slotid ][ vID ] ) )
  185. {
  186. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~putnicko" );
  187. }
  188. else if( IsVehicleMotor( VehicleInfo[ slotid ][ vID ] ) )
  189. {
  190. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~motocikl" );
  191. }
  192. else if( IsVehicleBajs( VehicleInfo[ slotid ][ vID ] ) )
  193. {
  194. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~bicikl" );
  195. }
  196. else if( IsVehicleLetelica( VehicleInfo[ slotid ][ vID ] ) )
  197. {
  198. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~letilica" );
  199. }
  200. else if( IsVehicleBrod( VehicleInfo[ slotid ][ vID ] ) )
  201. {
  202. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~plovilo" );
  203. }
  204. else if( TeretnoVozilo( VehicleInfo[ slotid ][ vID ] ) )
  205. {
  206. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~teretno" );
  207. }
  208. else
  209. {
  210. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~N/A" );
  211. }
  212. //==============================================================================//////////
  213.  
  214.  
  215.  
  216.  
  217. new Cboja1 = AutoSalonBojaVozila[ playerid ];
  218. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ],Cboja1, Cboja1);
  219. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ],Cboja1, Cboja1);
  220. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ],Cboja1, Cboja1);
  221.  
  222.  
  223.  
  224. SelectTextDraw( playerid, TGBOJA );
  225. }
  226. return true;
  227. }
  228. if( playertextid == BuyCar[ playerid ][ 8 ] )
  229. {
  230. new as = GetNearestSalon( playerid ), slotid = AutoSalon[ as ][ aIzlogVeh ];
  231. if( as != -1 )
  232. {
  233. AutoSalon[ as ][ AlreadyBuying ] = false;
  234.  
  235. PlayerBuyingAS[ playerid ] = -1;
  236. AutoSalonBojaVozila[ playerid ] = -1;
  237. ModelCar[ playerid ] = 0;
  238.  
  239. Dimi_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
  240. VehicleInfo[ slotid ][ vID ] = Dimi_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ 0 ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], -1, -1, -1 );
  241. SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
  242. LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );
  243.  
  244. BuyCarTDControl( playerid, false );
  245. BojaVozilaTDControl( playerid, false );
  246. TogPlayerHud( playerid );
  247. TogglePlayerControllable( playerid, true );
  248.  
  249. SetCameraBehindPlayer( playerid );
  250. CancelSelectTextDraw( playerid );
  251. }
  252. return true;
  253. }
  254. if( playertextid == BuyCar[ playerid ][ 10 ] )
  255. {
  256.  
  257. new as = GetNearestSalon( playerid );
  258. if( as != -1 ) {
  259.  
  260. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
  261. //printf("Igrac %d - BuyCar PTD 1 test kliknuo",playerid);
  262.  
  263. strcat( DialogStrgEx, ""TG_BOJA"__________________________________________________________________\n");
  264. format( globalstring, sizeof( globalstring ),""col_white"Da li ste sigurni da zelite kupiti vozilo "TG_BOJA"%s.\n", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
  265. strcat( DialogStrgEx, globalstring );
  266. format( globalstring, sizeof( globalstring ),""col_white"Cena: "TG_BOJA"%dg zlata.\n", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]- 400 ][ 2 ] );
  267. strcat( DialogStrgEx, globalstring );
  268. strcat( DialogStrgEx, ""TG_BOJA"__________________________________________________________________");
  269.  
  270. ShowPlayerDialog( playerid, dialog_VEHGOLDBUY, DSMSG, D_NASLOV, DialogStrgEx, "Kupi", "Odustani" );
  271. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
  272.  
  273.  
  274. }
  275. return true;
  276. }
  277. if( playertextid == BuyCar[ playerid ][ 6 ] )
  278. {
  279. new as = GetNearestSalon( playerid );
  280. if( as != -1 )
  281. {
  282.  
  283. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
  284.  
  285. strcat( DialogStrgEx, ""TG_BOJA"__________________________________________________________________\n");
  286. format( globalstring, sizeof( globalstring ),""col_white"Da li ste sigurni da zelite kupiti vozilo "TG_BOJA"%s.\n", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
  287. strcat( DialogStrgEx, globalstring );
  288. format( globalstring, sizeof( globalstring ),""col_white"Cena: "TG_BOJA"%d$.\n", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]- 400 ][ 1 ] );
  289. strcat( DialogStrgEx, globalstring );
  290. strcat( DialogStrgEx, ""TG_BOJA"__________________________________________________________________");
  291.  
  292. ShowPlayerDialog( playerid, dialog_VEHMONEYBUY, DSMSG, D_NASLOV, DialogStrgEx, "Kupi", "Odustani" );
  293. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
  294.  
  295.  
  296. }
  297. return true;
  298. }
  299. ////////////////////////////////////////////////////////////////////////
  300. if( playertextid == ASBojaVozila[ 4 ] [ playerid ] )//crna
  301. {
  302. new as = GetNearestSalon( playerid );
  303. if( as != -1 )
  304. {
  305. AutoSalonBojaVozila[ playerid ] = 0;
  306. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  307. new bojica = AutoSalonBojaVozila[ playerid ];
  308. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  309. //
  310. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  311. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  312. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  313.  
  314. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  315. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  316. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  317.  
  318. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  319. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  320. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  321.  
  322. }
  323. return true;
  324. }
  325.  
  326. if( playertextid == ASBojaVozila[ 5 ] [ playerid ] )//bijela
  327. {
  328. new as = GetNearestSalon( playerid );
  329. if( as != -1 )
  330. {
  331. AutoSalonBojaVozila[ playerid ] = 1;
  332. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  333. new bojica = AutoSalonBojaVozila[ playerid ];
  334. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  335. //
  336. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  337. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  338. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  339.  
  340. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  341. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  342. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  343.  
  344. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  345. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  346. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  347. }
  348. return true;
  349. }
  350.  
  351. if( playertextid == ASBojaVozila[ 6 ] [ playerid ] )//svijetlo plava
  352. {
  353. new as = GetNearestSalon( playerid );
  354. if( as != -1 )
  355. {
  356. AutoSalonBojaVozila[ playerid ] = 135;
  357. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  358. new bojica = AutoSalonBojaVozila[ playerid ];
  359. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  360. //
  361. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  362. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  363. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  364.  
  365. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  366. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  367. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  368.  
  369. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  370. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  371. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  372. }
  373. return true;
  374. }
  375.  
  376. if( playertextid == ASBojaVozila[ 7 ] [ playerid ] )//crvena
  377. {
  378. new as = GetNearestSalon( playerid );
  379. if( as != -1 )
  380. {
  381. AutoSalonBojaVozila[ playerid ] = 3;
  382. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  383. new bojica = AutoSalonBojaVozila[ playerid ];
  384. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  385. //
  386. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  387. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  388. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  389.  
  390. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  391. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  392. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  393.  
  394. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  395. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  396. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  397. }
  398. return true;
  399. }
  400.  
  401. if( playertextid == ASBojaVozila[ 8 ] [ playerid ] )//zelenoplava
  402. {
  403. new as = GetNearestSalon( playerid );
  404. if( as != -1 )
  405. {
  406. AutoSalonBojaVozila[ playerid ] = 165;
  407. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  408. new bojica = AutoSalonBojaVozila[ playerid ];
  409. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  410. //
  411. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  412. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  413. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  414.  
  415. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  416. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  417. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  418.  
  419. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  420. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  421. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  422. }
  423. return true;
  424. }
  425.  
  426. if( playertextid == ASBojaVozila[ 9 ] [ playerid ] )//pink
  427. {
  428. new as = GetNearestSalon( playerid );
  429. if( as != -1 )
  430. {
  431. AutoSalonBojaVozila[ playerid ] = 126;
  432. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  433. new bojica = AutoSalonBojaVozila[ playerid ];
  434. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  435. //
  436. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  437. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  438. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  439.  
  440. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  441. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  442. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  443.  
  444. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  445. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  446. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  447. }
  448. return true;
  449. }
  450.  
  451. if( playertextid == ASBojaVozila[ 10 ] [ playerid ] )//zuta
  452. {
  453. new as = GetNearestSalon( playerid );
  454. if( as != -1 )
  455. {
  456. AutoSalonBojaVozila[ playerid ] = 6;
  457. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  458. new bojica = AutoSalonBojaVozila[ playerid ];
  459. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  460. //
  461. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  462. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  463. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  464.  
  465. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  466. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  467. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  468.  
  469. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  470. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  471. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  472. }
  473. return true;
  474. }
  475.  
  476. if( playertextid == ASBojaVozila[ 11 ] [ playerid ] )//zelena
  477. {
  478. new as = GetNearestSalon( playerid );
  479. if( as != -1 )
  480. {
  481. AutoSalonBojaVozila[ playerid ] = 191;
  482. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  483. new bojica = AutoSalonBojaVozila[ playerid ];
  484. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  485. //
  486. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  487. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  488. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  489.  
  490. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  491. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  492. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  493.  
  494. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  495. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  496. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  497.  
  498. }
  499. return true;
  500. }
  501.  
  502. if( playertextid == ASBojaVozila[ 12 ] [ playerid ] )//tamno ljubicasta
  503. {
  504. new as = GetNearestSalon( playerid );
  505. if( as != -1 )
  506. {
  507. AutoSalonBojaVozila[ playerid ] = 179;
  508. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  509. new bojica = AutoSalonBojaVozila[ playerid ];
  510. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  511. //
  512. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  513. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  514. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  515.  
  516. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  517. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  518. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  519.  
  520. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  521. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  522. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  523.  
  524. }
  525. return true;
  526. }
  527.  
  528. if( playertextid == ASBojaVozila[ 13 ] [ playerid ] )//svijetlo zelena
  529. {
  530. new as = GetNearestSalon( playerid );
  531. if( as != -1 )
  532. {
  533. AutoSalonBojaVozila[ playerid ] = 145;
  534. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  535. new bojica = AutoSalonBojaVozila[ playerid ];
  536. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  537. //
  538. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  539. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  540. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  541.  
  542. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  543. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  544. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  545.  
  546. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  547. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  548. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  549.  
  550. }
  551. return true;
  552. }
  553.  
  554. if( playertextid == ASBojaVozila[ 14 ] [ playerid ] )//narandjasta
  555. {
  556. new as = GetNearestSalon( playerid );
  557. if( as != -1 )
  558. {
  559. AutoSalonBojaVozila[ playerid ] = 219;
  560. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  561. new bojica = AutoSalonBojaVozila[ playerid ];
  562. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  563. //
  564. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  565. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  566. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  567.  
  568. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  569. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  570. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  571.  
  572. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  573. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  574. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  575. }
  576. return true;
  577. }
  578.  
  579. if( playertextid == ASBojaVozila[ 15 ] [ playerid ] )//tamnoplava
  580. {
  581. new as = GetNearestSalon( playerid );
  582. if( as != -1 )
  583. {
  584. AutoSalonBojaVozila[ playerid ] = 93;
  585. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  586. new bojica = AutoSalonBojaVozila[ playerid ];
  587. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  588. //
  589. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  590. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  591. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  592.  
  593. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  594. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  595. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  596.  
  597. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  598. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  599. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  600. }
  601. return true;
  602. }
  603.  
  604. if( playertextid == ASBojaVozila[ 16 ] [ playerid ] )//zelenoplava
  605. {
  606. new as = GetNearestSalon( playerid );
  607. if( as != -1 )
  608. {
  609. AutoSalonBojaVozila[ playerid ] = 155;
  610. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  611. new bojica = AutoSalonBojaVozila[ playerid ];
  612. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  613. //
  614. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  615. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  616. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  617.  
  618. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  619. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  620. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  621.  
  622. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  623. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  624. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  625. }
  626. return true;
  627. }
  628.  
  629. if( playertextid == ASBojaVozila[ 17 ] [ playerid ] )//tamno siva
  630. {
  631. new as = GetNearestSalon( playerid );
  632. if( as != -1 )
  633. {
  634. AutoSalonBojaVozila[ playerid ] = 63;
  635. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  636. new bojica = AutoSalonBojaVozila[ playerid ];
  637. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  638. //
  639. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  640. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  641. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  642.  
  643. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  644. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  645. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  646.  
  647. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  648. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  649. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  650. }
  651. return true;
  652. }
  653.  
  654. if( playertextid == ASBojaVozila[ 18 ] [ playerid ] )//tamno crvena
  655. {
  656. new as = GetNearestSalon( playerid );
  657. if( as != -1 )
  658. {
  659. AutoSalonBojaVozila[ playerid ] = 17;
  660. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  661. new bojica = AutoSalonBojaVozila[ playerid ];
  662. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  663. //
  664. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  665. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  666. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  667.  
  668. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  669. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  670. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  671.  
  672. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  673. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  674. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  675. }
  676. return true;
  677. }
  678.  
  679. ////////////////////////////////////////////////////////////////////////
  680. if( playertextid == LicnaKartaTD[19][playerid] )
  681. {
  682.  
  683.  
  684. if( LicnaKartaShowed[ playerid ] == true )
  685. {
  686.  
  687. LicnaKartaShowed[ playerid ] = false;
  688. LicnaKartaControl( playerid, false );
  689.  
  690. }
  691. return true;
  692. }
  693. if( playertextid == KladionicaSM[ playerid ][ 31 ] ) {
  694.  
  695. new str[ 128 ];
  696.  
  697. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
  698. strcat( DialogStrgEx, str );
  699.  
  700. for( new i = 0; i < 10; i++ ) {
  701.  
  702. format( str, sizeof( str ), "%s vs %s\n", bettingInfo[ Parovi[ i ][ parID ][ 0 ] ][ teamName ], bettingInfo[ Parovi[ i ][ parID ][ 1 ] ][ teamName ] );
  703.  
  704. strcat( DialogStrgEx, str );
  705. }
  706.  
  707. SPD( playerid, dialog_UPLATITIKET, DSL, "Izaberi par:", DialogStrgEx, "Izaberi", "Odustani" );
  708. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
  709. return true;
  710. }
  711. if( playertextid == RegisterTD[ playerid ][ 17 ] ) {
  712. SPD( playerid, dialog_REGISTER, DSI, "Registracija", "Password moze sadrzavati minimalno 6, a maksimalno 20 znaka", "Registriraj", "Izadji" );
  713. return true;
  714. }
  715. if( playertextid == RegisterTD[ playerid ][ 18 ] ) { // pol
  716. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Musko");
  717. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ 0 ][ 0 ] );
  718. for( new i = 23; i < 30; i ++) {
  719. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ i ] );
  720. }
  721. BiraPol[ playerid ] = 1;
  722. BiraSkin[ playerid ] = 0;
  723. return true;
  724. }
  725. if( playertextid == RegisterTD[ playerid ][ 29 ] ) { // desno
  726. if( BiraPol[ playerid ] > 0 ) {
  727. if( BiraPol[ playerid ] == 1 ) {
  728. BiraPol[ playerid ] = 2;
  729. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Zensko");
  730. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ 0 ][ 0 ] );
  731. }
  732. else if( BiraPol[ playerid ] == 2 ) {
  733. BiraPol[ playerid ] = 1;
  734. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Musko");
  735. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ 0 ][ 0 ] );
  736. }
  737. }
  738. if( BiraSkin[ playerid ] > 0 ) {
  739. if( RegSex[ playerid ] == 1 ) { // musko
  740. if( BiraSkin[ playerid ] == 4 ) BiraSkin[ playerid ] = 0;
  741. BiraSkin[ playerid ]++;
  742. PlayerInfo[ playerid ][ xSkin ] = MaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ];
  743. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ] );
  744. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], MaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
  745. }
  746. else if( RegSex[ playerid ] == 2 ) { // zensko
  747. if( BiraSkin[ playerid ] == 4 ) BiraSkin[ playerid ] = 0;
  748. BiraSkin[ playerid ]++;
  749. PlayerInfo[ playerid ][ xSkin ] = FemaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ];
  750. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ] );
  751. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], FemaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
  752. }
  753. }
  754. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ 29 ] );
  755. return true;
  756. }
  757. if( playertextid == RegisterTD[ playerid ][ 28 ] ) { // levo
  758. if( BiraPol[ playerid ] > 0 ) {
  759. if( BiraPol[ playerid ] == 1 ) {
  760. BiraPol[ playerid ] = 2;
  761. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ 0 ][ 0 ] );
  762. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Zensko");
  763. }
  764. else if( BiraPol[ playerid ] == 2 ) {
  765. BiraPol[ playerid ] = 1;
  766. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ 0 ][ 0 ] );
  767. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Musko");
  768. }
  769. }
  770. if( BiraSkin[ playerid ] > 0 ) {
  771. if( RegSex[ playerid ] == 1 ) { // musko
  772. if( BiraSkin[ playerid ] == 1 ) BiraSkin[ playerid ] = 5;
  773. BiraSkin[ playerid ]--;
  774. PlayerInfo[ playerid ][ xSkin ] = MaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ];
  775. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ] );
  776. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], MaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
  777. }
  778. else if( RegSex[ playerid ] == 2 ) { // zensko
  779. if( BiraSkin[ playerid ] == 1 ) BiraSkin[ playerid ] = 5;
  780. BiraSkin[ playerid ]--;
  781. PlayerInfo[ playerid ][ xSkin ] = FemaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ];
  782. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ] );
  783. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], FemaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
  784. }
  785. }
  786. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ 29 ] );
  787. return true;
  788. }
  789. if( playertextid == RegisterTD[ playerid ][ 27 ] ) { // izaberi
  790. if( BiraPol[ playerid ] > 0 ) {
  791. if( BiraPol[ playerid ] == 1 ) {
  792. PlayerInfo[ playerid ][ xPol ] = 1;
  793. RegSex[ playerid ] = 1;
  794. BiraPol[ playerid ] = 0;
  795. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 18 ], "Musko");
  796. PlayerInfo[ playerid ][ xSkin ] = MaleSkinIDs[ 0 ][ 0 ];
  797. }
  798. else if( BiraPol[ playerid ] == 2 ) {
  799. PlayerInfo[ playerid ][ xPol ] = 2;
  800. RegSex[ playerid ] = 2;
  801. BiraPol[ playerid ] = 0;
  802. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 18 ], "Zensko");
  803. PlayerInfo[ playerid ][ xSkin ] = FemaleSkinIDs[ 0 ][ 0 ];
  804. }
  805. }
  806. if( BiraSkin[ playerid ] > 0 ) {
  807. if( RegSex[ playerid ] == 1 ) {
  808. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 22 ], MaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
  809. }
  810. else if( RegSex[ playerid ] == 2 ) {
  811. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 22 ], FemaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
  812. }
  813. PlayerTextDrawLetterSize( playerid, RegisterTD[ playerid ][ 22 ], 0.200000, 1.000000 );
  814. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ 22 ] );
  815. BiraSkin[ playerid ] = 0;
  816. }
  817. for( new i = 23; i < 30; i ++) {
  818. PlayerTextDrawHide( playerid, RegisterTD[ playerid ][ i ] );
  819. }
  820. return true;
  821. }
  822. if( playertextid == RegisterTD[ playerid ][ 22 ] ) { // skin
  823. for( new i = 23; i < 30; i ++) {
  824. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ i ] );
  825. }
  826. if( RegSex[ playerid ] == 1 ) {
  827. PlayerInfo[ playerid ][ xSkin ] = 29;
  828. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], MaleSkinNames[ 0 ][ 0 ] );
  829. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ 0 ][ 0 ] );
  830. }
  831. else if( RegSex[ playerid ] == 2 ) {
  832. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], FemaleSkinNames[ 0 ][ 0 ] );
  833. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ 0 ][ 0 ] );
  834. }
  835. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ 22 ] );
  836. BiraPol[ playerid ] = 0;
  837. BiraSkin[ playerid ] = 1;
  838. return true;
  839. }
  840. if( playertextid == RegisterTD[ playerid ][ 21 ] ) {
  841. SPD( playerid, dialog_COUNTRY, DSL, "Poreklo", "Srbija\nHrvatska\nMakedonija\nCrna Gora\nBosna i Hercegovina\nOstalo", "Odabir", "Izadji" );
  842. return true;
  843. }
  844. if( playertextid == RegisterTD[ playerid ][ 20 ] ) {
  845. SPD( playerid, dialog_AGE, DSI, "Godine", "U prazni prostor ispod unesite vase godine\nMinimalno 12 maximalno 70", "Unos", "Izadji" );
  846. return true;
  847. }
  848. if( playertextid == RegisterTD[ playerid ][ 19 ] ) {
  849. SPD(playerid, dialog_MAIL, DSI, "Mail", "U prazni prostor ispod unesite vasu e-mail adresu.\nE-mail adresa ce nam posluziti u vracanju vaseg passworda.", "Unos", "Izadji" );
  850. return true;
  851. }
  852. if( playertextid == RegisterTD[ playerid ][ 23 ] ) {
  853. if( InputPassword[ playerid ] == false ) return GRESKA( playerid, "Nisi odabrao lozinku." );
  854. if( ChoseCountry[ playerid ] == false ) return GRESKA( playerid, "Nisi odabrao poreklo." );
  855. if( InputAge[ playerid ] == false ) return GRESKA( playerid, "Nisi odabrao godine starosti." );
  856. if( InputMail[ playerid ] == false ) return GRESKA( playerid, "Nisi uneo email." );
  857. if( RegSex[ playerid ] == 0 ) return GRESKA( playerid, "Nisi odabrao drzavu." );
  858. CancelSelectTextDraw( playerid );
  859. IgracSeRegistruje[ playerid ] = false;
  860. RegisterTDControl( playerid, false );
  861. PlayerInfo[ playerid ][ xRegistrovan ] = 1;
  862. PlayerInfo[ playerid ][ xPocetniTut ] = 0;
  863. PlayerInfo[ playerid ][ xSpawn ] = SetRandomSpawn( playerid );
  864. PlayerInfo[ playerid ][ xLevel ] = ServerInfo[ PocetniLevel ];
  865. new datum[ 64 ]; new year, month,day;
  866. getdate( year, month, day );
  867. new tmphour, tmpminute, tmpsecond;
  868. gettimeEx( tmphour, tmpminute, tmpsecond );
  869. FixHour( tmphour );
  870. tmphour = shifthour;
  871. format( datum, sizeof( datum ), "%02d/%02d/%d - %d/%d/%d", day, month, year, tmphour, tmpminute, tmpsecond );
  872. strmid( PlayerInfo[ playerid ][ xLastLogin ], datum, 0, strlen( datum ), 64 );
  873. SetPlayerScore( playerid, PlayerInfo[ playerid ][ xLevel ] );
  874. DajIgracuNovac( playerid, ServerInfo[ PocetniNovaca ] );
  875. SavePlayer( playerid );
  876. SetPlayerSkin( playerid, PlayerInfo[ playerid ][ xSkin ] );
  877. TogglePlayerSpectating( playerid, true );
  878.  
  879. InterpolateCameraPos(playerid, 374.912872, -1113.013427, 124.437553, 2345.744384, -2112.316162, 98.540664, 50000);
  880. InterpolateCameraLookAt(playerid, 379.372039, -1115.274536, 124.378959, 2343.739257, -2107.836425, 97.585632, 1);
  881. SetPlayerInterior( playerid, 0 );
  882. SetPlayerVirtualWorld( playerid, 1 );
  883. Dimi_SetPlayerPos( playerid, 473.3107, -1342.6024, 31.8416);
  884. SendClientMessage(playerid,-1, " ");//dobrodoslica
  885. SendClientMessage(playerid,-1, " ");
  886. SendClientMessage(playerid,-1, " ");
  887. SendClientMessage(playerid,-1, " ");
  888. SendClientMessage(playerid,-1, " ");
  889. SendClientMessage(playerid,-1, " ");
  890. SendClientMessage(playerid,-1, "{0080C0}___________________________| {FFFFFF}Dobro nam dosli {0080C0}|_______________________");
  891. SendClientMessage(playerid,-1, " ");
  892. SendClientMessage(playerid,-1, "Dobro nam dosli na TG Gaming");
  893. SendClientMessage(playerid,-1, "Sada sledi kratak tutorial u kom cemo vam pokazati nekoliko vaznih lokacija");
  894. SendClientMessage(playerid,-1, "Takodje cemo vas uputiti kako da zapocnete igru na nasem serveru");
  895. SendClientMessage(playerid,-1, "Da ne duzimo mnogo ostanite sa nama do kraja tutoriala.");
  896. SendClientMessage(playerid,-1, "{0080C0}__________________________________________________________________");
  897. TimerTutorial[ playerid ] = SetTimerEx( "PocetniTut", 5000, false, "ii", playerid, 1 );
  898. PocetniTutorialStartovan[ playerid ] = true;
  899. return true;
  900. }
  901. /*if( playertextid == RegisterTD[ playerid ][ 3 ] ) {
  902. Kickovanje( playerid, "Prekinuli ste registraciju i kickovani ste!" );
  903. return true;
  904. }*/
  905. //
  906. if( playertextid == TuningBuy[ playerid ][ 7 ] ) { // desno
  907. if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu." );
  908. if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return GRESKA( playerid, "Morate biti na mjestu vozaca." );
  909.  
  910. if( TPInfo[ playerid ][ tPaintjob ] == false ) {
  911.  
  912. new compid = -1, vehicleid = GetPlayerVehicleID( playerid );
  913.  
  914. for( new i = ( TPInfo[ playerid ][ tID ]+1 ); i < MAX_COMPONENTS; i++ ) {
  915. if( cInfo[ i ][ cType ] == TPInfo[ playerid ][ tType ] ) {
  916. if( cInfo[ i ][ cID ] == IsComponentidCompatible( GetVehicleModel( vehicleid ), cInfo[ i ][ cID ] ) ) {
  917. compid = i;
  918. break;
  919. }
  920. }
  921. }
  922. if( compid == -1 ) return GRESKA( playerid, "Nema vise kompatibilnih komponenti izabrane vrste za vas model auta." );
  923.  
  924. RemoveVehicleComponent( vehicleid, cInfo[ TPInfo[ playerid ][ tID ] ][ cID ] );
  925.  
  926. TPInfo[ playerid ][ tID ] = compid;
  927.  
  928. format( globalstring, sizeof( globalstring ), "%s", cInfo[ compid ][ cName ] );
  929. PlayerTextDrawSetString( playerid, TuningBuy[ playerid ][ 3 ], globalstring );
  930.  
  931. AddVehicleComponent( vehicleid, cInfo[ compid ][ cID ] );
  932.  
  933. SelectTextDraw( playerid, TGBOJA );
  934. }
  935. else if( TPInfo[ playerid ][ tPaintjob ] == true ) {
  936.  
  937. new paintid = -1, vehicleid = GetPlayerVehicleID( playerid );
  938.  
  939. for( new i = ( TPInfo[ playerid ][ tID ]+1 ); i < NUMBER_TYPE_PAINTJOB; i++ ) {
  940. if( pjInfo[ i ][ vehID ] == GetVehicleModel( vehicleid ) ) {
  941. paintid = i;
  942. break;
  943. }
  944. }
  945. if( paintid == -1 ) return GRESKA( playerid, "Nema vise kompatibilnih boja za vas model auta." );
  946.  
  947. TPInfo[ playerid ][ tID ] = paintid;
  948.  
  949. format( globalstring, sizeof( globalstring ), "%s", pjInfo[ paintid ][ pNameBre ] );
  950. PlayerTextDrawSetString( playerid, TuningBuy[ playerid ][ 3 ], globalstring );
  951.  
  952. ChangeVehiclePaintjob( vehicleid, pjInfo[ paintid ][ pNumber ] );
  953.  
  954. SelectTextDraw( playerid, TGBOJA );
  955. }
  956. return true;
  957. }
  958. if( playertextid == TuningBuy[ playerid ][ 8 ] ) { // levo
  959. if( TPInfo[ playerid ][ tPaintjob ] == false ) {
  960.  
  961. if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu." );
  962. if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return GRESKA( playerid, "Morate biti na mjestu vozaca." );
  963.  
  964. new compid = -1, vehicleid = GetPlayerVehicleID( playerid );
  965.  
  966. for( new i = (TPInfo[ playerid ][ tID ]-1); i > 0; i-- ) {
  967. if( cInfo[ i ][ cType ] == TPInfo[ playerid ][ tType ] ) {
  968. if( cInfo[ i ][ cID ] == IsComponentidCompatible( GetVehicleModel( vehicleid ), cInfo[ i ][ cID ] ) ) {
  969. compid = i;
  970. break;
  971. }
  972. }
  973. }
  974. if( compid == -1 ) return GRESKA( playerid, "Nema vise kompatibilnih komponenti izabrane vrste za vas model auta." );
  975.  
  976. RemoveVehicleComponent( vehicleid, cInfo[ TPInfo[ playerid ][ tID ] ][ cID ] );
  977.  
  978. TPInfo[ playerid ][ tID ] = compid;
  979.  
  980. format( globalstring, sizeof( globalstring ), "%s", cInfo[ compid ][ cName ] );
  981. PlayerTextDrawSetString( playerid, TuningBuy[ playerid ][ 3 ], globalstring );
  982.  
  983. AddVehicleComponent( vehicleid, cInfo[ compid ][ cID ] );
  984.  
  985. SelectTextDraw( playerid, TGBOJA );
  986. }
  987. else if( TPInfo[ playerid ][ tPaintjob ] == true ) {
  988.  
  989. new paintid = -1, vehicleid = GetPlayerVehicleID( playerid );
  990.  
  991. for( new i = (TPInfo[ playerid ][ tID ]-1); i > 0; i-- ) {
  992. if( pjInfo[ i ][ vehID ] == GetVehicleModel( vehicleid ) ) {
  993. paintid = i;
  994. break;
  995. }
  996. }
  997. if( paintid == -1 ) return GRESKA( playerid, "Nema vise kompatibilnih boja za vas model auta." );
  998.  
  999. TPInfo[ playerid ][ tID ] = paintid;
  1000.  
  1001. format( globalstring, sizeof( globalstring ), "%s", pjInfo[ paintid ][ pNameBre ] );
  1002. PlayerTextDrawSetString( playerid, TuningBuy[ playerid ][ 3 ], globalstring );
  1003.  
  1004. ChangeVehiclePaintjob( vehicleid, pjInfo[ paintid ][ pNumber ] );
  1005.  
  1006. SelectTextDraw( playerid, TGBOJA );
  1007. }
  1008. return true;
  1009. }
  1010. if( playertextid == TuningBuy[ playerid ][ 9 ] ) { // buy
  1011. if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu." );
  1012. if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return GRESKA( playerid, "Morate biti na mjestu vozaca." );
  1013.  
  1014. new Float:Pos[ 6 ], vehicleid = GetPlayerVehicleID( playerid );
  1015.  
  1016. if( TPInfo[ playerid ][ tPaintjob ] == false ) {
  1017.  
  1018. new cid = TPInfo[ playerid ][ tID ];
  1019.  
  1020. RemoveVehicleComponent( vehicleid, cInfo[ TPInfo[ playerid ][ tID ] ][ cID ] );
  1021.  
  1022. VehicleInfo[ vehicleid ][ vTuned ] = true;
  1023.  
  1024. AddVehicleComponent( vehicleid, cInfo[ cid ][ cID ] );
  1025.  
  1026. }
  1027. else if( TPInfo[ playerid ][ tPaintjob ] == true ) {
  1028.  
  1029. new paintid = TPInfo[ playerid ][ tID ];
  1030.  
  1031. VehicleInfo[ vehicleid ][ vTuned ] = true;
  1032.  
  1033. VehicleInfo[ vehicleid ][ vPaintJob ] = pjInfo[ paintid ][ pNumber ];
  1034.  
  1035. ChangeVehicleColor( vehicleid, TPInfo[ playerid ][ PJColor ][ 0 ], TPInfo[ playerid ][ PJColor ][ 1 ] );
  1036.  
  1037. ChangeVehiclePaintjob( vehicleid, pjInfo[ paintid ][ pNumber ] );
  1038.  
  1039. }
  1040. GetVehicleCameraPos( vehicleid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ], 0, 6, 2 );
  1041. SetPlayerCameraPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
  1042.  
  1043. GetVehiclePos( vehicleid, Pos[ 0 ],Pos[ 1 ],Pos[ 2 ] );
  1044. SetPlayerCameraLookAt( playerid, Pos[ 0 ],Pos[ 1 ],Pos[ 2 ] );
  1045.  
  1046. CancelSelectTextDraw( playerid );
  1047.  
  1048. TuningTDShow( playerid, false );
  1049. TogglePlayerControllable( playerid, true );
  1050.  
  1051. SPD( playerid, dialog_TUNING, DSL, D_NASLOV, "Paintjobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nWheels\nCar Stereo\nHydraulics\nNitro", D_ODABERI, D_ODUSTANI );
  1052. return true;
  1053. }
  1054. if( playertextid == TuningBuy[ playerid ][ 13 ] ) { // close
  1055.  
  1056. if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu." );
  1057. if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return GRESKA( playerid, "Morate biti na mjestu vozaca." );
  1058.  
  1059. new Float:Pos[ 6 ], vehicleid = GetPlayerVehicleID( playerid );
  1060.  
  1061. if( TPInfo[ playerid ][ tPaintjob ] == false ) {
  1062.  
  1063. RemoveVehicleComponent( vehicleid, cInfo[ TPInfo[ playerid ][ tID ] ][ cID ] );
  1064. }
  1065. else if( TPInfo[ playerid ][ tPaintjob ] == true ) {
  1066. ChangeVehiclePaintjob( vehicleid, 3 );
  1067. ChangeVehicleColor( vehicleid, TPInfo[ playerid ][ PJColor ][ 0 ], TPInfo[ playerid ][ PJColor ][ 1 ] );
  1068. }
  1069.  
  1070. GetVehicleCameraPos( vehicleid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ], 0, 6, 2 );
  1071. SetPlayerCameraPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
  1072.  
  1073. GetVehiclePos( vehicleid, Pos[ 0 ],Pos[ 1 ],Pos[ 2 ] );
  1074. SetPlayerCameraLookAt( playerid, Pos[ 0 ],Pos[ 1 ],Pos[ 2 ] );
  1075.  
  1076. CancelSelectTextDraw( playerid );
  1077.  
  1078. TuningTDShow( playerid, false );
  1079. TogglePlayerControllable( playerid, true );
  1080.  
  1081. SPD( playerid, dialog_TUNING, DSL, D_NASLOV, "Paintjobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nWheels\nCar Stereo\nHydraulics\nNitro", D_ODABERI, D_ODUSTANI );
  1082. return true;
  1083. }
  1084. //
  1085. if( playertextid == atmTD[ playerid ][ 1 ] ) { // presecanje zica
  1086. new atmid = GetNearestAtm( playerid );
  1087. if( atmid == -1 ) return GRESKA( playerid, "Nisi pored bankomata." );
  1088. if( atmInfo[ atmid ][ atmPreseceneZice ] == true ) return GRESKA( playerid, "Vec su presecene zice." );
  1089. if( atmInfo[ atmid ][ atmVremeDoRoba ] != 0 ) return GRESKA( playerid, "Ovaj bankomat je vec opljackan." );
  1090. if( GetWeapon( playerid ) != 4 ) return GRESKA( playerid, "Morate da imate noz u rukama" );
  1091.  
  1092. atmrobTimer[ playerid ] = SetTimerEx( "RobZiceAtm", 1000, true, "d", playerid );
  1093. robbingATM[ playerid ] = atmid;
  1094. robbingATMSeconds[ playerid ] = 95;
  1095.  
  1096. CancelSelectTextDraw( playerid );
  1097. SendInfoMessage( playerid, "Poceli ste sa obijanjem bankomata, ne pomerajte se sa svog mesta." );
  1098. return true;
  1099. }
  1100. if( playertextid == atmTD[ playerid ][ 2 ] ) { // ulazak u bios
  1101. new atmid = GetNearestAtm( playerid );
  1102. if( !LaptopRuke[ playerid ] ) return GRESKA( playerid, "Nemate laptop u rukama." );
  1103. if( atmid == -1 ) return GRESKA( playerid, "Nisi pored bankomata." );
  1104. if( atmInfo[ atmid ][ atmProbijenBios ] == true ) return GRESKA( playerid, "Vec je hakovan ovaj bankomat." );
  1105. if( atmInfo[ atmid ][ atmVremeDoRoba ] != 0 ) return GRESKA( playerid, "Ovaj bankomat je vec opljackan." );
  1106.  
  1107.  
  1108.  
  1109. robbingATM[ playerid ] = atmid;
  1110. atmLoadingTDControl( playerid, true );
  1111.  
  1112. PlayerTextDrawSetString( playerid, atmrobLoading[ playerid ][ 1 ], "0%" );
  1113.  
  1114. //atmrobTimer[ playerid ] = SetTimerEx( "ProgresAtmBar", 1000, false, "d", playerid );
  1115.  
  1116. CancelSelectTextDraw( playerid );
  1117. return true;
  1118. }
  1119. if( playertextid == atmTD[ playerid ][ 3 ] ) { // kradja novca
  1120. new atmid = GetNearestAtm( playerid );
  1121. if( atmid == -1 ) return GRESKA( playerid, "Nisi pored bankomata." );
  1122. if( atmInfo[ atmid ][ atmVremeDoRoba ] != 0 ) return GRESKA( playerid, "Ovaj bankomat je vec opljackan." );
  1123. if( atmInfo[ atmid ][ atmPreseceneZice ] == true ) {
  1124. new pokusaj = random(4);
  1125. if( pokusaj == 1 ) {
  1126. Dimi_KillTimer( atmrobTimer[ playerid ] );
  1127.  
  1128. SendInfoMessage( playerid, "Niste uspeli ukrasti novac, alarm se oglasio." );
  1129. PostaviWanted( playerid, "Pokusaj pljacke bankomata", "Nepoznati", 3 );
  1130.  
  1131. atmInfo[ atmid ][ atmVremeDoRoba ] = 60;
  1132. SacuvajATM( atmid );
  1133. PlayerInfo[ playerid ][ xPljackaVreme ] = 60;
  1134.  
  1135. atmTDControl( playerid, false );
  1136. }
  1137. else {
  1138. Dimi_KillTimer( atmrobTimer[ playerid ] );
  1139.  
  1140. new money = ( random(5000)+10000 );
  1141. DajIgracuNovac( playerid, money );
  1142. SavePlayer( playerid ); UpdateBankTD( playerid );
  1143. SendInfoMessage( playerid, "Uspjesno ste ukrali iz bankomata %d$.", money );
  1144. PostaviWanted( playerid, "Pljacka bankomata", "Nepoznati", 3 );
  1145.  
  1146. atmInfo[ atmid ][ atmVremeDoRoba ] = 120;
  1147. SacuvajATM( atmid );
  1148. PlayerInfo[ playerid ][ xPljackaVreme ] = 120;
  1149.  
  1150. atmTDControl( playerid, false );
  1151. }
  1152. }
  1153. else if( atmInfo[ atmid ][ atmProbijenBios ] == true ) {
  1154. new pokusaj = random(4);
  1155. if( pokusaj == 1 ) {
  1156. Dimi_KillTimer( atmrobTimer[ playerid ] );
  1157.  
  1158. SendInfoMessage( playerid, "Niste uspeli prebaciti novac na vas racun, sistem zastite bankomata je ponovno podignut." );
  1159. PostaviWanted( playerid, "Pokusaj pljacke bankomata", "Nepoznati", 3 );
  1160.  
  1161. atmInfo[ atmid ][ atmVremeDoRoba ] = 60;
  1162. SacuvajATM( atmid );
  1163. PlayerInfo[ playerid ][ xPljackaVreme ] = 60;
  1164.  
  1165. atmTDControl( playerid, false );
  1166. }
  1167. else {
  1168. Dimi_KillTimer( atmrobTimer[ playerid ] );
  1169.  
  1170. new money = ( random(5000)+10000 );
  1171. PlayerInfo[ playerid ][ xBRacun ] += money;
  1172. SavePlayer( playerid ); UpdateBankTD( playerid );
  1173. SendInfoMessage( playerid, "Uspjesno ste sa bankomata prebacili %d$ na vas racun.", money );
  1174. PostaviWanted( playerid, "Pljacka bankomata", "Nepoznati", 3 );
  1175.  
  1176. atmInfo[ atmid ][ atmVremeDoRoba ] = 120;
  1177. SacuvajATM( atmid );
  1178. PlayerInfo[ playerid ][ xPljackaVreme ] = 120;
  1179.  
  1180. atmTDControl( playerid, false );
  1181. }
  1182. }
  1183. else return GRESKA( playerid, "Moras prvo da hakujes bankomat ili da mu preseces zice." );
  1184. return true;
  1185. }
  1186. //
  1187. if( playertextid == buyWatch[ playerid ][ 3 ] ) {
  1188. new text[ 30 ];
  1189. if( WatchModel[ playerid ] == 19039 ) {
  1190. if( PlayerInfo[ playerid ][ xNovac ] < 521 ) return GRESKA( playerid, "Nemate dovoljno novca." );
  1191. DajIgracuNovac( playerid, -521 );
  1192. text = "Rolex Datejust za 521$";
  1193. PlayerInfo[ playerid ][ xSat ] = 19039;
  1194. }
  1195. else if( WatchModel[ playerid ] == 19040 ) {
  1196. if( PlayerInfo[ playerid ][ xNovac ] < 618 ) return GRESKA( playerid, "Nemate dovoljno novca." );
  1197. DajIgracuNovac( playerid, -618 );
  1198. text = "Emporio Armani za 618$";
  1199. PlayerInfo[ playerid ][ xSat ] = 19040;
  1200. }
  1201. else if( WatchModel[ playerid ] == 19041 ) {
  1202. if( PlayerInfo[ playerid ][ xNovac ] < 723 ) return GRESKA( playerid, "Nemate dovoljno novca." );
  1203. DajIgracuNovac( playerid, -723 );
  1204. text = "Casio G-Shock za 723$";
  1205. PlayerInfo[ playerid ][ xSat ] = 19041;
  1206. }
  1207. else if( WatchModel[ playerid ] == 19042 ) {
  1208. if( PlayerInfo[ playerid ][ xNovac ] < 819 ) return GRESKA( playerid, "Nemate dovoljno novca." );
  1209. DajIgracuNovac( playerid, -819 );
  1210. text = "Michael Kors za 819$";
  1211. PlayerInfo[ playerid ][ xSat ] = 19042;
  1212. }
  1213. else if( WatchModel[ playerid ] == 19043 ) {
  1214. if( PlayerInfo[ playerid ][ xNovac ] < 916 ) return GRESKA( playerid, "Nemate dovoljno novca." );
  1215. DajIgracuNovac( playerid, -916 );
  1216. text = "Hugo Boss za 916$";
  1217. PlayerInfo[ playerid ][ xSat ] = 19043;
  1218. }
  1219.  
  1220. SendInfoMessage( playerid, "Uspjesno si kupio sat marke %s.( koristi komandu /sat ).", text );
  1221.  
  1222. SavePlayer( playerid );
  1223.  
  1224. buyWatchTDControl( playerid, false );
  1225. return true;
  1226. }
  1227. if( playertextid == buyWatch[ playerid ][ 7 ] ) {
  1228. SendInfoMessage( playerid, "Odustali ste od kupovine sata." );
  1229. buyWatchTDControl( playerid, false );
  1230. return true;
  1231. }
  1232. if( playertextid == buyWatch[ playerid ][ 4 ] ) {
  1233. new text[ 30 ];
  1234. if( WatchModel[ playerid ] == 19043 ) return 1;
  1235. WatchModel[ playerid ]++;
  1236. PlayerTextDrawSetPreviewModel( playerid, buyWatch[ playerid ][ 1 ], WatchModel[ playerid ] );
  1237. PlayerTextDrawShow( playerid, buyWatch[ playerid ][ 1 ] );
  1238. if( WatchModel[ playerid ] == 19039 ) text = "Rolex Datejust - 521$";
  1239. else if( WatchModel[ playerid ] == 19040 ) text = "Emporio Armani - 618$";
  1240. else if( WatchModel[ playerid ] == 19041 ) text = "Casio G-Shock - 723$";
  1241. else if( WatchModel[ playerid ] == 19042 ) text = "Michael Kors - 819$";
  1242. else if( WatchModel[ playerid ] == 19043 ) text = "Hugo Boss - 916$";
  1243. PlayerTextDrawSetString( playerid, buyWatch[ playerid ][ 2 ], text );
  1244. return true;
  1245. }
  1246. if( playertextid == buyWatch[ playerid ][ 5 ] ) {
  1247. new text[ 30 ];
  1248. if( WatchModel[ playerid ] == 19039 ) return 1;
  1249. WatchModel[ playerid ]--;
  1250. PlayerTextDrawSetPreviewModel( playerid, buyWatch[ playerid ][ 1 ], WatchModel[ playerid ] );
  1251. PlayerTextDrawShow( playerid, buyWatch[ playerid ][ 1 ] );
  1252. if( WatchModel[ playerid ] == 19039 ) text = "Rolex Datejust - 521$";
  1253. else if( WatchModel[ playerid ] == 19040 ) text = "Emporio Armani - 618$";
  1254. else if( WatchModel[ playerid ] == 19041 ) text = "Casio G-Shock - 723$";
  1255. else if( WatchModel[ playerid ] == 19042 ) text = "Michael Kors - 819$";
  1256. else if( WatchModel[ playerid ] == 19043 ) text = "Hugo Boss - 916$";
  1257. PlayerTextDrawSetString( playerid, buyWatch[ playerid ][ 2 ], text );
  1258. return true;
  1259. }
  1260. //
  1261. if( playertextid == Ormar[ playerid ][ 8 ] ) {
  1262. if( II[ inProperty[ playerid ] ][ iSkin ][ 0 ] == GetPlayerSkin( playerid ) ) { II[ inProperty[ playerid ] ][ iSkin ][ 0 ] = 0; }
  1263. if( II[ inProperty[ playerid ] ][ iSkin ][ 1 ] == GetPlayerSkin( playerid ) ) { II[ inProperty[ playerid ] ][ iSkin ][ 1 ] = 0; }
  1264. if( II[ inProperty[ playerid ] ][ iSkin ][ 2 ] == GetPlayerSkin( playerid ) ) { II[ inProperty[ playerid ] ][ iSkin ][ 2 ] = 0; }
  1265.  
  1266. SaveProperty( inProperty[ playerid ] );
  1267. PlayerInfo[ playerid ][ xSkin ] = GetPlayerSkin( playerid );
  1268. SCM( playerid, TGBOJA, "Obukli ste drugu odecu. " );
  1269. Dimi_SetPlayerPos( playerid, II[ inProperty[ playerid ] ][ iExit ][ 0 ], II[ inProperty[ playerid ] ][ iExit ][ 1 ], II[ inProperty[ playerid ] ][ iExit ][ 2 ] );
  1270. SetPlayerInterior( playerid, II[ inProperty[ playerid ] ][ iInterior ] );
  1271. SetPlayerVirtualWorld( playerid, II[ inProperty[ playerid ] ][ iVW ] );
  1272. ClearAnimations( playerid );
  1273. GameTextForPlayer( playerid, "Ucitavanje ...", 1000, 4 );
  1274. SetTimerEx( "SlobodnoSada", 2000, false, "i", playerid );
  1275. SetCameraBehindPlayer( playerid );
  1276. TogglePlayerControllable( playerid, false );
  1277. CancelSelectTextDraw( playerid );
  1278. OrmarTDControl( playerid, false );
  1279. TogglePlayerControllable( playerid, true );
  1280. return true;
  1281. }
  1282. if( playertextid == Ormar[ playerid ][ 3 ] ) {
  1283. if( II[ inProperty[ playerid ] ][ iSkin ][ 0 ] == 0 ) return GRESKA( playerid, " U ovom slotu nemate odecu." );
  1284. SetPlayerSkin( playerid, II[ inProperty[ playerid ] ][ iSkin ][ 0 ] ); ApplyAnimation( playerid, "CLOTHES","CLO_Pose_Legs",4.1,1,0,0,0,0, 1);
  1285. return true;
  1286. }
  1287. if( playertextid == Ormar[ playerid ][ 4 ] ) {
  1288. if( II[ inProperty[ playerid ] ][ iSkin ][ 1 ] == 0 ) return GRESKA( playerid, " U ovom slotu nemate odecu." );
  1289. SetPlayerSkin( playerid, II[ inProperty[ playerid ] ][ iSkin ][ 1 ] ); ApplyAnimation( playerid, "CLOTHES","CLO_Pose_Legs",4.1,1,0,0,0,0, 1);
  1290. return true;
  1291. }
  1292. if( playertextid == Ormar[ playerid ][ 5 ] ) {
  1293. if( II[ inProperty[ playerid ] ][ iSkin ][ 2 ] == 0 ) return GRESKA( playerid, " U ovom slotu nemate odecu." );
  1294. SetPlayerSkin( playerid, II[ inProperty[ playerid ] ][ iSkin ][ 2 ] ); ApplyAnimation( playerid, "CLOTHES","CLO_Pose_Legs",4.1,1,0,0,0,0, 1);
  1295. return true;
  1296. }
  1297. if( playertextid == Ormar[ playerid ][ 9 ] ) {
  1298. Dimi_SetPlayerPos( playerid, II[ inProperty[ playerid ] ][ iExit ][ 0 ], II[ inProperty[ playerid ] ][ iExit ][ 1 ], II[ inProperty[ playerid ] ][ iExit ][ 2 ] );
  1299. SetPlayerInterior( playerid, II[ inProperty[ playerid ] ][ iInterior ] );
  1300. SetPlayerVirtualWorld( playerid, II[ inProperty[ playerid ] ][ iVW ] );
  1301. SCM( playerid, TGBOJA, "Odustali ste od oblacenja nove odece. " );
  1302. SetPlayerSkin( playerid, PlayerInfo[ playerid ][ xSkin ] );
  1303. ClearAnimations( playerid );
  1304. GameTextForPlayer( playerid, "Ucitavanje ...", 1000, 4 );
  1305. SetTimerEx( "SlobodnoSada", 2000, false, "i", playerid );
  1306. SetCameraBehindPlayer( playerid );
  1307. TogglePlayerControllable( playerid, false );
  1308. CancelSelectTextDraw( playerid );
  1309. OrmarTDControl( playerid, false );
  1310. TogglePlayerControllable( playerid, true );
  1311. return true;
  1312. }
  1313. if( playertextid == ObjektTD[ playerid ][ 4 ] ) {
  1314. if( ListaoObjekte[ playerid ] == 0 ) return 1;
  1315. ListaoObjekte[ playerid ]--;
  1316. new i = ListaoObjekte[ playerid ];
  1317. DestroyObject( glavniobjekt );
  1318. glavniobjekt = CreateObject( OBPR[ i ][ 0 ], OBPR1[ i ][ 0 ], OBPR1[ i ][ 1 ], OBPR1[ i ][ 2 ], OBPR1[ i ][ 3 ], OBPR1[ i ][4], OBPR1[ i ][5] );
  1319.  
  1320. format( globalstring, sizeof( globalstring ), "cena: ~w~%d$", OBPR[ i ][ 1 ] );
  1321. PlayerTextDrawSetString( playerid, ObjektTD[ playerid ][ 1 ], globalstring );
  1322. return true;
  1323. }
  1324. if( playertextid == ObjektTD[ playerid ][ 2 ] ) {
  1325.  
  1326. if( ListaoObjekte[ playerid ] == (MAX_OBJ_FURNITURE-1) ) return 1;
  1327. ListaoObjekte[ playerid ]++;
  1328. new i = ListaoObjekte[ playerid ];
  1329. DestroyObject( glavniobjekt );
  1330. glavniobjekt = CreateObject( OBPR[ i ][ 0 ], OBPR1[ i ][ 0 ], OBPR1[ i ][ 1 ], OBPR1[ i ][ 2 ], OBPR1[ i ][ 3 ], OBPR1[ i ][4], OBPR1[ i ][5] );
  1331.  
  1332. format( globalstring, sizeof( globalstring ), "cena: ~w~%d$", OBPR[ i ][ 1 ] );
  1333. PlayerTextDrawSetString( playerid, ObjektTD[ playerid ][ 1 ], globalstring );
  1334. return true;
  1335. }
  1336. if( playertextid == ObjektTD[ playerid ][ 5 ] ) {
  1337. new i = ListaoObjekte[ playerid ];
  1338.  
  1339. if( ServerInfo[ Namestaj ] == 0 ) return GRESKA( playerid, "Nema vise namestaja u resursima za namestaje." );
  1340.  
  1341. if( PlayerInfo[ playerid ][ xNovac ] < OBPR[ i ][ 1 ] ) return GRESKA( playerid, " Nemate dovoljno novca." );
  1342. if( PlayerInfo[ playerid ][ xObject ][ 0 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 0 ] = OBPR[ i ][ 0 ]; }
  1343. else if( PlayerInfo[ playerid ][ xObject ][ 1 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 1 ] = OBPR[ i ][ 0 ]; }
  1344. else if( PlayerInfo[ playerid ][ xObject ][ 2 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 2 ] = OBPR[ i ][ 0 ]; }
  1345. else if( PlayerInfo[ playerid ][ xObject ][ 3 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 3 ] = OBPR[ i ][ 0 ]; }
  1346. else if( PlayerInfo[ playerid ][ xObject ][ 4 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 4 ] = OBPR[ i ][ 0 ]; }
  1347. else if( PlayerInfo[ playerid ][ xObject ][ 5 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 5 ] = OBPR[ i ][ 0 ]; }
  1348. else if( PlayerInfo[ playerid ][ xObject ][ 6 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 6 ] = OBPR[ i ][ 0 ]; }
  1349. else if( PlayerInfo[ playerid ][ xObject ][ 7 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 7 ] = OBPR[ i ][ 0 ]; }
  1350. else if( PlayerInfo[ playerid ][ xObject ][ 8 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 8 ] = OBPR[ i ][ 0 ]; }
  1351. else if( PlayerInfo[ playerid ][ xObject ][ 9 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 9 ] = OBPR[ i ][ 0 ]; }
  1352. else { GRESKA( playerid, "Vec ste kupili 10 objekta, nema mesta vise u kamionu." ); return 1; }
  1353. DajIgracuNovac( playerid, -OBPR[ i ][ 1 ] );
  1354. SCM( playerid, TGBOJA, "Uspjesno ste kupili namestaj!" );
  1355. SCM( playerid, TGBOJA, "Na mjestu gdje zelite postaviti namestaj, upisite /namestaj postavi" );
  1356. SCM( playerid, TGBOJA, "Mozete kupiti 10 namestaja odjednom." );
  1357. ServerInfo[ Namestaj ] -= 1;
  1358. SaveServerStats( );
  1359. return true;
  1360. }
  1361. if( playertextid == ObjektTD[ playerid ][ 3 ] ) {
  1362.  
  1363. nekokupujenamestaj = 0;
  1364. KupujeNamestaj[ playerid ] = 0;
  1365. ListaoObjekte[ playerid ] = 0;
  1366. TogglePlayerControllable( playerid, true );
  1367. SetCameraBehindPlayer( playerid );
  1368. CancelSelectTextDraw( playerid );
  1369. ObjektTDControl( playerid, false );
  1370. return true;
  1371. }
  1372. if( playertextid == Police_TV[ playerid ][ 3 ] )
  1373. {
  1374. SPD( playerid, dialog_SEARCH_NAME, DSI, D_NASLOV, "Upisite Ime i prezime gradjanina(Ime_Prezime) kojega zelite potraziti u bazi podataka:", D_ODABERI, D_ODUSTANI );
  1375. return true;
  1376. }
  1377. if( playertextid == Police_TV[ playerid ][ 6 ] )
  1378. {
  1379. SPD( playerid, dialog_SEARCH_NUMBERPLATE, DSI, D_NASLOV, "Unesite broj tablice u prazno polje.(bez nula-00 i bez LS( samo broj ) )", D_ODABERI, D_ODUSTANI );
  1380. return true;
  1381. }
  1382. if( playertextid == Police_TV[ playerid ][ 13 ] )
  1383. {
  1384. Police_TVTDControl( playerid, false );
  1385. CancelSelectTextDraw( playerid );
  1386. SetPVarInt( playerid, "Computer", 0 );
  1387. return true;
  1388. }
  1389. if( playertextid == Police_TV[ playerid ][ 12 ] )
  1390. {
  1391. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
  1392. strcat( DialogStrgEx, "|_______-=Popis svih osumnjicenih=-________|\n" );
  1393. foreach( Player, i )
  1394. {
  1395. if( IsPlayerConnected( i ) )
  1396. {
  1397. if( PlayerInfo[ i ][ xWanted ] > 0 )
  1398. {
  1399. format( globalstring, sizeof( globalstring ), "- %s | Wanted Level: %d\n", ImeIgraca( i ), PlayerInfo[ i ][ xWanted ] );
  1400. strcat( DialogStrgEx, globalstring );
  1401. }
  1402. }
  1403. }
  1404. ShowPlayerDialog( playerid, 0, DSMSG, D_NASLOV, DialogStrgEx, "U redu", "" );
  1405. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
  1406. return true;
  1407. }
  1408. if( playertextid == Police_TV[ playerid ][ 8 ] )
  1409. {
  1410. if(GetPVarInt( playerid, "RequestingBackup") != 1)
  1411. {
  1412. format( globalstring, sizeof( globalstring ), "SVE JEDINICE: %s trazi pojacanje i oznacen je na GPSu (crveno).", ImeIgraca( playerid ) );
  1413. SetPVarInt( playerid, "RequestingBackup", 1);
  1414.  
  1415. foreach( Player, i )
  1416. {
  1417. if( IsPlayerConnected(i))
  1418. {
  1419. if( OI[ PlayerInfo[ i ][ xClan ] ][ oTip ] == ORG_TIP_PD )
  1420. {
  1421. SetPlayerMarkerForPlayer( i, playerid, 0xFF0000FF );
  1422. SCM( i, 0x8D8DFF00, globalstring );
  1423. }
  1424. }
  1425. }
  1426. SCM( playerid, 0x8D8DFF00, "Ukucajte /bkc da bi ste izbrisali pojacanje." );
  1427. backuptimer[ playerid ] = SetTimerEx( "BackupClear", 180000, false, "ii", playerid, 1 );
  1428. } else GRESKA( playerid, "Vec imate aktivan zahjtev za pojacanje!");
  1429. return true;
  1430. }
  1431. if( playertextid == Police_TV[ playerid ][ 10 ] )
  1432. {
  1433. SPD( playerid, dialog_POSTAVIPOTERU, DSI, D_NASLOV, "Upisite Ime i prezime gradjanina(Ime_Prezime) i razlog za potjeru.", D_ODABERI, D_ODUSTANI );
  1434. return true;
  1435. }
  1436. //
  1437. if( playertextid == PizzaMenu[ playerid ][ 7 ] ) {
  1438.  
  1439. if( PlayerInfo[ playerid ][ xNovac ] < 67 ) return GRESKA( playerid, "Nemate dovoljno novca 67$!");
  1440. BussinesMoney( uFirmi[ playerid ] , 67 );
  1441. DajIgracuNovac( playerid, -67 );
  1442. DodajIgracuHP( playerid, 30 );
  1443. format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
  1444. PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
  1445. OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  1446. PizzaMenuTDControl( playerid, false );
  1447. return true;
  1448. }
  1449. if( playertextid == PizzaMenu[ playerid ][ 10 ] ) {
  1450.  
  1451. if( PlayerInfo[ playerid ][ xNovac ] < 79) return GRESKA( playerid, "Nemate dovoljno novca 79$!");
  1452. BussinesMoney( uFirmi[ playerid ] , 79);
  1453. DajIgracuNovac( playerid, -79 );
  1454. DodajIgracuHP( playerid, 30 );
  1455. format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
  1456. PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
  1457. OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  1458. PizzaMenuTDControl( playerid, false );
  1459. return true;
  1460. }
  1461. if( playertextid == PizzaMenu[ playerid ][ 13 ] ) {
  1462.  
  1463. if( PlayerInfo[ playerid ][ xNovac ] < 81) return GRESKA( playerid, "Nemate dovoljno novca 81$!");
  1464.  
  1465. BussinesMoney( uFirmi[ playerid ] , 81);
  1466. DajIgracuNovac( playerid, -81 );
  1467. DodajIgracuHP( playerid, 30 );
  1468.  
  1469. format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
  1470. PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
  1471. OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  1472. PizzaMenuTDControl( playerid, false );
  1473. return true;
  1474. }
  1475. if( playertextid == PizzaMenu[ playerid ][ 16 ] ) {
  1476.  
  1477. if( PlayerInfo[ playerid ][ xNovac ] < 89) return GRESKA( playerid, "Nemate dovoljno novca 89$!");
  1478.  
  1479. BussinesMoney( uFirmi[ playerid ] , 89);
  1480. DajIgracuNovac( playerid, -89 );
  1481. DodajIgracuHP( playerid, 30 );
  1482.  
  1483. format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
  1484. PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
  1485. OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  1486. PizzaMenuTDControl( playerid, false );
  1487. return true;
  1488. }
  1489. if( playertextid == PizzaMenu[ playerid ][ 19 ] ) {
  1490.  
  1491. if( PlayerInfo[ playerid ][ xNovac ] < 98) return GRESKA( playerid, "Nemate dovoljno novca 98$!");
  1492.  
  1493. BussinesMoney( uFirmi[ playerid ] , 98);
  1494. DajIgracuNovac( playerid, -98 );
  1495. DodajIgracuHP( playerid, 30 );
  1496.  
  1497. format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
  1498. PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
  1499. OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  1500. PizzaMenuTDControl( playerid, false );
  1501. return true;
  1502. }
  1503. if( playertextid == PizzaMenu[ playerid ][ 22 ] ) {
  1504.  
  1505. if( PlayerInfo[ playerid ][ xNovac ] < 108) return GRESKA( playerid, "Nemate dovoljno novca 108$!");
  1506.  
  1507. BussinesMoney( uFirmi[ playerid ] , 108);
  1508. DajIgracuNovac( playerid, -108 );
  1509. DodajIgracuHP( playerid, 30 );
  1510.  
  1511. format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
  1512. PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
  1513. OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  1514. PizzaMenuTDControl( playerid, false );
  1515. return true;
  1516. }
  1517. //--------------------stats---------------------------------------------
  1518.  
  1519. //
  1520. if( playertextid == ZaposljavanjeTD[ playerid ][ 7 ] ) {
  1521.  
  1522. if( PlayerInfo[ playerid ][ xPosao ] != 0 ) {
  1523. GRESKA( playerid, "Vec imate posao!Koristite /otkaz da date otkaz!");
  1524. ZaposljavanjeTDControl( playerid, false, "", "", "" );
  1525. CancelSelectTextDraw( playerid );
  1526. return true;
  1527. }
  1528.  
  1529. if( GetPlayerState( playerid ) != 1 ) {
  1530. GRESKA( playerid, "Ne smete biti u vozilu!");
  1531. ZaposljavanjeTDControl( playerid, false, "", "", "" );
  1532. CancelSelectTextDraw( playerid );
  1533. return true;
  1534. }
  1535.  
  1536. if( ChosenJob[ playerid ] == POSAO_MEHANICAR ) {
  1537. if( PlayerInfo[ playerid ][ xSrednja ] != 6 ) return GRESKA( playerid, "Moras da zavrsis prvo srednju skolu. " );
  1538. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Mehanicar",
  1539. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Mehanicar!\n\n" \
  1540. ""col_job"Potrebno je da odradite barem 3 sati ugovora kako bi ste dali otkaz!\n" \
  1541. ""col_job"Komande posla: "col_white" /mechanic /tow", "U redu", "");
  1542. }
  1543. else if( ChosenJob[ playerid ] == POSAO_MASINOVODJA ) {
  1544. //if( PlayerInfo[ playerid ][ xFakultet ] != 15 ) return GRESKA( playerid, "Moras prvo da zavrsis fakultet. " );
  1545. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Masinovodja",
  1546. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Masinovodja!\n\n" \
  1547. ""col_job"Potrebno je da odradite barem 3 sati ugovora kako bi ste dali otkaz!\n" \
  1548. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  1549. }
  1550. else if( ChosenJob[ playerid ] == POSAO_PREVOZNIK ) {
  1551. if( PlayerInfo[ playerid ][ xKamionskaC1 ] == 0 ) return GRESKA( playerid, "Ne posedujes dozvolu za kombije. ");
  1552. if( PlayerInfo[ playerid ][ xKamionskaC2 ] == 0 ) return GRESKA( playerid, "Ne posedujes dozvolu za kamione. ");
  1553. if( PlayerInfo[ playerid ][ xKamionskaC3 ] == 0 ) return GRESKA( playerid, "Ne posedujes dozvolu za kamione sa prikolicom. ");
  1554. if( PlayerInfo[ playerid ][ xVozacka ] == 0 ) return GRESKA( playerid, "Ne posedujes vozacku dozvolu. ");
  1555. if( PlayerInfo[ playerid ][ xSrednja ] != 6 ) return GRESKA( playerid, "Moras da zavrsis prvo srednju skolu. " );
  1556. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Prevoznik",
  1557. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Prevoznik!\n\n" \
  1558. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  1559. ""col_job"Komande posla: "col_white" /prevozdrveca /prevozsljunka /uniforma /prekiniposao", "U redu", "");
  1560. }
  1561. else if( ChosenJob[ playerid ] == POSAO_KOSAC ) {
  1562. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Kosac trave",
  1563. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Kosac trave!\n\n" \
  1564. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  1565. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  1566. }
  1567. else if( ChosenJob[ playerid ] == POSAO_KOMUNALAC ) {
  1568. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Komunalac",
  1569. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Komunalac!\n\n" \
  1570. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  1571. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  1572. }
  1573. else if( ChosenJob[ playerid ] == POSAO_GRADJEVINAR ) {
  1574. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Gradjevinar",
  1575. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Gradjevinar!\n\n" \
  1576. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  1577. ""col_job"Komande posla: "col_white"/prekiniposao /uniforma", "U redu", "");
  1578. }
  1579. else if( ChosenJob[ playerid ] == POSAO_PIZZA ) {
  1580. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Dostavljac pica",
  1581. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Dostavljac pica!\n\n" \
  1582. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  1583. ""col_job"Komande posla: "col_white" /pizza", "U redu", "");
  1584. }
  1585. else if( ChosenJob[ playerid ] == POSAO_PILOT ) {
  1586. if( PlayerInfo[ playerid ][ xLetelica ] == 0 ) return GRESKA( playerid, "Ne posedujes dozvolu za avion/helic." );
  1587. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Pilot",
  1588. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Pilot!\n\n" \
  1589. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  1590. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  1591. }
  1592. else if( ChosenJob[ playerid ] == POSAO_FARMER ) {
  1593. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Farmer",
  1594. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Farmer!\n\n" \
  1595. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  1596. ""col_job"Komande posla: "col_white" /uzmisemenke /uzmikantu /muzikrave /uniforma /prekiniposao", "U redu", "");
  1597. }
  1598. else if( ChosenJob[ playerid ] == POSAO_BUSVOZAC ) {
  1599. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Bus vozac",
  1600. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Bus vozac!\n\n" \
  1601. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  1602. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  1603. }
  1604. else if( ChosenJob[ playerid ] == POSAO_RUDAR ) {
  1605. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Rudar",
  1606. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Rudar!\n\n" \
  1607. ""col_job"Potrebno je da odradite barem 3 sati ugovora kako bi ste dali otkaz!\n" \
  1608. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  1609. }
  1610. else if( ChosenJob[ playerid ] == POSAO_PREVOZNOVCA ) {
  1611. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Prevoznik Novca",
  1612. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Prevoznik Novca!\n\n" \
  1613. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  1614. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  1615. }
  1616. else if( ChosenJob[ playerid ] == POSAO_RIBAR ) {
  1617. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Ribar",
  1618. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Ribar!\n\n" \
  1619. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  1620. ""col_job"Komande posla: "col_white" /pecaj /uniforma /zavrsipecanje", "U redu", "");
  1621. }
  1622. else if( ChosenJob[ playerid ] == POSAO_PNAMESTAJA ) {
  1623. ShowPlayerDialog( playerid, 0, DSMSG, "Proizvodjac Namestaja",
  1624. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Proizvodjac Namestaja!\n\n" \
  1625. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  1626. ""col_job"Komande posla: "col_white" /posao /uniforma /ostavidrvo /uzmidrvo", "U redu", "");
  1627. }
  1628. else if( ChosenJob[ playerid ] == POSAO_MERKATORDOSTAVA ) {
  1629. ShowPlayerDialog( playerid, 0, DSMSG, "Merkator Dostavljac",
  1630. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Merkator Dostavljac!\n\n" \
  1631. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  1632. ""col_job"Komande posla: "col_white" /uzmiktuiju /uniforma", "U redu", "");
  1633. }
  1634.  
  1635. PlayerInfo[ playerid ][ xPosao ] = ChosenJob[ playerid ];
  1636. PlayerInfo[ playerid ][ xUgovor ] = 0;
  1637. SavePlayer( playerid );
  1638.  
  1639. ZaposljavanjeTDControl( playerid, false, "", "", "" );
  1640. CancelSelectTextDraw( playerid );
  1641. return true;
  1642. }
  1643. if( playertextid == ZaposljavanjeTD[ playerid ][ 8 ] ) {
  1644. SendInfoMessage( playerid, "Odustali ste od zaposljavanja." );
  1645. ZaposljavanjeTDControl( playerid, false, "", "", "" );
  1646. CancelSelectTextDraw( playerid );
  1647. return true;
  1648. }
  1649.  
  1650. // sasasa
  1651. if(Start[ playerid ] != PlayerText:INVALID_TEXT_DRAW) {
  1652. if(DEALSTEXT == playertextid)
  1653. {
  1654. if(PP_Info[ playerid ][click_dealbutton] == WAIT_CLICKDEALTEXT) return 1;
  1655. if(PP_Info[ playerid ][click_dealbutton] == FIRST_CLICKDEALTEXT)
  1656. {
  1657. if(PP_Info[ playerid ][Credit] < 1) return GRESKA(playerid, "Nemas na racunu. Klikni na {FFFFFF}ADD COIN");
  1658. if(PP_Info[ playerid ][Credit] < PP_Info[ playerid ][PokerBet])
  1659. {
  1660. PP_Info[ playerid ][PokerBet] = PP_Info[ playerid ][Credit];
  1661. }
  1662. PP_Info[ playerid ][Credit] -= PP_Info[ playerid ][PokerBet];
  1663. PP_Info[ playerid ][click_dealbutton] = WAIT_CLICKDEALTEXT;
  1664. PlayerTextDrawHide(playerid, ADDCOINSTEXT);
  1665. PlayerTextDrawHide(playerid, BETTEXT);
  1666. PlayerPlaySound(playerid, 43000, 0.00, 0.00, 0.00);
  1667. RandomCard(PP_Info[ playerid ][fivecards_hand], 10);
  1668. WinnText(playerid);
  1669. BetCredit(playerid);
  1670. TextDrawDizajn(playerid, 0);
  1671. } else {
  1672. PP_Info[ playerid ][click_dealbutton] = FIRST_CLICKDEALTEXT;
  1673. PlayerTextDrawShow(playerid, ADDCOINSTEXT);
  1674. PlayerTextDrawShow(playerid, BETTEXT);
  1675. for(new i; i < 5; i++)
  1676. {
  1677. if(PP_Info[ playerid ][holdstate][i] == HOLDON)
  1678. {
  1679. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, " ");
  1680. PP_Info[ playerid ][holdstate][i] = HOLDOFF;
  1681. } else {
  1682. Swap(PP_Info[ playerid ][fivecards_hand][i], PP_Info[ playerid ][fivecards_hand][i + 5]);
  1683. PlayerTextDrawSetString(playerid, CARDSTEXT + PlayerText:i, LD_POKE[PP_Info[ playerid ][fivecards_hand][i]]);
  1684. }
  1685. }
  1686. new
  1687. first,
  1688. second,
  1689. rank = get_rank(PP_Info[ playerid ][fivecards_hand]),
  1690. win = get_win(rank);
  1691. rankname(rank, first, second);
  1692. if(win > ONE_PAIR)
  1693. {
  1694. PP_Info[ playerid ][Credit] += (pot[win] * PP_Info[ playerid ][PokerBet]);
  1695. switch(win)
  1696. {
  1697. case STRAIGHT, FLUSH, STRAIGHT_FLUSH, FULL_HOUSE, ROYAL_FLUSH:
  1698. {
  1699. for(new i = 0; i < 5; i++)
  1700. {
  1701. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdmid");
  1702. }
  1703. }
  1704. case TWO_PAIR:
  1705. {
  1706. for(new i = 0; i < 5; i++)
  1707. {
  1708. if(first == Card_Value[PP_Info[ playerid ][fivecards_hand][i]] ||
  1709. second == Card_Value[PP_Info[ playerid ][fivecards_hand][i]])
  1710. {
  1711. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdmid");
  1712. }
  1713. }
  1714. }
  1715. case THREE_OF_A_KIND, FOUR_OF_A_KIND:
  1716. {
  1717. for(new i = 0; i < 5; i++)
  1718. {
  1719. if(first == Card_Value[PP_Info[ playerid ][fivecards_hand][i]])
  1720. {
  1721. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdmid");
  1722. }
  1723. }
  1724. }
  1725. }
  1726. PlayerPlaySound(playerid, 5448, 0.00, 0.00, 0.00);
  1727. WinnText(playerid, win, rank);
  1728. BetCredit(playerid);
  1729. } else {
  1730. for(new i = 0; i < 5; i++)
  1731. {
  1732. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "_");
  1733. }
  1734. }
  1735. }
  1736. } else {
  1737. if(PP_Info[ playerid ][click_dealbutton] == SECOND_CLICKDEALTEXT)
  1738. {
  1739. for(new i = 0; i < 5; i++)
  1740. {
  1741. if(CARDSTEXT + PlayerText:i == playertextid)
  1742. {
  1743. PP_Info[ playerid ][holdstate][i] = HOLDOFF - PP_Info[ playerid ][holdstate][i];
  1744. if(PP_Info[ playerid ][holdstate][i])
  1745. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "_");
  1746. else
  1747. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdon");
  1748. PlayerPlaySound(playerid, 21000, 0.00, 0.00, 0.00);
  1749. return 1;
  1750. }
  1751. }
  1752. }
  1753. else if(ADDCOINSTEXT == playertextid)
  1754. {
  1755. if( PlayerInfo[ playerid ][ xNovac ] < 100)
  1756. {
  1757. GRESKA( playerid, "Nemas novca.");
  1758. } else {
  1759. DajIgracuNovac( playerid, -100 );
  1760. PP_Info[ playerid ][ Credit ] += 100;
  1761. BetCredit(playerid);
  1762. PlayerPlaySound(playerid, 4203, 0.00, 0.00, 0.00);
  1763. }
  1764. return 1;
  1765. }
  1766. else if(BETTEXT == playertextid)
  1767. {
  1768. if(PP_Info[ playerid ][PokerBet] < 100)
  1769. PP_Info[ playerid ][PokerBet]++;
  1770. else
  1771. PP_Info[ playerid ][PokerBet] = 5;
  1772.  
  1773. BetCredit(playerid);
  1774. WinnText(playerid);
  1775. PlayerPlaySound(playerid, 4202, 0.00, 0.00, 0.00);
  1776. return 1;
  1777. }
  1778. }
  1779.  
  1780. if(CHANGEBACKGROUND == playertextid)
  1781. {
  1782. PP_Info[ playerid ][LastBackGround]++;
  1783. if(PP_Info[ playerid ][LastBackGround] == sizeof BackGroundData)
  1784. PP_Info[ playerid ][LastBackGround] = 0;
  1785. PlayerTextDrawSetString(playerid, BACKGROUND, BackGroundData[PP_Info[ playerid ][LastBackGround]]);
  1786. return 1;
  1787. }
  1788.  
  1789. if(EXITPOKER == playertextid)
  1790. {
  1791. ExitPoker(playerid);
  1792. return 1;
  1793. }
  1794. }
  1795. }
  1796. return 1;
  1797. }
  1798. RAW Paste Data
  1799. Public OnPlayerClickPlayerTextDraw( playerid, PlayerText:playertextid )
  1800. {
  1801. if( _:playertextid != INVALID_TEXT_DRAW )
  1802. {
  1803. if( playertextid == BuyCar[ playerid ][ 1 ] )
  1804. {
  1805. new as = GetNearestSalon( playerid ), slotid = AutoSalon[ as ][ aIzlogVeh ];
  1806. if( as != -1 )
  1807. {
  1808. if( ModelCar[ playerid ] == (AutoSalon[ as ][ aMaxVehModel ]-1) ) return 1;
  1809.  
  1810. ModelCar[ playerid ]++;
  1811.  
  1812. new string[ 128 ];
  1813. format( string, sizeof( string ), "%s", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
  1814. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 3 ], string );
  1815.  
  1816. format( string, sizeof( string ), "~w~%d$", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 1 ] );
  1817. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 7 ], string );
  1818.  
  1819. format( string, sizeof( string ), "~w~%dg", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 2 ] );
  1820. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 11 ], string );
  1821.  
  1822. PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 5 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
  1823. PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 5 ] );
  1824.  
  1825. PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 12 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
  1826. PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 12 ] );
  1827.  
  1828. PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 9 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
  1829. PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 9 ] );
  1830.  
  1831. SetPlayerCameraPos( playerid, AutoSalon[ as ][ aCameraPos ][ 0 ], AutoSalon[ as ][ aCameraPos ][ 1 ], AutoSalon[ as ][ aCameraPos ][ 2 ] );
  1832. SetPlayerCameraLookAt( playerid, AutoSalon[ as ][ aCameraLookAt ][ 0 ], AutoSalon[ as ][ aCameraLookAt ][ 1 ], AutoSalon[ as ][ aCameraLookAt ][ 2 ] );
  1833.  
  1834. Dimi_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
  1835. VehicleInfo[ slotid ][ vID ] = Dimi_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], AutoSalonBojaVozila[ playerid ], AutoSalonBojaVozila[ playerid ], -1 );
  1836. SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
  1837. LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );
  1838.  
  1839. //==============================================================================//////
  1840. if( VoziloJeDizel( VehicleInfo[ slotid ][ vID ] ) )
  1841. {
  1842. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Dizel" );
  1843. }
  1844. else if( VoziloJeBenzin( VehicleInfo[ slotid ][ vID ] ) )
  1845. {
  1846. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Benzin" );
  1847. }
  1848. else if( VoziloJeKerozin( VehicleInfo[ slotid ][ vID ] ) )
  1849. {
  1850. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Kerozin" );
  1851. }
  1852. else if( VoziloNemaGorivo( VehicleInfo[ slotid ][ vID ] ) )
  1853. {
  1854. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~N/A" );
  1855. }
  1856. //==============================================================================///////
  1857. if( VoziloJe2Vrata( VehicleInfo[ slotid ][ vID ] ) )
  1858. {
  1859. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~2" );
  1860. }
  1861. else if( VoziloJe4Vrata( VehicleInfo[ slotid ][ vID ] ) )
  1862. {
  1863. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~4" );
  1864. }
  1865. else if( VoziloNemaVrata( VehicleInfo[ slotid ][ vID ] ) )
  1866. {
  1867. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~0" );
  1868. }
  1869. //==============================================================================////////////////
  1870. if( SportVozilo( VehicleInfo[ slotid ][ vID ] ) )
  1871. {
  1872. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~sportsko" );
  1873. }
  1874. else if( PutnickoVozilo( VehicleInfo[ slotid ][ vID ] ) )
  1875. {
  1876. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~putnicko" );
  1877. }
  1878. else if( IsVehicleMotor( VehicleInfo[ slotid ][ vID ] ) )
  1879. {
  1880. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~motocikl" );
  1881. }
  1882. else if( IsVehicleBajs( VehicleInfo[ slotid ][ vID ] ) )
  1883. {
  1884. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~bicikl" );
  1885. }
  1886. else if( IsVehicleLetelica( VehicleInfo[ slotid ][ vID ] ) )
  1887. {
  1888. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~letilica" );
  1889. }
  1890. else if( IsVehicleBrod( VehicleInfo[ slotid ][ vID ] ) )
  1891. {
  1892. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~plovilo" );
  1893. }
  1894. else if( TeretnoVozilo( VehicleInfo[ slotid ][ vID ] ) )
  1895. {
  1896. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~teretno" );
  1897. }
  1898. else
  1899. {
  1900. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~N/A" );
  1901. }
  1902. //==============================================================================//////////
  1903.  
  1904.  
  1905. new Cboja1 = AutoSalonBojaVozila[ playerid ];
  1906. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ],Cboja1, Cboja1);
  1907. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ],Cboja1, Cboja1);
  1908. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ],Cboja1, Cboja1);
  1909.  
  1910. SelectTextDraw( playerid, TGBOJA );
  1911. }
  1912. return true;
  1913. }
  1914. if( playertextid == BuyCar[ playerid ][ 4 ] )
  1915. {
  1916. new as = GetNearestSalon( playerid ), slotid = AutoSalon[ as ][ aIzlogVeh ];
  1917. if( as != -1 )
  1918. {
  1919. if( ModelCar[ playerid ] == 0 ) return 1;
  1920. ModelCar[ playerid ]--;
  1921.  
  1922. new string[ 128 ];
  1923. format( string, sizeof( string ), "%s", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
  1924. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 3 ], string );
  1925.  
  1926. format( string, sizeof( string ), "~w~%d$", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 1 ] );
  1927. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 7 ], string );
  1928.  
  1929. format( string, sizeof( string ), "~w~%dg", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 2 ] );
  1930. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 11 ], string );
  1931.  
  1932. PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 5 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
  1933. PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 5 ] );
  1934. PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 12 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
  1935. PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 12 ] );
  1936. PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 9 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
  1937. PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 9 ] );
  1938.  
  1939. SetPlayerCameraPos( playerid, AutoSalon[ as ][ aCameraPos ][ 0 ], AutoSalon[ as ][ aCameraPos ][ 1 ], AutoSalon[ as ][ aCameraPos ][ 2 ] );
  1940. SetPlayerCameraLookAt( playerid, AutoSalon[ as ][ aCameraLookAt ][ 0 ], AutoSalon[ as ][ aCameraLookAt ][ 1 ], AutoSalon[ as ][ aCameraLookAt ][ 2 ] );
  1941.  
  1942. Dimi_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
  1943. VehicleInfo[ slotid ][ vID ] = Dimi_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], AutoSalonBojaVozila[ playerid ], AutoSalonBojaVozila[ playerid ], -1 );
  1944. SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
  1945. LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );
  1946.  
  1947. //==============================================================================//////
  1948. if( VoziloJeDizel( VehicleInfo[ slotid ][ vID ] ) )
  1949. {
  1950. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Dizel" );
  1951. }
  1952. else if( VoziloJeBenzin( VehicleInfo[ slotid ][ vID ] ) )
  1953. {
  1954. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Benzin" );
  1955. }
  1956. else if( VoziloJeKerozin( VehicleInfo[ slotid ][ vID ] ) )
  1957. {
  1958. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Kerozin" );
  1959. }
  1960. else if( VoziloNemaGorivo( VehicleInfo[ slotid ][ vID ] ) )
  1961. {
  1962. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~N/A" );
  1963. }
  1964. //==============================================================================///////
  1965. if( VoziloJe2Vrata( VehicleInfo[ slotid ][ vID ] ) )
  1966. {
  1967. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~2" );
  1968. }
  1969. else if( VoziloJe4Vrata( VehicleInfo[ slotid ][ vID ] ) )
  1970. {
  1971. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~4" );
  1972. }
  1973. else if( VoziloNemaVrata( VehicleInfo[ slotid ][ vID ] ) )
  1974. {
  1975. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~0" );
  1976. }
  1977. //==============================================================================////////////////
  1978. if( SportVozilo( VehicleInfo[ slotid ][ vID ] ) )
  1979. {
  1980. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~sportsko" );
  1981. }
  1982. else if( PutnickoVozilo( VehicleInfo[ slotid ][ vID ] ) )
  1983. {
  1984. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~putnicko" );
  1985. }
  1986. else if( IsVehicleMotor( VehicleInfo[ slotid ][ vID ] ) )
  1987. {
  1988. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~motocikl" );
  1989. }
  1990. else if( IsVehicleBajs( VehicleInfo[ slotid ][ vID ] ) )
  1991. {
  1992. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~bicikl" );
  1993. }
  1994. else if( IsVehicleLetelica( VehicleInfo[ slotid ][ vID ] ) )
  1995. {
  1996. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~letilica" );
  1997. }
  1998. else if( IsVehicleBrod( VehicleInfo[ slotid ][ vID ] ) )
  1999. {
  2000. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~plovilo" );
  2001. }
  2002. else if( TeretnoVozilo( VehicleInfo[ slotid ][ vID ] ) )
  2003. {
  2004. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~teretno" );
  2005. }
  2006. else
  2007. {
  2008. PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~N/A" );
  2009. }
  2010. //==============================================================================//////////
  2011.  
  2012.  
  2013.  
  2014.  
  2015. new Cboja1 = AutoSalonBojaVozila[ playerid ];
  2016. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ],Cboja1, Cboja1);
  2017. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ],Cboja1, Cboja1);
  2018. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ],Cboja1, Cboja1);
  2019.  
  2020.  
  2021.  
  2022. SelectTextDraw( playerid, TGBOJA );
  2023. }
  2024. return true;
  2025. }
  2026. if( playertextid == BuyCar[ playerid ][ 8 ] )
  2027. {
  2028. new as = GetNearestSalon( playerid ), slotid = AutoSalon[ as ][ aIzlogVeh ];
  2029. if( as != -1 )
  2030. {
  2031. AutoSalon[ as ][ AlreadyBuying ] = false;
  2032.  
  2033. PlayerBuyingAS[ playerid ] = -1;
  2034. AutoSalonBojaVozila[ playerid ] = -1;
  2035. ModelCar[ playerid ] = 0;
  2036.  
  2037. Dimi_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
  2038. VehicleInfo[ slotid ][ vID ] = Dimi_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ 0 ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], -1, -1, -1 );
  2039. SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
  2040. LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );
  2041.  
  2042. BuyCarTDControl( playerid, false );
  2043. BojaVozilaTDControl( playerid, false );
  2044. TogPlayerHud( playerid );
  2045. TogglePlayerControllable( playerid, true );
  2046.  
  2047. SetCameraBehindPlayer( playerid );
  2048. CancelSelectTextDraw( playerid );
  2049. }
  2050. return true;
  2051. }
  2052. if( playertextid == BuyCar[ playerid ][ 10 ] )
  2053. {
  2054.  
  2055. new as = GetNearestSalon( playerid );
  2056. if( as != -1 ) {
  2057.  
  2058. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
  2059. //printf("Igrac %d - BuyCar PTD 1 test kliknuo",playerid);
  2060.  
  2061. strcat( DialogStrgEx, ""TG_BOJA"__________________________________________________________________\n");
  2062. format( globalstring, sizeof( globalstring ),""col_white"Da li ste sigurni da zelite kupiti vozilo "TG_BOJA"%s.\n", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
  2063. strcat( DialogStrgEx, globalstring );
  2064. format( globalstring, sizeof( globalstring ),""col_white"Cena: "TG_BOJA"%dg zlata.\n", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]- 400 ][ 2 ] );
  2065. strcat( DialogStrgEx, globalstring );
  2066. strcat( DialogStrgEx, ""TG_BOJA"__________________________________________________________________");
  2067.  
  2068. ShowPlayerDialog( playerid, dialog_VEHGOLDBUY, DSMSG, D_NASLOV, DialogStrgEx, "Kupi", "Odustani" );
  2069. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
  2070.  
  2071.  
  2072. }
  2073. return true;
  2074. }
  2075. if( playertextid == BuyCar[ playerid ][ 6 ] )
  2076. {
  2077. new as = GetNearestSalon( playerid );
  2078. if( as != -1 )
  2079. {
  2080.  
  2081. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
  2082.  
  2083. strcat( DialogStrgEx, ""TG_BOJA"__________________________________________________________________\n");
  2084. format( globalstring, sizeof( globalstring ),""col_white"Da li ste sigurni da zelite kupiti vozilo "TG_BOJA"%s.\n", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
  2085. strcat( DialogStrgEx, globalstring );
  2086. format( globalstring, sizeof( globalstring ),""col_white"Cena: "TG_BOJA"%d$.\n", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]- 400 ][ 1 ] );
  2087. strcat( DialogStrgEx, globalstring );
  2088. strcat( DialogStrgEx, ""TG_BOJA"__________________________________________________________________");
  2089.  
  2090. ShowPlayerDialog( playerid, dialog_VEHMONEYBUY, DSMSG, D_NASLOV, DialogStrgEx, "Kupi", "Odustani" );
  2091. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
  2092.  
  2093.  
  2094. }
  2095. return true;
  2096. }
  2097. ////////////////////////////////////////////////////////////////////////
  2098. if( playertextid == ASBojaVozila[ 4 ] [ playerid ] )//crna
  2099. {
  2100. new as = GetNearestSalon( playerid );
  2101. if( as != -1 )
  2102. {
  2103. AutoSalonBojaVozila[ playerid ] = 0;
  2104. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2105. new bojica = AutoSalonBojaVozila[ playerid ];
  2106. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2107. //
  2108. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2109. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2110. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2111.  
  2112. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2113. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2114. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2115.  
  2116. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2117. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2118. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2119.  
  2120. }
  2121. return true;
  2122. }
  2123.  
  2124. if( playertextid == ASBojaVozila[ 5 ] [ playerid ] )//bijela
  2125. {
  2126. new as = GetNearestSalon( playerid );
  2127. if( as != -1 )
  2128. {
  2129. AutoSalonBojaVozila[ playerid ] = 1;
  2130. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2131. new bojica = AutoSalonBojaVozila[ playerid ];
  2132. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2133. //
  2134. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2135. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2136. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2137.  
  2138. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2139. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2140. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2141.  
  2142. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2143. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2144. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2145. }
  2146. return true;
  2147. }
  2148.  
  2149. if( playertextid == ASBojaVozila[ 6 ] [ playerid ] )//svijetlo plava
  2150. {
  2151. new as = GetNearestSalon( playerid );
  2152. if( as != -1 )
  2153. {
  2154. AutoSalonBojaVozila[ playerid ] = 135;
  2155. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2156. new bojica = AutoSalonBojaVozila[ playerid ];
  2157. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2158. //
  2159. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2160. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2161. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2162.  
  2163. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2164. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2165. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2166.  
  2167. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2168. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2169. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2170. }
  2171. return true;
  2172. }
  2173.  
  2174. if( playertextid == ASBojaVozila[ 7 ] [ playerid ] )//crvena
  2175. {
  2176. new as = GetNearestSalon( playerid );
  2177. if( as != -1 )
  2178. {
  2179. AutoSalonBojaVozila[ playerid ] = 3;
  2180. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2181. new bojica = AutoSalonBojaVozila[ playerid ];
  2182. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2183. //
  2184. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2185. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2186. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2187.  
  2188. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2189. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2190. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2191.  
  2192. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2193. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2194. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2195. }
  2196. return true;
  2197. }
  2198.  
  2199. if( playertextid == ASBojaVozila[ 8 ] [ playerid ] )//zelenoplava
  2200. {
  2201. new as = GetNearestSalon( playerid );
  2202. if( as != -1 )
  2203. {
  2204. AutoSalonBojaVozila[ playerid ] = 165;
  2205. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2206. new bojica = AutoSalonBojaVozila[ playerid ];
  2207. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2208. //
  2209. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2210. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2211. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2212.  
  2213. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2214. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2215. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2216.  
  2217. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2218. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2219. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2220. }
  2221. return true;
  2222. }
  2223.  
  2224. if( playertextid == ASBojaVozila[ 9 ] [ playerid ] )//pink
  2225. {
  2226. new as = GetNearestSalon( playerid );
  2227. if( as != -1 )
  2228. {
  2229. AutoSalonBojaVozila[ playerid ] = 126;
  2230. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2231. new bojica = AutoSalonBojaVozila[ playerid ];
  2232. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2233. //
  2234. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2235. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2236. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2237.  
  2238. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2239. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2240. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2241.  
  2242. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2243. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2244. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2245. }
  2246. return true;
  2247. }
  2248.  
  2249. if( playertextid == ASBojaVozila[ 10 ] [ playerid ] )//zuta
  2250. {
  2251. new as = GetNearestSalon( playerid );
  2252. if( as != -1 )
  2253. {
  2254. AutoSalonBojaVozila[ playerid ] = 6;
  2255. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2256. new bojica = AutoSalonBojaVozila[ playerid ];
  2257. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2258. //
  2259. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2260. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2261. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2262.  
  2263. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2264. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2265. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2266.  
  2267. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2268. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2269. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2270. }
  2271. return true;
  2272. }
  2273.  
  2274. if( playertextid == ASBojaVozila[ 11 ] [ playerid ] )//zelena
  2275. {
  2276. new as = GetNearestSalon( playerid );
  2277. if( as != -1 )
  2278. {
  2279. AutoSalonBojaVozila[ playerid ] = 191;
  2280. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2281. new bojica = AutoSalonBojaVozila[ playerid ];
  2282. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2283. //
  2284. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2285. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2286. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2287.  
  2288. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2289. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2290. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2291.  
  2292. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2293. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2294. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2295.  
  2296. }
  2297. return true;
  2298. }
  2299.  
  2300. if( playertextid == ASBojaVozila[ 12 ] [ playerid ] )//tamno ljubicasta
  2301. {
  2302. new as = GetNearestSalon( playerid );
  2303. if( as != -1 )
  2304. {
  2305. AutoSalonBojaVozila[ playerid ] = 179;
  2306. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2307. new bojica = AutoSalonBojaVozila[ playerid ];
  2308. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2309. //
  2310. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2311. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2312. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2313.  
  2314. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2315. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2316. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2317.  
  2318. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2319. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2320. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2321.  
  2322. }
  2323. return true;
  2324. }
  2325.  
  2326. if( playertextid == ASBojaVozila[ 13 ] [ playerid ] )//svijetlo zelena
  2327. {
  2328. new as = GetNearestSalon( playerid );
  2329. if( as != -1 )
  2330. {
  2331. AutoSalonBojaVozila[ playerid ] = 145;
  2332. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2333. new bojica = AutoSalonBojaVozila[ playerid ];
  2334. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2335. //
  2336. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2337. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2338. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2339.  
  2340. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2341. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2342. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2343.  
  2344. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2345. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2346. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2347.  
  2348. }
  2349. return true;
  2350. }
  2351.  
  2352. if( playertextid == ASBojaVozila[ 14 ] [ playerid ] )//narandjasta
  2353. {
  2354. new as = GetNearestSalon( playerid );
  2355. if( as != -1 )
  2356. {
  2357. AutoSalonBojaVozila[ playerid ] = 219;
  2358. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2359. new bojica = AutoSalonBojaVozila[ playerid ];
  2360. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2361. //
  2362. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2363. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2364. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2365.  
  2366. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2367. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2368. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2369.  
  2370. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2371. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2372. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2373. }
  2374. return true;
  2375. }
  2376.  
  2377. if( playertextid == ASBojaVozila[ 15 ] [ playerid ] )//tamnoplava
  2378. {
  2379. new as = GetNearestSalon( playerid );
  2380. if( as != -1 )
  2381. {
  2382. AutoSalonBojaVozila[ playerid ] = 93;
  2383. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2384. new bojica = AutoSalonBojaVozila[ playerid ];
  2385. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2386. //
  2387. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2388. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2389. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2390.  
  2391. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2392. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2393. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2394.  
  2395. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2396. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2397. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2398. }
  2399. return true;
  2400. }
  2401.  
  2402. if( playertextid == ASBojaVozila[ 16 ] [ playerid ] )//zelenoplava
  2403. {
  2404. new as = GetNearestSalon( playerid );
  2405. if( as != -1 )
  2406. {
  2407. AutoSalonBojaVozila[ playerid ] = 155;
  2408. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2409. new bojica = AutoSalonBojaVozila[ playerid ];
  2410. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2411. //
  2412. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2413. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2414. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2415.  
  2416. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2417. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2418. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2419.  
  2420. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2421. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2422. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2423. }
  2424. return true;
  2425. }
  2426.  
  2427. if( playertextid == ASBojaVozila[ 17 ] [ playerid ] )//tamno siva
  2428. {
  2429. new as = GetNearestSalon( playerid );
  2430. if( as != -1 )
  2431. {
  2432. AutoSalonBojaVozila[ playerid ] = 63;
  2433. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2434. new bojica = AutoSalonBojaVozila[ playerid ];
  2435. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2436. //
  2437. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2438. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2439. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2440.  
  2441. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2442. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2443. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2444.  
  2445. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2446. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2447. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2448. }
  2449. return true;
  2450. }
  2451.  
  2452. if( playertextid == ASBojaVozila[ 18 ] [ playerid ] )//tamno crvena
  2453. {
  2454. new as = GetNearestSalon( playerid );
  2455. if( as != -1 )
  2456. {
  2457. AutoSalonBojaVozila[ playerid ] = 17;
  2458. new slotid = AutoSalon[ as ][ aIzlogVeh ];
  2459. new bojica = AutoSalonBojaVozila[ playerid ];
  2460. ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
  2461. //
  2462. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
  2463. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
  2464. PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
  2465.  
  2466. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
  2467. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
  2468. PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
  2469.  
  2470. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
  2471. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
  2472. PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
  2473. }
  2474. return true;
  2475. }
  2476.  
  2477. ////////////////////////////////////////////////////////////////////////
  2478. if( playertextid == LicnaKartaTD[19][playerid] )
  2479. {
  2480.  
  2481.  
  2482. if( LicnaKartaShowed[ playerid ] == true )
  2483. {
  2484.  
  2485. LicnaKartaShowed[ playerid ] = false;
  2486. LicnaKartaControl( playerid, false );
  2487.  
  2488. }
  2489. return true;
  2490. }
  2491. if( playertextid == KladionicaSM[ playerid ][ 31 ] ) {
  2492.  
  2493. new str[ 128 ];
  2494.  
  2495. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
  2496. strcat( DialogStrgEx, str );
  2497.  
  2498. for( new i = 0; i < 10; i++ ) {
  2499.  
  2500. format( str, sizeof( str ), "%s vs %s\n", bettingInfo[ Parovi[ i ][ parID ][ 0 ] ][ teamName ], bettingInfo[ Parovi[ i ][ parID ][ 1 ] ][ teamName ] );
  2501.  
  2502. strcat( DialogStrgEx, str );
  2503. }
  2504.  
  2505. SPD( playerid, dialog_UPLATITIKET, DSL, "Izaberi par:", DialogStrgEx, "Izaberi", "Odustani" );
  2506. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
  2507. return true;
  2508. }
  2509. if( playertextid == RegisterTD[ playerid ][ 17 ] ) {
  2510. SPD( playerid, dialog_REGISTER, DSI, "Registracija", "Password moze sadrzavati minimalno 6, a maksimalno 20 znaka", "Registriraj", "Izadji" );
  2511. return true;
  2512. }
  2513. if( playertextid == RegisterTD[ playerid ][ 18 ] ) { // pol
  2514. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Musko");
  2515. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ 0 ][ 0 ] );
  2516. for( new i = 23; i < 30; i ++) {
  2517. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ i ] );
  2518. }
  2519. BiraPol[ playerid ] = 1;
  2520. BiraSkin[ playerid ] = 0;
  2521. return true;
  2522. }
  2523. if( playertextid == RegisterTD[ playerid ][ 29 ] ) { // desno
  2524. if( BiraPol[ playerid ] > 0 ) {
  2525. if( BiraPol[ playerid ] == 1 ) {
  2526. BiraPol[ playerid ] = 2;
  2527. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Zensko");
  2528. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ 0 ][ 0 ] );
  2529. }
  2530. else if( BiraPol[ playerid ] == 2 ) {
  2531. BiraPol[ playerid ] = 1;
  2532. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Musko");
  2533. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ 0 ][ 0 ] );
  2534. }
  2535. }
  2536. if( BiraSkin[ playerid ] > 0 ) {
  2537. if( RegSex[ playerid ] == 1 ) { // musko
  2538. if( BiraSkin[ playerid ] == 4 ) BiraSkin[ playerid ] = 0;
  2539. BiraSkin[ playerid ]++;
  2540. PlayerInfo[ playerid ][ xSkin ] = MaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ];
  2541. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ] );
  2542. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], MaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
  2543. }
  2544. else if( RegSex[ playerid ] == 2 ) { // zensko
  2545. if( BiraSkin[ playerid ] == 4 ) BiraSkin[ playerid ] = 0;
  2546. BiraSkin[ playerid ]++;
  2547. PlayerInfo[ playerid ][ xSkin ] = FemaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ];
  2548. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ] );
  2549. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], FemaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
  2550. }
  2551. }
  2552. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ 29 ] );
  2553. return true;
  2554. }
  2555. if( playertextid == RegisterTD[ playerid ][ 28 ] ) { // levo
  2556. if( BiraPol[ playerid ] > 0 ) {
  2557. if( BiraPol[ playerid ] == 1 ) {
  2558. BiraPol[ playerid ] = 2;
  2559. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ 0 ][ 0 ] );
  2560. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Zensko");
  2561. }
  2562. else if( BiraPol[ playerid ] == 2 ) {
  2563. BiraPol[ playerid ] = 1;
  2564. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ 0 ][ 0 ] );
  2565. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Musko");
  2566. }
  2567. }
  2568. if( BiraSkin[ playerid ] > 0 ) {
  2569. if( RegSex[ playerid ] == 1 ) { // musko
  2570. if( BiraSkin[ playerid ] == 1 ) BiraSkin[ playerid ] = 5;
  2571. BiraSkin[ playerid ]--;
  2572. PlayerInfo[ playerid ][ xSkin ] = MaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ];
  2573. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ] );
  2574. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], MaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
  2575. }
  2576. else if( RegSex[ playerid ] == 2 ) { // zensko
  2577. if( BiraSkin[ playerid ] == 1 ) BiraSkin[ playerid ] = 5;
  2578. BiraSkin[ playerid ]--;
  2579. PlayerInfo[ playerid ][ xSkin ] = FemaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ];
  2580. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ] );
  2581. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], FemaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
  2582. }
  2583. }
  2584. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ 29 ] );
  2585. return true;
  2586. }
  2587. if( playertextid == RegisterTD[ playerid ][ 27 ] ) { // izaberi
  2588. if( BiraPol[ playerid ] > 0 ) {
  2589. if( BiraPol[ playerid ] == 1 ) {
  2590. PlayerInfo[ playerid ][ xPol ] = 1;
  2591. RegSex[ playerid ] = 1;
  2592. BiraPol[ playerid ] = 0;
  2593. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 18 ], "Musko");
  2594. PlayerInfo[ playerid ][ xSkin ] = MaleSkinIDs[ 0 ][ 0 ];
  2595. }
  2596. else if( BiraPol[ playerid ] == 2 ) {
  2597. PlayerInfo[ playerid ][ xPol ] = 2;
  2598. RegSex[ playerid ] = 2;
  2599. BiraPol[ playerid ] = 0;
  2600. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 18 ], "Zensko");
  2601. PlayerInfo[ playerid ][ xSkin ] = FemaleSkinIDs[ 0 ][ 0 ];
  2602. }
  2603. }
  2604. if( BiraSkin[ playerid ] > 0 ) {
  2605. if( RegSex[ playerid ] == 1 ) {
  2606. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 22 ], MaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
  2607. }
  2608. else if( RegSex[ playerid ] == 2 ) {
  2609. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 22 ], FemaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
  2610. }
  2611. PlayerTextDrawLetterSize( playerid, RegisterTD[ playerid ][ 22 ], 0.200000, 1.000000 );
  2612. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ 22 ] );
  2613. BiraSkin[ playerid ] = 0;
  2614. }
  2615. for( new i = 23; i < 30; i ++) {
  2616. PlayerTextDrawHide( playerid, RegisterTD[ playerid ][ i ] );
  2617. }
  2618. return true;
  2619. }
  2620. if( playertextid == RegisterTD[ playerid ][ 22 ] ) { // skin
  2621. for( new i = 23; i < 30; i ++) {
  2622. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ i ] );
  2623. }
  2624. if( RegSex[ playerid ] == 1 ) {
  2625. PlayerInfo[ playerid ][ xSkin ] = 29;
  2626. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], MaleSkinNames[ 0 ][ 0 ] );
  2627. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ 0 ][ 0 ] );
  2628. }
  2629. else if( RegSex[ playerid ] == 2 ) {
  2630. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], FemaleSkinNames[ 0 ][ 0 ] );
  2631. PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ 0 ][ 0 ] );
  2632. }
  2633. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ 22 ] );
  2634. BiraPol[ playerid ] = 0;
  2635. BiraSkin[ playerid ] = 1;
  2636. return true;
  2637. }
  2638. if( playertextid == RegisterTD[ playerid ][ 21 ] ) {
  2639. SPD( playerid, dialog_COUNTRY, DSL, "Poreklo", "Srbija\nHrvatska\nMakedonija\nCrna Gora\nBosna i Hercegovina\nOstalo", "Odabir", "Izadji" );
  2640. return true;
  2641. }
  2642. if( playertextid == RegisterTD[ playerid ][ 20 ] ) {
  2643. SPD( playerid, dialog_AGE, DSI, "Godine", "U prazni prostor ispod unesite vase godine\nMinimalno 12 maximalno 70", "Unos", "Izadji" );
  2644. return true;
  2645. }
  2646. if( playertextid == RegisterTD[ playerid ][ 19 ] ) {
  2647. SPD(playerid, dialog_MAIL, DSI, "Mail", "U prazni prostor ispod unesite vasu e-mail adresu.\nE-mail adresa ce nam posluziti u vracanju vaseg passworda.", "Unos", "Izadji" );
  2648. return true;
  2649. }
  2650. if( playertextid == RegisterTD[ playerid ][ 23 ] ) {
  2651. if( InputPassword[ playerid ] == false ) return GRESKA( playerid, "Nisi odabrao lozinku." );
  2652. if( ChoseCountry[ playerid ] == false ) return GRESKA( playerid, "Nisi odabrao poreklo." );
  2653. if( InputAge[ playerid ] == false ) return GRESKA( playerid, "Nisi odabrao godine starosti." );
  2654. if( InputMail[ playerid ] == false ) return GRESKA( playerid, "Nisi uneo email." );
  2655. if( RegSex[ playerid ] == 0 ) return GRESKA( playerid, "Nisi odabrao drzavu." );
  2656. CancelSelectTextDraw( playerid );
  2657. IgracSeRegistruje[ playerid ] = false;
  2658. RegisterTDControl( playerid, false );
  2659. PlayerInfo[ playerid ][ xRegistrovan ] = 1;
  2660. PlayerInfo[ playerid ][ xPocetniTut ] = 0;
  2661. PlayerInfo[ playerid ][ xSpawn ] = SetRandomSpawn( playerid );
  2662. PlayerInfo[ playerid ][ xLevel ] = ServerInfo[ PocetniLevel ];
  2663. new datum[ 64 ]; new year, month,day;
  2664. getdate( year, month, day );
  2665. new tmphour, tmpminute, tmpsecond;
  2666. gettimeEx( tmphour, tmpminute, tmpsecond );
  2667. FixHour( tmphour );
  2668. tmphour = shifthour;
  2669. format( datum, sizeof( datum ), "%02d/%02d/%d - %d/%d/%d", day, month, year, tmphour, tmpminute, tmpsecond );
  2670. strmid( PlayerInfo[ playerid ][ xLastLogin ], datum, 0, strlen( datum ), 64 );
  2671. SetPlayerScore( playerid, PlayerInfo[ playerid ][ xLevel ] );
  2672. DajIgracuNovac( playerid, ServerInfo[ PocetniNovaca ] );
  2673. SavePlayer( playerid );
  2674. SetPlayerSkin( playerid, PlayerInfo[ playerid ][ xSkin ] );
  2675. TogglePlayerSpectating( playerid, true );
  2676.  
  2677. InterpolateCameraPos(playerid, 374.912872, -1113.013427, 124.437553, 2345.744384, -2112.316162, 98.540664, 50000);
  2678. InterpolateCameraLookAt(playerid, 379.372039, -1115.274536, 124.378959, 2343.739257, -2107.836425, 97.585632, 1);
  2679. SetPlayerInterior( playerid, 0 );
  2680. SetPlayerVirtualWorld( playerid, 1 );
  2681. Dimi_SetPlayerPos( playerid, 473.3107, -1342.6024, 31.8416);
  2682. SendClientMessage(playerid,-1, " ");//dobrodoslica
  2683. SendClientMessage(playerid,-1, " ");
  2684. SendClientMessage(playerid,-1, " ");
  2685. SendClientMessage(playerid,-1, " ");
  2686. SendClientMessage(playerid,-1, " ");
  2687. SendClientMessage(playerid,-1, " ");
  2688. SendClientMessage(playerid,-1, "{0080C0}___________________________| {FFFFFF}Dobro nam dosli {0080C0}|_______________________");
  2689. SendClientMessage(playerid,-1, " ");
  2690. SendClientMessage(playerid,-1, "Dobro nam dosli na TG Gaming");
  2691. SendClientMessage(playerid,-1, "Sada sledi kratak tutorial u kom cemo vam pokazati nekoliko vaznih lokacija");
  2692. SendClientMessage(playerid,-1, "Takodje cemo vas uputiti kako da zapocnete igru na nasem serveru");
  2693. SendClientMessage(playerid,-1, "Da ne duzimo mnogo ostanite sa nama do kraja tutoriala.");
  2694. SendClientMessage(playerid,-1, "{0080C0}__________________________________________________________________");
  2695. TimerTutorial[ playerid ] = SetTimerEx( "PocetniTut", 5000, false, "ii", playerid, 1 );
  2696. PocetniTutorialStartovan[ playerid ] = true;
  2697. return true;
  2698. }
  2699. /*if( playertextid == RegisterTD[ playerid ][ 3 ] ) {
  2700. Kickovanje( playerid, "Prekinuli ste registraciju i kickovani ste!" );
  2701. return true;
  2702. }*/
  2703. //
  2704. if( playertextid == TuningBuy[ playerid ][ 7 ] ) { // desno
  2705. if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu." );
  2706. if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return GRESKA( playerid, "Morate biti na mjestu vozaca." );
  2707.  
  2708. if( TPInfo[ playerid ][ tPaintjob ] == false ) {
  2709.  
  2710. new compid = -1, vehicleid = GetPlayerVehicleID( playerid );
  2711.  
  2712. for( new i = ( TPInfo[ playerid ][ tID ]+1 ); i < MAX_COMPONENTS; i++ ) {
  2713. if( cInfo[ i ][ cType ] == TPInfo[ playerid ][ tType ] ) {
  2714. if( cInfo[ i ][ cID ] == IsComponentidCompatible( GetVehicleModel( vehicleid ), cInfo[ i ][ cID ] ) ) {
  2715. compid = i;
  2716. break;
  2717. }
  2718. }
  2719. }
  2720. if( compid == -1 ) return GRESKA( playerid, "Nema vise kompatibilnih komponenti izabrane vrste za vas model auta." );
  2721.  
  2722. RemoveVehicleComponent( vehicleid, cInfo[ TPInfo[ playerid ][ tID ] ][ cID ] );
  2723.  
  2724. TPInfo[ playerid ][ tID ] = compid;
  2725.  
  2726. format( globalstring, sizeof( globalstring ), "%s", cInfo[ compid ][ cName ] );
  2727. PlayerTextDrawSetString( playerid, TuningBuy[ playerid ][ 3 ], globalstring );
  2728.  
  2729. AddVehicleComponent( vehicleid, cInfo[ compid ][ cID ] );
  2730.  
  2731. SelectTextDraw( playerid, TGBOJA );
  2732. }
  2733. else if( TPInfo[ playerid ][ tPaintjob ] == true ) {
  2734.  
  2735. new paintid = -1, vehicleid = GetPlayerVehicleID( playerid );
  2736.  
  2737. for( new i = ( TPInfo[ playerid ][ tID ]+1 ); i < NUMBER_TYPE_PAINTJOB; i++ ) {
  2738. if( pjInfo[ i ][ vehID ] == GetVehicleModel( vehicleid ) ) {
  2739. paintid = i;
  2740. break;
  2741. }
  2742. }
  2743. if( paintid == -1 ) return GRESKA( playerid, "Nema vise kompatibilnih boja za vas model auta." );
  2744.  
  2745. TPInfo[ playerid ][ tID ] = paintid;
  2746.  
  2747. format( globalstring, sizeof( globalstring ), "%s", pjInfo[ paintid ][ pNameBre ] );
  2748. PlayerTextDrawSetString( playerid, TuningBuy[ playerid ][ 3 ], globalstring );
  2749.  
  2750. ChangeVehiclePaintjob( vehicleid, pjInfo[ paintid ][ pNumber ] );
  2751.  
  2752. SelectTextDraw( playerid, TGBOJA );
  2753. }
  2754. return true;
  2755. }
  2756. if( playertextid == TuningBuy[ playerid ][ 8 ] ) { // levo
  2757. if( TPInfo[ playerid ][ tPaintjob ] == false ) {
  2758.  
  2759. if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu." );
  2760. if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return GRESKA( playerid, "Morate biti na mjestu vozaca." );
  2761.  
  2762. new compid = -1, vehicleid = GetPlayerVehicleID( playerid );
  2763.  
  2764. for( new i = (TPInfo[ playerid ][ tID ]-1); i > 0; i-- ) {
  2765. if( cInfo[ i ][ cType ] == TPInfo[ playerid ][ tType ] ) {
  2766. if( cInfo[ i ][ cID ] == IsComponentidCompatible( GetVehicleModel( vehicleid ), cInfo[ i ][ cID ] ) ) {
  2767. compid = i;
  2768. break;
  2769. }
  2770. }
  2771. }
  2772. if( compid == -1 ) return GRESKA( playerid, "Nema vise kompatibilnih komponenti izabrane vrste za vas model auta." );
  2773.  
  2774. RemoveVehicleComponent( vehicleid, cInfo[ TPInfo[ playerid ][ tID ] ][ cID ] );
  2775.  
  2776. TPInfo[ playerid ][ tID ] = compid;
  2777.  
  2778. format( globalstring, sizeof( globalstring ), "%s", cInfo[ compid ][ cName ] );
  2779. PlayerTextDrawSetString( playerid, TuningBuy[ playerid ][ 3 ], globalstring );
  2780.  
  2781. AddVehicleComponent( vehicleid, cInfo[ compid ][ cID ] );
  2782.  
  2783. SelectTextDraw( playerid, TGBOJA );
  2784. }
  2785. else if( TPInfo[ playerid ][ tPaintjob ] == true ) {
  2786.  
  2787. new paintid = -1, vehicleid = GetPlayerVehicleID( playerid );
  2788.  
  2789. for( new i = (TPInfo[ playerid ][ tID ]-1); i > 0; i-- ) {
  2790. if( pjInfo[ i ][ vehID ] == GetVehicleModel( vehicleid ) ) {
  2791. paintid = i;
  2792. break;
  2793. }
  2794. }
  2795. if( paintid == -1 ) return GRESKA( playerid, "Nema vise kompatibilnih boja za vas model auta." );
  2796.  
  2797. TPInfo[ playerid ][ tID ] = paintid;
  2798.  
  2799. format( globalstring, sizeof( globalstring ), "%s", pjInfo[ paintid ][ pNameBre ] );
  2800. PlayerTextDrawSetString( playerid, TuningBuy[ playerid ][ 3 ], globalstring );
  2801.  
  2802. ChangeVehiclePaintjob( vehicleid, pjInfo[ paintid ][ pNumber ] );
  2803.  
  2804. SelectTextDraw( playerid, TGBOJA );
  2805. }
  2806. return true;
  2807. }
  2808. if( playertextid == TuningBuy[ playerid ][ 9 ] ) { // buy
  2809. if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu." );
  2810. if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return GRESKA( playerid, "Morate biti na mjestu vozaca." );
  2811.  
  2812. new Float:Pos[ 6 ], vehicleid = GetPlayerVehicleID( playerid );
  2813.  
  2814. if( TPInfo[ playerid ][ tPaintjob ] == false ) {
  2815.  
  2816. new cid = TPInfo[ playerid ][ tID ];
  2817.  
  2818. RemoveVehicleComponent( vehicleid, cInfo[ TPInfo[ playerid ][ tID ] ][ cID ] );
  2819.  
  2820. VehicleInfo[ vehicleid ][ vTuned ] = true;
  2821.  
  2822. AddVehicleComponent( vehicleid, cInfo[ cid ][ cID ] );
  2823.  
  2824. }
  2825. else if( TPInfo[ playerid ][ tPaintjob ] == true ) {
  2826.  
  2827. new paintid = TPInfo[ playerid ][ tID ];
  2828.  
  2829. VehicleInfo[ vehicleid ][ vTuned ] = true;
  2830.  
  2831. VehicleInfo[ vehicleid ][ vPaintJob ] = pjInfo[ paintid ][ pNumber ];
  2832.  
  2833. ChangeVehicleColor( vehicleid, TPInfo[ playerid ][ PJColor ][ 0 ], TPInfo[ playerid ][ PJColor ][ 1 ] );
  2834.  
  2835. ChangeVehiclePaintjob( vehicleid, pjInfo[ paintid ][ pNumber ] );
  2836.  
  2837. }
  2838. GetVehicleCameraPos( vehicleid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ], 0, 6, 2 );
  2839. SetPlayerCameraPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
  2840.  
  2841. GetVehiclePos( vehicleid, Pos[ 0 ],Pos[ 1 ],Pos[ 2 ] );
  2842. SetPlayerCameraLookAt( playerid, Pos[ 0 ],Pos[ 1 ],Pos[ 2 ] );
  2843.  
  2844. CancelSelectTextDraw( playerid );
  2845.  
  2846. TuningTDShow( playerid, false );
  2847. TogglePlayerControllable( playerid, true );
  2848.  
  2849. SPD( playerid, dialog_TUNING, DSL, D_NASLOV, "Paintjobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nWheels\nCar Stereo\nHydraulics\nNitro", D_ODABERI, D_ODUSTANI );
  2850. return true;
  2851. }
  2852. if( playertextid == TuningBuy[ playerid ][ 13 ] ) { // close
  2853.  
  2854. if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu." );
  2855. if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return GRESKA( playerid, "Morate biti na mjestu vozaca." );
  2856.  
  2857. new Float:Pos[ 6 ], vehicleid = GetPlayerVehicleID( playerid );
  2858.  
  2859. if( TPInfo[ playerid ][ tPaintjob ] == false ) {
  2860.  
  2861. RemoveVehicleComponent( vehicleid, cInfo[ TPInfo[ playerid ][ tID ] ][ cID ] );
  2862. }
  2863. else if( TPInfo[ playerid ][ tPaintjob ] == true ) {
  2864. ChangeVehiclePaintjob( vehicleid, 3 );
  2865. ChangeVehicleColor( vehicleid, TPInfo[ playerid ][ PJColor ][ 0 ], TPInfo[ playerid ][ PJColor ][ 1 ] );
  2866. }
  2867.  
  2868. GetVehicleCameraPos( vehicleid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ], 0, 6, 2 );
  2869. SetPlayerCameraPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
  2870.  
  2871. GetVehiclePos( vehicleid, Pos[ 0 ],Pos[ 1 ],Pos[ 2 ] );
  2872. SetPlayerCameraLookAt( playerid, Pos[ 0 ],Pos[ 1 ],Pos[ 2 ] );
  2873.  
  2874. CancelSelectTextDraw( playerid );
  2875.  
  2876. TuningTDShow( playerid, false );
  2877. TogglePlayerControllable( playerid, true );
  2878.  
  2879. SPD( playerid, dialog_TUNING, DSL, D_NASLOV, "Paintjobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nWheels\nCar Stereo\nHydraulics\nNitro", D_ODABERI, D_ODUSTANI );
  2880. return true;
  2881. }
  2882. //
  2883. if( playertextid == atmTD[ playerid ][ 1 ] ) { // presecanje zica
  2884. new atmid = GetNearestAtm( playerid );
  2885. if( atmid == -1 ) return GRESKA( playerid, "Nisi pored bankomata." );
  2886. if( atmInfo[ atmid ][ atmPreseceneZice ] == true ) return GRESKA( playerid, "Vec su presecene zice." );
  2887. if( atmInfo[ atmid ][ atmVremeDoRoba ] != 0 ) return GRESKA( playerid, "Ovaj bankomat je vec opljackan." );
  2888. if( GetWeapon( playerid ) != 4 ) return GRESKA( playerid, "Morate da imate noz u rukama" );
  2889.  
  2890. atmrobTimer[ playerid ] = SetTimerEx( "RobZiceAtm", 1000, true, "d", playerid );
  2891. robbingATM[ playerid ] = atmid;
  2892. robbingATMSeconds[ playerid ] = 95;
  2893.  
  2894. CancelSelectTextDraw( playerid );
  2895. SendInfoMessage( playerid, "Poceli ste sa obijanjem bankomata, ne pomerajte se sa svog mesta." );
  2896. return true;
  2897. }
  2898. if( playertextid == atmTD[ playerid ][ 2 ] ) { // ulazak u bios
  2899. new atmid = GetNearestAtm( playerid );
  2900. if( !LaptopRuke[ playerid ] ) return GRESKA( playerid, "Nemate laptop u rukama." );
  2901. if( atmid == -1 ) return GRESKA( playerid, "Nisi pored bankomata." );
  2902. if( atmInfo[ atmid ][ atmProbijenBios ] == true ) return GRESKA( playerid, "Vec je hakovan ovaj bankomat." );
  2903. if( atmInfo[ atmid ][ atmVremeDoRoba ] != 0 ) return GRESKA( playerid, "Ovaj bankomat je vec opljackan." );
  2904.  
  2905.  
  2906.  
  2907. robbingATM[ playerid ] = atmid;
  2908. atmLoadingTDControl( playerid, true );
  2909.  
  2910. PlayerTextDrawSetString( playerid, atmrobLoading[ playerid ][ 1 ], "0%" );
  2911.  
  2912. //atmrobTimer[ playerid ] = SetTimerEx( "ProgresAtmBar", 1000, false, "d", playerid );
  2913.  
  2914. CancelSelectTextDraw( playerid );
  2915. return true;
  2916. }
  2917. if( playertextid == atmTD[ playerid ][ 3 ] ) { // kradja novca
  2918. new atmid = GetNearestAtm( playerid );
  2919. if( atmid == -1 ) return GRESKA( playerid, "Nisi pored bankomata." );
  2920. if( atmInfo[ atmid ][ atmVremeDoRoba ] != 0 ) return GRESKA( playerid, "Ovaj bankomat je vec opljackan." );
  2921. if( atmInfo[ atmid ][ atmPreseceneZice ] == true ) {
  2922. new pokusaj = random(4);
  2923. if( pokusaj == 1 ) {
  2924. Dimi_KillTimer( atmrobTimer[ playerid ] );
  2925.  
  2926. SendInfoMessage( playerid, "Niste uspeli ukrasti novac, alarm se oglasio." );
  2927. PostaviWanted( playerid, "Pokusaj pljacke bankomata", "Nepoznati", 3 );
  2928.  
  2929. atmInfo[ atmid ][ atmVremeDoRoba ] = 60;
  2930. SacuvajATM( atmid );
  2931. PlayerInfo[ playerid ][ xPljackaVreme ] = 60;
  2932.  
  2933. atmTDControl( playerid, false );
  2934. }
  2935. else {
  2936. Dimi_KillTimer( atmrobTimer[ playerid ] );
  2937.  
  2938. new money = ( random(5000)+10000 );
  2939. DajIgracuNovac( playerid, money );
  2940. SavePlayer( playerid ); UpdateBankTD( playerid );
  2941. SendInfoMessage( playerid, "Uspjesno ste ukrali iz bankomata %d$.", money );
  2942. PostaviWanted( playerid, "Pljacka bankomata", "Nepoznati", 3 );
  2943.  
  2944. atmInfo[ atmid ][ atmVremeDoRoba ] = 120;
  2945. SacuvajATM( atmid );
  2946. PlayerInfo[ playerid ][ xPljackaVreme ] = 120;
  2947.  
  2948. atmTDControl( playerid, false );
  2949. }
  2950. }
  2951. else if( atmInfo[ atmid ][ atmProbijenBios ] == true ) {
  2952. new pokusaj = random(4);
  2953. if( pokusaj == 1 ) {
  2954. Dimi_KillTimer( atmrobTimer[ playerid ] );
  2955.  
  2956. SendInfoMessage( playerid, "Niste uspeli prebaciti novac na vas racun, sistem zastite bankomata je ponovno podignut." );
  2957. PostaviWanted( playerid, "Pokusaj pljacke bankomata", "Nepoznati", 3 );
  2958.  
  2959. atmInfo[ atmid ][ atmVremeDoRoba ] = 60;
  2960. SacuvajATM( atmid );
  2961. PlayerInfo[ playerid ][ xPljackaVreme ] = 60;
  2962.  
  2963. atmTDControl( playerid, false );
  2964. }
  2965. else {
  2966. Dimi_KillTimer( atmrobTimer[ playerid ] );
  2967.  
  2968. new money = ( random(5000)+10000 );
  2969. PlayerInfo[ playerid ][ xBRacun ] += money;
  2970. SavePlayer( playerid ); UpdateBankTD( playerid );
  2971. SendInfoMessage( playerid, "Uspjesno ste sa bankomata prebacili %d$ na vas racun.", money );
  2972. PostaviWanted( playerid, "Pljacka bankomata", "Nepoznati", 3 );
  2973.  
  2974. atmInfo[ atmid ][ atmVremeDoRoba ] = 120;
  2975. SacuvajATM( atmid );
  2976. PlayerInfo[ playerid ][ xPljackaVreme ] = 120;
  2977.  
  2978. atmTDControl( playerid, false );
  2979. }
  2980. }
  2981. else return GRESKA( playerid, "Moras prvo da hakujes bankomat ili da mu preseces zice." );
  2982. return true;
  2983. }
  2984. //
  2985. if( playertextid == buyWatch[ playerid ][ 3 ] ) {
  2986. new text[ 30 ];
  2987. if( WatchModel[ playerid ] == 19039 ) {
  2988. if( PlayerInfo[ playerid ][ xNovac ] < 521 ) return GRESKA( playerid, "Nemate dovoljno novca." );
  2989. DajIgracuNovac( playerid, -521 );
  2990. text = "Rolex Datejust za 521$";
  2991. PlayerInfo[ playerid ][ xSat ] = 19039;
  2992. }
  2993. else if( WatchModel[ playerid ] == 19040 ) {
  2994. if( PlayerInfo[ playerid ][ xNovac ] < 618 ) return GRESKA( playerid, "Nemate dovoljno novca." );
  2995. DajIgracuNovac( playerid, -618 );
  2996. text = "Emporio Armani za 618$";
  2997. PlayerInfo[ playerid ][ xSat ] = 19040;
  2998. }
  2999. else if( WatchModel[ playerid ] == 19041 ) {
  3000. if( PlayerInfo[ playerid ][ xNovac ] < 723 ) return GRESKA( playerid, "Nemate dovoljno novca." );
  3001. DajIgracuNovac( playerid, -723 );
  3002. text = "Casio G-Shock za 723$";
  3003. PlayerInfo[ playerid ][ xSat ] = 19041;
  3004. }
  3005. else if( WatchModel[ playerid ] == 19042 ) {
  3006. if( PlayerInfo[ playerid ][ xNovac ] < 819 ) return GRESKA( playerid, "Nemate dovoljno novca." );
  3007. DajIgracuNovac( playerid, -819 );
  3008. text = "Michael Kors za 819$";
  3009. PlayerInfo[ playerid ][ xSat ] = 19042;
  3010. }
  3011. else if( WatchModel[ playerid ] == 19043 ) {
  3012. if( PlayerInfo[ playerid ][ xNovac ] < 916 ) return GRESKA( playerid, "Nemate dovoljno novca." );
  3013. DajIgracuNovac( playerid, -916 );
  3014. text = "Hugo Boss za 916$";
  3015. PlayerInfo[ playerid ][ xSat ] = 19043;
  3016. }
  3017.  
  3018. SendInfoMessage( playerid, "Uspjesno si kupio sat marke %s.( koristi komandu /sat ).", text );
  3019.  
  3020. SavePlayer( playerid );
  3021.  
  3022. buyWatchTDControl( playerid, false );
  3023. return true;
  3024. }
  3025. if( playertextid == buyWatch[ playerid ][ 7 ] ) {
  3026. SendInfoMessage( playerid, "Odustali ste od kupovine sata." );
  3027. buyWatchTDControl( playerid, false );
  3028. return true;
  3029. }
  3030. if( playertextid == buyWatch[ playerid ][ 4 ] ) {
  3031. new text[ 30 ];
  3032. if( WatchModel[ playerid ] == 19043 ) return 1;
  3033. WatchModel[ playerid ]++;
  3034. PlayerTextDrawSetPreviewModel( playerid, buyWatch[ playerid ][ 1 ], WatchModel[ playerid ] );
  3035. PlayerTextDrawShow( playerid, buyWatch[ playerid ][ 1 ] );
  3036. if( WatchModel[ playerid ] == 19039 ) text = "Rolex Datejust - 521$";
  3037. else if( WatchModel[ playerid ] == 19040 ) text = "Emporio Armani - 618$";
  3038. else if( WatchModel[ playerid ] == 19041 ) text = "Casio G-Shock - 723$";
  3039. else if( WatchModel[ playerid ] == 19042 ) text = "Michael Kors - 819$";
  3040. else if( WatchModel[ playerid ] == 19043 ) text = "Hugo Boss - 916$";
  3041. PlayerTextDrawSetString( playerid, buyWatch[ playerid ][ 2 ], text );
  3042. return true;
  3043. }
  3044. if( playertextid == buyWatch[ playerid ][ 5 ] ) {
  3045. new text[ 30 ];
  3046. if( WatchModel[ playerid ] == 19039 ) return 1;
  3047. WatchModel[ playerid ]--;
  3048. PlayerTextDrawSetPreviewModel( playerid, buyWatch[ playerid ][ 1 ], WatchModel[ playerid ] );
  3049. PlayerTextDrawShow( playerid, buyWatch[ playerid ][ 1 ] );
  3050. if( WatchModel[ playerid ] == 19039 ) text = "Rolex Datejust - 521$";
  3051. else if( WatchModel[ playerid ] == 19040 ) text = "Emporio Armani - 618$";
  3052. else if( WatchModel[ playerid ] == 19041 ) text = "Casio G-Shock - 723$";
  3053. else if( WatchModel[ playerid ] == 19042 ) text = "Michael Kors - 819$";
  3054. else if( WatchModel[ playerid ] == 19043 ) text = "Hugo Boss - 916$";
  3055. PlayerTextDrawSetString( playerid, buyWatch[ playerid ][ 2 ], text );
  3056. return true;
  3057. }
  3058. //
  3059. if( playertextid == Ormar[ playerid ][ 8 ] ) {
  3060. if( II[ inProperty[ playerid ] ][ iSkin ][ 0 ] == GetPlayerSkin( playerid ) ) { II[ inProperty[ playerid ] ][ iSkin ][ 0 ] = 0; }
  3061. if( II[ inProperty[ playerid ] ][ iSkin ][ 1 ] == GetPlayerSkin( playerid ) ) { II[ inProperty[ playerid ] ][ iSkin ][ 1 ] = 0; }
  3062. if( II[ inProperty[ playerid ] ][ iSkin ][ 2 ] == GetPlayerSkin( playerid ) ) { II[ inProperty[ playerid ] ][ iSkin ][ 2 ] = 0; }
  3063.  
  3064. SaveProperty( inProperty[ playerid ] );
  3065. PlayerInfo[ playerid ][ xSkin ] = GetPlayerSkin( playerid );
  3066. SCM( playerid, TGBOJA, "Obukli ste drugu odecu. " );
  3067. Dimi_SetPlayerPos( playerid, II[ inProperty[ playerid ] ][ iExit ][ 0 ], II[ inProperty[ playerid ] ][ iExit ][ 1 ], II[ inProperty[ playerid ] ][ iExit ][ 2 ] );
  3068. SetPlayerInterior( playerid, II[ inProperty[ playerid ] ][ iInterior ] );
  3069. SetPlayerVirtualWorld( playerid, II[ inProperty[ playerid ] ][ iVW ] );
  3070. ClearAnimations( playerid );
  3071. GameTextForPlayer( playerid, "Ucitavanje ...", 1000, 4 );
  3072. SetTimerEx( "SlobodnoSada", 2000, false, "i", playerid );
  3073. SetCameraBehindPlayer( playerid );
  3074. TogglePlayerControllable( playerid, false );
  3075. CancelSelectTextDraw( playerid );
  3076. OrmarTDControl( playerid, false );
  3077. TogglePlayerControllable( playerid, true );
  3078. return true;
  3079. }
  3080. if( playertextid == Ormar[ playerid ][ 3 ] ) {
  3081. if( II[ inProperty[ playerid ] ][ iSkin ][ 0 ] == 0 ) return GRESKA( playerid, " U ovom slotu nemate odecu." );
  3082. SetPlayerSkin( playerid, II[ inProperty[ playerid ] ][ iSkin ][ 0 ] ); ApplyAnimation( playerid, "CLOTHES","CLO_Pose_Legs",4.1,1,0,0,0,0, 1);
  3083. return true;
  3084. }
  3085. if( playertextid == Ormar[ playerid ][ 4 ] ) {
  3086. if( II[ inProperty[ playerid ] ][ iSkin ][ 1 ] == 0 ) return GRESKA( playerid, " U ovom slotu nemate odecu." );
  3087. SetPlayerSkin( playerid, II[ inProperty[ playerid ] ][ iSkin ][ 1 ] ); ApplyAnimation( playerid, "CLOTHES","CLO_Pose_Legs",4.1,1,0,0,0,0, 1);
  3088. return true;
  3089. }
  3090. if( playertextid == Ormar[ playerid ][ 5 ] ) {
  3091. if( II[ inProperty[ playerid ] ][ iSkin ][ 2 ] == 0 ) return GRESKA( playerid, " U ovom slotu nemate odecu." );
  3092. SetPlayerSkin( playerid, II[ inProperty[ playerid ] ][ iSkin ][ 2 ] ); ApplyAnimation( playerid, "CLOTHES","CLO_Pose_Legs",4.1,1,0,0,0,0, 1);
  3093. return true;
  3094. }
  3095. if( playertextid == Ormar[ playerid ][ 9 ] ) {
  3096. Dimi_SetPlayerPos( playerid, II[ inProperty[ playerid ] ][ iExit ][ 0 ], II[ inProperty[ playerid ] ][ iExit ][ 1 ], II[ inProperty[ playerid ] ][ iExit ][ 2 ] );
  3097. SetPlayerInterior( playerid, II[ inProperty[ playerid ] ][ iInterior ] );
  3098. SetPlayerVirtualWorld( playerid, II[ inProperty[ playerid ] ][ iVW ] );
  3099. SCM( playerid, TGBOJA, "Odustali ste od oblacenja nove odece. " );
  3100. SetPlayerSkin( playerid, PlayerInfo[ playerid ][ xSkin ] );
  3101. ClearAnimations( playerid );
  3102. GameTextForPlayer( playerid, "Ucitavanje ...", 1000, 4 );
  3103. SetTimerEx( "SlobodnoSada", 2000, false, "i", playerid );
  3104. SetCameraBehindPlayer( playerid );
  3105. TogglePlayerControllable( playerid, false );
  3106. CancelSelectTextDraw( playerid );
  3107. OrmarTDControl( playerid, false );
  3108. TogglePlayerControllable( playerid, true );
  3109. return true;
  3110. }
  3111. if( playertextid == ObjektTD[ playerid ][ 4 ] ) {
  3112. if( ListaoObjekte[ playerid ] == 0 ) return 1;
  3113. ListaoObjekte[ playerid ]--;
  3114. new i = ListaoObjekte[ playerid ];
  3115. DestroyObject( glavniobjekt );
  3116. glavniobjekt = CreateObject( OBPR[ i ][ 0 ], OBPR1[ i ][ 0 ], OBPR1[ i ][ 1 ], OBPR1[ i ][ 2 ], OBPR1[ i ][ 3 ], OBPR1[ i ][4], OBPR1[ i ][5] );
  3117.  
  3118. format( globalstring, sizeof( globalstring ), "cena: ~w~%d$", OBPR[ i ][ 1 ] );
  3119. PlayerTextDrawSetString( playerid, ObjektTD[ playerid ][ 1 ], globalstring );
  3120. return true;
  3121. }
  3122. if( playertextid == ObjektTD[ playerid ][ 2 ] ) {
  3123.  
  3124. if( ListaoObjekte[ playerid ] == (MAX_OBJ_FURNITURE-1) ) return 1;
  3125. ListaoObjekte[ playerid ]++;
  3126. new i = ListaoObjekte[ playerid ];
  3127. DestroyObject( glavniobjekt );
  3128. glavniobjekt = CreateObject( OBPR[ i ][ 0 ], OBPR1[ i ][ 0 ], OBPR1[ i ][ 1 ], OBPR1[ i ][ 2 ], OBPR1[ i ][ 3 ], OBPR1[ i ][4], OBPR1[ i ][5] );
  3129.  
  3130. format( globalstring, sizeof( globalstring ), "cena: ~w~%d$", OBPR[ i ][ 1 ] );
  3131. PlayerTextDrawSetString( playerid, ObjektTD[ playerid ][ 1 ], globalstring );
  3132. return true;
  3133. }
  3134. if( playertextid == ObjektTD[ playerid ][ 5 ] ) {
  3135. new i = ListaoObjekte[ playerid ];
  3136.  
  3137. if( ServerInfo[ Namestaj ] == 0 ) return GRESKA( playerid, "Nema vise namestaja u resursima za namestaje." );
  3138.  
  3139. if( PlayerInfo[ playerid ][ xNovac ] < OBPR[ i ][ 1 ] ) return GRESKA( playerid, " Nemate dovoljno novca." );
  3140. if( PlayerInfo[ playerid ][ xObject ][ 0 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 0 ] = OBPR[ i ][ 0 ]; }
  3141. else if( PlayerInfo[ playerid ][ xObject ][ 1 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 1 ] = OBPR[ i ][ 0 ]; }
  3142. else if( PlayerInfo[ playerid ][ xObject ][ 2 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 2 ] = OBPR[ i ][ 0 ]; }
  3143. else if( PlayerInfo[ playerid ][ xObject ][ 3 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 3 ] = OBPR[ i ][ 0 ]; }
  3144. else if( PlayerInfo[ playerid ][ xObject ][ 4 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 4 ] = OBPR[ i ][ 0 ]; }
  3145. else if( PlayerInfo[ playerid ][ xObject ][ 5 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 5 ] = OBPR[ i ][ 0 ]; }
  3146. else if( PlayerInfo[ playerid ][ xObject ][ 6 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 6 ] = OBPR[ i ][ 0 ]; }
  3147. else if( PlayerInfo[ playerid ][ xObject ][ 7 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 7 ] = OBPR[ i ][ 0 ]; }
  3148. else if( PlayerInfo[ playerid ][ xObject ][ 8 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 8 ] = OBPR[ i ][ 0 ]; }
  3149. else if( PlayerInfo[ playerid ][ xObject ][ 9 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 9 ] = OBPR[ i ][ 0 ]; }
  3150. else { GRESKA( playerid, "Vec ste kupili 10 objekta, nema mesta vise u kamionu." ); return 1; }
  3151. DajIgracuNovac( playerid, -OBPR[ i ][ 1 ] );
  3152. SCM( playerid, TGBOJA, "Uspjesno ste kupili namestaj!" );
  3153. SCM( playerid, TGBOJA, "Na mjestu gdje zelite postaviti namestaj, upisite /namestaj postavi" );
  3154. SCM( playerid, TGBOJA, "Mozete kupiti 10 namestaja odjednom." );
  3155. ServerInfo[ Namestaj ] -= 1;
  3156. SaveServerStats( );
  3157. return true;
  3158. }
  3159. if( playertextid == ObjektTD[ playerid ][ 3 ] ) {
  3160.  
  3161. nekokupujenamestaj = 0;
  3162. KupujeNamestaj[ playerid ] = 0;
  3163. ListaoObjekte[ playerid ] = 0;
  3164. TogglePlayerControllable( playerid, true );
  3165. SetCameraBehindPlayer( playerid );
  3166. CancelSelectTextDraw( playerid );
  3167. ObjektTDControl( playerid, false );
  3168. return true;
  3169. }
  3170. if( playertextid == Police_TV[ playerid ][ 3 ] )
  3171. {
  3172. SPD( playerid, dialog_SEARCH_NAME, DSI, D_NASLOV, "Upisite Ime i prezime gradjanina(Ime_Prezime) kojega zelite potraziti u bazi podataka:", D_ODABERI, D_ODUSTANI );
  3173. return true;
  3174. }
  3175. if( playertextid == Police_TV[ playerid ][ 6 ] )
  3176. {
  3177. SPD( playerid, dialog_SEARCH_NUMBERPLATE, DSI, D_NASLOV, "Unesite broj tablice u prazno polje.(bez nula-00 i bez LS( samo broj ) )", D_ODABERI, D_ODUSTANI );
  3178. return true;
  3179. }
  3180. if( playertextid == Police_TV[ playerid ][ 13 ] )
  3181. {
  3182. Police_TVTDControl( playerid, false );
  3183. CancelSelectTextDraw( playerid );
  3184. SetPVarInt( playerid, "Computer", 0 );
  3185. return true;
  3186. }
  3187. if( playertextid == Police_TV[ playerid ][ 12 ] )
  3188. {
  3189. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
  3190. strcat( DialogStrgEx, "|_______-=Popis svih osumnjicenih=-________|\n" );
  3191. foreach( Player, i )
  3192. {
  3193. if( IsPlayerConnected( i ) )
  3194. {
  3195. if( PlayerInfo[ i ][ xWanted ] > 0 )
  3196. {
  3197. format( globalstring, sizeof( globalstring ), "- %s | Wanted Level: %d\n", ImeIgraca( i ), PlayerInfo[ i ][ xWanted ] );
  3198. strcat( DialogStrgEx, globalstring );
  3199. }
  3200. }
  3201. }
  3202. ShowPlayerDialog( playerid, 0, DSMSG, D_NASLOV, DialogStrgEx, "U redu", "" );
  3203. strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
  3204. return true;
  3205. }
  3206. if( playertextid == Police_TV[ playerid ][ 8 ] )
  3207. {
  3208. if(GetPVarInt( playerid, "RequestingBackup") != 1)
  3209. {
  3210. format( globalstring, sizeof( globalstring ), "SVE JEDINICE: %s trazi pojacanje i oznacen je na GPSu (crveno).", ImeIgraca( playerid ) );
  3211. SetPVarInt( playerid, "RequestingBackup", 1);
  3212.  
  3213. foreach( Player, i )
  3214. {
  3215. if( IsPlayerConnected(i))
  3216. {
  3217. if( OI[ PlayerInfo[ i ][ xClan ] ][ oTip ] == ORG_TIP_PD )
  3218. {
  3219. SetPlayerMarkerForPlayer( i, playerid, 0xFF0000FF );
  3220. SCM( i, 0x8D8DFF00, globalstring );
  3221. }
  3222. }
  3223. }
  3224. SCM( playerid, 0x8D8DFF00, "Ukucajte /bkc da bi ste izbrisali pojacanje." );
  3225. backuptimer[ playerid ] = SetTimerEx( "BackupClear", 180000, false, "ii", playerid, 1 );
  3226. } else GRESKA( playerid, "Vec imate aktivan zahjtev za pojacanje!");
  3227. return true;
  3228. }
  3229. if( playertextid == Police_TV[ playerid ][ 10 ] )
  3230. {
  3231. SPD( playerid, dialog_POSTAVIPOTERU, DSI, D_NASLOV, "Upisite Ime i prezime gradjanina(Ime_Prezime) i razlog za potjeru.", D_ODABERI, D_ODUSTANI );
  3232. return true;
  3233. }
  3234. //
  3235. if( playertextid == PizzaMenu[ playerid ][ 7 ] ) {
  3236.  
  3237. if( PlayerInfo[ playerid ][ xNovac ] < 67 ) return GRESKA( playerid, "Nemate dovoljno novca 67$!");
  3238. BussinesMoney( uFirmi[ playerid ] , 67 );
  3239. DajIgracuNovac( playerid, -67 );
  3240. DodajIgracuHP( playerid, 30 );
  3241. format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
  3242. PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
  3243. OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  3244. PizzaMenuTDControl( playerid, false );
  3245. return true;
  3246. }
  3247. if( playertextid == PizzaMenu[ playerid ][ 10 ] ) {
  3248.  
  3249. if( PlayerInfo[ playerid ][ xNovac ] < 79) return GRESKA( playerid, "Nemate dovoljno novca 79$!");
  3250. BussinesMoney( uFirmi[ playerid ] , 79);
  3251. DajIgracuNovac( playerid, -79 );
  3252. DodajIgracuHP( playerid, 30 );
  3253. format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
  3254. PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
  3255. OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  3256. PizzaMenuTDControl( playerid, false );
  3257. return true;
  3258. }
  3259. if( playertextid == PizzaMenu[ playerid ][ 13 ] ) {
  3260.  
  3261. if( PlayerInfo[ playerid ][ xNovac ] < 81) return GRESKA( playerid, "Nemate dovoljno novca 81$!");
  3262.  
  3263. BussinesMoney( uFirmi[ playerid ] , 81);
  3264. DajIgracuNovac( playerid, -81 );
  3265. DodajIgracuHP( playerid, 30 );
  3266.  
  3267. format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
  3268. PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
  3269. OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  3270. PizzaMenuTDControl( playerid, false );
  3271. return true;
  3272. }
  3273. if( playertextid == PizzaMenu[ playerid ][ 16 ] ) {
  3274.  
  3275. if( PlayerInfo[ playerid ][ xNovac ] < 89) return GRESKA( playerid, "Nemate dovoljno novca 89$!");
  3276.  
  3277. BussinesMoney( uFirmi[ playerid ] , 89);
  3278. DajIgracuNovac( playerid, -89 );
  3279. DodajIgracuHP( playerid, 30 );
  3280.  
  3281. format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
  3282. PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
  3283. OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  3284. PizzaMenuTDControl( playerid, false );
  3285. return true;
  3286. }
  3287. if( playertextid == PizzaMenu[ playerid ][ 19 ] ) {
  3288.  
  3289. if( PlayerInfo[ playerid ][ xNovac ] < 98) return GRESKA( playerid, "Nemate dovoljno novca 98$!");
  3290.  
  3291. BussinesMoney( uFirmi[ playerid ] , 98);
  3292. DajIgracuNovac( playerid, -98 );
  3293. DodajIgracuHP( playerid, 30 );
  3294.  
  3295. format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
  3296. PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
  3297. OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  3298. PizzaMenuTDControl( playerid, false );
  3299. return true;
  3300. }
  3301. if( playertextid == PizzaMenu[ playerid ][ 22 ] ) {
  3302.  
  3303. if( PlayerInfo[ playerid ][ xNovac ] < 108) return GRESKA( playerid, "Nemate dovoljno novca 108$!");
  3304.  
  3305. BussinesMoney( uFirmi[ playerid ] , 108);
  3306. DajIgracuNovac( playerid, -108 );
  3307. DodajIgracuHP( playerid, 30 );
  3308.  
  3309. format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
  3310. PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
  3311. OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  3312. PizzaMenuTDControl( playerid, false );
  3313. return true;
  3314. }
  3315. //--------------------stats---------------------------------------------
  3316.  
  3317. //
  3318. if( playertextid == ZaposljavanjeTD[ playerid ][ 7 ] ) {
  3319.  
  3320. if( PlayerInfo[ playerid ][ xPosao ] != 0 ) {
  3321. GRESKA( playerid, "Vec imate posao!Koristite /otkaz da date otkaz!");
  3322. ZaposljavanjeTDControl( playerid, false, "", "", "" );
  3323. CancelSelectTextDraw( playerid );
  3324. return true;
  3325. }
  3326.  
  3327. if( GetPlayerState( playerid ) != 1 ) {
  3328. GRESKA( playerid, "Ne smete biti u vozilu!");
  3329. ZaposljavanjeTDControl( playerid, false, "", "", "" );
  3330. CancelSelectTextDraw( playerid );
  3331. return true;
  3332. }
  3333.  
  3334. if( ChosenJob[ playerid ] == POSAO_MEHANICAR ) {
  3335. if( PlayerInfo[ playerid ][ xSrednja ] != 6 ) return GRESKA( playerid, "Moras da zavrsis prvo srednju skolu. " );
  3336. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Mehanicar",
  3337. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Mehanicar!\n\n" \
  3338. ""col_job"Potrebno je da odradite barem 3 sati ugovora kako bi ste dali otkaz!\n" \
  3339. ""col_job"Komande posla: "col_white" /mechanic /tow", "U redu", "");
  3340. }
  3341. else if( ChosenJob[ playerid ] == POSAO_MASINOVODJA ) {
  3342. //if( PlayerInfo[ playerid ][ xFakultet ] != 15 ) return GRESKA( playerid, "Moras prvo da zavrsis fakultet. " );
  3343. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Masinovodja",
  3344. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Masinovodja!\n\n" \
  3345. ""col_job"Potrebno je da odradite barem 3 sati ugovora kako bi ste dali otkaz!\n" \
  3346. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  3347. }
  3348. else if( ChosenJob[ playerid ] == POSAO_PREVOZNIK ) {
  3349. if( PlayerInfo[ playerid ][ xKamionskaC1 ] == 0 ) return GRESKA( playerid, "Ne posedujes dozvolu za kombije. ");
  3350. if( PlayerInfo[ playerid ][ xKamionskaC2 ] == 0 ) return GRESKA( playerid, "Ne posedujes dozvolu za kamione. ");
  3351. if( PlayerInfo[ playerid ][ xKamionskaC3 ] == 0 ) return GRESKA( playerid, "Ne posedujes dozvolu za kamione sa prikolicom. ");
  3352. if( PlayerInfo[ playerid ][ xVozacka ] == 0 ) return GRESKA( playerid, "Ne posedujes vozacku dozvolu. ");
  3353. if( PlayerInfo[ playerid ][ xSrednja ] != 6 ) return GRESKA( playerid, "Moras da zavrsis prvo srednju skolu. " );
  3354. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Prevoznik",
  3355. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Prevoznik!\n\n" \
  3356. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  3357. ""col_job"Komande posla: "col_white" /prevozdrveca /prevozsljunka /uniforma /prekiniposao", "U redu", "");
  3358. }
  3359. else if( ChosenJob[ playerid ] == POSAO_KOSAC ) {
  3360. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Kosac trave",
  3361. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Kosac trave!\n\n" \
  3362. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  3363. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  3364. }
  3365. else if( ChosenJob[ playerid ] == POSAO_KOMUNALAC ) {
  3366. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Komunalac",
  3367. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Komunalac!\n\n" \
  3368. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  3369. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  3370. }
  3371. else if( ChosenJob[ playerid ] == POSAO_GRADJEVINAR ) {
  3372. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Gradjevinar",
  3373. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Gradjevinar!\n\n" \
  3374. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  3375. ""col_job"Komande posla: "col_white"/prekiniposao /uniforma", "U redu", "");
  3376. }
  3377. else if( ChosenJob[ playerid ] == POSAO_PIZZA ) {
  3378. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Dostavljac pica",
  3379. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Dostavljac pica!\n\n" \
  3380. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  3381. ""col_job"Komande posla: "col_white" /pizza", "U redu", "");
  3382. }
  3383. else if( ChosenJob[ playerid ] == POSAO_PILOT ) {
  3384. if( PlayerInfo[ playerid ][ xLetelica ] == 0 ) return GRESKA( playerid, "Ne posedujes dozvolu za avion/helic." );
  3385. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Pilot",
  3386. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Pilot!\n\n" \
  3387. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  3388. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  3389. }
  3390. else if( ChosenJob[ playerid ] == POSAO_FARMER ) {
  3391. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Farmer",
  3392. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Farmer!\n\n" \
  3393. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  3394. ""col_job"Komande posla: "col_white" /uzmisemenke /uzmikantu /muzikrave /uniforma /prekiniposao", "U redu", "");
  3395. }
  3396. else if( ChosenJob[ playerid ] == POSAO_BUSVOZAC ) {
  3397. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Bus vozac",
  3398. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Bus vozac!\n\n" \
  3399. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  3400. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  3401. }
  3402. else if( ChosenJob[ playerid ] == POSAO_RUDAR ) {
  3403. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Rudar",
  3404. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Rudar!\n\n" \
  3405. ""col_job"Potrebno je da odradite barem 3 sati ugovora kako bi ste dali otkaz!\n" \
  3406. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  3407. }
  3408. else if( ChosenJob[ playerid ] == POSAO_PREVOZNOVCA ) {
  3409. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Prevoznik Novca",
  3410. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Prevoznik Novca!\n\n" \
  3411. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  3412. ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
  3413. }
  3414. else if( ChosenJob[ playerid ] == POSAO_RIBAR ) {
  3415. ShowPlayerDialog( playerid, 0, DSMSG, "Posao Ribar",
  3416. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Ribar!\n\n" \
  3417. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  3418. ""col_job"Komande posla: "col_white" /pecaj /uniforma /zavrsipecanje", "U redu", "");
  3419. }
  3420. else if( ChosenJob[ playerid ] == POSAO_PNAMESTAJA ) {
  3421. ShowPlayerDialog( playerid, 0, DSMSG, "Proizvodjac Namestaja",
  3422. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Proizvodjac Namestaja!\n\n" \
  3423. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  3424. ""col_job"Komande posla: "col_white" /posao /uniforma /ostavidrvo /uzmidrvo", "U redu", "");
  3425. }
  3426. else if( ChosenJob[ playerid ] == POSAO_MERKATORDOSTAVA ) {
  3427. ShowPlayerDialog( playerid, 0, DSMSG, "Merkator Dostavljac",
  3428. ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Merkator Dostavljac!\n\n" \
  3429. ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
  3430. ""col_job"Komande posla: "col_white" /uzmiktuiju /uniforma", "U redu", "");
  3431. }
  3432.  
  3433. PlayerInfo[ playerid ][ xPosao ] = ChosenJob[ playerid ];
  3434. PlayerInfo[ playerid ][ xUgovor ] = 0;
  3435. SavePlayer( playerid );
  3436.  
  3437. ZaposljavanjeTDControl( playerid, false, "", "", "" );
  3438. CancelSelectTextDraw( playerid );
  3439. return true;
  3440. }
  3441. if( playertextid == ZaposljavanjeTD[ playerid ][ 8 ] ) {
  3442. SendInfoMessage( playerid, "Odustali ste od zaposljavanja." );
  3443. ZaposljavanjeTDControl( playerid, false, "", "", "" );
  3444. CancelSelectTextDraw( playerid );
  3445. return true;
  3446. }
  3447.  
  3448. // sasasa
  3449. if(Start[ playerid ] != PlayerText:INVALID_TEXT_DRAW) {
  3450. if(DEALSTEXT == playertextid)
  3451. {
  3452. if(PP_Info[ playerid ][click_dealbutton] == WAIT_CLICKDEALTEXT) return 1;
  3453. if(PP_Info[ playerid ][click_dealbutton] == FIRST_CLICKDEALTEXT)
  3454. {
  3455. if(PP_Info[ playerid ][Credit] < 1) return GRESKA(playerid, "Nemas na racunu. Klikni na {FFFFFF}ADD COIN");
  3456. if(PP_Info[ playerid ][Credit] < PP_Info[ playerid ][PokerBet])
  3457. {
  3458. PP_Info[ playerid ][PokerBet] = PP_Info[ playerid ][Credit];
  3459. }
  3460. PP_Info[ playerid ][Credit] -= PP_Info[ playerid ][PokerBet];
  3461. PP_Info[ playerid ][click_dealbutton] = WAIT_CLICKDEALTEXT;
  3462. PlayerTextDrawHide(playerid, ADDCOINSTEXT);
  3463. PlayerTextDrawHide(playerid, BETTEXT);
  3464. PlayerPlaySound(playerid, 43000, 0.00, 0.00, 0.00);
  3465. RandomCard(PP_Info[ playerid ][fivecards_hand], 10);
  3466. WinnText(playerid);
  3467. BetCredit(playerid);
  3468. TextDrawDizajn(playerid, 0);
  3469. } else {
  3470. PP_Info[ playerid ][click_dealbutton] = FIRST_CLICKDEALTEXT;
  3471. PlayerTextDrawShow(playerid, ADDCOINSTEXT);
  3472. PlayerTextDrawShow(playerid, BETTEXT);
  3473. for(new i; i < 5; i++)
  3474. {
  3475. if(PP_Info[ playerid ][holdstate][i] == HOLDON)
  3476. {
  3477. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, " ");
  3478. PP_Info[ playerid ][holdstate][i] = HOLDOFF;
  3479. } else {
  3480. Swap(PP_Info[ playerid ][fivecards_hand][i], PP_Info[ playerid ][fivecards_hand][i + 5]);
  3481. PlayerTextDrawSetString(playerid, CARDSTEXT + PlayerText:i, LD_POKE[PP_Info[ playerid ][fivecards_hand][i]]);
  3482. }
  3483. }
  3484. new
  3485. first,
  3486. second,
  3487. rank = get_rank(PP_Info[ playerid ][fivecards_hand]),
  3488. win = get_win(rank);
  3489. rankname(rank, first, second);
  3490. if(win > ONE_PAIR)
  3491. {
  3492. PP_Info[ playerid ][Credit] += (pot[win] * PP_Info[ playerid ][PokerBet]);
  3493. switch(win)
  3494. {
  3495. case STRAIGHT, FLUSH, STRAIGHT_FLUSH, FULL_HOUSE, ROYAL_FLUSH:
  3496. {
  3497. for(new i = 0; i < 5; i++)
  3498. {
  3499. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdmid");
  3500. }
  3501. }
  3502. case TWO_PAIR:
  3503. {
  3504. for(new i = 0; i < 5; i++)
  3505. {
  3506. if(first == Card_Value[PP_Info[ playerid ][fivecards_hand][i]] ||
  3507. second == Card_Value[PP_Info[ playerid ][fivecards_hand][i]])
  3508. {
  3509. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdmid");
  3510. }
  3511. }
  3512. }
  3513. case THREE_OF_A_KIND, FOUR_OF_A_KIND:
  3514. {
  3515. for(new i = 0; i < 5; i++)
  3516. {
  3517. if(first == Card_Value[PP_Info[ playerid ][fivecards_hand][i]])
  3518. {
  3519. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdmid");
  3520. }
  3521. }
  3522. }
  3523. }
  3524. PlayerPlaySound(playerid, 5448, 0.00, 0.00, 0.00);
  3525. WinnText(playerid, win, rank);
  3526. BetCredit(playerid);
  3527. } else {
  3528. for(new i = 0; i < 5; i++)
  3529. {
  3530. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "_");
  3531. }
  3532. }
  3533. }
  3534. } else {
  3535. if(PP_Info[ playerid ][click_dealbutton] == SECOND_CLICKDEALTEXT)
  3536. {
  3537. for(new i = 0; i < 5; i++)
  3538. {
  3539. if(CARDSTEXT + PlayerText:i == playertextid)
  3540. {
  3541. PP_Info[ playerid ][holdstate][i] = HOLDOFF - PP_Info[ playerid ][holdstate][i];
  3542. if(PP_Info[ playerid ][holdstate][i])
  3543. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "_");
  3544. else
  3545. PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdon");
  3546. PlayerPlaySound(playerid, 21000, 0.00, 0.00, 0.00);
  3547. return 1;
  3548. }
  3549. }
  3550. }
  3551. else if(ADDCOINSTEXT == playertextid)
  3552. {
  3553. if( PlayerInfo[ playerid ][ xNovac ] < 100)
  3554. {
  3555. GRESKA( playerid, "Nemas novca.");
  3556. } else {
  3557. DajIgracuNovac( playerid, -100 );
  3558. PP_Info[ playerid ][ Credit ] += 100;
  3559. BetCredit(playerid);
  3560. PlayerPlaySound(playerid, 4203, 0.00, 0.00, 0.00);
  3561. }
  3562. return 1;
  3563. }
  3564. else if(BETTEXT == playertextid)
  3565. {
  3566. if(PP_Info[ playerid ][PokerBet] < 100)
  3567. PP_Info[ playerid ][PokerBet]++;
  3568. else
  3569. PP_Info[ playerid ][PokerBet] = 5;
  3570.  
  3571. BetCredit(playerid);
  3572. WinnText(playerid);
  3573. PlayerPlaySound(playerid, 4202, 0.00, 0.00, 0.00);
  3574. return 1;
  3575. }
  3576. }
  3577.  
  3578. if(CHANGEBACKGROUND == playertextid)
  3579. {
  3580. PP_Info[ playerid ][LastBackGround]++;
  3581. if(PP_Info[ playerid ][LastBackGround] == sizeof BackGroundData)
  3582. PP_Info[ playerid ][LastBackGround] = 0;
  3583. PlayerTextDrawSetString(playerid, BACKGROUND, BackGroundData[PP_Info[ playerid ][LastBackGround]]);
  3584. return 1;
  3585. }
  3586.  
  3587. if(EXITPOKER == playertextid)
  3588. {
  3589. ExitPoker(playerid);
  3590. return 1;
  3591. }
  3592. }
  3593. }
  3594. return 1;
  3595. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement