MichaelFR

Mod

Jun 9th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 377.89 KB | None | 0 0
  1. /*         PEN:CroHerze       /*
  2.  
  3.  
  4.          Gamemode by:
  5.             ZeeX,
  6.             Zoran(Zerocoolos)
  7.  
  8.          Mapper's:
  9.             M15hk0,
  10.             Sebo_,
  11.             ZeeX
  12.            
  13.  
  14.  
  15.  
  16.  
  17. /*                         */
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. /*          INCLUDE-ovi               */
  25. #include <a_samp>
  26. #include <core>
  27. #include <float>
  28. #include <time>
  29. #include <file>
  30. #include <streamer>
  31. #include <morphinc>
  32. #include <utils>
  33. #include <foreach>
  34. #include <MidoStream>
  35. static gTeam[MAX_PLAYERS];
  36. /*          DEFINE-ovi               */
  37. #define GPSF SendClientMessage
  38. #define SPG ShowPlayerDialog
  39. #define fGPS 500
  40. #define Fear 0xDB023EFF
  41. #define dialogv 9344
  42. #define VEHICLE_PARAMS_UNSET    -1 //Ovo postavljate ako Korisstite prams
  43. #define VEHICLE_PARAMS_OFF  0 //Ovo postavljate kada su vasi pramsi ugaseni
  44. #define VEHICLE_PARAMS_ON   1 //Ovo postavljate kada su vasi pramsi upaljeni
  45. new engine,lights,alarm,doors,bonnet,boot,objective;
  46. #define CHECKPOINT_NONE 0
  47. #define CHECKPOINT_PICKUP 1
  48. #define CHECKPOINT_DROPOFF 2
  49. #define CHECKPOINT_SR1START 3
  50. #define CHECKPOINT_SRA 4
  51. #define CHECKPOINT_SRB 5
  52. #define CHECKPOINT_SRC 6
  53. #define CHECKPOINT_SRD 7
  54. #define CHECKPOINT_SRE 8
  55. #define CHECKPOINT_SRF 9
  56. #define CHECKPOINT_SRG 10
  57. #define CHECKPOINT_CARDROP 11
  58. #define CHECKPOINT_HOME 12
  59. #define CHECKPOINT_DM 13
  60. #define COLOR_GRAD1 0xB4B5B7FF
  61. #define COLOR_GRAD2 0xBFC0C2FF
  62. #define COLOR_GRAD3 0xCBCCCEFF
  63. #define COLOR_GRAD4 0xD8D8D8FF
  64. #define COLOR_GRAD5 0xE3E3E3FF
  65. #define COLOR_GRAD6 0xF0F0F0FF
  66. #define COLOR_GREY 0xAFAFAFAA
  67. #define COLOR_GREEN 0x33AA33AA
  68. #define COLOR_RED 0xFF6347AA
  69. #define COLOR_YELLOW 0xFFFF00AA
  70. #define COLOR_WHITE 0xFFFFFFAA
  71. #define COLOR_FADE1 0xE6E6E6E6
  72. #define COLOR_FADE2 0xC8C8C8C8
  73. #define COLOR_FADE3 0xAAAAAAAA
  74. #define COLOR_FADE4 0x8C8C8C8C
  75. #define COLOR_FADE5 0x6E6E6E6E
  76. #define COLOR_PURPLE 0xC2A2DAAA
  77. #define COLOR_DBLUE 0x2641FEAA
  78. #define COLOR_ALLDEPT 0xFF8282AA
  79. #define TEAM_CYAN 1
  80. #define TEAM_BLUE 2
  81. #define TEAM_GREEN 3
  82. #define TEAM_ORANGE 4
  83. #define TEAM_BALLAS 5
  84. #define TEAM_GROVE 6
  85. #define TEAM_VAGOS 7
  86. #define TEAM_AZTECAS 8
  87. #define TEAM_NANG 9
  88. #define TEAM_RIFA 78
  89. #define TEAM_MAFIA 11
  90. #define TEAM_RMAFIA 12
  91. #define TEAM_TRIADS 13
  92. #define TEAM_BIKERS 14
  93. #define OBJECTIVE_COLOR 0x64000064
  94. #define TEAM_GREEN_COLOR 0xFFFFFFAA
  95. #define TEAM_BLUE_COLOR 0x8D8DFFAA
  96. #define COLOR_ADD 0x63FF60AA
  97. #define TEAM_CYAN_COLOR 0xFF8282AA
  98. #define TEAM_ORANGE_COLOR 0xFF8300C8
  99. #define TEAM_ORANGE1_COLOR 0xFF830099
  100. #define TEAM_ORANGE2_COLOR 0xFF830088
  101. #define TEAM_ORANGE3_COLOR 0xFF830077
  102. #define TEAM_ORANGE4_COLOR 0xFF830066
  103. #define TEAM_ORANGE5_COLOR 0xFF830055
  104. #define TEAM_ORANGE6_COLOR 0xFF830044
  105. #define TEAM_ORANGE7_COLOR 0xFF830033
  106. #define TEAM_ORANGE8_COLOR 0xFF830022
  107. #define TEAM_ORANGE9_COLOR 0xFF830011
  108. #define TEAM_ORANGE10_COLOR 0xFF830000
  109. #define TEAM_BALLAS_COLOR 0xD900D3C8
  110. #define TEAM_BALLAS1_COLOR 0xD900D399
  111. #define TEAM_BALLAS2_COLOR 0xD900D388
  112. #define TEAM_BALLAS3_COLOR 0xD900D377
  113. #define TEAM_BALLAS4_COLOR 0xD900D366
  114. #define TEAM_BALLAS5_COLOR 0xD900D355
  115. #define TEAM_BALLAS6_COLOR 0xD900D344
  116. #define TEAM_BALLAS7_COLOR 0xD900D333
  117. #define TEAM_BALLAS8_COLOR 0xD900D322
  118. #define TEAM_BALLAS9_COLOR 0xD900D311
  119. #define TEAM_BALLAS10_COLOR 0xD900D300
  120. #define TEAM_GROVE_COLOR 0x00D900C8
  121. #define TEAM_GROVE1_COLOR 0x00D90099
  122. #define TEAM_GROVE2_COLOR 0x00D90088
  123. #define TEAM_GROVE3_COLOR 0x00D90077
  124. #define TEAM_GROVE4_COLOR 0x00D90066
  125. #define TEAM_GROVE5_COLOR 0x00D90055
  126. #define TEAM_GROVE6_COLOR 0x00D90044
  127. #define TEAM_GROVE7_COLOR 0x00D90033
  128. #define TEAM_GROVE8_COLOR 0x00D90022
  129. #define TEAM_GROVE9_COLOR 0x00D90011
  130. #define TEAM_GROVE10_COLOR 0x00D90000
  131. #define TEAM_VAGOS_COLOR 0xFFC801C8
  132. #define TEAM_VAGOS1_COLOR 0xFFC80199
  133. #define TEAM_VAGOS2_COLOR 0xFFC80188
  134. #define TEAM_VAGOS3_COLOR 0xFFC80177
  135. #define TEAM_VAGOS4_COLOR 0xFFC80166
  136. #define TEAM_VAGOS5_COLOR 0xFFC80155
  137. #define TEAM_VAGOS6_COLOR 0xFFC80144
  138. #define TEAM_VAGOS7_COLOR 0xFFC80133
  139. #define TEAM_VAGOS8_COLOR 0xFFC80122
  140. #define TEAM_VAGOS9_COLOR 0xFFC80111
  141. #define TEAM_VAGOS10_COLOR 0xFFC80100
  142. #define TEAM_AZTECAS_COLOR 0x01FCFFC8
  143. #define TEAM_AZTECAS1_COLOR 0x01FCFF99
  144. #define TEAM_AZTECAS2_COLOR 0x01FCFF88
  145. #define TEAM_AZTECAS3_COLOR 0x01FCFF77
  146. #define TEAM_AZTECAS4_COLOR 0x01FCFF66
  147. #define TEAM_AZTECAS5_COLOR 0x01FCFF55
  148. #define TEAM_AZTECAS6_COLOR 0x01FCFF44
  149. #define TEAM_AZTECAS7_COLOR 0x01FCFF33
  150. #define TEAM_AZTECAS8_COLOR 0x01FCFF22
  151. #define TEAM_AZTECAS9_COLOR 0x01FCFF11
  152. #define TEAM_AZTECAS10_COLOR 0x01FCFF00
  153. #define COLOR_ONE 0xFF444499
  154. #define COLOR_TWO 0xFFFF22AA
  155. #define COLOR_THREE 0xFFCC2299
  156. #define TEAM_NANG_COLOR 0xBDCB92C8
  157. #define TEAM_NANG1_COLOR 0xBDCB9299
  158. #define TEAM_NANG2_COLOR 0xBDCB9288
  159. #define TEAM_NANG3_COLOR 0xBDCB9277
  160. #define TEAM_NANG4_COLOR 0xBDCB9266
  161. #define TEAM_NANG5_COLOR 0xBDCB9255
  162. #define TEAM_NANG6_COLOR 0xBDCB9244
  163. #define TEAM_NANG7_COLOR 0xBDCB9233
  164. #define TEAM_NANG8_COLOR 0xBDCB9222
  165. #define TEAM_NANG9_COLOR 0xBDCB9211
  166. #define TEAM_NANG10_COLOR 0xBDCB9200
  167. #define TEAM_RIFA_COLOR 0x000000C8
  168. #define TEAM_RIFA1_COLOR 0x00000099
  169. #define TEAM_RIFA2_COLOR 0x00000088
  170. #define TEAM_RIFA3_COLOR 0x00000077
  171. #define TEAM_RIFA4_COLOR 0x00000066
  172. #define TEAM_RIFA5_COLOR 0x00000055
  173. #define TEAM_RIFA6_COLOR 0x00000044
  174. #define TEAM_RIFA7_COLOR 0x00000033
  175. #define TEAM_RIFA8_COLOR 0x00000044
  176. #define TEAM_RIFA9_COLOR 0x00000055
  177. #define TEAM_RIFA10_COLOR 0x00000066
  178. #define TEAM_MAFIA_COLOR 0x9A9999C8
  179. #define TEAM_MAFIA1_COLOR 0x9A999999
  180. #define TEAM_MAFIA2_COLOR 0x9A999988
  181. #define TEAM_MAFIA3_COLOR 0x9A999977
  182. #define TEAM_MAFIA4_COLOR 0x9A999966
  183. #define TEAM_MAFIA5_COLOR 0x9A999955
  184. #define TEAM_MAFIA6_COLOR 0x9A999944
  185. #define TEAM_MAFIA7_COLOR 0x9A999933
  186. #define TEAM_MAFIA8_COLOR 0x9A999922
  187. #define TEAM_MAFIA9_COLOR 0x9A999911
  188. #define TEAM_MAFIA10_COLOR 0x9A999900
  189. #define TEAM_RMAFIA_COLOR 0x916600C8
  190. #define TEAM_RMAFIA1_COLOR 0x91660099
  191. #define TEAM_RMAFIA2_COLOR 0x91660088
  192. #define TEAM_RMAFIA3_COLOR 0x91660077
  193. #define TEAM_RMAFIA4_COLOR 0x91660066
  194. #define TEAM_RMAFIA5_COLOR 0x91660055
  195. #define TEAM_RMAFIA6_COLOR 0x91660044
  196. #define TEAM_RMAFIA7_COLOR 0x91660033
  197. #define TEAM_RMAFIA8_COLOR 0x91660022
  198. #define TEAM_RMAFIA9_COLOR 0x91660011
  199. #define TEAM_RMAFIA10_COLOR 0x91660000
  200. #define TEAM_TRIADS_COLOR 0x587B95C8
  201. #define TEAM_TRIADS1_COLOR 0x587B9599
  202. #define TEAM_TRIADS2_COLOR 0x587B9588
  203. #define TEAM_TRIADS3_COLOR 0x587B9577
  204. #define TEAM_TRIADS4_COLOR 0x587B9566
  205. #define TEAM_TRIADS5_COLOR 0x587B9555
  206. #define TEAM_TRIADS6_COLOR 0x587B9544
  207. #define TEAM_TRIADS7_COLOR 0x587B9533
  208. #define TEAM_TRIADS8_COLOR 0x587B9522
  209. #define TEAM_TRIADS9_COLOR 0x587B9511
  210. #define TEAM_TRIADS10_COLOR 0x587B9500
  211. #define TEAM_BIKERS_COLOR 0xA49A00C8
  212. #define TEAM_BIKERS1_COLOR 0xA49A0099
  213. #define TEAM_BIKERS2_COLOR 0xA49A0088
  214. #define TEAM_BIKERS3_COLOR 0xA49A0077
  215. #define TEAM_BIKERS4_COLOR 0xA49A0066
  216. #define TEAM_BIKERS5_COLOR 0xA49A0055
  217. #define TEAM_BIKERS6_COLOR 0xA49A0044
  218. #define TEAM_BIKERS7_COLOR 0xA49A0033
  219. #define TEAM_BIKERS8_COLOR 0xA49A0022
  220. #define TEAM_BIKERS9_COLOR 0xA49A0011
  221. #define TEAM_BIKERS10_COLOR 0xA49A0000
  222. #define ADMIN_SPEC_TYPE_NONE 0
  223. #define ADMIN_SPEC_TYPE_PLAYER 1
  224. #define ADMIN_SPEC_TYPE_VEHICLE 2
  225. #define COLOR_RED 0xAA3333AA
  226. #define COLOR_GREY 0xAFAFAFAA
  227. #define COLOR_GREEN 0x33AA33AA
  228. #define COLOR_YELLOW 0xFFFF00AA
  229. #define COLOR_WHITE 0xFFFFFFAA
  230. #define COLOR_BLUE 0x0000BBAA
  231. #define COLOR_LIGHTBLUE 0x33CCFFAA
  232. #define COLOR_ORANGE 0xFF9900AA
  233. #define COLOR_orange 0xFF9900AA
  234. #define COLOR_LIME 0x10F441AA
  235. #define COLOR_MAGENTA 0xFF00FFFF
  236. #define COLOR_NAVY 0x000080AA
  237. #define COLOR_AQUA 0xF0F8FFAA
  238. #define COLOR_CRIMSON 0xDC143CAA
  239. #define COLOR_FLBLUE 0x6495EDAA
  240. #define COLOR_BISQUE 0xFFE4C4AA
  241. #define COLOR_BLACK 0x000000AA
  242. #define COLOR_CHARTREUSE 0x7FFF00AA
  243. #define COLOR_BROWN 0xA52A2AAA
  244. #define COLOR_CORAL 0xFF7F50AA
  245. #define COLOR_GOLD 0xB8860BAA
  246. #define COLOR_GREENYELLOW 0xADFF2FAA
  247. #define COLOR_INDIGO 0x4B00B0AA
  248. #define COLOR_IVORY 0xFFFF82AA
  249. #define COLOR_LAWNGREEN 0x7CFC00AA
  250. #define COLOR_LIMEGREEN 0x32CD32AA
  251. #define COLOR_MIDNIGHTBLUE 0x191970AA
  252. #define COLOR_MAROON 0x800000AA
  253. #define COLOR_OLIVE 0x808000AA
  254. #define COLOR_ORANGERED 0xFF4500AA
  255. #define COLOR_PINK 0xFFC0CBAA
  256. #define COLOR_SPRINGGREEN 0x00FF7FAA
  257. #define COLOR_TOMATO 0xFF6347AA
  258. #define COLOR_YELLOWGREEN 0x9ACD32AA
  259. #define COLOR_MEDIUMAQUA 0x83BFBFAA
  260. #define COLOR_MEDIUMMAGENTA 0x8B008BAA
  261. #define COLOR_BRIGHTRED 0xDC143CAA
  262. #define COLOR_SYSTEM 0xEFEFF7AA
  263. #define COLOR_BM 0x91FF22FF
  264. #define COLOR_GM 0x26FC07FF
  265. #define COLOR_RM 0xF4F400FF
  266. #define COLOR_FA 0x1768FFFF
  267. #define COLOR_LIGHTBLUE 0x33CCFFAA
  268. #define COLOR_LIGHTRED 0xFF6347AA
  269. #define COLOR_INVIS 0xAFAFAF00
  270. #define COLOR_SPEC 0xBFC0C200
  271. #define INACTIVE_PLAYER_ID 255
  272. #define CAR_AMOUNT 700 //Change to Your Vehicle Amount
  273. #define MAS 0xAA3333AA
  274. #define MATTMSG SendClientMessage
  275. #define SCM SendClientMessage
  276. #define SPD ShowPlayerDialog
  277. #define COLOR_GRAD2 0xBFC0C2FF
  278. #define COLOR_YELLOW 0xFFFF00AA
  279. #define Price_Knife 120
  280. #define Price_BaseBall 170
  281. #define Price_Katana 260
  282. #define Price_Greneade 300
  283. #define Price_9mm 320
  284. #define Price_sdpistol 330
  285. #define Price_Deagle 660
  286. #define Price_Shotgun 1000
  287. #define Price_ShawnOff 3200
  288. #define Price_spaz12 12000
  289. #define Price_Uzi 1700
  290. #define Price_mp5 1950
  291. #define Price_ak47 17000
  292. #define Price_m4 16000
  293. #define Price_Tec9 2200
  294. #define Price_Rifle 5000
  295. #define Price_Sniper 20000
  296. /*          FORWARD-ovi               */
  297. forward OnPlayerUpdate(playerid);
  298. forward SetPlayerUnMute();
  299. forward One();
  300. forward Two();
  301. forward Three();
  302. forward Go();
  303. forward CountdownSpam();
  304. forward DollahScoreUpdate();
  305. forward WebSite();
  306. forward BanLog(string[]);
  307. forward SetPlayerRandomSpawn(playerid);
  308. forward SetPlayerNewMission();
  309. forward SetPlayerToTeamColor(playerid);
  310. forward SetupPlayerForClassSelection(playerid);
  311. forward SetPlayerTeamFromClass(playerid,classid);
  312. forward GameModeExitFunc();
  313. forward GameModeInitExitFunc();
  314. forward PrePlayerNewMission();
  315. forward SetPlayerNewMission();
  316. forward RaceDelay();
  317. forward RaceDelayr();
  318. forward RaceDelayg();
  319. forward OnPlayerDropCashBox(playerid);
  320. forward RewardCalc(playerid,min,max);
  321. forward CheckpointReset();
  322. forward SetAllPlayerCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi, num);
  323. forward SetAllCopCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi);
  324. forward OpenDoors();
  325. forward SetPlayerCriminal(playerid,declare,reason[],pe,flash);
  326. forward SetPlayerFree(playerid,declare,reason[],pe,flash);
  327. forward OffTheHook();
  328. forward SetPlayerWeapons(playerid);
  329. forward PrintPlayerWeapons(playerid,targetid);
  330. forward PrintPlayerprovjeri(playerid,targetid);
  331. forward GameModeInitExitFunc();
  332. forward LoadConfig();
  333. forward GetVal(string[]);
  334. forward SyncUp();
  335. forward SyncTime();
  336. forward PayDay();
  337. forward OnPlayerLogin(playerid,password[]);
  338. forward OnPlayerRegister(playerid, password[]);
  339. forward OnUpdatePlayer(playerid);
  340. forward BroadCast(color,const string[]);
  341. forward OOCOff(color,const string[]);
  342. forward PlaySoundAll(playerid, soundid, Float:psx ,Float:psy ,Float:psz);
  343. forward SendTeamMessage(team, color, string[]);
  344. forward SendAdminMessage(color, string[]);
  345. forward PlayerPlayMusic(playerid);
  346. forward StopMusic();
  347. forward Encript(string[]);
  348. forward Decript(string[]);
  349. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  350. forward ProxDetectorS(Float:radi, playerid, targetid);
  351. forward FixHour(hour);
  352. forward TestDistance(playerid,giveplayerid,Float:tarx,Float:tary,Float:tarz,Float:radi);
  353. forward PlayJailSound(sound , stopsound, duration, Float: jailx,  Float: jaily,  Float: jailz);
  354. forward GameTicks();
  355. forward ConvertTicks(ticks);
  356. forward CopScanner();
  357. forward Spectator();
  358. forward IsAPlane(carid);
  359. forward IsACopCar(carid);
  360. forward IsAnAmbulance(carid);
  361. forward IsATruck(carid);
  362. forward ClearCrime(playerid);
  363. forward BetWinner(playerid,contest);
  364. forward PayLog(string[]);
  365. forward CmdLog(string[]);
  366. forward RaceDebug(playerid);
  367. forward RaceEnd();
  368. forward DMDelay();
  369. forward DMDelayr();
  370. forward DMDelayg();
  371. forward DMDetect();
  372. forward DMEndCam(playerid,string[]);
  373. forward DMScoreCalc();
  374. forward JobGive(playerid);
  375. forward HireCost(carid);
  376. forward CarCheck();
  377. forward CarInit();
  378. forward CarTow(carid);
  379. forward CarRespawn(carid);
  380. forward LockCar(carid);
  381. forward UnLockCar(carid);
  382. forward TeamCarLockInit();
  383. forward TeamLockReset(carid);
  384. forward InitLockDoors(playerid);
  385. forward TeamLockDoors(playerid);
  386. forward DebugPrint(string[],value1,value2,type);
  387. forward CellPhoneTimer();
  388. forward SetPlayerFlash();
  389. forward SetPlayerFlashRev ();
  390. forward RingToner();
  391. forward RingTonerRev();
  392. forward SetPlayerUnjail();
  393. forward VoteKickTimer();
  394. forward ClearVote(kickedid);
  395. forward PrintSBizInfo(playerid,targetid);
  396. forward PrintBizInfo(playerid,targetid);
  397. forward SetPlayerToTeamColorFlash(playerid);
  398. forward SaveRace(playerid,name[]);
  399. forward BestTime(name[]);
  400. forward LoadTmp();
  401. forward LoadRace(playerid,name[]);
  402. forward LoadProperty ();
  403. forward LoadDM(playerid,name[]);
  404. forward SaveDM(playerid,name[]);
  405. forward LoadRaceList(playerid,name[]);
  406. forward SaveRaceList(playerid,name[]);
  407. forward LoadBizz();
  408. forward LoadSBizz();
  409. forward SkyDive();
  410. forward Production();
  411. forward DateProp(playerid);
  412. forward Checkprop();
  413. forward DelPrint(string1[]);
  414. forward LoadPlayer(loaderid,const string[]);
  415. forward SavePlayer(loaderid,const string[]);
  416. forward ini_GetKey(line[]);
  417. forward ini_GetValue(line[]);
  418. forward CopCheck(playerid);
  419. forward MedCheck(playerid);
  420. forward OnPlayerRename (name[],string[],playerid);
  421. forward OnPropUpdate();
  422. forward ABroadCast(color,const string[],level);
  423. forward SendTeamBeepMessage(team, color, string[]);
  424. forward SendEnemyMessage(color, string[]);
  425. forward PlayerFixRadio(playerid);
  426. forward PlayerFixRadio2(playerid);
  427. forward StopJail();
  428. forward HouseLevel(playerid);
  429. forward CHouseLevel(houseid);
  430. forward CrimInRange(Float:radi, playerid,copid);
  431. forward CrimProxDetector(Float:radi, playerid,col1,col2,col3,col4,col5,col6,col7,col8,col9,col10);
  432. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  433. forward PlayerInArea();
  434. forward PlayerInArena();
  435. forward SendRadioMessage(member, color, string[]);
  436. forward PenInArea();
  437. forward CustomPickups();
  438. forward IdleKick();
  439. forward AntiCamp();
  440. forward AntiTeleport ();
  441. forward RaceSpec(playerid);
  442. forward BestPlayer(playerid);
  443. forward PenDelay(playerid);
  444. forward SpeedDelay(playerid);
  445. forward DMPlayer(playerid);
  446. forward InHouse();
  447. forward IsStringAName(string[]);
  448. forward GetPlayerID(string[]);
  449. forward SetCamBack(playerid);
  450. forward InfiniteLife();
  451. forward AddsOn();
  452. forward SetAllPlayerRaceCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi, num);
  453. forward RaceCheckpointReset();
  454. /*          NEW-ovi               */
  455. new gPlayerCheckpointStatus[MAX_PLAYERS];
  456. new SlowmotionPickup[MAX_PLAYERS];
  457. new GodTimer;
  458. new HidePM[MAX_PLAYERS];
  459. new BMK;
  460. new RMK;
  461. new GMK;
  462. new FAK;
  463. new bool:openclose[MAX_PLAYERS]=true;
  464. new bool:openclose1[MAX_PLAYERS]=false;
  465. new bool:openclose2[MAX_PLAYERS]=false;
  466. new bool:openclose3[MAX_PLAYERS]=false;
  467. new bool:openclose4[MAX_PLAYERS]=false;
  468. new God[MAX_PLAYERS];
  469. new gPlayerLapStatus[MAX_PLAYERS];
  470. new gPlayerLogged[MAX_PLAYERS];
  471. new gPlayerSpawned[MAX_PLAYERS];
  472. new gPlayerLogTries[MAX_PLAYERS];
  473. new gActivePlayers[MAX_PLAYERS];
  474. new Text:Textdraw0;
  475. new Text:Textdraw1;
  476. new Text:Textdraw2;
  477. new Event1;
  478. new Event2;
  479. new Event3;
  480. new Event4;
  481. new Event5;
  482. new Event6;
  483. new Event7;
  484. new Event8;
  485. new Event9;
  486. new AdminDuty[MAX_PLAYERS];
  487. new Text3D:label[MAX_PLAYERS];
  488. new Text3D:utisan[MAX_PLAYERS];
  489. new FA;
  490. new GM;
  491. new RUS;
  492. new BM;
  493. new unmutetimer;
  494. new gSpectateID[MAX_PLAYERS];
  495. new gSpectateType[MAX_PLAYERS];
  496. new specplayerid, idx;
  497. new RandomPoslovice[][] =
  498. {
  499.     //---------------------------Narodne-----------------------------------------
  500.     "{99CCDD}*Izreka dana: Ljudi se doèekuju prema odjeæi, a ispraæaju prema znanju.",
  501.     "{99CCDD}*Izreka dana: Gvožðe se kuje dok je vruæe.",
  502.     "{99CCDD}*Izreka dana: Bogat je onaj koji toliko posjeduje da niÅ¡ta viÅ¡e ne želi.",
  503.     "{99CCDD}*Izreka dana: Ljudi se najviÅ¡e muèe zbog hljeba i ljubavi.",
  504.     "{99CCDD}*Izreka dana: Ko ima silu uzima silom, ko nema silu uzima pameæu.",
  505.     "{99CCDD}*Izreka dana: Ne obara se svako drvo prvim udarcem.",
  506.     "{99CCDD}*Izreka dana: Onaj koji pita ispadne budala pet minuta, ali onaj koji ne pita ostane budala cijeli život.",
  507.     "{99CCDD}*Izreka dana: U trenutku uspjeha ne zaboravljaj svoje neuspjehe.",
  508.     "{99CCDD}*Izreka dana: Uèitelji otvaraju vrata, ali vi morate uæi sami.",
  509.     "{99CCDD}*Izreka dana: Ko prestane biti prijatelj, prijatelj nikada nije ni bio.",
  510.     "{99CCDD}*Izreka dana: Mudrac sve svoje sa sobom nosi.",
  511.     "{99CCDD}*Izreka dana: Èesto cijeli grad mora platiti grijeh jednog zlobnika.",
  512.     "{99CCDD}*Izreka dana: Èovjek je smrtan, ali njegovo ime može postati besmrtno.",
  513.     "{99CCDD}*Izreka dana: Pametan èovjek naæi æe vodu i u pustinji, a budala æe kraj rijeke umrijeti od žeði.",
  514.     "{99CCDD}*Izreka dana: SiromaÅ¡an nema slobodnog vremena.",
  515.     "{99CCDD}*Izreka dana: Velike nesreæe nastaju iz malih uzroka.",
  516.     "{99CCDD}*Izreka dana: Onoga ko marljivo radi ni nebo ne može uèiniti prosjakom.",
  517.     "{99CCDD}*Izreka dana: Boj ne bije zladano oružje, ved srce u junaka.",
  518.     "{99CCDD}*Izreka dana: Blago onom ko ima prijatelje, teÅ¡ko onome ko ih treba.",
  519.     "{99CCDD}*Izreka dana: Bolje je zdravom u sirotinji, nego li bogatom u bolesti.",
  520.     "{99CCDD}*Izreka dana: Èovjek se mora u znoju kupati, da ne gleda iz tude ruke.",
  521.     "{99CCDD}*Izreka dana: Pare kad odlaze imaju stotinu nogu, a kad dolaze samo dvije.",
  522.     "{99CCDD}*Izreka dana: U složnu porodicu sreæa sama od sebe dolazi.",
  523.     "{99CCDD}*Izreka dana: Vrana vrani oèi ne vadi.",
  524.  
  525.     //---------------------------Poznati---------------------------------
  526.     "{99CCDD}*Izreka dana: Sreæu æete postiæi kad budete rijeÅ¡ili da se za nju borite (Darvill).",
  527.     "{99CCDD}*Izreka dana: LakÅ¡e je razbiti atom, nego predrasude (Albert Einstein).",
  528.     "{99CCDD}*Izreka dana: Nijedno uže ne vuèe tako snažno i ne povezuje tako èvrsto kao tanka nit ljubavi (Robert Burton).",
  529.     "{99CCDD}*Izreka dana: Lud je samo onaj èija se ludost ne poklapa s ludošæu veæine (S.Beckett).",
  530.     "{99CCDD}*Izreka dana: Zivot poznaje samo jednu istinsku zabrinutost, a to je smrt (Dumas).",
  531.     "{99CCDD}*Izreka dana: Uspjeh je samo stvar srece, pitaj koga god ko nije uspio (Earl Wilson)."
  532. };
  533. new gLastCar[301];
  534. new gOoc[MAX_PLAYERS];
  535. new BigEar[MAX_PLAYERS];
  536. new Spectate[MAX_PLAYERS];
  537. new FlashTime[MAX_PLAYERS];
  538. new CellTime[MAX_PLAYERS];
  539. new JailTime[MAX_PLAYERS];
  540. new StartTime[MAX_PLAYERS];
  541. new RaceTime[MAX_PLAYERS];
  542. new Contract[MAX_PLAYERS];
  543. new KickVote[MAX_PLAYERS];
  544. new VoteKick[MAX_PLAYERS];
  545. new LastVote[MAX_PLAYERS];
  546. new HireCar[MAX_PLAYERS];
  547. new SafeTime[MAX_PLAYERS];
  548. /*new HidePM[MAX_PLAYERS];*/
  549. new gDice[MAX_PLAYERS];
  550. new gSkyDive[MAX_PLAYERS];
  551. new gSpeedo[MAX_PLAYERS];
  552. new gSpentCash[MAX_PLAYERS];
  553. new FirstSpawn[MAX_PLAYERS];
  554. new gPlayerFighter[MAX_PLAYERS];
  555. new DmScore[MAX_PLAYERS];
  556. new LapCount[MAX_PLAYERS];
  557. new SwitchKey[MAX_PLAYERS];
  558. new TVMode[MAX_PLAYERS];
  559. new Fixr[MAX_PLAYERS];
  560. new Hidden[MAX_PLAYERS];
  561. new Locator[MAX_PLAYERS];
  562. new PLicence[MAX_PLAYERS];
  563. new DmHiScore;
  564. new DmHiPlayer = 255;
  565. new Speeder;
  566. new gFighters;
  567. new pos1time;
  568. new pos2time;
  569. new pos3time;
  570. new cmins,csecs,cmils;
  571. new Mobile[MAX_PLAYERS];
  572. new RingTone[MAX_PLAYERS];
  573. new CallCost[MAX_PLAYERS];
  574. new Mute[MAX_PLAYERS];
  575. new gPlayerAccount[MAX_PLAYERS];
  576. new gRaceGuy[MAX_PLAYERS];
  577. new gPlayerMission[MAX_PLAYERS];
  578. new gPhoneBook[MAX_PLAYERS];
  579. new gLastDriver[302];
  580. new gTeamCarLock[265];
  581. new gCarLock[265];
  582. new gPublicEnemy = INVALID_PLAYER_ID;
  583. new gSuperCop = INVALID_PLAYER_ID;
  584. new gRaceLeader;
  585. new gFightLeader;
  586. new gRaceFin;
  587. new gRaceMid;
  588. new gRaceMid2;
  589. new gRaceEnd;
  590. new LevScoreOld;
  591. new MissionActive;
  592. new DropOff;
  593. new noooc;
  594. new racelist = 1;
  595. new dmlist = 1;
  596. new automission = 1;
  597. new adds = 1;
  598. new addtimer = 60000;
  599. new raceendtimer;
  600. new dmweapon;
  601. new RetVal;
  602. new specflick;
  603. new Float:rx, Float:ry, Float:rz;
  604. new Float:cwx, Float:cwy, Float:cwz;
  605. new Float: scx, Float: scy, Float: scz;
  606. new Float:rsx, Float:rsy, Float:rsz;
  607. new Float:rmx, Float:rmy, Float:rmz;
  608. new Float:rm2x, Float:rm2y, Float:rm2z;
  609. new Float:rex, Float:rey, Float:rez;
  610. new Float: jailxt, Float: jailyt, Float: jailzt;
  611. new stopsoundt;
  612. new carselect[15];
  613. new objstore[128];
  614. new cbjstore[128];
  615. new motd[256];
  616. new CurrentRace[256];
  617. new stealcar = 0;
  618. new stealcardest = 0;
  619. new rccounter = 0;
  620. new racedelay = 60000;
  621. new RNext;
  622. new RNext2;
  623. new REnd;
  624. new Float:radardist = 1000.0;
  625. new radarfreq = 1000;
  626. new ghour = 0;
  627. new gminute = 0;
  628. new gsecond = 0;
  629. new reward = 0;
  630. new mediccharge = 1000;
  631. new preward = 0;
  632. new numplayers = 0;
  633. new dollah = 1000; // Amount player recieves on spawn.
  634. new realtime = 1;
  635. new wtime = 15;
  636. new hotwire = 1;
  637. new cashbox = 1;
  638. new streetrace = 1;
  639. new deathmatch = 1;
  640. new levelcost = 10000;
  641. new deathcost = 500;
  642. new paycheck = 10000;
  643. new jobdelay = 20000;
  644. new petime = 180000; //3 minuites
  645. new jailtime = 20000; //20 seconds
  646. new callcost = 10; //20 seconds
  647. new forceteam = 0;
  648. new realchat = 1;
  649. new fow = 1;
  650. new timeshift = 0;
  651. new stats = 0;
  652. new gdebug = 1;
  653. new shifthour;
  654. new synctimer;
  655. new newmistimer;
  656. new unjailtimer;
  657. new playertimer;
  658. new dmtimer;
  659. new cartimer;
  660. new lastkiller;
  661. new celltimer;
  662. new intrate = 1;
  663. new teamcarlock = 0;
  664. new levelexp = 2;
  665. new nocasino = 0;
  666. new idletime = 1800000; //30 mins
  667. new dmtime = 240; //4 mins
  668. new accountplay = 1;
  669. new civnokill =1;
  670. new basedcost = 1000;
  671. new suecost = 1000;
  672. new cchargetime = 10;
  673. new txtcost = 1;
  674. new offhook;
  675. new pickups;
  676. new randomrace = 0;
  677. new nocarcash = 0;
  678. new skydivecount = 60;
  679. new Gtickcount;
  680. new gLaps;
  681. new ChosenSkin[MAX_PLAYERS];
  682. new SelectChar[MAX_PLAYERS];
  683. new SelectCharID[MAX_PLAYERS];
  684. new SelectCharPlace[MAX_PLAYERS];
  685. new CIV[] = {7,19,20,23,73,101,122};
  686. new MedicBill[MAX_PLAYERS];
  687. new Float:ChangePos[MAX_PLAYERS][3];
  688. new ChangePos2[MAX_PLAYERS][2];
  689. new blockspam[MAX_PLAYERS];
  690. new Float:PlayerPos[MAX_PLAYERS][6];
  691. new Float:DmeCam[6];
  692. new Float:TeleportDest[MAX_PLAYERS][3];
  693. new Float:CarTracking[MAX_PLAYERS][4];
  694. new Float:TelePos[MAX_PLAYERS][6];
  695. new Float:PenPos[3];
  696. new BetRace[MAX_PLAYERS][2];
  697. new BetDm[MAX_PLAYERS][2];
  698. new Races[54][128] = {
  699. {"LS2LV2LS"},
  700. {"Downhill"},
  701. {"Docks"},
  702. {"StormDrain"},
  703. {"Rectang"},
  704. {"RampTime"},
  705. {"VineDrive"},
  706. {"RiverDieR"},
  707. {"aero"},
  708. {"AirportDrag"},
  709. {"AirportParking"},
  710. {"AirportRunway"},
  711. {"AirportUnderground"},
  712. {"Square"},
  713. {"CrazyMtChillad"},
  714. {"CupCakeCorner"},
  715. {"Drift"},
  716. {"grovesfjump"},
  717. {"HillRun"},
  718. {"Insanity"},
  719. {"Jumper"},
  720. {"LSDual"},
  721. {"LSMainStreet"},
  722. {"LSOrbital"},
  723. {"OverHill_4X4"},
  724. {"LAEastbound"},
  725. {"StadiumLoop"},
  726. {"TourDeSA"},
  727. {"Tracker"},
  728. {"Vinal"},
  729. {"4x4DirtLoop"},
  730. {"4x4OverTrack"},
  731. {"4x4LSSouth"},
  732. {"4x4DirtLoop"},
  733. {"HillRun"},
  734. {"BigWater"},
  735. {"BlueFarm"},
  736. {"BlueRed"},
  737. {"Coastal"},
  738. {"Countryloop"},
  739. {"DesertGas"},
  740. {"DesertRamp"},
  741. {"FarmersLoop"},
  742. {"JimsRing"},
  743. {"ScorpGo"},
  744. {"RiverRun"},
  745. {"HarbourLoop"},
  746. {"MoonRaker"},
  747. {"VineDrive"},
  748. {"DesertDiver"},
  749. {"DriftHell"},
  750. {"PierPressure"},
  751. {"Mental"},
  752. {"BeachTwist"}
  753. };
  754.  
  755. new DmGun[12] = {31,30,32,26,28,24,27,25,29,22,23,0};
  756.  
  757. new DeathMatches[36][128] = {
  758. {"Area52"},
  759. {"Atlantis"},
  760. {"Baseball"},
  761. {"Construction"},
  762. {"Quarry"},
  763. {"Refinery"},
  764. {"RodsOffice"},
  765. {"RodsCastle"},
  766. {"Carrier"},
  767. {"TheBoat"},
  768. {"Ruins"},
  769. {"RodsCampus"},
  770. {"Ruins"},
  771. {"Urban"},
  772. {"Ruins"},
  773. {"TheCage"},
  774. {"TheFarm"},
  775. {"WildWest"},
  776. {"Suburb"},
  777. {"TruckYard"},
  778. {"OpenWarII"},
  779. {"MastaTrailer"},
  780. {"EstateOfHate"},
  781. {"OpenWar"},
  782. {"HellSite"},
  783. {"BigEars"},
  784. {"PirateView"},
  785. {"CabinFever"},
  786. {"BatesMotel"},
  787. {"Woods"},
  788. {"SleepyHallow"},
  789. {"WangView"},
  790. {"DeathWay"},
  791. {"TrainHouse"},
  792. {"Glen"},
  793. {"Abandon"}
  794. };
  795.  
  796. new Float:gRandomPlayerSpawns[1][3] = {
  797. {2231.9514,-1179.6395,29.7971} // sp1
  798. };
  799. /*
  800. {1094.4218,-1098.2269,25.2422},
  801. {1101.2023,-1085.7203,26.1813},
  802. {1096.1254,-1064.2736,29.1876},
  803. {1103.8142,-1026.3247,32.0990},
  804. {1142.7146,-1026.3687,32.0073},
  805. {291.8222,-1336.9775,53.4404},
  806. {246.7791,-1354.0120,53.1094},
  807. {161.7426,-1342.1641,69.6395},
  808. {419.9783,-1264.4738,51.5809},
  809. {398.8884,-1270.2999,50.0198},
  810. {2241.2683,-1241.4480,25.3971},
  811. {2221.3689,-1237.8572,24.8427},
  812. {2144.9207,-1245.7646,24.9917},
  813. {2104.0166,-1245.5676,25.2678},
  814. {2191.5950,-1277.3251,25.0362}
  815. };
  816. */
  817.  
  818. new Float:gRandomDMSpawns[21][3] = {
  819. {-2414.0,1551.8,2.1}, // 1
  820. {-2406.9,1555.2,2.1}, // 2
  821. {-2392.8,1550.4,2.1}, // 3
  822. {-2406.6,1545.1,2.1}, // 4
  823. {-2391.9,1539.2,2.1}, // 5
  824. {-2379.7,1541.8,2.1}, // 6
  825. {-2366.9,1539.6,2.1}, // 7
  826. {-2426.6,1537.4,2.1}, // 8
  827. {-2473.5,1550.1,33.2}, // 9
  828. {-2474.2,1546.8,23.6}, // 10
  829. {-2464.2,1530.9,17.3}, // 11
  830. {-2437.5,1559.0,17.3}, // 12
  831. {-2416.3,1554.3,26.0}, // 13
  832. {-2424.7,1542.5,26.0}, // 14
  833. {-2410.5,1532.4,26.0}, // 15
  834. {-2403.5,1546.5,26.0}, // 16
  835. {-2389.2,1550.7,26.0}, // 17
  836. {-2368.0,1556.7,17.3}, // 18
  837. {-2351.5,1551.1,23.1}, // 19
  838. {-2313.7,1546.4,18.7}, // 20
  839. {-2313.7,1546.4,18.7} // 21
  840. };
  841.  
  842. new Float:gDMWbounds[4] = {0.0,0.0,0.0,0.0};
  843.  
  844. new Float:gCopPlayerSpawns[2][3] = {
  845. {2224.2603,-1142.8453,1025.7969},
  846. {2224.2603,-1142.8453,1025.7969}
  847. //{614.8,-608.2,17.2},
  848. //{611.5,-607.8,17.2}
  849. };
  850.  
  851. new Float:gMedPlayerSpawns[2][3] = {
  852. {2224.2603,-1142.8453,1025.7969},
  853. {2224.2603,-1142.8453,1025.7969}
  854. };
  855.  
  856. new Float:gRaceCheckpoints[5][3] = {
  857. {144.869800 ,-1564.952000,10.716340},
  858. {1370.314000,-939.442600,34.187500},
  859. {2865.989000,-1657.180000,10.875000},
  860. {2123.180000,-2665.730000,13.375000},
  861. {1350.4,-1400.2,13.3}//ls
  862. };
  863.  
  864. /*
  865. {1699.2, 1435.1, 10.7},
  866. {1457.7,-1160.6,23.4},
  867. {1454.2,-1439.2,13.1},
  868. {1711.3,-1439.7,13.1},
  869. {1710.7,-1163.6,23.4},
  870. {1711.3,-1439.7,13.1},
  871. {-1417.0,-295.8,14.1},
  872. {-1945.2,606.4,35.0},//sf
  873. {-2262.5,2310.1,4.8},
  874. {-795.5,2421.2,157.0},
  875. {310.1,1946.2,17.6},
  876. {2349.5,2142.5,10.6},//lv
  877. {1350.4,-1400.2,13.3}//ls
  878. };
  879. */
  880.  
  881. new Float:gCBdropoff[37][3] = {
  882. {2217.2,-1179.7,29.7},
  883. {1098.1,-1428.0,22.7},
  884. {2484.2,-1961.8,16.7},
  885. {733.2,-1357.9,23.5},
  886. {1411.6,-1455.1,20.4},
  887. {1080.6,-1605.0,20.4},
  888. {382.0,-2058.7,10.7},
  889. {656.1,-1646.6,15.4},
  890. {816.2,-1380.5,23.5},
  891. {853.3,-1388.2,-0.5},
  892. {915.4,-1235.1,17.2},
  893. {1153.7,-1180.4,32.8},
  894. {1183.9,-1257.3,18.8},
  895. {1441.3,-926.8,39.6},
  896. {1527.5,-893.5,57.6},
  897. {1342.1,-1624.3,17.7},
  898. {1292.1,-770.7,95.9},
  899. {1907.9,-1318.6,14.1},
  900. {1971.7,-1284.5,28.4},
  901. {2687.1,-1144.6,71.3},
  902. {2654.1,-1317.5,58.9},
  903. {2771.0,-1388.5,27.1},
  904. {2793.3,-1945.0,17.3},
  905. {197.9,-1206.0,78.3},
  906. {2447.5,-2209.8,26.6},
  907. {2512.4,-2072.9,26.5},
  908. {2171.6,-1732.1,17.2},
  909. {2175.4,-1836.1,16.1},
  910. {2399.5,-1550.7,28.0},
  911. {2109.2,-1010.2,63.8},
  912. {1409.9,-1274.5,33.4},
  913. {1279.8,-1439.0,20.4},
  914. {2234.0,-2269.3,17.8},
  915. {2025.8,-2133.1,19.8},
  916. {811.2,-1098.2,25.9},
  917. {818.2,-944.2,55.2},
  918. {1976.8,-1779.4,17.3}
  919. };
  920.  
  921. enum pSpec
  922. {
  923.     Float:sPx,
  924.     Float:sPy,
  925.     Float:sPz,
  926.     sPint,
  927.     sLocal,
  928.     sCam,
  929. };
  930.  
  931. new Unspec[MAX_PLAYERS][pSpec];
  932.  
  933. enum eCars
  934. {
  935.     model_id,
  936.     Float:pos_x,
  937.     Float:pos_y,
  938.     Float:pos_z,
  939.     Float:z_angle
  940. };
  941.  
  942. enum pInfo
  943. {
  944.     pKey[128],
  945.     pCash,
  946.     pAccount,
  947.     pAdmin,
  948.     pLevel,
  949.     pExp,
  950.     gPupgrade,
  951.     pKills,
  952.     pCB,
  953.     pHW,
  954.     pSR,
  955.     pWA,
  956.     pTut,
  957.     pPEN,
  958.     pGun1,
  959.     pGun2,
  960.     pGun3,
  961.     pGun4,
  962.     pGun5,
  963.     pGun6,
  964.     pAmmo1,
  965.     pAmmo2,
  966.     pAmmo3,
  967.     pAmmo4,
  968.     pAmmo5,
  969.     pAmmo6,
  970.     pCHBodovi,
  971.     pGameSage,
  972.     pJailed,
  973.     pJailTime,
  974.     Float:pSHealth,
  975.     Float:pHealth,
  976.     Float:pPos_x,
  977.     Float:pPos_y,
  978.     Float:pPos_z,
  979.     pInt,
  980.     pLocal,
  981.     pTeam,
  982.     pLeader,
  983.     pMember,
  984.     pFMember,
  985.     pRank,
  986.     pChar,
  987.     pModel,
  988.     pWarns,
  989.     pPhousekey,
  990.     pPbiskey,
  991.     pTVec,
  992.     pReg,
  993.     pSex,
  994.     pOrigin,
  995.     pPnumber,
  996.     pMuteTime,
  997.     pMuted,
  998.     pMotokey,
  999. };
  1000. new PlayerInfo[MAX_PLAYERS][pInfo];
  1001.  
  1002. enum plInfo
  1003. {
  1004.     plKey[128],
  1005.     plCash,
  1006.     plAccount,
  1007.     plAdmin,
  1008.     plLevel,
  1009.     plExp,
  1010.     glPupgrade,
  1011.     plKills,
  1012.     plCB,
  1013.     plHW,
  1014.     plSR,
  1015.     plWA,
  1016.     plPEN,
  1017.     plGun1,
  1018.     plGun2,
  1019.     plGun3,
  1020.     plGun4,
  1021.     plGun5,
  1022.     plGun6,
  1023.     plAmmo1,
  1024.     plAmmo2,
  1025.     plAmmo3,
  1026.     plAmmo4,
  1027.     plAmmo5,
  1028.     plAmmo6,
  1029.     Float:plSHealth,
  1030.     Float:plHealth,
  1031.     Float:plPos_x,
  1032.     Float:plPos_y,
  1033.     Float:plPos_z,
  1034.     plInt,
  1035.     plLocal,
  1036.     plTeam,
  1037.     plLeader,
  1038.     plMember,
  1039.     plFMember,
  1040.     plRank,
  1041.     plChar,
  1042.     plModel,
  1043.     plWarns,
  1044.     plPnumber,
  1045.     plPhousekey,
  1046.     plPbiskey,
  1047.     plTVec,
  1048.     plReg,
  1049. };
  1050. new PLlayerInfo[MAX_PLAYERS][plInfo];
  1051.  
  1052. enum hInfo
  1053. {
  1054.     Float:hEntrancex,
  1055.     Float:hEntrancey,
  1056.     Float:hEntrancez,
  1057.     Float:hExitx,
  1058.     Float:hExity,
  1059.     Float:hExitz,
  1060.     hHealthx,
  1061.     hHealthy,
  1062.     hHealthz,
  1063.     hArmourx,
  1064.     hArmoury,
  1065.     hArmourz,
  1066.     hOwner[MAX_PLAYER_NAME],
  1067.     hDiscription[MAX_PLAYER_NAME],
  1068.     hValue,
  1069.     hHel,
  1070.     hArm,
  1071.     hInt,
  1072.     hLock,
  1073.     hOwned,
  1074.     hRooms,
  1075.     hRent,
  1076.     hRentabil,
  1077.     hTakings,
  1078.     hVec,
  1079.     hVcol1,
  1080.     hVcol2,
  1081.     hDate,
  1082.     hLevel,
  1083.     hWorld,
  1084. };
  1085.  
  1086. new HouseInfo[61][hInfo];
  1087.  
  1088. enum bInfo
  1089. {
  1090.     Float:bEntrancex,
  1091.     Float:bEntrancey,
  1092.     Float:bEntrancez,
  1093.     Float:bExitx,
  1094.     Float:bExity,
  1095.     Float:bExitz,
  1096.     bHealthx,
  1097.     bHealthy,
  1098.     bHealthz,
  1099.     bArmourx,
  1100.     bArmoury,
  1101.     bArmourz,
  1102.     bOwner[MAX_PLAYER_NAME],
  1103.     bDiscription[64],
  1104.     bValue,
  1105.     bHel,
  1106.     bArm,
  1107.     bInt,
  1108.     bLock,
  1109.     bOwned,
  1110.     bEntcost,
  1111.     bTakings,
  1112.     bDate,
  1113.     bLevel,
  1114.     bProd,
  1115.     bProdCap,
  1116.     bComp,
  1117.     bCompCap,
  1118.     bProdCost,
  1119.     bPayComp,
  1120.     bPriceMod,
  1121. };
  1122. new Float:gInviteSpawns[10][4] = {
  1123. {1663.8649,-1243.1665,233.3750,267.7425},
  1124. {1663.8649,-1243.1665,233.3750,267.7425},
  1125. {1663.8649,-1243.1665,233.3750,267.7425},
  1126. {1663.8649,-1243.1665,233.3750,267.7425},
  1127. {1663.8649,-1243.1665,233.3750,267.7425},
  1128. {1663.8649,-1243.1665,233.3750,267.7425},
  1129. {1663.8649,-1243.1665,233.3750,267.7425},
  1130. {1663.8649,-1243.1665,233.3750,267.7425},
  1131. {1663.8649,-1243.1665,233.3750,267.7425},
  1132. {1663.8649,-1243.1665,233.3750,267.7425}
  1133. };
  1134. new BizzInfo[13][bInfo];
  1135.  
  1136. enum sbInfo
  1137. {
  1138.     Float:sbEntrancex,
  1139.     Float:sbEntrancey,
  1140.     Float:sbEntrancez,
  1141.     sbOwner[MAX_PLAYER_NAME],
  1142.     sbDiscription[64],
  1143.     sbValue,
  1144.     sbHel,
  1145.     sbArm,
  1146.     sbInt,
  1147.     sbLock,
  1148.     sbOwned,
  1149.     sbEntcost,
  1150.     sbTakings,
  1151.     sbDate,
  1152.     sbLevel,
  1153.     sbProd,
  1154.     sbProdCap,
  1155.     sbComp,
  1156.     sbCompCap,
  1157.     sbProdCost,
  1158.     sbPayComp,
  1159. };
  1160.  
  1161. new SBizzInfo[14][sbInfo];
  1162.  
  1163. enum pHaul
  1164. {
  1165.     pCapasity,
  1166.     pLoad,
  1167. };
  1168.  
  1169. new PlayerHaul[115][pHaul];
  1170.  
  1171. enum pCrime
  1172. {
  1173.     pBplayer[32],
  1174.     pAccusing[32],
  1175.     pAccusedof[32],
  1176.     pVictim[32],
  1177. };
  1178.  
  1179. new PlayerCrime[MAX_PLAYERS][pCrime];
  1180.  
  1181. enum pTele
  1182. {
  1183.     Float:pTmpposx,
  1184.     Float:pTmpposy,
  1185.     Float:pTmpposz,
  1186.     pTmpint,
  1187. };
  1188.  
  1189. new Teletmp[255][pTele];
  1190.  
  1191. enum rInfo
  1192. {
  1193.     Float:rStartx,
  1194.     Float:rStarty,
  1195.     Float:rStartz,
  1196.     Float:rMidx,
  1197.     Float:rMidy,
  1198.     Float:rMidz,
  1199.     Float:rMid2x,
  1200.     Float:rMid2y,
  1201.     Float:rMid2z,
  1202.     Float:rEndx,
  1203.     Float:rEndy,
  1204.     Float:rEndz,
  1205.     rName[MAX_PLAYER_NAME],
  1206.     rBest[MAX_PLAYER_NAME],
  1207.     rBestm,
  1208.     rBests,
  1209.     rBestms,
  1210.     rLaps,
  1211. };
  1212.  
  1213. new RaceInfo[rInfo];
  1214.  
  1215. /*
  1216. enum pPickup
  1217. {
  1218.     pID,
  1219.     pType,
  1220.     Float:pPx,
  1221.     Float:pPy,
  1222.     Float:pPz,
  1223. };
  1224.  
  1225. new PickUps[MAX_PLAYERS][pPickup];
  1226. */
  1227. //--------------------------------------skinovi bandi
  1228. new JoinPed[52][1] = {
  1229. {280},//POLICE_FORCE skinovi
  1230. {281},
  1231. {282},
  1232. {283},
  1233. {284},
  1234. {285},
  1235. {288},
  1236. {71},
  1237. {166},
  1238. {295},
  1239. {148},
  1240. {116},//FBI/ATF
  1241. {29},
  1242. {47},
  1243. {127},//NATIONAL_GUARD
  1244. {115},
  1245. {70},//FIRE/AMBULANCE
  1246. {274},
  1247. {275},
  1248. {276},
  1249. {277},
  1250. {278},
  1251. {279},
  1252. {105},//GM
  1253. {106},
  1254. {107},
  1255. {270},
  1256. {269},
  1257. {271},
  1258. {270},
  1259. {168},
  1260. {280},//FA
  1261. {281},
  1262. {282},
  1263. {283},
  1264. {284},
  1265. {285},
  1266. {288},
  1267. {112},//
  1268. {125},
  1269. {124},
  1270. {113},
  1271. {112},
  1272. {127},//RUS
  1273. {115},
  1274. {116},
  1275. {117},
  1276. {201},
  1277. {116},//BM
  1278. {29},
  1279. {47},
  1280. {115}
  1281. };
  1282.  
  1283. new GunPrice[30][1] = {
  1284. {500}, //parachute
  1285. {400}, //golfclub
  1286. {300}, //nightstick
  1287. {200}, //knife
  1288. {700}, //baseballbat
  1289. {300}, //shovel
  1290. {100}, //poolcue
  1291. {400}, //purpledildo
  1292. {780}, //whitedildo
  1293. {560}, //longwhitedildo
  1294. {530}, //whitedildo2
  1295. {200}, //flowers
  1296. {600}, //cane
  1297. {500}, //sdpistol
  1298. {1000}, //colt45
  1299. {1500}, //deagle
  1300. {2000}, //Tec9
  1301. {300}, //uzi
  1302. {2500}, //mp5
  1303. {100}, //shotgun
  1304. {2000}, //spas12
  1305. {400}, //sawnoff
  1306. {2000}, //ak47
  1307. {2500}, //m4
  1308. {1000}, //rifle
  1309. {1}, //pistolammo
  1310. {10}, //shotgunammo
  1311. {2}, //smgammo
  1312. {20}, //assaultammo
  1313. {50} //rifle
  1314. };
  1315.  
  1316. new Peds[276][1] = {
  1317. {264},
  1318. {102},//TEAM_BALLAS
  1319. {103},
  1320. {104},
  1321. {105},//TEAM_GROVE
  1322. {106},
  1323. {107},
  1324. {108},//TEAM_VAGOS
  1325. {109},
  1326. {110},
  1327. {114},//TEAM_AZTECAS
  1328. {115},
  1329. {116},
  1330. {121},// TEAM_NANG
  1331. {122},
  1332. {123},
  1333. {124},//TEAM_MAFIA
  1334. {125},
  1335. {126},
  1336. {127},
  1337. {111},//TEAM_RMAFIA
  1338. {112},
  1339. {113},
  1340. {117},//TEAM_TRIADS
  1341. {118},
  1342. {120},
  1343. {247},//TEAM_BIKERS
  1344. {248},
  1345. {100},
  1346. {256},
  1347. {263},
  1348. {262},
  1349. {261},
  1350. {260},
  1351. {259},
  1352. {258},
  1353. {257},
  1354. {256},
  1355. {255},
  1356. {253},
  1357. {252},
  1358. {251},
  1359. {250},
  1360. {249},
  1361. {246},
  1362. {245},
  1363. {244},
  1364. {243},
  1365. {242},
  1366. {241},
  1367. {240},
  1368. {239},
  1369. {238},
  1370. {237},
  1371. {236},
  1372. {235},
  1373. {234},
  1374. {233},
  1375. {232},
  1376. {231},
  1377. {230},
  1378. {229},
  1379. {228},
  1380. {227},
  1381. {226},
  1382. {225},
  1383. {173},
  1384. {174},
  1385. {175},
  1386. {224},
  1387. {223},
  1388. {222},
  1389. {221},
  1390. {220},
  1391. {219},
  1392. {218},
  1393. {217},
  1394. {216},
  1395. {215},
  1396. {214},
  1397. {213},
  1398. {212},
  1399. {211},
  1400. {210},
  1401. {209},//    {208},
  1402. {207},
  1403. {206},
  1404. {205},
  1405. {204},
  1406. {203},
  1407. {202},
  1408. {201},
  1409. {200},
  1410. {199},
  1411. {198},
  1412. {197},
  1413. {196},
  1414. {195},
  1415. {194},
  1416. {193},
  1417. {192},
  1418. {191},
  1419. {190},
  1420. {189},
  1421. {188},
  1422. {187},
  1423. {186},
  1424. {185},
  1425. {184},
  1426. {183},
  1427. {182},
  1428. {181},
  1429. {180},
  1430. {179},
  1431. {178},
  1432. {177},
  1433. {176},
  1434. {172},
  1435. {171},
  1436. {170},
  1437. {169},
  1438. {168},
  1439. {167},//    {166},//    {165},//    {164},//    {163},
  1440. {162},
  1441. {161},
  1442. {160},
  1443. {159},
  1444. {158},
  1445. {157},
  1446. {156},
  1447. {155},
  1448. {154},
  1449. {153},
  1450. {152},
  1451. {151},
  1452. {150},//    {149},
  1453. {148},
  1454. {147},
  1455. {146},
  1456. {145},
  1457. {144},
  1458. {143},
  1459. {142},
  1460. {141},
  1461. {140},
  1462. {139},
  1463. {138},
  1464. {137},
  1465. {136},
  1466. {135},
  1467. {134},
  1468. {133},
  1469. {132},
  1470. {131},
  1471. {130},
  1472. {129},
  1473. {128},
  1474. {101},
  1475. {254},
  1476. {99},
  1477. {98},
  1478. {97},
  1479. {96},
  1480. {95},
  1481. {94},
  1482. {93},
  1483. {92},
  1484. {91},
  1485. {90},
  1486. {89},
  1487. {88},
  1488. {87},// {86},
  1489. {85},
  1490. {84},
  1491. {83},
  1492. {82},
  1493. {81},
  1494. {80},
  1495. {79},
  1496. {78},
  1497. {77},
  1498. {76},
  1499. {75},// {74},
  1500. {73},
  1501. {72},
  1502. {69},
  1503. {68},
  1504. {67},
  1505. {66},// {65},
  1506. {64},
  1507. {63},
  1508. {62},
  1509. {61},
  1510. {60},
  1511. {59},
  1512. {58},
  1513. {57},
  1514. {56},
  1515. {55},
  1516. {54},
  1517. {53},
  1518. {52},
  1519. {51},
  1520. {50},
  1521. {49},
  1522. {48},
  1523. {47},
  1524. {46},
  1525. {45},
  1526. {44},
  1527. {43},// {42},
  1528. {41},
  1529. {40},
  1530. {39},
  1531. {38},
  1532. {37},
  1533. {36},
  1534. {35},
  1535. {34},
  1536. {33},
  1537. {32},
  1538. {31},
  1539. {30},
  1540. {29},
  1541. {28},
  1542. {27},
  1543. {26},
  1544. {25},
  1545. {24},
  1546. {23},
  1547. {22},
  1548. {21},
  1549. {20},
  1550. {19},
  1551. {18},
  1552. {17},
  1553. {16},
  1554. {15},
  1555. {14},
  1556. {13},
  1557. {12},
  1558. {11},
  1559. {10},
  1560. {1},//TRUTH
  1561. {2},//MACCER
  1562. {290},//ROSE
  1563. {291},//PAUL
  1564. {292},//CESAR
  1565. {293},//OGLOC
  1566. {294},//WUZIMU
  1567. {187},
  1568. {296},//JIZZY
  1569. {297},//MADDOGG
  1570. {298},//CAT
  1571. {299},//ZERO
  1572. {71}, //=255 amb
  1573. {70},
  1574. {274},
  1575. {275},
  1576. {276}, //==259
  1577. {163}, //=260
  1578. {164},
  1579. {165},
  1580. {166},
  1581. {295},//TORINO
  1582. {246},
  1583. {186},
  1584. {147},
  1585. {288},
  1586. {286},
  1587. {285},
  1588. {284},
  1589. {283},
  1590. {282},
  1591. {281},
  1592. {280} //276
  1593. };
  1594. new Float:HouseCarSpawns[61][4] = {
  1595. {2570.3308,-1030.3450,69.6770,176.0972},//kuca1
  1596. {2064.4,-1694.4,13.1,271.1561},//kuca2
  1597. {1426.4908,-1843.3597,13.6397,1.2280},//kuca3
  1598. {1109.8,-968.0,42.7,0.0},//kuca4
  1599. {2497.6274,-2025.6306,13.2521,355.4281}, //kuca5
  1600. {2645.0,-1990.8,13.1,180.0},//kuca6
  1601. {2014.3370,-1737.3616,13.6555,91.3651},//kuca7
  1602. {1910.5149,-1120.5304,25.4493,177.8350},//kuca8
  1603. {828.8,-887.0,68.5,230.7095},//kuca9
  1604. {2149.6,-1610.9,14.0,90.7904},//kuca10
  1605. {760.1,-1687.8,4.3,180.6},//kuca11
  1606. {645.5,-1616.1,14.9,0.0},//kuca12
  1607. {1827.5034,-1131.3844,24.0384,357.9818},//kuca13
  1608. {1786.2279,-1247.9313,13.8759,180.7606},//kuca14
  1609. {959.5864,-901.0845,45.8584,177.3087},//kuca15
  1610. {2445.8,-1326.8,23.6,18.4},//kuca16
  1611. {2845.9,-1286.8,18.9,90.0},//kuca17
  1612. {2159.8,-1803.9,13.3,271.4}, //kuca18
  1613. {2558.6531,-1192.2732,61.7176,358.2988},//kuca19
  1614. {1997.6174,-1322.7277,23.1580,178.3294},//kuca20
  1615. {1514.0,-694.6,94.5,90.0},//kuca21
  1616. {1246.7,-1107.6,25.5,266.4},//kuca22
  1617. {831.7,-857.5,69.9,180.0},//kuca23
  1618. {1007.9,-659.4,121.1,130.6194},//kuca24
  1619. {1110.0,-726.4,100.1,90.0},//kuca25
  1620. {259.7,-1221.0,74.7,202.0011},//kuca26
  1621. {1463.7,-901.7,55.8,359.0},//kuca27
  1622. {1440.1,-890.6,51.2,0.0},//kuca28
  1623. {406.0442,-1152.0826,77.1410,146.0967},//kuca29
  1624. {480.0394,-1088.5070,82.5806,356.6047}, //kuca30
  1625. {565.2898,-1066.8906,73.5781,25.6265},//kuca31
  1626. {1543.1456,-1111.2860,24.1712,266.2091},//kuca32
  1627. {1357.6392,-617.2240,109.2269,17.5451}, //kuca33
  1628. {2802.9663,-1365.3806,24.1150,0.1761},//kuca34
  1629. {2340.7600,-1045.9474,52.8750,182.2373},//kuca35
  1630. {2200.3867,-1000.5089,62.4167,161.6690},//kuca36
  1631. {2148.3235,-1241.7354,24.7602,2.0559},//kuca37
  1632. {2222.3464,-1792.7914,13.6553,182.7350},//kuca38
  1633. {2274.9780,-1887.4041,13.6497,274.1642},//kuca39
  1634. {1524.3821,-1845.7561,13.6427,267.9578},//kuca40
  1635. {2515.1340,-1671.2317,13.8280,66.8111},//kuca41
  1636. {2479.8867,-1655.3881,13.4142,92.9400},//kuca42
  1637. {1424.4817,-1615.2051,13.5551,180.7668},//kuca43
  1638. {1388.3593,-1568.0165,13.6874,167.7168},//kuca44
  1639. {1423.2032,-1546.6154,13.6369,288.2094},//kuca45
  1640. {904.7038,-1455.2830,13.2620,269.3845},//kuca46
  1641. {1585.8068,-1343.0056,16.5800,358.1951},//kuca47
  1642. {1642.9683,-1240.3959,14.9158,137.1670},//kuca48
  1643. {1246.4939,-1067.5963,29.2354,268.1023},//kuca49
  1644. {2637.1160,-1089.4600,69.6253,180.6909},//kuca50
  1645. {1760.4464,-1664.3433,13.6511,90.9067},//kuca51
  1646. {1530.7472,-813.2767,72.0815,91.1937},//kuca52
  1647. {1515.4642,-766.1096,80.2489,138.1644},//kuca53
  1648. {1487.3591,-1133.0774,24.0834,178.2520},//kuca54
  1649. {1028.7550,-808.4080,101.9534,22.6329},//kuca55
  1650. {796.3849,-842.4902,60.7371,189.5750},//kuca56
  1651. {1541.1622,-1156.6521,24.0823,88.2149},//kuca57
  1652. {1534.9507,-841.7390,65.0473,87.9309},//kuca58
  1653. {1089.2421,-640.2809,113.2098,358.8640},//kuca59
  1654. {1036.1404,-639.9645,120.2122,291.1449},//kuca60
  1655. {952.2419,-919.5269,44.8119,185.6716}//kuca61
  1656. };
  1657.  
  1658.  
  1659. new CarSpawns[98][eCars] = {
  1660.     {402,2228.6736,-1166.4703,25.5872,89.4868},//carid 90
  1661.     {422,2228.5745,-1170.0745,25.7285,90.1785},
  1662.     {429,2228.8042,-1173.6991,25.4129,89.5996},
  1663.     {458,2228.0178,-1177.3232,25.6052,90.3109},
  1664.     {463,2216.9429,-1170.4664,25.2665,267.1122},
  1665.     {468,2216.6335,-1166.2650,25.3948,269.5559},
  1666.     {475,2205.6516,-1161.2788,25.5368,270.8189},//------------
  1667.     {461,2205.8943,-1164.9865,25.3060,87.7591},
  1668.     {419,2206.0576,-1172.9923,25.5239,90.1406},
  1669.     {422,2217.4753,-1157.8187,25.7182,91.2736},
  1670.     {424,2205.6755,-1157.1921,25.5179,89.3138},
  1671.     {423,1716.8999,-1006.3013,23.9371,172.5884},
  1672.     {426,1721.5217,-1007.0438,23.6562,173.7676},
  1673.     {436,1726.7056,-1007.7334,23.6933,167.8351},
  1674.     {439,1731.4093,-1008.4234,23.8394,166.8945},
  1675.     {496,1735.3982,-1009.3354,23.6729,167.1773},
  1676.     {445,1740.0858,-1010.4761,23.8245,167.0463},
  1677.     {458,1744.3707,-1011.7243,23.8400,170.0390},
  1678.     {470,1748.6119,-1011.8051,23.9540,168.1070},
  1679.     {475,1753.0280,-1013.3723,23.7633,167.1010},//20
  1680.     {477,1762.0610,-1061.0719,23.7139,180.5811},
  1681.     {479,1766.2883,-1061.5975,23.7542,178.8137},
  1682.     {560,1770.4873,-1060.9888,23.6661,179.2749},
  1683.     {496,1775.5125,-1070.2048,23.6776,1.0437},
  1684.     {500,1658.7804,-1089.2800,24.0214,89.3291},
  1685.     {507,1659.0393,-1093.4810,23.7279,91.2268},
  1686.     {516,1620.9692,-1107.4758,23.7399,269.2864},
  1687.     {517,1620.8823,-1098.4928,23.7611,88.5031},
  1688.     {517,1629.3066,-1084.9418,23.7612,270.6913},
  1689.     {550,1294.9124,-1379.1422,13.6076,179.4090},
  1690.     {550,1325.2274,-1379.0754,13.6889,179.2200},//------------
  1691.     {419,991.7128,-1371.7124,12.9786,182.4223},
  1692.     {421,783.4034,-1358.6694,13.1638,3.1081},
  1693.     {422,748.1205,-1160.4824,21.3319,127.2800},
  1694.     {423,668.9861,-1259.6940,13.0840,179.7925},
  1695.     {424,598.0946,-1508.0479,14.7326,90.9652},
  1696.     {426,868.6852,-1315.0549,13.0927,270.0761},
  1697.     {436,956.4866,-1089.7889,23.8796,2.5590},
  1698.     {439,1021.5768,-1051.0980,31.2251,267.1626},
  1699.     {445,1137.9980,-1026.8053,31.5477,356.7703},//40
  1700.     {458,1228.0676,-916.6047,42.5267,7.7081},
  1701.     {470,1173.6230,-917.2872,42.9716,277.6426},
  1702.     {475,1192.4987,-924.0895,42.7218,277.1275},
  1703.     {477,1123.6554,-926.0062,42.9023,89.4629},
  1704.     {479,983.5388,-926.8416,41.4302,88.2568},
  1705.     {496,979.8858,-940.3534,40.8528,176.3092},
  1706.     {500,762.9413,-1033.6790,23.5787,182.9254},
  1707.     {507,405.7613,-1327.0398,14.4827,207.6227},
  1708.     {516,295.2629,-1633.3835,32.8605,263.8446},
  1709.     {517,488.1183,-1792.5354,5.6861,266.9080},//50
  1710.     {527,1076.8075,-1772.6667,12.9747,269.9429},
  1711.     {542,1098.7853,-1769.8842,12.9716,269.5833},
  1712.     {546,1098.1765,-1757.9127,12.9767,90.1483},
  1713.     {547,1244.0161,-1720.3248,13.1726,267.9560},
  1714.     {550,1359.6571,-1753.7496,12.9860,180.4511},
  1715.     {558,1656.2014,-1739.5886,13.1704,268.6647},
  1716.     {559,1804.2429,-1716.1101,13.1626,354.2278},
  1717.     {562,1802.8481,-1907.1221,13.0243,269.9057},
  1718.     {550,1777.0061,-1918.2114,13.0118,271.5803},
  1719.     {547,2065.6873,-1904.7106,13.1713,0.7149},//60
  1720.     {565,2237.3118,-1739.6681,13.1699,270.6755},
  1721.     {565,2481.9873,-1745.3567,13.1737,0.3584},//------------
  1722.     {482,438.9431,-1625.4088,25.7951,0.1850},
  1723.     {547,453.3896,-1494.3240,30.7917,7.7513},
  1724.     {550,487.6469,-1516.2312,20.0235,185.5384},
  1725.     {551,-2564.1069,-142.5454,8.9584,183.9273},
  1726.     {560,-2593.6523,-100.5040,4.0458,268.1333},
  1727.     {566,2528.8904,129.0498,26.2968,1.0578},
  1728.     {405,598.9131,-1519.1414,14.8214,180.4083},
  1729.     {554,593.2022,-1519.3578,14.9461,181.5466},
  1730.     {426,-158.7873,-230.6272,1.1657,275.3830},
  1731.     {445,-230.4969,-228.3704,1.1654,355.0959},
  1732.     {492,2447.9260,11.3427,26.3065,270.5659},
  1733.     {507,2418.0374,-45.1556,26.9728,180.1859},
  1734.     {545,-144.7556,-57.0579,2.8606,71.6712},
  1735.     {482,888.1506,-1659.2727,13.3296,1.2414},
  1736.     {547,-2665.2734,267.6269,4.0779,182.6415},
  1737.     {550,888.0242,-1678.5981,13.3294,358.4990},
  1738.     {551,-2586.3401,328.7358,4.5945,268.8039},
  1739.     {560,-2591.2981,485.0661,14.3576,317.0099},//80
  1740.     {566,157.0310,-163.7258,1.3215,270.0280},
  1741.     {405,189.4823,-7.5417,1.3216,357.2232},
  1742.     {554,1081.8948,-1629.9564,13.4064,90.0880},
  1743.     {426,981.7941,-1523.5115,13.3379,267.2751},
  1744.     {445,64.1504,-227.8065,1.3155,89.1540},
  1745.     {492,2684.6,-1990.2,13.3,180.0931},
  1746.     {507,2451.9990,1345.9336,10.4269,0.1026},
  1747.     {545,1096.1,-1379.9,13.3,270.1909},
  1748.     {540,2350.5596,70.9094,26.3024,178.4437},
  1749.     {482,1182.2568,-1219.2407,18.4163,0.5578},
  1750.     {547,2350.0979,53.9388,26.3038,178.4447},
  1751.     {550,2328.6436,195.9171,27.1615,91.4369},
  1752.     {551,1284.8755,-1525.5013,13.3451,269.4388},
  1753.     {560,1279.1887,-1539.2032,13.3201,94.8070},
  1754.     {566,1275.9120,-1646.7448,13.3273,267.2669},
  1755.     {405,1318.2792,-1785.7821,13.2429,182.4215},
  1756.     {554,1253.9153,-1833.3832,13.1734,175.3692},
  1757.     {551,2794.8552,1295.3450,10.3622,0.7839}//80
  1758.     };
  1759.  
  1760. new hotwires[MAX_VEHICLES];
  1761.  
  1762. // new Float:gJailPlayerSpawns[1][3] = {
  1763. // {264.395200,77.564040,1001.039000}
  1764. // };
  1765.  
  1766. //Round code stolen from mike's Manhunt :P
  1767. new gRoundTime = 3600000;                   // Round time - 1 hour
  1768. //new gRoundTime = 1200000;                 // Round time - 20 mins
  1769. //new gRoundTime = 900000;                  // Round time - 15 mins
  1770. //new gRoundTime = 600000;                  // Round time - 10 mins
  1771. //new gRoundTime = 300000;                  // Round time - 5 mins
  1772. //new gRoundTime = 120000;                  // Round time - 2 mins
  1773. //new gRoundTime = 60000;                   // Round time - 1 min
  1774.  
  1775. main()
  1776. {
  1777. print(" ");
  1778. print(" ");
  1779. print("|_________________CroHerze Good Old Times Deathmatch_____________________|");
  1780. print(" ");
  1781. }
  1782. /*          PUBLIC-ovi               */
  1783. public DollahScoreUpdate()
  1784. {
  1785.     new LevScore;
  1786.     for(new i=0; i<MAX_PLAYERS; i++)
  1787.     {
  1788.         if (IsPlayerConnected(i))
  1789.         {
  1790.             LevScore = PlayerInfo[i][pLevel];
  1791.             SetPlayerScore(i, LevScore);
  1792.             if (LevScore > LevScoreOld)
  1793.             {
  1794.                 LevScoreOld = LevScore;
  1795.             }
  1796.         }
  1797.     }
  1798.     return 1;
  1799. }
  1800.  
  1801. public GameTicks()
  1802. {
  1803.     Gtickcount = Gtickcount+500;
  1804. }
  1805.  
  1806. public ConvertTicks(ticks)
  1807. {
  1808.     csecs = 0;
  1809.     cmils = 0;
  1810.     cmins = 0;
  1811.     new tempcsecs = ticks / 1000;//61.59
  1812.     cmins = ticks / 60000;//1.0265
  1813.     csecs = (ticks - cmins*60000)/1000;
  1814.     cmils = (ticks - tempcsecs*1000)/10;
  1815. }
  1816.  
  1817.  
  1818. public CopScanner()
  1819. {
  1820.     for(new i=0; i<MAX_PLAYERS; i++)
  1821.     {
  1822.         if (IsPlayerConnected(i) && gTeam[i] >= 4 && gPublicEnemy != i && gSuperCop != i && Hidden[i] !=1)
  1823.         {
  1824.             if(gTeam[i] == 4)
  1825.             {
  1826.                 CrimProxDetector(radardist, i,TEAM_ORANGE1_COLOR,TEAM_ORANGE2_COLOR,TEAM_ORANGE3_COLOR,TEAM_ORANGE4_COLOR,TEAM_ORANGE5_COLOR,TEAM_ORANGE6_COLOR,TEAM_ORANGE7_COLOR,TEAM_ORANGE8_COLOR,TEAM_ORANGE9_COLOR,TEAM_ORANGE10_COLOR);
  1827.             }
  1828.             if(gTeam[i] == 6)
  1829.             {
  1830.                 CrimProxDetector(radardist, i,TEAM_GROVE1_COLOR,TEAM_GROVE2_COLOR,TEAM_GROVE3_COLOR,TEAM_GROVE4_COLOR,TEAM_GROVE5_COLOR,TEAM_GROVE6_COLOR,TEAM_GROVE7_COLOR,TEAM_GROVE8_COLOR,TEAM_GROVE9_COLOR,TEAM_GROVE10_COLOR);
  1831.             }
  1832.             if(gTeam[i] == 7)
  1833.             {
  1834.                 CrimProxDetector(radardist, i,TEAM_VAGOS1_COLOR,TEAM_VAGOS2_COLOR,TEAM_VAGOS3_COLOR,TEAM_VAGOS4_COLOR,TEAM_VAGOS5_COLOR,TEAM_VAGOS6_COLOR,TEAM_VAGOS7_COLOR,TEAM_VAGOS8_COLOR,TEAM_VAGOS9_COLOR,TEAM_VAGOS10_COLOR);
  1835.             }
  1836.             if(gTeam[i] == 8)
  1837.             {
  1838.                 CrimProxDetector(radardist, i,TEAM_AZTECAS1_COLOR,TEAM_AZTECAS2_COLOR,TEAM_AZTECAS3_COLOR,TEAM_AZTECAS4_COLOR,TEAM_AZTECAS5_COLOR,TEAM_AZTECAS6_COLOR,TEAM_AZTECAS7_COLOR,TEAM_AZTECAS8_COLOR,TEAM_AZTECAS9_COLOR,TEAM_AZTECAS10_COLOR);
  1839.             }
  1840.             if(gTeam[i] == 9)
  1841.             {
  1842.                 CrimProxDetector(radardist, i,TEAM_NANG1_COLOR,TEAM_NANG2_COLOR,TEAM_NANG3_COLOR,TEAM_NANG4_COLOR,TEAM_NANG5_COLOR,TEAM_NANG6_COLOR,TEAM_NANG7_COLOR,TEAM_NANG8_COLOR,TEAM_NANG9_COLOR,TEAM_NANG10_COLOR);
  1843.             }
  1844.             if(gTeam[i] == 78)
  1845.             {
  1846.                 CrimProxDetector(radardist, i,TEAM_RIFA1_COLOR,TEAM_RIFA2_COLOR,TEAM_RIFA3_COLOR,TEAM_RIFA4_COLOR,TEAM_RIFA5_COLOR,TEAM_RIFA6_COLOR,TEAM_RIFA7_COLOR,TEAM_RIFA8_COLOR,TEAM_RIFA9_COLOR,TEAM_RIFA10_COLOR);
  1847.             }
  1848.             if(gTeam[i] == 11)
  1849.             {
  1850.                 CrimProxDetector(radardist, i,TEAM_MAFIA1_COLOR,TEAM_MAFIA2_COLOR,TEAM_MAFIA3_COLOR,TEAM_MAFIA4_COLOR,TEAM_MAFIA5_COLOR,TEAM_MAFIA6_COLOR,TEAM_MAFIA7_COLOR,TEAM_MAFIA8_COLOR,TEAM_MAFIA9_COLOR,TEAM_MAFIA10_COLOR);
  1851.             }
  1852.             if(gTeam[i] == 12)
  1853.             {
  1854.                 CrimProxDetector(radardist, i,TEAM_RMAFIA1_COLOR,TEAM_RMAFIA2_COLOR,TEAM_RMAFIA3_COLOR,TEAM_RMAFIA4_COLOR,TEAM_RMAFIA5_COLOR,TEAM_RMAFIA6_COLOR,TEAM_RMAFIA7_COLOR,TEAM_RMAFIA8_COLOR,TEAM_RMAFIA9_COLOR,TEAM_RMAFIA10_COLOR);
  1855.             }
  1856.             if(gTeam[i] == 13)
  1857.             {
  1858.                 CrimProxDetector(radardist, i,TEAM_TRIADS1_COLOR,TEAM_TRIADS2_COLOR,TEAM_TRIADS3_COLOR,TEAM_TRIADS4_COLOR,TEAM_TRIADS5_COLOR,TEAM_TRIADS6_COLOR,TEAM_TRIADS7_COLOR,TEAM_TRIADS8_COLOR,TEAM_TRIADS9_COLOR,TEAM_TRIADS10_COLOR);
  1859.             }
  1860.             if(gTeam[i] == 14)
  1861.             {
  1862.                 CrimProxDetector(radardist, i,TEAM_BIKERS1_COLOR,TEAM_BIKERS2_COLOR,TEAM_BIKERS3_COLOR,TEAM_BIKERS4_COLOR,TEAM_BIKERS5_COLOR,TEAM_BIKERS6_COLOR,TEAM_BIKERS7_COLOR,TEAM_BIKERS8_COLOR,TEAM_BIKERS9_COLOR,TEAM_BIKERS10_COLOR);
  1863.             }
  1864.         }
  1865.     }
  1866. }
  1867.  
  1868. public Spectator()
  1869. {
  1870.     for(new i = 0; i <= MAX_PLAYERS; i++)
  1871.     {
  1872.         if(IsPlayerConnected(i) == 1)
  1873.         {
  1874.             if(TVMode[i] >= 1 && TVMode[i] <= 5)
  1875.             {
  1876.                 Unspec[i][sCam] = 2;
  1877.                 TVMode[i]++;
  1878.                 BestPlayer(i);
  1879.             }
  1880.             if(TVMode[i] >= 6 && TVMode[i] <= 9)
  1881.             {
  1882.                 Unspec[i][sCam] = 3;
  1883.                 TVMode[i]++;
  1884.                 BestPlayer(i);
  1885.             }
  1886.             if(TVMode[i] == 10)
  1887.             {
  1888.                 TVMode[i] = 1;
  1889.                 BestPlayer(i);
  1890.                 Unspec[i][sCam] = random(4);
  1891.             }
  1892.             if(TVMode[i] >= 11 && TVMode[i] <= 15)
  1893.             {
  1894.                 DMPlayer(i);
  1895.                 Unspec[i][sCam] = 2;
  1896.                 TVMode[i]++;
  1897.             }
  1898.             if(TVMode[i] >= 16 && TVMode[i] <= 19)
  1899.             {
  1900.                 DMPlayer(i);
  1901.                 Unspec[i][sCam] = 3;
  1902.                 TVMode[i]++;
  1903.             }
  1904.             if(TVMode[i] == 20)
  1905.             {
  1906.                 DMPlayer(i);
  1907.                 TVMode[i] = 11;
  1908.                 Unspec[i][sCam] = random(4);
  1909.             }
  1910.             if(TVMode[i] >= 21 && TVMode[i] <= 25)
  1911.             {
  1912.                 RaceSpec(i);
  1913.                 Unspec[i][sCam] = 2;
  1914.                 TVMode[i]++;
  1915.             }
  1916.             if(TVMode[i] >= 26 && TVMode[i] <= 29)
  1917.             {
  1918.                 RaceSpec(i);
  1919.                 Unspec[i][sCam] = 3;
  1920.                 TVMode[i]++;
  1921.             }
  1922.             if(TVMode[i] == 30)
  1923.             {
  1924.                 RaceSpec(i);
  1925.                 TVMode[i] = 21;
  1926.                 Unspec[i][sCam] = random(4);
  1927.             }
  1928.             if(TVMode[i] >= 31 && TVMode[i] <= 35)
  1929.             {
  1930.                 PenDelay(i);
  1931.                 Unspec[i][sCam] = 2;
  1932.                 TVMode[i]++;
  1933.             }
  1934.             if(TVMode[i] >= 36 && TVMode[i] <= 39)
  1935.             {
  1936.                 PenDelay(i);
  1937.                 Unspec[i][sCam] = 3;
  1938.                 TVMode[i]++;
  1939.             }
  1940.             if(TVMode[i] == 40)
  1941.             {
  1942.                 PenDelay(i);
  1943.                 TVMode[i] = 31;
  1944.                 Unspec[i][sCam] = random(4);
  1945.             }
  1946.             if(TVMode[i] >= 41 && TVMode[i] <= 45)
  1947.             {
  1948.                 SpeedDelay(i);
  1949.                 Unspec[i][sCam] = 2;
  1950.                 TVMode[i]++;
  1951.             }
  1952.             if(TVMode[i] >= 46 && TVMode[i] <= 49)
  1953.             {
  1954.                 SpeedDelay(i);
  1955.                 Unspec[i][sCam] = 3;
  1956.                 TVMode[i]++;
  1957.             }
  1958.             if(TVMode[i] == 50)
  1959.             {
  1960.                 SpeedDelay(i);
  1961.                 TVMode[i] = 41;
  1962.                 Unspec[i][sCam] = random(4);
  1963.             }
  1964.             if(Spectate[i] < 253 && Spectate[i] != 255)
  1965.             {
  1966.                 SetPlayerColor(i,COLOR_SPEC);
  1967.                 TogglePlayerControllable(i, 0);
  1968.                 new hight;
  1969.                 new targetid = Spectate[i];
  1970.                 new Float:px, Float:py, Float:pz, Float:pa;
  1971.                 if(specflick == 1)
  1972.                 {
  1973.                     GetPlayerPos(targetid, CarTracking[i][0], CarTracking[i][1], CarTracking[i][2]);
  1974.                 }
  1975.                 px = CarTracking[i][0];py = CarTracking[i][1];pz = CarTracking[i][2];
  1976.                 if(PlayerInfo[targetid][pInt] == 0)
  1977.                 {
  1978.                     SetPlayerInterior(i,0);
  1979.                 }
  1980.                 if(PlayerInfo[targetid][pInt] > 0)
  1981.                 {
  1982.                     SetPlayerInterior(i,PlayerInfo[targetid][pInt]);
  1983.                 }
  1984.                 if(pz > 530.0 && PlayerInfo[targetid][pInt] == 0) //the highest land point in sa = 526.8
  1985.                 {
  1986.                     SetPlayerInterior(i,0);
  1987.                 }
  1988.                 if(Unspec[i][sCam] <= 1 &&  Unspec[i][sCam] != 10)
  1989.                 {
  1990.                     if(GetPlayerState(targetid) != 1)
  1991.                     {
  1992.                         SetPlayerCameraPos(i,px,py,pz+40);
  1993.                     }
  1994.                     else
  1995.                     {
  1996.                         SetPlayerCameraPos(i,px,py,pz+10);
  1997.                     }
  1998.                     SetPlayerPos(i, px, py, pz+110);
  1999.                 }
  2000.                 else if(Unspec[i][sCam] >= 2 && Unspec[i][sCam] <= 3)
  2001.                 {
  2002.                     new dist;
  2003.                     if(Unspec[i][sCam] == 2)
  2004.                     {
  2005.                         if(GetPlayerState(targetid) != 1)
  2006.                         {
  2007.                             dist = 6;
  2008.                             hight = 2;
  2009.                         }
  2010.                         else
  2011.                         {
  2012.                             dist = 6;
  2013.                             hight = 1;
  2014.                         }
  2015.                     }
  2016.                     if(Unspec[i][sCam] == 3)
  2017.                     {
  2018.                         if(GetPlayerState(targetid) != 1)
  2019.                         {
  2020.                             dist = -50;
  2021.                             hight = 4;
  2022.                         }
  2023.                         else
  2024.                         {
  2025.                             dist = -10;
  2026.                             hight = 2;
  2027.                         }
  2028.                     }
  2029.                     if(GetPlayerState(targetid) != 1)
  2030.                     {
  2031.                         if(specflick == 2)
  2032.                         {
  2033.                             new Float:px2, Float:py2, Float:pz2, Float:tpx,Float:tpy;
  2034.                             GetPlayerPos(targetid, px2, py2, pz2);
  2035.                             if(py2 > py && px2 > px)
  2036.                             {
  2037.                                 tpx = px2-px;
  2038.                                 tpy = py2-py;
  2039.                                 if(tpy > tpx)
  2040.                                 {
  2041.                                     if(tpy-tpx > 10.0)
  2042.                                     {
  2043.                                         CarTracking[i][3] = 0.0;
  2044.                                     }
  2045.                                     else
  2046.                                     {
  2047.                                         CarTracking[i][3] = 315.0;
  2048.                                     }
  2049.                                 }
  2050.                                 if(tpy < tpx)
  2051.                                 {
  2052.                                     if(tpx-tpy > 10.0)
  2053.                                     {
  2054.                                         CarTracking[i][3] = 270.0;
  2055.                                     }
  2056.                                     else
  2057.                                     {
  2058.                                         CarTracking[i][3] = 315.0;
  2059.                                     }
  2060.                                 }
  2061.                             }
  2062.                             if(py2 < py && px2 > px)
  2063.                             {
  2064.                                 tpx = px2-px;
  2065.                                 tpy = py-py2;
  2066.                                 if(tpy > tpx)
  2067.                                 {
  2068.                                     if(tpy-tpx > 10.0)
  2069.                                     {
  2070.                                         CarTracking[i][3] = 180.0;
  2071.                                     }
  2072.                                     else
  2073.                                     {
  2074.                                         CarTracking[i][3] = 225.0;
  2075.                                     }
  2076.                                 }
  2077.                                 if(tpy < tpx)
  2078.                                 {
  2079.                                     if(tpx-tpy > 10.0)
  2080.                                     {
  2081.                                         CarTracking[i][3] = 270.0;
  2082.                                     }
  2083.                                     else
  2084.                                     {
  2085.                                         CarTracking[i][3] = 225.0;
  2086.                                     }
  2087.                                 }
  2088.                             }
  2089.                             if(py2 < py && px2 < px)
  2090.                             {
  2091.                                 tpx = px-px2;
  2092.                                 tpy = py-py2;
  2093.                                 if(tpy > tpx)
  2094.                                 {
  2095.                                     if(tpy-tpx > 10.0)
  2096.                                     {
  2097.                                         CarTracking[i][3] = 180.0;
  2098.                                     }
  2099.                                     else
  2100.                                     {
  2101.                                         CarTracking[i][3] = 135.0;
  2102.                                     }
  2103.                                 }
  2104.                                 if(tpy < tpx)
  2105.                                 {
  2106.                                     if(tpx-tpy > 10.0)
  2107.                                     {
  2108.                                         CarTracking[i][3] = 90.0;
  2109.                                     }
  2110.                                     else
  2111.                                     {
  2112.                                         CarTracking[i][3] = 135.0;
  2113.                                     }
  2114.                                 }
  2115.                             }
  2116.                             if(py2 > py && px2 < px)
  2117.                             {
  2118.                                 tpx = px-px2;
  2119.                                 tpy = py2-py;
  2120.                                 if(tpy > tpx)
  2121.                                 {
  2122.                                     if(tpy-tpx > 10.0)
  2123.                                     {
  2124.                                         CarTracking[i][3] = 0.0;
  2125.                                     }
  2126.                                     else
  2127.                                     {
  2128.                                         CarTracking[i][3] = 45.0;
  2129.                                     }
  2130.                                 }
  2131.                                 if(tpy < tpx)
  2132.                                 {
  2133.                                     if(tpx-tpy > 10.0)
  2134.                                     {
  2135.                                         CarTracking[i][3] = 90.0;
  2136.                                     }
  2137.                                     else
  2138.                                     {
  2139.                                         CarTracking[i][3] = 45.0;
  2140.                                     }
  2141.                                 }
  2142.                             }
  2143.                             specflick = 0;
  2144.                         }
  2145.                         pa = CarTracking[i][3];
  2146.                         //  new formated[256];
  2147.                         //  format(formated, sizeof(formated), "Debug:CarAngle (%f)",CarTracking[i][3]);
  2148.                         //  SendClientMessageToAll(COLOR_WHITE, formated);
  2149.                     }
  2150.                     else
  2151.                     {
  2152.                         GetPlayerFacingAngle(targetid,pa);
  2153.                     }
  2154.                     if(pa >= 0.0 && pa <= 22.5) //n1
  2155.                     {
  2156.                         SetPlayerCameraPos(i, px, py-(dist), pz+hight);
  2157.                     }
  2158.                     if(pa >= 332.5 && pa < 0.0) //n2
  2159.                     {
  2160.                         SetPlayerCameraPos(i, px, py-(dist), pz+hight);
  2161.                     }
  2162.                     if(pa >= 22.5 && pa <= 67.5) //nw
  2163.                     {
  2164.                         SetPlayerCameraPos(i, px+(dist/2), py-(dist/2), pz+hight);
  2165.                     }
  2166.                     if(pa >= 67.5 && pa <= 112.5) //w
  2167.                     {
  2168.                         SetPlayerCameraPos(i, px+(dist), py, pz+hight);
  2169.                     }
  2170.                     if(pa >= 112.5 && pa <= 157.5) //sw
  2171.                     {
  2172.                         SetPlayerCameraPos(i, px+(dist/2), py+(dist/2), pz+hight);
  2173.                     }
  2174.                     if(pa >= 157.5 && pa <= 202.5) //s
  2175.                     {
  2176.                         SetPlayerCameraPos(i, px, py+(dist), pz+hight);
  2177.                     }
  2178.                     if(pa >= 202.5 && pa <= 247.5)//se
  2179.                     {
  2180.                         SetPlayerCameraPos(i, px-(dist/2), py+(dist/2), pz+hight);
  2181.                     }
  2182.                     if(pa >= 247.5 && pa <= 292.5)//e
  2183.                     {
  2184.                         SetPlayerCameraPos(i, px-(dist), py, pz+hight);
  2185.                     }
  2186.                     if(pa >= 292.5 && pa <= 332.5)//e
  2187.                     {
  2188.                         SetPlayerCameraPos(i, px-(dist/2), py-(dist/2), pz+hight);
  2189.                     }
  2190.                     SetPlayerPos(i, px, py, pz+110);
  2191.                 }
  2192.                 else if(Unspec[i][sCam] == 5)
  2193.                 {
  2194.                     SetPlayerPos(i, px, py, pz+40);
  2195.                 }
  2196.                 else if(Unspec[i][sCam] == 6)
  2197.                 {
  2198.                     SetPlayerPos(i, rsx, rsy, rsz+100);
  2199.                     SetPlayerCameraPos(i, rsx, rsy+4, rsz+2);
  2200.                 }
  2201.                 else if(Unspec[i][sCam] == 7)
  2202.                 {
  2203.                     SetPlayerPos(i, rmx, rmy, rmz+100);
  2204.                     SetPlayerCameraPos(i, rmx, rmy+4, rmz+2);
  2205.                 }
  2206.                 else if(Unspec[i][sCam] == 8)
  2207.                 {
  2208.                     SetPlayerPos(i, rm2x, rm2y, rm2z+100);
  2209.                     SetPlayerCameraPos(i, rm2x, rm2y+4, rm2z+2);
  2210.                 }
  2211.                 else if(Unspec[i][sCam] == 9)
  2212.                 {
  2213.                     SetPlayerPos(i, rex, rey, rez+100);
  2214.                     SetPlayerCameraPos(i, rex, rey+4, rez+2);
  2215.                 }
  2216.                 else if(Unspec[i][sCam] == 10)
  2217.                 {
  2218.                     new house = Unspec[i][sLocal];
  2219.                     SetPlayerPos(i,HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]+100);
  2220.                     SetPlayerCameraPos(i, HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]+2.0);
  2221.                     SetPlayerInterior(i,0);
  2222.                 }
  2223.                 SetPlayerCameraLookAt(i,px,py,pz);
  2224.             }
  2225.             if(Spectate[i] == 253)
  2226.             {
  2227.                 TogglePlayerControllable(i, 1);
  2228.                 SetPlayerInterior(i,Unspec[i][sPint]);
  2229.                 PlayerInfo[i][pInt] = Unspec[i][sPint];
  2230.                 PlayerInfo[i][pLocal] = Unspec[i][sLocal];
  2231.                 Unspec[i][sLocal] = 255;
  2232.                 SetSpawnInfo(i, 1, PlayerInfo[i][pModel], Unspec[i][sPx],  Unspec[i][sPy], Unspec[i][sPz]-1.0, 1.0, -1, -1, -1, -1, -1, -1);
  2233.                 //SetPlayerPos(i, Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]);
  2234.                 gTeam[i] = PlayerInfo[i][pTeam];
  2235.                 SetPlayerToTeamColor(i);
  2236.                 SpawnPlayer(i);
  2237.                 Spectate[i] = 255;
  2238.             }
  2239.             if(Spectate[i] == 254)
  2240.             {
  2241.                 TogglePlayerControllable(i, 1);
  2242.                 SetPlayerInterior(i,Unspec[i][sPint]);
  2243.                 PlayerInfo[i][pInt] = Unspec[i][sPint];
  2244.                 PlayerInfo[i][pLocal] = Unspec[i][sLocal];
  2245.                 SetPlayerPos(i, Unspec[i][sPx],  Unspec[i][sPy], Unspec[i][sPz]);
  2246.                 SetPlayerToTeamColor(i);
  2247.                 Spectate[i] = 255;
  2248.             }
  2249.             if(Spectate[i] == 256)
  2250.             {
  2251.                 SetPlayerToTeamColor(i);
  2252.                 Spectate[i] = 255;
  2253.             }
  2254.             if(Spectate[i] == 257)
  2255.             {
  2256.                 Spectate[i] = 254;
  2257.             }
  2258.         }
  2259.     }
  2260.     if(specflick < 2)
  2261.     {
  2262.         specflick++;
  2263.     }
  2264.     else
  2265.     {
  2266.         specflick = 0;
  2267.     }
  2268. }
  2269. public Three()
  2270. {
  2271.     GameTextForAll("~w~3",3000,4);
  2272.     return true;
  2273. }
  2274.  
  2275. public Two()
  2276. {
  2277.     GameTextForAll("~w~2",3000,4);
  2278.     return true;
  2279. }
  2280.  
  2281. public One()
  2282. {
  2283.     GameTextForAll("~w~1",3000,4);
  2284.     return true;
  2285. }
  2286.  
  2287. public Go()
  2288. {
  2289.     GameTextForAll("~r~GO GO GO!!!",3000,4);
  2290.     return true;
  2291. }
  2292.  
  2293. public CountdownSpam()
  2294. {
  2295.     new playerid;
  2296.     blockspam[playerid]=0;
  2297.     return true;
  2298. }
  2299. //---------------------------------
  2300. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  2301. {
  2302.     if (gdebug >= 1){printf("DEBUG OnPlayerEnterVehicle(%d, %d, %d)", playerid, vehicleid, ispassenger);}
  2303.     if(gTeam[playerid] == TEAM_GREEN)
  2304.     {
  2305.         if (IsACopCar(vehicleid) && !ispassenger)
  2306.         {
  2307.             SetPlayerCriminal(playerid,255, "Krade policijsko vozilo",0,0);
  2308.             if(FlashTime[playerid] == 0){FlashTime[playerid] = 10;}
  2309.         }
  2310.         if (IsAnAmbulance(vehicleid) && !ispassenger)
  2311.         {
  2312.             SetPlayerCriminal(playerid,255, "Krade vozilo hitne pomoci",0,0);
  2313.             if(FlashTime[playerid] == 0){FlashTime[playerid] = 10;}
  2314.         }
  2315.     }
  2316.     new string[400];
  2317.     if (PlayerInfo[playerid][pAdmin] >= 1337)
  2318.     {
  2319.     format(string, sizeof(string), "Ulazis u vozilo %d",gLastCar[playerid]);
  2320.     SendClientMessage(playerid,COLOR_WHITE, string);
  2321.     }
  2322.     new carid;
  2323.     carid = PlayerInfo[playerid][pPhousekey]+1;
  2324.     if(PlayerInfo[playerid][pPhousekey] == carid-1)
  2325.     {
  2326. //-------------- Wheels Arch Angels (ALL ALIEN STUFF)-------------------------
  2327.         if(GetVehicleModel(vehicleid) == 560)// SULTAN
  2328.         {
  2329.             if(PlayerInfo[playerid][pTVec] == 560)
  2330.             {
  2331.                 AddVehicleComponent(vehicleid,1026);//lsideskirt
  2332.                 AddVehicleComponent(vehicleid,1027);//rsideskirt
  2333.                 AddVehicleComponent(vehicleid,1028);//exhaust
  2334.                 AddVehicleComponent(vehicleid,1032);//roof vent
  2335.                 AddVehicleComponent(vehicleid,1138);//spoiler
  2336.                 AddVehicleComponent(vehicleid,1141);//rbumper
  2337.                 AddVehicleComponent(vehicleid,1141);//fbumper
  2338.                 AddVehicleComponent(vehicleid,1087);//hydrolics
  2339.                 AddVehicleComponent(vehicleid,1010);//nitro x10
  2340.                 ChangeVehiclePaintjob(vehicleid,0);
  2341.             }
  2342.         }
  2343.         if(GetVehicleModel(vehicleid) == 562)// ELEGY
  2344.         {
  2345.             if(PlayerInfo[playerid][pTVec] == 562)
  2346.             {
  2347.                 AddVehicleComponent(vehicleid,1036);//lsideskirt
  2348.                 AddVehicleComponent(vehicleid,1040);//rsideskirt
  2349.                 AddVehicleComponent(vehicleid,1034);//exhaust
  2350.                 AddVehicleComponent(vehicleid,1038);//roof vent
  2351.                 AddVehicleComponent(vehicleid,1147);//spoiler
  2352.                 AddVehicleComponent(vehicleid,1149);//rbumper
  2353.                 AddVehicleComponent(vehicleid,1171);//fbumper
  2354.                 AddVehicleComponent(vehicleid,1087);//hydrolics
  2355.                 AddVehicleComponent(vehicleid,1010);//nitro x10
  2356.                 ChangeVehiclePaintjob(vehicleid,0);
  2357.             }
  2358.         }
  2359.         if(GetVehicleModel(vehicleid) == 565)// FLASH
  2360.         {
  2361.             if(PlayerInfo[playerid][pTVec] == 565)
  2362.             {
  2363.                 AddVehicleComponent(vehicleid,1047);//lsideskirt
  2364.                 AddVehicleComponent(vehicleid,1051);//rsideskirt
  2365.                 AddVehicleComponent(vehicleid,1046);//exhaust
  2366.                 AddVehicleComponent(vehicleid,1054);//roof vent
  2367.                 AddVehicleComponent(vehicleid,1049);//spoiler
  2368.                 AddVehicleComponent(vehicleid,1150);//rbumper
  2369.                 AddVehicleComponent(vehicleid,1153);//fbumper
  2370.                 AddVehicleComponent(vehicleid,1087);//hydrolics
  2371.                 AddVehicleComponent(vehicleid,1010);//nitro x10
  2372.                 ChangeVehiclePaintjob(vehicleid,0);
  2373.             }
  2374.         }
  2375.         if(GetVehicleModel(vehicleid) == 561)// STRATUM
  2376.         {
  2377.             if(PlayerInfo[playerid][pTVec] == 561)
  2378.             {
  2379.                 AddVehicleComponent(vehicleid,1056);//lsideskirt
  2380.                 AddVehicleComponent(vehicleid,1062);//rsideskirt
  2381.                 AddVehicleComponent(vehicleid,1064);//exhaust
  2382.                 AddVehicleComponent(vehicleid,1055);//roof vent
  2383.                 AddVehicleComponent(vehicleid,1058);//spoiler
  2384.                 AddVehicleComponent(vehicleid,1154);//rbumper
  2385.                 AddVehicleComponent(vehicleid,1155);//fbumper
  2386.                 AddVehicleComponent(vehicleid,1087);//hydrolics
  2387.                 AddVehicleComponent(vehicleid,1010);//nitro x10
  2388.                 ChangeVehiclePaintjob(vehicleid,0);
  2389.             }
  2390.         }
  2391.         if(GetVehicleModel(vehicleid) == 559)// JESTER
  2392.         {
  2393.             if(PlayerInfo[playerid][pTVec] == 559)
  2394.             {
  2395.                 AddVehicleComponent(vehicleid,1069);//lsideskirt
  2396.                 AddVehicleComponent(vehicleid,1071);//rsideskirt
  2397.                 AddVehicleComponent(vehicleid,1065);//exhaust
  2398.                 AddVehicleComponent(vehicleid,1067);//roof vent
  2399.                 AddVehicleComponent(vehicleid,1162);//spoiler
  2400.                 AddVehicleComponent(vehicleid,1159);//rbumper
  2401.                 AddVehicleComponent(vehicleid,1160);//fbumper
  2402.                 AddVehicleComponent(vehicleid,1087);//hydrolics
  2403.                 AddVehicleComponent(vehicleid,1010);//nitro x10
  2404.                 ChangeVehiclePaintjob(vehicleid,0);
  2405.             }
  2406.         }
  2407.         if(GetVehicleModel(vehicleid) == 558)// URANUS
  2408.         {
  2409.             if(PlayerInfo[playerid][pTVec] == 558)
  2410.             {
  2411.                 AddVehicleComponent(vehicleid,1090);//lsideskirt
  2412.                 AddVehicleComponent(vehicleid,1094);//rsideskirt
  2413.                 AddVehicleComponent(vehicleid,1092);//exhaust
  2414.                 AddVehicleComponent(vehicleid,1088);//roof vent
  2415.                 AddVehicleComponent(vehicleid,1164);//spoiler
  2416.                 AddVehicleComponent(vehicleid,1168);//rbumper
  2417.                 AddVehicleComponent(vehicleid,1166);//fbumper
  2418.                 AddVehicleComponent(vehicleid,1087);//hydrolics
  2419.                 AddVehicleComponent(vehicleid,1010);//nitro x10
  2420.                 ChangeVehiclePaintjob(vehicleid,0);
  2421.             }
  2422.         }
  2423. //-------- Loco Low-Co---------------------------------------------
  2424.         if(GetVehicleModel(vehicleid) == 575)// BROADWAY
  2425.         {
  2426.             if(PlayerInfo[playerid][pTVec] == 575)
  2427.             {
  2428.             AddVehicleComponent(vehicleid,1042);//lsideskirt
  2429.             AddVehicleComponent(vehicleid,1099);//rsideskirt
  2430.             AddVehicleComponent(vehicleid,1044);//exhaust chromer
  2431.             AddVehicleComponent(vehicleid,1176);//rbumper chromer
  2432.             AddVehicleComponent(vehicleid,1174);//fbumperchromer
  2433.             AddVehicleComponent(vehicleid,1087);//hydrolics
  2434.             AddVehicleComponent(vehicleid,1086);//nitro x10
  2435.             ChangeVehiclePaintjob(vehicleid,0);
  2436.             }
  2437.         }
  2438.         if(GetVehicleModel(vehicleid) == 534)// REMINGTON
  2439.         {
  2440.             if(PlayerInfo[playerid][pTVec] == 534)
  2441.             {
  2442.             AddVehicleComponent(vehicleid,1122);//lsideskirt flame
  2443.             AddVehicleComponent(vehicleid,1101);//rsideskirt flame
  2444.             AddVehicleComponent(vehicleid,1126);//exhaust chromer
  2445.             AddVehicleComponent(vehicleid,1123);//bullbar chrome bars
  2446.             AddVehicleComponent(vehicleid,1180);//rbumper
  2447.             AddVehicleComponent(vehicleid,1179);//fbumper
  2448.             AddVehicleComponent(vehicleid,1087);//hydrolics
  2449.             AddVehicleComponent(vehicleid,1086);//nitro x10
  2450.             ChangeVehiclePaintjob(vehicleid,0);
  2451.             }
  2452.         }
  2453.         if(GetVehicleModel(vehicleid) == 567)// SAVANNA
  2454.         {
  2455.             if(PlayerInfo[playerid][pTVec] == 567)
  2456.             {
  2457.             AddVehicleComponent(vehicleid,1133);//lsideskirt chromestrip
  2458.             AddVehicleComponent(vehicleid,1102);//rsideskirt chromestrip
  2459.             AddVehicleComponent(vehicleid,1129);//exhaust chromer
  2460.             AddVehicleComponent(vehicleid,1130);//roof hardtop
  2461.             AddVehicleComponent(vehicleid,1187);//rbumper chromer
  2462.             AddVehicleComponent(vehicleid,1189);//fbumper chromer
  2463.             AddVehicleComponent(vehicleid,1087);//hydrolics
  2464.             AddVehicleComponent(vehicleid,1086);//nitro x10
  2465.             ChangeVehiclePaintjob(vehicleid,0);
  2466.             }
  2467.         }
  2468.         if(GetVehicleModel(vehicleid) == 536)// BLADE
  2469.         {
  2470.             if(PlayerInfo[playerid][pTVec] == 536)
  2471.             {
  2472.             AddVehicleComponent(vehicleid,1108);//lsideskirt chromestrip
  2473.             AddVehicleComponent(vehicleid,1107);//rsideskirt chromestrip
  2474.             AddVehicleComponent(vehicleid,1104);//exhaust chromer
  2475.             AddVehicleComponent(vehicleid,1128);//roof vinyl hardtop
  2476.             AddVehicleComponent(vehicleid,1184);//rbumper chromer
  2477.             AddVehicleComponent(vehicleid,1182);//fbumper chromer
  2478.             AddVehicleComponent(vehicleid,1087);//hydrolics
  2479.             AddVehicleComponent(vehicleid,1086);//nitro x10
  2480.             ChangeVehiclePaintjob(vehicleid,0);
  2481.             }
  2482.         }
  2483.         if(GetVehicleModel(vehicleid) == 576)// TORNADO
  2484.         {
  2485.             if(PlayerInfo[playerid][pTVec] == 576)
  2486.             {
  2487.             AddVehicleComponent(vehicleid,1134);//lsideskirt chromestrip
  2488.             AddVehicleComponent(vehicleid,1137);//rsideskirt chromestrip
  2489.             AddVehicleComponent(vehicleid,1136);//exhaust chromer
  2490.             AddVehicleComponent(vehicleid,1190);//rbumper chromer
  2491.             AddVehicleComponent(vehicleid,1191);//fbumper chromer
  2492.             AddVehicleComponent(vehicleid,1087);//hydrolics
  2493.             AddVehicleComponent(vehicleid,1086);//nitro x10
  2494.             ChangeVehiclePaintjob(vehicleid,0);
  2495.             }
  2496.         }
  2497.     }
  2498.     return 1;
  2499. }
  2500.  
  2501. public IsAPlane(carid)
  2502. {
  2503.     if((carid >= 93 && carid <=98) || carid == 87)
  2504.     {
  2505.         return 1;
  2506.     }
  2507.     return 0;
  2508. }
  2509.  
  2510. public IsACopCar(carid)
  2511. {
  2512.     if((carid >= 62) && (carid <= 87))
  2513.     {
  2514.         return 1;
  2515.     }
  2516.     return 0;
  2517. }
  2518.  
  2519. public IsAnAmbulance(carid)
  2520. {
  2521.     if((carid >= 88) && (carid <= 90))
  2522.     {
  2523.         return 1;
  2524.     }
  2525.     return 0;
  2526. }
  2527.  
  2528. public IsATruck(carid)
  2529. {
  2530.     if(carid >= 105 && carid <= 108)
  2531.     {
  2532.         return 1;
  2533.     }
  2534.     return 0;
  2535. }
  2536.  
  2537. //------------------------------------------------------------------------------------------------------
  2538.  
  2539. public OnPlayerConnect(playerid)
  2540. {
  2541.     SendDeathMessage(INVALID_PLAYER_ID,playerid,200);
  2542.     if (gdebug >= 1){printf("DEBUG OnPlayerConnect(%d)", playerid);}
  2543.     gActivePlayers[playerid]++;
  2544.     numplayers++;
  2545.     new plname[128];
  2546.     new playaname[128];
  2547.     new string[128];
  2548.     //TelePos[playerid][0] = 0;
  2549.     //TelePos[playerid][1] = 0;
  2550.     //TelePos[playerid][2] = 0;
  2551.     SafeTime[playerid] = 60;
  2552.     BetRace[playerid][0] = 255;
  2553.     BetRace[playerid][1] = 0;
  2554.     BetDm[playerid][0] = 255;
  2555.     BetDm[playerid][1] = 0;
  2556.     //HidePM[playerid] = 0;
  2557.     gPlayerFighter[playerid] = 0;
  2558.     DmScore[playerid] = 0;
  2559.     Mobile[playerid] = 255;
  2560.     Spectate[playerid] = 255;
  2561.     Unspec[playerid][sLocal] = 255;
  2562.     gSkyDive[playerid] = 0;
  2563.     TVMode[playerid] = 0;
  2564.     gLastCar[playerid] = 0;
  2565.     FirstSpawn[playerid] = 0;
  2566.     gPlayerLapStatus[playerid] = 0;
  2567.     gOoc[playerid] = 0;
  2568.     BigEar[playerid] = 0;
  2569.     FlashTime[playerid] = 0;
  2570.     gDice[playerid] = 0;
  2571.     HidePM[playerid] = 0;
  2572.     gSpeedo[playerid] = 0;
  2573.     gPlayerLogged[playerid] = 0;
  2574.     gPlayerAccount[playerid] = 0;
  2575.     gPlayerSpawned[playerid] = 0;
  2576.     LapCount[playerid] = 0;
  2577.     Mute[playerid] = 0;
  2578.     StartTime[playerid] = 0;
  2579.     gRaceGuy[playerid] = 0;
  2580.     Contract[playerid] = 0;
  2581.     gPlayerMission[playerid] = 0;
  2582.     PlayerInfo[playerid][pCash] = dollah;
  2583.     KickVote[playerid] = 0;
  2584.     VoteKick[playerid] = 0;
  2585.     LastVote[playerid] = 255;
  2586.     HireCar[playerid] = 299;
  2587.     Hidden[playerid] = 0;
  2588.     Locator[playerid] = 0;
  2589.     PLicence[playerid] = 0;
  2590.     gPhoneBook[playerid] = 0;
  2591.     //PlayerPos[playerid][3] = 1.0;
  2592.     //PlayerPos[playerid][4] = 1.0;
  2593.     //PlayerPos[playerid][5] = 1.0;
  2594.     GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
  2595.     PlayerInfo[playerid][pAccount] = 0;
  2596.     PlayerInfo[playerid][pAdmin] = 0;
  2597.     PlayerInfo[playerid][pCHBodovi] = 0;
  2598.     PlayerInfo[playerid][pGameSage] = 0;
  2599.     PlayerInfo[playerid][pLevel] = 1;
  2600.     PlayerInfo[playerid][pExp] = 0;
  2601.     PlayerInfo[playerid][gPupgrade] = 0;
  2602.     PlayerInfo[playerid][pKills] = 0;
  2603.     PlayerInfo[playerid][pCB] = 0;
  2604.     PlayerInfo[playerid][pHW] = 0;
  2605.     PlayerInfo[playerid][pSR] = 0;
  2606.     PlayerInfo[playerid][pWA] = 0;
  2607.     PlayerInfo[playerid][pPEN] = 0;
  2608.     PlayerInfo[playerid][pGun1] = 0;
  2609.     PlayerInfo[playerid][pGun2] = 0;
  2610.     PlayerInfo[playerid][pGun3] = 0;
  2611.     PlayerInfo[playerid][pGun4] = 0;
  2612.     PlayerInfo[playerid][pGun5] = 0;
  2613.     PlayerInfo[playerid][pGun6] = 0;
  2614.     PlayerInfo[playerid][pLeader] = 0;
  2615.     PlayerInfo[playerid][pMember] = 0;
  2616.     PlayerInfo[playerid][pFMember] = 255;
  2617.     PlayerInfo[playerid][pRank] = 0;
  2618.     PlayerInfo[playerid][pChar] = 0;
  2619.     PlayerInfo[playerid][pAmmo1] = 200;
  2620.     PlayerInfo[playerid][pAmmo2] = 8;
  2621.     PlayerInfo[playerid][pAmmo3] = 30;
  2622.     PlayerInfo[playerid][pAmmo4] = 30;
  2623.     PlayerInfo[playerid][pAmmo5] = 10;
  2624.     PlayerInfo[playerid][pAmmo6] = 10;
  2625.     PlayerInfo[playerid][pSHealth] = 0.0;
  2626.     PlayerInfo[playerid][pHealth] = 50.0;
  2627.     PlayerInfo[playerid][pPos_x] = 2246.6;
  2628.     PlayerInfo[playerid][pPos_y] = -1161.9;
  2629.     PlayerInfo[playerid][pPos_z] = 1029.7;
  2630.     PlayerInfo[playerid][pInt] = 15;
  2631.     PlayerInfo[playerid][pLocal] = 255;
  2632.     PlayerInfo[playerid][pTeam] = 1;
  2633.     PlayerInfo[playerid][pModel] = 29;
  2634.     PlayerInfo[playerid][pMuteTime] = 0;
  2635.     PlayerInfo[playerid][pMuted] = 0;
  2636.     PlayerInfo[playerid][pWarns] = 0;
  2637.     new randphone = 1000 + random(8999);//minimum 1000  max 9999 //giving one at the start
  2638.     PlayerInfo[playerid][pPnumber] = randphone;
  2639.     PlayerInfo[playerid][pPhousekey] = 255;
  2640.     PlayerInfo[playerid][pPbiskey] = 255;
  2641.     PlayerInfo[playerid][pTVec] = 0;
  2642.     PlayerInfo[playerid][pReg] = 0;
  2643.     ClearCrime(playerid);
  2644. //------------text servera
  2645.     Textdraw0 = TextDrawCreate(551.000000, 408.000000, "CroHerze");
  2646.     TextDrawBackgroundColor(Textdraw0, 255);
  2647.     TextDrawFont(Textdraw0, 3);
  2648.     TextDrawLetterSize(Textdraw0, 0.380000, 1.100000);
  2649.     TextDrawColor(Textdraw0, 865717503);
  2650.     TextDrawSetOutline(Textdraw0, 0);
  2651.     TextDrawSetProportional(Textdraw0, 1);
  2652.     TextDrawSetShadow(Textdraw0, 1);
  2653.     TextDrawShowForPlayer(playerid, Text:Textdraw0);
  2654.  
  2655.     Textdraw1 = TextDrawCreate(541.000000, 420.000000, "DEATHMATCH");
  2656.     TextDrawBackgroundColor(Textdraw1, 255);
  2657.     TextDrawFont(Textdraw1, 3);
  2658.     TextDrawLetterSize(Textdraw1, 0.380000, 1.400000);
  2659.     TextDrawColor(Textdraw1, -1);
  2660.     TextDrawSetOutline(Textdraw1, 0);
  2661.     TextDrawSetProportional(Textdraw1, 1);
  2662.     TextDrawSetShadow(Textdraw1, 1);
  2663.     TextDrawShowForPlayer(playerid, Text:Textdraw1);
  2664. //---------------------------
  2665.     printf("Player Connecting as (%d)", playerid);
  2666.     SetPlayerColor(playerid,COLOR_GRAD2);
  2667.     SetPlayerToTeamColor(playerid);
  2668.     GetPlayerName(playerid, plname, sizeof(plname));
  2669.     GetPlayerName(playerid, playaname, sizeof(playaname));
  2670.     //SetPlayerCameraPos(playerid,1460.0, -1324.0, 287.2);
  2671.     //SetPlayerCameraLookAt(playerid,1374.5, -1291.1, 239.0);
  2672.     format(playaname,sizeof(playaname)," ",playaname);
  2673.     if (PlayerInfo[playerid][pAdmin] >= 1339)
  2674.     SendAdminMessage(COLOR_GRAD3,playaname);
  2675.     format(string, sizeof(string), "%s.ini", plname);
  2676.     if(fexist(string))
  2677.     {
  2678.         gPlayerAccount[playerid] = 1;
  2679.         new loginstring[400];
  2680.         new loginname[64];
  2681.         GetPlayerName(playerid,loginname,sizeof(loginname));
  2682.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2683.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2684.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2685.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2686.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2687.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2688.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2689.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2690.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2691.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2692.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2693.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2694.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2695.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2696.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2697.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2698.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2699.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2700.         format(loginstring,sizeof(loginstring),"{33BBFF}___________________________________________\n\n{FFFFFF}Dobrodosao na CroHerze DeathMatch Server\n\n{33BBFF}%s\n{FFFFFF}Tvoj korisnicki racun je pronadjen!\n\nMolimo upisi svoju lozinku da udjes na server:\n{33BBFF}___________________________________________",loginname);
  2701.         ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"{FFFFFF}Logiranje",loginstring,"Logiraj","Odustani");
  2702.         return 1;
  2703.     }
  2704.     else
  2705.     {
  2706.         gPlayerAccount[playerid] = 0;
  2707.         new regstring[400];
  2708.         new regname[64];
  2709.         GetPlayerName(playerid,regname,sizeof(regname));
  2710.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2711.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2712.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2713.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2714.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2715.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2716.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2717.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2718.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2719.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2720.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2721.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2722.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2723.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2724.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2725.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2726.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2727.         SendClientMessage(playerid, COLOR_WHITE, " ");
  2728.         format(regstring,sizeof(regstring),"{FFFFFF}Dobrodosli na pocetak registracije \n{33BBFF}%s\n{FFFFFF}Vas racun nije registriran, molimo upisite zeljenu lozinku:",regname);
  2729.         ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"{33BBFF}Registracija",regstring,"Registriraj","Odustani");
  2730.         return 1;
  2731.     }
  2732. }
  2733. public ClearCrime(playerid)
  2734. {
  2735.     if (gdebug >= 1){printf("DEBUG ClearCrime(%d)", playerid);}
  2736.     new string[MAX_PLAYER_NAME];
  2737.     format(string, sizeof(string), "********");
  2738.     strmid(PlayerCrime[playerid][pBplayer], string, 0, strlen(string), 255);
  2739.     strmid(PlayerCrime[playerid][pVictim], string, 0, strlen(string), 255);
  2740.     strmid(PlayerCrime[playerid][pAccusing], string, 0, strlen(string), 255);
  2741.     strmid(PlayerCrime[playerid][pAccusedof], string, 0, strlen(string), 255);
  2742.     return 1;
  2743. }
  2744.  
  2745. public BetWinner(playerid,contest)
  2746. {
  2747.     new winname[MAX_PLAYER_NAME];
  2748.     new better[MAX_PLAYER_NAME];
  2749.     new string[256];
  2750.     GetPlayerName(playerid, winname, sizeof(winname));
  2751.     for(new i = 0; i <= MAX_PLAYERS; i++)
  2752.     {
  2753.         if(IsPlayerConnected(i) == 1)
  2754.         {
  2755.             if(contest == 1)
  2756.             {
  2757.                 if(BetRace[i][0] == playerid)
  2758.                 {
  2759.                     GivePlayerMoney(i,BetRace[i][1]*2);
  2760.                     BizzInfo[5][bTakings] -= (BetRace[i][1]*2);
  2761.                     format(string, sizeof(string), "______-= %s =-_______", BizzInfo[5][bDiscription]);
  2762.                     SendClientMessage(i, TEAM_VAGOS_COLOR,string);
  2763.                     format(string, sizeof(string), "   Osvojio si $%d na %s na ulicnoj trci", BetRace[i][1]*2, winname);
  2764.                     SendClientMessage(i, COLOR_WHITE, string);
  2765.                     SendClientMessage(i, TEAM_VAGOS_COLOR,"_______________________________________");
  2766.                     PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
  2767.                     GetPlayerName(i, better, sizeof(better));
  2768.                     format(string, sizeof(string), "%s won $%d on %s", better, BetRace[i][1]*2, winname);
  2769.                     printf("%s", string);
  2770.                     PayLog(string);
  2771.                 }
  2772.                 BetRace[i][0] = 255;
  2773.                 BetRace[i][1] = 0;
  2774.             }
  2775.             if(contest == 2)
  2776.             {
  2777.                 if(BetDm[i][0] == playerid)
  2778.                 {
  2779.                     GivePlayerMoney(i,BetDm[i][1]*2);
  2780.                     BizzInfo[5][bTakings] -= (BetDm[i][1]*2);
  2781.                     format(string, sizeof(string), "______-= %s =-_______", BizzInfo[5][bDiscription]);
  2782.                     SendClientMessage(i, TEAM_VAGOS_COLOR,string);
  2783.                     format(string, sizeof(string), "   Osvojio si $%d na %s na deathmatch-u", BetDm[i][1]*2, winname);
  2784.                     SendClientMessage(i, COLOR_WHITE, string);
  2785.                     SendClientMessage(i, TEAM_VAGOS_COLOR,"_______________________________________");
  2786.                     PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
  2787.                     GetPlayerName(i, better, sizeof(better));
  2788.                     format(string, sizeof(string), "%s won $%d on %s", better, BetDm[i][1]*2, winname);
  2789.                     printf("%s", string);
  2790.                     PayLog(string);
  2791.                 }
  2792.                 BetDm[i][0] = 255;
  2793.                 BetDm[i][1] = 0;
  2794.             }
  2795.         }
  2796.     }
  2797.     return 1;
  2798. }
  2799.  
  2800. //------------------------------------------------------------------------------------------------------
  2801. public OnPlayerDisconnect(playerid,reason)
  2802. {
  2803.     SendDeathMessage(INVALID_PLAYER_ID,playerid,201);
  2804.     MidoStreamDisconnect(playerid);
  2805.     TextDrawDestroy(Textdraw0);
  2806.     printf("DEBUG OnPlayerDisconnect(%d)1", playerid);
  2807.     gActivePlayers[playerid]--;
  2808.     numplayers--;
  2809.     SendLeaveMessage(playerid, reason);
  2810.     if (DmHiPlayer == playerid)
  2811.     {
  2812.         DmHiPlayer = INVALID_PLAYER_ID;
  2813.         new tmp1;
  2814.         new tmp2;
  2815.         for(new i = 0; i <= MAX_PLAYERS; i++)
  2816.         {
  2817.             if(DmScore[i] > tmp1 && IsPlayerConnected(i) == 1)
  2818.             {
  2819.                 DmScore[i] = tmp1;
  2820.                 i = tmp2;
  2821.             }
  2822.         }
  2823.         if(DmHiPlayer != 255)
  2824.         {
  2825.             DmHiPlayer = tmp2;
  2826.             new dmname[MAX_PLAYER_NAME];
  2827.             new string[256];
  2828.             GetPlayerName(DmHiPlayer, dmname, sizeof(dmname));
  2829.             DmHiScore = DmScore[DmHiPlayer];
  2830.             format(string, sizeof(string), "DM Vijesti | %s vodi s: %d ", dmname,DmHiScore);
  2831.             BroadCast(COLOR_WHITE, string);
  2832.         }
  2833.     }
  2834.     if (gPublicEnemy == playerid)
  2835.     {
  2836.         gPublicEnemy = INVALID_PLAYER_ID;
  2837.         GivePlayerMoney(playerid, -reward);
  2838.         KillTimer(offhook);
  2839.     }
  2840.     OnUpdatePlayer(playerid);
  2841.     printf("DEBUG OnPlayerDisconnect(%d)2", playerid);
  2842.     printf("DEBUG OnPlayerDisconnect(%d)3", playerid);
  2843.     if(HireCar[playerid] != 299)
  2844.     {
  2845.         gLastDriver[HireCar[playerid]] = 300;
  2846.         gCarLock[HireCar[playerid]] = 0;
  2847.         UnLockCar(HireCar[playerid]);
  2848.     }
  2849.     if (gLastCar[playerid] > 0)
  2850.     {
  2851.         gLastDriver[gLastCar[playerid]] = 300;
  2852.         if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
  2853.         {
  2854.             gCarLock[gLastCar[playerid]] = 0;
  2855.             UnLockCar(gLastCar[playerid]);
  2856.         }
  2857.     }
  2858.     printf("DEBUG OnPlayerDisconnect(%d)4", playerid);
  2859.     if (gPlayerCheckpointStatus[playerid] == CHECKPOINT_DROPOFF)
  2860.     {
  2861.         DisablePlayerCheckpoint(playerid);
  2862.         gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  2863.         MissionActive = 0;
  2864.         if (gdebug){print("DEBUG MissionActive = 0;");}
  2865.     }
  2866.     if (gSuperCop == playerid)
  2867.     {
  2868.         gSuperCop = INVALID_PLAYER_ID;
  2869.     }
  2870.  
  2871.            if (PlayerInfo[playerid][pAdmin] >= 2)
  2872.            SendClientMessageToAll(COLOR_ORANGE,"| ZeroASL | Prebacujem na full mod zastite servera...");
  2873. }
  2874. public SetPlayerRandomSpawn(playerid)
  2875. {
  2876.     new rand;
  2877.     new playername[32];
  2878.     new house = PlayerInfo[playerid][pPhousekey];
  2879.     GetPlayerName(playerid, playername, sizeof(playername));
  2880.     if(gPlayerFighter[playerid] == 1)
  2881.     {
  2882.         new string[256];
  2883.         gTeam[playerid] = 4;
  2884.         rand = random(sizeof(gRandomDMSpawns)-2)+1;
  2885.         SetPlayerPos(playerid, gRandomDMSpawns[rand][0], gRandomDMSpawns[rand][1], gRandomDMSpawns[rand][2]); // Warp the player
  2886.         SetPlayerFacingAngle(playerid, 270.0);
  2887.         SetPlayerInterior(playerid,0);
  2888.         PlayerInfo[playerid][pInt] = 0;
  2889.         format(string, sizeof(string), "  ~r~%d~w~|~g~%d",DmScore[playerid],DmHiScore);
  2890.         GameTextForPlayer(playerid, string, 5000, 6);
  2891.         if(gFightLeader < 1000)
  2892.         {
  2893.             TogglePlayerControllable(playerid, 0);
  2894.         }
  2895.         if (gdebug >=0){printf("DEBUG SPAWNED: Playerid:%d Team:%d DMPoint:%d", playerid, gTeam[playerid], rand);}
  2896.         return 1;
  2897.     }
  2898.     if(house !=255)
  2899.     {
  2900.         /*
  2901.         if(gTeam[playerid] <= 2 && strcmp(playername, HouseInfo[house][hOwner], true) == 0 || gTeam[playerid] > 2)
  2902.         {
  2903.             */
  2904.             SetPlayerToTeamColor(playerid);
  2905.             SetPlayerInterior(playerid,HouseInfo[house][hInt]);
  2906.             SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
  2907.             PlayerInfo[playerid][pLocal] = house;
  2908.             PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
  2909.             if (gdebug >=1){printf("DEBUG SPAWNED: Playerid:%d Team:%d SpawnPoint:%d", playerid, gTeam[playerid], rand);}
  2910.             return 1;
  2911.         //}
  2912.  
  2913.     }
  2914.     if ((gTeam[playerid]) == 2)
  2915.     {
  2916.         SetPlayerToTeamColor(playerid);
  2917.         rand = random(sizeof(gCopPlayerSpawns));
  2918.         SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
  2919.         SetPlayerFacingAngle(playerid, 270.0);
  2920.         SetPlayerInterior(playerid,0);
  2921.         PlayerInfo[playerid][pInt] = 0;
  2922.         if (gdebug >=1){printf("DEBUG SPAWNED: Playerid:%d Team:%d SpawnPoint:%d", playerid, gTeam[playerid], rand);}
  2923.         return 1;
  2924.     }
  2925.     if ((gTeam[playerid]) == 1)
  2926.     {
  2927.         SetPlayerToTeamColor(playerid);
  2928.         rand = random(sizeof(gMedPlayerSpawns));
  2929.         SetPlayerPos(playerid, gMedPlayerSpawns[rand][0], gMedPlayerSpawns[rand][1], gMedPlayerSpawns[rand][2]); // Warp the player
  2930.         SetPlayerFacingAngle(playerid, 270.0);
  2931.         SetPlayerInterior(playerid,0);
  2932.         PlayerInfo[playerid][pInt] = 0;
  2933.         if (gdebug >=1){printf("DEBUG SPAWNED: Playerid:%d Team:%d SpawnPoint:%d", playerid, gTeam[playerid], rand);}
  2934.         return 1;
  2935.     }
  2936.     else
  2937.     {
  2938.         SetPlayerToTeamColor(playerid);
  2939.         rand = random(sizeof(gRandomPlayerSpawns));
  2940.         SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
  2941.         SetPlayerFacingAngle(playerid, 270.0);
  2942.         SetPlayerInterior(playerid,0);
  2943.         PlayerInfo[playerid][pInt] = 0;
  2944.         if (gdebug >=1){printf("DEBUG SPAWNED: Playerid:%d Team:%d SpawnPoint:%d", playerid, gTeam[playerid], rand);}
  2945.         return 1;
  2946.     }
  2947. //  return 1;
  2948. }
  2949. public OnPlayerDeath(playerid, killerid, reason)
  2950. {
  2951.     SendDeathMessage(killerid, playerid, reason);
  2952.     GivePlayerMoney(killerid,3000);
  2953.     if(killerid != 255)
  2954.     {
  2955.         if(GetPlayerState(killerid) == 2 && playerid != gPublicEnemy)
  2956.         {
  2957.             SendClientMessage(killerid, 0xDB023EFF, "ZeroAS: Napravili ste Drive By,ukoliko ovo ponovite mozete biti banani.");
  2958.             return 1;
  2959.         }
  2960.     }
  2961.     if(reason == 38)
  2962.     {
  2963.         new kstring[500];
  2964.         new kickname[MAX_PLAYER_NAME];
  2965.         GetPlayerName(playerid, kickname, sizeof(kickname));
  2966.         format(kstring, sizeof(kstring), "| ZeroAS | DETEKCIJA CHEATA || %s[ID: %d]",kickname,playerid);
  2967.         format(kstring, sizeof(kstring), "Pronadjen MiniGun!!!",kickname,playerid);
  2968.         SendAdminMessage(0xDB023EFF, kstring);
  2969.         format(kstring, sizeof(kstring), "| ZeroAS Ban |: %s",kickname);
  2970.         format(kstring, sizeof(kstring), "| ZeroAS Ban | Razlog: nedozvoljena oruzja",kickname);
  2971.         printf("ZeroAS Ban | %s,CHEAT!", kstring);
  2972.         SendClientMessageToAll(COLOR_ORANGERED, kstring);
  2973.         Ban(killerid);
  2974.     }
  2975.  
  2976.     return 1;
  2977. }
  2978. public BanLog(string[])
  2979. {
  2980.     new entry[256];
  2981.     format(entry, sizeof(entry), "%s\n",string);
  2982.     new File:hFile;
  2983.     hFile = fopen("ban.log", io_append);
  2984.     fwrite(hFile, entry);
  2985.     fclose(hFile);
  2986. }
  2987. public OnPlayerSpawn(playerid)
  2988. {
  2989.     GangZoneShowForPlayer(playerid, FA, 65477);
  2990.     GangZoneShowForPlayer(playerid, GM, 16711888);
  2991.     GangZoneShowForPlayer(playerid, BM, 0x91FF22FF);
  2992.     GangZoneShowForPlayer(playerid, RUS, -65332);
  2993.     new house = PlayerInfo[playerid][pPhousekey];
  2994.     if (gdebug >=1){printf("OnPlayerSpawn Playerid:%d", playerid);}
  2995.     if (teamcarlock)
  2996.     {
  2997.         TeamLockDoors(playerid);
  2998.     }
  2999.     InitLockDoors(playerid);
  3000.     if(accountplay)
  3001.     {
  3002.         if (gdebug >=1){printf("accountplay");}
  3003.         if (gPlayerAccount[playerid] == 0)
  3004.         {
  3005.             gTeam[playerid] = 0;
  3006.             GameTextForPlayer(playerid, "~w~Dobro dosli.~n~Ukoliko zelite igrati na nasem serveru morate se registrirat, Pisite ~n~~r~/regnick (password)~w~ kako bi ste se registrirali", 20000, 3);
  3007.             //SetPlayerInterior(playerid,0);
  3008.             SetPlayerInterior(playerid,0);
  3009.             PlayerInfo[playerid][pInt] = 0;
  3010.             SetPlayerPos(playerid,-1178.9769,29.8044,0.6867);
  3011.             // airport
  3012.             PlayJailSound(1153 , 1154, 2000,264.395200, 77.564040, 1001.039000);
  3013.             gPlayerSpawned[playerid] = 1;
  3014.             return 1;
  3015.         }
  3016.         if (gPlayerLogged[playerid] == 0)
  3017.         {
  3018.             gTeam[playerid] = 0;
  3019.             GameTextForPlayer(playerid, "~w~Ukoliko zelite igrati na nasem serveru morate se logirati, pisite ~n~~g~/login (password)~w~ da se logirate", 20000, 3);
  3020.             //SetPlayerInterior(playerid,0);
  3021.             SetPlayerInterior(playerid,0);
  3022.             PlayerInfo[playerid][pInt] = 0;
  3023.             SetPlayerPos(playerid,-1178.9769,29.8044,0.6867);
  3024.             // airport
  3025.             PlayJailSound(1153 , 1154, 2000,264.395200, 77.564040, 1001.039000);
  3026.             gPlayerSpawned[playerid] = 1;
  3027.             return 1;
  3028.         }
  3029.     }
  3030.     if (gPlayerSpawned[playerid] == 1)
  3031.     {
  3032.         gTeam[playerid] = PlayerInfo[playerid][pTeam];
  3033.         if (gTeam[playerid] == 2 && forceteam && CopCheck(playerid))
  3034.         {
  3035.             gTeam[playerid] = 3;
  3036.             PlayerInfo[playerid][pTeam] = 3;
  3037.             SetPlayerRandomSpawn(playerid);
  3038.             SendClientMessage(playerid, COLOR_YELLOW, "CroHerze: Niste ovlasteni da budete policajac.");
  3039.         }
  3040.         /*
  3041.         if(gTeam[playerid] == 2 && PlayerInfo[playerid][pLevel] < 3)
  3042.         {
  3043.             gTeam[playerid] = 3;
  3044.             PlayerInfo[playerid][pTeam] = 3;
  3045.             SetPlayerRandomSpawn(playerid);
  3046.             SendClientMessage(playerid, COLOR_YELLOW, "SERVER: You must be level 3 to join the cops.");
  3047.         }
  3048.         */
  3049.         if (gTeam[playerid] == 1 && forceteam && MedCheck(playerid))
  3050.         {
  3051.             gTeam[playerid] = 3;
  3052.             PlayerInfo[playerid][pTeam] = 3;
  3053.             SetPlayerRandomSpawn(playerid);
  3054.             SendClientMessage(playerid, COLOR_YELLOW, "CroHerze: Niste ovlasteni da budete bolnicar.");
  3055.         }
  3056.         if (gTeam[playerid] == 4) //medic / criminal reset team
  3057.         {
  3058.             gTeam[playerid] = PlayerInfo[playerid][pTeam];
  3059.         }
  3060.         /*
  3061.         if (FirstSpawn[playerid] == 0)
  3062.         {
  3063.             SetPlayerToTeamColor(playerid);
  3064.             SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
  3065.             printf("PlayerInfo[playerid][pInt]= %d",PlayerInfo[playerid][pInt]);
  3066.             SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
  3067.             gPlayerSpawned[playerid] = 1;
  3068.             FirstSpawn[playerid] = 1;
  3069.             print("insidespawn or firstsawpn");
  3070.             return 1;
  3071.         }
  3072.         */
  3073.         SetPlayerRandomSpawn(playerid);
  3074.         if (gdebug){printf("DEBUG id = %d gTeam = %d",playerid,gTeam[playerid]);}
  3075.         //SetPlayerPos(playerid, 1360.0217,2565.6328,10.8265);///badspawn
  3076.         //SetPlayerWorldBounds(playerid,3500.00,66.67,-653.33,-2806.67);
  3077.         /*
  3078.         switch (MissionActive)
  3079.         {
  3080.             case 1://Cashbox not picked up
  3081.             {
  3082.                 if ((gTeam[playerid]) == 1)
  3083.                 {
  3084.                     SendClientMessage(playerid, COLOR_YELLOW, objstore);
  3085.                     gPlayerCheckpointStatus[playerid] = CHECKPOINT_PICKUP;
  3086.                 }
  3087.                 else if (gTeam[playerid] == 2)
  3088.                 {
  3089.                     SendClientMessage(playerid, TEAM_BLUE_COLOR, cbjstore);
  3090.                 }
  3091.                 SetPlayerCheckpoint(playerid,cwx, cwy, cwz, 1.0);
  3092.             }
  3093.             case 2://Cashbox picked up firsttime
  3094.             {
  3095.                 if ((gTeam[playerid]) == 1)
  3096.                 {
  3097.                     SendClientMessage(playerid, COLOR_YELLOW, objstore);
  3098.                     gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  3099.                 }
  3100.                 else if (gTeam[playerid] == 2)
  3101.                 {
  3102.                     SendClientMessage(playerid, TEAM_BLUE_COLOR, cbjstore);
  3103.                 }
  3104.                 SetPlayerCheckpoint(playerid,cwx, cwy, cwz, 1.0);
  3105.             }
  3106.             case 3://Cashbox was dropped
  3107.             {
  3108.  
  3109.                 SetPlayerCheckpoint(playerid,cwx,cwy,cwz, 1.0);
  3110.                 gPlayerCheckpointStatus[playerid] = CHECKPOINT_PICKUP;
  3111.                 return 1;
  3112.             }
  3113.             case 5://racewait
  3114.             {
  3115.                 if (gdebug){print("DEBUG Checkp5");}
  3116.                 if ((gTeam[playerid]) == 1)
  3117.                 {
  3118.                     gPlayerCheckpointStatus[playerid] = CHECKPOINT_SR1START;
  3119.                 }
  3120.                     SetPlayerCheckpoint(playerid,cwx,cwy,cwz, 8.0);
  3121.                 return 1;
  3122.             }
  3123.             case 6://racewait
  3124.             {
  3125.                 if (gdebug){print("DEBUG Checkp5");}
  3126.                 if ((gTeam[playerid]) == 1 || (gTeam[playerid]) == 3)
  3127.                 {
  3128.                     gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRA;
  3129.                 }
  3130.                     SetPlayerCheckpoint(playerid,cwx,cwy,cwz, 8.0);
  3131.                 return 1;
  3132.             }
  3133.             case 7://progress
  3134.             {
  3135.                 if (gdebug){print("DEBUG Checkp5");}
  3136.                 if ((gTeam[playerid]) == 1)
  3137.                 {
  3138.                     gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRA;
  3139.                     SetPlayerCheckpoint(playerid,cwx,cwy,cwz, 8.0);
  3140.                 }
  3141.                 if ((gTeam[playerid]) == 2 )
  3142.                 {
  3143.                     gPlayerCheckpointStatus[playerid] = CHECKPOINT_SR1START;
  3144.                     SetPlayerCheckpoint(playerid,scx,scy,scz, 8.0);
  3145.                 }
  3146.                 return 1;
  3147.             }
  3148.             case 9://Car is waiting first occupent
  3149.             {
  3150.                 if (gTeam[playerid] == 1)
  3151.                 {
  3152.                     SendClientMessage(playerid, COLOR_YELLOW, objstore);
  3153.                     SetVehicleParamsForPlayer(stealcar,playerid,1,0);
  3154.                 }
  3155.                 else if (gTeam[playerid] == 2)
  3156.                 {
  3157.                 SendClientMessage(playerid, TEAM_BLUE_COLOR, cbjstore);
  3158.                 SetVehicleParamsForPlayer(stealcar,playerid,1,1);
  3159.                 }
  3160.             }
  3161.             case 10://Car has been takin by Criminal
  3162.             {
  3163.                 if (gTeam[playerid] == 1)
  3164.                 {
  3165.                     SendClientMessage(playerid, COLOR_YELLOW, objstore);
  3166.                 }
  3167.                 else if (gTeam[playerid] == 2)
  3168.                 {
  3169.                     SendClientMessage(playerid, TEAM_BLUE_COLOR, cbjstore);
  3170.                 }
  3171.                 SetPlayerCheckpoint(playerid, cwx, cwy, cwz, 16.0);
  3172.                 SetVehicleParamsForPlayer(stealcar,playerid,1,0);
  3173.             }
  3174.             case 101://Car is empty but was takin
  3175.             {
  3176.                 SetVehicleParamsForPlayer(stealcar,playerid,1,0);
  3177.             }
  3178.             default:
  3179.             {
  3180.  
  3181.             }
  3182.         }
  3183.         */
  3184.     if(gPlayerLogged[playerid] == 0)
  3185.     {
  3186.         SendClientMessage(playerid, COLOR_LIGHTRED, ">>> CroHerze DM Server zahtijeva logiranje prije spawna(izbacen)");
  3187.         Kick(playerid);
  3188.     }
  3189. if(PlayerInfo[playerid][pMember] == 6|| PlayerInfo[playerid][pLeader] == 6 )
  3190. {
  3191.  
  3192.    SetPlayerPos(playerid,1292.4642,-790.1343,92.0313);
  3193.    SetPlayerInterior(playerid,0);
  3194.  
  3195. }
  3196. if(PlayerInfo[playerid][pMember] == 9|| PlayerInfo[playerid][pLeader] == 9 )
  3197. {
  3198.  
  3199.    SetPlayerPos(playerid,1126.3317,-2037.6862,69.8833);
  3200.    SetPlayerInterior(playerid,0);
  3201.  
  3202. }
  3203. if(PlayerInfo[playerid][pMember] == 8|| PlayerInfo[playerid][pLeader] == 8 )
  3204. {
  3205.  
  3206.    SetPlayerPos(playerid,1654.9467,-1656.8705,22.5156);
  3207.    SetPlayerInterior(playerid,0);
  3208.  
  3209. }
  3210. if(PlayerInfo[playerid][pMember] == 5|| PlayerInfo[playerid][pLeader] == 5 )
  3211. {
  3212.  
  3213.    SetPlayerPos(playerid,2508.8794,-1686.5829,13.5654);
  3214.    SetPlayerInterior(playerid,0);
  3215.  
  3216. }
  3217.     }
  3218.     return 1;
  3219. }
  3220. //---------------------------------------CHECKPOINT----------------------------------------------------
  3221. public PayLog(string[])
  3222. {
  3223.     new entry[256];
  3224.     format(entry, sizeof(entry), "%s\n",string);
  3225.     new File:hFile;
  3226.     hFile = fopen("pay.log", io_append);
  3227.     fwrite(hFile, entry);
  3228.     fclose(hFile);
  3229. }
  3230.  
  3231. public CmdLog(string[])
  3232. {
  3233.     new entry[256];
  3234.     format(entry, sizeof(entry), "%s\n",string);
  3235.     new File:hFile;
  3236.     hFile = fopen("cmd.log", io_append);
  3237.     fwrite(hFile, entry);
  3238.     fclose(hFile);
  3239. }
  3240.  
  3241. public PrePlayerNewMission()
  3242. {
  3243.     if (gdebug >=1){printf("PrePlayerNewMission");}
  3244.     CheckpointReset();
  3245.     if (MissionActive == 12)
  3246.     {
  3247.         gFighters=0;
  3248.         gFightLeader=0;
  3249.         for(new i = 0; i <= MAX_PLAYERS; i++)
  3250.         {
  3251.             if(IsPlayerConnected(i))
  3252.             {
  3253.                 DmScore[i] = 0;
  3254.                 if(gPlayerFighter[i] == 1)
  3255.                 {
  3256.                     gPlayerFighter[i] = 0;
  3257.                     TogglePlayerControllable(i, 1);
  3258.                     SetPlayerRandomSpawn(i);
  3259.                 }
  3260.             }
  3261.         }
  3262.     }
  3263.     if (MissionActive > 8 && MissionActive < 12)
  3264.     {
  3265.         if(MissionActive != 0)
  3266.         {
  3267.             printf("DEBUG: Bad Hotwire: stealcar = %d, stealcardest = %d",stealcar,stealcardest);
  3268.             for(new i = 0; i <= MAX_PLAYERS; i++)
  3269.             {
  3270.                 if(IsPlayerConnected(i))
  3271.                 {
  3272.                     if(stealcar != -1)
  3273.                     {
  3274.                         SetVehicleParamsForPlayer(stealcar,i,0,0);
  3275.                         SetVehicleToRespawn(stealcar);
  3276.                         stealcar = -1;
  3277.                     }
  3278.                 }
  3279.             }
  3280.         }
  3281.     }
  3282.     if (MissionActive > 4 && MissionActive <= 7 )
  3283.     {
  3284.         RaceCheckpointReset();
  3285.         for(new i = 0; i <= MAX_PLAYERS; i++)
  3286.         {
  3287.             if(IsPlayerConnected(i))
  3288.             {
  3289.                 LapCount[i] = 0;
  3290.                 StartTime[i] = 0;
  3291.             }
  3292.         }
  3293.         gRaceFin = 0;
  3294.         gRaceMid = 0;
  3295.         gRaceMid2 = 0;
  3296.         gRaceEnd = 0;
  3297.         gLaps = 0;
  3298.         BroadCast(COLOR_WHITE, "Vijesti | Utrka je zavrsila");
  3299.     }
  3300.     if (cashbox == 0 && hotwire == 0 && streetrace == 0 && deathmatch == 0)
  3301.     {
  3302.         MissionActive = 255;
  3303.         if (gdebug){print("DEBUG MissionActive = 255");}
  3304.         return 1;
  3305.     }
  3306.     if (cashbox == 0 && hotwire == 0 && streetrace == 1 && deathmatch == 0)
  3307.     {
  3308.         MissionActive = 4;
  3309.         if (gdebug){print("DEBUG MissionActive = 4");}
  3310.         SetPlayerNewMission();
  3311.         return 1;
  3312.     }
  3313.     if (cashbox == 0 && hotwire == 0 && streetrace == 0 && deathmatch == 1)
  3314.     {
  3315.         MissionActive = 12;
  3316.         if (gdebug){print("DEBUG MissionActive = 12");}
  3317.         SetPlayerNewMission();
  3318.         return 1;
  3319.     }
  3320.     if (MissionActive == 0)
  3321.     {
  3322.         if (cashbox == 0)
  3323.         {
  3324.             MissionActive = 4;
  3325.             if (gdebug){print("DEBUG MissionActive = 4");}
  3326.         }
  3327.         else
  3328.         {
  3329.             MissionActive = 0;
  3330.             if (gdebug){print("DEBUG MissionActive = 0");}
  3331.         }
  3332.         SetPlayerNewMission();
  3333.         return 1;
  3334.     }
  3335.     if (MissionActive > 0 && MissionActive <= 4)
  3336.     {
  3337.         if (streetrace == 0)
  3338.         {
  3339.             MissionActive = 8;
  3340.             if (gdebug){print("DEBUG MissionActive = 8");}
  3341.         }
  3342.         else
  3343.         {
  3344.             MissionActive = 4;
  3345.             if (gdebug){print("DEBUG MissionActive = 4");}
  3346.         }
  3347.         SetPlayerNewMission();
  3348.         return 1;
  3349.     }
  3350.     if (MissionActive > 4 && MissionActive <= 8 )
  3351.     {
  3352.         if (hotwire == 0)
  3353.         {
  3354.             MissionActive = 12;
  3355.             if (gdebug){print("DEBUG MissionActive = 12");}
  3356.         }
  3357.         else
  3358.         {
  3359.             MissionActive = 8;
  3360.             if (gdebug){print("DEBUG MissionActive = 8");}
  3361.         }
  3362.         SetPlayerNewMission();
  3363.         return 1;
  3364.     }
  3365.     if (MissionActive > 8 && MissionActive <= 12)
  3366.     {
  3367.         if (deathmatch == 0)
  3368.         {
  3369.             MissionActive = 0;
  3370.             if (gdebug){print("DEBUG MissionActive = 0");}
  3371.         }
  3372.         else
  3373.         {
  3374.             MissionActive = 12;
  3375.             if (gdebug){print("DEBUG MissionActive = 12");}
  3376.         }
  3377.         SetPlayerNewMission();
  3378.         return 1;
  3379.     }
  3380.     if (MissionActive == 13)
  3381.     {
  3382.         if (cashbox == 0)
  3383.         {
  3384.             MissionActive = 4;
  3385.             if (gdebug){print("DEBUG MissionActive = 4");}
  3386.         }
  3387.         else
  3388.         {
  3389.             MissionActive = 0;
  3390.             if (gdebug){print("DEBUG MissionActive = 0");}
  3391.         }
  3392.         SetPlayerNewMission();
  3393.         return 1;
  3394.     }
  3395.     return 1;
  3396. }
  3397. public SetPlayerNewMission()
  3398. {
  3399.     if (gdebug >=1){printf("SetPlayerNewMission");}
  3400.     switch (MissionActive)
  3401.     {
  3402.         case 0:
  3403.         {
  3404.             new rando = random(5);
  3405.             if (rando == 1)
  3406.             {
  3407.                 cwx = 997.7;
  3408.                 cwy = -921.1;
  3409.                 cwz = 42.1;
  3410.                 format(objstore, sizeof(objstore), "SMS | Isplata je na benzinskoj na sjevernoj strani, Salje: MOLE (555)");
  3411.                 format(cbjstore, sizeof(objstore), "SMS | Isplata je na benzinskoj na sjevernoj strani, Salje: MOLE (555)");
  3412.             }
  3413.             else if(rando == 2)
  3414.             {
  3415.                 cwx = 2421.5;
  3416.                 cwy = -1221.7;
  3417.                 cwz = 25.3;
  3418.                 format(objstore, sizeof(objstore), "SMS | Isplata je kod Pig Pen-a, Salje: MOLE (555)");
  3419.                 format(cbjstore, sizeof(objstore), "SMS | Isplata je kod Pig Pen-a, Salje: MOLE (555)");
  3420.             }
  3421.             else if(rando == 3)
  3422.             {
  3423.                 cwx = 2069.7;
  3424.                 cwy = -1780.1;
  3425.                 cwz = 13.5;
  3426.                 format(objstore, sizeof(objstore), "SMS | Isplata je kod Tattoo sopa na istocnoj strani, Salje: MOLE (555)");
  3427.                 format(cbjstore, sizeof(objstore), "SMS | Isplata je kod Tattoo sopa na istocnoj strani, Salje: MOLE (555)");
  3428.             }
  3429.             else if(rando == 4)
  3430.             {
  3431.                 cwx = 1352.4;
  3432.                 cwy = -1756.7;
  3433.                 cwz = 13.5;
  3434.                 format(objstore, sizeof(objstore), "SMS | Isplata je na Roboi's Food Mart, Sender: MOLE (555)");
  3435.                 format(cbjstore, sizeof(objstore), "SMS | Isplata je na Roboi's Food Mart, Sender: MOLE (555)");
  3436.             }
  3437.             else
  3438.             {
  3439.                 cwx = 1831.1;
  3440.                 cwy = -1842.8;
  3441.                 cwz = 13.5;
  3442.                 format(objstore, sizeof(objstore), "SMS | Isplata je na 69 Cent Store, Sender: MOLE (555)");
  3443.                 format(cbjstore, sizeof(objstore), "SMS | Isplata je na 69 Cent Store, Sender: MOLE (555)");
  3444.             }
  3445.             rx = cwx;//storing the store
  3446.             ry = cwy;
  3447.             rz = cwz;
  3448.             MissionActive = 1;
  3449.             if (gdebug){print("DEBUG MissionActive = 1;");}
  3450.             for(new i = 0; i <= MAX_PLAYERS; i++)
  3451.             {
  3452.                 if(IsPlayerConnected(i) && gPlayerSpawned[i])
  3453.                 {
  3454.                     if (gTeam[i] >= 3)
  3455.                     {
  3456.                         if (automission)
  3457.                         {
  3458.                             JobGive(i);
  3459.                         }
  3460.                         else if (PlayerInfo[i][pPnumber] !=0)
  3461.                         {
  3462.                             SendClientMessage(i, COLOR_YELLOW, "SMS | Imam posao za tebe, napisi Yes na 555 za dodatne informacije, Salje: MOLE (555)");
  3463.                             SendClientMessage(i, COLOR_WHITE, "Pomoc: Upisi (/sms 555 yes) da ti pokaze put do posla");
  3464.                             RingTone[i] =20;
  3465.                         }
  3466.                     }
  3467.                     else if (gPlayerSpawned[i] == 1 && (gTeam[i]) == 2)
  3468.                     {
  3469.                         SendClientMessage(i, COLOR_DBLUE, cbjstore);
  3470.                         GameTextForPlayer(i, "~w~Waypoint postavljen ~n~~r~CashBox", 5000, 1);
  3471.                         SetPlayerCheckpoint(i,cwx, cwy, cwz, 1.4);
  3472.                     }
  3473.                 }
  3474.             }
  3475.             return 1;
  3476.         }
  3477.  
  3478.         case 4:
  3479.         {
  3480.  
  3481.             gRaceFin = 0;
  3482.             gRaceMid = 0;
  3483.             gRaceMid2 = 0;
  3484.             if(randomrace)
  3485.             {
  3486.                 RNext = random(sizeof(gRaceCheckpoints)-1);
  3487.                 RNext2 = random(sizeof(gRaceCheckpoints));
  3488.                 REnd = random(sizeof(gRaceCheckpoints));
  3489.                 while (RNext == REnd)
  3490.                 {
  3491.                     REnd = random(sizeof(gRaceCheckpoints));
  3492.                 }
  3493.                 while (RNext2 == RNext)
  3494.                 {
  3495.                     RNext2 = random(sizeof(gRaceCheckpoints));
  3496.                 }
  3497.                 rsx = gRaceCheckpoints[4][0];
  3498.                 rsy = gRaceCheckpoints[4][1];
  3499.                 rsz = gRaceCheckpoints[4][2];
  3500.                 rmx = gRaceCheckpoints[RNext][0];
  3501.                 rmy = gRaceCheckpoints[RNext][1];
  3502.                 rmz = gRaceCheckpoints[RNext][2];
  3503.                 rm2x = gRaceCheckpoints[RNext2][0];
  3504.                 rm2y = gRaceCheckpoints[RNext2][1];
  3505.                 rm2z = gRaceCheckpoints[RNext2][2];
  3506.                 rex = gRaceCheckpoints[REnd][0];
  3507.                 rey = gRaceCheckpoints[REnd][1];
  3508.                 rez = gRaceCheckpoints[REnd][2];
  3509.             }
  3510.  
  3511.             if(racelist > 0)
  3512.             {
  3513.                 new randa = random(sizeof(Races));
  3514.                 LoadRace(255,Races[randa]);
  3515.             }
  3516.             MissionActive = 5;
  3517.             if (gdebug){print("DEBUG MissionActive = 5");}
  3518.             for(new i = 0; i <= MAX_PLAYERS; i++)
  3519.             {
  3520.                 if(IsPlayerConnected(i) && (gPlayerSpawned[i] == 1))
  3521.                 {
  3522.                     if (gdebug){print("DEBUG Checkp4");}
  3523.                     if (gTeam[i] >= 3)
  3524.                     {
  3525.                         if (automission)
  3526.                         {
  3527.                             JobGive(i);
  3528.                         }
  3529.                         else if (PlayerInfo[i][pPnumber] !=0)
  3530.                         {
  3531.                             SendClientMessage(i, COLOR_YELLOW, "SMS | Imam posao za tebe, napisi Yes na 555 za dodatne informacije, Salje: MOLE (555)");
  3532.                             SendClientMessage(i, COLOR_WHITE, "Pomoc: Upisi (/sms 555 yes) da ti pokaze put do posla");
  3533.                             RingTone[i] =20;
  3534.                         }
  3535.                     }
  3536.                     else if((gTeam[i]) == 2 && RaceInfo[rLaps] == 0)
  3537.                     {
  3538.  
  3539.                         if (gdebug){print("DEBUG Checkp6");}
  3540.                         format(cbjstore, sizeof(cbjstore), "SMS | Imam posao za tebe, napisi Yes na 555 za dodatne informacije, Salje: MOLE (555)");
  3541.                         GameTextForPlayer(i, "~w~Waypoint postavljen na ~n~~r~RoadBlock", 5000, 1);
  3542.                         SendClientMessage(i, COLOR_DBLUE, cbjstore);
  3543.                         RingTone[i] = 20;
  3544.                         SetPlayerRaceCheckpoint(i, 0, rm2x,rm2y,rm2z,rex,rey,rez, 8.0);
  3545.                     }
  3546.                 }
  3547.             }
  3548.             return 1;
  3549.         }
  3550.         case 8:
  3551.         {
  3552.             if (gdebug){print("DEBUG test1");}
  3553.             new rand  = random(162);
  3554.             stealcar = hotwires[rand];
  3555.             GetVehiclePos(stealcar, scx, scy, scz);
  3556.             format(objstore, sizeof(objstore), "SMS | Kupac je zainteresiran za oznacen auto na tvom GPS sustavu, Salje: MOLE (555)");
  3557.             format(cbjstore, sizeof(cbjstore), "SMS | Kupac je zainteresiran za oznacen auto na tvom GPS sustavu, Salje: MOLE (555)");
  3558.             rx = scx;//storing the car pos
  3559.             ry = scy;
  3560.             rz = scz;
  3561.             if (gdebug){print("DEBUG TEST2");}
  3562.             new rand2  = random(162);
  3563.             stealcardest = hotwires[rand2];
  3564.             while (stealcardest == stealcar)
  3565.             {
  3566.                 new rand3  = random(162);
  3567.                 stealcardest = hotwires[rand3];
  3568.             }
  3569.             MissionActive = 9;
  3570.             if (gdebug){print("DEBUG MissionActive = 9;");}
  3571.             for(new i = 0; i <= MAX_PLAYERS; i++)
  3572.             {
  3573.                 if(IsPlayerConnected(i) && (gPlayerSpawned[i] == 1))
  3574.                 {
  3575.                     if (gdebug){print("DEBUG test2");}
  3576.                     if (gTeam[i] >= 3)
  3577.                     {
  3578.                         if (automission)
  3579.                         {
  3580.                             JobGive(i);
  3581.                         }
  3582.                         else if (PlayerInfo[i][pPnumber] !=0)
  3583.                         {
  3584.                             SendClientMessage(i, COLOR_YELLOW, "SMS | Imam posao za tebe, napisi Yes na 555 za dodatne informacije, Salje: MOLE (555)");
  3585.                             SendClientMessage(i, COLOR_WHITE, "Pomoc: Upisi (/sms 555 yes) da ti pokaze put do posla");
  3586.                             RingTone[i] =20;
  3587.                         }
  3588.                     }
  3589.                     else
  3590.                     {
  3591.                         if (gdebug){print("DEBUG test4");}
  3592.                         SendClientMessage(i, COLOR_DBLUE, cbjstore);
  3593.                         GameTextForPlayer(i, "~w~Waypoint postavljen na ~n~~y~Suspect Vehicle", 5000, 1);
  3594.                         SetVehicleParamsForPlayer(stealcar,i,1,1);
  3595.                     }
  3596.                 }
  3597.             }
  3598.             if (gdebug){printf("DEBUG HOTWIRE mission started: TargetCar:%d",stealcar);}
  3599.             return 1;
  3600.         }
  3601.         case 12:
  3602.         {
  3603.             new rand = random(sizeof(DmGun));
  3604.             dmweapon = DmGun[rand];
  3605.             if(dmlist > 35)
  3606.             {
  3607.                 dmlist = 1;
  3608.                 //printf("racelist2 = %d",racelist);
  3609.             }
  3610.             new nextdm = random(sizeof(DeathMatches));
  3611.             LoadDM(255,DeathMatches[nextdm]);
  3612.             new sgun1[20];
  3613.             new winfo[256];
  3614.             if(DmGun[rand] > 0)
  3615.             {
  3616.                 GetWeaponName(DmGun[rand], sgun1, 20);
  3617.                 format(winfo, sizeof(winfo), "DM Oruzje | %s",sgun1);
  3618.             }
  3619.             else
  3620.             {
  3621.                 format(winfo, sizeof(winfo), "DM Oruzje | Donesi svoje");
  3622.             }
  3623.             SendClientMessageToAll(COLOR_GREEN, winfo);
  3624.             //dmlist++;
  3625.             //printf("racelist3 = %d",racelist);
  3626.             for(new i = 0; i <= MAX_PLAYERS; i++)
  3627.             {
  3628.                 if(IsPlayerConnected(i) && gPlayerSpawned[i])
  3629.                 {
  3630.                     SendClientMessage(i, COLOR_YELLOW, "SMS | DeathMatch pocinje kod crvene oznake kod Ammunation-a , Salje: MOLE (555)");
  3631.                     RingTone[i] = 20;
  3632.                     SendClientMessage(i, COLOR_WHITE, "Pomoc: Idi do crvene oznake i cekaj da DeathMatch pocne.");
  3633.                     SetPlayerCheckpoint(i,gRandomDMSpawns[0][0],gRandomDMSpawns[0][1],gRandomDMSpawns[0][2], 4.0);
  3634.                     GameTextForPlayer(i, "~w~Waypoint postavljen na ~n~~r~DeathMatch", 5000, 1);
  3635.                     gPlayerCheckpointStatus[i] = CHECKPOINT_DM;
  3636.                 }
  3637.             }
  3638.             MissionActive = 13;
  3639.             return 1;
  3640.         }
  3641.  
  3642.         default:
  3643.         {
  3644.             return 1;
  3645.         }
  3646.     }
  3647.     return 1;
  3648. }
  3649.  
  3650. public OnPlayerEnterCheckpoint(playerid)
  3651. {
  3652.     if (gdebug >=1){printf("OnPlayerEnterCheckpoint %d",playerid);}
  3653.     new string[128];
  3654.     new name[MAX_PLAYER_NAME];
  3655.     switch (gPlayerCheckpointStatus[playerid])
  3656.     {
  3657.         case CHECKPOINT_PICKUP:
  3658.             {
  3659.                 if(GetPlayerState(playerid) != 1)
  3660.                 {
  3661.                     GameTextForPlayer(playerid, "~w~Moras bit~n~~r~na nogama", 1000, 1);
  3662.                     return 1;
  3663.                 }
  3664.                 if (gdebug){print("DEBUG CHECKPOINT_PICKUP");}
  3665.                 GetPlayerName(playerid, name, sizeof(name));
  3666.                 if (MissionActive == 1)
  3667.                 {
  3668.                     RewardCalc(playerid,1000,10000);
  3669.                     DropOff = random(sizeof(gCBdropoff));
  3670.                 }
  3671.                 if (gTeam[playerid] >= 3)
  3672.                 {
  3673.                     PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  3674.                     CheckpointReset();
  3675.                     GameTextForPlayer(playerid, "~w~Sad idi do ~n~~r~Sigurne kuce", 5000, 1);
  3676.                     cwx = gCBdropoff[DropOff][0];
  3677.                     cwy = gCBdropoff[DropOff][1];
  3678.                     cwz = gCBdropoff[DropOff][2];
  3679.                     SetAllPlayerCheckpoint(cwx, cwy, cwz, 1.4, 0);
  3680.                     gPlayerCheckpointStatus[playerid] = CHECKPOINT_DROPOFF;
  3681.                     if (gdebug){printf("DEBUG gpcs %d",gPlayerCheckpointStatus[playerid]);}
  3682.                     format(string, sizeof(string), "%s je pokupio CashBox koji sadrzi $%d.", name ,reward);
  3683.                     BroadCast(COLOR_YELLOW, string);
  3684.                     gSuperCop = playerid;
  3685.                     SetPlayerCriminal(playerid,255, "Oruzana pljacka",0,0);
  3686.                     MissionActive = 2;
  3687.                     if (gdebug){print("DEBUG MissionActive = 2;");}
  3688.                 }
  3689.                 else if ((gTeam[playerid]) == 2)
  3690.                 {
  3691.                     PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  3692.                     CheckpointReset();
  3693.                     GameTextForPlayer(playerid, "~w~Vrati CashBox~n~do ~r~Trgovine", 5000, 1);
  3694.                     cwx = rx;//retrieving the store
  3695.                     cwy = ry;
  3696.                     cwz = rz;
  3697.                     SetAllPlayerCheckpoint(cwx, cwy, cwz, 1.4, 0);
  3698.                     gPlayerCheckpointStatus[playerid] = CHECKPOINT_DROPOFF;
  3699.                     format(string, sizeof(string), "Policajac %s je pokupio CashBox koji sadrzi $%d.", name ,reward);
  3700.                     BroadCast(COLOR_YELLOW, string);
  3701.                     gSuperCop = playerid;
  3702.                     MissionActive = 2;
  3703.                     if (gdebug){print("DEBUG MissionActive = 2;");}
  3704.                 }
  3705.             }
  3706.         case CHECKPOINT_DROPOFF:
  3707.             {
  3708.                 if (gdebug){print("DEBUG CHECKPOINT_DROPOFF");}
  3709.                 GetPlayerName(playerid, name, sizeof(name));
  3710.                 GivePlayerMoney(playerid, reward);
  3711.                 preward = reward;
  3712.                 PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  3713.                 if ((gTeam[playerid]) >= 4)
  3714.                 {
  3715.                     format(string, sizeof(string), "~g~POSAO KOMPLETAN~n~~w~Tvoj dio je~n~~g~$%d", reward);
  3716.                     GameTextForPlayer(playerid, string, 5000, 6);
  3717.                     format(string, sizeof(string), "%s Just Cracked The CashBox For $%d.", name,reward);
  3718.                     gSuperCop = INVALID_PLAYER_ID;
  3719.                     SetPlayerCriminal(playerid,255, "Oruzana pljacka",1,1);
  3720.                     gPlayerMission[playerid] = 1;
  3721.                 }
  3722.                 else
  3723.                 {
  3724.                     format(string, sizeof(string), "~b~CASHBOX VRACEN~n~~w~Bonus Paycheck~n~~g~$%d", reward);
  3725.                     GameTextForPlayer(playerid, string, 5000, 6);
  3726.                     format(string, sizeof(string), "%s vratio si CashBox za $%d.", name,reward);
  3727.                     gSuperCop = INVALID_PLAYER_ID;
  3728.                     if(PlayerInfo[playerid][pCB] >= 4)
  3729.                     {
  3730.                         PlayerInfo[playerid][pExp]++;
  3731.                         PlayerInfo[playerid][pCB] = 0;
  3732.                         SendClientMessage(playerid, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
  3733.                     }
  3734.                 }
  3735.                 PlayerPlayMusic(playerid);
  3736.                 BroadCast(COLOR_YELLOW, string);
  3737.                 CheckpointReset();
  3738.                 MissionActive = 4;//srace
  3739.                 if (gdebug){print("DEBUG MissionActive = 4;");}
  3740.             }
  3741.         case CHECKPOINT_CARDROP:
  3742.             {
  3743.                 PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  3744.                 GameTextForPlayer(playerid, "~w~Izadji iz ~n~~y~Auta", 5000, 1);
  3745.                 MissionActive = 11;
  3746.                 if (gdebug){print("DEBUG MissionActive = 11");}
  3747.             }
  3748.         case CHECKPOINT_HOME:
  3749.             {
  3750.                 PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  3751.                 DisablePlayerCheckpoint(playerid);
  3752.                 gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  3753.                 GameTextForPlayer(playerid, "~w~Kod ~n~~y~Kuce si", 5000, 1);
  3754.             }
  3755.         case CHECKPOINT_DM:
  3756.             {
  3757.                 gFightLeader++;
  3758.                 gFighters++;
  3759.                 gPlayerFighter[playerid] = 1;
  3760.                 DisablePlayerCheckpoint(playerid);
  3761.                 gTeam[playerid] = 4;
  3762.                 SetSpawnInfo(playerid, 1, PlayerInfo[playerid][pModel], gRandomDMSpawns[1][0], gRandomDMSpawns[1][1], gRandomDMSpawns[1][2], 1.0, -1, -1, -1, -1, -1, -1);
  3763.                 if(gFighters >= 21)
  3764.                 {
  3765.                     gFighters = 2;
  3766.                 }
  3767.                 else
  3768.                 {
  3769.                     SetPlayerPos(playerid, gRandomDMSpawns[gFighters][0], gRandomDMSpawns[gFighters][1], gRandomDMSpawns[gFighters][2]); // Warp the player
  3770.                 }
  3771.                 if(dmweapon > 0)
  3772.                 {
  3773.                     ResetPlayerWeapons(playerid);
  3774.                     GivePlayerWeapon(playerid, dmweapon, 999);
  3775.                 }
  3776.                 //SetPlayerWorldBounds(playerid,gDMWbounds[0],gDMWbounds[1],gDMWbounds[2],gDMWbounds[3]);
  3777.                 SetPlayerFacingAngle(playerid, 270.0);
  3778.                 SetPlayerInterior(playerid,0);
  3779.                 PlayerInfo[playerid][pInt] = 0;
  3780.                 TogglePlayerControllable(playerid, 0);
  3781.                 gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  3782.                 format(string, sizeof(string), "~r~DeathMatch~n~~w~pricekaj da se jos igraca prikljuci");
  3783.                 GameTextForPlayer(playerid, string, 5000, 3);
  3784.                 if (gFightLeader == 2)
  3785.                 {
  3786.                     SetTimer("DMDelay", racedelay, 0);
  3787.                     format(string, sizeof(string), "SMS | %d sekundi do pocetka DeathMatch-a, Salje: MOLE (555)",racedelay/1000);
  3788.                     RingTone[playerid] = 20;
  3789.                     BroadCast(COLOR_YELLOW, string);
  3790.                 }
  3791.             }
  3792.         default:
  3793.             {
  3794.                 if ((gTeam[playerid]) != 2)
  3795.                 {
  3796.                     PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3797.                     format(string, sizeof(string), "~w~Obrani ~n~Poziciju");
  3798.                     GameTextForPlayer(playerid, string, 5000, 1);
  3799.                     if (gdebug){print("DEBUG crims protect");}
  3800.                 }
  3801.                 if ((gTeam[playerid]) == 2)
  3802.                 {
  3803.                     PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3804.                     format(string, sizeof(string), "~w~Patroliraj podrucjem~n~ i pazi na osumnjicene");
  3805.                     GameTextForPlayer(playerid, string, 5000, 1);
  3806.                     if (gdebug){print("DEBUG cops protect");}
  3807.                 }
  3808.             }
  3809.     }
  3810.     return 1;
  3811. }
  3812.  
  3813. public OnPlayerEnterRaceCheckpoint(playerid)
  3814. {
  3815.     if (gdebug >=1){printf("OnPlayerEnterRaceCheckpoint %d",playerid);}
  3816.     new string[128];
  3817.     new name[MAX_PLAYER_NAME];
  3818.     switch (gPlayerCheckpointStatus[playerid])
  3819.     {
  3820.         case CHECKPOINT_SR1START:
  3821.             {
  3822.                 if (gdebug){print("DEBUG CHECKPOINT_SR1START");}
  3823.                 if (GetPlayerState(playerid) != 2)
  3824.                 {
  3825.                     return 1;
  3826.                 }
  3827.                 PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  3828.                 if (gTeam[playerid] >= 3)
  3829.                 {
  3830.                     new tmpcar = GetPlayerVehicleID(playerid);
  3831.                     if(IsAPlane(tmpcar))
  3832.                     {
  3833.                         GameTextForPlayer(playerid, "~w~Avionima i helikopterima nije dopusteno utrkivati se", 2000, 6);
  3834.                         return 1;
  3835.                     }
  3836.                     if (MissionActive == 5)// first to arrive
  3837.                     {
  3838.                         gRaceLeader++;
  3839.                         if (gdebug){printf("gRaceLeader %d",gRaceLeader);}
  3840.                         if (gRaceLeader == 1)
  3841.                         {
  3842.                             format(string, sizeof(string), "~r~Pricekaj jos nekoga za utrku");
  3843.                             GameTextForPlayer(playerid, string, 2000, 6);
  3844.                             gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRA;
  3845.                             DisablePlayerRaceCheckpoint(playerid);
  3846.                             return 1;
  3847.                         }
  3848.                         else if (gRaceLeader == 2)
  3849.                         {
  3850.                             gRaceLeader = 0;
  3851.                             if (gdebug){printf("gRaceLeader %d",gRaceLeader);}
  3852.                             format(string, sizeof(string), "SMS | %d sekundi do pocetka utrke, Salje: MOLE (555)",racedelay/1000);
  3853.                             RingTone[playerid] = 20;
  3854.                             SendEnemyMessage(COLOR_YELLOW, string);
  3855.                             format(string, sizeof(string), "~r~Pricekaj nekoga za utrku");
  3856.                             gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRA;
  3857.                             GameTextForPlayer(playerid, string, 2000, 6);
  3858.                         }
  3859.                         SetTimer("RaceDelay", racedelay, 0);
  3860.                         DisablePlayerRaceCheckpoint(playerid);
  3861.                         MissionActive = 6;
  3862.                         if (gdebug){print("DEBUG MissionActive = 6");}
  3863.                     }
  3864.                     else if (MissionActive == 6) //late arrivels
  3865.                     {
  3866.                         if (gdebug){print("DEBUG waiting");}
  3867.                         DisablePlayerRaceCheckpoint(playerid);
  3868.                         gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRA;
  3869.                     }
  3870.                 }
  3871.                 else
  3872.                 {
  3873.                     GameTextForPlayer(playerid, "~w~Patroliraj podrucjem~n~ i pazi na osumnjicene", 5000, 1);
  3874.                     gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  3875.                     return 1;
  3876.                 }
  3877.             }
  3878.         case CHECKPOINT_SRA:
  3879.             {
  3880.                 if (gdebug){print("DEBUG CHECKPOINT_SRA");}
  3881.                 if (GetPlayerState(playerid) != 2)
  3882.                 {
  3883.                     return 1;
  3884.                 }
  3885.                 new tmpcar = GetPlayerVehicleID(playerid);
  3886.                 if(IsAPlane(tmpcar))
  3887.                 {
  3888.                     GameTextForPlayer(playerid, "~w~Avionima i helikopterima nije dopusteno utrkivati se", 2000, 6);
  3889.                     return 1;
  3890.                 }
  3891.                 if (StartTime[playerid] == 0)
  3892.                 {
  3893.                     StartTime[playerid] = Gtickcount;
  3894.                     if(gTeam[playerid] == 3)
  3895.                     {
  3896.                         SetPlayerCriminal(playerid,255, "Ulicna utrka",0,0);
  3897.                         //if(FlashTime[playerid] == 0){FlashTime[playerid] = 60;}
  3898.                     }
  3899.                 }
  3900.                 LapCount[playerid]++;
  3901.                 gRaceEnd++;
  3902.                 if(LapCount[playerid] > gLaps)
  3903.                 {
  3904.                     gLaps = LapCount[playerid];
  3905.                     gRaceEnd = 1;
  3906.                 }
  3907.                 if(RaceInfo[rLaps] != 0)
  3908.                 {
  3909.                     if(gLaps != (RaceInfo[rLaps]+1) && gLaps > 1)
  3910.                     {
  3911.                         //RaceDebug(playerid);
  3912.                         if(gLaps == 2)
  3913.                         {
  3914.                             for(new i = 0; i <= MAX_PLAYERS; i++)
  3915.                             {
  3916.                                 if(IsPlayerConnected(i) && gTeam[i] == 2)
  3917.                                 {
  3918.                                     format(cbjstore, sizeof(cbjstore), "SMS | Imam posao za tebe, napisi Yes na 555 za dodatne informacije, Salje: MOLE (555)");
  3919.                                     SendClientMessage(i, COLOR_DBLUE, cbjstore);
  3920.                                     RingTone[i] = 20;
  3921.                                     SetPlayerCheckpoint(i,rm2x,rm2y,rm2z, 8.0);
  3922.                                 }
  3923.                             }
  3924.                             RaceTime[playerid] = Gtickcount;
  3925.                         }
  3926.                         if (gRaceEnd == 1 && LapCount[playerid] == gLaps)
  3927.                         {
  3928.                             pos1time = RaceTime[playerid] - StartTime[playerid];
  3929.                             ConvertTicks(pos1time);
  3930.                             GetPlayerName(playerid, name, sizeof(name));
  3931.                             format(string, sizeof(string), "Vijesti | %s je na prvom mjestu T: %d:%d:%d", name,cmins,csecs,cmils);
  3932.                             BroadCast(COLOR_WHITE, string);
  3933.                             format(string, sizeof(string), "~w~Lap %d/%d~n~~g~1st mjesto ~n~~y~T: %d:%d:%d",gLaps,RaceInfo[rLaps],cmins,csecs,cmils);
  3934.                             SetAllCopCheckpoint(rex,rey,rez, 8.0);
  3935.                         }
  3936.                         else if (gRaceEnd == 2 && LapCount[playerid] == gLaps)
  3937.                         {
  3938.                             pos2time = RaceTime[playerid] - StartTime[playerid];
  3939.                             new splittime = pos2time - pos1time;
  3940.                             ConvertTicks(splittime);
  3941.                             GetPlayerName(playerid, name, sizeof(name));
  3942.                             format(string, sizeof(string), "Vijesti | %s je na drugom mjestu T: +%d:%d:%d", name,cmins,csecs,cmils);
  3943.                             BroadCast(COLOR_WHITE, string);
  3944.                             format(string, sizeof(string), "~w~Lap %d/%d~n~~g~2nd mjesto ~n~~y~T: %d:%d:%d",gLaps,RaceInfo[rLaps],cmins,csecs,cmils);
  3945.                         }
  3946.                         else if (gRaceEnd == 3 && LapCount[playerid] == gLaps)
  3947.                         {
  3948.                             pos3time = RaceTime[playerid] - StartTime[playerid];
  3949.                             new splittime = pos3time - pos1time;
  3950.                             ConvertTicks(splittime);
  3951.                             GetPlayerName(playerid, name, sizeof(name));
  3952.                             format(string, sizeof(string), "Vijesti | %s je na trecem mjestu T: +%d:%d:%d", name,cmins,csecs,cmils);
  3953.                             BroadCast(COLOR_WHITE, string);
  3954.                             format(string, sizeof(string), "~w~Krug %d/%d~n~~g~3rd mesto ~n~~y~T: %d:%d:%d",gLaps,RaceInfo[rLaps],cmins,csecs,cmils);
  3955.                         }
  3956.                         else
  3957.                         {
  3958.                             format(string, sizeof(string), "~w~Krug %d/%d",LapCount[playerid],RaceInfo[rLaps]);
  3959.                         }
  3960.                         GameTextForPlayer(playerid, string, 5000, 1);
  3961.                     }
  3962.                     else if(gLaps == (RaceInfo[rLaps]+1) && gLaps > 1)
  3963.                     {
  3964.                         if (gRaceEnd == 1)
  3965.                         {
  3966.                             DisablePlayerCheckpoint(playerid);
  3967.                             PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  3968.                             if (gdebug){print("DEBUG RACE OVER");}
  3969.                             RewardCalc(playerid,1000,10000);
  3970.                             GetPlayerName(playerid, name, sizeof(name));
  3971.                             GivePlayerMoney(playerid, reward);
  3972.                             preward = reward;
  3973.                             PlayerPlayMusic(playerid);
  3974.                             format(string, sizeof(string), "~g~POBIJEDIO SI~n~~w~tvoja nagrada je ~n~~g~$%d", reward);
  3975.                             GameTextForPlayer(playerid, string, 5000, 6);
  3976.                             BroadCast(COLOR_WHITE, "Vijesti | Utrka ce zavrsiti za 120 sec");
  3977.                             RaceTime[playerid] = Gtickcount;
  3978.                             pos1time = RaceTime[playerid] - StartTime[playerid];
  3979.                             ConvertTicks(pos1time);
  3980.                             GetPlayerName(playerid, name, sizeof(name));
  3981.                             raceendtimer = SetTimer("Kraj utrke", 120000, 0);
  3982.                             if(RaceInfo[rBestms] > pos1time || RaceInfo[rBestms] == 0)
  3983.                             {
  3984.                                 RaceInfo[rBestms] = pos1time;
  3985.                                 strmid(RaceInfo[rBest],name, 0, strlen(name), 255);
  3986.                                 BestTime(CurrentRace);
  3987.                                 format(string, sizeof(string), "Vijesti | %s pobijedio si na ulicnoj utrci i osvojio $%d",name,reward);
  3988.                                 BroadCast(COLOR_WHITE, string);
  3989.                                 format(string, sizeof(string), "Vijesti | %s Je postavio najbolje vrijeme %s T: %d:%d:%d", name,CurrentRace,cmins,csecs,cmils);
  3990.                                 BroadCast(COLOR_WHITE, string);
  3991.                             }
  3992.                             else
  3993.                             {
  3994.                                 format(string, sizeof(string), "Vijesti | %s pobijedio si na ulicnoj utrci i osvijio $%d T: %d:%d:%d", name,reward,cmins,csecs,cmils);
  3995.                                 BroadCast(COLOR_WHITE, string);
  3996.                             }
  3997.                             SetPlayerCriminal(playerid,255, "Ulicna Utrka",1,1);
  3998.                             gPlayerMission[playerid] = 2;
  3999.                             BetWinner(playerid,1);
  4000.                             return 1;
  4001.                         }
  4002.                         else if (gRaceEnd == 2)
  4003.                         {
  4004.                             DisablePlayerCheckpoint(playerid);
  4005.                             PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  4006.                             if (gdebug){print("DEBUG RACE OVER");}
  4007.                             reward = preward/2;
  4008.                             GetPlayerName(playerid, name, sizeof(name));
  4009.                             GivePlayerMoney(playerid, reward);
  4010.                             PlayerPlayMusic(playerid);
  4011.                             format(string, sizeof(string), "~g~2nd mjesto~n~~w~tvoja zarada je ~n~~g~$%d", reward);
  4012.                             GameTextForPlayer(playerid, string, 5000, 6);
  4013.                             RaceTime[playerid] = Gtickcount;
  4014.                             pos3time = RaceTime[playerid] - StartTime[playerid];
  4015.                             new splittime = pos3time - pos1time;
  4016.                             ConvertTicks(splittime);
  4017.                             GetPlayerName(playerid, name, sizeof(name));
  4018.                             format(string, sizeof(string), "Vijesti | %s je dosao drugi na cilj i osvojio $%d T: +%d:%d:%d", name,reward,cmins,csecs,cmils);
  4019.                             BroadCast(COLOR_WHITE, string);
  4020.                             return 1;
  4021.                         }
  4022.                         else if (gRaceEnd == 3)
  4023.                         {
  4024.                             RaceCheckpointReset();
  4025.                             PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  4026.                             if (gdebug){print("DEBUG RACE OVER");}
  4027.                             reward = preward/3;
  4028.                             GetPlayerName(playerid, name, sizeof(name));
  4029.                             GivePlayerMoney(playerid, reward);
  4030.                             PlayerPlayMusic(playerid);
  4031.                             format(string, sizeof(string), "~g~3rd place~n~~w~tvoja zarada je ~n~~g~$%d", reward);
  4032.                             GameTextForPlayer(playerid, string, 5000, 6);
  4033.                             RaceTime[playerid] = Gtickcount;
  4034.                             pos2time = RaceTime[playerid] - StartTime[playerid];
  4035.                             new splittime = pos2time - pos1time;
  4036.                             ConvertTicks(splittime);
  4037.                             GetPlayerName(playerid, name, sizeof(name));
  4038.                             format(string, sizeof(string), "Vijesti | %s je dosao treci na cilj i osvojio $%d T: +%d:%d:%d", name,reward,cmins,csecs,cmils);
  4039.                             BroadCast(COLOR_WHITE, string);
  4040.                             KillTimer(raceendtimer);
  4041.                             RaceEnd();
  4042.                             return 1;
  4043.                         }
  4044.                     }
  4045.                     PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  4046.                     SetPlayerRaceCheckpoint(playerid,0,rmx,rmy,rmz,rm2x,rm2y,rm2z,16);
  4047.                     gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRB;
  4048.                 }
  4049.                 if(RaceInfo[rLaps] == 0 && LapCount[playerid] == 1)
  4050.                 {
  4051.                     PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  4052.                     SetPlayerRaceCheckpoint(playerid,0,rmx,rmy,rmz,rm2x,rm2y,rm2z,16);
  4053.                     gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRB;
  4054.                 }
  4055.             }
  4056.         case CHECKPOINT_SRB:
  4057.             {
  4058.                 if (GetPlayerState(playerid) != 2)
  4059.                 {
  4060.                     return 1;
  4061.                 }
  4062.                 new tmpcar = GetPlayerVehicleID(playerid);
  4063.                 if(IsAPlane(tmpcar))
  4064.                 {
  4065.                     GameTextForPlayer(playerid, "~w~Avionima i helikopterima nije dopusteno utrkivati se", 2000, 6);
  4066.                     return 1;
  4067.                 }
  4068.                 if(gRaceMid != 1 && LapCount[playerid] > gLaps)
  4069.                 {
  4070.                     gRaceMid = 1;
  4071.                 }
  4072.                 if (gdebug){print("DEBUG CHECKPOINT_SRB");}
  4073.                 PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  4074.                 SetPlayerRaceCheckpoint(playerid,0,rm2x,rm2y,rm2z,rex,rey,rez,16);
  4075.                 gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRC;
  4076.                 gRaceMid++;
  4077.                 if (gdebug){printf("gRaceLeader %d",gRaceLeader);}
  4078.             }
  4079.         case CHECKPOINT_SRC:
  4080.             {
  4081.                 if (GetPlayerState(playerid) != 2)
  4082.                 {
  4083.                     return 1;
  4084.                 }
  4085.                 new tmpcar = GetPlayerVehicleID(playerid);
  4086.                 if(IsAPlane(tmpcar))
  4087.                 {
  4088.                     GameTextForPlayer(playerid, "~w~Avionima i helikopterima nije dopusteno utrkivati ses", 2000, 6);
  4089.                     return 1;
  4090.                 }
  4091.                 if(gRaceMid2 != 1 && LapCount[playerid] > gLaps)
  4092.                 {
  4093.                     gRaceMid2 = 1;
  4094.                 }
  4095.                 if (gdebug){print("DEBUG CHECKPOINT_SRB");}
  4096.                 PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  4097.                 SetPlayerRaceCheckpoint(playerid,0,rex,rey,rez,rsx,rsy,rsz,16);
  4098.                 gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRD;
  4099.                 gRaceMid2++;
  4100.                 if (gdebug){printf("gRaceLeader %d",gRaceLeader);}
  4101.             }
  4102.         case CHECKPOINT_SRD:
  4103.             {
  4104.                 if (GetPlayerState(playerid) != 2)
  4105.                 {
  4106.                     return 1;
  4107.                 }
  4108.                 new tmpcar = GetPlayerVehicleID(playerid);
  4109.                 if(IsAPlane(tmpcar))
  4110.                 {
  4111.                     GameTextForPlayer(playerid, "~w~Avionima i helikopterima nije dopusteno utrkivati se", 2000, 6);
  4112.                     return 1;
  4113.                 }
  4114.                 if(gRaceFin != 1 && LapCount[playerid] > gLaps)
  4115.                 {
  4116.                     gRaceFin = 1;
  4117.                 }
  4118.                 if (gdebug){print("DEBUG CHECKPOINT_SRC");}
  4119.                 gRaceFin++;
  4120.                 if(RaceInfo[rLaps] > 0)
  4121.                 {
  4122.                     PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  4123.                     SetPlayerRaceCheckpoint(playerid,1,rsx,rsy,rsz,rsx,rsy,rsz,16);
  4124.                     gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRA;
  4125.                     SetAllCopCheckpoint(rex,rey,rez, 8.0);
  4126.                 }
  4127.                 if(RaceInfo[rLaps] == 0)
  4128.                 {
  4129.                     if (gRaceFin == 1)
  4130.                     {
  4131.                         DisablePlayerRaceCheckpoint(playerid);
  4132.                         PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  4133.                         if (gdebug){print("DEBUG RACE OVER");}
  4134.                         RewardCalc(playerid,1000,10000);
  4135.                         GetPlayerName(playerid, name, sizeof(name));
  4136.                         GivePlayerMoney(playerid, reward);
  4137.                         preward = reward;
  4138.                         PlayerPlayMusic(playerid);
  4139.                         format(string, sizeof(string), "~g~POBIJEDIO SI ~n~~w~tvoja nagrada je ~n~~g~$%d", reward);
  4140.                         GameTextForPlayer(playerid, string, 5000, 6);
  4141.                         BroadCast(COLOR_WHITE, "Vijesti | Event ce zavrsiti za 120 sekundi!");
  4142.                         RaceTime[playerid] = Gtickcount;
  4143.                         pos1time = RaceTime[playerid] - StartTime[playerid];
  4144.                         ConvertTicks(pos1time);
  4145.                         GetPlayerName(playerid, name, sizeof(name));
  4146.                         raceendtimer = SetTimer("RaceEnd", 120000, 0);
  4147.                         if(RaceInfo[rBestms] > pos1time || RaceInfo[rBestms] == 0)
  4148.                         {
  4149.                             RaceInfo[rBestms] = pos1time;
  4150.                             strmid(RaceInfo[rBest],name, 0, strlen(name), 255);
  4151.                             BestTime(CurrentRace);
  4152.                             format(string, sizeof(string), "{99CCDD}-> | Event || FINISH || 1 Mijesto || %s ||",name,reward);
  4153.                             BroadCast(COLOR_WHITE, string);
  4154.                             format(string, sizeof(string), "-> | Event || Srusen Rekord || %s ||", name,CurrentRace,cmins,csecs,cmils);
  4155.                             BroadCast(COLOR_LIGHTRED, string);
  4156.                         }
  4157.                         else
  4158.                         {
  4159.                             format(string, sizeof(string), "Vijesti | %s pobijedio si na ulicnoj utrci i osvijio $%d T: %d:%d:%d", name,reward,cmins,csecs,cmils);
  4160.                             BroadCast(COLOR_WHITE, string);
  4161.                         }
  4162.                         SetPlayerCriminal(playerid,255, "Ulicna utrka",1,1);
  4163.                         gPlayerMission[playerid] = 2;
  4164.                         BetWinner(playerid,1);
  4165.                     }
  4166.                     else if (gRaceFin == 2)
  4167.                     {
  4168.                         DisablePlayerRaceCheckpoint(playerid);
  4169.                         PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  4170.                         if (gdebug){print("DEBUG RACE OVER");}
  4171.                         reward = preward/2;
  4172.                         GetPlayerName(playerid, name, sizeof(name));
  4173.                         GivePlayerMoney(playerid, reward);
  4174.                         PlayerPlayMusic(playerid);
  4175.                         format(string, sizeof(string), "~g~2nd mjesto~n~~w~osvojio si ~n~~g~$%d", reward);
  4176.                         GameTextForPlayer(playerid, string, 5000, 6);
  4177.                         RaceTime[playerid] = Gtickcount;
  4178.                         pos3time = RaceTime[playerid] - StartTime[playerid];
  4179.                         new splittime = pos3time - pos1time;
  4180.                         ConvertTicks(splittime);
  4181.                         GetPlayerName(playerid, name, sizeof(name));
  4182.                         format(string, sizeof(string), "{99CCDD}-> | Event || FINISH || 2 Mijesto || %s ||", name,reward,cmins,csecs,cmils);
  4183.                         BroadCast(COLOR_WHITE, string);
  4184.                     }
  4185.                     else if (gRaceFin == 3)
  4186.                     {
  4187.                         RaceCheckpointReset();
  4188.                         PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  4189.                         if (gdebug){print("DEBUG RACE OVER");}
  4190.                         reward = preward/3;
  4191.                         GetPlayerName(playerid, name, sizeof(name));
  4192.                         GivePlayerMoney(playerid, reward);
  4193.                         PlayerPlayMusic(playerid);
  4194.                         format(string, sizeof(string), "~g~3rd mjesto~n~~w~osvojio si ~n~~g~$%d", reward);
  4195.                         GameTextForPlayer(playerid, string, 5000, 6);
  4196.                         RaceTime[playerid] = Gtickcount;
  4197.                         pos2time = RaceTime[playerid] - StartTime[playerid];
  4198.                         new splittime = pos2time - pos1time;
  4199.                         ConvertTicks(splittime);
  4200.                         GetPlayerName(playerid, name, sizeof(name));
  4201.                         format(string, sizeof(string), "{99CCDD}-> | Event || FINISH || 3 Mijesto || %s ||", name,reward,cmins,csecs,cmils);
  4202.                         BroadCast(COLOR_WHITE, string);
  4203.                         KillTimer(raceendtimer);
  4204.                         RaceEnd();
  4205.                     }
  4206.                 }
  4207.             }
  4208.         }
  4209.     return 1;
  4210. }
  4211.  
  4212. public RaceDebug(playerid)
  4213. {
  4214.     new string[256];
  4215.     format(string, sizeof(string), "gRaceFin(%d) gRaceMid(%d) gRaceMid2(%d) gRaceEnd(%d) gLaps(%d) RaceInfo[rLaps](%d) LapCount[playerid](%d)",gRaceFin,gRaceMid,gRaceMid2,gRaceEnd,gLaps,RaceInfo[rLaps],LapCount[playerid]);
  4216.     BroadCast(COLOR_WHITE, string);
  4217. }
  4218.  
  4219. public RaceEnd()
  4220. {
  4221.     CheckpointReset();
  4222.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4223.     {
  4224.         if(IsPlayerConnected(i))
  4225.         {
  4226.             StartTime[i] = 0;
  4227.             LapCount[i] = 0;
  4228.         }
  4229.     }
  4230.     gRaceFin = 0;
  4231.     gRaceMid = 0;
  4232.     gRaceMid2 = 0;
  4233.     gRaceEnd = 0;
  4234.     gLaps = 0;
  4235.     BroadCast(COLOR_WHITE, "Vijesti | Kraj eventa,hvala sto ste sudjelovali!");
  4236.     MissionActive = 8;
  4237.     if (gdebug){print("DEBUG MissionActive = 8");}
  4238. }
  4239.  
  4240. public RaceDelay()
  4241. {
  4242.     if (gdebug >=1){printf("RaceDelay ");}
  4243.     new string[32];
  4244.     format(string, sizeof(string), "~r~Priprema");
  4245.     new gdelay=1000;
  4246.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4247.     {
  4248.         if(IsPlayerConnected(i))
  4249.         {
  4250.             if ((gPlayerCheckpointStatus[i] == CHECKPOINT_SRA) && gTeam[i] >= 3)
  4251.             {
  4252.                 GameTextForPlayer(i, string, gdelay, 6);
  4253.                 PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  4254.             }
  4255.         }
  4256.     }
  4257.     SetTimer("RaceDelayr", gdelay, 0);
  4258.     return 1;
  4259. }
  4260. public RaceDelayr()
  4261. {
  4262.     if (gdebug >=1){printf("RaceDelayr");}
  4263.     new string[32];
  4264.     format(string, sizeof(string), "~y~Pozor");
  4265.     new hdelay=1000;
  4266.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4267.     {
  4268.         if(IsPlayerConnected(i))
  4269.         {
  4270.             if ((gPlayerCheckpointStatus[i] == CHECKPOINT_SRA) && (gTeam[i] >= 3))
  4271.             {
  4272.                 GameTextForPlayer(i, string, hdelay, 6);
  4273.                 PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  4274.             }
  4275.         }
  4276.     }
  4277.     SetTimer("RaceDelayg", hdelay, 0);
  4278.     return 1;
  4279. }
  4280. public RaceDelayg()
  4281. {
  4282.     if (gdebug >=1){printf("RaceDelayg");}
  4283.     new rdelay=1000;
  4284.     new string[32];
  4285.     format(string, sizeof(string), "~g~Kreni");
  4286.     gLaps = 0;
  4287.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4288.     {
  4289.         if(IsPlayerConnected(i))
  4290.         {
  4291.             if (gTeam[i] >= 3)
  4292.             {
  4293.                 if (gPlayerCheckpointStatus[i] == CHECKPOINT_SRA)
  4294.                 {
  4295.                     GameTextForPlayer(i, string, rdelay, 6);
  4296.                     PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
  4297.                     SetPlayerRaceCheckpoint(i,0,rsx,rsy,rsz,rmx,rmy,rmz,16.0);
  4298.                     gPlayerCheckpointStatus[i] = CHECKPOINT_SRA;
  4299.                 }
  4300.                 else
  4301.                 {
  4302.                     DisablePlayerCheckpoint(i);
  4303.                     gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
  4304.                 }
  4305.             }
  4306.         }
  4307.     }
  4308.     SetAllCopCheckpoint(rm2x,rm2y,rm2z, 8.0);
  4309.     MissionActive = 7;
  4310.     if (gdebug){print("DEBUG MissionActive = 7");}
  4311.     return 1;
  4312. }
  4313.  
  4314. public DMDelay()
  4315. {
  4316.     if (gdebug >=1){printf("DMDelay ");}
  4317.     new string[32];
  4318.     gFightLeader = 1000;
  4319.     format(string, sizeof(string), "~r~Priprema");
  4320.     new gdelay=1000;
  4321.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4322.     {
  4323.         DisablePlayerCheckpoint(i);
  4324.         if(IsPlayerConnected(i))
  4325.         {
  4326.             if (gPlayerFighter[i] == 1)
  4327.             {
  4328.                 GameTextForPlayer(i, string, gdelay, 6);
  4329.                 PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  4330.             }
  4331.         }
  4332.     }
  4333.     SetTimer("DMDelayr", gdelay, 0);
  4334.     return 1;
  4335. }
  4336. public DMDelayr()
  4337. {
  4338.     if (gdebug >=1){printf("DMDelayr");}
  4339.     new string[32];
  4340.     format(string, sizeof(string), "~y~Pozor");
  4341.     new hdelay=1000;
  4342.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4343.     {
  4344.         if(IsPlayerConnected(i))
  4345.         {
  4346.             if (gPlayerFighter[i] == 1)
  4347.             {
  4348.                 GameTextForPlayer(i, string, hdelay, 6);
  4349.                 PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  4350.             }
  4351.         }
  4352.     }
  4353.     SetTimer("DMDelayg", hdelay, 0);
  4354.     return 1;
  4355. }
  4356. public DMDelayg()
  4357. {
  4358.     if (gdebug >=1){printf("DMDelayg");}
  4359.     new rdelay=1000;
  4360.     new string[32];
  4361.     format(string, sizeof(string), "~g~Borba");
  4362.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4363.     {
  4364.         if(IsPlayerConnected(i))
  4365.         {
  4366.             if (gPlayerFighter[i] == 1)
  4367.             {
  4368.                 GameTextForPlayer(i, string, rdelay, 6);
  4369.                 PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
  4370.                 TogglePlayerControllable(i, 1);
  4371.             }
  4372.         }
  4373.     }
  4374.     MissionActive = 13;
  4375.     if (gdebug){print("DEBUG MissionActive = 13");}
  4376.     return 1;
  4377. }
  4378.  
  4379. public DMDetect()
  4380. {
  4381.     if(gFightLeader == 1000)
  4382.     {
  4383.         dmtimer++;
  4384.         PlayerInArena();
  4385.         for(new i = 0; i <= MAX_PLAYERS; i++)
  4386.         {
  4387.             if(IsPlayerConnected(i) == 1 && gPlayerFighter[i] == 1)
  4388.             {
  4389.                 if(dmtime-dmtimer == 60)
  4390.                 {
  4391.                     GameTextForPlayer(i, "~r~Jedna minuta do kraja", 5000, 1);
  4392.                 }
  4393.             }
  4394.         }
  4395.         if(dmtimer == dmtime)
  4396.         {
  4397.             new ename[MAX_PLAYER_NAME];
  4398.             new string[256];
  4399.             for(new i = 0; i <= MAX_PLAYERS; i++)
  4400.             {
  4401.                 if(IsPlayerConnected(i) == 1 && gPlayerFighter[i] == 1 || IsPlayerConnected(i) == 1 && TVMode[i]>11 && TVMode[i]<20)
  4402.                 {
  4403.                     if(TVMode[i]>11 && TVMode[i]<20)
  4404.                     {
  4405.                         TVMode[i] = 0;
  4406.                         Spectate[i] = 300;
  4407.                     }
  4408.                     TogglePlayerControllable(i, 0);
  4409.                     if(IsPlayerConnected(DmHiPlayer) == 1)
  4410.                     {
  4411.                         GetPlayerPos(DmHiPlayer, DmeCam[0], DmeCam[1], DmeCam[2]);
  4412.                         DmeCam[3] = DmeCam[0];
  4413.                         DmeCam[4] = DmeCam[1]+2;
  4414.                         DmeCam[5] = DmeCam[2]+0.2;
  4415.                         DmeCam[2] = DmeCam[2]+0.6;
  4416.                         SetPlayerFacingAngle(DmHiPlayer, 0.0);
  4417.                         RewardCalc(DmHiPlayer,1000,10000);
  4418.                         GetPlayerName(DmHiPlayer, ename, sizeof(ename));
  4419.                         format(string, sizeof(string), "~r~DeathMatch je zavrsio~n~~b~Pomjednik~n~~w~%s~n~ubojstava:%d~n~~g~Nagrada:$%d", ename,DmHiScore, reward);
  4420.                     }
  4421.                     else
  4422.                     {
  4423.                         format(string, sizeof(string), "~r~DeathMatch zavrsio~n~~b~Nema pobjednika :)))");
  4424.                         DmeCam[0] = gRandomDMSpawns[1][0];
  4425.                         DmeCam[1] = gRandomDMSpawns[1][1];
  4426.                         DmeCam[2] = gRandomDMSpawns[1][2];
  4427.                         DmeCam[3] = DmeCam[0];
  4428.                         DmeCam[4] = DmeCam[1];
  4429.                         DmeCam[5] =DmeCam[2]+30;
  4430.                     }
  4431.                     DMEndCam(i,string);
  4432.                 }
  4433.             }
  4434.         }
  4435.         if(dmtimer == dmtime+10)
  4436.         {
  4437.             for(new i = 0; i <= MAX_PLAYERS; i++)
  4438.             {
  4439.                 if(IsPlayerConnected(i) == 1)
  4440.                 {
  4441.                     if(Spectate[i] == 300)
  4442.                     {
  4443.                         Spectate[i] = 253;
  4444.                     }
  4445.                     if(gPlayerFighter[i] == 1)
  4446.                     {
  4447.                         if(PlayerInfo[i][pTeam] != 3)
  4448.                         {
  4449.                             gTeam[i] = PlayerInfo[i][pTeam];
  4450.                             SetPlayerToTeamColor(i);
  4451.                         }
  4452.                         gPlayerFighter[i] = 0;
  4453.                         DmScore[i] = 0;
  4454.                         TogglePlayerControllable(i, 1);
  4455.                         SpawnPlayer(i);
  4456.                         SetPlayerRandomSpawn(i);
  4457.                     }
  4458.                 }
  4459.             }
  4460.         }
  4461.         if(dmtimer == dmtime+11)
  4462.         {
  4463.             if(IsPlayerConnected(DmHiPlayer) == 1)
  4464.             {
  4465.                 new ename[MAX_PLAYER_NAME];
  4466.                 new string[256];
  4467.                 PlayerPlaySound(DmHiPlayer, 1058, 0.0, 0.0, 0.0);
  4468.                 GetPlayerName(DmHiPlayer, ename, sizeof(ename));
  4469.                 GivePlayerMoney(DmHiPlayer, reward);
  4470.                 format(string, sizeof(string), "~g~POSAO ZAVRSEN~n~~w~tvoj dio je~n~~g~$%d", reward);
  4471.                 PlayerPlayMusic(DmHiPlayer);
  4472.                 GameTextForPlayer(DmHiPlayer, string, 5000, 6);
  4473.                 format(string, sizeof(string), "%s Pobijedio na Deathmatch-u s %d ubojstava za $%d", ename,DmHiScore, reward);
  4474.                 BroadCast(COLOR_YELLOW, string);
  4475.                 //SetPlayerPos(DmHiPlayer,gRandomDMSpawns[0][0],gRandomDMSpawns[0][1],gRandomDMSpawns[0][2]);
  4476.                 if(PlayerInfo[DmHiPlayer][pTeam] != 1 && PlayerInfo[DmHiPlayer][pTeam] != 2)
  4477.                 {
  4478.                     SetPlayerCriminal(DmHiPlayer,255, "Masovno ubojstvo",1,1);
  4479.                     gPlayerMission[DmHiPlayer] = 4;
  4480.                 }
  4481.                 else
  4482.                 {
  4483.                     PlayerInfo[DmHiPlayer][pWA] = PlayerInfo[DmHiPlayer][pWA]+5;
  4484.                     if(PlayerInfo[DmHiPlayer][pWA] >= 20)
  4485.                     {
  4486.                         PlayerInfo[DmHiPlayer][pExp]++;
  4487.                         PlayerInfo[DmHiPlayer][pWA] = PlayerInfo[DmHiPlayer][pWA]-20;
  4488.                         SendClientMessage(DmHiPlayer, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
  4489.                     }
  4490.                 }
  4491.                 BetWinner(DmHiPlayer,2);
  4492.             }
  4493.             gFighters = 0;
  4494.             gFightLeader = 0;
  4495.             MissionActive = 0;
  4496.             if (gdebug){print("DEBUG MissionActive = 0");}
  4497.             DmHiScore = 0;
  4498.             DmHiPlayer = 255;
  4499.             dmtimer = 0;
  4500.         }
  4501.     }
  4502. }
  4503.  
  4504. public DMEndCam(playerid,string[])
  4505. {
  4506.     GameTextForPlayer(playerid, string, 5000, 6);
  4507.     SetPlayerCameraPos(playerid,DmeCam[3], DmeCam[4], DmeCam[5]);
  4508.     SetPlayerCameraLookAt(playerid,DmeCam[0], DmeCam[1], DmeCam[2]);
  4509. }
  4510.  
  4511. public DMScoreCalc()
  4512. {
  4513.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4514.     {
  4515.         if(IsPlayerConnected(i) == 1 && gPlayerFighter[i] == 1)
  4516.         {
  4517.             if(gPlayerFighter[i] == 1)
  4518.             {
  4519.                 new tmp1 = DmScore[i];
  4520.                 if(tmp1 > DmHiScore)
  4521.                 {
  4522.                     DmHiScore = tmp1;
  4523.                     DmHiPlayer = i;
  4524.                 }
  4525.             }
  4526.         }
  4527.     }
  4528.     return 1;
  4529. }
  4530.  
  4531.  
  4532. public OnPlayerDropCashBox(playerid)
  4533. {
  4534.     if (gdebug >=1){printf("OnPlayerDropCashBox %d",playerid);}
  4535.     new string[128];
  4536.     new dname[MAX_PLAYER_NAME];
  4537.     GetPlayerName(playerid, dname, sizeof(dname));
  4538.     format(string, sizeof(string), ".: %s ispustio CashBox! :.", dname);
  4539.     BroadCast(COLOR_RED, string);
  4540.     GetPlayerPos(playerid, cwx, cwy, cwz);
  4541.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4542.     {
  4543.         if (IsPlayerConnected(i))
  4544.         {
  4545.                 SetPlayerCheckpoint(i,cwx,cwy,cwz, 1.0);
  4546.                 gPlayerCheckpointStatus[i] = CHECKPOINT_PICKUP;
  4547.         }
  4548.     }
  4549.     MissionActive = 3;
  4550.     if (gdebug){print("DEBUG MissionActive = 3;");}
  4551.     return 1;
  4552. }
  4553.  
  4554. public RewardCalc(playerid,min,max)
  4555. {
  4556.     reward = (min + (random(max-min)) + ((numplayers + PlayerInfo[playerid][pLevel]) *1000)); //minimum 1000 max 10000 + activeplayers x 1000
  4557.     printf("DEBUG RewardCalc = (Random(min=%d)(max=%d))(numplayers=%d)(PlayerInfo[playerid][pLevel]=%d) Total =%d",min,max,numplayers,PlayerInfo[playerid][pLevel],reward);
  4558. }
  4559.  
  4560. public CheckpointReset()
  4561. {
  4562.     if (gdebug >= 1){printf("DEBUG CheckpointReset()");}
  4563.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4564.     {
  4565.         if(IsPlayerConnected(i) == 1)
  4566.         {
  4567.             DisablePlayerCheckpoint(i);
  4568.             gPlayerLapStatus[i] = 0;
  4569.             gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
  4570.         }
  4571.     }
  4572. }
  4573.  
  4574. public RaceCheckpointReset()
  4575. {
  4576.     if (gdebug >= 1){printf("DEBUG CheckpointReset()");}
  4577.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4578.     {
  4579.         if(IsPlayerConnected(i) == 1)
  4580.         {
  4581.             DisablePlayerRaceCheckpoint(i);
  4582.             gPlayerLapStatus[i] = 0;
  4583.             gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
  4584.         }
  4585.     }
  4586. }
  4587.  
  4588. public JobGive(playerid)
  4589. {
  4590.     if (gdebug >= 1){printf("DEBUG JobGive (%d)",playerid);}
  4591.     if(MissionActive == 1)
  4592.     {
  4593.  
  4594.         SendClientMessage(playerid, COLOR_YELLOW, objstore);
  4595.         SetPlayerCheckpoint(playerid,cwx, cwy, cwz, 1.4);
  4596.         gPlayerCheckpointStatus[playerid] = CHECKPOINT_PICKUP;
  4597.         RingTone[playerid] = 20;
  4598.         SendClientMessage(playerid, COLOR_WHITE, "Pomoc: idi do crvenog Markera i ukradi CashBox.");
  4599.         GameTextForPlayer(playerid, "~w~Waypoint postavljen na ~n~~r~CashBox", 5000, 1);
  4600.         return 1;
  4601.     }
  4602.     if(MissionActive == 5)
  4603.     {
  4604.         format(objstore, sizeof(objstore), "SMS | Event pocinje,dodite kod crvenog Markera, Posiljatelj: MOLE (555)");
  4605.         SendClientMessage(playerid, COLOR_YELLOW, objstore);
  4606.         RingTone[playerid] = 20;
  4607.         SetPlayerRaceCheckpoint(playerid,0,rsx,rsy,rsz,rmx,rmy,rmz,16.0);
  4608.         gPlayerCheckpointStatus[playerid] = CHECKPOINT_SR1START;
  4609.         SendClientMessage(playerid, COLOR_WHITE, "Pomoc: Idi do crvenog Markera i cekaj da event pocne.");
  4610.         GameTextForPlayer(playerid, "~w~CP postavljen na ~n~~r~Event", 5000, 1);
  4611.         return 1;
  4612.     }
  4613.     if(MissionActive == 9)
  4614.     {
  4615.         SendClientMessage(playerid, COLOR_YELLOW, objstore);
  4616.         RingTone[playerid] = 20;
  4617.         SetVehicleParamsForPlayer(stealcar,playerid,1,0);
  4618.         SendClientMessage(playerid, COLOR_WHITE, "Pomoc: Idi do zutog markera i ukradi auto.");
  4619.         GameTextForPlayer(playerid, "~w~Waypoint postavljen na ~n~~y~Auto", 5000, 1);
  4620.         return 1;
  4621.     }
  4622.     else
  4623.     {
  4624.         SendClientMessage(playerid, COLOR_YELLOW, "SMS | nemam nista trenutno, Salje: MOLE (555)");
  4625.         RingTone[playerid] = 20;
  4626.     }
  4627.     return 1;
  4628. }
  4629.  
  4630. public SetAllPlayerCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi, num)
  4631. {
  4632.     if (gdebug >= 1){printf("DEBUG SetAllPlayerCheckpoint()");}
  4633.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4634.     {
  4635.         if(IsPlayerConnected(i) == 1)
  4636.         {
  4637.             SetPlayerCheckpoint(i,allx,ally,allz, radi);
  4638.             if (num != 255)
  4639.             {
  4640.                 gPlayerCheckpointStatus[i] = num;
  4641.             }
  4642.         }
  4643.     }
  4644.  
  4645. }
  4646.  
  4647. public SetAllPlayerRaceCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi, num)
  4648. {
  4649.     if (gdebug >= 1){printf("DEBUG SetAllPlayerCheckpoint()");}
  4650.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4651.     {
  4652.         if(IsPlayerConnected(i) == 1)
  4653.         {
  4654.             SetPlayerRaceCheckpoint(i,0,allx,ally,allz,0.0,0.0,0.0,radi);
  4655.             if (num != 255)
  4656.             {
  4657.                 gPlayerCheckpointStatus[i] = num;
  4658.             }
  4659.         }
  4660.     }
  4661.  
  4662. }
  4663.  
  4664. public SetAllCopCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi)
  4665. {
  4666.     if (gdebug >= 1){printf("DEBUG SetAllCopCheckpoint()");}
  4667.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4668.     {
  4669.         if(IsPlayerConnected(i) == 1)
  4670.         {
  4671.             if(gTeam[i] == 2)
  4672.             {
  4673.                 SetPlayerCheckpoint(i,allx,ally,allz, radi);
  4674.             }
  4675.         }
  4676.     }
  4677.     return 1;
  4678. }
  4679.  
  4680. public OnPlayerStateChange(playerid, newstate, oldstate)
  4681. {
  4682.     if (gdebug >=1){printf("OnPlayerStateChange %d %d %d",playerid, newstate, oldstate);}
  4683.     if((newstate == 2 || newstate == 3) && nocarcash)
  4684.     {
  4685.         if (gPlayerCheckpointStatus[playerid] == CHECKPOINT_DROPOFF)
  4686.         {
  4687.             if (gdebug){print("DEBUG test6");}
  4688.             DisablePlayerCheckpoint(playerid);
  4689.             gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  4690.             new check = gPlayerCheckpointStatus[playerid];
  4691.             if (gdebug){printf("DEBUG check %d" ,check);}
  4692.             OnPlayerDropCashBox(playerid);
  4693.         }
  4694.     }
  4695.     if(newstate == PLAYER_STATE_ONFOOT)
  4696.     {
  4697.         TelePos[playerid][0] = 0.0;
  4698.         TelePos[playerid][1] = 0.0;
  4699.         if(gTeam[playerid] >= 4 && LapCount[playerid] > 0)
  4700.         {
  4701.             new count;
  4702.             new string[256];
  4703.             for(new i = 0; i <= MAX_PLAYERS; i++)
  4704.             {
  4705.                 if(IsPlayerConnected(i) && gTeam[i] == 2 && CrimInRange(50.0, playerid,i))
  4706.                 {
  4707.                     count = 1;
  4708.                     format(string, sizeof(string), "~p~Racer ~w~Uhicen~n~Bonus nakanada ~n~~g~$%d", 10000);
  4709.                     GameTextForPlayer(i, string, 5000, 1);
  4710.                     GivePlayerMoney(i, 10000);
  4711.                     PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
  4712.                     PlayerInfo[i][pWA] = PlayerInfo[i][pWA]+2;
  4713.                     if(PlayerInfo[i][pWA] >= 20)
  4714.                     {
  4715.                         PlayerInfo[i][pExp]++;
  4716.                         PlayerInfo[i][pWA] = 0;
  4717.                         SendClientMessage(i, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
  4718.                     }
  4719.                 }
  4720.             }
  4721.             if(count == 1)
  4722.             {
  4723.                 new name [MAX_PLAYER_NAME];
  4724.                 GetPlayerName(playerid, name, sizeof(name));
  4725.                 format(string, sizeof(string), "RACENEWS: %s je uhicen.", name);
  4726.                 BroadCast(COLOR_WHITE, string);
  4727.                 SetPlayerInterior(playerid,0);
  4728.                 LapCount[playerid] = 0;
  4729.                 PlayerInfo[playerid][pInt] = 6;
  4730.                 SetPlayerPos(playerid,264.395200,77.564040,1001.039000);
  4731.                 SendClientMessage(playerid, COLOR_GRAD1,"   Uhicen si, za provjeru kolko ces biti u zatvoru upisi /time.");
  4732.                 PlayJailSound(1153 , 1154, 2000,264.395200, 77.564040, 1001.039000);
  4733.                 JailTime[playerid] = 60;
  4734.             }
  4735.         }
  4736.     }
  4737.     if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
  4738.     {
  4739.         new newcar = GetPlayerVehicleID(playerid);
  4740.         new oldcar = gLastCar[playerid];
  4741.         new housecar = PlayerInfo[playerid][pPhousekey]+1;
  4742.         TelePos[playerid][0] = 0.0;
  4743.         TelePos[playerid][1] = 0.0;
  4744.         if (gdebug >=1){printf("oldcar %d, newcar %d",oldcar,newcar);}
  4745.         if(oldcar != 301)
  4746.         {
  4747.             if((housecar != oldcar && oldcar != 0) && (HireCar[playerid] != oldcar && newcar != housecar))
  4748.             {
  4749.                 if(gLastDriver[oldcar] == playerid && oldcar != newcar)
  4750.                 {
  4751.                     gLastDriver[oldcar] = 300;
  4752.                     gCarLock[oldcar] = 0;
  4753.                     UnLockCar(oldcar);
  4754.                 }
  4755.             }
  4756.         }
  4757.         if(gTeamCarLock[newcar] == 1)
  4758.         {
  4759.             gTeamCarLock[newcar] = 0;
  4760.             UnLockCar(newcar);
  4761.         }
  4762.         gLastCar[playerid] = newcar;
  4763.         if (gdebug >=1){printf("gLastCar[playerid](%d)",gLastCar[playerid]);}
  4764.         gLastDriver[newcar] = playerid;
  4765.         if ((newcar == stealcar) && (MissionActive == 9))
  4766.         {
  4767.             RewardCalc(playerid,1000,10000);
  4768.         }
  4769.         if((newcar == stealcar) && (MissionActive >= 9))
  4770.         {
  4771.             if (gdebug){print("DEBUG TEST3");}
  4772.             if (gTeam[playerid] >= 3 && MissionActive >= 9)
  4773.             {
  4774.                 if (gdebug){print("DEBUG TEST4");}
  4775.                 new name[MAX_PLAYER_NAME];
  4776.                 new string[256];
  4777.                 GetPlayerName(playerid, name, sizeof(name));
  4778.                 GetVehiclePos(stealcardest, cwx, cwy, cwz);
  4779.                 GameTextForPlayer(playerid, "~w~Sad odvezi ~y~Vozilo~n~~w~do ~r~Kupca", 5000, 1);
  4780.                 format(string, sizeof(string), "%s je ukrao Auto u vrijednosti $%d", name,reward);
  4781.                 BroadCast(COLOR_YELLOW, string);
  4782.                 SetAllPlayerCheckpoint(cwx, cwy, cwz, 16.0, 0);
  4783.                 gPlayerCheckpointStatus[playerid] = CHECKPOINT_CARDROP;
  4784.                 MissionActive = 10;
  4785.                 if (gdebug){print("DEBUG MissionActive = 10;");}
  4786.                 if (gTeam[playerid] == 3)
  4787.                 {
  4788.                     SetPlayerCriminal(playerid,255, "Grand Theft Auto",0,0);
  4789.                 }
  4790.                 gSuperCop = playerid;
  4791.                 OpenDoors();
  4792.             }
  4793.             if (gTeam[playerid] == 2 && MissionActive >= 10)
  4794.             {
  4795.                 if (gdebug){print("DEBUG TEST6");}
  4796.                 new name[MAX_PLAYER_NAME];
  4797.                 new string[256];
  4798.                 GetPlayerName(playerid, name, sizeof(name));
  4799.                 cwx = 1539.1;
  4800.                 cwy = -1668.0;
  4801.                 cwz = 5.8;
  4802.                 GameTextForPlayer(playerid, "~w~Vratite ~y~vozilo ~n~~w~do ~r~pocetnog mjesta", 5000, 1);
  4803.                 format(string, sizeof(string), "Policajac %s je zapljenio ukraden auto i dobio $%d", name,reward);
  4804.                 BroadCast(COLOR_YELLOW, string);
  4805.                 SetAllPlayerCheckpoint(cwx, cwy, cwz, 16.0, 0);
  4806.                 gPlayerCheckpointStatus[playerid] = CHECKPOINT_CARDROP;
  4807.                 gSuperCop = playerid;
  4808.                 MissionActive = 10;
  4809.                 if (gdebug){print("DEBUG MissionActive = 10;");}
  4810.             }
  4811.         }
  4812.     }
  4813.     if(newstate == PLAYER_STATE_SPAWNED)
  4814.     {
  4815.         new Float: lwx, Float:lwy, Float:lwz;
  4816.         GetPlayerPos(playerid, lwx, lwy, lwz);
  4817.         if (gdebug >=1){printf("z =%f int =%d",lwz,PlayerInfo[playerid][pInt]);}
  4818.         if((lwz > 530.0 && PlayerInfo[playerid][pInt] == 0) || PlayerToPoint(1000.0, playerid, -1041.9,-1868.4,79.1)) //the highest land point in sa = 526.8
  4819.         {
  4820.             SetPlayerRandomSpawn(playerid);
  4821.             print("overhight or ob");
  4822.         }
  4823.         //SetPlayerInterior(playerid,0);
  4824.         if(dmweapon > 0 && gPlayerFighter[playerid] != 0)
  4825.         {
  4826.             GivePlayerWeapon(playerid, dmweapon, 999);
  4827.             if(PlayerInfo[playerid][pSHealth] < 50.0)
  4828.             {
  4829.                 SetPlayerHealth(playerid, 100.0);
  4830.             }
  4831.             else
  4832.             {
  4833.                 SetPlayerHealth(playerid, 50.0+PlayerInfo[playerid][pSHealth]);
  4834.             }
  4835.         }
  4836.         else
  4837.         {
  4838.             SetPlayerWeapons(playerid);
  4839.             SetPlayerHealth(playerid, 50.0+PlayerInfo[playerid][pSHealth]);
  4840.         }
  4841.         TelePos[playerid][0] = 0.0;
  4842.         TelePos[playerid][1] = 0.0;
  4843.         gPlayerSpawned[playerid] = 1;
  4844.         SafeTime[playerid] = 60;
  4845.         //OnUpdatePlayer(playerid); //spawnsave
  4846.     }
  4847.     return 1;
  4848. }
  4849.  
  4850. public HireCost(carid)//ovdje stavljam enter i rent aute
  4851. {
  4852.     switch (carid)
  4853.     {
  4854.         case 98:
  4855.         {
  4856.             return 1000; //bullit
  4857.         }
  4858.         case 99:
  4859.         {
  4860.             return 1000; //infurnus
  4861.         }
  4862.         case 100:
  4863.         {
  4864.             return 1000; //turismo
  4865.         }
  4866.         case 101:
  4867.         {
  4868.             return 1000;
  4869.         }
  4870.         case 102:
  4871.         {
  4872.             return 1000;
  4873.         }
  4874.         case 103:
  4875.         {
  4876.             return 1000;
  4877.         }
  4878.         case 104:
  4879.         {
  4880.             return 1000;
  4881.         }
  4882.     }
  4883.     return 0;
  4884. }
  4885.  
  4886. public CarCheck()
  4887. {
  4888.     if (gdebug >= 3){printf("DEBUG CarCheck()");}
  4889.     //new foundowner = -1;
  4890.     for(new c = 1; c < 254; c++)
  4891.     {
  4892.  
  4893.         if (gLastDriver[c] == 301)
  4894.         {
  4895.             CarRespawn(c);
  4896.         }
  4897.         if (gLastDriver[c] >= 300)
  4898.         {
  4899.             gLastDriver[c]++;
  4900.         }
  4901.     }
  4902.     return 1;
  4903. }
  4904.  
  4905. public CarInit()
  4906. {
  4907.     if (gdebug >= 3){printf("DEBUG CarCheck()");}
  4908.     for(new c = 1; c < 254; c++)
  4909.     {
  4910.         gLastDriver[c] = 299;
  4911.         gTeamCarLock[c] = 0;
  4912.     }
  4913.     gLastDriver[301]=255;
  4914.     return 1;
  4915. }
  4916.  
  4917. public CarTow(carid)
  4918. {
  4919.     if (gdebug >= 1){printf("DEBUG CarRespawn(%d)",carid);}
  4920.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4921.     {
  4922.         if(IsPlayerConnected(i))
  4923.         {
  4924.             if(IsPlayerInVehicle(i, carid) || HireCar[i] == carid)
  4925.             {
  4926.                 gLastDriver[carid] = 255;
  4927.                 return 0;
  4928.             }
  4929.         }
  4930.     }
  4931.     SetVehiclePos(carid,HouseCarSpawns[carid-1][0], HouseCarSpawns[carid-1][1], HouseCarSpawns[carid-1][2]);
  4932.     SetVehicleZAngle(carid, HouseCarSpawns[carid-1][3]);
  4933.     return 1;
  4934. }
  4935.  
  4936. public CarRespawn(carid)
  4937. {
  4938.     if (gdebug >= 1){printf("DEBUG CarRespawn(%d)",carid);}
  4939.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4940.     {
  4941.         if(IsPlayerConnected(i))
  4942.         {
  4943.             if(IsPlayerInVehicle(i, carid) || HireCar[i] == carid)
  4944.             {
  4945.                 gLastDriver[carid] = 255;
  4946.                 return 0;
  4947.             }
  4948.         }
  4949.     }
  4950.     SetVehicleToRespawn(carid);
  4951.     gLastDriver[carid] = 299;
  4952.     TeamLockReset(carid);
  4953.     return 1;
  4954. }
  4955.  
  4956. public LockCar(carid)
  4957. {
  4958.     if (gdebug >= 1){printf("DEBUG LockCar(%d)",carid);}
  4959.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4960.     {
  4961.         if(IsPlayerConnected(i))
  4962.         {
  4963.             if(stealcar == carid)
  4964.             {
  4965.                 SetVehicleParamsForPlayer(carid,i,1,1);
  4966.             }
  4967.             else
  4968.             {
  4969.                 SetVehicleParamsForPlayer(carid,i,0,1);
  4970.             }
  4971.         }
  4972.     }
  4973. }
  4974.  
  4975. public UnLockCar(carid)
  4976. {
  4977.     if (gdebug >= 1){printf("DEBUG UnLockCar(%d)",carid);}
  4978.     for(new i = 0; i <= MAX_PLAYERS; i++)
  4979.     {
  4980.         if(IsPlayerConnected(i))
  4981.         {
  4982.             if(stealcar == carid)
  4983.             {
  4984.                 SetVehicleParamsForPlayer(carid,i,1,0);
  4985.             }
  4986.             else
  4987.             {
  4988.                 if(!IsAPlane(carid))
  4989.                 {
  4990.                     SetVehicleParamsForPlayer(carid,i,0,0);
  4991.                 }
  4992.             }
  4993.         }
  4994.     }
  4995. }
  4996.  
  4997. public OpenDoors()
  4998. {
  4999.     if (gdebug >= 1){printf("DEBUG OpenDoors()");}
  5000.     for(new i = 0; i <= MAX_PLAYERS; i++)
  5001.     {
  5002.         if(IsPlayerConnected(i))
  5003.         {
  5004.             SetVehicleParamsForPlayer(stealcar,i,1,0);
  5005.         }
  5006.     }
  5007. }
  5008.  
  5009. public TeamCarLockInit()
  5010. {
  5011.     if (gdebug >= 1){printf("DEBUG TeamCarLockInit()");}
  5012.     for(new c = 0; c <= 200; c++)
  5013.     {
  5014.         if ((c >= 23) && (c <= 48))
  5015.         {
  5016.             gTeamCarLock[c] = 2;
  5017.         }
  5018.         if ((c >= 49) && (c <= 51))
  5019.         {
  5020.             gTeamCarLock[c] = 4;
  5021.         }
  5022.         if ((c >= 52) && (c <= 200))
  5023.         {
  5024.             gTeamCarLock[c] = 1;
  5025.         }
  5026.         gCarLock[c] = 0;
  5027.     }
  5028.     return 1;
  5029. }
  5030.  
  5031. public TeamLockReset(carid)
  5032. {
  5033.     if (gdebug >= 3){printf("DEBUG TeamLockReset(carid)",carid);}
  5034.     if (!teamcarlock)
  5035.     {
  5036.         return 0;
  5037.     }
  5038.     if ((carid >= 23) && (carid <= 48))
  5039.     {
  5040.         gTeamCarLock[carid] = 2;
  5041.     }
  5042.     if ((carid >= 49) && (carid <= 51))
  5043.     {
  5044.         gTeamCarLock[carid] = 4;
  5045.     }
  5046.     if ((carid >= 52) && (carid <= 200))
  5047.     {
  5048.         gTeamCarLock[carid] = 1;
  5049.     }
  5050.     gCarLock[carid] = 0;
  5051.     return 1;
  5052. }
  5053.  
  5054. public InitLockDoors(playerid)
  5055. {
  5056.     if (gdebug >= 1){printf("DEBUG1 InitLockDoors(%d)",playerid);}
  5057.     new c;
  5058.     while (c < 254)
  5059.     {
  5060.         c++;
  5061.         if (gCarLock[c] == 1)
  5062.         {
  5063.             if (gdebug >= 1){printf("DEBUG3 InitLockDoors(%d)car(%d)",playerid,c);}
  5064.             SetVehicleParamsForPlayer(c,playerid,0,1);
  5065.         }
  5066.     }
  5067.     if(PLicence[playerid] != 1)
  5068.     {
  5069.         SetVehicleParamsForPlayer(66,playerid,0,1);
  5070.         SetVehicleParamsForPlayer(67,playerid,0,1);
  5071.         SetVehicleParamsForPlayer(68,playerid,0,1);
  5072.         SetVehicleParamsForPlayer(69,playerid,0,1);
  5073.         SetVehicleParamsForPlayer(70,playerid,0,1);
  5074.         SetVehicleParamsForPlayer(71,playerid,0,1);
  5075.     }
  5076.     return 1;
  5077. }
  5078. public TeamLockDoors(playerid)
  5079. {
  5080.     if (gdebug >= 1){printf("DEBUG TeamLockDoors(%d)",playerid);}
  5081.     new c =0;
  5082.     while (c <= 200)
  5083.     {
  5084.         c++;
  5085.         if (gCarLock[c] == 1)
  5086.         {
  5087.             SetVehicleParamsForPlayer(c,playerid,0,1);
  5088.         }
  5089.         if (gTeamCarLock[c] == 1)
  5090.         {
  5091.             if(gTeam[playerid] != 1 && gTeam[playerid] != 3)
  5092.             {
  5093.                 SetVehicleParamsForPlayer(c,playerid,0,1);
  5094.             }
  5095.             else
  5096.             {
  5097.                 SetVehicleParamsForPlayer(c,playerid,0,0);
  5098.             }
  5099.         }
  5100.         if (gTeamCarLock[c] == 2)
  5101.         {
  5102.             if(gTeam[playerid] != 2)
  5103.             {
  5104.                 SetVehicleParamsForPlayer(c,playerid,0,1);
  5105.             }
  5106.             else
  5107.             {
  5108.                 SetVehicleParamsForPlayer(c,playerid,0,0);
  5109.             }
  5110.         }
  5111.         if (gTeamCarLock[c] == 4)
  5112.         {
  5113.             if(gTeam[playerid] != 4)
  5114.             {
  5115.                 SetVehicleParamsForPlayer(c,playerid,0,1);
  5116.             }
  5117.             else
  5118.             {
  5119.                 SetVehicleParamsForPlayer(c,playerid,0,0);
  5120.             }
  5121.         }
  5122.         if (gTeamCarLock[c] == 0)
  5123.         {
  5124.                 SetVehicleParamsForPlayer(c,playerid,0,0);
  5125.         }
  5126.     }
  5127.     return 1;
  5128. }
  5129.  
  5130. public DebugPrint(string[],value1,value2,type)
  5131. {
  5132.     new formated[256];
  5133.     if (gdebug >= 2 && type == 1)
  5134.     {
  5135.         format(formated, sizeof(formated), "Debug:(%d) %s: %d",value1,string,value2);
  5136.         printf("%s",formated);
  5137.         SendClientMessageToAll(COLOR_WHITE, formated);
  5138.     }
  5139.     return 1;
  5140. }
  5141.  
  5142.  
  5143. public OnPlayerExitVehicle(playerid, vehicleid)
  5144. {
  5145.     if (gdebug >= 1){printf("DEBUG OnPlayerExitVehicle(%d, %d)", playerid, vehicleid);}
  5146.     if (GetPlayerState(playerid) == 1)
  5147.     {
  5148.         return 1;
  5149.     }
  5150.     new string[256];
  5151.     new ename[MAX_PLAYER_NAME];
  5152.     if (vehicleid == stealcar && (MissionActive == 10 || MissionActive == 101))
  5153.     {
  5154.         GameTextForPlayer(playerid, "~w~Get back in the ~n~~r~Car", 5000, 1);
  5155.         for(new i = 0; i <= MAX_PLAYERS; i++)
  5156.         {
  5157.             if(IsPlayerConnected(i))
  5158.             {
  5159.                 SetVehicleParamsForPlayer(stealcar,i,1,0);
  5160.             }
  5161.         }
  5162.         if (playerid == gSuperCop)
  5163.         {
  5164.             gSuperCop = 255;
  5165.         }
  5166.         CheckpointReset();
  5167.         MissionActive = 101;
  5168.         if (gdebug){print("DEBUG MissionActive = 101");}
  5169.     }
  5170.     else if (gTeam[playerid] >= 4 && vehicleid == stealcar && MissionActive == 11 && gSuperCop == playerid)
  5171.     {
  5172.         if (gdebug){print("DEBUG CHECKPOINT_CARDROP");}
  5173.         PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  5174.         GetPlayerName(playerid, ename, sizeof(ename));
  5175.         GivePlayerMoney(playerid, reward);
  5176.         preward = reward;
  5177.         format(string, sizeof(string), "~g~AUTO Dostavljen~n~~w~Evo isplate: ~n~~g~$%d", reward);
  5178.         PlayerPlayMusic(playerid);
  5179.         GameTextForPlayer(playerid, string, 5000, 6);
  5180.         format(string, sizeof(string), "%s prodao si auto za $%d.", ename,reward);
  5181.         BroadCast(COLOR_YELLOW, string);
  5182.         for(new i = 0; i <= MAX_PLAYERS; i++)
  5183.         {
  5184.             if(IsPlayerConnected(i))
  5185.             {
  5186.                 SetVehicleParamsForPlayer(stealcar,i,0,0);
  5187.             }
  5188.         }
  5189.         if (playerid != gPublicEnemy)
  5190.         {
  5191.             gPlayerMission[playerid] = 3;
  5192.             SetPlayerCriminal(playerid,255, "Grand Theft Auto",1,1);
  5193.         }
  5194.         CheckpointReset();
  5195.         SetVehicleToRespawn(stealcar);
  5196.         stealcar = -1;
  5197.         MissionActive = 12;
  5198.         if (gdebug){print("DEBUG MissionActive = 12");}
  5199.     }
  5200.     else if (gTeam[playerid] == 2 && vehicleid == stealcar && MissionActive == 11 && gSuperCop == playerid)
  5201.     {
  5202.         if (gdebug){print("DEBUG CHECKPOINT_CARDROP");}
  5203.         PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  5204.         GetPlayerName(playerid, ename, sizeof(ename));
  5205.         GivePlayerMoney(playerid, reward);
  5206.         PlayerInfo[playerid][pHW]++;
  5207.         if(PlayerInfo[playerid][pHW] >= 3)
  5208.         {
  5209.             PlayerInfo[playerid][pExp]++;
  5210.             PlayerInfo[playerid][pHW] = 0;
  5211.             SendClientMessage(playerid, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
  5212.         }
  5213.         format(string, sizeof(string), "~g~AUTO Vracen~n~~w~Bonus nagrada: ~n~~g~$%d", reward);
  5214.         PlayerPlayMusic(playerid);
  5215.         GameTextForPlayer(playerid, string, 5000, 6);
  5216.         format(string, sizeof(string), "Policajac %s je vratio auto za $%d.", ename,reward);
  5217.         BroadCast(COLOR_YELLOW, string);
  5218.         for(new i = 0; i <= MAX_PLAYERS; i++)
  5219.         {
  5220.             if(IsPlayerConnected(i))
  5221.             {
  5222.                 SetVehicleParamsForPlayer(stealcar,i,0,0);
  5223.             }
  5224.         }
  5225.         CheckpointReset();
  5226.         SetVehicleToRespawn(stealcar);
  5227.         stealcar = -1;
  5228.         MissionActive = 12;
  5229.         if (gdebug){print("DEBUG MissionActive = 12");}
  5230.     }
  5231.     return 1;
  5232. }
  5233. public OnPlayerRequestClass(playerid, classid)
  5234. {
  5235.     new string[128];
  5236.     PlayerInfo[playerid][pModel] = Peds[classid][0];
  5237.     if(classid >= 1)
  5238.     {
  5239.         format(string, sizeof(string), "~r~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~CroHerze DM");
  5240.         GameTextForPlayer(playerid,string,3500,6);
  5241.     }
  5242.     SetPlayerTeamFromClass(playerid,classid);
  5243.     SetupPlayerForClassSelection(playerid);
  5244.     SetPlayerToTeamColor(playerid);
  5245.     return 1;
  5246. }
  5247. public SetupPlayerForClassSelection(playerid)
  5248. {
  5249.     switch (gTeam[playerid])
  5250.     {
  5251.         case TEAM_BLUE:
  5252.         {
  5253.             SetPlayerInterior(playerid,0);//------------ono gdje se gleda lik on playerselection
  5254.             SetPlayerPos(playerid,1668.9531,-1622.3275,79.1353);
  5255.             SetPlayerFacingAngle(playerid, 320.0);
  5256.             SetPlayerCameraPos(playerid,1668.9531+1.5,-1622.3275+1.5,79.1353+0.5);
  5257.             SetPlayerCameraLookAt(playerid,1668.9531,-1622.3275,79.1353+0.5);
  5258.         }
  5259.         case TEAM_CYAN:
  5260.         {
  5261.             SetPlayerInterior(playerid,0);//------------ono gdje se gleda lik on playerselection
  5262.             SetPlayerPos(playerid,1668.9531,-1622.3275,79.1353);
  5263.             SetPlayerFacingAngle(playerid, 320.0);
  5264.             SetPlayerCameraPos(playerid,1668.9531+1.5,-1622.3275+1.5,79.1353+0.5);
  5265.             SetPlayerCameraLookAt(playerid,1668.9531,-1622.3275,79.1353+0.5);
  5266.         }
  5267.         case TEAM_GREEN:
  5268.         {
  5269.             SetPlayerInterior(playerid,0);//------------ono gdje se gleda lik on playerselection
  5270.             SetPlayerPos(playerid,1668.9531,-1622.3275,79.1353);
  5271.             SetPlayerFacingAngle(playerid, 320.0);
  5272.             SetPlayerCameraPos(playerid,1668.9531+1.5,-1622.3275+1.5,79.1353+0.5);
  5273.             SetPlayerCameraLookAt(playerid,1668.9531,-1622.3275,79.1353+0.5);
  5274.         }
  5275.         default:
  5276.         {
  5277.             SetPlayerInterior(playerid,0);//------------ono gdje se gleda lik on playerselection
  5278.             SetPlayerPos(playerid,1668.9531,-1622.3275,79.1353);
  5279.             SetPlayerFacingAngle(playerid, 320.0);
  5280.             SetPlayerCameraPos(playerid,1668.9531+1.5,-1622.3275+1.5,79.1353+0.5);
  5281.             SetPlayerCameraLookAt(playerid,1668.9531,-1622.3275,79.1353+0.5);
  5282.         }
  5283.     }
  5284. }
  5285. //---------------------------------------------------------
  5286.  
  5287. public SetPlayerTeamFromClass(playerid,classid)
  5288. {
  5289.     if (gdebug >= 2){printf("DEBUG SetPlayerTeamFromClass(%d, %d)", playerid, classid);}
  5290.     if(classid >= 260)
  5291.     {
  5292.         gTeam[playerid] = TEAM_GREEN;
  5293.         PlayerInfo[playerid][pTeam] = 3;
  5294.     }
  5295. }
  5296.  
  5297. //---------------------------------------------------------
  5298.  
  5299. public SetPlayerCriminal(playerid,declare,reason[],pe,flash)
  5300. {
  5301.     if (gdebug >= 1){printf("DEBUG SetPlayerCriminal(%d, %d ,%s ,%d ,%d)", playerid,declare,reason,pe,flash);}
  5302.     new turned[MAX_PLAYER_NAME];
  5303.     new turner[MAX_PLAYER_NAME];
  5304.     new turnmes[128];
  5305.     //new tmpstring[32];
  5306.     //format(tmpstring, sizeof(tmpstring), reason);
  5307.     strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
  5308.     GetPlayerName(playerid, turned, sizeof(turned));
  5309.     if (declare == 255)
  5310.     {
  5311.         //print("DEBUG: 4");
  5312.         format(turner, sizeof(turner), "Unknown");
  5313.         strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
  5314.     }
  5315.     else
  5316.     {
  5317.         //print("DEBUG: 5");
  5318.         GetPlayerName(declare, turner, sizeof(turner));
  5319.         strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
  5320.         strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);
  5321.         strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);
  5322.     }
  5323.     if (pe == 1)
  5324.     {
  5325.         if (gPublicEnemy != INVALID_PLAYER_ID && gPublicEnemy != playerid)
  5326.         {
  5327.             OffTheHook();
  5328.             KillTimer(offhook);
  5329.         }
  5330.         gPublicEnemy = playerid;
  5331.         format(turnmes, sizeof(turnmes), "SMS | %s, ti si Public Enemy No.1 za %s. Izbjegni smrt %d Minuta, Salje: MOLE (555)",turned,reason,petime/60000);
  5332.         RingTone[playerid] = 20;
  5333.         SendClientMessage(playerid, COLOR_YELLOW, turnmes);
  5334.         format(cbjstore, sizeof(cbjstore), "Centrala: Sve jedinice u potragu za Public Enemy-om %s",turned);
  5335.         SendTeamBeepMessage(2, COLOR_DBLUE, cbjstore);
  5336.         format(turnmes, sizeof(turnmes), "Centrala: Wanted In Connection With %s, You have %d Minuites.",reason,petime/60000);
  5337.         format(objstore, sizeof(objstore), "SMS | Ubij tog luzera %s, i uzmi mu novac, Salje: MOLE (555)",turned);
  5338.         SendTeamMessage(2, COLOR_DBLUE, turnmes);
  5339.         for(new i = 0; i <= MAX_PLAYERS; i++)
  5340.         {
  5341.             if(IsPlayerConnected(i) && gPublicEnemy != i && gTeam[i] >= 3)
  5342.             {
  5343.                 SendClientMessage(i, COLOR_YELLOW, objstore);
  5344.                 RingTone[i] = 20;
  5345.             }
  5346.         }
  5347.         SendTeamMessage(2, COLOR_WHITE, "Pomoc: Lovi i eliminiraj trepcucu ikonu na ekranu.");
  5348.         offhook = SetTimer("OffTheHook", petime, 0);
  5349.  
  5350.     }
  5351.     else
  5352.     {
  5353.         if ((gTeam[playerid]) == 1)//med kill criminal
  5354.         {
  5355.             format(turnmes, sizeof(turnmes), "UPOZORENJE | %s, Policajci te love %s, Prijavio: %s",turned,reason,turner);
  5356.         }
  5357.         else
  5358.         {
  5359.             format(turnmes, sizeof(turnmes), "UPOZORENJE | %s, Policajci te love zbog %s, Prijavio: %s",turned,reason,turner);
  5360.         }
  5361.         gTeam[playerid] = 4;//lawbreaker
  5362.         if (flash)
  5363.         {
  5364.             FlashTime[playerid] = 10;
  5365.         }
  5366.         else
  5367.         {
  5368.             SetPlayerToTeamColor(playerid);
  5369.         }
  5370.         if (PlayerInfo[playerid][pAdmin] >= 1339)
  5371.         SendClientMessage(playerid, COLOR_RED, turnmes);
  5372.         SetPlayerToTeamColor(playerid);
  5373.     }
  5374.     print("DEBUG: 5");
  5375.     for(new i = 0; i <= MAX_PLAYERS; i++)
  5376.     {
  5377.         if(IsPlayerConnected(i) && (gTeam[i]) == 2 && gPublicEnemy != playerid)
  5378.         {
  5379.             format(cbjstore, sizeof(turnmes), "Centrala: All Units APB: Reporter: %s",turner);
  5380.             SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
  5381.             format(cbjstore, sizeof(turnmes), "Centrala: Zlocin: %s, Osumnjicen: %s",reason,turned);
  5382.             SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
  5383.         }
  5384.     }
  5385. }
  5386. //---------------------------------------------------------
  5387.  
  5388. public SetPlayerFree(playerid,declare,reason[],pe,flash)
  5389. {
  5390.     if (gdebug >= 1){printf("DEBUG SetPlayerFree(%d, %d ,%d ,%d)", playerid,declare,pe,flash);}
  5391.     ClearCrime(playerid);
  5392.     new turned[MAX_PLAYER_NAME];
  5393.     new turner[MAX_PLAYER_NAME];
  5394.     new turnmes[128];
  5395.     new crbjstore[128];
  5396.     if (declare == 255)
  5397.     {
  5398.         format(turner, sizeof(turner), "911");
  5399.     }
  5400.     else
  5401.     {
  5402.         GetPlayerName(declare, turner, sizeof(turner));
  5403.     }
  5404.     GetPlayerName(playerid, turned, sizeof(turned));
  5405.     if (PlayerInfo[playerid][pTeam] == 1)
  5406.     {
  5407.         gTeam[playerid] = 1;
  5408.     }
  5409.     else
  5410.     {
  5411.         gTeam[playerid] = 3;
  5412.     }
  5413.     if (flash)
  5414.     {
  5415.         FlashTime[playerid] = 10;
  5416.     }
  5417.     else
  5418.     {
  5419.         SetPlayerToTeamColor(playerid);
  5420.     }
  5421.     format(turnmes, sizeof(turnmes), "SMS | %s, zbog %s, nisi vise kriminalac, Salje: MOLE (555)",turned,reason);
  5422.     RingTone[playerid] = 20;
  5423.     SendClientMessage(playerid, COLOR_YELLOW, turnmes);
  5424.     SetPlayerToTeamColor(playerid);
  5425.     for(new i = 0; i <= MAX_PLAYERS; i++)
  5426.     {
  5427.         if(IsPlayerConnected(i) && (gTeam[i]) == 2)
  5428.         {
  5429.             format(crbjstore, sizeof(crbjstore), "Centrala: Policajac %s je komplretirao zadatak",turner);
  5430.             SendClientMessage(i, COLOR_DBLUE, crbjstore);
  5431.             format(crbjstore, sizeof(crbjstore), "Centrala: %s Je procesuiran, %s",turned,reason);
  5432.             SendClientMessage(i, COLOR_DBLUE, crbjstore);
  5433.         }
  5434.     }
  5435. }
  5436. public OffTheHook()
  5437. {
  5438.     if (gdebug >= 1){printf("DEBUG OffTheHook()");}
  5439.     new hookoff[128];
  5440.     new offhookn[MAX_PLAYER_NAME];
  5441.     new mission = gPlayerMission[gPublicEnemy];
  5442.     if(mission == 4)
  5443.     {
  5444.         mission = random(3)+1;
  5445.     }
  5446.     switch (mission)
  5447.     {
  5448.         case 1:
  5449.         {
  5450.             PlayerInfo[gPublicEnemy][pCB]++;
  5451.             if(PlayerInfo[gPublicEnemy][pCB] >= 4)
  5452.             {
  5453.                 PlayerInfo[gPublicEnemy][pExp]++;
  5454.                 PlayerInfo[gPublicEnemy][pCB] = 0;
  5455.                 SendClientMessage(gPublicEnemy, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
  5456.             }
  5457.         }
  5458.         case 2:
  5459.         {
  5460.             PlayerInfo[gPublicEnemy][pSR]++;
  5461.             if(PlayerInfo[gPublicEnemy][pSR] >= 4)
  5462.             {
  5463.                 PlayerInfo[gPublicEnemy][pExp]++;
  5464.                 PlayerInfo[gPublicEnemy][pSR] = 0;
  5465.                 SendClientMessage(gPublicEnemy, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
  5466.             }
  5467.         }
  5468.         case 3:
  5469.         {
  5470.             PlayerInfo[gPublicEnemy][pHW]++;
  5471.             if(PlayerInfo[gPublicEnemy][pHW] >= 4)
  5472.             {
  5473.                 PlayerInfo[gPublicEnemy][pExp]++;
  5474.                 PlayerInfo[gPublicEnemy][pHW] = 0;
  5475.                 SendClientMessage(gPublicEnemy, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
  5476.             }
  5477.         }
  5478.         default:
  5479.         {
  5480.         }
  5481.     }
  5482.     SetPlayerToTeamColor(gPublicEnemy);
  5483.     GetPlayerName(gPublicEnemy, offhookn, sizeof(offhookn));
  5484.     format(hookoff, sizeof(hookoff), "<FLASH VIJESTI>: %s je pobjegao policiji i vese nije Public Enemy No.1",offhookn);
  5485.     RingTone[gPublicEnemy] = 20;
  5486.     SetPlayerToTeamColor(gPublicEnemy);
  5487.     SendClientMessageToAll(COLOR_PURPLE, hookoff);
  5488.     gPublicEnemy = INVALID_PLAYER_ID;
  5489.     return 1;
  5490. }
  5491.  
  5492. public CellPhoneTimer()
  5493. {
  5494.     if (gdebug >= 3){printf("DEBUG CellPhoneTimer()");}
  5495.     new string[64];
  5496.     for(new i = 0; i <= MAX_PLAYERS; i++)
  5497.     {
  5498.         if(IsPlayerConnected(i))
  5499.         {
  5500.             if(CellTime[i] > 0)
  5501.             {
  5502.                 if (CellTime[i] == cchargetime)
  5503.                 {
  5504.                     CellTime[i] = 1;
  5505.                     if(Mobile[Mobile[i]] == i)
  5506.                     {
  5507.                         CallCost[i] = CallCost[i]+callcost;
  5508.                     }
  5509.                 }
  5510.                 //printf("CellTime %d %d",i,CellTime[i]);
  5511.                 CellTime[i] = CellTime[i] +1;
  5512.                 //printf("callers line %d called %d caller %d",Mobile[Mobile[i]],Mobile[i],i);
  5513.                 if (Mobile[Mobile[i]] == 255 && CellTime[i] == 5)
  5514.                 {
  5515.                     new called[MAX_PLAYER_NAME];
  5516.                     GetPlayerName(Mobile[i], called, sizeof(called));
  5517.                     format(string, sizeof(string), "* %s's phone rings.", called);
  5518.                     RingTone[Mobile[i]] = 10;
  5519.                     ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  5520.                 }
  5521.             }
  5522.             if(CellTime[i] == 0 && CallCost[i] > 0)
  5523.             {
  5524.                 format(string, sizeof(string), "~w~Poziv kosta ~n~~r~$%d",CallCost[i]);
  5525.                 GivePlayerMoney(i, -CallCost[i]);
  5526.                 BizzInfo[10][bTakings] += CallCost[i];
  5527.                 GameTextForPlayer(i, string, 5000, 1);
  5528.                 CallCost[i] = 0;
  5529.             }
  5530.  
  5531.         }
  5532.     }
  5533. }
  5534.  
  5535. public SetPlayerFlash()
  5536. {
  5537. //if (gdebug >= 2){printf("DEBUG SetPlayerFlash()");}
  5538.     for(new i = 0; i <= MAX_PLAYERS; i++)
  5539.     {
  5540.         if (gPublicEnemy == i || gSuperCop == i)
  5541.         {
  5542.             FlashTime[i] = 3;
  5543.         }
  5544.         if(IsPlayerConnected(i) == 1 && FlashTime[i] > 0)
  5545.         {
  5546.             //printf("flashtime %d %d",i,FlashTime[i]);
  5547.             FlashTime[i]--;
  5548.             SetPlayerToTeamColorFlash(i);
  5549.         }
  5550.     }
  5551.     SetTimer("SetPlayerFlashRev", 1000, 0);
  5552.     return 1;
  5553. }
  5554.  
  5555. public SetPlayerFlashRev()
  5556. {
  5557. //if (gdebug >= 2){printf("DEBUG SetPlayerFlashRev()");}
  5558.     for(new i = 0; i <= MAX_PLAYERS; i++)
  5559.     {
  5560.         if(IsPlayerConnected(i) == 1 && FlashTime[i] > 1)
  5561.         {
  5562.             FlashTime[i]--;
  5563.             //printf("flashtime %d %d",i,FlashTime[i]);
  5564.             SetPlayerColor(i,COLOR_INVIS); // invisibil
  5565.         }
  5566.     }
  5567.     SetTimer("SetPlayerFlash", 1000, 0);
  5568.     return 1;
  5569. }
  5570.  
  5571.  
  5572. public RingToner()
  5573. {
  5574. //if (gdebug >= 2){printf("DEBUG RingToner()");}
  5575.     for(new i = 0; i <= MAX_PLAYERS; i++)
  5576.     {
  5577.         if(IsPlayerConnected(i) == 1 && RingTone[i] != 6 && RingTone[i] != 0 && RingTone[i] < 11)
  5578.         {
  5579.             //printf("RingTone %d %d",i,RingTone[i]);
  5580.             RingTone[i] = RingTone[i] -1;
  5581.             PlayerPlaySound(i, 1138, 0.0, 0.0, 0.0);
  5582.         }
  5583.         if(IsPlayerConnected(i) == 1 && RingTone[i] == 6)
  5584.         {
  5585.             RingTone[i] = RingTone[i] -1;
  5586.         }
  5587.         if(IsPlayerConnected(i) == 1 && RingTone[i] == 20)
  5588.         {
  5589.             //printf("RingTone %d %d",i,RingTone[i]);
  5590.             RingTone[i] = RingTone[i] -1;
  5591.             PlayerPlaySound(i, 1139, 0.0, 0.0, 0.0);
  5592.         }
  5593.     }
  5594.     //RingTonerRev();
  5595.     SetTimer("RingTonerRev", 200, 0);
  5596.     return 1;
  5597. }
  5598. public SendRadioMessage(member, color, string[])
  5599. {
  5600.     for(new i = 0; i < MAX_PLAYERS; i++)
  5601.     {
  5602.         if(IsPlayerConnected(i))
  5603.         {
  5604.             if(PlayerInfo[i][pMember] == member || PlayerInfo[i][pLeader] == member)
  5605.             {
  5606.                 SendClientMessage(i, color, string);
  5607.             }
  5608.            
  5609.         }
  5610.        
  5611.     }
  5612. }
  5613. public RingTonerRev()
  5614. {
  5615. //if (gdebug >= 2){printf("DEBUG SetPlayerFlashRev()");}
  5616.     for(new i = 0; i <= MAX_PLAYERS; i++)
  5617.     {
  5618.         if(IsPlayerConnected(i) == 1  && RingTone[i] != 5 && RingTone[i] != 0 && RingTone[i] < 10)
  5619.         {
  5620.             RingTone[i] = RingTone[i] -1;
  5621.             PlayerPlaySound(i, 1137, 0.0, 0.0, 0.0);
  5622.         }
  5623.         if(IsPlayerConnected(i) == 1 && RingTone[i] == 5)
  5624.         {
  5625.             RingTone[i] = RingTone[i] -1;
  5626.         }
  5627.         if(IsPlayerConnected(i) == 1 && RingTone[i] == 19)
  5628.         {
  5629.             //printf("RingTone %d %d",i,RingTone[i]);
  5630.             PlayerPlaySound(i, 1139, 0.0, 0.0, 0.0);
  5631.             RingTone[i] = 0;
  5632.         }
  5633.     }
  5634.     SetTimer("RingToner", 500, 0);
  5635.     return 1;
  5636. }
  5637.  
  5638. public SetPlayerUnjail()
  5639. {
  5640.     if (gdebug >= 3){printf("DEBUG SetPlayerUnjail()");}
  5641.     for(new i = 0; i <= MAX_PLAYERS; i++)
  5642.     {
  5643.         if(IsPlayerConnected(i) == 1 && JailTime[i] < 0)
  5644.         {
  5645.             JailTime[i]++;
  5646.             //printf("JailTime %d %d",i,JailTime[i]);
  5647.         }
  5648.         if(IsPlayerConnected(i) == 1 && JailTime[i] > 0)
  5649.         {
  5650.             JailTime[i]--;
  5651.             //printf("JailTime %d %d",i,JailTime[i]);
  5652.         }
  5653.         if(IsPlayerConnected(i) == 1 && JailTime[i] == 10)
  5654.         {
  5655.             new string[128];
  5656.             //printf("JailTime %d %d",i,JailTime[i]);
  5657.             FlashTime[i] = 0;
  5658.             SetPlayerPos(i,268.3,77.4,1001.0);
  5659.             SendClientMessage(i, COLOR_GRAD1,"  Platio si svoj dug drustvu.");
  5660.             format(string, sizeof(string), "~g~Sloboda~n~~w~Pokusaj biti bolji gradjanin");
  5661.             GameTextForPlayer(i, string, 5000, 1);
  5662.             PlayJailSound(1165 , 1166, 1000,264.395200, 77.564040, 1001.039000);
  5663.         }
  5664.     }
  5665. }
  5666.  
  5667. public VoteKickTimer()
  5668. {
  5669.     if (gdebug >= 3){printf("DEBUG VoteKickTimer()");}
  5670.     for(new i = 0; i <= MAX_PLAYERS; i++)
  5671.     {
  5672.         if(IsPlayerConnected(i) == 1 && VoteKick[i] > 0)
  5673.         {
  5674.             VoteKick[i]++;
  5675.             //printf("VoteKick %d VoteKick[%d] KickVote[%d]",i,VoteKick[i],KickVote[i]);
  5676.             if(IsPlayerConnected(i) == 1 && VoteKick[i] == 20)
  5677.             {
  5678.                 if(KickVote[i] >= numplayers/4)
  5679.                 {
  5680.                     new string[128];
  5681.                     new accused[MAX_PLAYER_NAME];
  5682.                     GetPlayerName(i, accused, sizeof(accused));
  5683.                     format(string, sizeof(string), "Glasanje usplesno: %s je dobio dovoljno glasova za kick",accused);
  5684.                     BroadCast(COLOR_RED,string);
  5685.                     ClearVote(i);
  5686.                     Kick(i);
  5687.                 }
  5688.                 else
  5689.                 {
  5690.                     new string[128];
  5691.                     new accused[MAX_PLAYER_NAME];
  5692.                     GetPlayerName(i, accused, sizeof(accused));
  5693.                     format(string, sizeof(string), "Glasanje neuspjesno: %s nece bit kickan",accused);
  5694.                     BroadCast(COLOR_RED,string);
  5695.                     ClearVote(i);
  5696.                 }
  5697.             }
  5698.         }
  5699.     }
  5700. }
  5701.  
  5702. public ClearVote(kickedid)
  5703. {
  5704.     KickVote[kickedid] = 0;
  5705.     VoteKick[kickedid] = 0;
  5706.     for(new j = 0; j <= MAX_PLAYERS; j++)
  5707.     {
  5708.         if(IsPlayerConnected(j) == 1 && LastVote[j] == kickedid)
  5709.         {
  5710.             LastVote[j] = 255;
  5711.         }
  5712.     }
  5713. }
  5714.  
  5715.  
  5716.  
  5717. public SetPlayerWeapons(playerid)
  5718. {
  5719.     if (gdebug >= 1){printf("DEBUG SetPlayerWeapons(%d)",playerid);}
  5720.     //ResetPlayerWeapons(playerid);
  5721.     if(PlayerInfo[playerid][pGun1] == 0)
  5722.     {
  5723.     PlayerInfo[playerid][pGun1] = 24;
  5724.     }
  5725.     if (PlayerInfo[playerid][pGun1] > 0)
  5726.     {
  5727.         GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun1], PlayerInfo[playerid][pAmmo1]);
  5728.     }
  5729.     if(gTeam[playerid] == 1)
  5730.     {
  5731.         GivePlayerWeapon(playerid, 4, 0);
  5732.     }
  5733.     if(gTeam[playerid] == 2)
  5734.     {
  5735.         GivePlayerWeapon(playerid, 3, 0);
  5736.         //GivePlayerWeapon(playerid, 41, 500); //spray
  5737.     }
  5738.     if(gTeam[playerid] >= 3)
  5739.     {
  5740.         GivePlayerWeapon(playerid, 32, 100);
  5741.     }
  5742.     if (PlayerInfo[playerid][pGun2] > 0)
  5743.     {
  5744.         GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun2], PlayerInfo[playerid][pAmmo2]);
  5745.     }
  5746.     if (PlayerInfo[playerid][pGun3] > 0)
  5747.     {
  5748.         GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun3], PlayerInfo[playerid][pAmmo3]);
  5749.     }
  5750.     if (PlayerInfo[playerid][pGun4] > 0)
  5751.     {
  5752.         GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun4], PlayerInfo[playerid][pAmmo4]);
  5753.     }
  5754.     if (PlayerInfo[playerid][pGun5] > 0)
  5755.     {
  5756.         GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun5], PlayerInfo[playerid][pAmmo5]);
  5757.     }
  5758.     if (PlayerInfo[playerid][pGun6] > 0)
  5759.     {
  5760.         GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun6], PlayerInfo[playerid][pAmmo6]);
  5761.     }
  5762. }
  5763.  
  5764. public PrintSBizInfo(playerid,targetid)
  5765. {
  5766.     new coordsstring[256];
  5767.     SendClientMessage(playerid, COLOR_ORANGERED,"Informacije o Firmi");
  5768.     format(coordsstring, sizeof(coordsstring),"Naziv Firme: %s, Vlasnik: %s, Reket: Nitko, Vrsta: 19",SBizzInfo[targetid][sbDiscription],SBizzInfo[targetid][sbOwner]);
  5769.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  5770.     format(coordsstring, sizeof(coordsstring), "Racun: $%d, Reket racun: $0", SBizzInfo[targetid][sbTakings]);
  5771.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  5772.     format(coordsstring, sizeof(coordsstring), "Cijena Firme: %d, Zakljucano: %d", SBizzInfo[targetid][sbValue],SBizzInfo[targetid][sbLock]);
  5773.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  5774.     SendClientMessage(playerid, COLOR_GREEN," ");
  5775. }
  5776.  
  5777. public PrintBizInfo(playerid,targetid)
  5778. {
  5779.     new coordsstring[256];
  5780.     SendClientMessage(playerid, COLOR_ORANGERED,"Informacije o Firmi");
  5781.     format(coordsstring, sizeof(coordsstring),"Naziv Firme: %s, Vlasnik: %s, Reket: Nitko, Vrsta: 19",BizzInfo[targetid][bDiscription],BizzInfo[targetid][bOwner]);
  5782.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  5783.     format(coordsstring, sizeof(coordsstring), "Racun: $%d, Reket racun: $0", BizzInfo[targetid][bTakings]);
  5784.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  5785.     format(coordsstring, sizeof(coordsstring), "Cijena Firme: %d, Zakljucano: %d", BizzInfo[targetid][bValue],BizzInfo[targetid][bLock]);
  5786.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  5787.     SendClientMessage(playerid, COLOR_GREEN," ");
  5788. }
  5789.  
  5790. public PrintPlayerWeapons(playerid,targetid)
  5791. {
  5792.     if (gdebug >= 1){printf("DEBUG PrintPlayerWeapons(%d %d)",playerid,targetid);}
  5793.     new cash =  GetPlayerMoney(targetid);
  5794. //  new admin = PlayerInfo[targetid][pAdmin];
  5795.     new level = PlayerInfo[targetid][pLevel];
  5796.     new exp = PlayerInfo[targetid][pExp];
  5797.     new gun1 = PlayerInfo[targetid][pGun1];
  5798.     new gun2 = PlayerInfo[targetid][pGun2];
  5799.     new gun3 = PlayerInfo[targetid][pGun3];
  5800.     new gun4 = PlayerInfo[targetid][pGun4];
  5801.     new gun5 = PlayerInfo[targetid][pGun5];
  5802.     new gun6 = PlayerInfo[targetid][pGun6];
  5803.     new ammo1 = PlayerInfo[targetid][pAmmo1];
  5804.     new ammo2 = PlayerInfo[targetid][pAmmo2];
  5805.     new ammo3 = PlayerInfo[targetid][pAmmo3];
  5806.     new ammo4 = PlayerInfo[targetid][pAmmo4];
  5807.     new ammo5 = PlayerInfo[targetid][pAmmo5];
  5808.     new ammo6 = PlayerInfo[targetid][pAmmo6];
  5809.     new kills = PlayerInfo[targetid][pKills];
  5810.     new pcb = PlayerInfo[targetid][pCB];
  5811.     new phw = PlayerInfo[targetid][pHW];
  5812.     new psr = PlayerInfo[targetid][pSR];
  5813.     new pwa = PlayerInfo[targetid][pWA] ;
  5814.     new ppen = PlayerInfo[targetid][pPEN];
  5815.     new pnumber = PlayerInfo[targetid][pPnumber];
  5816.     new account = PlayerInfo[targetid][pAccount];
  5817.     new nxtlevel = PlayerInfo[targetid][pLevel]+1;
  5818.     new expamount = nxtlevel*levelexp;
  5819.     new costlevel = nxtlevel*levelcost;//10k for testing purposes
  5820.     new housekey = PlayerInfo[targetid][pPhousekey];
  5821.     new bizkey = PlayerInfo[targetid][pPbiskey];
  5822.     new intir = PlayerInfo[playerid][pInt];
  5823.     new local = PlayerInfo[playerid][pLocal];
  5824.     new Float:shealth = PlayerInfo[targetid][pSHealth];
  5825.     new Float:health;
  5826.     new name[MAX_PLAYER_NAME];
  5827.     new sgun1[20];
  5828.     new sgun2[20];
  5829.     new sgun3[20];
  5830.     new sgun4[20];
  5831.     new sgun5[20];
  5832.     new sgun6[20];
  5833.     new ttext[20];
  5834.     if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Medic"; }
  5835.     else if(gTeam[targetid] == 3 || gTeam[targetid] == 4) { ttext = "Civili"; }
  5836.     else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "Nista"; }
  5837.     else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "Nista"; }
  5838.     else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "Nista"; }
  5839.     else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Nista"; }
  5840.     else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "GM"; }
  5841.     else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "FA"; }
  5842.     else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "RUS"; }
  5843.     else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "BM"; }
  5844.     else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Nista"; }
  5845.     new ftext[50];
  5846.     if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6)
  5847.     { ftext = "Fallen Army"; }
  5848.     else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5)
  5849.     { ftext = "Grove Mafia"; }
  5850.     else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)
  5851.     { ftext = "Bistrik Mafia"; }
  5852.     else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)
  5853.     { ftext = "Russian Mafia"; }
  5854.     else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)
  5855.     { ftext = "Street Crew"; }
  5856.     else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)
  5857.     { ftext = "Chinese Triads"; }
  5858.     else
  5859.     { ftext = "Niste Clan Organizacije!"; }
  5860.     new rtext[64];
  5861.     if(gTeam[targetid] == 5 || PlayerInfo[targetid][pFMember] < 255)//Bande rankovi
  5862.     {
  5863.             if(PlayerInfo[targetid][pRank] == 1) { rtext = "Sitna riba"; }
  5864.             else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Vojnik"; }
  5865.             else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Hitman"; }
  5866.             else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Kapetan"; }
  5867.             else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Underboss"; }
  5868.             else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Boss"; }
  5869.             else { rtext = "Sitna riba"; }
  5870.     }
  5871.     else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
  5872.     {
  5873.             if(PlayerInfo[targetid][pRank] == 1) { rtext = "Prometnik"; }
  5874.             else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Policajac"; }
  5875.             else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Narednik"; }
  5876.             else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Kapetan"; }
  5877.             else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Sef Policije"; }
  5878.             else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Ministar"; }
  5879.             else { rtext = "Prometnik"; }
  5880.     }
  5881.     else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
  5882.     {
  5883.             if(PlayerInfo[targetid][pRank] == 1) { rtext = "Pocetnik"; }
  5884.             else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Agent"; }
  5885.             else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Specijalni Agent"; }
  5886.             else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Zapovijednik"; }
  5887.             else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Asistent Upravitelja"; }
  5888.             else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Upravitelj"; }
  5889.             else { rtext = "Pocetnik"; }
  5890.     }
  5891.     else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
  5892.     {
  5893.             if(PlayerInfo[targetid][pRank] == 1) { rtext = "Vojnik"; }
  5894.             else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Narednik"; }
  5895.             else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Major"; }
  5896.             else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Kapetan"; }
  5897.             else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Poruènik"; }
  5898.             else if(PlayerInfo[targetid][pRank] == 6) { rtext = "General"; }
  5899.             else { rtext = "Vojnik"; }
  5900.     }
  5901.     else
  5902.     {
  5903.             rtext = "Nijedan";
  5904.     }
  5905.     GetWeaponName(gun1, sgun1, 20);
  5906.     GetWeaponName(gun2, sgun2, 20);
  5907.     GetWeaponName(gun3, sgun3, 20);
  5908.     GetWeaponName(gun4, sgun4, 20);
  5909.     GetWeaponName(gun5, sgun5, 20);
  5910.     GetWeaponName(gun6, sgun6, 20);
  5911.     GetPlayerName(targetid, name, sizeof(name));
  5912.     GetPlayerHealth(targetid,health);
  5913.     new Float:px,Float:py,Float:pz;
  5914.     GetPlayerPos(targetid, px, py, pz);
  5915.     new ucp[800];
  5916. //  format(coordsstring, sizeof(coordsstring), "%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%.1f,%.1f,%.1f,%.1f,%.1f", PlayerInfo[playerid][pKey], cash, admin, level,gun1,gun2,gun3,gun4,gun5,gun6,ammo1,ammo2,ammo3,ammo4,ammo5,ammo6,shealth,health, px, py, pz);
  5917. //  SendClientMessage(playerid, TEAM_BLUE_COLOR, coordsstring);
  5918.     format(ucp, sizeof(ucp), "\n%s\n\nTim:[%s] | Organizacija:[%s]\n\nLevel: [%d] | SpawnHealt: %.1f | Novac: [$%d] | Banka: [$%d] | Warn: [%d] | CHBodovi: [%d]\n\nCashBox: [%d/4] | HotWire: [%d/4] | Ulicna utrka: [%d/4] | Servisi: [%d/20]\n\nUbojstava: [%d/50] | PENo1 ubijanja: [%d/4] | Iduci level: [$%d] | Respekti: [%d/%d]\n", name,ttext,ftext,level, shealth+50, cash, account, PlayerInfo[targetid][pWarns],PlayerInfo[targetid][pCHBodovi],pcb,phw,psr,pwa,kills,ppen,costlevel,exp,expamount );
  5919.     ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{33BBFF}Korisnicki racun", ucp, "U redu", "Odustani");
  5920. }
  5921. //-------------------------ZA ADMINE--------------------------------
  5922. public PrintPlayerprovjeri(playerid,targetid)
  5923. {
  5924.     if (gdebug >= 1){printf("DEBUG PrintPlayerWeapons(%d %d)",playerid,targetid);}
  5925.     new cash =  GetPlayerMoney(targetid);
  5926. //  new admin = PlayerInfo[targetid][pAdmin];
  5927.     new level = PlayerInfo[targetid][pLevel];
  5928.     new exp = PlayerInfo[targetid][pExp];
  5929.     new gun1 = PlayerInfo[targetid][pGun1];
  5930.     new gun2 = PlayerInfo[targetid][pGun2];
  5931.     new gun3 = PlayerInfo[targetid][pGun3];
  5932.     new gun4 = PlayerInfo[targetid][pGun4];
  5933.     new gun5 = PlayerInfo[targetid][pGun5];
  5934.     new gun6 = PlayerInfo[targetid][pGun6];
  5935.     new ammo1 = PlayerInfo[targetid][pAmmo1];
  5936.     new ammo2 = PlayerInfo[targetid][pAmmo2];
  5937.     new ammo3 = PlayerInfo[targetid][pAmmo3];
  5938.     new ammo4 = PlayerInfo[targetid][pAmmo4];
  5939.     new ammo5 = PlayerInfo[targetid][pAmmo5];
  5940.     new ammo6 = PlayerInfo[targetid][pAmmo6];
  5941.     new kills = PlayerInfo[targetid][pKills];
  5942.     new pcb = PlayerInfo[targetid][pCB];
  5943.     new phw = PlayerInfo[targetid][pHW];
  5944.     new psr = PlayerInfo[targetid][pSR];
  5945.     new pwa = PlayerInfo[targetid][pWA] ;
  5946.     new ppen = PlayerInfo[targetid][pPEN];
  5947.     new pnumber = PlayerInfo[targetid][pPnumber];
  5948.     new account = PlayerInfo[targetid][pAccount];
  5949.     new nxtlevel = PlayerInfo[targetid][pLevel]+1;
  5950.     new expamount = nxtlevel*levelexp;
  5951.     new costlevel = nxtlevel*levelcost;//10k for testing purposes
  5952.     new housekey = PlayerInfo[targetid][pPhousekey];
  5953.     new bizkey = PlayerInfo[targetid][pPbiskey];
  5954.     new intir = PlayerInfo[playerid][pInt];
  5955.     new local = PlayerInfo[playerid][pLocal];
  5956.     new Float:shealth = PlayerInfo[targetid][pSHealth];
  5957.     new Float:health;
  5958.     new name[MAX_PLAYER_NAME];
  5959.     new sgun1[20];
  5960.     new sgun2[20];
  5961.     new sgun3[20];
  5962.     new sgun4[20];
  5963.     new sgun5[20];
  5964.     new sgun6[20];
  5965.     new ttext[20];
  5966.     if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Medic"; }
  5967.     else if(gTeam[targetid] == 3 || gTeam[targetid] == 4) { ttext = "Civilian"; }
  5968.     else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "Officer"; }
  5969.     else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "FBI Agent"; }
  5970.     else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "National Guard"; }
  5971.     else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Firemen/Paramedic"; }
  5972.     else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "CA"; }
  5973.     else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "UT"; }
  5974.     else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "SM"; }
  5975.     else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "SC"; }
  5976.     else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "CT"; }
  5977.     new ftext[20];
  5978.     if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)
  5979.     { ftext = "Firemen/Paramedics"; }
  5980.     else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5)
  5981.     { ftext = "Cold Assassins"; }
  5982.     else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6)
  5983.     { ftext = "Unreal Team"; }
  5984.     else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)
  5985.     { ftext = "Sicilian Mafia"; }
  5986.     else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)
  5987.     { ftext = "Street Crew"; }
  5988.     else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)
  5989.     { ftext = "Chinese Triads"; }
  5990.     else
  5991.     { ftext = "None"; }
  5992.     new rtext[64];
  5993.     if(gTeam[targetid] == 5 || PlayerInfo[targetid][pFMember] < 255)//Bande rankovi
  5994.     {
  5995.             if(PlayerInfo[targetid][pRank] == 1) { rtext = "Sitna riba"; }
  5996.             else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Vojnik"; }
  5997.             else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Hitman"; }
  5998.             else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Kapetan"; }
  5999.             else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Underboss"; }
  6000.             else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Boss"; }
  6001.             else { rtext = "Sitna riba"; }
  6002.     }
  6003.     else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
  6004.     {
  6005.             if(PlayerInfo[targetid][pRank] == 1) { rtext = "Prometnik"; }
  6006.             else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Policajac"; }
  6007.             else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Narednik"; }
  6008.             else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Kapetan"; }
  6009.             else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Sef Policije"; }
  6010.             else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Ministar"; }
  6011.             else { rtext = "Prometnik"; }
  6012.     }
  6013.     else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
  6014.     {
  6015.             if(PlayerInfo[targetid][pRank] == 1) { rtext = "Pocetnik"; }
  6016.             else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Agent"; }
  6017.             else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Specijalni Agent"; }
  6018.             else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Zapovijednik"; }
  6019.             else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Asistent Upravitelja"; }
  6020.             else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Upravitelj"; }
  6021.             else { rtext = "Pocetnik"; }
  6022.     }
  6023.     else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
  6024.     {
  6025.             if(PlayerInfo[targetid][pRank] == 1) { rtext = "Vojnik"; }
  6026.             else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Narednik"; }
  6027.             else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Major"; }
  6028.             else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Kapetan"; }
  6029.             else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Poruènik"; }
  6030.             else if(PlayerInfo[targetid][pRank] == 6) { rtext = "General"; }
  6031.             else { rtext = "Vojnik"; }
  6032.     }
  6033.     else
  6034.     {
  6035.             rtext = "None";
  6036.     }
  6037.     GetWeaponName(gun1, sgun1, 20);
  6038.     GetWeaponName(gun2, sgun2, 20);
  6039.     GetWeaponName(gun3, sgun3, 20);
  6040.     GetWeaponName(gun4, sgun4, 20);
  6041.     GetWeaponName(gun5, sgun5, 20);
  6042.     GetWeaponName(gun6, sgun6, 20);
  6043.     GetPlayerName(targetid, name, sizeof(name));
  6044.     GetPlayerHealth(targetid,health);
  6045.     new Float:px,Float:py,Float:pz;
  6046.     GetPlayerPos(targetid, px, py, pz);
  6047.     new coordsstring[500];
  6048.     new id;
  6049.     new ip[16];
  6050.     new pname[24];
  6051.     new hour,minuite,second;
  6052.     new year, month,day;
  6053.     new sendername[MAX_PLAYER_NAME];
  6054.     getdate(year, month, day);
  6055.     gettime(hour,minuite,second);
  6056.     GetPlayerIp(id,ip,15);
  6057.     new Float:tempheal;
  6058.     GetPlayerHealth(targetid,tempheal);
  6059.     GetPlayerName(playerid, sendername, sizeof(sendername));
  6060.     new ptext[64];
  6061.     {
  6062.             if (IsPlayerInAnyVehicle(playerid)){ ptext = "U vozilu"; }
  6063.             else
  6064.             {
  6065.             ptext = "Na nogama";
  6066.             }
  6067.     }
  6068. //  format(coordsstring, sizeof(coordsstring), "%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%.1f,%.1f,%.1f,%.1f,%.1f", PlayerInfo[playerid][pKey], cash, admin, level,gun1,gun2,gun3,gun4,gun5,gun6,ammo1,ammo2,ammo3,ammo4,ammo5,ammo6,shealth,health, px, py, pz);
  6069. //  SendClientMessage(playerid, TEAM_BLUE_COLOR, coordsstring);
  6070.     format(coordsstring, sizeof(coordsstring), " ",name);
  6071.     if (PlayerInfo[playerid][pAdmin] >= 1)
  6072.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  6073.     format(coordsstring, sizeof(coordsstring), "__Igrac: %s___________________________________________________________Provjera____V 0.3______",name);
  6074.     if (PlayerInfo[playerid][pAdmin] >= 1)
  6075.     SendClientMessage(playerid, 0xDB023EFF,coordsstring);
  6076.     format(coordsstring, sizeof(coordsstring), "[0] | [0] | [0] | [0] | [0] | [0]",PlayerInfo[targetid][pGun1],PlayerInfo[targetid][pGun2],PlayerInfo[targetid][pGun3],PlayerInfo[targetid][pGun4],PlayerInfo[targetid][pGun5],PlayerInfo[targetid][pGun6]);
  6077.     if (PlayerInfo[playerid][pAdmin] >= 1)
  6078.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  6079.     format(coordsstring, sizeof(coordsstring), "[0] | [0] | [0] | [0] | [0] | [0]",PlayerInfo[targetid][pAmmo1],PlayerInfo[targetid][pAmmo2],PlayerInfo[targetid][pAmmo3],PlayerInfo[targetid][pAmmo4],PlayerInfo[targetid][pAmmo5],PlayerInfo[targetid][pAmmo6]);
  6080.     if (PlayerInfo[playerid][pAdmin] >= 1)
  6081.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  6082.     format(coordsstring, sizeof(coordsstring), "Health: (%.0f) | Novac: (%d) | Banka: (%d) | Status: (%s)", tempheal, cash, account,ptext);
  6083.     if (PlayerInfo[playerid][pAdmin] >= 1)
  6084.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  6085.     format(coordsstring, sizeof(coordsstring), "Pozicije: Xpoz: (%.0f) | Ypoz: (%.0f) | Zpoz: (%.0f)", px, py, pz);
  6086.     if (PlayerInfo[playerid][pAdmin] >= 1)
  6087.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  6088.     format(coordsstring, sizeof(coordsstring), "Level: [%d] | SpawnHealth: (%.0f) || Ip igraca: (%s) || Upozorenja: [%d]", level,shealth+50,ip,PlayerInfo[targetid][pWarns]);
  6089.     if (PlayerInfo[playerid][pAdmin] >= 1)
  6090.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  6091.     format(coordsstring, sizeof(coordsstring), "Datum: %d.%d.%d  |  Vrijeme: %d:%d", day,month,year,hour,minuite);
  6092.     if (PlayerInfo[playerid][pAdmin] >= 1)
  6093.     SendClientMessage(playerid, COLOR_WHITE,coordsstring);                                                          
  6094.     format(coordsstring, sizeof(coordsstring), "_____________________________________________________________________Provjerio Admin: %s_____",sendername);
  6095.     if (PlayerInfo[playerid][pAdmin] >= 1)
  6096.     SendClientMessage(playerid, 0xDB023EFF,coordsstring);
  6097. }
  6098. //--------------boja timova---------------
  6099. public SetPlayerToTeamColor(playerid)
  6100. {
  6101.     if(PlayerInfo[playerid][pMember] == 6)
  6102.     {
  6103.         SetPlayerColor(playerid,0x1768FFFF); // Fallen Army
  6104.     }
  6105.     else if(PlayerInfo[playerid][pMember] == 9)
  6106.     {
  6107.         SetPlayerColor(playerid,0x91FF22FF); // Bistrik Mafia
  6108.     }
  6109.     else if(PlayerInfo[playerid][pMember] == 8)
  6110.     {
  6111.         SetPlayerColor(playerid,0xF4F400FF); // Russian Mafia
  6112.     }
  6113.     else if(PlayerInfo[playerid][pMember] == 4)
  6114.     {
  6115.         SetPlayerColor(playerid,COLOR_PINK); // Medic
  6116.     }
  6117.     else if(PlayerInfo[playerid][pMember] == 5)
  6118.     {
  6119.         SetPlayerColor(playerid,0x26FC07FF); //Grove Mafia
  6120.     }
  6121.     else
  6122.     {
  6123.         SetPlayerColor(playerid,COLOR_WHITE); // cvil
  6124.     }
  6125. }
  6126. // -------------------------------------boja timova
  6127. public SetPlayerToTeamColorFlash(playerid)
  6128. {
  6129.     if(PlayerInfo[playerid][pMember] == 1)
  6130.     {
  6131.         SetPlayerColor(playerid,COLOR_MEDIUMAQUA); // Officer
  6132.     }
  6133.     else if(PlayerInfo[playerid][pMember] == 2)
  6134.     {
  6135.         SetPlayerColor(playerid,COLOR_BLUE); // FBI
  6136.     }
  6137.     else if(PlayerInfo[playerid][pMember] == 3)
  6138.     {
  6139.         SetPlayerColor(playerid,COLOR_GREEN); // NG
  6140.     }
  6141.     else if(PlayerInfo[playerid][pMember] == 4)
  6142.     {
  6143.         SetPlayerColor(playerid,COLOR_PINK); // Medic
  6144.     }
  6145.     else if(PlayerInfo[playerid][pMember] == 5)
  6146.     {
  6147.         SetPlayerColor(playerid,COLOR_BLUE); //
  6148.     }
  6149.     else if(PlayerInfo[playerid][pMember] == 6)
  6150.     {
  6151.         SetPlayerColor(playerid,COLOR_GOLD); // UT
  6152.     }
  6153.     else if(PlayerInfo[playerid][pMember] == 8)
  6154.     {
  6155.         SetPlayerColor(playerid,COLOR_SPRINGGREEN); // SM
  6156.     }
  6157.     else if(PlayerInfo[playerid][pMember] == 9)
  6158.     {
  6159.         SetPlayerColor(playerid,COLOR_PINK); // SC
  6160.     }
  6161.     else if(PlayerInfo[playerid][pMember] == 10)
  6162.     {
  6163.         SetPlayerColor(playerid,COLOR_CRIMSON); // Y
  6164.     }
  6165.     else if(PlayerInfo[playerid][pMember] == 0)
  6166.     {
  6167.         SetPlayerColor(playerid,COLOR_WHITE); // tim 0
  6168.     }
  6169.     else if(PlayerInfo[playerid][pMember] == 7)
  6170.     {
  6171.         SetPlayerColor(playerid,COLOR_WHITE); // tim 7
  6172.     }
  6173.     else
  6174.     {
  6175.         SetPlayerColor(playerid,COLOR_WHITE); // cvil
  6176.     }
  6177. }
  6178.  
  6179. //---------------------------------------------------------
  6180.  
  6181. public GameModeInitExitFunc()
  6182. {
  6183.     if (gdebug >= 1){printf("DEBUG GameModeInitExitFunc()");}
  6184.     new string[128];
  6185.     format(string, sizeof(string), "Putujem...");
  6186.     for(new i = 0; i <= MAX_PLAYERS; i++)
  6187.     {
  6188.         if(IsPlayerConnected(i) == 1)
  6189.         {
  6190.             DisablePlayerCheckpoint(i);
  6191.             gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
  6192.             if (gdebug){print("DEBUG CHECKPOINT_NONE3");}
  6193.             GameTextForPlayer(i, string, 4000, 5);
  6194.             if (gdebug){printf("DEBUG %s", string);}
  6195.             SetPlayerCameraPos(i,1460.0, -1324.0, 287.2);
  6196.             SetPlayerCameraLookAt(i,1374.5, -1291.1, 239.0);
  6197.             OnUpdatePlayer(i);
  6198.             gPlayerLogged[i] = 0;
  6199.         }
  6200.     }
  6201.     SetTimer("GameModeExitFunc", 4000, 0);
  6202.     return 1;
  6203. }
  6204.  
  6205. public GameModeExitFunc()
  6206. {
  6207.     KillTimer(synctimer);
  6208.     KillTimer(newmistimer);
  6209.     KillTimer(unjailtimer);
  6210.     KillTimer(playertimer);
  6211.     KillTimer(cartimer);
  6212.     KillTimer(unmutetimer);
  6213.     KillTimer(celltimer);
  6214.     KillTimer(GodTimer);
  6215.     GameModeExit();
  6216. }
  6217.  
  6218. //--------------------------------Config--------------------------------------------------------------
  6219. public LoadConfig()
  6220. {
  6221.     print(" ");
  6222.     print("Ucitavanje konfiguracije servera...");
  6223.     if (gdebug){print("DEBUG is on");}
  6224.     new valtmp[128];
  6225.     new File: file = fopen("pen01.cfg", io_read);
  6226.     fread(file, valtmp);strmid(motd, valtmp, 0, strlen(valtmp)-1, 255);
  6227.     fread(file, valtmp);GetVal(valtmp);fow = RetVal;
  6228.     fread(file, valtmp);GetVal(valtmp);radardist = RetVal;
  6229.     fread(file, valtmp);GetVal(valtmp);radarfreq = RetVal;
  6230.     fread(file, valtmp);GetVal(valtmp);addtimer = RetVal*1000;
  6231.     fread(file, valtmp);GetVal(valtmp);stats = RetVal;
  6232.     fread(file, valtmp);GetVal(valtmp);dollah = RetVal;
  6233.     fread(file, valtmp);GetVal(valtmp);realtime = RetVal;
  6234.     fread(file, valtmp);GetVal(valtmp);timeshift = RetVal;
  6235.     fread(file, valtmp);GetVal(valtmp);wtime = RetVal;
  6236.     fread(file, valtmp);GetVal(valtmp);gRoundTime = RetVal*60000;
  6237.     fread(file, valtmp);GetVal(valtmp);cashbox = RetVal;
  6238.     fread(file, valtmp);GetVal(valtmp);streetrace = RetVal;
  6239.     fread(file, valtmp);GetVal(valtmp);hotwire = RetVal;
  6240.     fread(file, valtmp);GetVal(valtmp);levelcost = RetVal;
  6241.     fread(file, valtmp);GetVal(valtmp);basedcost = RetVal;
  6242.     fread(file, valtmp);GetVal(valtmp);deathcost = RetVal;
  6243.     fread(file, valtmp);GetVal(valtmp);suecost = RetVal;
  6244.     fread(file, valtmp);GetVal(valtmp);paycheck = RetVal;
  6245.     fread(file, valtmp);GetVal(valtmp);jobdelay = RetVal;
  6246.     fread(file, valtmp);GetVal(valtmp);petime = RetVal*60000;
  6247.     fread(file, valtmp);GetVal(valtmp);realchat = RetVal;
  6248.     fread(file, valtmp);GetVal(valtmp);forceteam = RetVal;
  6249.     fread(file, valtmp);GetVal(valtmp);cchargetime = RetVal;
  6250.     fread(file, valtmp);GetVal(valtmp);callcost = RetVal;
  6251.     fread(file, valtmp);GetVal(valtmp);txtcost = RetVal;
  6252.     fread(file, valtmp);GetVal(valtmp);jailtime = RetVal;
  6253.     fread(file, valtmp);GetVal(valtmp);intrate = RetVal;
  6254.     fread(file, valtmp);GetVal(valtmp);teamcarlock = RetVal;
  6255.     fread(file, valtmp);GetVal(valtmp);levelexp = RetVal;
  6256.     fread(file, valtmp);GetVal(valtmp);nocasino = RetVal;
  6257.     fread(file, valtmp);GetVal(valtmp);automission = RetVal;
  6258.     fread(file, valtmp);GetVal(valtmp);civnokill = RetVal;
  6259.     fread(file, valtmp);GetVal(valtmp);accountplay = RetVal;
  6260.     fread(file, valtmp);GetVal(valtmp);mediccharge = RetVal;
  6261.     fclose(file);
  6262.     print(".....Konfiguracija ucitana");
  6263.     printf("%s %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",motd,dollah,realtime,timeshift,wtime,gRoundTime,cashbox,streetrace,hotwire,levelcost,deathcost,paycheck,jobdelay,petime,realchat,forceteam);
  6264. }
  6265. //------------------------------------------------------------------------------------------------------
  6266. public GetVal(string[])
  6267. {
  6268.     new tmp[32];
  6269.     new idx;
  6270.     tmp = strtok(string, idx);
  6271.     tmp = strtok(string, idx);
  6272.     RetVal = strval(tmp);
  6273.     strmid(string, string, 0, strlen(string)-1, 255);
  6274.     printf("%s",string);
  6275. }
  6276.  
  6277. public SaveRace(playerid,name[])
  6278. {
  6279.         new coordsstring[256];
  6280.         new racename[64];
  6281.         new makername[MAX_PLAYER_NAME];
  6282.         GetPlayerName(playerid, makername, sizeof(makername));
  6283.         format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%s,%s,%d,%d",
  6284.         RaceInfo[rStartx],
  6285.         RaceInfo[rStarty],
  6286.         RaceInfo[rStartz],
  6287.         RaceInfo[rMidx],
  6288.         RaceInfo[rMidy],
  6289.         RaceInfo[rMidz],
  6290.         RaceInfo[rMid2x],
  6291.         RaceInfo[rMid2y],
  6292.         RaceInfo[rMid2z],
  6293.         RaceInfo[rEndx],
  6294.         RaceInfo[rEndy],
  6295.         RaceInfo[rEndz],
  6296.         makername,
  6297.         "none",
  6298.         0,
  6299.         RaceInfo[rLaps]);
  6300.         format(racename, sizeof(racename), "%s.race",name);
  6301.         new File: file2 = fopen(racename, io_write);
  6302.         fwrite(file2, coordsstring);
  6303.         fclose(file2);
  6304.         format(coordsstring, sizeof(coordsstring), "%s Race Saved",name);
  6305.         SendClientMessage(playerid, COLOR_GREEN,coordsstring);
  6306.         return 1;
  6307. }
  6308.  
  6309. public BestTime(name[])
  6310. {
  6311.         print("BestTime");
  6312.         new coordsstring[256];
  6313.         new racename[64];
  6314.         format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%s,%s,%d,%d",
  6315.         RaceInfo[rStartx],
  6316.         RaceInfo[rStarty],
  6317.         RaceInfo[rStartz],
  6318.         RaceInfo[rMidx],
  6319.         RaceInfo[rMidy],
  6320.         RaceInfo[rMidz],
  6321.         RaceInfo[rMid2x],
  6322.         RaceInfo[rMid2y],
  6323.         RaceInfo[rMid2z],
  6324.         RaceInfo[rEndx],
  6325.         RaceInfo[rEndy],
  6326.         RaceInfo[rEndz],
  6327.         RaceInfo[rName],
  6328.         RaceInfo[rBest],
  6329.         RaceInfo[rBestms],
  6330.         RaceInfo[rLaps]);
  6331.         format(racename, sizeof(racename), "%s.race",name);
  6332.         new File: file2 = fopen(racename, io_write);
  6333.         fwrite(file2, coordsstring);
  6334.         fclose(file2);
  6335.         return 1;
  6336. }
  6337.  
  6338. public LoadTmp()
  6339. {
  6340.     new arrCoords[4][64];
  6341.     new strFromFile2[64];
  6342.     new File: file = fopen("tmppos.cfg", io_read);
  6343.     if (file)
  6344.     {
  6345.         new idx;
  6346.         while (idx < sizeof(Teletmp))
  6347.         {
  6348.             fread(file, strFromFile2);
  6349.             split(strFromFile2, arrCoords, ',');
  6350.             Teletmp[idx][pTmpposx] = floatstr(arrCoords[0]);
  6351.             Teletmp[idx][pTmpposy] = floatstr(arrCoords[1]);
  6352.             Teletmp[idx][pTmpposz] = floatstr(arrCoords[2]);
  6353.             Teletmp[idx][pTmpint] = strval(arrCoords[3]);
  6354.             idx++;
  6355.         }
  6356.     }
  6357.     fclose(file);
  6358.     return 1;
  6359. }
  6360.  
  6361.  
  6362. public LoadRace(playerid,name[])
  6363. {
  6364.     if (gdebug >= 1){printf("DEBUG Loadrace(%d,%s)",playerid,name);}
  6365.     new arrCoords[16][64];
  6366.     new strFromFile2[256];
  6367.     new racename[64];
  6368.     strmid(CurrentRace, name, 0, strlen(name), 255);
  6369.     format(racename, sizeof(racename), "%s.race",name);
  6370.     new File: file = fopen(racename, io_read);
  6371.     if (file)
  6372.     {
  6373.         fread(file, strFromFile2);
  6374.         split(strFromFile2, arrCoords, ',');
  6375.         RaceInfo[rStartx] = floatstr(arrCoords[0]);
  6376.         RaceInfo[rStarty] = floatstr(arrCoords[1]);
  6377.         RaceInfo[rStartz] = floatstr(arrCoords[2]);
  6378.         RaceInfo[rMidx] = floatstr(arrCoords[3]);
  6379.         RaceInfo[rMidy] = floatstr(arrCoords[4]);
  6380.         RaceInfo[rMidz] = floatstr(arrCoords[5]);
  6381.         RaceInfo[rMid2x] = floatstr(arrCoords[6]);
  6382.         RaceInfo[rMid2y] = floatstr(arrCoords[7]);
  6383.         RaceInfo[rMid2z] = floatstr(arrCoords[8]);
  6384.         RaceInfo[rEndx] = floatstr(arrCoords[9]);
  6385.         RaceInfo[rEndy] = floatstr(arrCoords[10]);
  6386.         RaceInfo[rEndz] = floatstr(arrCoords[11]);
  6387.         strmid(RaceInfo[rName], arrCoords[12], 0, strlen(arrCoords[12]), 255);
  6388.         strmid(RaceInfo[rBest], arrCoords[13], 0, strlen(arrCoords[13]), 255);
  6389.         RaceInfo[rBestms] = strval(arrCoords[14]);
  6390.         RaceInfo[rLaps] = strval(arrCoords[15]);
  6391.         rsx = RaceInfo[rStartx];rsy = RaceInfo[rStarty];rsz =RaceInfo[rStartz];
  6392.         rmx = RaceInfo[rMidx];rmy = RaceInfo[rMidy];rmz = RaceInfo[rMidz];
  6393.         rm2x = RaceInfo[rMid2x];rm2y = RaceInfo[rMid2y];rm2z = RaceInfo[rMid2z];
  6394.         rex = RaceInfo[rEndx];rey = RaceInfo[rEndy];rez = RaceInfo[rEndz];
  6395.         fclose(file);
  6396.         format(strFromFile2, sizeof(strFromFile2), "| ZeroAS | {FFFFFF}Ucitavam event %s...",name);
  6397.         ConvertTicks(RaceInfo[rBestms]);
  6398.         SendClientMessage(playerid, COLOR_ORANGERED,strFromFile2);
  6399.         SendClientMessage(playerid, COLOR_ORANGERED, "| ZeroAS | {FFFFFF}Event je uspjesno ucitan!");
  6400.         SendClientMessage(playerid, COLOR_ORANGERED, " ");
  6401.         if(RaceInfo[rLaps] > 0)
  6402.         {
  6403.             format(strFromFile2, sizeof(strFromFile2), "Event | %s, Od : %s | Rekord: %s : %d:%d:%d | Krugova: %d",name,RaceInfo[rName],RaceInfo[rBest],cmins,csecs,cmils,RaceInfo[rLaps]);
  6404.         }
  6405.         else
  6406.         {
  6407.             format(strFromFile2, sizeof(strFromFile2), "Event | %s, Od : %s | Rekord: %s : %d:%d:%d",name,RaceInfo[rName],RaceInfo[rBest],cmins,csecs,cmils);
  6408.         }
  6409.         SendEnemyMessage(COLOR_WHITE, strFromFile2);
  6410.         randomrace = 0;
  6411.     }
  6412.     else
  6413.     {
  6414.         if(playerid != 255)
  6415.         {
  6416.             SendClientMessage(playerid, COLOR_GREEN,"File not found");
  6417.         }
  6418.     }
  6419.     return 1;
  6420. }
  6421. public LoadDM(playerid,name[])
  6422. {
  6423.     new arrCoords[4][64];
  6424.     new strFromFile2[256];
  6425.     new dmname[64];
  6426.     format(dmname, sizeof(dmname), "%s.dm",name);
  6427.     new File: file = fopen(dmname, io_read);
  6428.     if (file)
  6429.     {
  6430.         new idx;
  6431.         while (idx < sizeof(gRandomDMSpawns))
  6432.         {
  6433.             fread(file, strFromFile2);
  6434.             split(strFromFile2, arrCoords, ',');
  6435.             gRandomDMSpawns[idx][0] = floatstr(arrCoords[0]);
  6436.             gRandomDMSpawns[idx][1] = floatstr(arrCoords[1]);
  6437.             gRandomDMSpawns[idx][2] = floatstr(arrCoords[2]);
  6438.             idx++;
  6439.         }
  6440.         fread(file, strFromFile2);
  6441.         split(strFromFile2, arrCoords, ',');
  6442.         gDMWbounds[0] = floatstr(arrCoords[0]);
  6443.         gDMWbounds[1] = floatstr(arrCoords[1]);
  6444.         gDMWbounds[2] = floatstr(arrCoords[2]);
  6445.         gDMWbounds[3] = floatstr(arrCoords[3]);
  6446.         fclose(file);
  6447.         format(strFromFile2, sizeof(strFromFile2), "Sljedeci DM | %s",name);
  6448.         SendClientMessageToAll(COLOR_GREEN, strFromFile2);
  6449.     }
  6450.     else
  6451.     {
  6452.         if(playerid != 255)
  6453.         {
  6454.             SendClientMessage(playerid, COLOR_GREEN,"File not found");
  6455.         }
  6456.     }
  6457.     return 1;
  6458. }
  6459.  
  6460. public SaveDM(playerid,name[])
  6461. {
  6462.         new coordsstring[256];
  6463.         new racename[64];
  6464.         format(racename, sizeof(racename), "%s.dm",name);
  6465.         new File: file2 = fopen(racename, io_write);
  6466.         new idx;
  6467.         while (idx < sizeof(gRandomDMSpawns))
  6468.         {
  6469.             format(coordsstring, sizeof(coordsstring), "%f,%f,%f\n",gRandomDMSpawns[idx][0],gRandomDMSpawns[idx][1],gRandomDMSpawns[idx][2]);
  6470.             fwrite(file2, coordsstring);
  6471.             idx++;
  6472.         }
  6473.         format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f\n",gDMWbounds[0],gDMWbounds[1],gDMWbounds[2],gDMWbounds[3]);
  6474.         fwrite(file2, coordsstring);
  6475.         fclose(file2);
  6476.         format(coordsstring, sizeof(coordsstring), "%s DM Saved",name);
  6477.         SendClientMessage(playerid, COLOR_GREEN,coordsstring);
  6478.         return 1;
  6479. }
  6480.  
  6481. public LoadRaceList(playerid,name[])
  6482. {
  6483.     new arrCoords[4][64];
  6484.     new strFromFile2[256];
  6485.     new dmname[64];
  6486.     format(dmname, sizeof(dmname), "%s.dm",name);
  6487.     new File: file = fopen(dmname, io_read);
  6488.     if (file)
  6489.     {
  6490.         new idx;
  6491.         while (idx < sizeof(gRandomDMSpawns))
  6492.         {
  6493.             fread(file, strFromFile2);
  6494.             split(strFromFile2, arrCoords, ',');
  6495.             gRandomDMSpawns[idx][0] = floatstr(arrCoords[0]);
  6496.             gRandomDMSpawns[idx][1] = floatstr(arrCoords[1]);
  6497.             gRandomDMSpawns[idx][2] = floatstr(arrCoords[2]);
  6498.             idx++;
  6499.         }
  6500.         fread(file, strFromFile2);
  6501.         split(strFromFile2, arrCoords, ',');
  6502.         gDMWbounds[0] = floatstr(arrCoords[0]);
  6503.         gDMWbounds[1] = floatstr(arrCoords[1]);
  6504.         gDMWbounds[2] = floatstr(arrCoords[2]);
  6505.         gDMWbounds[3] = floatstr(arrCoords[3]);
  6506.         fclose(file);
  6507.         format(strFromFile2, sizeof(strFromFile2), "Sljedeci DM | %s",name);
  6508.         SendClientMessageToAll(COLOR_GREEN, strFromFile2);
  6509.     }
  6510.     else
  6511.     {
  6512.         if(playerid != 255)
  6513.         {
  6514.             SendClientMessage(playerid, COLOR_GREEN,"File not found");
  6515.         }
  6516.     }
  6517.     return 1;
  6518. }
  6519.  
  6520. public SaveRaceList(playerid,name[])
  6521. {
  6522.         new coordsstring[256];
  6523.         new racename[64];
  6524.         format(racename, sizeof(racename), "%s.dm",name);
  6525.         new File: file2 = fopen(racename, io_write);
  6526.         new idx;
  6527.         while (idx < sizeof(gRandomDMSpawns))
  6528.         {
  6529.             format(coordsstring, sizeof(coordsstring), "%f,%f,%f\n",gRandomDMSpawns[idx][0],gRandomDMSpawns[idx][1],gRandomDMSpawns[idx][2]);
  6530.             fwrite(file2, coordsstring);
  6531.             idx++;
  6532.         }
  6533.         format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f\n",gDMWbounds[0],gDMWbounds[1],gDMWbounds[2],gDMWbounds[3]);
  6534.         fwrite(file2, coordsstring);
  6535.         fclose(file2);
  6536.         format(coordsstring, sizeof(coordsstring), "%s DM Saved",name);
  6537.         SendClientMessage(playerid, COLOR_GREEN,coordsstring);
  6538.         return 1;
  6539. }
  6540.  
  6541.  
  6542. public LoadBizz()
  6543. {
  6544.     new arrCoords[31][64];
  6545.     new strFromFile2[256];
  6546.     new File: file = fopen("bizz.cfg", io_read);
  6547.     if (file)
  6548.     {
  6549.         new idx;
  6550.         while (idx < sizeof(BizzInfo))
  6551.         {
  6552.             fread(file, strFromFile2);
  6553.             split(strFromFile2, arrCoords, ',');
  6554.             BizzInfo[idx][bEntrancex] = floatstr(arrCoords[0]);
  6555.             BizzInfo[idx][bEntrancey] = floatstr(arrCoords[1]);
  6556.             BizzInfo[idx][bEntrancez] = floatstr(arrCoords[2]);
  6557.             BizzInfo[idx][bExitx] = floatstr(arrCoords[3]);
  6558.             BizzInfo[idx][bExity] = floatstr(arrCoords[4]);
  6559.             BizzInfo[idx][bExitz] = floatstr(arrCoords[5]);
  6560.             BizzInfo[idx][bHealthx] = strval(arrCoords[6]);
  6561.             BizzInfo[idx][bHealthy] = strval(arrCoords[7]);
  6562.             BizzInfo[idx][bHealthz] = strval(arrCoords[8]);
  6563.             BizzInfo[idx][bArmourx] = strval(arrCoords[9]);
  6564.             BizzInfo[idx][bArmoury] = strval(arrCoords[10]);
  6565.             BizzInfo[idx][bArmourz] = strval(arrCoords[11]);
  6566.             strmid(BizzInfo[idx][bOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
  6567.             strmid(BizzInfo[idx][bDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
  6568.             BizzInfo[idx][bValue] = strval(arrCoords[14]);
  6569.             BizzInfo[idx][bHel] = strval(arrCoords[15]);
  6570.             BizzInfo[idx][bArm] = strval(arrCoords[16]);
  6571.             BizzInfo[idx][bInt] = strval(arrCoords[17]);
  6572.             BizzInfo[idx][bLock] = strval(arrCoords[18]);
  6573.             BizzInfo[idx][bOwned] = strval(arrCoords[19]);
  6574.             BizzInfo[idx][bEntcost] = strval(arrCoords[20]);
  6575.             BizzInfo[idx][bTakings] = strval(arrCoords[21]);
  6576.             BizzInfo[idx][bDate] = strval(arrCoords[22]);
  6577.             BizzInfo[idx][bLevel] = strval(arrCoords[23]);
  6578.             BizzInfo[idx][bProd] = strval(arrCoords[24]);
  6579.             BizzInfo[idx][bProdCap] = strval(arrCoords[25]);
  6580.             BizzInfo[idx][bComp] = strval(arrCoords[26]);
  6581.             BizzInfo[idx][bCompCap] = strval(arrCoords[27]);
  6582.             BizzInfo[idx][bProdCost] = strval(arrCoords[28]);
  6583.             BizzInfo[idx][bPayComp] = strval(arrCoords[29]);
  6584.             BizzInfo[idx][bPriceMod] = strval(arrCoords[30]);
  6585.  
  6586.             printf("BizzInfo:%d [%s] Owner:%s Entfee:%d Takings:%d Products:%d/%d Komponente: %d/%d",
  6587.             idx,
  6588.             BizzInfo[idx][bDiscription],
  6589.             BizzInfo[idx][bOwner],
  6590.             BizzInfo[idx][bEntcost],
  6591.             BizzInfo[idx][bTakings],
  6592.             BizzInfo[idx][bProd],
  6593.             BizzInfo[idx][bProdCap],
  6594.             BizzInfo[idx][bComp],
  6595.             BizzInfo[idx][bCompCap]);
  6596.             idx++;
  6597.         }
  6598.     }
  6599.     fclose(file);
  6600.     return 1;
  6601. }
  6602.  
  6603.  
  6604. public LoadSBizz()
  6605. {
  6606.     new arrCoords[21][64];
  6607.     new strFromFile2[256];
  6608.     new File: file = fopen("sbizz.cfg", io_read);
  6609.     if (file)
  6610.     {
  6611.         new idx;
  6612.         while (idx < sizeof(SBizzInfo))
  6613.         {
  6614.             fread(file, strFromFile2);
  6615.             split(strFromFile2, arrCoords, ',');
  6616.             SBizzInfo[idx][sbEntrancex] = floatstr(arrCoords[0]);
  6617.             SBizzInfo[idx][sbEntrancey] = floatstr(arrCoords[1]);
  6618.             SBizzInfo[idx][sbEntrancez] = floatstr(arrCoords[2]);
  6619.             //printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
  6620.             strmid(SBizzInfo[idx][sbOwner], arrCoords[3], 0, strlen(arrCoords[3]), 255);
  6621.             strmid(SBizzInfo[idx][sbDiscription], arrCoords[4], 0, strlen(arrCoords[4]), 255);
  6622.             SBizzInfo[idx][sbValue] = strval(arrCoords[5]);
  6623.             SBizzInfo[idx][sbHel] = strval(arrCoords[6]);
  6624.             SBizzInfo[idx][sbArm] = strval(arrCoords[7]);
  6625.             SBizzInfo[idx][sbInt] = strval(arrCoords[8]);
  6626.             SBizzInfo[idx][sbLock] = strval(arrCoords[9]);
  6627.             SBizzInfo[idx][sbOwned] = strval(arrCoords[10]);
  6628.             SBizzInfo[idx][sbEntcost] = strval(arrCoords[11]);
  6629.             SBizzInfo[idx][sbTakings] = strval(arrCoords[12]);
  6630.             SBizzInfo[idx][sbDate] = strval(arrCoords[13]);
  6631.             SBizzInfo[idx][sbLevel] = strval(arrCoords[14]);
  6632.             SBizzInfo[idx][sbProd] = strval(arrCoords[15]);
  6633.             SBizzInfo[idx][sbProdCap] = strval(arrCoords[16]);
  6634.             SBizzInfo[idx][sbComp] = strval(arrCoords[17]);
  6635.             SBizzInfo[idx][sbCompCap] = strval(arrCoords[18]);
  6636.             SBizzInfo[idx][sbProdCost] = strval(arrCoords[19]);
  6637.             SBizzInfo[idx][sbPayComp] = strval(arrCoords[20]);
  6638.             printf("SmallBizzInfo:%d [%s] Owner:%s Entfee:%d Takings:%d Products:%d/%d Komponente: %d/%d",
  6639.             idx,
  6640.             SBizzInfo[idx][sbDiscription],
  6641.             SBizzInfo[idx][sbOwner],
  6642.             SBizzInfo[idx][sbEntcost],
  6643.             SBizzInfo[idx][sbTakings],
  6644.             SBizzInfo[idx][sbProd],
  6645.             SBizzInfo[idx][sbProdCap],
  6646.             SBizzInfo[idx][sbComp],
  6647.             SBizzInfo[idx][sbCompCap]);
  6648.             idx++;
  6649.         }
  6650.     }
  6651.     fclose(file);
  6652.     return 1;
  6653. }
  6654. public LoadProperty()
  6655. {
  6656.     new arrCoords[30][64];
  6657.     new strFromFile2[256];
  6658.     new File: file = fopen("property.cfg", io_read);
  6659.     if (file)
  6660.     {
  6661.         new idx;
  6662.         while (idx < sizeof(HouseInfo))
  6663.         {
  6664.             fread(file, strFromFile2);
  6665.             split(strFromFile2, arrCoords, ',');
  6666.             HouseInfo[idx][hEntrancex] = floatstr(arrCoords[0]);
  6667.             HouseInfo[idx][hEntrancey] = floatstr(arrCoords[1]);
  6668.             HouseInfo[idx][hEntrancez] = floatstr(arrCoords[2]);
  6669.             HouseInfo[idx][hExitx] = floatstr(arrCoords[3]);
  6670.             HouseInfo[idx][hExity] = floatstr(arrCoords[4]);
  6671.             HouseInfo[idx][hExitz] = floatstr(arrCoords[5]);
  6672.             HouseInfo[idx][hHealthx] = strval(arrCoords[6]);
  6673.             HouseInfo[idx][hHealthy] = strval(arrCoords[7]);
  6674.             HouseInfo[idx][hHealthz] = strval(arrCoords[8]);
  6675.             HouseInfo[idx][hArmourx] = strval(arrCoords[9]);
  6676.             HouseInfo[idx][hArmoury] = strval(arrCoords[10]);
  6677.             HouseInfo[idx][hArmourz] = strval(arrCoords[11]);
  6678.             //printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
  6679.             strmid(HouseInfo[idx][hOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
  6680.             strmid(HouseInfo[idx][hDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
  6681.             HouseInfo[idx][hValue] = strval(arrCoords[14]);
  6682.             HouseInfo[idx][hHel] = strval(arrCoords[15]);
  6683.             HouseInfo[idx][hArm] = strval(arrCoords[16]);
  6684.             HouseInfo[idx][hInt] = strval(arrCoords[17]);
  6685.             HouseInfo[idx][hLock] = strval(arrCoords[18]);
  6686.             HouseInfo[idx][hOwned] = strval(arrCoords[19]);
  6687.             HouseInfo[idx][hRooms] = strval(arrCoords[20]);
  6688.             HouseInfo[idx][hRent] = strval(arrCoords[21]);
  6689.             HouseInfo[idx][hRentabil] = strval(arrCoords[22]);
  6690.             HouseInfo[idx][hTakings] = strval(arrCoords[23]);
  6691.             HouseInfo[idx][hVec] = strval(arrCoords[24]);
  6692.             if(HouseInfo[idx][hVec] == 457)
  6693.             {
  6694.                 HouseInfo[idx][hVec] = 411;
  6695.             }
  6696.             HouseInfo[idx][hVcol1] = strval(arrCoords[25]);
  6697.             HouseInfo[idx][hVcol2] = strval(arrCoords[26]);
  6698.             HouseInfo[idx][hDate] = strval(arrCoords[27]);
  6699.             HouseInfo[idx][hLevel] = strval(arrCoords[28]);
  6700.             HouseInfo[idx][hWorld] = strval(arrCoords[29]);
  6701.             printf("HouseInfo:%d Owner:%s hTakings %d hVec %d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hTakings],HouseInfo[idx][hVec]);
  6702.             idx++;
  6703.         }
  6704.     }
  6705.     fclose(file);
  6706.     return 1;
  6707. }
  6708. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  6709. {
  6710.     new
  6711.     string1[128],
  6712.     Name[MAX_PLAYER_NAME];
  6713.     GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
  6714.  
  6715.     new name[MAX_PLAYER_NAME], string[48];
  6716.     new coordsstring[256];
  6717.     new atext[20];
  6718.     if(PlayerInfo[playerid][pSex] == 1) { atext = "Musko"; }
  6719.     else if(PlayerInfo[playerid][pSex] == 2) { atext = "Zensko"; }
  6720.     new otext[20];
  6721.     if(PlayerInfo[playerid][pOrigin] == 1) { otext = "Los Santos"; }
  6722.     else if(PlayerInfo[playerid][pOrigin] == 2) { otext = "San Fierro"; }
  6723.     else if(PlayerInfo[playerid][pOrigin] == 3) { otext = "Las Venturas"; }
  6724.     else if(PlayerInfo[playerid][pOrigin] == 4) { otext = "Bone Country"; }
  6725.     new pnumber = PlayerInfo[playerid][pPnumber];
  6726.     GetPlayerName(clickedplayerid, name, sizeof(name));
  6727.     format(coordsstring, sizeof(coordsstring), "Nick: %s\nLevel: %i\nSpol: Musko\nPorijeklo: Los Santos\nKontakt: /pm %d", name,GetPlayerScore(clickedplayerid),atext,otext,clickedplayerid );
  6728.     ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Izvadak iz osobne", coordsstring, "U redu", "Odustani");
  6729.     return 1;
  6730. }
  6731. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  6732. {
  6733.    if(dialogid == fGPS)
  6734.    {
  6735.  if(response)
  6736.  {
  6737.     if(listitem == 0)
  6738.     {
  6739.         GPSF(playerid,Fear,"GPS | Postavljen na Hotel");
  6740.         SetPlayerCheckpoint(playerid,2218.8840,-1144.4600,25.7933,4.0);
  6741.     }
  6742.     if(listitem == 1)
  6743.     {
  6744.         GPSF(playerid,Fear,"GPS | Postavljen na Banku");
  6745.         SetPlayerCheckpoint(playerid,1462.8413,-1025.7767,23.8281,4.0);
  6746.     }
  6747.     if(listitem == 2)
  6748.     {
  6749.         GPSF(playerid,Fear,"GPS | Postavljen na Dolce Vitu");
  6750.         SetPlayerCheckpoint(playerid,1309.8711,-1372.2498,13.5990,4.0);
  6751.     }
  6752.     if(listitem == 3)
  6753.     {
  6754.         GPSF(playerid,Fear,"GPS | Postavljen na Burg");
  6755.         SetPlayerCheckpoint(playerid,1213.5930,-923.2630,42.9272,4.0);
  6756.     }
  6757.     if(listitem == 4)
  6758.     {
  6759.         GPSF(playerid,Fear,"GPS | Postavljen na Aero LS");
  6760.         SetPlayerCheckpoint(playerid,2025.7142,-2450.0518,13.5469,4.0);
  6761.     }
  6762.     if(listitem == 5)
  6763.     {
  6764.         GPSF(playerid,Fear,"GPS | Postavljen na Aero LV");
  6765.         SetPlayerCheckpoint(playerid,1506.2271,1248.9880,10.8125,4.0);
  6766.     }
  6767.     if(listitem == 6)
  6768.     {
  6769.         GPSF(playerid,Fear,"GPS | Postavljen na Aero SF");
  6770.         SetPlayerCheckpoint(playerid,-1226.1250,45.6150,14.1341,4.0);
  6771.     }
  6772.     if(listitem == 7)
  6773.     {
  6774.         GPSF(playerid,Fear,"GPS | Postavljen na Mount Chiliad");
  6775.         SetPlayerCheckpoint(playerid,-2345.8936,-1637.0587,483.7031,4.0);
  6776.     }
  6777.     if(listitem == 8)
  6778.     {
  6779.         GPSF(playerid,Fear,"GPS | Postavljen na Fallen Army");
  6780.         SetPlayerCheckpoint(playerid,1244.9535,-761.1959,92.7361,4.0);
  6781.     }
  6782.     if(listitem == 9)
  6783.     {
  6784.         GPSF(playerid,Fear,"GPS | Postavljen na Bistrik Mafia");
  6785.         SetPlayerCheckpoint(playerid,1307.9750,-2056.1040,58.0903,4.0);
  6786.     }
  6787.     if(listitem == 10)
  6788.     {
  6789.         GPSF(playerid,Fear,"GPS | Postavljen na Grove Mafia");
  6790.         SetPlayerCheckpoint(playerid,2415.9089,-1659.3311,13.3828,4.0);
  6791.     }
  6792.     if(listitem == 11)
  6793.     {
  6794.         GPSF(playerid,Fear,"GPS | Postavljen na Russian Mafia");
  6795.         SetPlayerCheckpoint(playerid,1638.5256,-1714.0114,19.7693,4.0);
  6796.     }
  6797.   }
  6798.    }
  6799.     if(dialogid == 14) // Oruzje
  6800.     {
  6801.         new string[400];
  6802.         if(response)
  6803.         {
  6804.             if(listitem == 0)
  6805.             {
  6806.                 if(PlayerInfo[playerid][pCash] <= 39)
  6807.                 {
  6808.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6809.                     return 1;
  6810.                 }
  6811.                 GivePlayerWeapon(playerid, 4, 500); //  Noz
  6812.                 GivePlayerMoney(playerid, -40);
  6813.                 format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
  6814.                 SendClientMessage(playerid, COLOR_GRAD2, string);
  6815.             }
  6816.             if(listitem == 1)
  6817.             {
  6818.                 if(PlayerInfo[playerid][pCash] <= 49)
  6819.                 {
  6820.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6821.                     return 1;
  6822.                 }
  6823.                 GivePlayerWeapon(playerid, 46, 500); //  padobran
  6824.                 GivePlayerMoney(playerid, -50);
  6825.                 format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
  6826.                 SendClientMessage(playerid, COLOR_GRAD2, string);
  6827.             }
  6828.             if(listitem == 2)
  6829.             {
  6830.                 if(PlayerInfo[playerid][pCash] <= 79)
  6831.                 {
  6832.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6833.                     return 1;
  6834.                 }
  6835.                 GivePlayerWeapon(playerid, 22, 500); // 9mm
  6836.                 GivePlayerMoney(playerid, -80);
  6837.                 format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
  6838.                 SendClientMessage(playerid, COLOR_GRAD2, string);
  6839.             }
  6840.             if(listitem == 3)
  6841.             {
  6842.                 if(PlayerInfo[playerid][pCash] <= 99)
  6843.                 {
  6844.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6845.                     return 1;
  6846.                 }
  6847.                 GivePlayerWeapon(playerid, 23, 500); // Priguseni 9mm
  6848.                 GivePlayerMoney(playerid, -100);
  6849.                 format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
  6850.                 SendClientMessage(playerid, COLOR_GRAD2, string);
  6851.             }
  6852.             if(listitem == 4)
  6853.             {
  6854.                 if(PlayerInfo[playerid][pCash] <= 149)
  6855.                 {
  6856.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6857.                     return 1;
  6858.                 }
  6859.                 GivePlayerWeapon(playerid, 24, 500); //Desert Eagle
  6860.                 GivePlayerMoney(playerid, -150);
  6861.                 format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
  6862.                 SendClientMessage(playerid, COLOR_GRAD2, string);
  6863.             }
  6864.             if(listitem == 5)
  6865.             {
  6866.                 if(PlayerInfo[playerid][pCash] <= 199)
  6867.                 {
  6868.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6869.                     return 1;
  6870.                 }
  6871.                 GivePlayerWeapon(playerid, 26, 500); //Sawn-off
  6872.                 GivePlayerMoney(playerid, -200);
  6873.                 format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
  6874.                 SendClientMessage(playerid, COLOR_GRAD2, string);
  6875.             }
  6876.             if(listitem == 6)
  6877.             {
  6878.                 if(PlayerInfo[playerid][pCash] <= 249)
  6879.                 {
  6880.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6881.                     return 1;
  6882.                 }
  6883.                 GivePlayerWeapon(playerid, 29, 500); //MP5
  6884.                 GivePlayerMoney(playerid, -250);
  6885.                 format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
  6886.                 SendClientMessage(playerid, COLOR_GRAD2, string);
  6887.             }
  6888.             if(listitem == 7)
  6889.             {
  6890.                 if(PlayerInfo[playerid][pCash] <= 399)
  6891.                 {
  6892.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6893.                     return 1;
  6894.                 }
  6895.                 GivePlayerWeapon(playerid, 30, 500); //AK-47
  6896.                 GivePlayerMoney(playerid, -400);
  6897.                 format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
  6898.                 SendClientMessage(playerid, COLOR_GRAD2, string);
  6899.             }
  6900.             if(listitem == 8)
  6901.             {
  6902.                 if(PlayerInfo[playerid][pCash] <= 419)
  6903.                 {
  6904.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6905.                     return 1;
  6906.                 }
  6907.                 GivePlayerWeapon(playerid, 31, 500); //M4
  6908.                 GivePlayerMoney(playerid, -420);
  6909.                 format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
  6910.                 SendClientMessage(playerid, COLOR_GRAD2, string);
  6911.             }
  6912.             if(listitem == 9)
  6913.             {
  6914.                 if(PlayerInfo[playerid][pCash] <= 449)
  6915.                 {
  6916.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6917.                     return 1;
  6918.                 }
  6919.                 GivePlayerWeapon(playerid, 32, 500); //Tec-9
  6920.                 GivePlayerMoney(playerid, -450);
  6921.                 format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
  6922.                 SendClientMessage(playerid, COLOR_GRAD2, string);
  6923.             }
  6924.  
  6925.         }
  6926.         return 1;
  6927.     }
  6928.     if(dialogid == 8) // CarUpgrade
  6929.     {
  6930.         new house = PlayerInfo[playerid][pPhousekey];
  6931.         new string[400];
  6932.         if(response)
  6933.         {
  6934.             if(listitem == 0) // Infernus
  6935.             {
  6936.                 if(PlayerInfo[playerid][pCash] <= 0)
  6937.                 {
  6938.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6939.                     return 1;
  6940.                 }
  6941.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  6942.                 HouseInfo[house][hVec] = 411;
  6943.                 GivePlayerMoney(playerid, -350000);
  6944.                 format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Infernus) za 350000$.", PlayerInfo[playerid][pCHBodovi]);
  6945.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  6946.             }
  6947.             if(listitem == 1) // Turismo
  6948.             {
  6949.                 if(PlayerInfo[playerid][pCash] <= 0)
  6950.                 {
  6951.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6952.                     return 1;
  6953.                 }
  6954.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  6955.                 GivePlayerMoney(playerid, -300000);
  6956.                 HouseInfo[house][hVec] = 451;
  6957.                 format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Turismo) za 300000$.", PlayerInfo[playerid][pCHBodovi]);
  6958.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  6959.             }
  6960.             if(listitem == 2) // Elegy
  6961.             {
  6962.                 if(PlayerInfo[playerid][pCash] <= 0)
  6963.                 {
  6964.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6965.                     return 1;
  6966.                 }
  6967.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  6968.                 GivePlayerMoney(playerid, -100000);
  6969.                 HouseInfo[house][hVec] = 562;
  6970.                 format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Elegy) za 100000$.", PlayerInfo[playerid][pCHBodovi]);
  6971.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  6972.             }
  6973.             if(listitem == 3) // Jester
  6974.             {
  6975.                 if(PlayerInfo[playerid][pCash] <= 0)
  6976.                 {
  6977.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6978.                     return 1;
  6979.                 }
  6980.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  6981.                 GivePlayerMoney(playerid, -200000);
  6982.                 HouseInfo[house][hVec] = 559;
  6983.                 format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Jester) za 200000$.", PlayerInfo[playerid][pCHBodovi]);
  6984.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  6985.             }
  6986.             if(listitem == 4) // Sultan
  6987.             {
  6988.                 if(PlayerInfo[playerid][pCash] <= 0)
  6989.                 {
  6990.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  6991.                     return 1;
  6992.                 }
  6993.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  6994.                 GivePlayerMoney(playerid, -150000);
  6995.                 HouseInfo[house][hVec] = 560;
  6996.                 format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Sultan) za 150000$.", PlayerInfo[playerid][pCHBodovi]);
  6997.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  6998.             }
  6999.             if(listitem == 5) // Monster
  7000.             {
  7001.                 if(PlayerInfo[playerid][pCash] <= 0)
  7002.                 {
  7003.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  7004.                     return 1;
  7005.                 }
  7006.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  7007.                 GivePlayerMoney(playerid, -400000);
  7008.                 HouseInfo[house][hVec] = 444;
  7009.                 format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Monster) za 400000$.", PlayerInfo[playerid][pCHBodovi]);
  7010.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  7011.             }
  7012.             if(listitem == 6) // Hotring racer
  7013.             {
  7014.                 if(PlayerInfo[playerid][pCash] <= 0)
  7015.                 {
  7016.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
  7017.                     return 1;
  7018.                 }
  7019.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  7020.                 GivePlayerMoney(playerid, -450000);
  7021.                 HouseInfo[house][hVec] = 502;
  7022.                 format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Hotring Racer) za 450000$.", PlayerInfo[playerid][pCHBodovi]);
  7023.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  7024.             }
  7025.  
  7026.         }
  7027.         return 1;
  7028.     }
  7029.     if(dialogid == 155) // Donator
  7030.     {
  7031.         new string[400];
  7032.         if(response)
  7033.         {
  7034.             if(listitem == 0) // ExpPoen
  7035.             {
  7036.                 if(PlayerInfo[playerid][pCHBodovi] <= 0)
  7037.                 {
  7038.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate CroHerze Bodove!");
  7039.                     return 1;
  7040.                 }
  7041.                 PlayerInfo[playerid][pCHBodovi] = PlayerInfo[playerid][pCHBodovi]-1;
  7042.                 PlayerInfo[playerid][pExp]= PlayerInfo[playerid][pExp]+2;
  7043.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  7044.                 format(string, sizeof(string), "Donator: Zamijenio si 1 CH Bod za 2 Exp boda, imas jos %d CroHerze Bodova", PlayerInfo[playerid][pCHBodovi]);
  7045.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  7046.             }
  7047.             if(listitem == 1) // 1000000$
  7048.             {
  7049.                 if(PlayerInfo[playerid][pCHBodovi] <= 3)
  7050.                 {
  7051.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate CroHerze Bodove!");
  7052.                     return 1;
  7053.                 }
  7054.                 PlayerInfo[playerid][pCHBodovi] = PlayerInfo[playerid][pCHBodovi]-4;
  7055.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  7056.                 format(string, sizeof(string), "Donator: Zamijenio si 4 CH Boda za $1000000 ingame, imas jos %d CroHerze Bodova", PlayerInfo[playerid][pCHBodovi]);
  7057.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  7058.             }
  7059.             if(listitem == 2) // Micanje warna
  7060.             {
  7061.                 if(PlayerInfo[playerid][pCHBodovi] < 19)
  7062.                 {
  7063.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate CroHerze Bodove!");
  7064.                     return 1;
  7065.                 }
  7066.                 PlayerInfo[playerid][pWarns] = PlayerInfo[playerid][pWarns]-1;
  7067.                 PlayerInfo[playerid][pCHBodovi] = PlayerInfo[playerid][pCHBodovi]-20;
  7068.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  7069.                 format(string, sizeof(string), "Donator: Maknuo si warn za 20 CH Bodova, imas jos %d CroHerze Bodova", PlayerInfo[playerid][pCHBodovi]);
  7070.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  7071.             }
  7072.             if(listitem == 3) // SpawnHealth
  7073.             {
  7074.                 if(PlayerInfo[playerid][pCHBodovi] <= 4)
  7075.                 {
  7076.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate CroHerze Bodove!");
  7077.                     return 1;
  7078.                 }
  7079.                 PlayerInfo[playerid][pCHBodovi] = PlayerInfo[playerid][pCHBodovi]-5;
  7080.                 PlayerInfo[playerid][pSHealth] = PlayerInfo[playerid][pSHealth]+100;
  7081.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  7082.                 format(string, sizeof(string), "Donator: Zamijenio si 5 CH Boda za 150 SpawnHealta, imas jos %d CroHerze Bodova", PlayerInfo[playerid][pCHBodovi]);
  7083.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  7084.             }
  7085.             if(listitem == 4) // LevelUp
  7086.             {
  7087.                 if(PlayerInfo[playerid][pCHBodovi] <= 9)
  7088.                 {
  7089.                     SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate CroHerze Bodove!");
  7090.                     return 1;
  7091.                 }
  7092.                 PlayerInfo[playerid][pCHBodovi] = PlayerInfo[playerid][pCHBodovi]-10;
  7093.                 PlayerInfo[playerid][pLevel]++;
  7094.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  7095.                 format(string, sizeof(string), "Donator: Zamijenio si 10 CH Bodova za Level UP, imas jos %d CroHerze Bodova", PlayerInfo[playerid][pCHBodovi]);
  7096.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  7097.             }
  7098.  
  7099.         }
  7100.         return 1;
  7101.     }
  7102.     if(dialogid == dialogv && response == 1)
  7103.     {
  7104.         switch(listitem)
  7105.         {
  7106.                 case 0:
  7107.                 {
  7108.                     if(openclose[playerid] == false)
  7109.                     {
  7110.                             new vid = GetPlayerVehicleID(playerid);
  7111.                             GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  7112.                             SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
  7113.                             openclose[playerid] = true;
  7114.                     }
  7115.                     else if(openclose[playerid] == true)
  7116.                     {
  7117.                             new vid = GetPlayerVehicleID(playerid);
  7118.                             GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  7119.                             SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
  7120.                             openclose[playerid] = false;
  7121.                     }
  7122.                 }
  7123.                 case 1:
  7124.                 {
  7125.                     if(openclose1[playerid] == false)
  7126.                     {
  7127.                             new vid = GetPlayerVehicleID(playerid);
  7128.                             GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  7129.                             SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
  7130.                             openclose1[playerid] = true;
  7131.                     }
  7132.                     else if(openclose1[playerid] == true)
  7133.                     {
  7134.                             new vid = GetPlayerVehicleID(playerid);
  7135.                             GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  7136.                             SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,VEHICLE_PARAMS_OFF,doors,bonnet,boot,objective);
  7137.                             openclose1[playerid] = false;
  7138.                     }
  7139.                 }
  7140.                 case 2:
  7141.                 {
  7142.                     if(openclose2[playerid] == false)
  7143.                     {
  7144.                             new vid = GetPlayerVehicleID(playerid);
  7145.                             GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  7146.                             SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,VEHICLE_PARAMS_ON);
  7147.                             openclose2[playerid] = true;
  7148.                     }
  7149.                     else if(openclose2[playerid] == true)
  7150.                     {
  7151.                             new vid = GetPlayerVehicleID(playerid);
  7152.                             GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  7153.                             SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,VEHICLE_PARAMS_OFF);
  7154.                             openclose2[playerid] = false;
  7155.                     }
  7156.                 }
  7157.                 case 3:
  7158.                 {
  7159.                     if(openclose3[playerid] == false)
  7160.                     {
  7161.                             new vid = GetPlayerVehicleID(playerid);
  7162.                             GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  7163.                             SetVehicleParamsEx(vid,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);
  7164.                             openclose3[playerid] = true;
  7165.                     }
  7166.                     else if(openclose3[playerid] == true)
  7167.                     {
  7168.                             new vid = GetPlayerVehicleID(playerid);
  7169.                             GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  7170.                             SetVehicleParamsEx(vid,engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
  7171.                             openclose3[playerid] = false;
  7172.                     }
  7173.                 }
  7174.                 case 4:
  7175.                 {
  7176.                     if(openclose4[playerid] == false)
  7177.                     {
  7178.                             new vid = GetPlayerVehicleID(playerid);
  7179.                             GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  7180.                             SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
  7181.                             openclose4[playerid] = true;
  7182.                     }
  7183.                     else if(openclose4[playerid] == true)
  7184.                     {
  7185.                             new vid = GetPlayerVehicleID(playerid);
  7186.                             GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  7187.                             SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
  7188.                             openclose4[playerid] = false;
  7189.                     }
  7190.                 }
  7191.             }
  7192.     }
  7193.     new sendername[MAX_PLAYER_NAME];
  7194.     new string[128];
  7195.     if(response)
  7196.     {
  7197.         if(dialogid == 12346 || dialogid == 12347)
  7198.         {
  7199.             if(strlen(inputtext))
  7200.             {
  7201.                 new tmppass[64];
  7202.                 strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
  7203.                 Encript(tmppass);
  7204.                 OnPlayerLogin(playerid,tmppass);
  7205.             }
  7206.             else
  7207.             {
  7208.                 new loginstring[400];
  7209.                 new loginname[64];
  7210.                 GetPlayerName(playerid,loginname,sizeof(loginname));
  7211.                 format(loginstring,sizeof(loginstring),"{33BBFF}___________________________________________\n{F81414}[Greska] {FFFF22}Unijeli ste pogresnu lozinku\n\n{33BBFF}%s\n{FFFFFF}Tvoj korisnicki racun je pronadjen!\n\nMolimo upisi svoju lozinku da udjes na server:\n{33BBFF}___________________________________________",loginname);
  7212.                 ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"{FFFFFF}Logiranje",loginstring,"Logiraj","Odustani");
  7213.                 gPlayerLogTries[playerid] += 1;
  7214.                 if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
  7215.             }
  7216.         }
  7217.         if(dialogid == 12345)
  7218.         {
  7219.             if(strlen(inputtext))
  7220.             {
  7221.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  7222.                 format(string, sizeof(string), "%s.ini", sendername);
  7223.                 new File: hFile = fopen(string, io_read);
  7224.                 if (hFile)
  7225.                 {
  7226.                     SendClientMessage(playerid, COLOR_YELLOW, "Ime je vec registrirano, molimo izaberite neko drugo.");
  7227.                     fclose(hFile);
  7228.                     return 1;
  7229.                 }
  7230.                 new tmppass[64];
  7231.                 strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
  7232.                 Encript(tmppass);
  7233.                 OnPlayerRegister(playerid,tmppass);
  7234.             }
  7235.             else
  7236.             {
  7237.                 new regstring[400];
  7238.                 new regname[64];
  7239.                 GetPlayerName(playerid,regname,sizeof(regname));
  7240.                 format(regstring,sizeof(regstring),"{FFFFFF}Dobrodosli na pocetak registracije \n{33BBFF}%s\n{FFFFFF}Vas racun nije registriran, molimo upisite zeljenu lozinku:",regname);
  7241.                 ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"{33BBFF}Registracija",regstring,"Registriraj","Odustani");
  7242.                 gPlayerLogTries[playerid] += 1;
  7243.             }
  7244.         }
  7245.     }
  7246. return 1;
  7247. }
  7248. public SetPlayerUnMute()
  7249. {
  7250.     foreach(Player, i)
  7251.     {
  7252.         if(IsPlayerConnected(i))
  7253.         {
  7254.               if(PlayerInfo[i][pMuted] > 0)
  7255.             {
  7256.                 if(PlayerInfo[i][pMuteTime] > 0)
  7257.                 {
  7258.                     PlayerInfo[i][pMuteTime]--;
  7259.                 }
  7260.                 if(PlayerInfo[i][pMuteTime] <= 0)
  7261.                 {
  7262.                     PlayerInfo[i][pMuteTime] = 0;
  7263.                     if(PlayerInfo[i][pMuted] == 1)
  7264.                     {
  7265.                         PlayerInfo[i][pMuted] = 0;
  7266.                     }
  7267.                     PlayerInfo[i][pMuted] = 0;
  7268.                     new string[128];
  7269.                     new sendername[MAX_PLAYER_NAME];
  7270.                     new playerid;
  7271.                     format(string, sizeof(string), " ", sendername);
  7272.                     if (PlayerInfo[playerid][pAdmin] >= 1339)
  7273.                     SendAdminMessage(COLOR_YELLOW, string);
  7274.                 }
  7275.             }
  7276.           }
  7277.        }
  7278. }
  7279. public OnPlayerUpdate(playerid)
  7280. {
  7281.     if(IsPlayerConnected(playerid))
  7282.     {
  7283.         if(gPlayerLogged[playerid])
  7284.         {
  7285.             new string3[64];
  7286.             new playername3[MAX_PLAYER_NAME];
  7287.             GetPlayerName(playerid, playername3, sizeof(playername3));
  7288.             format(string3, sizeof(string3), "%s.ini", playername3);
  7289.             new File: hFile = fopen(string3, io_write);
  7290.             if (hFile)
  7291.             {
  7292.                 new var[64];
  7293.                 format(var, 64, "MuteTime=%d\n",PlayerInfo[playerid][pMuteTime]);fwrite(hFile, var);
  7294.                 format(var, 32, "CHBodovi=%d\n",PlayerInfo[playerid][pCHBodovi]);fwrite(hFile, var);
  7295.                 format(var, 32, "GameSageLevel=%d\n",PlayerInfo[playerid][pGameSage]);fwrite(hFile, var);
  7296.                 fclose(hFile);
  7297.             }
  7298.         }
  7299.     }
  7300.     return 1;
  7301. }
  7302. //------------------------------------------------------------------------------------------------------
  7303. public OnGameModeInit()
  7304. {
  7305.     FA = GangZoneCreate(1186.889526, -871.864624, 1354.889526, -727.864624);
  7306.     GM = GangZoneCreate(2421.055664, -1743.055541, 2557.055664, -1623.055541);
  7307.     BM = GangZoneCreate(1077.398559, -2088.943847, 1285.398559, -1992.943725);
  7308.     RUS = GangZoneCreate(1581.190795, -1750.591552, 1717.190795, -1582.591552);
  7309.     BMK = CreateDynamicObject(980, 1282.37890625, -2056.4560546875, 60.626445770264, 0, 0, 270);
  7310.     RMK = CreateDynamicObject(971, 1642.8533935547, -1714.8718261719, 22.73189163208, 0, 0, 270.25);
  7311.     GMK = CreateDynamicObject(980, 2443.83984375, -1658.8203125, 15.085716247559, 0, 0, 90);
  7312.     FAK = CreateDynamicObject(980, 1244.9997558594, -757.40399169922, 94.96736907959, 0, 0, 14);
  7313.     unmutetimer = SetTimer("SetPlayerUnMute", 1000, 1);
  7314.     LoadConfig();
  7315.     LoadTmp();
  7316.     LoadProperty();
  7317.     LoadBizz();
  7318.     LoadSBizz();
  7319.     //PlayerHaul[78][pLoad] = 10000;
  7320.     PlayerHaul[105][pCapasity] = 10;
  7321.     //PlayerHaul[79][pLoad] = 10000;
  7322.     PlayerHaul[106][pCapasity] = 10;
  7323.     //PlayerHaul[80][pLoad] = 10000;
  7324.     PlayerHaul[107][pCapasity] = 10;
  7325.     //PlayerHaul[81][pLoad] = 10000;
  7326.     PlayerHaul[108][pCapasity] = 10;
  7327.     SetGameModeText("CHDM 1.1.1 R1: Good old times");
  7328.     format(objstore, sizeof(objstore), "MOLE: nemam nista za tebe, probaj kasnije.");
  7329.     format(cbjstore, sizeof(cbjstore), "HQ: There is Nothing in Your Vicinity, Out.");
  7330.     gettime(ghour, gminute, gsecond);
  7331.     GodTimer = SetTimer("InfiniteLife",50,1);
  7332.     FixHour(ghour);
  7333.     ghour = shifthour;
  7334.     if(!realtime)
  7335.     {
  7336.         SetWorldTime(wtime);
  7337.     }
  7338.     ShowPlayerMarkers(1);
  7339.     ShowNameTags(1);
  7340.     // Player Class's
  7341.     for(new i = 0; i <= sizeof(Peds)-1; i++)
  7342.     {
  7343.         AddPlayerClass(101,2231.7495,-1178.9769,29.8044,0.6867,0,0,0,0,0,0); // SPAWN
  7344.     }
  7345.     for(new h = 0; h < sizeof(HouseInfo); h++)
  7346.     {
  7347.         if (gdebug >= 1){printf("HouseInfo[%d][hVec] %d",h,HouseInfo[h][hVec]);}
  7348.         CreateVehicle(HouseInfo[h][hVec], HouseCarSpawns[h][0], HouseCarSpawns[h][1], HouseCarSpawns[h][2], HouseCarSpawns[h][3], HouseInfo[h][hVcol1], HouseInfo[h][hVcol2], 10000);
  7349.         gCarLock[h+1] = 1;
  7350.     }//34
  7351.    
  7352. /*--------------------|Obijekti|--------------------*/
  7353.  
  7354.  
  7355.  
  7356.  
  7357. /*--------------------|Spawn|--------------------*/
  7358. CreateDynamicObject(966,2225.25317383,-1145.25439453,24.79896355,0.00000000,0.00000000,342.00000000); //rampa (1)
  7359. CreateDynamicObject(968,2225.03759766,-1145.16601562,25.79896355,0.00000000,0.00000000,352.00000000); //rampa (2)
  7360. CreateDynamicObject(1215,993.74682617,-915.90081787,41.74401093,0.00000000,0.00000000,0.00000000); //object(bollardlight) (1)
  7361. CreateDynamicObject(1215,993.39166260,-918.53057861,41.74401093,0.00000000,0.00000000,0.00000000); //object(bollardlight) (2)
  7362. CreateDynamicObject(1215,2232.65014648,-1123.61523438,38.10374832,0.00000000,0.00000000,0.00000000); //object(bollardlight) (3)
  7363. CreateDynamicObject(1215,2214.23510742,-1147.68505859,25.32724953,0.00000000,0.00000000,0.00000000); //object(bollardlight) (4)
  7364. CreateDynamicObject(1215,2230.54150391,-1149.76562500,25.43802261,0.00000000,0.00000000,0.00000000); //object(bollardlight) (5)
  7365. CreateDynamicObject(1215,2208.31030273,-1150.31164551,33.80651093,0.00000000,0.00000000,0.00000000); //object(bollardlight) (6)
  7366. CreateDynamicObject(1215,2214.19726562,-1145.32128906,25.34948349,0.00000000,0.00000000,0.00000000); //object(bollardlight) (7)
  7367. CreateDynamicObject(1215,2208.31616211,-1138.89086914,33.80651093,0.00000000,0.00000000,0.00000000); //object(bollardlight) (8)
  7368. CreateDynamicObject(1215,2233.71972656,-1150.25024414,25.43986320,0.00000000,0.00000000,0.00000000); //object(bollardlight) (9)
  7369. CreateDynamicObject(982,2237.94848633,-1148.84240723,25.48442841,0.00000000,0.00000000,74.00000000); //object(fenceshit) (1)
  7370. CreateDynamicObject(982,2206.64794922,-1138.72692871,25.50610352,0.00000000,0.00000000,69.99389648); //object(fenceshit) (2)
  7371. CreateDynamicObject(2773,2215.29394531,-1147.54467773,25.28461647,0.00000000,0.00000000,94.00000000); //object(cj_airprt_bar) (12)
  7372. CreateDynamicObject(2773,2215.19897461,-1145.27258301,25.30220413,0.00000000,0.00000000,93.99902344); //object(cj_airprt_bar) (13)
  7373. /*--------------------|Dolca|--------------------*/
  7374. CreateDynamicObject(14537, 1296.775391, -1431.326172, 27.508877, 0.0000, 0.0000, 0.0000);
  7375. CreateDynamicObject(970, 1318.139404, -1423.284790, 26.757189, 0.0000, 0.0000, 0.0000);
  7376. CreateDynamicObject(970, 1322.418091, -1423.302734, 26.762724, 0.0000, 0.0000, 0.0000);
  7377. CreateDynamicObject(970, 1313.888062, -1423.287231, 26.755972, 0.0000, 0.0000, 0.0000);
  7378. CreateDynamicObject(970, 1309.622925, -1423.291504, 26.752636, 0.0000, 0.0000, 0.0000);
  7379. CreateDynamicObject(970, 1305.357666, -1423.299438, 26.752958, 0.0000, 0.0000, 0.0000);
  7380. CreateDynamicObject(970, 1301.092285, -1423.311523, 26.750967, 0.0000, 0.0000, 0.0000);
  7381. CreateDynamicObject(970, 1296.806030, -1423.302979, 26.748644, 0.0000, 0.0000, 0.0000);
  7382. CreateDynamicObject(970, 1292.536377, -1423.296265, 26.748150, 0.0000, 0.0000, 0.0000);
  7383. CreateDynamicObject(970, 1288.264771, -1423.300781, 26.746767, 0.0000, 0.0000, 0.0000);
  7384. CreateDynamicObject(970, 1283.997192, -1423.316772, 26.744482, 0.0000, 0.0000, 0.0000);
  7385. CreateDynamicObject(970, 1279.715576, -1423.317017, 26.745405, 0.0000, 0.0000, 0.0000);
  7386. CreateDynamicObject(970, 1275.395630, -1423.322510, 26.743942, 0.0000, 0.0000, 0.0000);
  7387. CreateDynamicObject(970, 1271.076050, -1423.301147, 26.744604, 0.0000, 0.0000, 0.0000);
  7388. CreateDynamicObject(970, 1266.792114, -1423.304443, 26.741350, 0.0000, 0.0000, 0.0000);
  7389. CreateDynamicObject(970, 1262.492798, -1423.281738, 26.738161, 0.0000, 0.0000, 0.0000);
  7390. CreateDynamicObject(970, 1325.062378, -1424.669922, 26.597929, 0.0000, 0.0000, 270.0000);
  7391. CreateDynamicObject(1520, 1301.388428, -1430.541870, 26.737856, 0.0000, 0.0000, 0.0000);
  7392. CreateDynamicObject(1520, 1301.305176, -1433.914185, 26.737856, 0.0000, 0.0000, 0.0000);
  7393. CreateDynamicObject(1520, 1296.792358, -1426.977173, 26.737856, 0.0000, 0.0000, 0.0000);
  7394. CreateDynamicObject(1544, 1302.031128, -1431.156006, 26.674551, 0.0000, 0.0000, 0.0000);
  7395. CreateDynamicObject(1544, 1301.200317, -1429.172241, 26.674551, 0.0000, 0.0000, 0.0000);
  7396. CreateDynamicObject(1544, 1298.980713, -1426.955688, 26.674551, 0.0000, 0.0000, 0.0000);
  7397. CreateDynamicObject(1544, 1300.223511, -1426.937378, 26.674551, 0.0000, 0.0000, 0.0000);
  7398. CreateDynamicObject(1544, 1301.199463, -1427.623657, 26.674551, 0.0000, 0.0000, 0.0000);
  7399. CreateDynamicObject(1544, 1299.643433, -1435.747314, 26.674551, 0.0000, 0.0000, 0.0000);
  7400. CreateDynamicObject(1664, 1300.442017, -1435.719849, 26.845430, 0.0000, 0.0000, 0.0000);
  7401. CreateDynamicObject(1664, 1292.118164, -1434.544434, 26.845430, 0.0000, 0.0000, 0.0000);
  7402. CreateDynamicObject(1664, 1294.122925, -1435.853882, 26.845430, 0.0000, 0.0000, 0.0000);
  7403. CreateDynamicObject(1667, 1292.424805, -1435.497437, 26.767305, 0.0000, 0.0000, 0.0000);
  7404. CreateDynamicObject(1667, 1292.536011, -1433.374634, 26.767305, 0.0000, 0.0000, 0.0000);
  7405. CreateDynamicObject(1667, 1292.697998, -1432.486328, 26.767305, 0.0000, 0.0000, 0.0000);
  7406. CreateDynamicObject(1669, 1292.528076, -1427.247314, 26.845430, 0.0000, 0.0000, 0.0000);
  7407. CreateDynamicObject(1669, 1293.786133, -1426.875732, 26.845430, 0.0000, 0.0000, 0.0000);
  7408. CreateDynamicObject(1669, 1292.229004, -1429.477539, 26.845430, 0.0000, 0.0000, 0.0000);
  7409. CreateDynamicObject(1951, 1291.875244, -1432.339844, 26.866894, 0.0000, 0.0000, 0.0000);
  7410. CreateDynamicObject(1951, 1291.494873, -1431.030396, 26.866894, 0.0000, 0.0000, 0.0000);
  7411. CreateDynamicObject(1951, 1292.151489, -1430.709839, 26.866894, 0.0000, 0.0000, 0.0000);
  7412. CreateDynamicObject(1951, 1292.427124, -1428.704712, 26.866894, 0.0000, 0.0000, 0.0000);
  7413. CreateDynamicObject(1951, 1292.221436, -1428.464600, 26.866894, 0.0000, 0.0000, 0.0000);
  7414. CreateDynamicObject(1951, 1296.061768, -1426.753540, 26.866894, 0.0000, 0.0000, 0.0000);
  7415. CreateDynamicObject(1951, 1296.357422, -1425.999512, 26.866894, 0.0000, 0.0000, 0.0000);
  7416. CreateDynamicObject(1951, 1301.303467, -1428.077393, 26.866894, 0.0000, 0.0000, 0.0000);
  7417. CreateDynamicObject(1951, 1301.255737, -1434.992310, 26.866894, 0.0000, 0.0000, 0.0000);
  7418. CreateDynamicObject(1951, 1297.576660, -1436.039795, 26.866894, 0.0000, 0.0000, 0.0000);
  7419. CreateDynamicObject(1487, 1296.860107, -1436.586060, 26.876181, 0.0000, 0.0000, 0.0000);
  7420. CreateDynamicObject(1487, 1297.426636, -1436.424316, 26.876181, 0.0000, 0.0000, 0.0000);
  7421. CreateDynamicObject(1487, 1294.887085, -1435.796387, 26.876181, 0.0000, 0.0000, 0.0000);
  7422. CreateDynamicObject(1487, 1292.898315, -1435.586792, 26.876181, 0.0000, 0.0000, 0.0000);
  7423. CreateDynamicObject(1716, 1291.044189, -1428.879272, 25.763081, 0.0000, 0.0000, 0.0000);
  7424. CreateDynamicObject(1716, 1291.389893, -1434.067383, 25.344229, 0.0000, 0.0000, 0.0000);
  7425. CreateDynamicObject(1716, 1293.982788, -1425.335815, 26.042379, 0.0000, 0.0000, 0.0000);
  7426. CreateDynamicObject(1716, 1291.432983, -1426.625732, 25.940344, 0.0000, 0.0000, 0.0000);
  7427. CreateDynamicObject(1716, 1299.031860, -1425.343384, 26.043020, 0.0000, 0.0000, 0.0000);
  7428. CreateDynamicObject(1716, 1296.611328, -1424.597290, 26.101084, 0.0000, 0.0000, 0.0000);
  7429. CreateDynamicObject(1716, 1302.713013, -1428.723267, 25.769770, 0.0000, 0.0000, 0.0000);
  7430. CreateDynamicObject(1716, 1302.507690, -1426.756958, 25.932737, 0.0000, 0.0000, 0.0000);
  7431. CreateDynamicObject(1716, 1301.800659, -1425.381592, 26.040697, 0.0000, 0.0000, 0.0000);
  7432. CreateDynamicObject(1716, 1302.640137, -1433.433105, 25.397165, 0.0000, 0.0000, 0.0000);
  7433. CreateDynamicObject(1716, 1300.052124, -1436.793945, 25.130657, 0.0000, 0.0000, 0.0000);
  7434. CreateDynamicObject(1716, 1302.476440, -1435.947144, 25.198240, 0.0000, 0.0000, 0.0000);
  7435. CreateDynamicObject(1716, 1294.541992, -1436.588135, 25.145594, 0.0000, 0.0000, 0.0000);
  7436. CreateDynamicObject(1716, 1297.113892, -1437.181763, 25.099262, 0.0000, 0.0000, 0.0000);
  7437. CreateDynamicObject(1716, 1291.794678, -1436.164795, 25.178413, 0.0000, 0.0000, 0.0000);
  7438. CreateDynamicObject(1716, 1290.655518, -1431.192139, 25.581148, 0.0000, 0.0000, 0.0000);
  7439. CreateDynamicObject(12950, 1320.354126, -1368.116333, 14.484624, 0.0000, 0.0000, 90.0000);
  7440. CreateDynamicObject(1692, 1325.227783, -1359.070068, 35.491604, 0.0000, 0.0000, 270.0000);
  7441. CreateDynamicObject(1692, 1295.761841, -1358.927368, 35.484970, 0.0000, 0.0000, 270.0000);
  7442. CreateDynamicObject(1649, 1312.340088, -1366.440918, 14.524384, 0.0000, 0.0000, 0.0000);
  7443. CreateDynamicObject(1649, 1307.998779, -1366.480469, 14.529383, 0.0000, 0.0000, 0.0000);
  7444. CreateDynamicObject(643, 1309.583374, -1432.520874, 25.941616, 0.0000, 0.0000, 0.0000);
  7445. CreateDynamicObject(643, 1313.495728, -1427.866211, 26.310799, 0.0000, 0.0000, 0.0000);
  7446. CreateDynamicObject(643, 1307.061279, -1426.114258, 26.454973, 0.0000, 0.0000, 0.0000);
  7447. CreateDynamicObject(643, 1317.555664, -1433.174927, 25.891821, 0.0000, 0.0000, 0.0000);
  7448. CreateDynamicObject(643, 1319.686768, -1426.685425, 26.405720, 0.0000, 0.0000, 0.0000);
  7449. CreateDynamicObject(643, 1321.847168, -1431.994629, 25.986252, 0.0000, 0.0000, 0.0000);
  7450. CreateDynamicObject(643, 1286.817749, -1426.967407, 26.382936, 0.0000, 0.0000, 0.0000);
  7451. CreateDynamicObject(643, 1285.915527, -1433.688110, 25.843475, 0.0000, 0.0000, 0.0000);
  7452. CreateDynamicObject(643, 1278.653931, -1433.158447, 25.894201, 0.0000, 0.0000, 0.0000);
  7453. CreateDynamicObject(643, 1278.464355, -1426.490723, 26.418367, 0.0000, 0.0000, 0.0000);
  7454. CreateDynamicObject(643, 1271.978638, -1427.678223, 26.323423, 0.0000, 0.0000, 0.0000);
  7455. CreateDynamicObject(643, 1266.782227, -1431.635010, 26.011066, 0.0000, 0.0000, 0.0000);
  7456. CreateDynamicObject(643, 1273.136963, -1434.405396, 25.794823, 0.0000, 0.0000, 0.0000);
  7457. CreateDynamicObject(643, 1265.760376, -1425.582642, 26.486652, 0.0000, 0.0000, 0.0000);
  7458. CreateDynamicObject(643, 1282.508423, -1429.961426, 26.146496, 0.0000, 0.0000, 0.0000);
  7459. CreateDynamicObject(1364, 1294.956055, -1367.877808, 13.377698, 0.0000, 0.0000, 0.0000);
  7460. CreateDynamicObject(1364, 1325.206787, -1367.921631, 13.392337, 0.0000, 0.0000, 0.0000);
  7461. CreateDynamicObject(3806, 1288.747192, -1367.696167, 17.344603, 0.0000, 0.0000, 270.0000);
  7462. CreateDynamicObject(3806, 1330.984375, -1367.671997, 17.563906, 0.0000, 0.0000, 270.0000);
  7463. CreateDynamicObject(3806, 1309.918335, -1364.980469, 15.157018, 0.0000, 0.0000, 270.0000);
  7464. CreateDynamicObject(624, 1329.079834, -1382.637207, 12.970345, 0.0000, 0.0000, 292.5000);
  7465. CreateDynamicObject(624, 1321.418701, -1383.020752, 12.974278, 0.0000, 0.0000, 0.0000);
  7466. CreateDynamicObject(624, 1298.916748, -1383.567505, 12.848860, 0.0000, 0.0000, 0.0000);
  7467. CreateDynamicObject(624, 1291.108643, -1383.110962, 12.848859, 0.0000, 0.0000, 0.0000);
  7468. CreateDynamicObject(994, 1313.014404, -1384.856689, 12.877880, 0.0000, 0.0000, 0.0000);
  7469. CreateDynamicObject(994, 1301.056030, -1384.906128, 12.880520, 0.0000, 0.0000, 0.0000);
  7470. CreateDynamicObject(3850, 1309.499023, -1369.695190, 18.502922, 0.0000, 0.0000, 270.0000);
  7471. CreateDynamicObject(3850, 1310.385986, -1365.239624, 13.050342, 0.0000, 0.0000, 281.2500);
  7472. CreateDynamicObject(3850, 1306.499634, -1368.465088, 18.444965, 0.0000, 0.0000, 225.0000);
  7473. CreateDynamicObject(3850, 1303.544067, -1367.271973, 18.406551, 0.0000, 0.0000, 270.0000);
  7474. CreateDynamicObject(3850, 1312.983398, -1369.361816, 18.495602, 0.0000, 0.0000, 101.2500);
  7475. CreateDynamicObject(626, 1305.901245, -1364.552002, 19.909237, 0.0000, 0.0000, 0.0000);
  7476. CreateDynamicObject(626, 1315.086914, -1364.690308, 19.883617, 0.0000, 0.0000, 0.0000);
  7477. CreateDynamicObject(970, 1260.166260, -1425.276367, 26.590372, 0.0000, 0.0000, 270.0000);
  7478. CreateDynamicObject(970, 1260.217041, -1429.489136, 26.259205, 0.0000, 0.0000, 270.0000);
  7479. CreateDynamicObject(970, 1260.245483, -1433.703979, 25.927828, 0.0000, 0.0000, 270.0000);
  7480. CreateDynamicObject(970, 1261.405884, -1437.461304, 25.642546, 0.0000, 0.0000, 303.7500);
  7481. CreateDynamicObject(970, 1264.729248, -1438.987061, 25.503725, 0.0000, 0.0000, 0.0000);
  7482. CreateDynamicObject(970, 1268.935303, -1438.978882, 25.503725, 0.0000, 0.0000, 0.0000);
  7483. CreateDynamicObject(970, 1273.134155, -1438.969482, 25.503725, 0.0000, 0.0000, 0.0000);
  7484. CreateDynamicObject(970, 1277.326660, -1438.962280, 25.505156, 0.0000, 0.0000, 0.0000);
  7485. CreateDynamicObject(970, 1281.533325, -1438.958496, 25.508463, 0.0000, 0.0000, 0.0000);
  7486. CreateDynamicObject(970, 1285.749268, -1438.948242, 25.508327, 0.0000, 0.0000, 0.0000);
  7487. CreateDynamicObject(970, 1289.933594, -1438.957886, 25.508589, 0.0000, 0.0000, 0.0000);
  7488. CreateDynamicObject(970, 1294.116455, -1438.934692, 25.511452, 0.0000, 0.0000, 0.0000);
  7489. CreateDynamicObject(970, 1298.328003, -1438.927490, 25.513048, 0.0000, 0.0000, 0.0000);
  7490. CreateDynamicObject(970, 1302.516968, -1438.938110, 25.513239, 0.0000, 0.0000, 0.0000);
  7491. CreateDynamicObject(970, 1306.705811, -1438.935669, 25.514456, 0.0000, 0.0000, 0.0000);
  7492. CreateDynamicObject(970, 1325.146484, -1428.884399, 26.268589, 0.0000, 0.0000, 270.0000);
  7493. CreateDynamicObject(970, 1325.155273, -1432.933960, 25.989803, 0.0000, 0.0000, 270.0000);
  7494. CreateDynamicObject(970, 1324.406738, -1437.010498, 25.671078, 0.0000, 0.0000, 247.5000);
  7495. CreateDynamicObject(970, 1317.336060, -1438.948730, 25.516029, 0.0000, 0.0000, 180.0000);
  7496. CreateDynamicObject(970, 1315.111816, -1438.557007, 25.564278, 0.0000, 0.0000, 270.0000);
  7497. CreateDynamicObject(626, 1288.425293, -1367.974854, 14.610727, 0.0000, 0.0000, 0.0000);
  7498. CreateDynamicObject(626, 1332.149536, -1368.199097, 14.656949, 0.0000, 0.0000, 0.0000);
  7499. CreateDynamicObject(1240, 1178.172363, -1323.481201, 13.305486, 0.0000, 0.0000, 270.0000);
  7500. CreateDynamicObject(5822, 1313.186523, -1442.543823, 19.644150, 0.0000, 0.0000, 135.0000);
  7501. CreateDynamicObject(1470, 1309.830811, -1439.576050, 24.525509, 0.0000, 0.0000, 0.0000);
  7502. CreateDynamicObject(1470, 1311.344727, -1439.849121, 24.503777, 0.0000, 0.0000, 0.0000);
  7503. CreateDynamicObject(1470, 1312.849121, -1439.851318, 24.509308, 0.0000, 0.0000, 0.0000);
  7504. CreateDynamicObject(626, 1324.910034, -1438.014038, 27.088932, 0.0000, 0.0000, 0.0000);
  7505. CreateDynamicObject(626, 1260.966431, -1438.205444, 27.071213, 0.0000, 0.0000, 0.0000);
  7506. CreateDynamicObject(626, 1261.001831, -1417.967163, 16.067995, 0.0000, 0.0000, 0.0000);
  7507. CreateDynamicObject(626, 1326.886230, -1418.127686, 16.073830, 0.0000, 0.0000, 0.0000);
  7508. CreateDynamicObject(626, 1302.915161, -1418.085083, 15.796134, 0.0000, 0.0000, 0.0000);
  7509. CreateDynamicObject(626, 1290.706909, -1418.024902, 16.048771, 0.0000, 0.0000, 0.0000);
  7510. CreateDynamicObject(1470, 1314.338135, -1439.851318, 24.515383, 0.0000, 0.0000, 0.0000);
  7511. CreateDynamicObject(970, 1312.875488, -1440.669434, 25.477167, 0.0000, 0.0000, 180.0000);
  7512. CreateDynamicObject(626, 1324.708618, -1424.134155, 28.186905, 0.0000, 0.0000, 0.0000);
  7513. CreateDynamicObject(970, 1321.540039, -1438.948120, 25.517107, 0.0000, 0.0000, 180.0000);
  7514. CreateDynamicObject(1215, 1329.223999, -1366.669067, 13.986814, 0.0000, 0.0000, 0.0000);
  7515. CreateDynamicObject(1215, 1321.438599, -1366.672607, 13.938190, 0.0000, 0.0000, 0.0000);
  7516. CreateDynamicObject(1215, 1291.056519, -1366.683350, 13.970352, 0.0000, 0.0000, 0.0000);
  7517. CreateDynamicObject(1215, 1298.895508, -1366.726685, 13.958691, 0.0000, 0.0000, 0.0000);
  7518. CreateDynamicObject(1215, 1260.410034, -1416.368286, 13.185888, 0.0000, 0.0000, 0.0000);
  7519. CreateDynamicObject(1215, 1327.002197, -1416.266968, 13.196059, 0.0000, 0.0000, 0.0000);
  7520. CreateDynamicObject(1215, 1303.513062, -1366.601440, 18.424965, 0.0000, 0.0000, 0.0000);
  7521. CreateDynamicObject(1215, 1316.674438, -1366.729736, 18.433443, 0.0000, 0.0000, 0.0000);
  7522. CreateDynamicObject(1215, 1290.494141, -1416.421875, 12.991890, 0.0000, 0.0000, 0.0000);
  7523. CreateDynamicObject(1215, 1302.662231, -1416.466919, 13.082034, 0.0000, 0.0000, 0.0000);
  7524. CreateDynamicObject(14804, 1102.196045, -1097.722168, 25.882725, 0.0000, 0.0000, 348.7500);
  7525. CreateDynamicObject(14804, 1102.201050, -1104.664673, 25.868715, 0.0000, 0.0000, 258.7500);
  7526. CreateDynamicObject(801, 1097.881226, -1105.162842, 24.381977, 0.0000, 0.0000, 123.7499);
  7527. CreateDynamicObject(869, 1291.067383, -1373.602173, 13.934197, 0.0000, 0.0000, 258.7500);
  7528. CreateDynamicObject(869, 1291.120850, -1377.036865, 13.934197, 0.0000, 0.0000, 258.7500);
  7529. CreateDynamicObject(869, 1291.037476, -1380.472534, 13.934197, 0.0000, 0.0000, 258.7500);
  7530. CreateDynamicObject(869, 1290.831787, -1382.804199, 13.934197, 0.0000, 0.0000, 258.7500);
  7531. CreateDynamicObject(869, 1329.233521, -1383.156128, 14.061006, 0.0000, 0.0000, 258.7500);
  7532. CreateDynamicObject(869, 1329.193726, -1380.287354, 14.031581, 0.0000, 0.0000, 258.7500);
  7533. CreateDynamicObject(869, 1329.403076, -1377.549316, 14.003500, 0.0000, 0.0000, 258.7500);
  7534. CreateDynamicObject(869, 1329.336182, -1374.268066, 14.209698, 0.0000, 0.0000, 258.7500);
  7535. CreateDynamicObject(1232, 1093.841187, -1097.805786, 26.835865, 0.0000, 0.0000, 0.0000);
  7536. CreateDynamicObject(1232, 1093.629395, -1104.817261, 26.492481, 0.0000, 0.0000, 0.0000);
  7537. /*--------------------|Bistrik Mafia|--------------------*/
  7538. CreateDynamicObject(3749, 1284.3889160156, -2056.4833984375, 63.639297485352, 0, 0, 270);
  7539. CreateDynamicObject(7191, 1260.9556884766, -2065.5581054688, 60.221687316895, 0, 0, 268.5);
  7540. CreateDynamicObject(7191, 1260.955078125, -2065.5576171875, 64.171684265137, 0, 0, 268.49487304688);
  7541. CreateDynamicObject(7921, 1238.9625244141, -2066.9716796875, 60.380867004395, 0, 0, 179.99993896484);
  7542. CreateDynamicObject(7921, 1238.9676513672, -2067.8000488281, 60.380867004395, 0, 0, 179.99450683594);
  7543. CreateDynamicObject(7921, 1238.955078125, -2070.4772949219, 60.380867004395, 0, 0, 359.99450683594);
  7544. CreateDynamicObject(7921, 1238.9619140625, -2066.9716796875, 63.055862426758, 0, 0, 179.99450683594);
  7545. CreateDynamicObject(7921, 1238.9619140625, -2066.9716796875, 65.205902099609, 0, 0, 179.99450683594);
  7546. CreateDynamicObject(7921, 1238.966796875, -2067.7998046875, 63.055847167969, 0, 0, 179.99450683594);
  7547. CreateDynamicObject(7921, 1238.966796875, -2067.7998046875, 65.205810546875, 0, 0, 179.99450683594);
  7548. CreateDynamicObject(7921, 1238.955078125, -2070.4765625, 63.055862426758, 0, 0, 359.98901367188);
  7549. CreateDynamicObject(7921, 1238.955078125, -2070.4765625, 65.20588684082, 0, 0, 359.98901367188);
  7550. CreateDynamicObject(8659, 1225.7421875, -2071.8032226563, 65.139984130859, 1.8793334960938, 20.01123046875, 359.56573486328);
  7551. CreateDynamicObject(8659, 1225.7465820313, -2071.8525390625, 67.114967346191, 1.878662109375, 20.006103515625, 359.31335449219);
  7552. CreateDynamicObject(8659, 1225.7524414063, -2071.90234375, 69.064933776855, 1.878662109375, 20.006103515625, 359.31335449219);
  7553. CreateDynamicObject(8659, 1225.8129882813, -2071.9565429688, 70.689895629883, 1.878662109375, 20.006103515625, 359.31335449219);
  7554. CreateDynamicObject(7191, 1190.2268066406, -2072.0144042969, 69.92163848877, 0, 0, 270.49487304688);
  7555. CreateDynamicObject(8659, 1208.3811035156, -2072.0788574219, 62.414924621582, 359.82958984375, 287.99920654297, 0.02337646484375);
  7556. CreateDynamicObject(8659, 1208.3469238281, -2071.845703125, 62.414924621582, 359.82421875, 287.99560546875, 0.02197265625);
  7557. CreateDynamicObject(7191, 1190.2265625, -2072.013671875, 73.846603393555, 0, 0, 270.49438476563);
  7558. CreateDynamicObject(7191, 1160.0407714844, -2072.2705078125, 69.92163848877, 0, 0, 270.49438476563);
  7559. CreateDynamicObject(987, 1136.8811035156, -2084.0861816406, 67.983177185059, 0, 0, 88);
  7560. CreateDynamicObject(7191, 1160.0400390625, -2072.2705078125, 73.821586608887, 0, 0, 270.49438476563);
  7561. CreateDynamicObject(987, 1136.880859375, -2084.0859375, 69.93318939209, 0, 0, 87.994995117188);
  7562. CreateDynamicObject(987, 1125.0308837891, -2083.8999023438, 68.244400024414, 0, 0, 0);
  7563. CreateDynamicObject(987, 1113.2644042969, -2083.8444824219, 68.244400024414, 0, 0, 0);
  7564. CreateDynamicObject(987, 1103.736328125, -2083.8391113281, 68.244400024414, 0, 0, 0);
  7565. CreateDynamicObject(987, 1103.8818359375, -2072.0541992188, 68.244400024414, 0, 0, 269.99996948242);
  7566. CreateDynamicObject(987, 1103.859375, -2060.1025390625, 68.244400024414, 0, 0, 269.99450683594);
  7567. CreateDynamicObject(987, 1103.8575439453, -2050.15234375, 68.244400024414, 0, 0, 269.99450683594);
  7568. CreateDynamicObject(987, 1091.8402099609, -2049.7114257813, 68.244400024414, 0, 0, 357.99450683594);
  7569. CreateDynamicObject(987, 1093.5535888672, -2037.9643554688, 68.244400024414, 0, 0, 261.98950195313);
  7570. CreateDynamicObject(987, 1125.0302734375, -2083.8994140625, 69.919395446777, 0, 0, 0);
  7571. CreateDynamicObject(987, 1113.2398681641, -2083.8361816406, 69.894409179688, 0, 0, 0);
  7572. CreateDynamicObject(987, 1103.736328125, -2083.8388671875, 69.894393920898, 0, 0, 0);
  7573. CreateDynamicObject(7191, 1284.1032714844, -2025.5002441406, 59.762916564941, 0, 0, 179.99993896484);
  7574. CreateDynamicObject(7191, 1284.1025390625, -2025.5, 63.637908935547, 0, 0, 179.99450683594);
  7575. CreateDynamicObject(7191, 1261.5434570313, -2002.6508789063, 59.746704101563, 0, 0, 269.74487304688);
  7576. CreateDynamicObject(7191, 1261.54296875, -2002.650390625, 63.746673583984, 0, 0, 269.74182128906);
  7577. CreateDynamicObject(8657, 1224.7266845703, -2002.7730712891, 66.496231079102, 338, 0, 270.75);
  7578. CreateDynamicObject(8657, 1224.7265625, -2002.7724609375, 68.746231079102, 337.99987792969, 0, 270.7470703125);
  7579. CreateDynamicObject(8657, 1224.7265625, -2002.7724609375, 71.221244812012, 337.99987792969, 0, 270.7470703125);
  7580. CreateDynamicObject(8657, 1239.7241210938, -2002.5634765625, 51.04621887207, 270, 180.69635009766, 91.443389892578);
  7581. CreateDynamicObject(8657, 1211.0941162109, -2002.9711914063, 62.77124786377, 270, 180.69213867188, 91.439208984375);
  7582. CreateDynamicObject(8657, 1213.443359375, -2002.9429931641, 62.77124786377, 270, 180.69213867188, 91.439208984375);
  7583. CreateDynamicObject(7191, 1188.0712890625, -2002.9348144531, 69.92163848877, 0, 0, 269.99438476563);
  7584. CreateDynamicObject(7191, 1188.0712890625, -2002.9345703125, 73.846618652344, 0, 0, 269.98901367188);
  7585. CreateDynamicObject(7191, 1159.9739990234, -2002.9268798828, 69.92163848877, 0, 0, 269.98901367188);
  7586. CreateDynamicObject(7191, 1159.9736328125, -2002.9267578125, 73.92163848877, 0, 0, 269.98901367188);
  7587. CreateDynamicObject(987, 1137.1965332031, -2002.5064697266, 68.0078125, 0, 0, 88);
  7588. CreateDynamicObject(987, 1137.1962890625, -2002.505859375, 70.082801818848, 0, 0, 87.994995117188);
  7589. CreateDynamicObject(987, 1137.6632080078, -1990.6257324219, 66.607788085938, 0, 0, 179.99499511719);
  7590. CreateDynamicObject(987, 1125.6912841797, -1990.6174316406, 66.607727050781, 0, 0, 179.99450683594);
  7591. CreateDynamicObject(987, 1113.7397460938, -1990.6020507813, 66.932838439941, 0, 0, 207.99450683594);
  7592. CreateDynamicObject(987, 1137.6630859375, -1990.625, 70.082786560059, 0, 0, 179.99450683594);
  7593. CreateDynamicObject(987, 1125.6904296875, -1990.6171875, 70.107711791992, 0, 0, 179.99450683594);
  7594. CreateDynamicObject(987, 1113.7392578125, -1990.6015625, 70.107894897461, 0, 0, 207.9931640625);
  7595. CreateDynamicObject(987, 1103.3458251953, -1996.0748291016, 67.603942871094, 0, 0, 269.99996948242);
  7596. CreateDynamicObject(987, 1103.3389892578, -2008.0454101563, 67.603942871094, 0, 0, 269.99450683594);
  7597. CreateDynamicObject(987, 1103.3626708984, -2012.5201416016, 67.603942871094, 0, 0, 269.99450683594);
  7598. CreateDynamicObject(987, 1103.4868164063, -2024.4993896484, 67.603942871094, 0, 2, 179.49450683594);
  7599. CreateDynamicObject(987, 1091.5026855469, -2024.3101806641, 66.978950500488, 0, 1.99951171875, 279.48913574219);
  7600. CreateDynamicObject(3279, 1279.5010986328, -2011.7744140625, 57.884014129639, 0, 0, 272);
  7601. CreateDynamicObject(3279, 1277.5090332031, -2043.7094726563, 57.884014129639, 0, 0, 178.49951171875);
  7602. CreateDynamicObject(3279, 1210.5440673828, -2065.6467285156, 68.000610351563, 0, 0, 85.999938964844);
  7603. CreateDynamicObject(3279, 1202.9331054688, -2007.3864746094, 68.000610351563, 0, 0, 270.25);
  7604. CreateDynamicObject(16644, 1278.6148681641, -2026.3967285156, 73.571960449219, 0, 0, 88);
  7605. CreateDynamicObject(16644, 1278.2943115234, -2035.3323974609, 73.571960449219, 0, 0, 87.994995117188);
  7606.  
  7607. /*--------------------|Russian Mafia|--------------------*/
  7608. CreateDynamicObject(987, 1663.5405273438, -1723.1560058594, 19.50937461853, 0, 0, 0);
  7609. CreateDynamicObject(987, 1651.6092529297, -1723.1442871094, 19.50937461853, 0, 0, 0);
  7610. CreateDynamicObject(987, 1642.8415527344, -1723.1639404297, 19.50937461853, 0, 0, 0);
  7611. CreateDynamicObject(987, 1675.2744140625, -1723.2337646484, 19.484375, 0, 0, 90);
  7612. CreateDynamicObject(987, 1675.28125, -1711.3471679688, 19.484375, 0, 0, 90);
  7613. CreateDynamicObject(987, 1675.2279052734, -1703.8571777344, 19.484375, 0, 0, 90);
  7614. CreateDynamicObject(987, 1674.8143310547, -1693.9533691406, 19.184341430664, 0, 0, 90);
  7615. CreateDynamicObject(987, 1674.8771972656, -1681.9615478516, 19.15096282959, 0, 0, 0);
  7616. CreateDynamicObject(987, 1686.7823486328, -1681.8074951172, 19.15096282959, 0, 0, 2);
  7617. CreateDynamicObject(987, 1698.6909179688, -1681.3651123047, 19.030313491821, 0, 0, 47.999267578125);
  7618. CreateDynamicObject(987, 1699.0620117188, -1664.5207519531, 19.14994430542, 0, 0, 179.99993896484);
  7619. CreateDynamicObject(987, 1692.0050048828, -1664.4134521484, 19.14994430542, 0, 0, 179.99450683594);
  7620. CreateDynamicObject(987, 1680.0478515625, -1664.1064453125, 21.533744812012, 0, 0, 90);
  7621. CreateDynamicObject(987, 1629.25390625, -1652.2529296875, 21.446960449219, 0, 0, 269.98901367188);
  7622. CreateDynamicObject(987, 1629.2525634766, -1663.9429931641, 21.365642547607, 0, 0, 0);
  7623. CreateDynamicObject(988, 1642.8662109375, -1720.8232421875, 21.416439056396, 0, 0, 271.99951171875);
  7624. CreateDynamicObject(987, 1642.9263916016, -1699.7182617188, 19.462518692017, 0, 0, 269.99996948242);
  7625. CreateDynamicObject(987, 1643.0352783203, -1690.7418212891, 19.462518692017, 0, 0, 269.99450683594);
  7626. CreateDynamicObject(987, 1642.8485107422, -1679.0551757813, 20.412538528442, 358, 0, 269.99450683594);
  7627. CreateDynamicObject(987, 1643.07421875, -1667.1105957031, 20.455556869507, 0, 0, 270);
  7628. CreateDynamicObject(987, 1643.0592041016, -1664.0682373047, 20.455556869507, 0, 0, 269.99450683594);
  7629. CreateDynamicObject(987, 1631.0721435547, -1663.9248046875, 21.315450668335, 0, 0, 0);
  7630. CreateDynamicObject(987, 1680.0834960938, -1652.1961669922, 21.533744812012, 0, 0, 182.5);
  7631. CreateDynamicObject(987, 1641.1645507813, -1652.1776123047, 21.446960449219, 0, 0, 180.73901367188);
  7632. CreateDynamicObject(3279, 1675.9067382813, -1661.5098876953, 21.542495727539, 0, 0, 268.5);
  7633. CreateDynamicObject(3279, 1633.3953857422, -1659.4279785156, 21.542495727539, 0, 0, 1.24755859375);
  7634. CreateDynamicObject(16644, 1645.4532470703, -1659.470703125, 37.147399902344, 0, 0, 358.5);
  7635. CreateDynamicObject(16644, 1656.3596191406, -1659.7631835938, 37.147399902344, 0, 0, 358.49487304688);
  7636. CreateDynamicObject(16644, 1666.9188232422, -1660.1080322266, 37.147399902344, 0, 0, 358.49487304688);
  7637. CreateDynamicObject(5821, 1647.2696533203, -1720.8515625, 25.267574310303, 0, 0, 266.75);
  7638.  
  7639. /*--------------------|Grove Mafia|--------------------*/
  7640. CreateDynamicObject(8210, 2469.5166015625, -1721.8397216797, 15.610401153564, 0, 0, 0);
  7641. CreateDynamicObject(8210, 2512.9069824219, -1721.8980712891, 15.610401153564, 0, 0, 0);
  7642. CreateDynamicObject(8210, 2540.4013671875, -1694.5388183594, 15.610401153564, 0, 0, 90);
  7643. CreateDynamicObject(8210, 2540.3903808594, -1656.1995849609, 15.610401153564, 0, 0, 90);
  7644. CreateDynamicObject(8210, 2513.1477050781, -1628.9793701172, 19.860401153564, 0, 0, 180);
  7645. CreateDynamicObject(8210, 2470.9326171875, -1629.0244140625, 16.710437774658, 0, 2, 179.99450683594);
  7646. CreateDynamicObject(8210, 2442.6203613281, -1694.2956542969, 15.485403060913, 0, 0, 268.75);
  7647. CreateDynamicObject(8210, 2442.6201171875, -1694.294921875, 22.510448455811, 0, 0, 268.74755859375);
  7648. CreateDynamicObject(987, 2443.111328125, -1628.6633300781, 12.416645050049, 0, 0, 270);
  7649. CreateDynamicObject(987, 2443.1025390625, -1640.5379638672, 12.416645050049, 0, 0, 269.99450683594);
  7650. CreateDynamicObject(987, 2443.1025390625, -1640.537109375, 17.316638946533, 0, 0, 269.99450683594);
  7651. CreateDynamicObject(987, 2443.1091308594, -1628.5880126953, 17.341650009155, 0, 0, 269.99450683594);
  7652. CreateDynamicObject(8210, 2470.7084960938, -1629.0092773438, 23.810436248779, 0, 1.99951171875, 179.99450683594);
  7653. CreateDynamicObject(8210, 2513.1474609375, -1628.978515625, 26.960411071777, 0, 0, 179.99450683594);
  7654. CreateDynamicObject(8210, 2512.90625, -1721.8974609375, 22.485422134399, 0, 0, 0);
  7655. CreateDynamicObject(8210, 2469.5166015625, -1721.8388671875, 22.485414505005, 0, 0, 0);
  7656. CreateDynamicObject(3749, 2441.765625, -1658.8217773438, 18.186676025391, 0, 0, 270.25012207031);
  7657. CreateDynamicObject(987, 2443.0539550781, -1654.6760253906, 22.091630935669, 0, 0, 269.99450683594);
  7658. CreateDynamicObject(987, 2443.0537109375, -1654.67578125, 26.916645050049, 0, 0, 269.99450683594);
  7659. CreateDynamicObject(987, 2442.9873046875, -1642.6755371094, 22.091630935669, 0, 0, 269.99450683594);
  7660. CreateDynamicObject(987, 2442.9802246094, -1630.6636962891, 22.091630935669, 0, 0, 269.99450683594);
  7661. CreateDynamicObject(987, 2442.9924316406, -1628.5526123047, 22.091630935669, 0, 0, 269.99450683594);
  7662. CreateDynamicObject(987, 2442.9873046875, -1642.6748046875, 27.016647338867, 0, 0, 269.99450683594);
  7663. CreateDynamicObject(987, 2442.9790039063, -1630.7131347656, 26.991624832153, 0, 0, 269.99450683594);
  7664. CreateDynamicObject(987, 2442.9921875, -1628.5517578125, 26.991632461548, 0, 0, 269.99450683594);
  7665. CreateDynamicObject(8210, 2442.6171875, -1694.3950195313, 27.360443115234, 0, 0, 268.74755859375);
  7666. CreateDynamicObject(3279, 2447.091796875, -1716.5435791016, 12.727582931519, 0, 0, 0);
  7667. CreateDynamicObject(3279, 2448.9399414063, -1633.8267822266, 12.325929641724, 0, 0, 272);
  7668. CreateDynamicObject(3279, 2524.2360839844, -1716.9493408203, 12.51594543457, 0, 0, 90);
  7669. CreateDynamicObject(3279, 2536.373046875, -1633.8001708984, 12.87487411499, 0, 0, 269.99996948242);
  7670. CreateDynamicObject(3279, 2503.6806640625, -1650.8725585938, 12.601211547852, 0, 0, 242);
  7671. CreateDynamicObject(3279, 2472.8125, -1684.6728515625, 12.601211547852, 0, 0, 53.992309570313);
  7672. CreateDynamicObject(989, 2442.7233886719, -1625.7749023438, 28.272403717041, 0, 0, 195.99996948242);
  7673. CreateDynamicObject(16644, 2480.5913085938, -1675.4514160156, 28.206125259399, 0, 0, 46.5);
  7674. CreateDynamicObject(16644, 2487.8828125, -1667.78515625, 28.206125259399, 0, 0, 46.499633789063);
  7675. CreateDynamicObject(16644, 2493.923828125, -1661.4110107422, 28.206125259399, 0, 0, 46.499633789063);
  7676. /*--------------------|Fallen Army|--------------------*/
  7677. CreateDynamicObject(8210, 1279.4605712891, -755.67883300781, 95.47193145752, 0, 0, 180);
  7678. CreateDynamicObject(8210, 1308.9608154297, -783.18072509766, 95.47193145752, 0, 0, 93.994506835938);
  7679. CreateDynamicObject(8210, 1309.0771484375, -783.15155029297, 89.47193145752, 0, 0, 93.993530273438);
  7680. CreateDynamicObject(8210, 1309.0771484375, -783.1513671875, 82.396911621094, 0, 0, 93.993530273438);
  7681. CreateDynamicObject(8210, 1309.0771484375, -783.1513671875, 76.896911621094, 0, 0, 93.993530273438);
  7682. CreateDynamicObject(8210, 1311.2287597656, -814.06042480469, 95.47193145752, 0, 0, 93.993530273438);
  7683. CreateDynamicObject(8210, 1311.228515625, -814.0595703125, 88.546905517578, 0, 0, 93.993530273438);
  7684. CreateDynamicObject(8210, 1311.228515625, -814.0595703125, 81.621925354004, 0, 0, 93.993530273438);
  7685. CreateDynamicObject(8210, 1310.9774169922, -814.07678222656, 74.496948242188, 0, 0, 93.993530273438);
  7686. CreateDynamicObject(8210, 1285.4586181641, -841.48840332031, 74.509880065918, 0, 0, 0);
  7687. CreateDynamicObject(897, 1309.4956054688, -839.20098876953, 70.111389160156, 0, 0, 0);
  7688. CreateDynamicObject(8210, 1229.9348144531, -841.47698974609, 74.509880065918, 0, 0, 0);
  7689. CreateDynamicObject(8210, 1285.4580078125, -841.48828125, 81.334884643555, 0, 0, 0);
  7690. CreateDynamicObject(8210, 1285.4580078125, -841.48828125, 88.284881591797, 0, 0, 0);
  7691. CreateDynamicObject(8210, 1285.4580078125, -841.48828125, 95.484817504883, 0, 0, 0);
  7692. CreateDynamicObject(8210, 1229.9345703125, -841.4765625, 81.309867858887, 0, 0, 0);
  7693. CreateDynamicObject(8210, 1229.9345703125, -841.4765625, 88.284881591797, 0, 0, 0);
  7694. CreateDynamicObject(8210, 1229.9345703125, -841.4765625, 95.484893798828, 0, 0, 0);
  7695. CreateDynamicObject(8210, 1201.5062255859, -813.86608886719, 81.309867858887, 0, 0, 272);
  7696. CreateDynamicObject(8210, 1201.505859375, -813.865234375, 88.184921264648, 0, 0, 271.99951171875);
  7697. CreateDynamicObject(8210, 1201.505859375, -813.865234375, 95.484939575195, 0, 0, 271.99951171875);
  7698. CreateDynamicObject(987, 1212.2719726563, -786.32946777344, 84.119956970215, 0, 0, 180);
  7699. CreateDynamicObject(987, 1224.1997070313, -786.36248779297, 84.119956970215, 0, 0, 179.99450683594);
  7700. CreateDynamicObject(987, 1236.1455078125, -786.34765625, 84.144958496094, 0, 0, 179.99450683594);
  7701. CreateDynamicObject(987, 1239.201171875, -786.3583984375, 84.144958496094, 0, 0, 179.99450683594);
  7702. CreateDynamicObject(987, 1212.271484375, -786.3291015625, 88.944931030273, 0, 0, 179.99450683594);
  7703. CreateDynamicObject(987, 1212.271484375, -786.3291015625, 93.794860839844, 0, 0, 179.99450683594);
  7704. CreateDynamicObject(987, 1224.19921875, -786.3623046875, 88.944931030273, 0, 0, 179.99450683594);
  7705. CreateDynamicObject(987, 1224.19921875, -786.3623046875, 93.769920349121, 0, 0, 179.99450683594);
  7706. CreateDynamicObject(987, 1236.1455078125, -786.34765625, 88.919960021973, 0, 0, 179.99450683594);
  7707. CreateDynamicObject(987, 1236.1455078125, -786.34765625, 93.744979858398, 0, 0, 179.99450683594);
  7708. CreateDynamicObject(987, 1239.201171875, -786.3583984375, 88.919944763184, 0, 0, 179.99450683594);
  7709. CreateDynamicObject(987, 1239.201171875, -786.3583984375, 93.744934082031, 0, 0, 179.99450683594);
  7710. CreateDynamicObject(987, 1239.4920654297, -774.27569580078, 91.533660888672, 0, 0, 267.25006103516);
  7711. CreateDynamicObject(987, 1239.5185546875, -762.373046875, 91.533660888672, 0, 0, 269.99792480469);
  7712. CreateDynamicObject(3749, 1245.3209228516, -758.55505371094, 97.689926147461, 0, 0, 14);
  7713. CreateDynamicObject(3279, 1303.1042480469, -760.51672363281, 92.068725585938, 0, 0, 269.99996948242);
  7714. CreateDynamicObject(3279, 1260.8873291016, -759.77618408203, 92.616470336914, 0, 0, 0);
  7715. CreateDynamicObject(3279, 1206.9670410156, -790.84265136719, 83.514068603516, 0, 0, 0);
  7716. CreateDynamicObject(16644, 1273.1333007813, -759.67663574219, 108.24634552002, 0, 0, 0);
  7717. CreateDynamicObject(16644, 1290.5378417969, -759.74444580078, 108.24634552002, 0, 0, 0);
  7718. CreateDynamicObject(647, 1237.5655517578, -763.83264160156, 91.050964355469, 0, 0, 0);
  7719. CreateDynamicObject(647, 1236.3129882813, -761.71209716797, 91.050964355469, 0, 0, 0);
  7720. /*--------------------|3D Staff|--------------------*/
  7721. Create3DTextLabel("Dobrodosli na CroHerze DM server!\n(((Ovo je zona zabranjenog pucanja)))\n\nMDM 2011(R)",COLOR_ORANGE, 2216.9280,-1166.3020,27.7476, 50,0,1);
  7722. //------------------------------------VOZILA---------------------------CH-samp.com---------
  7723. AddStaticVehicleEx(411,2505.92553711,-1676.21533203,13.17662716,328.00000000,86,1,15); //Infernus
  7724. AddStaticVehicleEx(411,2507.71899414,-1666.40332031,13.19589520,7.99682617,86,1,15); //Infernus
  7725. AddStaticVehicleEx(411,2492.16137695,-1682.71936035,13.13734627,267.99682617,86,1,15); //Infernus
  7726. AddStaticVehicleEx(560,2501.53271484,-1657.36108398,13.20721722,62.00000000,86,1,15); //Sultan
  7727. AddStaticVehicleEx(560,2487.71997070,-1654.81152344,13.14303207,87.99584961,86,1,15); //Sultan
  7728. AddStaticVehicleEx(560,2480.52465820,-1654.73193359,13.12327194,87.99584961,86,1,15); //Sultan
  7729. AddStaticVehicleEx(541,2481.87475586,-1696.99926758,13.22082996,356.00000000,86,1,15); //Bullet
  7730. AddStaticVehicleEx(541,2482.38671875,-1690.51293945,13.21572018,355.99548340,86,1,15); //Bullet
  7731. AddStaticVehicleEx(522,2512.22729492,-1663.84606934,13.23881054,76.00000000,86,86,15); //NRG-500
  7732. AddStaticVehicleEx(522,2512.40356445,-1665.09655762,13.23624039,75.99792480,86,86,15); //NRG-500
  7733. AddStaticVehicleEx(522,2512.45629883,-1666.38793945,13.23119450,75.99792480,86,86,15); //NRG-500
  7734. AddStaticVehicleEx(522,2512.54565430,-1667.85681152,13.22545528,75.99792480,86,86,15); //NRG-500
  7735. AddStaticVehicleEx(487,2529.17480469,-1677.75073242,20.19522476,0.00000000,86,86,15); //Maverick
  7736. AddStaticVehicleEx(487,2494.32202148,-1698.57092285,23.95017815,0.00000000,86,86,15); //Maverick
  7737. AddStaticVehicleEx(487,1659.02185059,-1680.16967773,21.69555664,0.00000000,6,6,15); //Maverick
  7738. AddStaticVehicleEx(541,1656.12890625,-1695.16394043,20.15596199,0.00000000,6,6,15); //Bullet
  7739. AddStaticVehicleEx(541,1661.84313965,-1694.99353027,20.16241646,0.00000000,6,6,15); //Bullet
  7740. AddStaticVehicleEx(560,1646.05432129,-1695.07348633,20.25929260,270.00000000,6,1,15); //Sultan
  7741. AddStaticVehicleEx(560,1646.11755371,-1699.00634766,20.27876472,270.00000000,6,1,15); //Sultan
  7742. AddStaticVehicleEx(560,1646.17431641,-1702.83654785,20.28935051,270.00000000,6,1,15); //Sultan
  7743. AddStaticVehicleEx(560,1646.17041016,-1706.61791992,20.28935051,270.00000000,6,1,15); //Sultan
  7744. AddStaticVehicleEx(560,1646.21020508,-1710.41528320,20.28935051,270.00000000,6,1,15); //Sultan
  7745. AddStaticVehicleEx(451,1671.20104980,-1696.00842285,20.24500656,92.00000000,6,1,15); //Turismo
  7746. AddStaticVehicleEx(451,1671.13378906,-1699.87817383,20.24784088,91.99951172,6,1,15); //Turismo
  7747. AddStaticVehicleEx(451,1671.09289551,-1703.56689453,20.24874687,91.99951172,6,1,15); //Turismo
  7748. AddStaticVehicleEx(451,1671.35180664,-1707.14404297,20.24874687,91.99951172,6,1,15); //Turismo
  7749. AddStaticVehicleEx(451,1671.44750977,-1710.85205078,20.24157143,91.99951172,6,1,15); //Turismo
  7750. AddStaticVehicleEx(522,1673.13305664,-1720.77856445,20.14475250,0.00000000,6,6,15); //NRG-500
  7751. AddStaticVehicleEx(522,1671.25378418,-1720.83862305,20.14475250,0.00000000,6,6,15); //NRG-500
  7752. AddStaticVehicleEx(522,1669.57165527,-1720.88195801,20.14475250,0.00000000,6,6,15); //NRG-500
  7753. AddStaticVehicleEx(522,1667.98803711,-1720.91699219,20.14475250,0.00000000,6,6,15); //NRG-500
  7754. AddStaticVehicleEx(522,1666.54309082,-1720.84155273,20.14475250,0.00000000,6,6,15); //NRG-500
  7755. AddStaticVehicleEx(522,1664.91113281,-1720.88073730,20.14475250,0.00000000,6,6,15); //NRG-500
  7756. AddStaticVehicleEx(522,1663.22119141,-1720.82604980,20.14475250,0.00000000,6,6,15); //NRG-500
  7757. AddStaticVehicleEx(560,1245.77832031,-2011.39184570,59.63132858,270.00000000,16,1,15); //Sultan
  7758. AddStaticVehicleEx(560,1245.79333496,-2015.54724121,59.63533401,270.00000000,16,1,15); //Sultan
  7759. AddStaticVehicleEx(560,1245.80786133,-2019.68737793,59.63660431,270.00000000,16,1,15); //Sultan
  7760. AddStaticVehicleEx(560,1245.95166016,-2023.97583008,59.63242340,270.00000000,16,1,15); //Sultan
  7761. AddStaticVehicleEx(560,1246.02185059,-2028.23242188,59.63038254,270.00000000,16,1,15); //Sultan
  7762. AddStaticVehicleEx(560,1246.08593750,-2032.34326172,59.62852097,270.00000000,16,1,15); //Sultan
  7763. AddStaticVehicleEx(560,1246.03271484,-2036.28417969,59.63006973,270.00000000,16,1,15); //Sultan
  7764. AddStaticVehicleEx(560,1245.98437500,-2039.93212891,59.63147354,270.00000000,16,1,15); //Sultan
  7765. AddStaticVehicleEx(560,1245.73840332,-2043.52600098,59.63862228,270.00000000,16,1,15); //Sultan
  7766. AddStaticVehicleEx(541,1251.59143066,-2010.41601562,59.36022949,177.99969482,16,16,15); //Bullet
  7767. AddStaticVehicleEx(541,1254.84924316,-2010.31372070,59.26712418,177.99499512,16,16,15); //Bullet
  7768. AddStaticVehicleEx(541,1258.13037109,-2010.33520508,59.17335892,177.99499512,16,16,15); //Bullet
  7769. AddStaticVehicleEx(541,1261.53637695,-2010.23767090,59.07601547,177.99499512,16,16,15); //Bullet
  7770. AddStaticVehicleEx(541,1265.01428223,-2010.39770508,58.97662735,177.99499512,16,16,15); //Bullet
  7771. AddStaticVehicleEx(541,1268.57055664,-2010.30603027,58.87499237,177.99499512,16,16,15); //Bullet
  7772. AddStaticVehicleEx(541,1272.12243652,-2010.07934570,58.77348709,177.99499512,16,16,15); //Bullet
  7773. AddStaticVehicleEx(411,1276.78088379,-2015.44848633,58.73373413,90.00000000,16,1,15); //Infernus
  7774. AddStaticVehicleEx(411,1276.65600586,-2018.79235840,58.74323273,90.00000000,16,1,15); //Infernus
  7775. AddStaticVehicleEx(411,1276.74987793,-2022.16699219,58.75515747,90.00000000,16,1,15); //Infernus
  7776. AddStaticVehicleEx(411,1276.77343750,-2025.51379395,58.76791763,90.00000000,16,1,15); //Infernus
  7777. AddStaticVehicleEx(411,1276.80529785,-2029.18627930,58.78183746,90.00000000,16,1,15); //Infernus
  7778. AddStaticVehicleEx(411,1276.80505371,-2032.66491699,58.79543304,90.00000000,16,1,15); //Infernus
  7779. AddStaticVehicleEx(411,1276.98779297,-2036.06213379,58.80625153,90.00000000,16,1,15); //Infernus
  7780. AddStaticVehicleEx(411,1276.85180664,-2039.81237793,58.82273102,90.00000000,16,1,15); //Infernus
  7781. AddStaticVehicleEx(411,1276.61791992,-2043.22802734,58.83921814,90.00000000,16,1,15); //Infernus
  7782. AddStaticVehicleEx(487,1115.90332031,-2053.92675781,74.69468689,0.00000000,16,16,15); //Maverick
  7783. AddStaticVehicleEx(487,1116.72326660,-2020.78002930,74.69468689,174.00000000,16,16,15); //Maverick
  7784. AddStaticVehicleEx(522,1134.64721680,-2077.26855469,68.66819000,0.00000000,16,16,15); //NRG-500
  7785. AddStaticVehicleEx(522,1133.23840332,-2077.58056641,68.66819000,0.00000000,16,16,15); //NRG-500
  7786. AddStaticVehicleEx(522,1131.81042480,-2077.63720703,68.66819000,0.00000000,16,16,15); //NRG-500
  7787. AddStaticVehicleEx(522,1130.36791992,-2077.69433594,68.66819000,0.00000000,16,16,15); //NRG-500
  7788. AddStaticVehicleEx(522,1128.95178223,-2078.16186523,68.66819000,0.00000000,16,16,15); //NRG-500
  7789. AddStaticVehicleEx(560,1254.27441406,-803.47662354,83.94560242,177.99969482,54,1,15); //Sultan
  7790. AddStaticVehicleEx(560,1249.12084961,-803.59277344,83.94560242,177.99499512,54,1,15); //Sultan
  7791. AddStaticVehicleEx(560,1243.70751953,-803.21093750,83.94560242,177.99499512,54,1,15); //Sultan
  7792. AddStaticVehicleEx(411,1249.85449219,-820.15142822,83.94062805,169.99993896,54,1,15); //Infernus
  7793. AddStaticVehicleEx(411,1247.83374023,-826.30773926,83.94062805,151.99682617,54,1,15); //Infernus
  7794. AddStaticVehicleEx(522,1294.11804199,-831.81805420,82.80100250,0.00000000,54,54,15); //NRG-500
  7795. AddStaticVehicleEx(522,1290.97973633,-831.94500732,82.80100250,0.00000000,54,54,15); //NRG-500
  7796. AddStaticVehicleEx(522,1287.67077637,-831.93255615,82.80100250,0.00000000,54,54,15); //NRG-500
  7797. AddStaticVehicleEx(522,1284.43591309,-832.05865479,82.80100250,0.00000000,54,54,15); //NRG-500
  7798. AddStaticVehicleEx(522,1281.03662109,-832.13665771,82.80100250,0.00000000,54,54,15); //NRG-500
  7799. AddStaticVehicleEx(522,1277.73925781,-832.26300049,82.80100250,0.00000000,54,54,15); //NRG-500
  7800. AddStaticVehicleEx(522,1274.42712402,-832.02062988,82.80100250,0.00000000,54,54,15); //NRG-500
  7801. AddStaticVehicleEx(522,1271.16735840,-832.05541992,82.80100250,0.00000000,54,54,15); //NRG-500
  7802. AddStaticVehicleEx(451,1293.01306152,-815.07244873,83.91212463,0.00000000,54,1,15); //Turismo
  7803. AddStaticVehicleEx(487,1291.34020996,-789.63262939,96.72593689,0.00000000,54,54,15); //Maverick
  7804. AddStaticVehicleEx(463,2227.85253906,-1173.45971680,25.34356308,276.00000000,-1,-1,15); //Freeway
  7805. AddStaticVehicleEx(557,2014.37597656,-1047.99645996,23.68326950,68.00000000,-1,-1,15); //Monster B
  7806. AddStaticVehicleEx(415,2227.56689453,-1177.01501465,25.57608414,272.00000000,-1,-1,15); //Cheetah
  7807. AddStaticVehicleEx(429,2227.69433594,-1169.94641113,25.47656250,270.00000000,-1,-1,15); //Banshee
  7808. AddStaticVehicleEx(402,2227.41503906,-1166.52807617,25.67675781,270.00000000,-1,-1,15); //Buffalo
  7809. AddStaticVehicleEx(477,2227.66796875,-1162.79418945,25.61143494,270.00000000,-1,-1,15); //ZR-350
  7810. AddStaticVehicleEx(565,2227.59277344,-1159.52087402,25.47064781,270.00000000,-1,-1,15); //Flash
  7811. AddStaticVehicleEx(405,2227.50708008,-1155.95678711,25.80955315,270.00000000,-1,-1,15); //Sentinel
  7812. AddStaticVehicleEx(500,2227.57958984,-1152.20812988,26.05872726,270.00000000,-1,-1,15); //Mesa
  7813. AddStaticVehicleEx(470,2217.56396484,-1169.69653320,25.83657455,270.00000000,-1,-1,15); //Patriot
  7814. AddStaticVehicleEx(559,2217.11645508,-1165.46899414,25.48062515,268.00000000,-1,1,15); //Jester
  7815. AddStaticVehicleEx(560,2217.10107422,-1161.27001953,25.53153801,268.00000000,-1,-1,15); //Sultan
  7816. AddStaticVehicleEx(496,2206.65039062,-1172.85632324,25.51428986,270.00000000,-1,-1,15); //Blista Compact
  7817. AddStaticVehicleEx(411,2206.40307617,-1176.80346680,25.52656174,270.00000000,-1,-1,15); //Infernus
  7818. AddStaticVehicleEx(541,2206.55810547,-1169.09216309,25.42656326,270.00000000,-1,-1,15); //Bullet
  7819. AddStaticVehicleEx(545,2206.49707031,-1165.26818848,25.67656326,270.00000000,-1,-1,15); //Hustler
  7820. AddStaticVehicleEx(576,2206.72802734,-1161.46691895,25.47656250,270.00000000,-1,-1,15); //Tornado
  7821. AddStaticVehicleEx(492,2206.61401367,-1157.62634277,25.63197136,272.00000000,-1,-1,15); //Greenwood
  7822. AddStaticVehicleEx(522,2206.17797852,-1154.07177734,25.39795113,284.00000000,-1,-1,15); //NRG-500
  7823. AddStaticVehicleEx(533,2136.16699219,-1126.19982910,25.30875397,90.00000000,-1,-1,15); //Feltzer
  7824. AddStaticVehicleEx(560,2136.33154297,-1130.89416504,25.48489761,92.00000000,-1,-1,15); //Sultan
  7825. AddStaticVehicleEx(506,2136.12988281,-1135.61535645,25.49552155,92.00000000,-1,-1,15); //Super GT
  7826. AddStaticVehicleEx(445,2135.95800781,-1140.67834473,25.26137352,88.00000000,-1,-1,15); //Admiral
  7827. AddStaticVehicleEx(480,2136.18115234,-1145.62402344,24.58524132,88.00000000,-1,-1,15); //Comet
  7828. AddStaticVehicleEx(411,2122.30834961,-1155.96411133,23.83267975,0.00000000,-1,-1,15); //Infernus
  7829. AddStaticVehicleEx(411,2117.88769531,-1155.86364746,24.01649475,0.00000000,-1,-1,15); //Infernus
  7830. AddStaticVehicleEx(559,2117.80371094,-1145.33007812,24.37621307,268.00000000,-1,-1,15); //Jester
  7831. AddStaticVehicleEx(496,2118.04809570,-1139.94555664,24.80297279,270.00000000,-1,-1,15); //Blista Compact
  7832. AddStaticVehicleEx(551,2119.39306641,-1134.63037109,25.17325974,272.00000000,-1,-1,15); //Merit
  7833. AddStaticVehicleEx(405,2149.51391602,-1203.27185059,23.84881401,272.00000000,-1,-1,15); //Sentinel
  7834. AddStaticVehicleEx(426,2149.09521484,-1198.86621094,23.70987701,272.00000000,-1,-1,15); //Premier
  7835. AddStaticVehicleEx(565,2148.86181641,-1194.59936523,23.52724266,272.00000000,-1,-1,15); //Flash
  7836. AddStaticVehicleEx(541,2149.07519531,-1189.75976562,23.52031326,271.99951172,-1,-1,15); //Bullet
  7837. AddStaticVehicleEx(436,2148.77319336,-1184.95739746,23.69830513,272.00000000,-1,-1,15); //Previon
  7838. AddStaticVehicleEx(405,2149.02319336,-1180.38183594,23.82031250,271.99951172,-1,-1,15); //Sentinel
  7839. AddStaticVehicleEx(541,2149.11621094,-1175.62365723,23.52031326,271.99951172,-1,-1,15); //Bullet
  7840. AddStaticVehicleEx(566,2148.94067383,-1171.37475586,23.72031212,272.00000000,-1,-1,15); //Tahoma
  7841. AddStaticVehicleEx(481,2148.05444336,-1167.44653320,23.37552643,292.00000000,-1,-1,15); //BMX
  7842. AddStaticVehicleEx(481,2148.41943359,-1165.95996094,23.41281891,292.00000000,-1,-1,15); //BMX
  7843. AddStaticVehicleEx(436,2149.35546875,-1162.04406738,23.84730530,271.99951172,-1,-1,15); //Previon
  7844. AddStaticVehicleEx(522,2148.84155273,-1157.25097656,23.50624084,283.99963379,-1,-1,15); //NRG-500
  7845. AddStaticVehicleEx(460,152.88497925,-1980.31445312,2.32049561,0.00000000,-1,-1,15); //Skimmer
  7846. AddStaticVehicleEx(446,172.09252930,-1904.51062012,0.00000000,84.00000000,1,106,15); //Squalo
  7847. AddStaticVehicleEx(446,171.93359375,-1909.68017578,0.00000000,83.99597168,1,103,15); //Squalo
  7848. AddStaticVehicleEx(446,171.90078735,-1915.17700195,0.00000000,83.99597168,1,6,15); //Squalo
  7849. AddStaticVehicleEx(446,171.61907959,-1920.16296387,0.00000000,83.99597168,1,6,15); //Squalo
  7850. AddStaticVehicleEx(446,135.95578003,-1918.29760742,0.00000000,269.99572754,1,103,15); //Squalo
  7851. AddStaticVehicleEx(446,135.90161133,-1906.50280762,0.00000000,269.99450684,1,6,15); //Squalo
  7852. AddStaticVehicleEx(446,136.17175293,-1912.53051758,0.00000000,269.99450684,1,103,15); //Squalo
  7853. AddStaticVehicleEx(446,135.92077637,-1900.69458008,0.00000000,269.99450684,1,6,15); //Squalo
  7854. AddStaticVehicleEx(471,353.39218140,-1808.28125000,4.13443279,0.00000000,-1,-1,15); //Quad
  7855. AddStaticVehicleEx(471,350.10656738,-1808.30786133,4.13044262,0.00000000,-1,-1,15); //Quad
  7856. AddStaticVehicleEx(471,347.04287720,-1808.21301270,4.13022995,0.00000000,-1,-1,15); //Quad
  7857. AddStaticVehicleEx(471,344.21844482,-1808.47412109,4.11981678,0.00000000,-1,-1,15); //Quad
  7858. AddStaticVehicleEx(471,356.77261353,-1808.73242188,4.12451172,0.00000000,-1,-1,15); //Quad
  7859. AddStaticVehicleEx(471,340.46200562,-1808.95581055,4.10202789,0.00000000,-1,-1,15); //Quad
  7860. AddStaticVehicleEx(471,337.25958252,-1809.21105957,4.08792305,0.00000000,-1,-1,15); //Quad
  7861. AddStaticVehicleEx(471,334.26635742,-1809.55261230,4.05621529,0.00000000,-1,-1,15); //Quad
  7862. AddStaticVehicleEx(471,331.58764648,-1809.02954102,4.06538200,0.00000000,-1,-1,15); //Quad
  7863. AddStaticVehicleEx(471,327.99478149,-1809.23889160,4.05943489,0.00000000,-1,-1,15); //Quad
  7864. AddStaticVehicleEx(471,324.55862427,-1809.83911133,4.04573727,0.00000000,-1,-1,15); //Quad
  7865. AddStaticVehicleEx(471,321.60049438,-1809.44824219,4.05211926,0.00000000,-1,-1,15); //Quad
  7866. AddStaticVehicleEx(467,2148.08471680,-1153.43933105,23.73820305,272.00000000,-1,-1,15); //Oceanic
  7867. AddStaticVehicleEx(585,2148.64843750,-1148.35034180,24.09928322,272.00000000,-1,-1,15); //Emperor
  7868. AddStaticVehicleEx(420,2148.90136719,-1143.55065918,24.78487015,272.00000000,6,1,15); //Taxi
  7869. AddStaticVehicleEx(561,2149.19189453,-1138.40844727,25.42096329,272.00000000,-1,-1,15); //Stratum
  7870. AddStaticVehicleEx(503,2149.42065430,-1134.11352539,25.53817558,272.00000000,-1,-1,15); //Hotring Racer B
  7871. AddStaticVehicleEx(576,2161.20947266,-1196.66076660,23.61199188,92.00000000,-1,-1,15); //Tornado
  7872. AddStaticVehicleEx(506,2161.20214844,-1192.17895508,23.61238480,92.00000000,-1,-1,15); //Super GT
  7873. AddStaticVehicleEx(582,2160.95849609,-1187.35339355,23.97409439,92.00000000,-1,-1,15); //Newsvan
  7874. AddStaticVehicleEx(541,2161.17260742,-1182.26684570,23.51785278,89.99938965,-1,-1,15); //Bullet
  7875. AddStaticVehicleEx(533,2161.18334961,-1177.74951172,23.61674881,92.00000000,-1,-1,15); //Feltzer
  7876. AddStaticVehicleEx(470,2161.47534180,-1172.99194336,23.92999649,88.00000000,-1,-1,15); //Patriot
  7877. AddStaticVehicleEx(504,2161.51269531,-1167.80834961,23.75546455,90.00000000,-1,-1,15); //Bloodring Banger
  7878. AddStaticVehicleEx(471,2161.54565430,-1162.78173828,23.39172554,90.00000000,-1,-1,15); //Quad
  7879. AddStaticVehicleEx(508,2160.60107422,-1163.10168457,24.26572418,90.00000000,-1,-1,15); //Journey
  7880. AddStaticVehicleEx(503,2161.05102539,-1157.83996582,23.81021500,92.00000000,-1,-1,15); //Hotring Racer B
  7881. AddStaticVehicleEx(528,2160.80493164,-1143.94323730,25.00555611,90.00000000,-1,-1,15); //FBI Truck
  7882. AddStaticVehicleEx(411,2161.12695312,-1148.39428711,24.16581726,88.00000000,-1,-1,15); //Infernus
  7883. AddStaticVehicleEx(470,2161.07153320,-1152.92980957,24.01491737,87.99499512,-1,-1,15); //Patriot
  7884. AddStaticVehicle(549,1844.3156,-1871.2266,13.0855,359.0572,1,1); // AUTO ZA VOZNJU KOLODVOR
  7885. AddStaticVehicle(560,1841.3876,-1871.4535,13.0950,0.7021,1,1); // AUTO ZA VOZNJU KOLODVOR
  7886. AddStaticVehicle(559,1838.1338,-1871.5898,13.0461,0.8997,1,1); // AUTO ZA VOZNJU KOLODVOR
  7887. AddStaticVehicle(600,1834.9243,-1871.3600,13.1029,357.4289,1,1); // AUTO ZA VOZNJU KOLODVOR
  7888. AddStaticVehicle(451,1839.9908,-1853.4060,13.0918,1.6951,1,1); // AUTO ZA VOZNJU KOLODVOR
  7889. AddStaticVehicle(429,1836.6028,-1853.5426,13.1133,0.7284,1,1); // AUTO ZA VOZNJU KOLODVOR
  7890. AddStaticVehicle(431,1780.8108,-1900.5187,13.4568,269.9322,82,87); // BUS KOLODVOR!
  7891. AddStaticVehicle(431,1780.8344,-1905.5265,13.4568,269.8409,71,59); // BUS KOLODVOR!
  7892. AddStaticVehicle(431,1780.8705,-1910.4974,13.4569,269.9059,75,59); // BUS KOLODVOR!
  7893. AddStaticVehicle(431,1780.7150,-1915.5104,13.4567,269.8739,92,72); // BUS KOLODVOR!
  7894. AddStaticVehicle(431,1780.8486,-1920.2805,13.4567,270.0005,47,74); // BUS KOLODVOR!
  7895. //---------------------------------------------------------------------------CH DM-
  7896.     for(new h = 0; h < sizeof(BizzInfo); h++)
  7897.     {
  7898.  
  7899.         if(BizzInfo[h][bOwned] == 0)
  7900.         {
  7901.             AddStaticPickup(1272, 50, BizzInfo[h][bEntrancex], BizzInfo[h][bEntrancey], BizzInfo[h][bEntrancez]);
  7902.             pickups++;
  7903.         }
  7904.         if(BizzInfo[h][bOwned] == 1)
  7905.         {
  7906.             AddStaticPickup(1239, 50, BizzInfo[h][bEntrancex], BizzInfo[h][bEntrancey], BizzInfo[h][bEntrancez]);
  7907.             pickups++;
  7908.         }
  7909.     }
  7910.     for(new h = 0; h < sizeof(SBizzInfo); h++)
  7911.     {
  7912.  
  7913.         if(SBizzInfo[h][sbOwned] == 0)
  7914.         {
  7915.             AddStaticPickup(1272, 50, SBizzInfo[h][sbEntrancex], SBizzInfo[h][sbEntrancey], SBizzInfo[h][sbEntrancez]);
  7916.             pickups++;
  7917.         }
  7918.         if(SBizzInfo[h][sbOwned] == 1)
  7919.         {
  7920.             AddStaticPickup(1239, 50, SBizzInfo[h][sbEntrancex], SBizzInfo[h][sbEntrancey], SBizzInfo[h][sbEntrancez]);
  7921.             pickups++;
  7922.         }
  7923.     }
  7924.     AddStaticPickup(371, 2, 1536.0, -1360.0, 1150.0);
  7925.     AddStaticPickup(3013, 2, 997.7,-921.1,42.1);//cashbox
  7926.     AddStaticPickup(3013, 2, 2421.5, -1221.7, 25.3);
  7927.     AddStaticPickup(3013, 2, 2069.7,-1780.1,13.5);
  7928.     AddStaticPickup(3013, 2, 1352.4,-1756.7,13.5);
  7929.     AddStaticPickup(3013, 2, 1831.1,-1842.8,13.5);
  7930.     AddStaticPickup(1242, 2, 1527.5,-12.1,1002.0); //binco armor
  7931.  
  7932.     pickups=pickups+9;
  7933.  
  7934.     printf("Pickups Max = 100, Current Pickups = %d",pickups);
  7935. //---------------------
  7936.     if (gRoundTime > 0)
  7937.     {
  7938.         SetTimer("GameModeInitExitFunc", gRoundTime, 0);
  7939.     }
  7940.     if (realtime)
  7941.     {
  7942.         new tmphour;
  7943.         new tmpminute;
  7944.         new tmpsecond;
  7945.         gettime(tmphour, tmpminute, tmpsecond);
  7946.         FixHour(tmphour);
  7947.         tmphour = shifthour;
  7948.         SetWorldTime(tmphour);
  7949.     }
  7950.     if (fow)
  7951.     {
  7952.         SetTimer("CopScanner", radarfreq, 1);
  7953.     }
  7954.     synctimer = SetTimer("SyncUp", 60000, 1);
  7955.     newmistimer = SetTimer("PrePlayerNewMission", jobdelay, 1);
  7956.     unjailtimer = SetTimer("SetPlayerUnjail", 1000, 1);
  7957.     if (nocasino)
  7958.     {
  7959.         playertimer = SetTimer("PlayerInArea", 1000, 1);
  7960.     }
  7961.     cartimer = SetTimer("CarCheck", 30000, 1);
  7962.     celltimer = SetTimer("CellPhoneTimer", 1000, 1);
  7963.     SetTimer("RingToner", 500, 0);
  7964.     SetTimer("SetPlayerFlash", 1000, 0);
  7965.     SetTimer("CustomPickups", 1000, 1);
  7966.     SetTimer("InHouse", 1000, 1);
  7967.     SetTimer("GameTicks", 500, 1);
  7968.     SetTimer("VoteKickTimer", 1000, 1);
  7969.     SetTimer("DMDetect", 1000, 1);
  7970.     SetTimer("Spectator", 2000, 1);
  7971.     SetTimer("PenInArea", 2000, 1);
  7972.     SetTimer("IdleKick", idletime, 1);
  7973.     SetTimer("AntiTeleport", 1000, 1);
  7974.     SetTimer("AntiCamp", 1000, 1);
  7975.     SetTimer("SkyDive", 1000, 1);
  7976.     SetTimer("Production", 300000, 1); //5 mins
  7977.    
  7978.     for(new i = 0; i < sizeof(CarSpawns); i++)
  7979.     {
  7980.         new randcol = random(126);
  7981.         new randcol2 = 1;
  7982.         if (rccounter == 14)
  7983.         {
  7984.             rccounter = 0;
  7985.         }
  7986.         hotwires[i] = CreateVehicle(carselect[rccounter], CarSpawns[i][pos_x], CarSpawns[i][pos_y], CarSpawns[i][pos_z], CarSpawns[i][z_angle], randcol, randcol2, 10000);
  7987.         rccounter++;
  7988.     }
  7989.     CarInit();
  7990.     TeamCarLockInit();
  7991.     return 1;
  7992. }
  7993.  
  7994. public SyncUp()
  7995. {
  7996.     if (gdebug >= 3){printf("DEBUG SyncUp()");}
  7997.     SyncTime();
  7998.     DollahScoreUpdate();
  7999. }
  8000.  
  8001. public SyncTime()
  8002. {
  8003.     if (gdebug >= 3){printf("DEBUG SyncTime()");}
  8004.     new string[64];
  8005.     new tmphour;
  8006.     new tmpminute;
  8007.     new tmpsecond;
  8008.     gettime(tmphour, tmpminute, tmpsecond);
  8009.     FixHour(tmphour);
  8010.     tmphour = shifthour;
  8011.     if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
  8012.     {
  8013.         format(string, sizeof(string), "{FFAA00}CroHerze: {FFFFFF}Sada je {33BBFF}%d:00 {FFFFFF}sati",tmphour);
  8014.         BroadCast(COLOR_WHITE,string);
  8015.         if (numplayers == 0)
  8016.         {
  8017.             GameModeInitExitFunc();
  8018.         }
  8019.         if (gdebug){printf("DEBUG tmphour=%d ghour=%d",tmphour,ghour);}
  8020.         ghour = tmphour;
  8021.         PayDay();
  8022.         if (realtime)
  8023.         {
  8024.             SetWorldTime(tmphour);
  8025.         }
  8026.     }
  8027. }
  8028.  
  8029. public SkyDive()
  8030. {
  8031.     skydivecount--;
  8032.     new string[256];
  8033.     for(new i = 0; i <= MAX_PLAYERS; i++)
  8034.     {
  8035.         if(IsPlayerConnected(i) == 1 && gSkyDive[i] == 1)
  8036.         {
  8037.             if(skydivecount > 10)
  8038.             {
  8039.                 format(string, sizeof(string), "~W~%d",skydivecount);
  8040.             }
  8041.             else
  8042.             {
  8043.                 format(string, sizeof(string), "~r~%d",skydivecount);
  8044.             }
  8045.             GameTextForPlayer(i, string, 2000, 6);
  8046.             if(skydivecount == 0)
  8047.             {
  8048.                 GivePlayerWeapon(i, 46, 0);
  8049.                 SetPlayerPos(i,SBizzInfo[0][sbEntrancex]+i, SBizzInfo[0][sbEntrancey], 1350.0);
  8050.                 SetPlayerInterior(i,0);
  8051.                 PlayerInfo[i][pInt] = 0;
  8052.                 SendClientMessage(i, TEAM_GROVE_COLOR, "MOZE: GO!! GO!! GO!!");
  8053.                 gSkyDive[i] = 0;
  8054.             }
  8055.         }
  8056.     }
  8057.     if(skydivecount == 0)
  8058.     {
  8059.         skydivecount = 60;
  8060.     }
  8061. }
  8062.  
  8063. public Production()
  8064. {
  8065.     for(new i = 0; i < sizeof(BizzInfo); i++)
  8066.     {
  8067.         if(BizzInfo[i][bComp] > 0)
  8068.         {
  8069.             //printf("BizzInfo[i][bComp] %d BizzInfo[i][bProdCost] %d",BizzInfo[i][bComp],BizzInfo[i][bProdCost])
  8070.             if(BizzInfo[i][bProd] < BizzInfo[i][bProdCap])
  8071.             {
  8072.                 //printf("BizzInfo[i][bProd] %d BizzInfo[i][bProdCap] %d",BizzInfo[i][bProd],BizzInfo[i][bProdCap])
  8073.                 BizzInfo[i][bProd] = BizzInfo[i][bProd]+BizzInfo[i][bProdCost];
  8074.                 BizzInfo[i][bComp]--;
  8075.             }
  8076.         }
  8077.     }
  8078.     for(new i = 0; i < sizeof(SBizzInfo); i++)
  8079.     {
  8080.         if(SBizzInfo[i][sbComp] > 0)
  8081.         {
  8082.             if(SBizzInfo[i][sbProd] < SBizzInfo[i][sbProdCap])
  8083.             {
  8084.                 SBizzInfo[i][sbProd] = SBizzInfo[i][sbProd]+SBizzInfo[i][sbProdCost];
  8085.                 SBizzInfo[i][sbComp]--;
  8086.             }
  8087.         }
  8088.     }
  8089. }
  8090.  
  8091. public DateProp(playerid)
  8092. {
  8093.     new playername[MAX_PLAYER_NAME];
  8094.     GetPlayerName(playerid, playername, sizeof(playername));
  8095.     new curdate = getdate();
  8096.     for(new h = 0; h < sizeof(HouseInfo); h++)
  8097.     {
  8098.         if (strcmp(playername, HouseInfo[h][hOwner], true) == 0)
  8099.         {
  8100.             HouseInfo[h][hDate] = curdate;
  8101.             OnPropUpdate();
  8102.         }
  8103.     }
  8104.     for(new b = 0; b < sizeof(BizzInfo); b++)
  8105.     {
  8106.         if (strcmp(playername, BizzInfo[b][bOwner], true) == 0)
  8107.         {
  8108.             BizzInfo[b][bDate] = curdate;
  8109.             OnPropUpdate();
  8110.         }
  8111.     }
  8112.     for(new c = 0; c < sizeof(SBizzInfo); c++)
  8113.     {
  8114.         if (strcmp(playername, SBizzInfo[c][sbOwner], true) == 0)
  8115.         {
  8116.             SBizzInfo[c][sbDate] = curdate;
  8117.             OnPropUpdate();
  8118.         }
  8119.     }
  8120.     return 1;
  8121. }
  8122.  
  8123. public Checkprop()
  8124. {
  8125.     new olddate;
  8126.     new string[256];
  8127.     new curdate = getdate();
  8128.     for(new h = 0; h < sizeof(HouseInfo); h++)
  8129.     {
  8130.         if(HouseInfo[h][hOwned] == 1 && HouseInfo[h][hDate] > 9)
  8131.         {
  8132.             olddate = HouseInfo[h][hDate];
  8133.             if(curdate-olddate >= 3)
  8134.             {
  8135.                 HouseInfo[h][hHel] = 0;
  8136.                 HouseInfo[h][hArm] = 0;
  8137.                 HouseInfo[h][hHealthx] = 0;
  8138.                 HouseInfo[h][hHealthy] = 0;
  8139.                 HouseInfo[h][hHealthz] = 0;
  8140.                 HouseInfo[h][hArmourx] = 0;
  8141.                 HouseInfo[h][hArmoury] = 0;
  8142.                 HouseInfo[h][hArmourz] = 0;
  8143.                 HouseInfo[h][hLock] = 1;
  8144.                 HouseInfo[h][hOwned] = 0;
  8145.                 HouseInfo[h][hVec] = 418;
  8146.                 HouseInfo[h][hVcol1] = -1;
  8147.                 HouseInfo[h][hVcol2] = -1;
  8148.                 strmid(HouseInfo[h][hOwner], "The State", 0, strlen("The State"), 255);
  8149.                 format(string, sizeof(string), "Oglasavanje | Autor: CroHerza | {F3FF02}Kontakt broj: 0",  HouseInfo[h][hOwner]);
  8150.                 SendClientMessageToAll(COLOR_GREEN,string);
  8151.                 format(string, sizeof(string), "{FFFFFF}-Kuca je na prodaju za %d$", HouseInfo[h][hValue]);
  8152.                 SendClientMessageToAll(COLOR_WHITE, string);
  8153.                 OnPropUpdate();
  8154.             }
  8155.         }
  8156.     }
  8157.     for(new b = 0; b < sizeof(BizzInfo); b++)
  8158.     {
  8159.         if(BizzInfo[b][bOwned] == 1 && BizzInfo[b][bDate] > 9)
  8160.         {
  8161.             olddate = BizzInfo[b][bDate];
  8162.             if(curdate-olddate >= 3)
  8163.             {
  8164.                 BizzInfo[b][bHel] = 0;
  8165.                 BizzInfo[b][bArm] = 0;
  8166.                 BizzInfo[b][bLock] = 1;
  8167.                 BizzInfo[b][bOwned] = 0;
  8168.                 strmid(BizzInfo[b][bOwner], "The State", 0, strlen("The State"), 255);
  8169.                 format(string, sizeof(string), "Oglasavanje | Autor: CroHerza | {F3FF02}Kontakt broj: 0",  BizzInfo[b][bOwner]);
  8170.                 SendClientMessageToAll(COLOR_GREEN,string);
  8171.                 format(string, sizeof(string), "{FFFFFF}-Slobodna firma za %d$", BizzInfo[b][bValue]);
  8172.                 SendClientMessageToAll(COLOR_WHITE, string);
  8173.                 OnPropUpdate();
  8174.             }
  8175.         }
  8176.     }
  8177.     for(new c = 0; c < sizeof(SBizzInfo); c++)
  8178.     {
  8179.         if(SBizzInfo[c][sbOwned] == 1 && SBizzInfo[c][sbDate] > 9)
  8180.         {
  8181.             olddate = SBizzInfo[c][sbDate];
  8182.             if(curdate-olddate >= 3)
  8183.             {
  8184.                 SBizzInfo[c][sbHel] = 0;
  8185.                 SBizzInfo[c][sbArm] = 0;
  8186.                 SBizzInfo[c][sbLock] = 1;
  8187.                 SBizzInfo[c][sbOwned] = 0;
  8188.                 strmid(SBizzInfo[c][sbOwner], "The State", 0, strlen("The State"), 255);
  8189.                 format(string, sizeof(string), "Oglasavanje | Autor: CroHerza | {F3FF02}Kontakt broj: 0", SBizzInfo[c][sbOwner]);
  8190.                 SendClientMessageToAll(COLOR_GREEN,string);
  8191.                 format(string, sizeof(string), "{FFFFFF}-Slobodna mala firma za %d$", SBizzInfo[c][sbValue]);
  8192.                 SendClientMessageToAll(COLOR_WHITE, string);
  8193.                 OnPropUpdate();
  8194.             }
  8195.         }
  8196.     }
  8197.     return 1;
  8198. }
  8199.  
  8200. public PayDay()
  8201. {
  8202.     if (gdebug >= 1){printf("DEBUG PayDay()");}
  8203.     new string[128];
  8204.     new pay,account,interest;
  8205.     new rent = 0;
  8206.     for(new i = 0; i <= MAX_PLAYERS; i++)
  8207.     {
  8208.         if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pLevel] > 0)
  8209.         {
  8210.             new playername2[MAX_PLAYER_NAME];
  8211.             GetPlayerName(i, playername2, sizeof(playername2));
  8212.             account = PlayerInfo[i][pAccount];
  8213.             new key = PlayerInfo[i][pPhousekey];
  8214.             if(key != 255)
  8215.             {
  8216.                 rent = HouseInfo[key][hRent];
  8217.                 if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
  8218.                 {
  8219.                     rent = 0;
  8220.                 }
  8221.                 else if(rent > GetPlayerMoney(i))
  8222.                 {
  8223.                     PlayerInfo[i][pPhousekey] = 255;
  8224.                     SendClientMessage(i, COLOR_WHITE, "Optuzen si");
  8225.                     rent = 0;
  8226.                 }
  8227.                 HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
  8228.             }
  8229.             new tmpintrate;
  8230.             if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
  8231.             {
  8232.                 tmpintrate = intrate+HouseInfo[key][hLevel];
  8233.             }
  8234.             else
  8235.             {
  8236.                 tmpintrate = 1;
  8237.             }
  8238.             interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
  8239.             pay = PlayerInfo[i][pLevel]*paycheck;
  8240.             PlayerInfo[i][pExp]++;
  8241.             PlayerPlayMusic(i);
  8242.             GivePlayerMoney(i,pay-rent);
  8243.             PlayerInfo[i][pAccount] = account+interest;
  8244.             BizzInfo[4][bTakings] = BizzInfo[4][bTakings]+((PlayerInfo[i][pAccount]/1000)+intrate);
  8245.             new coordsstring[400];
  8246.             SendAdminMessage(0xDB023EFF, "| ZeroAS | Dynamicno snimanje vlasnistva,moguc lag sljedecih 40sekundi!");
  8247.             new cash =  GetPlayerMoney(i);
  8248.             format(coordsstring, sizeof(coordsstring), "\nBanka Los Santos\n\nPostovani,ovo je bankovno izvijesce za proteklo razdoblje.\n\nPrihodi\n-Stari iznos racuna: $%d\n-Iznos uplate place na vas racun: $%d, Dodatci: $0\n\nRashodi\n-Struja: | Voda: 0$ | Smece: 0$ | Plin: 0$ \n-Najamnina: Kuca: -$%d\n-Porez na luksuz: 0\n\n\nNovo stanje na vasem racunu iznosi: %d", account,cash,rent,PlayerInfo[i][pAccount]+cash );
  8249.             ShowPlayerDialog(i, 1, DIALOG_STYLE_MSGBOX, "{33BBFF}LS BANKA | Izlistanje racuna", coordsstring, "U redu", "Odustani");
  8250.             SendAdminMessage(COLOR_GREEN, "[PAYDAY][provjera] - U redu.");
  8251.             rent = 0;
  8252.         }
  8253.     }
  8254.     Checkprop();
  8255.     return 1;
  8256. }
  8257.  
  8258. strtok(const string[], &index)
  8259. {
  8260.     new length = strlen(string);
  8261.     while ((index < length) && (string[index] <= ' '))
  8262.     {
  8263.         index++;
  8264.     }
  8265.  
  8266.     new offset = index;
  8267.     new result[20];
  8268.     while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  8269.     {
  8270.         result[index - offset] = string[index];
  8271.         index++;
  8272.     }
  8273.     result[index - offset] = EOS;
  8274.     return result;
  8275. }
  8276.  
  8277. split(const strsrc[], strdest[][], delimiter)
  8278. {
  8279.     new i, li;
  8280.     new aNum;
  8281.     new len;
  8282.  
  8283.     while(i <= strlen(strsrc)){
  8284.         if(strsrc[i]==delimiter || i==strlen(strsrc)){
  8285.             len = strmid(strdest[aNum], strsrc, li, i, 128);
  8286.             strdest[aNum][len] = 0;
  8287.             li = i+1;
  8288.             aNum++;
  8289.         }
  8290.         i++;
  8291.     }
  8292.     return 1;
  8293. }
  8294.  
  8295. public DelPrint(string1[])
  8296. {
  8297.     strmid(string1, string1, 0, strlen(string1)-1, 255);
  8298.     printf("%s", string1);
  8299. }
  8300.  
  8301. public LoadPlayer(loaderid,const string[])
  8302. {
  8303.     new string2[64];
  8304.     new loaded = loaderid;
  8305.     new valtmp[128];
  8306.     format(string2, sizeof(string2), "%s.ini", string);
  8307.     new File: file = fopen(string2, io_read);
  8308.     if (file)
  8309.     {
  8310.             fread(file, valtmp);strmid(PLlayerInfo[loaded][plKey], valtmp, 0, strlen(valtmp)-1, 255);
  8311.             fread(file, valtmp);PLlayerInfo[loaded][plCash] = strval(valtmp);DelPrint(valtmp);
  8312.             fread(file, valtmp);PLlayerInfo[loaded][plAccount] = strval(valtmp);DelPrint(valtmp);
  8313.             fread(file, valtmp);PLlayerInfo[loaded][plAdmin] = strval(valtmp);DelPrint(valtmp);
  8314.             fread(file, valtmp);PLlayerInfo[loaded][plLevel] = strval(valtmp);DelPrint(valtmp);
  8315.             fread(file, valtmp);PLlayerInfo[loaded][plExp] = strval(valtmp);DelPrint(valtmp);
  8316.             fread(file, valtmp);PLlayerInfo[loaded][glPupgrade] = strval(valtmp);DelPrint(valtmp);
  8317.             fread(file, valtmp);PLlayerInfo[loaded][plKills] = strval(valtmp);DelPrint(valtmp);
  8318.             fread(file, valtmp);PLlayerInfo[loaded][plCB] = strval(valtmp);DelPrint(valtmp);
  8319.             fread(file, valtmp);PLlayerInfo[loaded][plHW] = strval(valtmp);DelPrint(valtmp);
  8320.             fread(file, valtmp);PLlayerInfo[loaded][plSR] = strval(valtmp);DelPrint(valtmp);
  8321.             fread(file, valtmp);PLlayerInfo[loaded][plWA] = strval(valtmp);DelPrint(valtmp);
  8322.             fread(file, valtmp);PLlayerInfo[loaded][plPEN] = strval(valtmp);DelPrint(valtmp);
  8323.             fread(file, valtmp);PLlayerInfo[loaded][plGun1] = strval(valtmp);DelPrint(valtmp);
  8324.             fread(file, valtmp);PLlayerInfo[loaded][plGun2] = strval(valtmp);DelPrint(valtmp);
  8325.             fread(file, valtmp);PLlayerInfo[loaded][plGun3] = strval(valtmp);DelPrint(valtmp);
  8326.             fread(file, valtmp);PLlayerInfo[loaded][plGun4] = strval(valtmp);DelPrint(valtmp);
  8327.             fread(file, valtmp);PLlayerInfo[loaded][plGun5] = strval(valtmp);DelPrint(valtmp);
  8328.             fread(file, valtmp);PLlayerInfo[loaded][plGun6] = strval(valtmp);DelPrint(valtmp);
  8329.             fread(file, valtmp);PLlayerInfo[loaded][plAmmo1] = strval(valtmp);DelPrint(valtmp);
  8330.             fread(file, valtmp);PLlayerInfo[loaded][plAmmo2] = strval(valtmp);DelPrint(valtmp);
  8331.             fread(file, valtmp);PLlayerInfo[loaded][plAmmo3] = strval(valtmp);DelPrint(valtmp);
  8332.             fread(file, valtmp);PLlayerInfo[loaded][plAmmo4] = strval(valtmp);DelPrint(valtmp);
  8333.             fread(file, valtmp);PLlayerInfo[loaded][plAmmo5] = strval(valtmp);DelPrint(valtmp);
  8334.             fread(file, valtmp);PLlayerInfo[loaded][plAmmo6] = strval(valtmp);DelPrint(valtmp);
  8335.             fread(file, valtmp);PLlayerInfo[loaded][plSHealth] = floatstr(valtmp);DelPrint(valtmp);
  8336.             fread(file, valtmp);PLlayerInfo[loaded][plHealth] = floatstr(valtmp);DelPrint(valtmp);
  8337.             fread(file, valtmp);PLlayerInfo[loaded][plPos_x] = floatstr(valtmp);DelPrint(valtmp);
  8338.             fread(file, valtmp);PLlayerInfo[loaded][plPos_y] = floatstr(valtmp);DelPrint(valtmp);
  8339.             fread(file, valtmp);PLlayerInfo[loaded][plPos_z] = floatstr(valtmp);DelPrint(valtmp);
  8340.             fread(file, valtmp);PLlayerInfo[loaded][plInt] = strval(valtmp);DelPrint(valtmp);
  8341.             fread(file, valtmp);PLlayerInfo[loaded][plLocal] = strval(valtmp);DelPrint(valtmp);
  8342.             fread(file, valtmp);PLlayerInfo[loaded][plTeam] = strval(valtmp);DelPrint(valtmp);
  8343.             fread(file, valtmp);PLlayerInfo[loaded][plLeader] = strval(valtmp);DelPrint(valtmp);
  8344.             fread(file, valtmp);PLlayerInfo[loaded][plFMember] = strval(valtmp);DelPrint(valtmp);
  8345.             fread(file, valtmp);PLlayerInfo[loaded][plMember] = strval(valtmp);DelPrint(valtmp);
  8346.             fread(file, valtmp);PLlayerInfo[loaded][plRank] = strval(valtmp);DelPrint(valtmp);
  8347.             fread(file, valtmp);PLlayerInfo[loaded][plChar] = strval(valtmp);DelPrint(valtmp);
  8348.             fread(file, valtmp);PLlayerInfo[loaded][plModel] = strval(valtmp);DelPrint(valtmp);
  8349.             fread(file, valtmp);PLlayerInfo[loaded][plWarns] = strval(valtmp);DelPrint(valtmp);
  8350.             fread(file, valtmp);PLlayerInfo[loaded][plPnumber] = strval(valtmp);DelPrint(valtmp);
  8351.             fread(file, valtmp);PLlayerInfo[loaded][plPhousekey] = strval(valtmp);DelPrint(valtmp);
  8352.             fread(file, valtmp);PLlayerInfo[loaded][plPbiskey] = strval(valtmp);DelPrint(valtmp);
  8353.             fread(file, valtmp);PLlayerInfo[loaded][plTVec] = strval(valtmp);DelPrint(valtmp);
  8354.             fread(file, valtmp);PLlayerInfo[loaded][plReg] = strval(valtmp);DelPrint(valtmp);
  8355.             SendClientMessage(loaderid, COLOR_WHITE, "CroHerze: Account ucitan");
  8356.     }
  8357.     else
  8358.     {
  8359.         SendClientMessage(loaderid, COLOR_WHITE, "CroHerze: nije nadjen Account s tim imenom");
  8360.         return 0;
  8361.     }
  8362.     return 1;
  8363. }
  8364.  
  8365. public SavePlayer(loaderid,const string[])
  8366. {
  8367.     new string3[32];
  8368.     new saved = loaderid;
  8369.     format(string3, sizeof(string3), "%s.ini", string);
  8370.     new File: pFile = fopen(string3, io_write);
  8371.     if (pFile)
  8372.     {
  8373.         new var[32];
  8374.         format(var, 32, "pKey=%s\n", PLlayerInfo[saved][plKey]);fwrite(pFile, var);
  8375.         fclose(pFile);
  8376.         new File: hFile = fopen(string3, io_append);
  8377.         format(var, 32, "pCash=%d\n",PLlayerInfo[saved][plCash]);fwrite(hFile, var);
  8378.         format(var, 32, "pAccount=%d\n",PLlayerInfo[saved][plAccount]);fwrite(hFile, var);
  8379.         format(var, 32, "pAdmin=%d\n",PLlayerInfo[saved][plAdmin]);fwrite(hFile, var);
  8380.         format(var, 64, "MuteTime=%d\n",PlayerInfo[saved][pMuteTime]);fwrite(hFile, var);
  8381.         format(var, 64, "Muted=%d\n",PlayerInfo[saved][pMuted]);fwrite(hFile, var);
  8382.         format(var, 32, "CHBodovi=%d\n",PlayerInfo[saved][pCHBodovi]);fwrite(hFile, var);
  8383.         format(var, 32, "pLevel=%d\n",PLlayerInfo[saved][plLevel]);fwrite(hFile, var);
  8384.         format(var, 32, "pExp=%d\n",PLlayerInfo[saved][plExp]);fwrite(hFile, var);
  8385.         format(var, 32, "gPupgrade=%d\n",PLlayerInfo[saved][glPupgrade]);fwrite(hFile, var);
  8386.         format(var, 32, "pKills=%d\n",PLlayerInfo[saved][plKills]);fwrite(hFile, var);
  8387.         format(var, 32, "pCB=%d\n",PLlayerInfo[saved][plCB]);fwrite(hFile, var);
  8388.         format(var, 32, "pHW=%d\n",PLlayerInfo[saved][plHW]);fwrite(hFile, var);
  8389.         format(var, 32, "pSR=%d\n",PLlayerInfo[saved][plSR]);fwrite(hFile, var);
  8390.         format(var, 32, "pWA=%d\n",PLlayerInfo[saved][plWA]);fwrite(hFile, var);
  8391.         format(var, 32, "pPEN=%d\n",PLlayerInfo[saved][plPEN]);fwrite(hFile, var);
  8392.         format(var, 32, "pGun1=%d\n",PLlayerInfo[saved][plGun1]);fwrite(hFile, var);
  8393.         format(var, 32, "pGun2=%d\n",PLlayerInfo[saved][plGun2]);fwrite(hFile, var);
  8394.         format(var, 32, "pGun3=%d\n",PLlayerInfo[saved][plGun3]);fwrite(hFile, var);
  8395.         format(var, 32, "pGun4=%d\n",PLlayerInfo[saved][plGun4]);fwrite(hFile, var);
  8396.         format(var, 32, "pGun5=%d\n",PLlayerInfo[saved][plGun5]);fwrite(hFile, var);
  8397.         format(var, 32, "pGun6=%d\n",PLlayerInfo[saved][plGun6]);fwrite(hFile, var);
  8398.         format(var, 32, "pAmmo1=%d\n",PLlayerInfo[saved][plAmmo1]);fwrite(hFile, var);
  8399.         format(var, 32, "pAmmo2=%d\n",PLlayerInfo[saved][plAmmo2]);fwrite(hFile, var);
  8400.         format(var, 32, "pAmmo3=%d\n",PLlayerInfo[saved][plAmmo3]);fwrite(hFile, var);
  8401.         format(var, 32, "pAmmo4=%d\n",PLlayerInfo[saved][plAmmo4]);fwrite(hFile, var);
  8402.         format(var, 32, "pAmmo5=%d\n",PLlayerInfo[saved][plAmmo5]);fwrite(hFile, var);
  8403.         format(var, 32, "pAmmo6=%d\n",PLlayerInfo[saved][plAmmo6]);fwrite(hFile, var);
  8404.         format(var, 32, "pSHealth=%.lf\n", PLlayerInfo[saved][plSHealth]);fwrite(hFile, var);
  8405.         format(var, 32, "pHealth=%.lf\n", PLlayerInfo[saved][plHealth]);fwrite(hFile, var);
  8406.         format(var, 32, "pPos_x=%.lf\n", PLlayerInfo[saved][plPos_x]);fwrite(hFile, var);
  8407.         format(var, 32, "pPos_y=%.lf\n", PLlayerInfo[saved][plPos_y]);fwrite(hFile, var);
  8408.         format(var, 32, "pPos_z=%.lf\n", PLlayerInfo[saved][plPos_z]);fwrite(hFile, var);
  8409.         format(var, 32, "pInt=%d\n",PLlayerInfo[saved][plInt]);fwrite(hFile, var);
  8410.         format(var, 32, "pLocal=%d\n",PLlayerInfo[saved][plLocal]);fwrite(hFile, var);
  8411.         format(var, 32, "pTeam=%d\n",PLlayerInfo[saved][plTeam]);fwrite(hFile, var);
  8412.         format(var, 32, "pLeader=%d\n",PlayerInfo[saved][pLeader]);fwrite(hFile, var);
  8413.         format(var, 32, "pMember=%d\n",PlayerInfo[saved][pMember]);fwrite(hFile, var);
  8414.         format(var, 32, "pFMember=%d\n",PlayerInfo[saved][pFMember]);fwrite(hFile, var);
  8415.         format(var, 32, "pRank=%d\n",PlayerInfo[saved][pRank]);fwrite(hFile, var);
  8416.         format(var, 32, "pChar=%d\n",PlayerInfo[saved][pChar]);fwrite(hFile, var);
  8417.         format(var, 32, "pModel=%d\n",PLlayerInfo[saved][plModel]);fwrite(hFile, var);
  8418.         format(var, 32, "pWarns=%d\n",PLlayerInfo[saved][plWarns]);fwrite(hFile, var);
  8419.         format(var, 32, "pPnumber=%d\n",PLlayerInfo[saved][plPnumber]);fwrite(hFile, var);
  8420.         format(var, 32, "pPhousekey=%d\n",PLlayerInfo[saved][plPhousekey]);fwrite(hFile, var);
  8421.         format(var, 32, "pPbiskey=%d\n",PLlayerInfo[saved][plPbiskey]);fwrite(hFile, var);
  8422.         format(var, 32, "pTVec=%d\n",PLlayerInfo[saved][plTVec]);fwrite(hFile, var);
  8423.         format(var, 32, "pReg=%d\n",PLlayerInfo[saved][plReg]);fwrite(hFile, var);
  8424.         fclose(hFile);
  8425.     }
  8426.     return 1;
  8427. }
  8428.  
  8429.  
  8430. public OnPlayerLogin(playerid,password[])
  8431. {
  8432.     new string2[64];
  8433.     new playername2[MAX_PLAYER_NAME];
  8434.     new tmp2[256];
  8435.     GetPlayerName(playerid, playername2, sizeof(playername2));
  8436.     format(string2, sizeof(string2), "%s.ini", playername2);
  8437.     new File: file = fopen(string2, io_read);
  8438.     if (file)
  8439.     {
  8440.         new PassData[256];
  8441.         new keytmp[256], valtmp[256];
  8442.         fread( file , PassData , sizeof( PassData ) );
  8443.         keytmp = ini_GetKey( PassData );
  8444.         if( strcmp( keytmp , "pKey" , true ) == 0 )
  8445.         {
  8446.             valtmp = ini_GetValue( PassData );
  8447.             strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
  8448.         }
  8449.         if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
  8450.         {
  8451.                 new key[ 256 ] , val[ 256 ];
  8452.                 new Data[ 256 ];
  8453.                 while ( fread( file , Data , sizeof( Data ) ) )
  8454.                 {
  8455.                     key = ini_GetKey( Data );
  8456.                     if( strcmp( key , "pCash" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
  8457.                     if( strcmp( key , "pAccount" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
  8458.                     if( strcmp( key , "pAdmin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
  8459.                     if( strcmp( key , "CHBodovi" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCHBodovi] = strval( val ); }
  8460.                     if( strcmp( key , "GameSageLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGameSage] = strval( val ); }
  8461.                     if( strcmp( key , "pLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
  8462.                     if( strcmp( key , "pExp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
  8463.                     if( strcmp( key , "gPupgrade" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][gPupgrade] = strval( val ); }
  8464.                     if( strcmp( key , "pKills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
  8465.                     if( strcmp( key , "MuteTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuteTime] = strval( val ); }
  8466.                     if( strcmp( key , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuted] = strval( val ); }
  8467.                     if( strcmp( key , "pCB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCB] = strval( val ); }
  8468.                     if( strcmp( key , "pHW" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHW] = strval( val ); }
  8469.                     if( strcmp( key , "pSR" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSR] = strval( val ); }
  8470.                     if( strcmp( key , "pWA" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWA] = strval( val ); }
  8471.                     if( strcmp( key , "pPEN" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPEN] = strval( val ); }
  8472.                     if( strcmp( key , "pGun1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun1] = strval( val ); }
  8473.                     if( strcmp( key , "pGun2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun2] = strval( val ); }
  8474.                     if( strcmp( key , "pGun3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun3] = strval( val ); }
  8475.                     if( strcmp( key , "pGun4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun4] = strval( val ); }
  8476.                     if( strcmp( key , "pGun5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun5] = strval( val ); }
  8477.                     if( strcmp( key , "pGun6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun6] = strval( val ); }
  8478.                     if( strcmp( key , "pAmmo1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo1] = strval( val ); }
  8479.                     if( strcmp( key , "pAmmo2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo2] = strval( val ); }
  8480.                     if( strcmp( key , "pAmmo3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo3] = strval( val ); }
  8481.                     if( strcmp( key , "pAmmo4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo4] = strval( val ); }
  8482.                     if( strcmp( key , "pAmmo5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo5] = strval( val ); }
  8483.                     if( strcmp( key , "pAmmo6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo6] = strval( val ); }
  8484.                     if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = strval( val ); }
  8485.                     if( strcmp( key , "pPHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = strval( val ); }
  8486.                     if( strcmp( key , "pPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = strval( val ); }
  8487.                     if( strcmp( key , "pPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = strval( val ); }
  8488.                     if( strcmp( key , "pPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = strval( val ); }
  8489.                     if( strcmp( key , "pInt" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = strval( val ); }
  8490.                     if( strcmp( key , "pLocal" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocal] = strval( val ); }
  8491.                     if( strcmp( key , "pTeam" , true ) == 0 ) { val = ini_GetValue( Data );PlayerInfo[playerid][pTeam] = strval(val); }
  8492.                     if( strcmp( key , "pLeader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeader] = strval( val ); }
  8493.                     if( strcmp( key , "pMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMember] = strval( val ); }
  8494.                     if( strcmp( key , "pFMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFMember] = strval( val ); }
  8495.                     if( strcmp( key , "pRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
  8496.                     if( strcmp( key , "pChar" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChar] = strval( val ); }
  8497.                     if( strcmp( key , "pModel" , true ) == 0 ) { val = ini_GetValue( Data );PlayerInfo[playerid][pModel] = strval(val); }
  8498.                     if( strcmp( key , "pWarns" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); }
  8499.                     if( strcmp( key , "pPnumber" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); }
  8500.                     if( strcmp( key , "pPhousekey" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); }
  8501.                     if( strcmp( key , "pPbiskey" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPbiskey] = strval( val ); }
  8502.                     if( strcmp( key , "pTVec" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTVec] = strval( val ); }
  8503.                     if( strcmp( key , "pReg" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReg] = strval( val ); }
  8504.                 }//end while
  8505.                 fclose(file);//close the file after everything has been read in the while
  8506.         }
  8507.         else
  8508.         {
  8509.             new loginstring[400];
  8510.             new loginname[64];
  8511.             GetPlayerName(playerid,loginname,sizeof(loginname));
  8512.             format(loginstring,sizeof(loginstring),"{33BBFF}___________________________________________\n{F81414}[Greska] {FFFF22}Unijeli ste pogresnu lozinku\n\n{33BBFF}%s\n{FFFFFF}Tvoj korisnicki racun je pronadjen!\n\nMolimo upisi svoju lozinku da udjes na server:\n{33BBFF}___________________________________________",loginname);
  8513.             ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"{FFFFFF}Logiranje",loginstring,"Logiraj","Odustani");
  8514.             gPlayerLogTries[playerid] += 1;
  8515.             if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
  8516.             return 1;
  8517.         }
  8518.         ResetPlayerMoney(playerid);
  8519.         SetPlayerToTeamColor(playerid);
  8520.         GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
  8521.         if(PlayerInfo[playerid][pReg] == 0)
  8522.         {
  8523.             SetPlayerInterior(playerid,0);
  8524.             PlayerInfo[playerid][pLevel] = 1;
  8525.             PlayerInfo[playerid][pSHealth] = 0.0;
  8526.             PlayerInfo[playerid][pHealth] = 50.0;
  8527.             PlayerInfo[playerid][pPos_x] = 2223.8;
  8528.             PlayerInfo[playerid][pPos_y] = -1147.1;
  8529.             PlayerInfo[playerid][pPos_z] = 1025.7;
  8530.             PlayerInfo[playerid][pInt] = 15;
  8531.             PlayerInfo[playerid][pLocal] = 255;
  8532.             PlayerInfo[playerid][pTeam] = 3;
  8533.             PlayerInfo[playerid][pModel] = 101;
  8534.             new randphone = 1000 + random(8999);//minimum 1000  max 9999 //giving one at the start
  8535.             PlayerInfo[playerid][pPnumber] = randphone;
  8536.             PlayerInfo[playerid][pPhousekey] = 255;
  8537.             PlayerInfo[playerid][pPbiskey] = 255;
  8538.             PlayerInfo[playerid][pAccount] = 50000;
  8539.             PlayerInfo[playerid][pReg] = 1;
  8540.             GivePlayerMoney(playerid, 5000);
  8541.         }
  8542.         //if (gdebug){printf("DEBUG phonenumber = %d",pnumber);}
  8543.         if(PlayerInfo[playerid][pLevel] == -999) //autoban
  8544.         {
  8545.             Ban(playerid);
  8546.         }
  8547.         SendClientMessage(playerid,0x000000AA, " ");
  8548.         SendClientMessage(playerid,0x000000AA, " ");
  8549.         SendClientMessage(playerid,0x000000AA, " ");
  8550.         SendClientMessage(playerid,0x000000AA, " ");
  8551.         SendClientMessage(playerid,0x000000AA, " ");
  8552.         SendClientMessage(playerid,0x000000AA, " ");
  8553.         SendClientMessage(playerid,0x000000AA, " ");
  8554.         SendClientMessage(playerid,0x000000AA, " ");
  8555.         SendClientMessage(playerid,0x000000AA, " ");
  8556.         SendClientMessage(playerid,0x000000AA, " ");
  8557.         SendClientMessage(playerid,0x000000AA, " ");
  8558.         SendClientMessage(playerid,0x000000AA, " ");
  8559.         SendClientMessage(playerid,0x000000AA, " ");
  8560.         SendClientMessage(playerid,0x000000AA, " ");
  8561.         SendClientMessage(playerid,0x000000AA, " ");
  8562.         SendClientMessage(playerid,0x000000AA, " ");
  8563.         SendClientMessage(playerid,0x000000AA, " ");
  8564.         SendClientMessage(playerid,0x000000AA, " ");
  8565.         SendClientMessage(playerid,0x000000AA, " ");
  8566.         SendClientMessage(playerid,0x000000AA, " ");
  8567.         SendClientMessage(playerid,0x000000AA, " ");
  8568.         SendClientMessage(playerid,0x000000AA, " ");
  8569.         new coordsstring[256];
  8570.         format(coordsstring, sizeof(coordsstring), "*Dobrodosao %s na server,ljepo te opet vidjeti na serveru!",playername2);
  8571.         SendClientMessage(playerid, COLOR_LIGHTBLUE,coordsstring);
  8572.         new level = PlayerInfo[playerid][pLevel];
  8573.         new exp = PlayerInfo[playerid][pExp];
  8574.         new nxtlevel = PlayerInfo[playerid][pLevel]+1;
  8575.         new expamount = nxtlevel*levelexp;
  8576.         format(coordsstring, sizeof(coordsstring), "*Tvoj dosadasnji zivot: Level [%d] | Respekti [%d/%d]",level,exp,expamount);
  8577.         SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  8578.         SetPlayerHealth(playerid,0.0);
  8579.         SendClientMessage(playerid, 0xFFFF00FF, RandomPoslovice[random(sizeof(RandomPoslovice))]);
  8580.         new hour,minuite,second;
  8581.         new year, month,day;
  8582.         getdate(year, month, day);
  8583.         gettime(hour,minuite,second);
  8584.         format(coordsstring, sizeof(coordsstring), "*Sada je: %d:%d h | Datum: %d.%d.%d",hour,minuite,day,month,year);
  8585.         SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
  8586.         SetPlayerWeapons(playerid);
  8587.         SetPlayerHealth(playerid,0.0);
  8588.         if (PlayerInfo[playerid][pCHBodovi] > 1)
  8589.         {
  8590.             format(string2, sizeof(string2), "*Vi imate jos %d CroHerze Bodova",PlayerInfo[playerid][pCHBodovi]);
  8591.             SendClientMessage(playerid, COLOR_LIGHTBLUE,string2);
  8592.             SetPlayerHealth(playerid,0.0);
  8593.         }
  8594.         if (PlayerInfo[playerid][pAdmin] > 1)
  8595.         {
  8596.             format(string2, sizeof(string2), "| ZeroASL | Aktiviram tihi mod...",PlayerInfo[playerid][pAdmin],playername2);
  8597.             ABroadCast(COLOR_LIGHTRED,string2,1);
  8598.             SetPlayerHealth(playerid,0.0);
  8599.         }
  8600.         if (PlayerInfo[playerid][pAdmin] > 0)
  8601.         {
  8602.             format(string2, sizeof(string2), "CroHerza: logiran si kao level admin: %d",PlayerInfo[playerid][pAdmin]);
  8603.             SendClientMessage(playerid, COLOR_BISQUE,string2);
  8604.         }
  8605.         if (PlayerInfo[playerid][pAdmin] > 1)
  8606.         {
  8607.             format(string2, sizeof(string2), "...CH_Admin %s , level: %d , je usao na server...",playername2,PlayerInfo[playerid][pAdmin]);
  8608.             ABroadCast(COLOR_BM,string2,1);
  8609.             SetPlayerHealth(playerid,0.0);
  8610.         }
  8611.         SetSpawnInfo(playerid, 1, PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
  8612.         if(gTeam[playerid] == 0)
  8613.         {
  8614.             gTeam[playerid] = 3;
  8615.         }
  8616.         else
  8617.         {
  8618.             gTeam[playerid] = PlayerInfo[playerid][pTeam];
  8619.         }
  8620.         gPlayerLogged[playerid] = 1;
  8621.         if(accountplay)
  8622.         {
  8623.             gPlayerSpawned[playerid] = 0;
  8624.         }
  8625.         SpawnPlayer(playerid);
  8626.         GetPlayerName(playerid, playername2, sizeof(playername2));
  8627.         format(tmp2, sizeof(tmp2), "~w~~n~~n~~n~~n~~n~Dobrodosao~n~~r~%s", playername2);
  8628.         DateProp(playerid);
  8629.         GameTextForPlayer(playerid, tmp2, 5000, 3);
  8630.         SendClientMessage(playerid, COLOR_YELLOW, motd);
  8631.         return 1;
  8632.     }
  8633.     else
  8634.     {
  8635.         SendClientMessage(playerid, COLOR_WHITE, "CroHerze: Nemate korisnicki racun,registrirajte se!");
  8636.     }
  8637.     return 1;
  8638. }
  8639.  
  8640. public CopCheck(playerid)
  8641. {
  8642.     if (gdebug >= 1){printf("DEBUG CopCheck(%d) (%s)", playerid);}
  8643.     new playername2[MAX_PLAYER_NAME];
  8644.     new storedcopname[64];
  8645.     GetPlayerName(playerid, playername2, sizeof(playername2));
  8646.     new File: file = fopen("cops.cfg", io_read);
  8647.     if (file)
  8648.     {
  8649.         new valtmp[MAX_PLAYER_NAME];
  8650.         while (fread(file, valtmp) > 0)
  8651.         {
  8652.             //printf("%s",valtmp);
  8653.             strmid(storedcopname, valtmp, 0, strlen(playername2), 255);
  8654.             if ((strcmp(storedcopname, playername2, true, strlen(playername2)) == 0) && (strlen(playername2) == strlen(storedcopname)))
  8655.             {
  8656.                 fclose(file);
  8657.                 return 1;
  8658.             }
  8659.         }
  8660.     }
  8661.     fclose(file);
  8662.     return 0;
  8663. }
  8664. public MedCheck(playerid)
  8665. {
  8666.     if (gdebug >= 1){printf("DEBUG MedCheck(%d) (%s)", playerid);}
  8667.     new playername2[MAX_PLAYER_NAME];
  8668.     new storedcopname[64];
  8669.     GetPlayerName(playerid, playername2, sizeof(playername2));
  8670.     new File: file = fopen("meds.cfg", io_read);
  8671.     if (file)
  8672.     {
  8673.         new valtmp[MAX_PLAYER_NAME];
  8674.         while (fread(file, valtmp) > 0)
  8675.         {
  8676.             //printf("%s",valtmp);
  8677.             strmid(storedcopname, valtmp, 0, strlen(playername2), 255);
  8678.             if ((strcmp(storedcopname, playername2, true, strlen(playername2)) == 0) && (strlen(playername2) == strlen(storedcopname)))
  8679.             {
  8680.                 fclose(file);
  8681.                 return 1;
  8682.             }
  8683.         }
  8684.     }
  8685.     fclose(file);
  8686.     return 0;
  8687. }
  8688.  
  8689. public OnPlayerRegister(playerid, password[])
  8690. {
  8691.     if(IsPlayerConnected(playerid))
  8692.     {
  8693.             new string3[32];
  8694.             new playername3[MAX_PLAYER_NAME];
  8695.             GetPlayerName(playerid, playername3, sizeof(playername3));
  8696.             format(string3, sizeof(string3), "%s.ini", playername3);
  8697.             new File: hFile = fopen(string3, io_write);
  8698.             if (hFile)
  8699.             {
  8700.                 strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
  8701.                 new var[32];
  8702.                 format(var, 32, "pKey=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
  8703.                 format(var, 32, "pCash=%d\n", PlayerInfo[playerid][pCash]);fwrite(hFile, var);
  8704.                 format(var, 32, "pAccount=%d\n", PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
  8705.                 format(var, 64, "MuteTime=%d\n",PlayerInfo[playerid][pMuteTime]);fwrite(hFile, var);
  8706.                 format(var, 64, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
  8707.                 format(var, 32, "pAdmin=%d\n", PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
  8708.                 format(var, 32, "CHBodovi=%d\n",PlayerInfo[playerid][pCHBodovi]);fwrite(hFile, var);
  8709.                 format(var, 32, "GameSageLevel=%d\n",PlayerInfo[playerid][pGameSage]);fwrite(hFile, var);
  8710.                 format(var, 32, "pLevel=%d\n", PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
  8711.                 format(var, 32, "pExp=%d\n", PlayerInfo[playerid][pExp]);fwrite(hFile, var);
  8712.                 format(var, 32, "gPupgrade=%d\n", PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
  8713.                 format(var, 32, "pKills=%d\n", PlayerInfo[playerid][pKills]);fwrite(hFile, var);
  8714.                 format(var, 32, "pCB=%d\n", PlayerInfo[playerid][pCB]);fwrite(hFile, var);
  8715.                 format(var, 32, "pHW=%d\n", PlayerInfo[playerid][pHW]);fwrite(hFile, var);
  8716.                 format(var, 32, "pSR=%d\n", PlayerInfo[playerid][pSR]);fwrite(hFile, var);
  8717.                 format(var, 32, "pWA=%d\n", PlayerInfo[playerid][pWA]);fwrite(hFile, var);
  8718.                 format(var, 32, "pPEN=%d\n", PlayerInfo[playerid][pPEN]);fwrite(hFile, var);
  8719.                 format(var, 32, "pGun1=%d\n", PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
  8720.                 format(var, 32, "pGun2=%d\n", PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
  8721.                 format(var, 32, "pGun3=%d\n", PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
  8722.                 format(var, 32, "pGun4=%d\n", PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
  8723.                 format(var, 32, "pGun5=%d\n", PlayerInfo[playerid][pGun5]);fwrite(hFile, var);
  8724.                 format(var, 32, "pGun6=%d\n", PlayerInfo[playerid][pGun6]);fwrite(hFile, var);
  8725.                 format(var, 32, "pAmmo1=%d\n", PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
  8726.                 format(var, 32, "pAmmo2=%d\n", PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
  8727.                 format(var, 32, "pAmmo3=%d\n", PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
  8728.                 format(var, 32, "pAmmo4=%d\n", PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
  8729.                 format(var, 32, "pAmmo5=%d\n", PlayerInfo[playerid][pAmmo5]);fwrite(hFile, var);
  8730.                 format(var, 32, "pAmmo6=%d\n", PlayerInfo[playerid][pAmmo6]);fwrite(hFile, var);
  8731.                 format(var, 32, "pSHealth=%f\n", PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
  8732.                 format(var, 32, "pHealth=%f\n", PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
  8733.                 format(var, 32, "pPos_x=%f\n", PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
  8734.                 format(var, 32, "pPos_y=%f\n", PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
  8735.                 format(var, 32, "pPos_z=%f\n", PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
  8736.                 if(accountplay)
  8737.                 {
  8738.                     PlayerInfo[playerid][pInt] = 0;
  8739.                 }
  8740.                 format(var, 32, "pInt=%d\n", PlayerInfo[playerid][pInt]);fwrite(hFile, var);
  8741.                 format(var, 32, "pLocal=%d\n", PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
  8742.                 format(var, 32, "pTeam=%d\n", PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
  8743.                 format(var, 32, "pLeader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
  8744.                 format(var, 32, "pMember=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
  8745.                 format(var, 32, "pFMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
  8746.                 format(var, 32, "pRank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
  8747.                 format(var, 32, "pChar=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
  8748.                 format(var, 32, "pModel=%d\n", PlayerInfo[playerid][pModel]);fwrite(hFile, var);
  8749.                 format(var, 32, "pWarns=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
  8750.                 format(var, 32, "pPnumber=%d\n", PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
  8751.                 format(var, 32, "pPhousekey=%d\n", PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
  8752.                 format(var, 32, "pPbiskey=%d\n", PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
  8753.                 format(var, 32, "pTVec=%d\n", PlayerInfo[playerid][pTVec]);fwrite(hFile, var);
  8754.                 format(var, 32, "pReg=%d\n", PlayerInfo[playerid][pReg]);fwrite(hFile, var);
  8755.                 fclose(hFile);
  8756.                 printf(">>> %s je napravio account",playername3);
  8757.                 format(string3, sizeof(string3), "ZeroASL: %s | se registrirao na CroHerze DM |Admin Poruka|",playername3);
  8758.                 if (PlayerInfo[playerid][pAdmin] >= 1339)
  8759.                 SendAdminMessage(COLOR_LIGHTRED,string3);
  8760.                 new loginstring[400];
  8761.                 new loginname[64];
  8762.                 GetPlayerName(playerid,loginname,sizeof(loginname));
  8763.                 format(loginstring,sizeof(loginstring),"{33BBFF}___________________________________________\n\n{FFFFFF}Dobrodosao na CroHerze DeathMatch Server\n\n{33BBFF}%s\n{FFFFFF}Tvoj korisnicki racun je pronadjen!\n\nMolimo upisi svoju lozinku da udjes na server:\n{33BBFF}___________________________________________",loginname);
  8764.                 ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"{FFFFFF}Logiranje",loginstring,"Logiraj","Odustani");
  8765.             }
  8766.     }
  8767.     return 1;
  8768. }
  8769. public OnUpdatePlayer(playerid)
  8770. {
  8771.     if (gdebug >= 1){printf("DEBUG OnUpdatePlayer(%d)", playerid);}
  8772.     if (gPlayerLogged[playerid] != 0)
  8773.     {
  8774.         new string3[32];
  8775.         new playername3[MAX_PLAYER_NAME];
  8776.         GetPlayerName(playerid, playername3, sizeof(playername3));
  8777.         format(string3, sizeof(string3), "%s.ini", playername3);
  8778.         new File: hFile = fopen(string3, io_write);
  8779.         if (gdebug){printf("DEBUG OnUpdatePlayer(%d)8.5", playerid);}
  8780.         if (hFile)
  8781.         {
  8782.             new var[32];
  8783.             format(var, 32, "pKey=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
  8784.             PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
  8785.             format(var, 32, "pCash=%d\n", PlayerInfo[playerid][pCash]);fwrite(hFile, var);
  8786.             format(var, 32, "pAccount=%d\n", PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
  8787.             format(var, 64, "MuteTime=%d\n",PlayerInfo[playerid][pMuteTime]);fwrite(hFile, var);
  8788.             format(var, 64, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
  8789.             format(var, 32, "CHBodovi=%d\n",PlayerInfo[playerid][pCHBodovi]);fwrite(hFile, var);
  8790.             format(var, 32, "pAdmin=%d\n", PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
  8791.             format(var, 32, "pLevel=%d\n", PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
  8792.             format(var, 32, "pExp=%d\n", PlayerInfo[playerid][pExp]);fwrite(hFile, var);
  8793.             format(var, 32, "gPupgrade=%d\n", PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
  8794.             format(var, 32, "pKills=%d\n", PlayerInfo[playerid][pKills]);fwrite(hFile, var);
  8795.             format(var, 32, "pCB=%d\n", PlayerInfo[playerid][pCB]);fwrite(hFile, var);
  8796.             format(var, 32, "pHW=%d\n", PlayerInfo[playerid][pHW]);fwrite(hFile, var);
  8797.             format(var, 32, "pSR=%d\n", PlayerInfo[playerid][pSR]);fwrite(hFile, var);
  8798.             format(var, 32, "pWA=%d\n", PlayerInfo[playerid][pWA]);fwrite(hFile, var);
  8799.             format(var, 32, "pPEN=%d\n", PlayerInfo[playerid][pPEN]);fwrite(hFile, var);
  8800.             format(var, 32, "pGun1=%d\n", PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
  8801.             format(var, 32, "pGun2=%d\n", PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
  8802.             format(var, 32, "pGun3=%d\n", PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
  8803.             format(var, 32, "pGun4=%d\n", PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
  8804.             format(var, 32, "pGun5=%d\n", PlayerInfo[playerid][pGun5]);fwrite(hFile, var);
  8805.             format(var, 32, "pGun6=%d\n", PlayerInfo[playerid][pGun6]);fwrite(hFile, var);
  8806.             format(var, 32, "pAmmo1=%d\n", PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
  8807.             format(var, 32, "pAmmo2=%d\n", PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
  8808.             format(var, 32, "pAmmo3=%d\n", PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
  8809.             format(var, 32, "pAmmo4=%d\n", PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
  8810.             format(var, 32, "pAmmo5=%d\n", PlayerInfo[playerid][pAmmo5]);fwrite(hFile, var);
  8811.             format(var, 32, "pAmmo6=%d\n", PlayerInfo[playerid][pAmmo6]);fwrite(hFile, var);
  8812.             format(var, 32, "pSHealth=%.1f\n", PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
  8813.             GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
  8814.             format(var, 32, "pHealth=%.1f\n", PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
  8815.             GetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
  8816.             if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0) || (gPlayerFighter[playerid] != 0))
  8817.             {
  8818.                 PlayerInfo[playerid][pPos_x] = 1684.9;
  8819.                 PlayerInfo[playerid][pPos_y] = -2244.5;
  8820.                 PlayerInfo[playerid][pPos_z] = 13.5;
  8821.             }
  8822.             if(Spectate[playerid] != 255)
  8823.             {
  8824.                 PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
  8825.                 PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
  8826.                 PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
  8827.                 PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
  8828.                 PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
  8829.             }
  8830.             format(var, 32, "pPos_x=%.lf\n", PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
  8831.             format(var, 32, "pPos_y=%.lf\n", PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
  8832.             format(var, 32, "pPos_z=%.lf\n", PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
  8833.             format(var, 32, "pInt=%d\n", PlayerInfo[playerid][pInt]);fwrite(hFile, var);
  8834.             format(var, 32, "pLocal=%d\n", PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
  8835.             format(var, 32, "pTeam=%d\n", PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
  8836.             format(var, 32, "pLeader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
  8837.             format(var, 32, "pMember=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
  8838.             format(var, 32, "pFMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
  8839.             format(var, 32, "pRank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
  8840.             format(var, 32, "pChar=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
  8841.             format(var, 32, "pModel=%d\n", PlayerInfo[playerid][pModel]);fwrite(hFile, var);
  8842.             format(var, 32, "pWarns=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
  8843.             format(var, 32, "pPnumber=%d\n", PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
  8844.             format(var, 32, "pPhousekey=%d\n", PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
  8845.             format(var, 32, "pPbiskey=%d\n", PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
  8846.             format(var, 32, "pTVec=%d\n", PlayerInfo[playerid][pTVec]);fwrite(hFile, var);
  8847.             format(var, 32, "pReg=%d\n", PlayerInfo[playerid][pReg]);fwrite(hFile, var);
  8848.             fclose(hFile);
  8849.         }
  8850.     }
  8851.     else
  8852.     {
  8853.         SendClientMessage(playerid, 0xDB023EFF, "ZeroAS: Vas acc je trenutno iskljucen sa servera! Izbaceni ste!");
  8854.     }
  8855.     if (gdebug){printf("DEBUG OnUpdatePlayer(%d)End", playerid);}
  8856.     return 1;
  8857. }
  8858.  
  8859. public OnPlayerRename(name[],string[],playerid)
  8860. {
  8861.     if (gdebug >= 1){printf("DEBUG OnPlayerRename(%d)", playerid);}
  8862.     if (gPlayerLogged[playerid] != 0)
  8863.     {
  8864.         new File: hFile = fopen(string, io_write);
  8865.         if (gdebug){printf("DEBUG OnUpdatePlayer(%d)8.5", playerid);}
  8866.         if (hFile)
  8867.         {
  8868.             new var[32];
  8869.             format(var, 32, "pKey=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
  8870.             PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
  8871.             format(var, 32, "pCash=%d\n", PlayerInfo[playerid][pCash]);fwrite(hFile, var);
  8872.             format(var, 32, "pAccount=%d\n", PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
  8873.             format(var, 32, "pAdmin=%d\n", PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
  8874.             format(var, 32, "pLevel=%d\n", PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
  8875.             format(var, 32, "pExp=%d\n", PlayerInfo[playerid][pExp]);fwrite(hFile, var);
  8876.             format(var, 32, "gPupgrade=%d\n", PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
  8877.             format(var, 32, "pKills=%d\n", PlayerInfo[playerid][pKills]);fwrite(hFile, var);
  8878.             format(var, 32, "pCB=%d\n", PlayerInfo[playerid][pCB]);fwrite(hFile, var);
  8879.             format(var, 32, "pHW=%d\n", PlayerInfo[playerid][pHW]);fwrite(hFile, var);
  8880.             format(var, 32, "pSR=%d\n", PlayerInfo[playerid][pSR]);fwrite(hFile, var);
  8881.             format(var, 32, "pWA=%d\n", PlayerInfo[playerid][pWA]);fwrite(hFile, var);
  8882.             format(var, 32, "pPEN=%d\n", PlayerInfo[playerid][pPEN]);fwrite(hFile, var);
  8883.             format(var, 32, "pGun1=%d\n", PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
  8884.             format(var, 32, "pGun2=%d\n", PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
  8885.             format(var, 32, "pGun3=%d\n", PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
  8886.             format(var, 32, "pGun4=%d\n", PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
  8887.             format(var, 32, "pGun5=%d\n", PlayerInfo[playerid][pGun5]);fwrite(hFile, var);
  8888.             format(var, 32, "pGun6=%d\n", PlayerInfo[playerid][pGun6]);fwrite(hFile, var);
  8889.             format(var, 32, "pAmmo1=%d\n", PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
  8890.             format(var, 32, "pAmmo2=%d\n", PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
  8891.             format(var, 32, "pAmmo3=%d\n", PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
  8892.             format(var, 32, "pAmmo4=%d\n", PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
  8893.             format(var, 32, "pAmmo5=%d\n", PlayerInfo[playerid][pAmmo5]);fwrite(hFile, var);
  8894.             format(var, 32, "pAmmo6=%d\n", PlayerInfo[playerid][pAmmo6]);fwrite(hFile, var);
  8895.             format(var, 32, "pSHealth=%.1f\n", PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
  8896.             GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
  8897.             format(var, 32, "pHealth=%.1f\n", PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
  8898.             GetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
  8899.             if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0) || (gPlayerFighter[playerid] != 0))
  8900.             {
  8901.                 PlayerInfo[playerid][pPos_x] = 1684.9;
  8902.                 PlayerInfo[playerid][pPos_y] = -2244.5;
  8903.                 PlayerInfo[playerid][pPos_z] = 13.5;
  8904.             }
  8905.             if(Spectate[playerid] != 255)
  8906.             {
  8907.                 PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
  8908.                 PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
  8909.                 PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
  8910.                 PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
  8911.                 PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
  8912.             }
  8913.             format(var, 32, "pPos_x=%.lf\n", PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
  8914.             format(var, 32, "pPos_y=%.lf\n", PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
  8915.             format(var, 32, "pPos_z=%.lf\n", PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
  8916.             format(var, 32, "pInt=%d\n", PlayerInfo[playerid][pInt]);fwrite(hFile, var);
  8917.             format(var, 32, "pLocal=%d\n", PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
  8918.             format(var, 32, "pTeam=%d\n", PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
  8919.             format(var, 32, "pLeader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
  8920.             format(var, 32, "pMember=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
  8921.             format(var, 32, "pFMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
  8922.             format(var, 32, "pRank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
  8923.             format(var, 32, "pChar=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
  8924.             format(var, 32, "pModel=%d\n", PlayerInfo[playerid][pModel]);fwrite(hFile, var);
  8925.             format(var, 32, "pWarns=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
  8926.             format(var, 32, "pPnumber=%d\n", PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
  8927.             format(var, 32, "pPhousekey=%d\n", PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
  8928.             format(var, 32, "pPbiskey=%d\n", PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
  8929.             format(var, 32, "pTVec=%d\n", PlayerInfo[playerid][pTVec]);fwrite(hFile, var);
  8930.             format(var, 32, "pReg=%d\n", PlayerInfo[playerid][pReg]);fwrite(hFile, var);
  8931.             fclose(hFile);
  8932.         }
  8933.         new bkey = PlayerInfo[playerid][pPbiskey];
  8934.         new hkey = PlayerInfo[playerid][pPhousekey];
  8935.         new playername[32];
  8936.         if(bkey != 255)
  8937.         {
  8938.             if(bkey >= 100)
  8939.             {
  8940.                 strmid(SBizzInfo[bkey-100][sbOwner], name, 0, strlen(name), 255);
  8941.             }
  8942.             else
  8943.             {
  8944.                 strmid(BizzInfo[bkey][bOwner], name, 0, strlen(name), 255);
  8945.             }
  8946.         }
  8947.         GetPlayerName(playerid, playername, sizeof(playername));
  8948.         if (hkey != 255 && strcmp(playername, HouseInfo[hkey][hOwner], true) == 0)
  8949.         {
  8950.             strmid(HouseInfo[hkey][hOwner], name, 0, strlen(name), 255);
  8951.         }
  8952.         OnPropUpdate();
  8953.     }
  8954.     else
  8955.     {
  8956.         SendClientMessage(playerid, COLOR_YELLOW, "CroHerze: Nemas account, acc mozes napravit tako da upises /regnick <password>");
  8957.     }
  8958.     if (gdebug){printf("DEBUG OnUpdatePlayer(%d)End", playerid);}
  8959.     return 1;
  8960. }
  8961.  
  8962. public OnPropUpdate()
  8963. {
  8964.     if (gdebug >= 1){printf("| ZeroAS | DEBUG OnPropUpdate()");}
  8965.     new idx;
  8966.     new File: file2;
  8967.     while (idx < sizeof(HouseInfo))
  8968.     {
  8969.         new coordsstring[256];
  8970.         format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",       HouseInfo[idx][hEntrancex],
  8971.         HouseInfo[idx][hEntrancey],
  8972.         HouseInfo[idx][hEntrancez],
  8973.         HouseInfo[idx][hExitx],
  8974.         HouseInfo[idx][hExity],
  8975.         HouseInfo[idx][hExitz],
  8976.         HouseInfo[idx][hHealthx],
  8977.         HouseInfo[idx][hHealthy],
  8978.         HouseInfo[idx][hHealthz],
  8979.         HouseInfo[idx][hArmourx],
  8980.         HouseInfo[idx][hArmoury],
  8981.         HouseInfo[idx][hArmourz],
  8982.         HouseInfo[idx][hOwner],
  8983.         HouseInfo[idx][hDiscription],
  8984.         HouseInfo[idx][hValue],
  8985.         HouseInfo[idx][hHel],
  8986.         HouseInfo[idx][hArm],
  8987.         HouseInfo[idx][hInt],
  8988.         HouseInfo[idx][hLock],
  8989.         HouseInfo[idx][hOwned],
  8990.         HouseInfo[idx][hRooms],
  8991.         HouseInfo[idx][hRent],
  8992.         HouseInfo[idx][hRentabil],
  8993.         HouseInfo[idx][hTakings],
  8994.         HouseInfo[idx][hVec],
  8995.         HouseInfo[idx][hVcol1],
  8996.         HouseInfo[idx][hVcol2],
  8997.         HouseInfo[idx][hDate],
  8998.         HouseInfo[idx][hLevel],
  8999.         HouseInfo[idx][hWorld]);
  9000.         if(idx == 0)
  9001.         {
  9002.             file2 = fopen("property.cfg", io_write);
  9003.         }
  9004.         else
  9005.         {
  9006.             file2 = fopen("property.cfg", io_append);
  9007.         }
  9008.         fwrite(file2, coordsstring);
  9009.         idx++;
  9010.         fclose(file2);
  9011.     }
  9012.     idx = 0;
  9013.     while (idx < sizeof(BizzInfo))
  9014.     {
  9015.         new coordsstring[256];
  9016.         format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
  9017.         BizzInfo[idx][bEntrancex],
  9018.         BizzInfo[idx][bEntrancey],
  9019.         BizzInfo[idx][bEntrancez],
  9020.         BizzInfo[idx][bExitx],
  9021.         BizzInfo[idx][bExity],
  9022.         BizzInfo[idx][bExitz],
  9023.         BizzInfo[idx][bHealthx],
  9024.         BizzInfo[idx][bHealthy],
  9025.         BizzInfo[idx][bHealthz],
  9026.         BizzInfo[idx][bArmourx],
  9027.         BizzInfo[idx][bArmoury],
  9028.         BizzInfo[idx][bArmourz],
  9029.         BizzInfo[idx][bOwner],
  9030.         BizzInfo[idx][bDiscription],
  9031.         BizzInfo[idx][bValue],
  9032.         BizzInfo[idx][bHel],
  9033.         BizzInfo[idx][bArm],
  9034.         BizzInfo[idx][bInt],
  9035.         BizzInfo[idx][bLock],
  9036.         BizzInfo[idx][bOwned],
  9037.         BizzInfo[idx][bEntcost],
  9038.         BizzInfo[idx][bTakings],
  9039.         BizzInfo[idx][bDate],
  9040.         BizzInfo[idx][bLevel],
  9041.         BizzInfo[idx][bProd],
  9042.         BizzInfo[idx][bProdCap],
  9043.         BizzInfo[idx][bComp],
  9044.         BizzInfo[idx][bCompCap],
  9045.         BizzInfo[idx][bProdCost],
  9046.         BizzInfo[idx][bPayComp],
  9047.         BizzInfo[idx][bPriceMod]);
  9048.         if(idx == 0)
  9049.         {
  9050.             file2 = fopen("bizz.cfg", io_write);
  9051.         }
  9052.         else
  9053.         {
  9054.             file2 = fopen("bizz.cfg", io_append);
  9055.         }
  9056.         fwrite(file2, coordsstring);
  9057.         idx++;
  9058.         fclose(file2);
  9059.     }
  9060.     idx = 0;
  9061.     while (idx < sizeof(SBizzInfo))
  9062.     {
  9063.         new coordsstring[256];
  9064.         format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
  9065.         SBizzInfo[idx][sbEntrancex],
  9066.         SBizzInfo[idx][sbEntrancey],
  9067.         SBizzInfo[idx][sbEntrancez],
  9068.         SBizzInfo[idx][sbOwner],
  9069.         SBizzInfo[idx][sbDiscription],
  9070.         SBizzInfo[idx][sbValue],
  9071.         SBizzInfo[idx][sbHel],
  9072.         SBizzInfo[idx][sbArm],
  9073.         SBizzInfo[idx][sbInt],
  9074.         SBizzInfo[idx][sbLock],
  9075.         SBizzInfo[idx][sbOwned],
  9076.         SBizzInfo[idx][sbEntcost],
  9077.         SBizzInfo[idx][sbTakings],
  9078.         SBizzInfo[idx][sbDate],
  9079.         SBizzInfo[idx][sbLevel],
  9080.         SBizzInfo[idx][sbProd],
  9081.         SBizzInfo[idx][sbProdCap],
  9082.         SBizzInfo[idx][sbComp],
  9083.         SBizzInfo[idx][sbCompCap],
  9084.         SBizzInfo[idx][sbProdCost],
  9085.         SBizzInfo[idx][sbPayComp]);
  9086.         if(idx == 0)
  9087.         {
  9088.             file2 = fopen("sbizz.cfg", io_write);
  9089.         }
  9090.         else
  9091.         {
  9092.             file2 = fopen("sbizz.cfg", io_append);
  9093.         }
  9094.         fwrite(file2, coordsstring);
  9095.         idx++;
  9096.         fclose(file2);
  9097.     }
  9098.     return 1;
  9099. }
  9100.  
  9101. public BroadCast(color,const string[])
  9102. {
  9103.     printf("%s", string);
  9104.     SendClientMessageToAll(color, string);
  9105.     return 1;
  9106. }
  9107.  
  9108. public ABroadCast(color,const string[],level)
  9109. {
  9110.     for(new i = 0; i <= MAX_PLAYERS; i++)
  9111.     {
  9112.         if(IsPlayerConnected(i) == 1)
  9113.         {
  9114.             if ((IsPlayerAdmin(i)) || PlayerInfo[i][pAdmin] >= level)
  9115.             {
  9116.                 SendClientMessage(i, color, string);
  9117.                 printf("%s", string);
  9118.             }
  9119.         }
  9120.     }
  9121.     return 1;
  9122. }
  9123.  
  9124. public OOCOff(color,const string[])
  9125. {
  9126.     for(new i = 0; i <= MAX_PLAYERS; i++)
  9127.     {
  9128.         if(IsPlayerConnected(i) == 1 && !gOoc[i])
  9129.         {
  9130.             SendClientMessage(i, color, string);
  9131.         }
  9132.     }
  9133. }
  9134.  
  9135. public PlaySoundAll(playerid, soundid, Float:psx ,Float:psy ,Float:psz)
  9136. {
  9137.     if (gdebug >= 1){printf("DEBUG PlaySoundAll(%d)", playerid);}
  9138.     for(new i = 0; i <= MAX_PLAYERS; i++)
  9139.     {
  9140.         if(IsPlayerConnected(i) == 1)
  9141.         {
  9142.             PlayerPlaySound(i, soundid, psx, psy, psz);
  9143.         }
  9144.     }
  9145. }
  9146.  
  9147. public SendTeamMessage(team, color, string[])
  9148. {
  9149.     if (gdebug >= 1){printf("DEBUG SendTeamMessage(%d)", team);}
  9150.     for(new i = 0; i <= MAX_PLAYERS; i++)
  9151.     {
  9152.         if(IsPlayerConnected(i) == 1 && gTeam[i] == team)
  9153.         {
  9154.             SendClientMessage(i, color, string);
  9155.         }
  9156.     }
  9157. }
  9158.  
  9159. public SendTeamBeepMessage(team, color, string[])
  9160. {
  9161.     if (gdebug >= 1){printf("DEBUG SendTeamMessage(%d)", team);}
  9162.     for(new i = 0; i <= MAX_PLAYERS; i++)
  9163.     {
  9164.         if(IsPlayerConnected(i) == 1 && gTeam[i] == team)
  9165.         {
  9166.             SendClientMessage(i, color, string);
  9167.             RingTone[i] = 20;
  9168.         }
  9169.     }
  9170. }
  9171.  
  9172. public SendEnemyMessage(color, string[])
  9173. {
  9174.     for(new i = 0; i <= MAX_PLAYERS; i++)
  9175.     {
  9176.         if(IsPlayerConnected(i) == 1 && gTeam[i] >= 3)
  9177.         {
  9178.             SendClientMessage(i, color, string);
  9179.         }
  9180.     }
  9181. }
  9182.  
  9183.  
  9184. public SendAdminMessage(color, string[])
  9185. {
  9186.     if (gdebug >= 1){printf("DEBUG SendAdminMessage()");}
  9187.     for(new i = 0; i <= MAX_PLAYERS; i++)
  9188.     {
  9189.         if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pAdmin] > 1)
  9190.         {
  9191.             SendClientMessage(i, color, string);
  9192.         }
  9193.     }
  9194. }
  9195. public SendAdminSageMessage(color,const string[],level)
  9196. {
  9197.     for(new i = 0; i < MAX_PLAYERS; i++)
  9198.     {
  9199.         if(IsPlayerConnected(i))
  9200.         {
  9201.             if (PlayerInfo[i][pAdmin] >= level || PlayerInfo[i][pGameSage] >= level)
  9202.             {
  9203.                 SendClientMessage(i, color, string);
  9204.                 printf("%s", string);
  9205.             }
  9206.         }
  9207.     }
  9208.     return 1;
  9209. }
  9210. public SendSageMessage(color,const string[],level)
  9211. {
  9212.     for(new i = 0; i < MAX_PLAYERS; i++)
  9213.     {
  9214.         if(IsPlayerConnected(i))
  9215.         {
  9216.             if (PlayerInfo[i][pGameSage] >= level)
  9217.             {
  9218.                 SendClientMessage(i, color, string);
  9219.                 printf("%s", string);
  9220.             }
  9221.         }
  9222.     }
  9223.     return 1;
  9224. }
  9225. public PlayerPlayMusic(playerid)
  9226. {
  9227.     if (gdebug >= 1){printf("DEBUG PlayerPlayMusic(%d)",playerid);}
  9228.     SetTimer("StopMusic", 5000, 0);
  9229.     PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
  9230. }
  9231.  
  9232. public StopMusic()
  9233. {
  9234.     if (gdebug >= 1){printf("DEBUG StopMusic()");}
  9235.     for(new i = 0; i <= MAX_PLAYERS; i++)
  9236.     {
  9237.         if(IsPlayerConnected(i) == 1)
  9238.         {
  9239.             PlayerPlaySound(i, 1069, 0.0, 0.0, 0.0);
  9240.         }
  9241.     }
  9242. }
  9243.  
  9244. public PlayerFixRadio(playerid)
  9245. {
  9246.     if (gdebug >= 1){printf("DEBUG PlayerPlayMusic(%d)",playerid);}
  9247.     SetTimer("PlayerFixRadio2", 50, 0);
  9248.     PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
  9249.     Fixr[playerid] = 1;
  9250. }
  9251.  
  9252. public PlayerFixRadio2()
  9253. {
  9254.     if (gdebug >= 1){printf("DEBUG StopMusic()");}
  9255.     for(new i = 0; i <= MAX_PLAYERS; i++)
  9256.     {
  9257.         if(IsPlayerConnected(i) == 1)
  9258.         {
  9259.             if(Fixr[i])
  9260.             {
  9261.                 PlayerPlaySound(i, 1069, 0.0, 0.0, 0.0);
  9262.                 Fixr[i] = 0;
  9263.             }
  9264.         }
  9265.     }
  9266. }
  9267.  
  9268. public PlayJailSound(sound , stopsound, duration, Float:jailx, Float:jaily, Float:jailz)
  9269. {
  9270.     if (gdebug >= 1){printf("DEBUG PlayJailSound()");}
  9271.     for(new i = 0; i <= MAX_PLAYERS; i++)
  9272.     {
  9273.         if(IsPlayerConnected(i) == 1)
  9274.         {
  9275.             PlayerPlaySound(i, sound, jailx, jaily, jailz);
  9276.             //printf("startjail %d",i);
  9277.             stopsoundt = stopsound;
  9278.             jailxt = jailx;
  9279.             jailyt = jaily;
  9280.             jailzt = jailz;
  9281.         }
  9282.     }
  9283.     SetTimer("StopJail", duration, 0);
  9284. }
  9285.  
  9286. public StopJail()
  9287. {
  9288.     if (gdebug >= 1){printf("DEBUG StopJail()");}
  9289.     for(new i = 0; i <= MAX_PLAYERS; i++)
  9290.     {
  9291.         if(IsPlayerConnected(i) == 1)
  9292.         {
  9293.             PlayerPlaySound(i, stopsoundt, jailxt, jailyt, jailzt);
  9294.             //printf("stopjail %d",i);
  9295.         }
  9296.     }
  9297. }
  9298.  
  9299. /*          KOMANDE               */
  9300.  
  9301. public OnPlayerCommandText(playerid, cmdtext[])
  9302. {
  9303.     if (gdebug >= 1){printf("DEBUG OnPlayerCommandText(%d)",playerid);}
  9304.     CmdLog(cmdtext);
  9305.     new string[256];
  9306.     new playermoney;
  9307.     new sendername[MAX_PLAYER_NAME];
  9308.     new giveplayer[MAX_PLAYER_NAME];
  9309.     new playername[MAX_PLAYER_NAME];
  9310.     new cmd[256];
  9311.     new tmp[256];
  9312.     new giveplayerid, moneys, idx;
  9313.     cmd = strtok(cmdtext, idx);
  9314.  
  9315.     if (strcmp(cmd, "/getip", true)==0)
  9316.         {
  9317.             tmp=strtok(cmdtext,idx);
  9318.             if(!strlen(tmp))
  9319.             {
  9320.                 SendClientMessage(playerid, COLOR_YELLOW, "/getip [id]");
  9321.                 return 1;
  9322.             }
  9323.             new id = strval(tmp);
  9324.             new ip[16];
  9325.             new pname[24];
  9326.             GetPlayerName(id,pname,sizeof(pname));
  9327.             GetPlayerIp(id,ip,15);
  9328.             new ipstr[255];
  9329.             format(ipstr,sizeof(ipstr),"%s | IP: %s",pname,ip);
  9330.             if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 2)
  9331.             SendClientMessage(playerid,COLOR_YELLOW,ipstr);
  9332.             return 1;
  9333.     }
  9334. // -------------------report
  9335.     if(strcmp(cmd,"/report",true,6)==0)
  9336.     {
  9337.     if(PlayerInfo[playerid][pMuted] == 1)
  9338.     {
  9339.     new string[128];
  9340.     format(string, sizeof(string), "ZeroAS | Vi ste utisani! | Sekundi koliko ste jos utisani: %d", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60));
  9341.     SendClientMessage(playerid, COLOR_YELLOW, string);
  9342.     return 0;
  9343.     }
  9344.         GetPlayerName(playerid, sendername, sizeof(sendername));
  9345.         new length = strlen(cmdtext);
  9346.         while ((idx < length) && (cmdtext[idx] <= ' '))
  9347.         {
  9348.             idx++;
  9349.         }
  9350.         new offset = idx;
  9351.         new result[64];
  9352.         while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9353.         {
  9354.             result[idx - offset] = cmdtext[idx];
  9355.             idx++;
  9356.         }
  9357.         result[idx - offset] = EOS;
  9358.         if(!strlen(result))
  9359.         {
  9360.             SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/report [text]");
  9361.             return 1;
  9362.         }
  9363.         new report[256];
  9364.         new name[30];
  9365.         GetPlayerName(playerid,name,30);
  9366.         strmid(report,cmdtext,7,strlen(cmdtext));
  9367.         format(string,256," |R| %s[%d/BAL]: %s",name,playerid,report);
  9368.         SendAdminMessage(COLOR_ORANGE, string);
  9369.         format(string, sizeof(string), "*Vas report glasi: %s", report);
  9370.         SendClientMessage(playerid,COLOR_WHITE, string);
  9371.         SendClientMessage(playerid,COLOR_YELLOW,"*CroHerze: Hvala na upitu,admini ce odgovoriti u najkracem roku!");
  9372.         printf("%s",string);
  9373.         new File:reports;
  9374.         reports = fopen("report.txt",io_append);
  9375.         format(string,256,"%s\r\n",string);
  9376.         fwrite(reports,string);
  9377.         fclose(reports);
  9378.         return 1;
  9379.     }
  9380. //-----------------fixcar - za admine  -------------
  9381.     if (strcmp("/fixcar", cmdtext, true, 4) == 0)
  9382.     {
  9383.     if(IsPlayerInAnyVehicle(playerid) == 1)
  9384.     if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 1338)
  9385.     {
  9386.         GetPlayerName(playerid, sendername, sizeof(sendername));
  9387.         SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
  9388.         SendClientMessage(playerid,COLOR_LIGHTBLUE," |A| {FFFFFF}Uspjesno ste popravili vase vozilo!");
  9389.         printf("(auto popravka) igrac %s je popravio auto",sendername);
  9390.     }
  9391.     else
  9392.     {
  9393.     SendClientMessage(playerid,COLOR_GRAD2," Morate biti u vozilu da bi ga popravili ili niste Head Admin!");
  9394.     }
  9395.     return 1;
  9396.     }
  9397. //-----------------fixcar - za admine  -------------
  9398.     if (strcmp("/NEKORISTI2", cmdtext, true) == 0)
  9399.     {
  9400.     if (PlayerToPoint(3, playerid,-2494.7139,-603.2803,132.5625))
  9401.     {
  9402.                     new vehicleid = GetPlayerVehicleID(playerid);
  9403.                     if(IsPlayerInAnyVehicle(playerid) == 1)
  9404.                     {
  9405.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  9406.                     AddVehicleComponent(vehicleid,1010);//nitro x10
  9407.                     SendClientMessage(playerid,COLOR_LIGHTBLUE,"Nitro ugradjen!");
  9408.                     printf("(Nitro ugradjivanje) igrac %s je ugradio nitro kod drift staze",sendername);
  9409.                     format(string, sizeof(string), "(Nitro ugradjivanje) igrac %s je ugradio nitro kod drift staze",sendername);
  9410.                     SendAdminMessage(COLOR_PINK, string);
  9411.                     }
  9412.                     else
  9413.                     {
  9414.                     SendClientMessage(playerid,COLOR_LIGHTRED,"(Odbijeno){FFFFFF}Morate biti u vozilu!");
  9415.                     }
  9416.     }
  9417.     else
  9418.     {
  9419.          SendClientMessage(playerid,COLOR_YELLOW,"Kod ikone za ugradnju moras bit(nalazi se na vrhu drift staze)");
  9420.     }
  9421.     return 1;
  9422.     }
  9423. //--------------------health i armor---
  9424.  
  9425.     if (!strcmp(cmdtext, "/ha", true) || !strcmp(cmdtext, "/healtharmor", true) || !strcmp(cmdtext, "/stit", true))
  9426.     if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 2)
  9427.     {
  9428.     SetPlayerHealth(playerid, 150);
  9429.     SetPlayerArmour(playerid, 100);
  9430.     SendClientMessage(playerid, COLOR_GREEN, "--- healt i armor dodani ---");
  9431.     return 1;
  9432.     }
  9433.     if((strcmp(cmdtext,"/nos",true)==0)||(strcmp(cmdtext,"/nitro",true)==0))
  9434.     {
  9435.         new vehicleid = GetPlayerVehicleID(playerid);
  9436.         if(GetPlayerMoney(playerid) < 50000)
  9437.         {
  9438.            if(IsPlayerInAnyVehicle(playerid) == 1)
  9439.            {
  9440.            GivePlayerMoney(playerid,-50000);
  9441.            SendClientMessage(playerid,COLOR_LIGHTRED,"Kupili ste Nitro za vase vozilo!");
  9442.            AddVehicleComponent(vehicleid,1010);
  9443.            }
  9444.            else
  9445.            {
  9446.            SendClientMessage(playerid,COLOR_LIGHTRED,"(Odbijeno){FFFFFF}Morate biti u vozilu!");
  9447.            }
  9448.         }
  9449.         else
  9450.         {
  9451.             SendClientMessage(playerid,COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Nemate Dovoljno novaca!");
  9452.         }
  9453.         return 1;
  9454.     }
  9455. //----------------------
  9456.     if((strcmp(cmdtext,"/iddad",true)==0)||(strcmp(cmdtext,"/god",true)==0))
  9457.     {
  9458.         if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] == 1338)
  9459.         {
  9460.             if(God[playerid] == 0)
  9461.             {
  9462.                 God[playerid] = 1;
  9463.                 SendClientMessage(playerid,COLOR_GREEN,"GODMODE ON");
  9464.             }
  9465.             else
  9466.             {
  9467.                 God[playerid] = 0;
  9468.                 SendClientMessage(playerid,COLOR_RED,"GODMODE OFF");
  9469.                 SetPlayerHealth(playerid, 100);
  9470.             }
  9471.         }
  9472.         else
  9473.         {
  9474.             SendClientMessage(playerid,COLOR_RED,"{FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
  9475.         }
  9476.         return 1;
  9477.     }
  9478. //-------------------------------[Pay]--------------------------------------------------------------------------
  9479.     if(strcmp(cmd, "/pay", true) == 0)
  9480.     {
  9481.         tmp = strtok(cmdtext, idx);
  9482.         if(!strlen(tmp))
  9483.         {
  9484.             SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/pay [Korisnicki ID ili Ime Korisnika] [kolicina]");
  9485.             return 1;
  9486.         }
  9487.         if(IsStringAName(tmp))
  9488.         {
  9489.             giveplayerid = GetPlayerID(tmp);
  9490.         }
  9491.         else
  9492.         {
  9493.             giveplayerid = strval(tmp);
  9494.         }
  9495.         if(PlayerInfo[giveplayerid][pLocal] == 106)
  9496.         {
  9497.             SendClientMessage(playerid, COLOR_GRAD1, "Nije dopusteno na ovoj lokaciji");
  9498.             return 1;
  9499.         }
  9500.         tmp = strtok(cmdtext, idx);
  9501.         if(!strlen(tmp))
  9502.         {
  9503.             SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/pay [Korisnicki ID ili Ime Korisnika] [kolicina]");
  9504.             return 1;
  9505.         }
  9506.         moneys = strval(tmp);
  9507.         if(moneys > 1000 && PlayerInfo[playerid][pLevel] < 3)
  9508.         {
  9509.             SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF}Morate biti lv3 da platite preko 1000");
  9510.             return 1;
  9511.         }
  9512.         //if (gdebug){printf("DEBUG givecash_command: %d %d",giveplayerid,moneys);}
  9513.         if (IsPlayerConnected(giveplayerid))
  9514.         {
  9515.             if (ProxDetectorS(5.0, playerid, giveplayerid))
  9516.             {
  9517.                 GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  9518.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  9519.                 playermoney = GetPlayerMoney(playerid);
  9520.                 if (moneys > 0 && playermoney >= moneys)
  9521.                 {
  9522.                     GivePlayerMoney(playerid, (0 - moneys));
  9523.                     GivePlayerMoney(giveplayerid, moneys);
  9524.                     format(string, sizeof(string), "   Poslao si %s(Igrac: %d), $%d.", giveplayer,giveplayerid, moneys);
  9525.                     PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9526.                     SendClientMessage(playerid, COLOR_GRAD1, string);
  9527.                     format(string, sizeof(string), "   Primio si $%d od %s(Igrac: %d).", moneys, sendername, playerid);
  9528.                     SendClientMessage(giveplayerid, COLOR_GRAD1, string);
  9529.                     printf(">>>(transakcija) %s je platio $%d igracu %s", sendername, moneys, giveplayer);
  9530.                     format(string, sizeof(string), "*%s vadi novcanik i daje novce igracu %s", sendername, giveplayer);
  9531.                     SendClientMessage(giveplayerid, COLOR_PINK, string);
  9532.                     PayLog(string);
  9533.                     if(moneys >= 100000)
  9534.                     {
  9535.                         ABroadCast(COLOR_YELLOW,string,1);
  9536.                     }
  9537.                     PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
  9538.                     printf(">>>(transakcija) %s je uzeo nesto casha i dao igracu %s.", sendername ,giveplayer);
  9539.                     format(string, sizeof(string), "* %s je uzeo nesto casha i dao igracu %s.", sendername ,giveplayer);
  9540.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  9541.                 }
  9542.                 else
  9543.                 {
  9544.                     SendClientMessage(playerid, COLOR_GRAD1, "   Pogresna transakcija.");
  9545.                 }
  9546.             }
  9547.             else
  9548.             {
  9549.                 SendClientMessage(playerid, COLOR_GRAD1, "   Predaleko si.");
  9550.             }
  9551.         }
  9552.         else
  9553.         {
  9554.                 format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
  9555.                 SendClientMessage(playerid, COLOR_GRAD1, string);
  9556.         }
  9557.         return 1;
  9558.     }
  9559.     if(strcmp(cmd, "/charity", true) == 0)
  9560.     {
  9561.         tmp = strtok(cmdtext, idx);
  9562.         if(!strlen(tmp))
  9563.         {
  9564.             SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/charity [suma]");
  9565.             return 1;
  9566.         }
  9567.         if(PlayerInfo[giveplayerid][pLocal] == 106)
  9568.         {
  9569.             SendClientMessage(playerid, COLOR_GRAD1, "Nije dopusteno na ovoj lokaciji");
  9570.             return 1;
  9571.         }
  9572.         moneys = strval(tmp);
  9573.         if(moneys < 0)
  9574.         {
  9575.             SendClientMessage(playerid, COLOR_GRAD1, "Nije dovoljno.");
  9576.             return 1;
  9577.         }
  9578.         GivePlayerMoney(playerid, (-moneys));
  9579.         GetPlayerName(playerid, sendername, sizeof(sendername));
  9580.         format(string, sizeof(string), "%s Hvala na vasoj donaciji koja iznosi $%d.",sendername, moneys);
  9581.         printf("%s", string);
  9582.         PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9583.         SendClientMessage(playerid, COLOR_GRAD1, string);
  9584.         PayLog(string);
  9585.         return 1;
  9586.     }
  9587. //-------------------------------[Register]--------------------------------------------------------------------------
  9588.     if (strcmp(cmd, "/badafjf", true)==0)
  9589.     {
  9590.         if(IsPlayerConnected(playerid))
  9591.         {
  9592.             if(gPlayerLogged[playerid] == 1)
  9593.             {
  9594.                 SendClientMessage(playerid, COLOR_WHITE, "{66CCEE}CroHerze: {FFFFFF}Vec si logiran!");
  9595.                 return 1;
  9596.             }
  9597.             GetPlayerName(playerid, sendername, sizeof(sendername));
  9598.             format(string, sizeof(string), "%s.ini", sendername);
  9599.             new File: hFile = fopen(string, io_read);
  9600.             if (hFile)
  9601.             {
  9602.                 SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {C3C3C3}Taj nick vec postoji, molimo izaberite drugi!");
  9603.                 fclose(hFile);
  9604.                 return 1;
  9605.             }
  9606.             new tmppass[64];
  9607.             tmp = strtok(cmdtext, idx);
  9608.             if(!strlen(tmp))
  9609.             {
  9610.                 SendClientMessage(playerid, COLOR_GRAD1, "Koristite: /regnafsfick [sifra]");
  9611.                 return 1;
  9612.             }
  9613.             strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
  9614.             Encript(tmppass);
  9615.             OnPlayerRegister(playerid,tmppass);
  9616.         }
  9617.         return 1;
  9618.     }
  9619. //-------------------------------[Register]--------------------------------------------------------------------------
  9620.     if (strcmp(cmd, "/changepass", true)==0)
  9621.     {
  9622.         tmp = strtok(cmdtext, idx);
  9623.         if (gPlayerLogged[playerid] != 1)
  9624.         {
  9625.             SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Nisi Logiran");
  9626.             return 1;
  9627.         }
  9628.         if(!strlen(tmp))
  9629.         {
  9630.             SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/changepass [nova sifra]");
  9631.             return 1;
  9632.         }
  9633.         strmid(PlayerInfo[playerid][pKey], tmp, 0, strlen(cmdtext), 255);
  9634.         format(string, sizeof(string), "Vasa nova lozinka je {66CCEE}%s{FFFFFF} , nemojte ju zaboraviti.", PlayerInfo[playerid][pKey]);
  9635.         SendClientMessage(playerid, COLOR_WHITE, string);
  9636.         Encript(PlayerInfo[playerid][pKey]);
  9637.         OnUpdatePlayer(playerid);
  9638.         GetPlayerName(playerid, playername, sizeof(playername));
  9639.         printf("%s je promijenio lozinku.", playername);
  9640.         return 1;
  9641.     }
  9642. //-------------------------------[Level]--------------------------------------------------------------------------
  9643.     if(strcmp(cmd, "/stats", true) == 0 || strcmp(cmd, "/ucp", true) == 0)
  9644.     {
  9645.         if (gPlayerLogged[playerid] != 0)
  9646.         {
  9647.             PrintPlayerWeapons(playerid,playerid);
  9648.         }
  9649.         else
  9650.         {
  9651.             SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Nisi logiran");
  9652.         }
  9653.         return 1;
  9654.     }
  9655.     if(strcmp(cmd, "/up", true) == 0)
  9656.     {
  9657.         if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 1)
  9658.         {
  9659.             new Float:slx, Float:sly, Float:slz;
  9660.             GetPlayerPos(playerid, slx, sly, slz);
  9661.             SetPlayerPos(playerid, slx, sly, slz+2);
  9662.             return 1;
  9663.         }
  9664.         else
  9665.         {
  9666.             SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
  9667.         }
  9668.         return 1;
  9669.     }
  9670.     if (strcmp(cmd, "/fly", true) == 0)
  9671.     {
  9672.         if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 2)
  9673.         {
  9674.             new Float:px, Float:py, Float:pz, Float:pa;
  9675.             GetPlayerFacingAngle(playerid,pa);
  9676.             if(pa >= 0.0 && pa <= 22.5) //n1
  9677.             {
  9678.                 GetPlayerPos(playerid, px, py, pz);
  9679.                 SetPlayerPos(playerid, px, py+30, pz+5);
  9680.             }
  9681.             if(pa >= 332.5 && pa < 0.0) //n2
  9682.             {
  9683.                 GetPlayerPos(playerid, px, py, pz);
  9684.                 SetPlayerPos(playerid, px, py+30, pz+5);
  9685.             }
  9686.             if(pa >= 22.5 && pa <= 67.5) //nw
  9687.             {
  9688.                 GetPlayerPos(playerid, px, py, pz);
  9689.                 SetPlayerPos(playerid, px-15, py+15, pz+5);
  9690.             }
  9691.             if(pa >= 67.5 && pa <= 112.5) //w
  9692.             {
  9693.                 GetPlayerPos(playerid, px, py, pz);
  9694.                 SetPlayerPos(playerid, px-30, py, pz+5);
  9695.             }
  9696.             if(pa >= 112.5 && pa <= 157.5) //sw
  9697.             {
  9698.                 GetPlayerPos(playerid, px, py, pz);
  9699.                 SetPlayerPos(playerid, px-15, py-15, pz+5);
  9700.             }
  9701.             if(pa >= 157.5 && pa <= 202.5) //s
  9702.             {
  9703.                 GetPlayerPos(playerid, px, py, pz);
  9704.                 SetPlayerPos(playerid, px, py-30, pz+5);
  9705.             }
  9706.             if(pa >= 202.5 && pa <= 247.5)//se
  9707.             {
  9708.                 GetPlayerPos(playerid, px, py, pz);
  9709.                 SetPlayerPos(playerid, px+15, py-15, pz+5);
  9710.             }
  9711.             if(pa >= 247.5 && pa <= 292.5)//e
  9712.             {
  9713.                 GetPlayerPos(playerid, px, py, pz);
  9714.                 SetPlayerPos(playerid, px+30, py, pz+5);
  9715.             }
  9716.             if(pa >= 292.5 && pa <= 332.5)//e
  9717.             {
  9718.                 GetPlayerPos(playerid, px, py, pz);
  9719.                 SetPlayerPos(playerid, px+15, py+15, pz+5);
  9720.             }
  9721.         }
  9722.         else
  9723.         {
  9724.             SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
  9725.         }
  9726.         return 1;
  9727.     }
  9728.     if(strcmp(cmd, "/lt", true) == 0)
  9729.     {
  9730.         if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 1)
  9731.         {
  9732.             new Float:slx, Float:sly, Float:slz;
  9733.             GetPlayerPos(playerid, slx, sly, slz);
  9734.             SetPlayerPos(playerid, slx, sly+2, slz);
  9735.             return 1;
  9736.         }
  9737.         else
  9738.         {
  9739.             SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
  9740.         }
  9741.         return 1;
  9742.     }
  9743.     if(strcmp(cmd, "/rt", true) == 0)
  9744.     {
  9745.         if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 1)
  9746.         {
  9747.             new Float:slx, Float:sly, Float:slz;
  9748.             GetPlayerPos(playerid, slx, sly, slz);
  9749.             SetPlayerPos(playerid, slx, sly-2, slz-2);
  9750.             return 1;
  9751.         }
  9752.         else
  9753.         {
  9754.             SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
  9755.         }
  9756.         return 1;
  9757.     }
  9758.  
  9759. //-------------------------------[Stats]--------------------------------------------------------------------------
  9760.     if (strcmp(cmd, "/provjeri", true) == 0)
  9761.     {
  9762.         if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 1)
  9763.         {
  9764.             tmp = strtok(cmdtext, idx);
  9765.             if(!strlen(tmp))
  9766.             {
  9767.                 SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/provjeri [Korisnicki ID ili Ime Korisnika]");
  9768.                 return 1;
  9769.             }
  9770.             if(IsStringAName(tmp))
  9771.             {
  9772.                 giveplayerid = GetPlayerID(tmp);
  9773.             }
  9774.             else
  9775.             {
  9776.                 giveplayerid = strval(tmp);
  9777.             }
  9778.             if(IsPlayerConnected(giveplayerid))
  9779.             {
  9780.                 PrintPlayerprovjeri(playerid,giveplayerid);
  9781.             }
  9782.             else
  9783.             {
  9784.                 SendClientMessage(playerid, COLOR_GRAD1, "Krivi ID!");
  9785.             }
  9786.         }
  9787.         else
  9788.         {
  9789.             SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
  9790.         }
  9791.     }
  9792.     if (strcmp(cmd, "/nekoristidanumber", true) == 0)
  9793.     {
  9794.         if (gPhoneBook[playerid] == 1)
  9795.         {
  9796.             tmp = strtok(cmdtext, idx);
  9797.             if(!strlen(tmp))
  9798.             {
  9799.                 SendClientMessage(playerid, COLOR_GRAD1, "Koristite: /nekoristinumber [Korisnicki ID ili Ime Korisnika]");
  9800.                 return 1;
  9801.             }
  9802.             if(IsStringAName(tmp))
  9803.             {
  9804.                 giveplayerid = GetPlayerID(tmp);
  9805.             }
  9806.             else
  9807.             {
  9808.                 giveplayerid = strval(tmp);
  9809.             }
  9810.             if(IsPlayerConnected(giveplayerid))
  9811.             {
  9812.                 GetPlayerName(giveplayerid, sendername, sizeof(sendername));
  9813.                 format(string, 256, "Name: %s, Ph: %d",sendername,PlayerInfo[giveplayerid][pPnumber]);
  9814.                 SendClientMessage(playerid, COLOR_GRAD1, string);
  9815.             }
  9816.             else
  9817.             {
  9818.                 SendClientMessage(playerid, COLOR_GRAD1, "   nema takvog igraca");
  9819.             }
  9820.         }
  9821.         else
  9822.         {
  9823.             SendClientMessage(playerid, COLOR_GRAD1, "   Nemas telefonski imenik");
  9824.         }
  9825.     }
  9826. //-------------------------------[BuyLevel]--------------------------------------------------------------------------
  9827.     if (strcmp(cmd, "/buylevel", true) == 0)
  9828.     {
  9829.         if (gPlayerLogged[playerid] != 0)
  9830.         {
  9831.             PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);//
  9832.             if (gdebug){printf("DEBUG buylev cash = %d", PlayerInfo[playerid][pCash]);}
  9833.             if(PlayerInfo[playerid][pLevel] >= 0)
  9834.             {
  9835.                 new nxtlevel = PlayerInfo[playerid][pLevel]+1;
  9836.                 new costlevel = nxtlevel*levelcost;//10k for testing purposes
  9837.                 new expamount = nxtlevel*levelexp;
  9838.                 new infostring[256];
  9839.                 if (PlayerInfo[playerid][pCash] < costlevel)
  9840.                 {
  9841.                     format(infostring, 256, "{F81414}(Odbijeno){FFFFFF} Nemate dovoljno novaca ($%d)",costlevel);
  9842.                     SendClientMessage(playerid, COLOR_GRAD1, infostring);
  9843.                 }
  9844.                 if (PlayerInfo[playerid][pExp] < expamount)
  9845.                 {
  9846.                     format(infostring, 256, "   Trebas %d Experiance poena, Trenutno imas [%d]",expamount,PlayerInfo[playerid][pExp]);
  9847.                     SendClientMessage(playerid, COLOR_GRAD1, infostring);
  9848.                 }
  9849.                 else
  9850.                 {
  9851.                     format(infostring, 256, "[Level++] Cestitamo presli ste na novi level! Vas level je sada: %d", nxtlevel);
  9852.                     PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9853.                     PlayerPlayMusic(playerid);
  9854.                     GivePlayerMoney(playerid, (-costlevel));
  9855.                     PlayerInfo[playerid][pLevel]++;
  9856.                     PlayerInfo[playerid][pExp] = 0;
  9857.                     PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
  9858.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, infostring);
  9859.                 }
  9860.             }
  9861.             return 1;
  9862.         }
  9863.         else
  9864.         {
  9865.             SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Niste logirani");
  9866.         }
  9867.     }
  9868. //-------------------------------[UPGRADE]--------------------------------------------------------------------------
  9869.     if (strcmp(cmd, "/carcolor", true) == 0)
  9870.     {
  9871.         new house = PlayerInfo[playerid][pPhousekey];
  9872.         GetPlayerName(playerid, playername, sizeof(playername));
  9873.         if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  9874.         {
  9875.             tmp = strtok(cmdtext, idx);
  9876.             if(!strlen(tmp))
  9877.             {
  9878.                 SendClientMessage(playerid, COLOR_ORANGE,"Koristite: {FFFFFF}/carcolor [color 1 - 2] [color number]");
  9879.                 return 1;
  9880.             }
  9881.             new colornum = strval(tmp);
  9882.             if(colornum > 2 || colornum < 1)
  9883.             {
  9884.                 SendClientMessage(playerid, COLOR_GRAD3,"Choices are 1 or 2");
  9885.                 return 1;
  9886.             }
  9887.             tmp = strtok(cmdtext, idx);
  9888.             if(!strlen(tmp))
  9889.             {
  9890.                 SendClientMessage(playerid, COLOR_ORANGE,"Koristite: {FFFFFF}/carcolor [color 1 - 2] [color number]");
  9891.             }
  9892.             new color = strval(tmp);
  9893.             if(color > 126)
  9894.             {
  9895.                 SendClientMessage(playerid, COLOR_GRAD3,"Maximum is 126");
  9896.                 return 1;
  9897.             }
  9898.             if (GetPlayerMoney(playerid) < 5000)
  9899.             {
  9900.                 SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Ne mozete si priustiti ($5000)");
  9901.             }
  9902.             if(colornum == 1)
  9903.             {
  9904.                 HouseInfo[house][hVcol1] = color;
  9905.                 format(string, sizeof(string), "Boja auta 1 je %d -$5000",color);
  9906.                 SendClientMessage(playerid, COLOR_GRAD3,string);
  9907.             }
  9908.             else
  9909.             {
  9910.                 HouseInfo[house][hVcol2] = color;
  9911.                 format(string, sizeof(string), "Boja auta 2 je %d -$5000",color);
  9912.                 SendClientMessage(playerid, COLOR_GRAD3,string);
  9913.             }
  9914.             SendClientMessage(playerid, COLOR_GRAD6, "Bojanje ce biti kompletirano u roku 24 sata");
  9915.             GivePlayerMoney(playerid,-5000);
  9916.             SBizzInfo[6][sbTakings] = SBizzInfo[6][sbTakings]+5000;
  9917.             PlayerPlaySound(giveplayerid, 1134, 0.0, 0.0, 0.0);
  9918.             OnPropUpdate();
  9919.         }
  9920.         else
  9921.         {
  9922.             SendClientMessage(playerid, COLOR_GRAD2, "   Ne posjedujes kucu");
  9923.             return 1;
  9924.         }
  9925.         return 1;
  9926.     }
  9927.     if(!strcmp(cmdtext, "/carupgrade", true))
  9928.     {  new house = PlayerInfo[playerid][pPhousekey];
  9929.      if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  9930.      {
  9931.     ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "{33BBFF}Kucna Vozila", "Infernus($350000)\nTurismo($300000)\nElegy($100000)\nJester($200000)\nSultan($150000)\nMonster($400000)\nHotring($450000)", "Kupi", "Odustani");
  9932.     return 1;
  9933.      }
  9934.      else
  9935.      {
  9936.       SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Ne posjedujete kucu");
  9937.       return 1;
  9938.      }
  9939.     }
  9940.     if (strcmp(cmd, "/resetupgrades", true) == 0)
  9941.     {
  9942.         if (gPlayerLogged[playerid] == 0)
  9943.         {
  9944.             SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Nisi logiran");
  9945.             return 1;
  9946.         }
  9947.         if (GetPlayerMoney(playerid) < 100000)
  9948.         {
  9949.             SendClientMessage(playerid, COLOR_GRAD1, "   Cijena je $100000");
  9950.             return 1;
  9951.         }
  9952.         if (PlayerInfo[playerid][pLevel] < 2)
  9953.         {
  9954.             SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Morate biti najmanje lv2");
  9955.             return 1;
  9956.         }
  9957.         PlayerInfo[playerid][gPupgrade] = (PlayerInfo[playerid][pLevel]-1)*2;
  9958.         PlayerInfo[playerid][pGun1] = 0;
  9959.         PlayerInfo[playerid][pGun2] = 0;
  9960.         PlayerInfo[playerid][pGun3] = 0;
  9961.         PlayerInfo[playerid][pGun4] = 0;
  9962.         PlayerInfo[playerid][pGun5] = 0;
  9963.         PlayerInfo[playerid][pGun6] = 0;
  9964.         PlayerInfo[playerid][pAmmo1] = 200;
  9965.         PlayerInfo[playerid][pAmmo2] = 8;
  9966.         PlayerInfo[playerid][pAmmo3] = 30;
  9967.         PlayerInfo[playerid][pAmmo4] = 30;
  9968.         PlayerInfo[playerid][pAmmo5] = 10;
  9969.         PlayerInfo[playerid][pAmmo6] = 10;
  9970.         PlayerInfo[playerid][pSHealth] = 0.0;
  9971.         GivePlayerMoney(playerid,-100000);
  9972.         //SBizzInfo[6][sbTakings] = SBizzInfo[6][sbTakings]+100000;
  9973.         PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
  9974.         format(string, 256, "   Imas %d nepotrosenih Upgrade poena",PlayerInfo[playerid][gPupgrade]);
  9975.         SendClientMessage(playerid, COLOR_GRAD2, string);
  9976.     }
  9977.     if(strcmp(cmd, "/bestbuy", true) == 0)
  9978.     {
  9979.         new tmpprice;
  9980.         new store;
  9981.         if(Locator[playerid] == 0)
  9982.         {
  9983.             SendClientMessage(playerid, COLOR_GRAD2, "nemas taj uredjaj");
  9984.             return 1;
  9985.         }
  9986.         for(new i = 0; i < sizeof(BizzInfo); i++)
  9987.         {
  9988.             if(BizzInfo[i][bPriceMod] < tmpprice && BizzInfo[i][bEntcost] == 0 && BizzInfo[i][bProd] > 0)
  9989.             {
  9990.                 tmpprice = BizzInfo[i][bPriceMod];
  9991.                 store = i;
  9992.             }
  9993.             for(new j = 0; j < sizeof(BizzInfo); j++)
  9994.             {
  9995.                 if(BizzInfo[j][bPriceMod] < tmpprice && BizzInfo[j][bEntcost] == 0 && BizzInfo[j][bProd] > 0)
  9996.                 {
  9997.                     tmpprice = BizzInfo[j][bPriceMod];
  9998.                     store = j;
  9999.                 }
  10000.             }
  10001.         }
  10002.         SetPlayerCheckpoint(playerid,BizzInfo[store][bEntrancex], BizzInfo[store][bEntrancey], BizzInfo[store][bEntrancez], 4.0);
  10003.         gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME;
  10004.         GameTextForPlayer(playerid, "~w~Waypoint postavljen na ~r~Best Buy", 5000, 1);
  10005.         return 1;
  10006.     }
  10007.     if(strcmp(cmd, "/bestsale", true) == 0)
  10008.     {
  10009.         new tmpprice = 0;
  10010.         new store = 255;
  10011.         if(Locator[playerid] == 0)
  10012.         {
  10013.             SendClientMessage(playerid, COLOR_GRAD2, "nemas taj uredjaj");
  10014.             return 1;
  10015.         }
  10016.         for(new i = 0; i < sizeof(BizzInfo); i++)
  10017.         {
  10018.             if(BizzInfo[i][bPayComp] > tmpprice && BizzInfo[i][bCompCap] > BizzInfo[i][bComp] && BizzInfo[i][bTakings] > BizzInfo[i][bPayComp])
  10019.             {
  10020.                 tmpprice = BizzInfo[i][bPayComp];
  10021.                 store = i;
  10022.             }
  10023.             for(new j = 0; j < sizeof(BizzInfo); j++)
  10024.             {
  10025.                 if(store != 255 && BizzInfo[j][bPayComp] > tmpprice && BizzInfo[j][bCompCap] > BizzInfo[j][bComp] && BizzInfo[j][bTakings] > BizzInfo[j][bPayComp])
  10026.                 {
  10027.                     tmpprice = BizzInfo[j][bPayComp];
  10028.                     store = j;
  10029.                 }
  10030.             }
  10031.         }
  10032.         if(store == 255)
  10033.         {
  10034.             GameTextForPlayer(playerid, "~w~nema prodaja za tebe.", 5000, 1);
  10035.             return 1;
  10036.         }
  10037.         SetPlayerCheckpoint(playerid,BizzInfo[store][bEntrancex], BizzInfo[store][bEntrancey], BizzInfo[store][bEntrancez], 4.0);
  10038.         gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME;
  10039.         GameTextForPlayer(playerid, "~w~Waypoint postavljen na ~r~Best Sale", 5000, 1);
  10040.         return 1;
  10041.     }
  10042.     if(!strcmp(cmdtext, "/oruzje", true))
  10043.     {
  10044.       new location = PlayerInfo[playerid][pLocal];
  10045.       if(location < 99 || location == 255)
  10046.       {
  10047.             SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Niste u trgovini oruzjem!");
  10048.             return 1;
  10049.       }
  10050.       new mod = (BizzInfo[location-99][bPriceMod]);
  10051.       ShowPlayerDialog(playerid, 14, DIALOG_STYLE_LIST, "{33BBFF}Trgovina oruzjem", "Noz($40)\nPadobran($50)\nPistolj 9mm($80)\nPistolj 9mm tihi($100)\nDesert Eagle($150)\nSawnOff($200)\nSMG-MP5($250)\nAK47($400)\nM4($420)\nTec-9($450)", "Kupi", "Odustani");
  10052.       return 1;
  10053.     }
  10054.     if (strcmp(cmd, "/upgrade", true) == 0)
  10055.     {
  10056.         new gunid[16];
  10057.         new infostring[256];
  10058.         tmp = strtok(cmdtext, idx);
  10059.         if(!strlen(tmp))
  10060.         {
  10061.             format(string, sizeof(string), "{FFBB00}Koristite: {FFFFFF}/upgrade [ime upgradea] (Imate %d Upgrade poena)",PlayerInfo[playerid][gPupgrade]);
  10062.             SendClientMessage(playerid, COLOR_LIGHTBLUE,"__________________________________________________");
  10063.             SendClientMessage(playerid, COLOR_LIGHTRED,"UPGRADEOVI");
  10064.             SendClientMessage(playerid, COLOR_GRAD2,string);
  10065.             if(PlayerInfo[playerid][pLevel] == 2)
  10066.             {
  10067.                 SendClientMessage(playerid, COLOR_WHITE, "Level 2 Oruzja: sdpistol colt45");
  10068.                 SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo");
  10069.             }
  10070.             else if(PlayerInfo[playerid][pLevel] == 3)
  10071.             {
  10072.                 SendClientMessage(playerid, COLOR_WHITE, "Level 3 Oruzja: sdpistol colt45 mp5");
  10073.                 SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo smgammo");
  10074.             }
  10075.             else if(PlayerInfo[playerid][pLevel] == 4)
  10076.             {
  10077.                 SendClientMessage(playerid, COLOR_WHITE, "Level 4 Oruzja: sdpistol colt45 mp5 shotgun");
  10078.                 SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo");
  10079.             }
  10080.             else if(PlayerInfo[playerid][pLevel] == 5)
  10081.             {
  10082.                 SendClientMessage(playerid, COLOR_WHITE, "Level 5 Oruzja: sdpistol colt45 mp5 shotgun spas12");
  10083.                 SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo");
  10084.             }
  10085.             else if(PlayerInfo[playerid][pLevel] == 6)
  10086.             {
  10087.                 SendClientMessage(playerid, COLOR_WHITE, "Level 6 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle");
  10088.                 SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo");
  10089.             }
  10090.             else if(PlayerInfo[playerid][pLevel] == 7)
  10091.             {
  10092.                 SendClientMessage(playerid, COLOR_WHITE, "Level 7 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi");
  10093.                 SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo");
  10094.             }
  10095.             else if(PlayerInfo[playerid][pLevel] == 8)
  10096.             {
  10097.                 SendClientMessage(playerid, COLOR_WHITE, "Level 8 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi sawnoff");
  10098.                 SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo");
  10099.             }
  10100.             else if(PlayerInfo[playerid][pLevel] == 9)
  10101.             {
  10102.                 SendClientMessage(playerid, COLOR_WHITE, "Level 9 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi sawnoff tec9 ak47");
  10103.                 SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo assaultammo");
  10104.             }
  10105.             else if(PlayerInfo[playerid][pLevel] == 10)
  10106.             {
  10107.                 SendClientMessage(playerid, COLOR_WHITE, "Level 10 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi sawnoff tec9 ak47 m4");
  10108.                 SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo assaultammo");
  10109.             }
  10110.             else if(PlayerInfo[playerid][pLevel] == 11)
  10111.             {
  10112.                 SendClientMessage(playerid, COLOR_WHITE, "Level 11 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi sawnoff tec9 ak47 m4 rifle");
  10113.                 SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo assaultammo rifleammo");
  10114.             }
  10115.             else if(PlayerInfo[playerid][pLevel] == 12)
  10116.             {
  10117.                 SendClientMessage(playerid, COLOR_WHITE, "Level 12 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi sawnoff tec9 ak47 m4 rifle flamethrower");
  10118.                 SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo assaultammo rifleammo heavyammo");
  10119.             }
  10120.             else if(PlayerInfo[playerid][pLevel] >= 13)
  10121.             {
  10122.                 format(infostring, 256, "Level %d Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi sawnoff tec9 ak47 m4 rifle",PlayerInfo[playerid][pLevel]);
  10123.                 SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo assaultammo rifleammo heavyammo");
  10124.                 SendClientMessage(playerid, COLOR_WHITE, infostring);
  10125.             }
  10126.             SendClientMessage(playerid, COLOR_WHITE, "Dodatni Health: health");
  10127.             SendClientMessage(playerid, COLOR_LIGHTBLUE,"__________________________________________________");
  10128.             return 1;
  10129.         }
  10130.         strmid(gunid, tmp, 0, strlen(cmdtext), 255);
  10131.         if (PlayerInfo[playerid][gPupgrade] > 0)
  10132.         {
  10133.             if (PlayerInfo[playerid][pLevel] >= 5 && (strcmp(gunid, "parachute", true, strlen(gunid)) == 0))
  10134.             {
  10135.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s parachute");
  10136.                 PlayerInfo[playerid][pGun5] = 46;
  10137.             }
  10138.             else if (PlayerInfo[playerid][pLevel] >= 11 && (strcmp(gunid, "rifle", true, strlen(gunid)) == 0))
  10139.             {
  10140.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s rifle");
  10141.                 PlayerInfo[playerid][pGun5] = 33;
  10142.             }
  10143.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "m4", true, strlen(gunid)) == 0))
  10144.             {
  10145.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati sn m4");
  10146.                 PlayerInfo[playerid][pGun4] = 31;
  10147.             }
  10148.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "golfclub", true, strlen(gunid)) == 0))
  10149.             {
  10150.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s golfclub");
  10151.                 PlayerInfo[playerid][pGun6] = 2;
  10152.             }
  10153.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "nightstick", true, strlen(gunid)) == 0))
  10154.             {
  10155.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s nightstick");
  10156.                 PlayerInfo[playerid][pGun6] = 3;
  10157.             }
  10158.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "knife", true, strlen(gunid)) == 0))
  10159.             {
  10160.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s knife");
  10161.                 PlayerInfo[playerid][pGun6] = 4;
  10162.             }
  10163.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "baseballbat", true, strlen(gunid)) == 0))
  10164.             {
  10165.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s baseballbat");
  10166.                 PlayerInfo[playerid][pGun6] = 5;
  10167.             }
  10168.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "shovel", true, strlen(gunid)) == 0))
  10169.             {
  10170.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s shovel");
  10171.                 PlayerInfo[playerid][pGun6] = 6;
  10172.             }
  10173.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "poolcue", true, strlen(gunid)) == 0))
  10174.             {
  10175.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s poolcue");
  10176.                 PlayerInfo[playerid][pGun6] = 7;
  10177.             }
  10178.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "purpledildo", true, strlen(gunid)) == 0))
  10179.             {
  10180.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s purpledildo");
  10181.                 PlayerInfo[playerid][pGun6] = 10;
  10182.             }
  10183.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "whitedildo", true, strlen(gunid)) == 0))
  10184.             {
  10185.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s whitedildo");
  10186.                 PlayerInfo[playerid][pGun6] = 11;
  10187.             }
  10188.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "longwhitedildo", true, strlen(gunid)) == 0))
  10189.             {
  10190.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s longwhitedildo");
  10191.                 PlayerInfo[playerid][pGun6] = 12;
  10192.             }
  10193.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "whitedildo2", true, strlen(gunid)) == 0))
  10194.             {
  10195.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s whitedildo2");
  10196.                 PlayerInfo[playerid][pGun6] = 13;
  10197.             }
  10198.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "flowers", true, strlen(gunid)) == 0))
  10199.             {
  10200.                 SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: You Will Now Spawn With flowers");
  10201.                 PlayerInfo[playerid][pGun6] = 14;
  10202.             }
  10203.             else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "cane", true, strlen(gunid)) == 0))
  10204.             {
  10205.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s cane");
  10206.                 PlayerInfo[playerid][pGun6] = 15;
  10207.             }
  10208.             else if (PlayerInfo[playerid][pLevel] >= 9 && (strcmp(gunid, "ak47", true, strlen(gunid)) == 0))
  10209.             {
  10210.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati sn ak47");
  10211.                 PlayerInfo[playerid][pGun4] = 30;
  10212.             }
  10213.             else if (PlayerInfo[playerid][pLevel] >= 9 && (strcmp(gunid, "Tec9", true, strlen(gunid)) == 0))
  10214.             {
  10215.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s Tec9");
  10216.                 PlayerInfo[playerid][pGun3] = 32;
  10217.             }
  10218.             else if (PlayerInfo[playerid][pLevel] >= 8 && (strcmp(gunid, "sawnoff", true, strlen(gunid)) == 0))
  10219.             {
  10220.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s sawnoff");
  10221.                 PlayerInfo[playerid][pGun2] = 26;
  10222.             }
  10223.             else if (PlayerInfo[playerid][pLevel] >= 7 && (strcmp(gunid, "uzi", true, strlen(gunid)) == 0))
  10224.             {
  10225.                 SendClientMessage(playerid, COLOR_GRAD6, "SNovi dodatak: sad ce se spawnati sn uzi");
  10226.                 PlayerInfo[playerid][pGun3] = 28;
  10227.             }
  10228.             else if (PlayerInfo[playerid][pLevel] >= 6 && (strcmp(gunid, "deagle", true, strlen(gunid)) == 0))
  10229.             {
  10230.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s deagle");
  10231.                 PlayerInfo[playerid][pGun1] = 24;
  10232.             }
  10233.             else if (PlayerInfo[playerid][pLevel] >= 5 && (strcmp(gunid, "spas12", true, strlen(gunid)) == 0))
  10234.             {
  10235.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s spas12");
  10236.                 PlayerInfo[playerid][pGun2] = 27;
  10237.             }
  10238.             else if (PlayerInfo[playerid][pLevel] >= 4 && (strcmp(gunid, "shotgun", true, strlen(gunid)) == 0))
  10239.             {
  10240.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s shotgun");
  10241.                 PlayerInfo[playerid][pGun2] = 25;
  10242.             }
  10243.             else if (PlayerInfo[playerid][pLevel] >= 3 && (strcmp(gunid, "mp5", true, strlen(gunid)) == 0))
  10244.             {
  10245.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati sn mp5");
  10246.                 PlayerInfo[playerid][pGun3] = 29;
  10247.             }
  10248.             else if (PlayerInfo[playerid][pLevel] >= 2 && (strcmp(gunid, "colt45", true, strlen(gunid)) == 0))
  10249.             {
  10250.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s colt45");
  10251.                 PlayerInfo[playerid][pGun1] = 22;
  10252.             }
  10253.             else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "sdpistol", true, strlen(gunid)) == 0))
  10254.             {
  10255.                 SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati sn sdpistol");
  10256.                 PlayerInfo[playerid][pGun1] = 23;
  10257.             }
  10258.             else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "pistolammo", true, strlen(gunid)) == 0))
  10259.             {
  10260.                 PlayerInfo[playerid][pAmmo1] = PlayerInfo[playerid][pAmmo1]+50;
  10261.                 format(infostring, 256, "New Upgrade: You Will Now Spawn With %d Pistol Ammo (+50)",PlayerInfo[playerid][pAmmo1]);
  10262.                 SendClientMessage(playerid, COLOR_GRAD6, infostring);
  10263.             }
  10264.             else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "shotgunammo", true, strlen(gunid)) == 0))
  10265.             {
  10266.                 PlayerInfo[playerid][pAmmo2] = PlayerInfo[playerid][pAmmo2]+50;
  10267.                 format(infostring, 256, "New Upgrade: You Will Now Spawn With %d Shotgun Ammo (+50)",PlayerInfo[playerid][pAmmo2]);
  10268.                 SendClientMessage(playerid, COLOR_GRAD6, infostring);
  10269.             }
  10270.             else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "smgammo", true, strlen(gunid)) == 0))
  10271.             {
  10272.                 PlayerInfo[playerid][pAmmo3] = PlayerInfo[playerid][pAmmo3]+100;
  10273.                 format(infostring, 256, "New Upgrade: You Will Now Spawn With %d SMG Ammo (+100)",PlayerInfo[playerid][pAmmo3]);
  10274.                 SendClientMessage(playerid, COLOR_GRAD6, infostring);
  10275.             }
  10276.             else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "assaultammo", true, strlen(gunid)) == 0))
  10277.             {
  10278.                 PlayerInfo[playerid][pAmmo4] = PlayerInfo[playerid][pAmmo4]+50;
  10279.                 format(infostring, 256, "New Upgrade: You Will Now Spawn With %d Assault Ammo (+50)",PlayerInfo[playerid][pAmmo4]);
  10280.                 SendClientMessage(playerid, COLOR_GRAD6, infostring);
  10281.             }
  10282.             else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "rifleammo", true, strlen(gunid)) == 0))
  10283.             {
  10284.                 PlayerInfo[playerid][pAmmo5] = PlayerInfo[playerid][pAmmo5]+10;
  10285.                 format(infostring, 256, "New Upgrade: You Will Now Spawn With %d Rifleammo Ammo (+10)",PlayerInfo[playerid][pAmmo5]);
  10286.                 SendClientMessage(playerid, COLOR_GRAD6, infostring);
  10287.             }
  10288.             else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "heavyammo", true, strlen(gunid)) == 0))
  10289.             {
  10290.                 PlayerInfo[playerid][pAmmo6] = PlayerInfo[playerid][pAmmo6]+10;
  10291.                 format(infostring, 256, "New Upgrade: You Will Now Spawn With %d Heavyammo Ammo (+50)",PlayerInfo[playerid][pAmmo6]);
  10292.                 SendClientMessage(playerid, COLOR_GRAD6, infostring);
  10293.             }
  10294.             else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "health", true, strlen(gunid)) == 0))
  10295.             {
  10296.                 if (PlayerInfo[playerid][pSHealth] < 100)
  10297.                 {
  10298.                     PlayerInfo[playerid][pSHealth] = PlayerInfo[playerid][pSHealth]+5.0;
  10299.                     format(infostring, 256, "Novi dodatak: sad ces se spavnati s %.2f Health (+5)",PlayerInfo[playerid][pSHealth]+50);
  10300.                 }
  10301.                 else
  10302.                 {
  10303.                     SendClientMessage(playerid, COLOR_GRAD6, "   Imas maksimalni spawn Health!");
  10304.                     return 1;
  10305.                 }
  10306.             }
  10307.             else
  10308.             {
  10309.                 SendClientMessage(playerid, COLOR_GRAD6, "   Nepoznata nadogranja");
  10310.                 return 1;
  10311.             }
  10312.         }
  10313.         else
  10314.         {
  10315.             SendClientMessage(playerid, COLOR_GRAD6, "   Imas 0 Upgrade poena");
  10316.             return 1;
  10317.         }
  10318.         SetPlayerWeapons(playerid);
  10319.         PlayerInfo[playerid][gPupgrade]--;
  10320.         return 1;
  10321.     }
  10322. //-------------------------------[Login]--------------------------------------------------------------------------
  10323.     if (strcmp(cmd, "/ložfgin", true) ==0 )
  10324.     {
  10325.         if(IsPlayerConnected(playerid))
  10326.         {
  10327.             new tmppass[64];
  10328.             if(gPlayerLogged[playerid] == 1)
  10329.             {
  10330.                 SendClientMessage(playerid, COLOR_WHITE, "{66CCEE}CroHerze: {FFFFFF}Vec ste logirani!");
  10331.                 return 1;
  10332.             }
  10333.             tmp = strtok(cmdtext, idx);
  10334.             if(!strlen(tmp))
  10335.             {
  10336.                 SendClientMessage(playerid, COLOR_GRAD1, "Koristite: /ložfagin [sifra]");
  10337.                 return 1;
  10338.             }
  10339.             strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
  10340.             Encript(tmppass);
  10341.             OnPlayerLogin(playerid,tmppass);
  10342.         }
  10343.         return 1;
  10344.     }
  10345. //--------------------------------------------------------------------------------------
  10346.     if(strcmp(cmd,"/Otvori",true)==0)
  10347.     {
  10348.         if(PlayerInfo[playerid][pMember] == 9||PlayerInfo[playerid][pLeader] == 9)
  10349.         {
  10350.             MoveDynamicObject(BMK, 1282.3792724609, -2056.4567871094, 54.976421356201, 2.0);
  10351.             SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Otvaras vrata u BM BAZI!");
  10352.         }
  10353.         else if(PlayerInfo[playerid][pMember] == 8||PlayerInfo[playerid][pLeader] == 8)
  10354.         {
  10355.             MoveDynamicObject(RMK, 1642.8372802734, -1707.1586914063, 22.73189163208, 2.0);
  10356.             SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Otvaras vrata u RM BAZI!");
  10357.         }
  10358.         else if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
  10359.         {
  10360.             MoveDynamicObject(GMK, 2443.83984375, -1658.8203125, 9.4607181549072, 2.0);
  10361.             SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Otvaras vrata u GM BAZI!");
  10362.         }
  10363.         else if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6)
  10364.         {
  10365.             MoveDynamicObject(FAK, 1244.9997558594, -757.40399169922, 89.317375183105, 2.0);
  10366.             SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Otvaras vrata u FA BAZI!");
  10367.         }
  10368.         else
  10369.         {
  10370.             SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Niste clan organizacije/bande !");
  10371.         }
  10372.         return 1;
  10373.     }
  10374.     if(strcmp(cmd,"/Zatvori",true)==0)
  10375.     {
  10376.         if(PlayerInfo[playerid][pMember] == 9||PlayerInfo[playerid][pLeader] == 9)
  10377.         {
  10378.             MoveDynamicObject(BMK, 1282.37890625, -2056.4560546875, 60.626445770264, 2.0);
  10379.             SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Zatvaras vrata u BM BAZI!");
  10380.         }
  10381.         else if(PlayerInfo[playerid][pMember] == 8||PlayerInfo[playerid][pLeader] == 8)
  10382.         {
  10383.             MoveDynamicObject(RMK, 1642.8533935547, -1714.8718261719, 22.73189163208, 2.0);
  10384.             SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Zatvaras vrata u RM BAZI!");
  10385.         }
  10386.         else if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
  10387.         {
  10388.             MoveDynamicObject(GMK, 2443.83984375, -1658.8203125, 15.085716247559, 2.0);
  10389.             SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Zatvaras vrata u GM BAZI!");
  10390.         }
  10391.         else if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6)
  10392.         {
  10393.             MoveDynamicObject(FAK, 1244.9997558594, -757.40399169922, 94.96736907959, 2.0);
  10394.             SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Zatvaras vrata u FA BAZI!");
  10395.         }
  10396.         else
  10397.         {
  10398.             SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Niste clan organizacije/bande !");
  10399.         }
  10400.         return 1;
  10401.     }
  10402. //------------------------------------------------------------------------------------------
  10403.     if(strcmp(cmd, "/sethp", true) == 0)
  10404.     {
  10405.         if(IsPlayerConnected(playerid))
  10406.         {
  10407.    tmp = strtok(cmdtext, idx);
  10408.             if(!strlen(tmp))
  10409.             {
  10410.                 SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /sethp [Korisnicki ID ili Ime Korisnika] [HP]");
  10411.                 return 1;
  10412.             }
  10413.             new playa;
  10414.             new health;
  10415.             playa = ReturnUser(tmp);
  10416.    tmp = strtok(cmdtext, idx);
  10417.             health = strval(tmp);
  10418.             if (PlayerInfo[playerid][pAdmin] >= 3)
  10419.             {
  10420.                 if(IsPlayerConnected(playa))
  10421.                 {
  10422.                     if(playa != INVALID_PLAYER_ID)
  10423.                     {
  10424.                         SetPlayerHealth(playa, health);
  10425.                     }
  10426.                 }
  10427.             }
  10428.             else
  10429.             {
  10430.                 SendClientMessage(playerid, COLOR_GRAD1, "   {FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
  10431.             }
  10432.         }
  10433.         return 1;
  10434.     }
  10435. //----------------------------------[ooc]-----------------------------------------------
  10436.     if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
  10437.     {
  10438.     if(PlayerInfo[playerid][pMuted] == 1)
  10439.     {
  10440.     new string[128];
  10441.     format(string, sizeof(string), "ZeroAS | Vi ste utisani! | Sekundi koliko ste jos utisani: %d", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60));
  10442.     SendClientMessage(playerid, COLOR_YELLOW, string);
  10443.     return 0;
  10444.     }
  10445.         if(IsPlayerConnected(playerid))
  10446.         {
  10447.             if(gPlayerLogged[playerid] == 0)
  10448.             {
  10449.                 SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Niste logirani!");
  10450.                 return 1;
  10451.             }
  10452.             if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
  10453.             {
  10454.                 SendClientMessage(playerid, COLOR_LIGHTRED, "  (Odbijeno) {C3C3C3}OOC kanal je iskljucen od strane admina!");
  10455.                 return 1;
  10456.             }
  10457.             GetPlayerName(playerid, sendername, sizeof(sendername));
  10458.             new length = strlen(cmdtext);
  10459.             while ((idx < length) && (cmdtext[idx] <= ' '))
  10460.             {
  10461.                 idx++;
  10462.             }
  10463.             new offset = idx;
  10464.             new result[64];
  10465.             while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  10466.             {
  10467.                 result[idx - offset] = cmdtext[idx];
  10468.                 idx++;
  10469.             }
  10470.             result[idx - offset] = EOS;
  10471.             if(!strlen(result))
  10472.             {
  10473.                 SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}(/o)oc [ooc chat]");
  10474.                 return 1;
  10475.             }
  10476.             format(string, sizeof(string), "(( %s: %s ))", sendername, result);
  10477.             OOCOff(COLOR_ORANGE,string);
  10478.             printf("%s", string);
  10479.         }
  10480.         return 1;
  10481.     }
  10482.     if(strcmp(cmd, "/noooc", true) == 0)
  10483.     {
  10484.         if(IsPlayerConnected(playerid))
  10485.         {
  10486.             if (PlayerInfo[playerid][pAdmin] >= 1 && (!noooc))
  10487.             {
  10488.                 noooc = 1;
  10489.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  10490.                 format(string, sizeof(string), "   OOC kanal je iskljucen od %s", sendername);
  10491.                 SendClientMessageToAll(COLOR_GRAD2, string);
  10492.             }
  10493.             else if (PlayerInfo[playerid][pAdmin] >= 3 && (noooc))
  10494.             {
  10495.                 noooc = 0;
  10496.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  10497.                 format(string, sizeof(string), "   OOC kanal je ukljucen od %s", sendername);
  10498.                 SendClientMessageToAll(COLOR_GRAD2, string);
  10499.             }
  10500.             else
  10501.             {
  10502.                 SendClientMessage(playerid, COLOR_GRAD1, "  {FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
  10503.             }
  10504.         }
  10505.         return 1;
  10506.     }
  10507.     if(strcmp(cmd, "/speedo", true) == 0)
  10508.     {
  10509.         if (gSpeedo[playerid] == 1)
  10510.         {
  10511.             gSpeedo[playerid] = 2;
  10512.             GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~on", 5000, 5);
  10513.             PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  10514.         }
  10515.         else if (gSpeedo[playerid] == 2)
  10516.         {
  10517.             gSpeedo[playerid] = 1;
  10518.             GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~off", 5000, 5);
  10519.             PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  10520.         }
  10521.         else
  10522.         {
  10523.             SendClientMessage(playerid, COLOR_GRAD1, "nemas speedometer");
  10524.         }
  10525.         return 1;
  10526.     }
  10527. //----------------------------------[advertise]-----------------------------------------------
  10528.     if(strcmp(cmd, "/NEKORISTI3", true) == 0 || strcmp(cmd, "/NEKORISTI1", true) == 0)
  10529.     {
  10530.         GetPlayerName(playerid, sendername, sizeof(sendername));
  10531.         new length = strlen(cmdtext);
  10532.         while ((idx < length) && (cmdtext[idx] <= ' '))
  10533.         {
  10534.             idx++;
  10535.         }
  10536.         new offset = idx;
  10537.         new result[64];
  10538.         while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  10539.         {
  10540.             result[idx - offset] = cmdtext[idx];
  10541.             idx++;
  10542.         }
  10543.         result[idx - offset] = EOS;
  10544.         if(!strlen(result))
  10545.         {
  10546.             SendClientMessage(playerid, COLOR_GRAD2, "Koristite: (/ad)vertise [advert text]");
  10547.             return 1;
  10548.         }
  10549.         if ((noooc) && (PlayerInfo[playerid][pAdmin] < 1))
  10550.         {
  10551.             SendClientMessage(playerid, COLOR_GRAD2, "   advertisment kanal je onemogucen od Admina");
  10552.             return 1;
  10553.         }
  10554.         if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
  10555.         {
  10556.             format(string, sizeof(string), "   Molimo pokusajte za %d sekundi",  (addtimer/1000));
  10557.             SendClientMessage(playerid, COLOR_GRAD2, string);
  10558.             return 1;
  10559.  
  10560.         }
  10561.         format(string, sizeof(string), "Plavi Oglasnik: %s, Kontakt: %s Mob: %d",  result, sendername,PlayerInfo[playerid][pPnumber]);
  10562.         OOCOff(TEAM_GROVE_COLOR,string);
  10563.         if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
  10564.         printf("%s", string);
  10565.         return 1;
  10566.     }
  10567. //----------------------------------[togooc]-----------------------------------------------
  10568.  
  10569.     if(strcmp(cmd, "/togooc", true) == 0)
  10570.     if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >=4)
  10571.     {
  10572.         if (!gOoc[playerid])
  10573.         {
  10574.             gOoc[playerid] = 1;
  10575.             SendClientMessage(playerid, COLOR_GRAD2, "   ooc chat kanal onemogucen");
  10576.         }
  10577.         else if (gOoc[playerid])
  10578.         {
  10579.             (gOoc[playerid] = 0);
  10580.             SendClientMessage(playerid, COLOR_GRAD2, "   ooc chat kanal omogucen");
  10581.         }
  10582.         return 1;
  10583.     }
Advertisement
Add Comment
Please, Sign In to add comment