Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 60.85 KB | None | 0 0
  1. if(strcmp(cmd, "/take", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. if(gTeam[playerid] == 2 || IsACop(playerid))
  6. {
  7. if(PlayerInfo[playerid][pRank] < 2)
  8. {
  9. SendClientMessage(playerid, COLOR_GREY, " Moras biti rank 2 ili vise !");
  10. return 1;
  11. }
  12. if(PlayerInfo[playerid][pDBanned] == 1)
  13. {
  14. SendClientMessage(playerid, COLOR_GREY, "* Zabranjeno ti je koristenje ovoga!");
  15. return 1;
  16. }
  17. new x_nr[24];
  18. x_nr = strtok(cmdtext, idx);
  19. if(!strlen(x_nr)) {
  20. SendClientMessage(playerid, COLOR_WHITE, "|___________________ Take Items ____________________|");
  21. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take [Item] [playerID/DeoImena]");
  22. SendClientMessage(playerid, COLOR_GREY, "Available names: Driverslicense, Flyinglicense, Boatlicense, Weapons, Drugs, Materials");
  23. SendClientMessage(playerid, COLOR_WHITE, "|___________________________________________________|");
  24. return 1;
  25. }
  26. if(strcmp(x_nr,"driverslicense",true) == 0)
  27. {
  28. tmp = strtok(cmdtext, idx);
  29. if(!strlen(tmp)) {
  30. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take driverslicense [playerID/DeoImena]");
  31. return 1;
  32. }
  33. giveplayerid = ReturnUser(tmp);
  34. if(IsPlayerConnected(giveplayerid))
  35. {
  36. if(giveplayerid != INVALID_PLAYER_ID)
  37. {
  38. if (ProxDetectorS(8.0, playerid, giveplayerid))
  39. {
  40. new giveplayername[64];
  41.  
  42. GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  43. format(string, sizeof(string), "* Oduzeo si %s's dozvole za voznju kola.", giveplayername);
  44. SendClientMessage(playerid, COLOR_WHITE, string);
  45. format(string, sizeof(string), "* Officer %s ti je uzeo dozvolu za voznju kola.", sendername);
  46. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  47. PlayerInfo[giveplayerid][pCarLic] = 0;
  48. }
  49. else
  50. {
  51. SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
  52. return 1;
  53. }
  54. }
  55. }
  56. else
  57. {
  58. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
  59. return 1;
  60. }
  61. }
  62. if(strcmp(x_nr,"autol",true) == 0)
  63. {
  64. tmp = strtok(cmdtext, idx);
  65. if(!strlen(tmp)) {
  66. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take driverslicense [playerID/DeoImena]");
  67. return 1;
  68. }
  69. giveplayerid = ReturnUser(tmp);
  70. if(IsPlayerConnected(giveplayerid))
  71. {
  72. if(giveplayerid != INVALID_PLAYER_ID)
  73. {
  74. if (ProxDetectorS(8.0, playerid, giveplayerid))
  75. {
  76. new giveplayername[64];
  77.  
  78. GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  79. format(string, sizeof(string), "* Oduzeo si %s's dozvole za voznju kola.", giveplayername);
  80. SendClientMessage(playerid, COLOR_WHITE, string);
  81. format(string, sizeof(string), "* Officer %s ti je uzeo dozvolu za voznju kola.", sendername);
  82. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  83. PlayerInfo[giveplayerid][pCarLic] = 0;
  84. }
  85. else
  86. {
  87. SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
  88. return 1;
  89. }
  90. }
  91. }
  92. else
  93. {
  94. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
  95. return 1;
  96. }
  97. }
  98. else if(strcmp(x_nr,"flyinglicense",true) == 0)
  99. {
  100. tmp = strtok(cmdtext, idx);
  101. if(!strlen(tmp)) {
  102. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take flyinglicense [playerID/DeoImena]");
  103. return 1;
  104. }
  105. giveplayerid = ReturnUser(tmp);
  106. if(IsPlayerConnected(giveplayerid))
  107. {
  108. if(giveplayerid != INVALID_PLAYER_ID)
  109. {
  110. if (ProxDetectorS(8.0, playerid, giveplayerid))
  111. {
  112. new giveplayername[64];
  113.  
  114. GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  115. format(string, sizeof(string), "* Oduzeo si %s's dozvolu za letenje.", giveplayername);
  116. SendClientMessage(playerid, COLOR_WHITE, string);
  117. format(string, sizeof(string), "* Officer %s ti je uzeo dozvolu za letenje.", sendername);
  118. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  119. PlayerInfo[giveplayerid][pFlyLic] = 0;
  120. }
  121. else
  122. {
  123. SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
  124. return 1;
  125. }
  126. }
  127. }
  128. else
  129. {
  130. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
  131. return 1;
  132. }
  133. }
  134. else if(strcmp(x_nr,"boatlicense",true) == 0)
  135. {
  136. tmp = strtok(cmdtext, idx);
  137. if(!strlen(tmp)) {
  138. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take boatlicense [playerID/DeoImena]");
  139. return 1;
  140. }
  141. giveplayerid = ReturnUser(tmp);
  142. if(IsPlayerConnected(giveplayerid))
  143. {
  144. if(giveplayerid != INVALID_PLAYER_ID)
  145. {
  146. if (ProxDetectorS(8.0, playerid, giveplayerid))
  147. {
  148. new giveplayername[64];
  149.  
  150. GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  151. format(string, sizeof(string), "* Oduzeo si %s's dozvolu za voznju broda.", giveplayername);
  152. SendClientMessage(playerid, COLOR_WHITE, string);
  153. format(string, sizeof(string), "* Officer %s ti je uzeo dozvolu za voznju broda.", sendername);
  154. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  155. PlayerInfo[giveplayerid][pBoatLic] = 0;
  156. }
  157. else
  158. {
  159. SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
  160. return 1;
  161. }
  162. }
  163. }
  164. else
  165. {
  166. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
  167. return 1;
  168. }
  169. }
  170. else if(strcmp(x_nr,"weapons",true) == 0)
  171. {
  172. tmp = strtok(cmdtext, idx);
  173. if(!strlen(tmp)) {
  174. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take weapons [playerID/DeoImena]");
  175. return 1;
  176. }
  177. if(PlayerInfo[giveplayerid][pAdminDuty] >= 1) return SendClientMessage(playerid, COLOR_GREY, "* Nemozes uzeti oruzje igracu dok je AdminDuty!");
  178. giveplayerid = ReturnUser(tmp);
  179. if(IsPlayerConnected(giveplayerid))
  180. {
  181. if(giveplayerid != INVALID_PLAYER_ID)
  182. {
  183. if (ProxDetectorS(8.0, playerid, giveplayerid))
  184. {
  185. new giveplayername[64];
  186.  
  187. GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  188. format(string, sizeof(string), "* Oduzeo si %s's oruzje.", giveplayer);
  189. SendClientMessage(playerid, COLOR_WHITE, string);
  190. format(string, sizeof(string), "* Officer %s ti je uzeo oruzje.", sendername);
  191. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  192. SafeResetPlayerWeapons(giveplayerid);
  193. }
  194. else
  195. {
  196. SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
  197. return 1;
  198. }
  199. }
  200. }
  201. else
  202. {
  203. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
  204. return 1;
  205. }
  206. }
  207. else if(strcmp(x_nr,"drugs",true) == 0)
  208. {
  209. tmp = strtok(cmdtext, idx);
  210. if(!strlen(tmp)) {
  211. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take drugs [playerID/DeoImena]");
  212. return 1;
  213. }
  214. giveplayerid = ReturnUser(tmp);
  215. if(IsPlayerConnected(giveplayerid))
  216. {
  217. if(giveplayerid != INVALID_PLAYER_ID)
  218. {
  219. if (ProxDetectorS(8.0, playerid, giveplayerid))
  220. {
  221. new giveplayername[64];
  222.  
  223. GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  224. format(string, sizeof(string), "* Oduzeo si %s's Drogu.", giveplayer);
  225. SendClientMessage(playerid, COLOR_WHITE, string);
  226. format(string, sizeof(string), "* Officer %s ti je oduzeo Drogu.", sendername);
  227. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  228. PlayerInfo[giveplayerid][pDrugs] = 0;
  229. }
  230. else
  231. {
  232. SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
  233. return 1;
  234. }
  235. }
  236. }
  237. else
  238. {
  239. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
  240. return 1;
  241. }
  242. }
  243. else if(strcmp(x_nr,"materials",true) == 0)
  244. {
  245. tmp = strtok(cmdtext, idx);
  246. if(!strlen(tmp)) {
  247. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take materials [playerID/DeoImena]");
  248. return 1;
  249. }
  250. giveplayerid = ReturnUser(tmp);
  251. if(IsPlayerConnected(giveplayerid))
  252. {
  253. if(giveplayerid != INVALID_PLAYER_ID)
  254. {
  255. if (ProxDetectorS(8.0, playerid, giveplayerid))
  256. {
  257. new giveplayername[64];
  258.  
  259. GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  260. format(string, sizeof(string), "* Oduzeo si %s's Materijale.", giveplayer);
  261. SendClientMessage(playerid, COLOR_WHITE, string);
  262. format(string, sizeof(string), "* Officer %s ti je oduzeo Materijale.", sendername);
  263. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  264. PlayerInfo[giveplayerid][pMats] = 0;
  265. }
  266. else
  267. {
  268. SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
  269. return 1;
  270. }
  271. }
  272. }
  273. else
  274. {
  275. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
  276. return 1;
  277. }
  278. }
  279. else
  280. {
  281. SendClientMessage(playerid, COLOR_GREY, " Pogresna funkcija !");
  282. return 1;
  283. }
  284. }
  285. else
  286. {
  287. SendClientMessage(playerid, COLOR_GREY, " Nisi policajac !");
  288. return 1;
  289. }
  290. }
  291.  
  292. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  293. new y, m, d;
  294. new h,mi,s;
  295. getdate(y,m,d);
  296. gettime(h,mi,s);
  297. format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /take %s %s ",d,m,y,h,mi,s,sendername, strtok(cmdtext, idx), giveplayer);
  298. CommandLog(string);
  299. return 1;
  300. }
  301.  
  302. if(strcmp(cmd, "/atake", true) == 0)
  303. {
  304. if(IsPlayerConnected(playerid))
  305. {
  306. if(PlayerInfo[playerid][pAdmin] >= 5)
  307. {
  308. new x_nr[24];
  309. x_nr = strtok(cmdtext, idx);
  310. if(!strlen(x_nr)) {
  311. SendClientMessage(playerid, COLOR_WHITE, "|___________________ Take Items ____________________|");
  312. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake [Item] [playerID/DeoImena]");
  313. SendClientMessage(playerid, COLOR_GREY, "Available names: Driverslicense, Flyinglicense, Boatlicense, Weapons, Drugs, Materials, Passport, CopLicense");
  314. SendClientMessage(playerid, COLOR_WHITE, "|___________________________________________________|");
  315. return 1;
  316. }
  317. if(strcmp(x_nr,"coplicense",true) == 0)
  318. {
  319. tmp = strtok(cmdtext, idx);
  320. if(!strlen(tmp))
  321. {
  322. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake coplicense [playerID/DeoImena]");
  323. return 1;
  324. }
  325. giveplayerid = ReturnUser(tmp);
  326. if(IsPlayerConnected(giveplayerid))
  327. {
  328. if(giveplayerid != INVALID_PLAYER_ID)
  329. {
  330. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  331. format(string, sizeof(string), "* Oduzeo si %s's Officer License.", giveplayer);
  332. SendClientMessage(playerid, COLOR_WHITE, string);
  333. format(string, sizeof(string), "* Administrator %s ti je oduzeo Officer License.", sendername);
  334. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  335. PlayerInfo[giveplayerid][pCopLic] = 0;
  336. }
  337. }
  338. else
  339. {
  340. SendClientMessage(playerid, COLOR_GREY, "* Igrac nije na serveru !");
  341. return 1;
  342. }
  343. }
  344. if(strcmp(x_nr,"driverslicense",true) == 0)
  345. {
  346. tmp = strtok(cmdtext, idx);
  347. if(!strlen(tmp))
  348. {
  349. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake driverslicense [playerID/DeoImena]");
  350. return 1;
  351. }
  352. giveplayerid = ReturnUser(tmp);
  353. if(IsPlayerConnected(giveplayerid))
  354. {
  355. if(giveplayerid != INVALID_PLAYER_ID)
  356. {
  357. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  358. format(string, sizeof(string), "* Oduzeo si %s's dozvolu za voznju kola.", giveplayer);
  359. SendClientMessage(playerid, COLOR_WHITE, string);
  360. format(string, sizeof(string), "* Administrator %s ti je oduzeo dozvolu za voznju kola.", sendername);
  361. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  362. PlayerInfo[giveplayerid][pCarLic] = 0;
  363. }
  364. }
  365. else
  366. {
  367. SendClientMessage(playerid, COLOR_GREY, "* Igrac nije na serveru !");
  368. return 1;
  369. }
  370. }
  371. else if(strcmp(x_nr,"flyinglicense",true) == 0)
  372. {
  373. tmp = strtok(cmdtext, idx);
  374. if(!strlen(tmp))
  375. {
  376. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake flyinglicense [playerID/DeoImena]");
  377. return 1;
  378. }
  379. giveplayerid = ReturnUser(tmp);
  380. if(IsPlayerConnected(giveplayerid))
  381. {
  382. if(giveplayerid != INVALID_PLAYER_ID)
  383. {
  384. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  385. format(string, sizeof(string), "* Oduzeo si %s's dozvolu za letenje.", giveplayer);
  386. SendClientMessage(playerid, COLOR_WHITE, string);
  387. format(string, sizeof(string), "* Administrator %s ti je oduzeo dozvolu za letenje.", sendername);
  388. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  389. PlayerInfo[giveplayerid][pFlyLic] = 0;
  390. }
  391. }
  392. else
  393. {
  394. SendClientMessage(playerid, COLOR_GREY, "* Igrac nije na serveru !");
  395. return 1;
  396. }
  397. }
  398. else if(strcmp(x_nr,"boatlicense",true) == 0)
  399. {
  400. tmp = strtok(cmdtext, idx);
  401. if(!strlen(tmp))
  402. {
  403. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake boatlicense [playerID/DeoImena]");
  404. return 1;
  405. }
  406. giveplayerid = ReturnUser(tmp);
  407. if(IsPlayerConnected(giveplayerid))
  408. {
  409. if(giveplayerid != INVALID_PLAYER_ID)
  410. {
  411. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  412. format(string, sizeof(string), "* Oduzeo si %s's dozvolu za plovidbu.", giveplayer);
  413. SendClientMessage(playerid, COLOR_WHITE, string);
  414. format(string, sizeof(string), "* Administrator %s ti je oduzeo dozvolu za plovidbu.", sendername);
  415. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  416. PlayerInfo[giveplayerid][pBoatLic] = 0;
  417. }
  418. }
  419. else
  420. {
  421. SendClientMessage(playerid, COLOR_GREY, "* Igrac nije na serveru !");
  422. return 1;
  423. }
  424. }
  425. else if(strcmp(x_nr,"weapons",true) == 0)
  426. {
  427. tmp = strtok(cmdtext, idx);
  428. if(!strlen(tmp))
  429. {
  430. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake weapons [playerID/DeoImena]");
  431. return 1;
  432. }
  433. giveplayerid = ReturnUser(tmp);
  434. if(IsPlayerConnected(giveplayerid))
  435. {
  436. if(giveplayerid != INVALID_PLAYER_ID)
  437. {
  438. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  439. format(string, sizeof(string), "* Oduzeo si %s's Oruzje.", giveplayer);
  440. SendClientMessage(playerid, COLOR_WHITE, string);
  441. format(string, sizeof(string), "* Administrator %s ti je oduzeo oruzje.", sendername);
  442. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  443. SafeResetPlayerWeapons(giveplayerid);
  444. }
  445. }
  446. else
  447. {
  448. SendClientMessage(playerid, COLOR_GREY, "* Igrac nije na serveru !");
  449. return 1;
  450. }
  451. }
  452. else if(strcmp(x_nr,"passport",true) == 0)
  453. {
  454. tmp = strtok(cmdtext, idx);
  455. if(!strlen(tmp))
  456. {
  457. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake passport [playerID/DeoImena]");
  458. return 1;
  459. }
  460. giveplayerid = ReturnUser(tmp);
  461. if(IsPlayerConnected(giveplayerid))
  462. {
  463. if(giveplayerid != INVALID_PLAYER_ID)
  464. {
  465. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  466. format(string, sizeof(string), "* Oduzeo si %s's pasos.", giveplayer);
  467. SendClientMessage(playerid, COLOR_WHITE, string);
  468. format(string, sizeof(string), "* Administrator %s ti je oduzeo pasos.", sendername);
  469. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  470. PlayerInfo[giveplayerid][pPassport] = 0;
  471. }
  472. }
  473. else
  474. {
  475. SendClientMessage(playerid, COLOR_GREY, "* Igrac nije na serveru !");
  476. return 1;
  477. }
  478. }
  479. }
  480. else
  481. {
  482. SendClientMessage(playerid, COLOR_GREY, "* Nisi ovlascen za ovo!");
  483. return 1;
  484. }
  485. }
  486. return 1;
  487. }
  488.  
  489.  
  490. if(strcmp(cmd, "/drink", true) == 0)
  491. {
  492. if(IsPlayerConnected(playerid))
  493. {
  494. if(IsAtBar(playerid))
  495. {
  496. if(GetPlayerDrunkLevel(playerid) <= 20000)
  497. {
  498. new Float:health;
  499. new x_nr[24];
  500. x_nr = strtok(cmdtext, idx);
  501. if(!strlen(x_nr)) {
  502. SendClientMessage(playerid, COLOR_WHITE, "|____________________ Bar Drinks ______________________|");
  503. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /drink [drinkname]");
  504. SendClientMessage(playerid, COLOR_GREY, "Non-Alcoholic: Water ($1), Sprunk($2)");
  505. SendClientMessage(playerid, COLOR_GREY, "Cheap Booze: Pissh ($6), Bourbon($8), Champagne($12)");
  506. SendClientMessage(playerid, COLOR_GREY, "Expensive Drinks: Vodka ($16), Cristal($20)");
  507. SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Warning! Excessive Drinking Causes Liver Damage");
  508. SendClientMessage(playerid, COLOR_WHITE, "|______________________________________________________|");
  509. return 1;
  510. }
  511. if(strcmp(x_nr,"pissh",true) == 0)
  512. {
  513. if(PlayerInfo[playerid][pAge] < 16)
  514. {
  515. SendClientMessage(playerid, COLOR_WHITE, "Konobar: Moras biti stariji od 16 godina.");
  516. return 1;
  517. }
  518. SafeGivePlayerMoney(playerid, - 6);
  519. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  520. GetPlayerHealth(playerid, health);
  521. if(health < 100)
  522. {
  523. if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 10; SetPlayerHealth(playerid, health + hp); }
  524. else { SetPlayerHealth(playerid, health + 10.0); }
  525. }
  526. }
  527. else if(strcmp(x_nr,"bourbon",true) == 0)
  528. {
  529. if(PlayerInfo[playerid][pAge] < 18)
  530. {
  531. SendClientMessage(playerid, COLOR_WHITE, "Konobar: Moras biti srariji od 18 godina.");
  532. return 1;
  533. }
  534. SafeGivePlayerMoney(playerid, - 8);
  535. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  536. GetPlayerHealth(playerid, health);
  537. if(health < 100)
  538. {
  539. if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 15; SetPlayerHealth(playerid, health + hp); }
  540. else { SetPlayerHealth(playerid, health + 15.0); }
  541. }
  542. }
  543. else if(strcmp(x_nr,"champagne",true) == 0)
  544. {
  545. if(PlayerInfo[playerid][pAge] < 18)
  546. {
  547. SendClientMessage(playerid, COLOR_WHITE, "Konobar: Moras biti srariji od 18 godina.");
  548. return 1;
  549. }
  550. SafeGivePlayerMoney(playerid, - 12);
  551. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  552. GetPlayerHealth(playerid, health);
  553. if(health < 100)
  554. {
  555. if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 20; SetPlayerHealth(playerid, health + hp); }
  556. else { SetPlayerHealth(playerid, health + 20.0); }
  557. }
  558. }
  559. else if(strcmp(x_nr,"vodka",true) == 0)
  560. {
  561. if(PlayerInfo[playerid][pAge] < 18)
  562. {
  563. SendClientMessage(playerid, COLOR_WHITE, "Konobar: Moras biti srariji od 18 godina.");
  564. return 1;
  565. }
  566. SafeGivePlayerMoney(playerid, - 16);
  567. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  568. GetPlayerHealth(playerid, health);
  569. if(health < 100)
  570. {
  571. if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 27; SetPlayerHealth(playerid, health + hp); }
  572. else { SetPlayerHealth(playerid, health + 27.0); }
  573. }
  574. }
  575. else if(strcmp(x_nr,"cristal",true) == 0)
  576. {
  577. if(PlayerInfo[playerid][pAge] < 18)
  578. {
  579. SendClientMessage(playerid, COLOR_WHITE, "Konobar: Moras biti srariji od 18 godina.");
  580. return 1;
  581. }
  582. SafeGivePlayerMoney(playerid, - 20);
  583. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  584. GetPlayerHealth(playerid, health);
  585. if(health < 100)
  586. {
  587. if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 40; SetPlayerHealth(playerid, health + hp); }
  588. else { SetPlayerHealth(playerid, health + 40.0); }
  589. }
  590. }
  591. else if(strcmp(x_nr,"water",true) == 0)
  592. {
  593. SafeGivePlayerMoney(playerid, - 1);
  594. GetPlayerHealth(playerid, health);
  595. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  596. SetPlayerDrunkLevel(playerid, -1000)
  597. if(health < 100)
  598. {
  599. if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
  600. else { SetPlayerHealth(playerid, health + 50.0); }
  601. }
  602. else if(health > 100)
  603. {
  604. SetPlayerHealth(playerid, 100);
  605. }
  606. }
  607. else if(strcmp(x_nr,"sprunk",true) == 0)
  608. {
  609. SafeGivePlayerMoney(playerid, - 2);
  610. GetPlayerHealth(playerid, health);
  611. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  612. SetPlayerDrunkLevel(playerid, -1000)
  613. if(health < 100)
  614. {
  615. if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
  616. else { SetPlayerHealth(playerid, health + 50.0); }
  617. }
  618. else if(health > 100)
  619. {
  620. SetPlayerHealth(playerid, 100);
  621. }
  622. }
  623. else
  624. {
  625. SendClientMessage(playerid, COLOR_WHITE, "Konobar: Nikad cuo za to pice.");
  626. return 1;
  627. }
  628. GetPlayerHealth(playerid, health);
  629. if (health > 100) SetPlayerHealth(playerid, 100);
  630.  
  631. format(string, sizeof(string), "* %s drinks some %s from the bottle.", sendername ,x_nr);
  632. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  633. }
  634. else
  635. {
  636. SendClientMessage(playerid, COLOR_GREY, " Nemozes da pijes vise, vec si se napio!");
  637. return 1;
  638. }
  639. }
  640. else if(IsPlayerInRangeOfPoint(playerid, 5, 1255.9084,-791.8105,1085.3828))
  641. {
  642. if(PlayerDrunk[playerid] < 10)
  643. {
  644. new Float:health;
  645. new x_nr[24];
  646. x_nr = strtok(cmdtext, idx);
  647. if(!strlen(x_nr)) {
  648. SendClientMessage(playerid, COLOR_WHITE, "|____________________ Bar Drinks ______________________|");
  649. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /drink [drinkname]");
  650. SendClientMessage(playerid, COLOR_GREY, "Coffee: Cappuccino ($4), Latte($5), Macchiato($5)");
  651. SendClientMessage(playerid, COLOR_GREY, "Mixes/liqueur: Limoncello($8), Amaretto($7), Martini($12)");
  652. SendClientMessage(playerid, COLOR_GREY, "Wine: Merlot ($15), Sangiovese($18), Frizzante($16)");
  653. SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Warning! Excessive Drinking Causes Liver Damage");
  654. SendClientMessage(playerid, COLOR_WHITE, "|______________________________________________________|");
  655. return 1;
  656. }
  657. else if(strcmp(x_nr,"cappuccino",true) == 0)
  658. {
  659. GetPlayerHealth(playerid, health);
  660. if(health < 100)
  661. {
  662. SafeGivePlayerMoney(playerid, - 4);
  663. SetPlayerHealth(playerid, health + 30);
  664. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  665.  
  666. format(string, sizeof(string), "* %s pije Capucino.", sendername);
  667. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  668. }
  669. }
  670. else if(strcmp(x_nr,"latte",true) == 0)
  671. {
  672. SafeGivePlayerMoney(playerid, - 5);
  673. SetPlayerHealth(playerid, health + 30);
  674. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  675.  
  676. format(string, sizeof(string), "* %s pije Caffe Latte.", sendername);
  677. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  678. }
  679. else if(strcmp(x_nr,"macchiato",true) == 0)
  680. {
  681. SafeGivePlayerMoney(playerid, - 5);
  682. SetPlayerHealth(playerid, health + 30);
  683. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  684.  
  685. format(string, sizeof(string), "* %s pije Caffe Macchiato.", sendername);
  686. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  687. }
  688. else if(strcmp(x_nr,"limoncello",true) == 0)
  689. {
  690. SafeGivePlayerMoney(playerid, - 8);
  691. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  692. if(GetPlayerHealth(playerid, health) < 100)
  693. {
  694. if(PlayerInfo[playerid][pAlcoholPerk] > 0)
  695. {
  696. PlayerDrunk[playerid] += 1;
  697. new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
  698. hp += 30;
  699. SetPlayerHealth(playerid, health + hp);
  700. format(string, sizeof(string), "* %s pije Limoncello.", sendername);
  701. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  702. }
  703. else
  704. {
  705. SetPlayerHealth(playerid, health + 30.0);
  706. format(string, sizeof(string), "* %s pije Limoncello.", sendername);
  707. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  708. }
  709. }
  710. }
  711. else if(strcmp(x_nr,"amaretto",true) == 0)
  712. {
  713. SafeGivePlayerMoney(playerid, - 7);
  714. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  715. if(GetPlayerHealth(playerid, health) < 100)
  716. {
  717. if(PlayerInfo[playerid][pAlcoholPerk] > 0)
  718. {
  719. PlayerDrunk[playerid] += 1;
  720. new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
  721. hp += 30;
  722. SetPlayerHealth(playerid, health + hp);
  723. format(string, sizeof(string), "* %s pije Amaretto", sendername);
  724. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  725. }
  726. else
  727. {
  728. SetPlayerHealth(playerid, health + 30.0);
  729. format(string, sizeof(string), "* %s pije Amaretto.", sendername);
  730. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  731. }
  732. }
  733. }
  734. else if(strcmp(x_nr,"martini",true) == 0)
  735. {
  736. SafeGivePlayerMoney(playerid, - 12);
  737. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  738. if(GetPlayerHealth(playerid, health) < 100)
  739. {
  740. if(PlayerInfo[playerid][pAlcoholPerk] > 0)
  741. {
  742. PlayerDrunk[playerid] += 1;
  743. new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
  744. hp += 30;
  745. SetPlayerHealth(playerid, health + hp);
  746. format(string, sizeof(string), "* %s pije Martini.", sendername);
  747. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  748. }
  749. else
  750. {
  751. SetPlayerHealth(playerid, health + 30.0);
  752. format(string, sizeof(string), "* %s pije Martini.", sendername);
  753. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  754. }
  755. }
  756. }
  757. else if(strcmp(x_nr,"merlot",true) == 0)
  758. {
  759. SafeGivePlayerMoney(playerid, - 15);
  760. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  761. if(GetPlayerHealth(playerid, health) < 100)
  762. {
  763. if(PlayerInfo[playerid][pAlcoholPerk] > 0)
  764. {
  765. PlayerDrunk[playerid] += 1;
  766. new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
  767. hp += 30;
  768. SetPlayerHealth(playerid, health + hp);
  769. format(string, sizeof(string), "* %s pije crveno vino (Merlot).", sendername);
  770. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  771. }
  772. else
  773. {
  774. SetPlayerHealth(playerid, health + 30.0);
  775. format(string, sizeof(string), "* %s pije crveno vino (Merlot).", sendername);
  776. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  777. }
  778. }
  779. }
  780. else if(strcmp(x_nr,"sangiovese",true) == 0)
  781. {
  782. SafeGivePlayerMoney(playerid, - 18);
  783. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  784. if(GetPlayerHealth(playerid, health) < 100)
  785. {
  786. if(PlayerInfo[playerid][pAlcoholPerk] > 0)
  787. {
  788. PlayerDrunk[playerid] += 1;
  789. new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
  790. hp += 30;
  791. SetPlayerHealth(playerid, health + hp);
  792. format(string, sizeof(string), "* %s pije crveno vino (Sangiovese).", sendername);
  793. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  794. }
  795. else
  796. {
  797. SetPlayerHealth(playerid, health + 30.0);
  798. format(string, sizeof(string), "* %s pije crveno vino (Sangiovese).", sendername);
  799. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  800. }
  801. }
  802. }
  803. else if(strcmp(x_nr,"frizzante",true) == 0)
  804. {
  805. SafeGivePlayerMoney(playerid, - 16);
  806. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  807. if(GetPlayerHealth(playerid, health) < 100)
  808. {
  809. if(PlayerInfo[playerid][pAlcoholPerk] > 0)
  810. {
  811. PlayerDrunk[playerid] += 1;
  812. new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
  813. hp += 30;
  814. SetPlayerHealth(playerid, health + hp);
  815. format(string, sizeof(string), "* %s pije belo vino (Frizzante).", sendername);
  816. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  817. }
  818. else
  819. {
  820. SetPlayerHealth(playerid, health + 30.0);
  821. format(string, sizeof(string), "* %s pije belo vino (Frizzante).", sendername);
  822. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  823. }
  824. }
  825. }
  826. GetPlayerHealth(playerid, health);
  827. if (health > 100) SetPlayerHealth(playerid, 100);
  828. }
  829. }
  830. else
  831. {
  832. SendClientMessage(playerid, COLOR_GREY, " Nisi u baru!");
  833. return 1;
  834. }
  835. }
  836.  
  837. new y, m, d;
  838. new h,mi,s;
  839. getdate(y,m,d);
  840. gettime(h,mi,s);
  841. format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /drink %s",d,m,y,h,mi,s,sendername, strtok(cmdtext, idx));
  842. CommandLog(string);
  843. return 1;
  844. }
  845. if(strcmp(cmd,"/showmenu",true)==0)
  846. {
  847. if(IsPlayerConnected(playerid))
  848. {
  849. if(PlayerInfo[playerid][pJob] != 6)
  850. {
  851. SendClientMessage(playerid, COLOR_GREY, " Nisi konobar!");
  852. return 1;
  853. }
  854. tmp = strtok(cmdtext, idx);
  855. if(!strlen(tmp))
  856. {
  857. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /showmenu [playerID/DeoImena]");
  858. return 1;
  859. }
  860. giveplayerid = ReturnUser(tmp);
  861. if(IsPlayerConnected(giveplayerid))
  862. {
  863. if(giveplayerid != INVALID_PLAYER_ID)
  864. {
  865. if (ProxDetectorS(4.0, playerid, giveplayerid))
  866. {
  867. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  868.  
  869.  
  870. format(string, sizeof(string), "* %s daje %d meni.", sendername, giveplayerid);
  871. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  872. ProxDetector(8.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  873. LoopingAnim(playerid,"BAR","Barserve_give",4.1,0,1,1,1,1);
  874. SendClientMessage(giveplayerid, COLOR_RED, "|____________________ Food Menu _____________________|");
  875. SendClientMessage(giveplayerid, COLOR_WHITE, " --- Today's Selections --- ");
  876. SendClientMessage(giveplayerid, COLOR_WHITE, " Naan Bread ($75) Salad ($85) ");
  877. SendClientMessage(giveplayerid, COLOR_WHITE, " Chicken Korma ($200) Spaghetti Bolognese ($250) ");
  878. SendClientMessage(giveplayerid, COLOR_WHITE, " Rice Pudding ($300) Chocolate Gateau ($425) ");
  879. SendClientMessage(giveplayerid, COLOR_RED, " Koriscenje: /ordermeal ");
  880. SendClientMessage(giveplayerid, COLOR_RED, "|____________________________________________________|");
  881. SendClientMessage(giveplayerid, COLOR_GREY, string);
  882. format(string, sizeof(string), "* %s has shown the menu to you.", sendername);
  883. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  884. }
  885. else
  886. {
  887. SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas!");
  888. return 1;
  889. }
  890. }
  891. }
  892. else
  893. {
  894. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru!");
  895. return 1;
  896. }
  897. }
  898. return 1;
  899. }
  900. if(strcmp(cmd, "/cookuniform", true) == 0)
  901. {
  902. if(IsPlayerConnected(playerid))
  903. {
  904. if(PlayerInfo[playerid][pJob] != 6)
  905. {
  906. SendClientMessage(playerid, COLOR_GRAD2, "Nisi Konobar!");
  907. return 1;
  908. }
  909. {
  910. new x_nr[24];
  911. x_nr = strtok(cmdtext, idx);
  912. if(!strlen(x_nr))
  913. {
  914. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /cookuniform [skin id]");
  915. return 1;
  916. }
  917. if (IsPlayerInRangeOfPoint(playerid, 3,-792.9693,500.5572,1367.3672) || IsPlayerInRangeOfPoint(playerid, 3,-779.3134,497.8989,1371.7490) || PlayerInfo[playerid][pLocal] != 255)
  918. {
  919. if(strcmp(x_nr,"list",true) == 0)
  920. {
  921. SendClientMessage(playerid, COLOR_YELLOW, "|_________Waiter Uniforms_________|");
  922. SendClientMessage(playerid, COLOR_GRAD1, "1: Black Cook 2: White Cook");
  923. SendClientMessage(playerid, COLOR_YELLOW, "|_________Waiter Uniforms_________|");
  924. return 1;
  925. }
  926. else if(strcmp(x_nr,"1",true) == 0)
  927. {
  928. SetPlayerSkin(playerid, 168);
  929. SendClientMessage(playerid, COLOR_GRAD2, "Sada si crni sef.");
  930. return 1;
  931. }
  932. else if(strcmp(x_nr,"2",true) == 0)
  933. {
  934. SetPlayerSkin(playerid, 209);
  935. SendClientMessage(playerid, COLOR_GRAD2, "Sada si Stuff member.");
  936. return 1;
  937. }
  938. }
  939. else
  940. {
  941. SendClientMessage(playerid, COLOR_GRAD2, "Nije kod sporeta.");
  942. return 1;
  943. }
  944. }
  945. }
  946. return 1;
  947. }
  948. if(strcmp(cmd, "/ordermeal", true) == 0)
  949. {
  950. if(IsPlayerConnected(playerid))
  951. {
  952. new x_nr[24];
  953. x_nr = strtok(cmdtext, idx);
  954. if(!strlen(x_nr)) {
  955. SendClientMessage(playerid, COLOR_WHITE, "|__________________ Food Menu __________________|");
  956. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /ordermeal [food]");
  957. SendClientMessage(playerid, COLOR_GREY, "Starters: NaanBread, Salad");
  958. SendClientMessage(playerid, COLOR_GREY, "Main Courses: SpagBol, ChickenKorma");
  959. SendClientMessage(playerid, COLOR_GREY, "Desserts: Chocolate Gateau, RicePudding ");
  960. SendClientMessage(playerid, COLOR_WHITE, "|________________________________________________|");
  961. return 1;
  962. }
  963. if(strcmp(x_nr,"naanbread",true) == 0)
  964. {
  965.  
  966. format(string, sizeof(string), "** %s pravi hleb.", sendername);
  967. SendJobMessage(18, TEAM_AZTECAS_COLOR, string);
  968. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Napravili ste hleb.");
  969. return 1;
  970. }
  971. else if(strcmp(x_nr,"salad",true) == 0)
  972. {
  973.  
  974. format(string, sizeof(string), "** %s pravi salatu.", sendername);
  975. SendJobMessage(18, TEAM_AZTECAS_COLOR, string);
  976. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Napravili ste salatu.");
  977. return 1;
  978. }
  979. else if(strcmp(x_nr,"spagbol",true) == 0)
  980. {
  981.  
  982. format(string, sizeof(string), "** %s pravi spagene.", sendername);
  983. SendJobMessage(18, TEAM_AZTECAS_COLOR, string);
  984. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Napravili ste spagete.");
  985. return 1;
  986. }
  987. else if(strcmp(x_nr,"chickenkorma",true) == 0)
  988. {
  989.  
  990. format(string, sizeof(string), "** %s pravi piletinu.", sendername);
  991. SendJobMessage(18, TEAM_AZTECAS_COLOR, string);
  992. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Napravili ste piletinu.");
  993. return 1;
  994. }
  995. else if(strcmp(x_nr,"chocolategateau",true) == 0)
  996. {
  997.  
  998. format(string, sizeof(string), "** %s pravi cokoladu.", sendername);
  999. SendJobMessage(18, TEAM_AZTECAS_COLOR, string);
  1000. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Napravili ste cokoladu.");
  1001. return 1;
  1002. }
  1003. else if(strcmp(x_nr,"ricepudding",true) == 0)
  1004. {
  1005.  
  1006. format(string, sizeof(string), "** %s pravi rizu.", sendername);
  1007. SendJobMessage(18, TEAM_AZTECAS_COLOR, string);
  1008. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Napravili ste rizu.");
  1009. return 1;
  1010. }
  1011. else
  1012. {
  1013. SendClientMessage(playerid, COLOR_GREY, " Nemojte to serviratu tu!");
  1014. return 1;
  1015. }
  1016. }
  1017. return 1;
  1018. }
  1019. if(strcmp(cmd, "/setchamp", true) == 0)
  1020. {
  1021. if(IsPlayerConnected(playerid))
  1022. {
  1023. if(PlayerInfo[playerid][pAdmin] >= 4)
  1024. {
  1025. tmp = strtok(cmdtext, idx);
  1026. if(!strlen(tmp))
  1027. {
  1028. SendClientMessage(playerid, COLOR_GRAD1, "Koriscenje: /setchamp [playerID/DeoImena]");
  1029. return 1;
  1030. }
  1031. //giveplayerid = strval(tmp);
  1032. giveplayerid = ReturnUser(tmp);
  1033. if(IsPlayerConnected(giveplayerid))
  1034. {
  1035. if(giveplayerid != INVALID_PLAYER_ID)
  1036. {
  1037. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  1038.  
  1039. new nstring[MAX_PLAYER_NAME];
  1040. format(nstring, sizeof(nstring), "%s", giveplayer);
  1041. strmid(Titel[TitelName], nstring, 0, strlen(nstring), 255);
  1042. Titel[TitelWins] = PlayerInfo[giveplayerid][pWins];
  1043. Titel[TitelLoses] = PlayerInfo[giveplayerid][pLoses];
  1044. SaveBoxer();
  1045. format(string, sizeof(string), "* Postavio si %s kao novog Boxing Sampiona.", giveplayer);
  1046. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  1047. format(string, sizeof(string), "* %s ti je dao sampiona u boxu!", sendername);
  1048. SendClientMessage(giveplayerid,TEAM_GROVE_COLOR,string);
  1049. format(string, sizeof(string), "[ADMIN]: %s je dao Boxing Titulu %s.", sendername, giveplayer);
  1050. ABroadCast(COLOR_LIGHTRED,string, 5);
  1051. new y, m, d;
  1052. new h,mi,s;
  1053. getdate(y,m,d);
  1054. gettime(h,mi,s);
  1055. format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Gave Boxing Champion Title to %s",d,m,y,h,mi,s,sendername,giveplayer);
  1056. GiveLog(string);
  1057. }
  1058. }
  1059. else
  1060. {
  1061. SendClientMessage(playerid, COLOR_GREY, "** Igrac nije na serveru !");
  1062. return 1;
  1063. }
  1064. }
  1065. else
  1066. {
  1067. SendClientMessage(playerid, COLOR_GRAD1, "** Niste ovlasceni da koristite tu komandu!");
  1068. }
  1069. }
  1070. return 1;
  1071. }
  1072. if(strcmp(cmd, "/boxstats", true) == 0)
  1073. {
  1074. if(IsPlayerConnected(playerid))
  1075. {
  1076. if(PlayerInfo[playerid][pJob] != 12)
  1077. {
  1078. SendClientMessage(playerid, COLOR_GREY, " Nisi Boxer !");
  1079. return 1;
  1080. }
  1081. new ttext[20];//Title
  1082. new clevel = PlayerInfo[playerid][pBoxSkill];
  1083. if(clevel >= 0 && clevel <= 50) { ttext = "Beginner"; }
  1084. else if(clevel >= 51 && clevel <= 200) { ttext = "Amateur"; }
  1085. else if(clevel >= 201 && clevel <= 400) { ttext = "Professional"; }
  1086. new ntext[20];//NickName
  1087. new level = PlayerInfo[playerid][pWins];
  1088. if(level > 0 && PlayerInfo[playerid][pLoses] == 0)
  1089. {
  1090. ntext = "Undefeated";
  1091. }
  1092. else
  1093. {
  1094. if(level >= 0 && level <= 10) { ntext = "Newcomer"; }
  1095. else if(level >= 11 && level <= 20) { ntext = "Touchy Fist"; }
  1096. else if(level >= 21 && level <= 30) { ntext = "Nut Cracker"; }
  1097. else if(level >= 31 && level <= 40) { ntext = "Tommygun"; }
  1098. else if(level >= 41 && level <= 50) { ntext = "Skull Breaker"; }
  1099. else if(level >= 51 && level <= 60) { ntext = "Light Speed"; }
  1100. else if(level >= 61 && level <= 70) { ntext = "Unbroken Warrior"; }
  1101. else if(level >= 71) { ntext = "Itallion Stallion"; }
  1102. }
  1103. SendClientMessage(playerid, COLOR_WHITE, "|__________________ Boxing Records __________________|");
  1104. format(string, sizeof(string), "| Current Champion: %s, with [%d] Winnings and [%d] Losses.", Titel[TitelName],Titel[TitelWins],Titel[TitelLoses]);
  1105. SendClientMessage(playerid, COLOR_GREY, string);
  1106. format(string, sizeof(string), "| Current Title: %s.", ttext);
  1107. SendClientMessage(playerid, COLOR_GREY, string);
  1108. format(string, sizeof(string), "| Current NickName: %s.", ntext);
  1109. SendClientMessage(playerid, COLOR_GREY, string);
  1110. format(string, sizeof(string), "| Total Wins: %d.", PlayerInfo[playerid][pWins]);
  1111. SendClientMessage(playerid, COLOR_GREY, string);
  1112. format(string, sizeof(string), "| Total Losses: %d.", PlayerInfo[playerid][pLoses]);
  1113. SendClientMessage(playerid, COLOR_GREY, string);
  1114. SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________________|");
  1115. }
  1116. return 1;
  1117. }
  1118. if(strcmp(cmd, "/fight", true) == 0)
  1119. {
  1120. if(IsPlayerConnected(playerid))
  1121. {
  1122. if(PlayerInfo[playerid][pJob] != 12)
  1123. {
  1124. SendClientMessage(playerid, COLOR_GREY, " Nisi boxer !");
  1125. return 1;
  1126. }
  1127. if(InRing > 0)
  1128. {
  1129. SendClientMessage(playerid, COLOR_GREY, " Igrac se vec tuce sa nekim !");
  1130. return 1;
  1131. }
  1132. if(PlayerBoxing[playerid] > 0)
  1133. {
  1134. SendClientMessage(playerid, COLOR_GREY, " Vec se tuces !");
  1135. return 1;
  1136. }
  1137. if(!IsPlayerInRangeOfPoint(playerid, 20,765.9343,0.2761,1000.7173))
  1138. {
  1139. SendClientMessage(playerid, COLOR_GREY, " Nisi u teretani !");
  1140. return 1;
  1141. }
  1142. tmp = strtok(cmdtext, idx);
  1143. if(!strlen(tmp)) {
  1144. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /fight [playerID/DeoImena]");
  1145. return 1;
  1146. }
  1147. giveplayerid = ReturnUser(tmp);
  1148. if(IsPlayerConnected(giveplayerid))
  1149. {
  1150. if(giveplayerid != INVALID_PLAYER_ID)
  1151. {
  1152. if (ProxDetectorS(8.0, playerid, giveplayerid))
  1153. {
  1154. if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Nemozes se tuci sam sa sobom!"); return 1; }
  1155. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  1156.  
  1157. format(string, sizeof(string), "* Ponudio si mec %su.", giveplayer);
  1158. SendClientMessage(playerid, COLOR_WHITE, string);
  1159. format(string, sizeof(string), "* Boxer %s zeli da te bije (Kucajte /accept boxing) da prihvatis tucu.", sendername);
  1160. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  1161. BoxOffer[giveplayerid] = playerid;
  1162. }
  1163. else
  1164. {
  1165. SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
  1166. return 1;
  1167. }
  1168. }
  1169. }
  1170. else
  1171. {
  1172. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
  1173. return 1;
  1174. }
  1175. }
  1176. return 1;
  1177. }
  1178. if(strcmp(cmd, "/music", true) == 0)
  1179. {
  1180. if(IsPlayerConnected(playerid))
  1181. {
  1182. if(PlayerInfo[playerid][pCD])
  1183. {
  1184. new x_nr[24];
  1185. x_nr = strtok(cmdtext, idx);
  1186. if(!strlen(x_nr)) {
  1187. SendClientMessage(playerid, COLOR_WHITE, "|__________________ Music __________________|");
  1188. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /music [name]");
  1189. SendClientMessage(playerid, COLOR_GREY, "Available names: On, Off, Next");
  1190. SendClientMessage(playerid, COLOR_WHITE, "|___________________________________________|");
  1191. return 1;
  1192. }
  1193. if(strcmp(x_nr,"on",true) == 0)
  1194. {
  1195. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~CD Player On", 5000, 5);
  1196. new channel = Music[playerid];
  1197. PlayerPlaySound(playerid, Songs[channel][0], 0.0, 0.0, 0.0);
  1198. }
  1199. else if(strcmp(x_nr,"off",true) == 0)
  1200. {
  1201. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~CD Player Off", 5000, 5);
  1202. PlayerFixRadio(playerid);
  1203. }
  1204. else if(strcmp(x_nr,"next",true) == 0)
  1205. {
  1206. if(Music[playerid] == 0) { Music[playerid] = 1; }
  1207. else if(Music[playerid] == 1) { Music[playerid] = 2; }
  1208. else if(Music[playerid] == 2) { Music[playerid] = 3; }
  1209. else if(Music[playerid] == 3) { Music[playerid] = 4; }
  1210. else if(Music[playerid] == 4) { Music[playerid] = 5; }
  1211. else if(Music[playerid] == 5) { Music[playerid] = 6; }
  1212. else if(Music[playerid] == 6) { Music[playerid] = 0; }
  1213. new channel = Music[playerid];
  1214. PlayerPlaySound(playerid, Songs[channel][0], 0.0, 0.0, 0.0);
  1215. }
  1216. else
  1217. {
  1218. SendClientMessage(playerid, COLOR_GREY, "** Unknown music command !");
  1219. return 1;
  1220. }
  1221. }
  1222. else
  1223. {
  1224. SendClientMessage(playerid, COLOR_GREY, "** You don't have a CD-Player !");
  1225. return 1;
  1226. }
  1227. }
  1228. return 1;
  1229. }
  1230. /*if(strcmp(cmd, "/service", true) == 0)
  1231. {
  1232. if(IsPlayerConnected(playerid))
  1233. {
  1234. new x_nr[64];
  1235. x_nr = strtok(cmdtext, idx);
  1236. if(!strlen(x_nr)) {
  1237. SendClientMessage(playerid, COLOR_WHITE, "|__________________ Service Names __________________|");
  1238. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /service [name]");
  1239. SendClientMessage(playerid, COLOR_GREY, "Available names: Taxi, Bus, Medic, Mechanic, Pizza");
  1240. SendClientMessage(playerid, COLOR_WHITE, "|________________________________________________|");
  1241. return 1;
  1242. }
  1243. if(strcmp(x_nr,"taxi",true) == 0)
  1244. {
  1245. if(TaxiDrivers < 1)
  1246. {
  1247. SendClientMessage(playerid, COLOR_GREY, " There are no Taxi Drivers On Duty at the moment, try again later !");
  1248. return 1;
  1249. }
  1250. if(TransportDuty[playerid] > 0)
  1251. {
  1252. SendClientMessage(playerid, COLOR_GREY, " You can't call for a Taxi now !");
  1253. return 1;
  1254. }
  1255.  
  1256. format(string, sizeof(string), "** %s is in need of a Taxi Driver. (use /accept taxi to accept the call)", sendername);
  1257. SendFamilyMessage(10, TEAM_AZTECAS_COLOR, string);
  1258. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have called for a Taxi Driver, wait for a reply.");
  1259. TaxiCall = playerid;
  1260. return 1;
  1261. }
  1262. else if(strcmp(x_nr,"Pizza",true) == 0)//added lookagain
  1263. {
  1264. if(PizzaBoys < 1)
  1265. {
  1266. SendClientMessage(playerid, COLOR_GREY, " There are no Pizza boys On Duty at the moment, try again later!");
  1267. return 1;
  1268. }
  1269.  
  1270. format(string, sizeof(string), "** %s is in need of a Pizza. (use /accept Pizza to accept the call)", sendername);
  1271. SendJobMessage(17, COLOR_LIGHTBLUE, string);
  1272. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have ordered a Pizza, wait for a reply.");
  1273. PizzaCall = playerid;
  1274. return 1;
  1275. }
  1276. else if(strcmp(x_nr,"bus",true) == 0)
  1277. {
  1278. new routezonecheck = IsInBusrouteZone(playerid);
  1279. new drivercount = 0;
  1280. if (routezonecheck == 0)
  1281. {
  1282. for (new i=0; i<=MAX_PLAYERS; i++)
  1283. {
  1284. if (IsPlayerConnected(i) && BusrouteEast[i][0] != 0) drivercount++;
  1285. }
  1286. if (drivercount != 0)
  1287. {
  1288. format(string, sizeof(string), "There are currently %d bus drivers on the east route. The route is as follows:", drivercount);
  1289. SendClientMessage(playerid, TEAM_AZTECAS_COLOR, string);
  1290. SendClientMessage(playerid, TEAM_AZTECAS_COLOR, " ");
  1291. SendBusRoute(playerid, 0);
  1292. }
  1293. else SendClientMessage(playerid, COLOR_GREY, "There are no bus drivers on the east route at this time.");
  1294. }
  1295. else if (routezonecheck == 1)
  1296. {
  1297. for (new i=0; i<=MAX_PLAYERS; i++)
  1298. {
  1299. if (IsPlayerConnected(i) && BusrouteWest[i][0] != 0) drivercount++;
  1300. }
  1301. if (drivercount != 0)
  1302. {
  1303. format(string, sizeof(string), "There are currently %d bus drivers on the west route. The route is as follows:", drivercount);
  1304. SendClientMessage(playerid, TEAM_AZTECAS_COLOR, string);
  1305. SendBusRoute(playerid, 1);
  1306. }
  1307. else SendClientMessage(playerid, COLOR_GREY, "There are no bus drivers on the west route at this time.");
  1308. }
  1309. else SendClientMessage(playerid, COLOR_GREY, "No bus services are running in this area at the current time.");
  1310. return 1;
  1311. }
  1312. else if(strcmp(x_nr,"medic",true) == 0)
  1313. {
  1314. if(Medics < 1)
  1315. {
  1316. SendClientMessage(playerid, COLOR_GREY, " There are no Medics On Duty at the moment, try again later !");
  1317. return 1;
  1318. }
  1319.  
  1320. format(string, sizeof(string), "** %s is in need of a Medic. (use /accept medic to accept the call)", sendername);
  1321. SendRadioMessage(4, TEAM_AZTECAS_COLOR, string);
  1322. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have called for a Medic, wait for a reply.");
  1323. MedicCall = playerid;
  1324. return 1;
  1325. }
  1326. else if(strcmp(x_nr,"mechanic",true) == 0)
  1327. {
  1328. if(Mechanics < 1)
  1329. {
  1330. SendClientMessage(playerid, COLOR_GREY, " There are no Car Mechanics On Duty at the moment, try again later !");
  1331. return 1;
  1332. }
  1333.  
  1334. format(string, sizeof(string), "** %s is in need of a Car Mechanic. (use /accept mechanic to accept the call)", sendername);
  1335. SendJobMessage(7, TEAM_AZTECAS_COLOR, string);
  1336. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have called for a Car Mechanic, wait for a reply.");
  1337. MechanicCall = playerid;
  1338. return 1;
  1339. }
  1340. else
  1341. {
  1342. SendClientMessage(playerid, COLOR_GREY, " Unknown service name !");
  1343. return 1;
  1344. }
  1345. }
  1346. return 1;
  1347. }*/
  1348. if(strcmp(cmd, "/service", true) == 0)
  1349. {
  1350. if(IsPlayerConnected(playerid))
  1351. {
  1352. SendClientMessage(playerid, COLOR_GREY, "** Koristi /calllist da vidis brojeve !");
  1353. return 1;
  1354. }
  1355. return 1;
  1356. }
  1357. if(strcmp(cmd, "/calllist", true) == 0)
  1358. {
  1359. if(IsPlayerConnected(playerid))
  1360. {
  1361. SendClientMessage(playerid, COLOR_GREEN, "____________Services number list____________");
  1362. SendClientMessage(playerid, COLOR_WHITE, "111 - pizza stack co., 222 - bus services");
  1363. SendClientMessage(playerid, COLOR_WHITE, "103 - medics, 444 - taxi, 555 - mechanic");
  1364. SendClientMessage(playerid, COLOR_WHITE, "151 - Advertisement Agency, 150 - ABC Studios");
  1365. SendClientMessage(playerid, COLOR_GREEN, "____________________________________________");
  1366. return 1;
  1367. }
  1368. return 1;
  1369. }
  1370. if(strcmp(cmd, "/tie", true) == 0)
  1371. {
  1372. if(IsPlayerConnected(playerid))
  1373. {
  1374. if(Rope[playerid] != 0)
  1375. {
  1376. if(PlayerInfo[playerid][pLevel] < 2)
  1377. {
  1378. SendClientMessage(playerid, COLOR_GREY, " Moras biti lvl 2 da vezes ! ");
  1379. return 1;
  1380. }
  1381. tmp = strtok(cmdtext, idx);
  1382. if(!strlen(tmp)) {
  1383. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /tie [playerID/DeoImena]");
  1384. return 1;
  1385. }
  1386. giveplayerid = ReturnUser(tmp);
  1387. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  1388.  
  1389. if(IsPlayerConnected(giveplayerid))
  1390. {
  1391. if(giveplayerid != INVALID_PLAYER_ID)
  1392. {
  1393. if(PlayerTied[giveplayerid] > 0)
  1394. {
  1395. SendClientMessage(playerid, COLOR_GREY, "** Igrac je vec vezan !");
  1396. return 1;
  1397. }
  1398. if(PlayerInfo[giveplayerid][pAdminDuty] == 1)
  1399. {
  1400. SendClientMessage(playerid, COLOR_NICERED, "** Nemozes vezati admina na duznosti!");
  1401. format(string,sizeof(string),"[ADMIN]: %s (%d) pokusava da sveze %s ali on je na AdminDuty",sendername,playerid,giveplayer);
  1402. ABroadCast(COLOR_LIGHTRED,string, 5);
  1403. return 1;
  1404. }
  1405. if (ProxDetectorS(8.0, playerid, giveplayerid))
  1406. {
  1407. new car = GetPlayerVehicleID(playerid);
  1408. if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
  1409. {
  1410. format(string, sizeof(string), "* Vezani ste od %s.", sendername);
  1411. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  1412. format(string, sizeof(string), "* Vezali ste %s.", giveplayer);
  1413. SendClientMessage(playerid, COLOR_WHITE, string);
  1414. format(string, sizeof(string), "* %s veze %s.", sendername ,giveplayer);
  1415. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  1416. GameTextForPlayer(giveplayerid, "~r~Vezan", 2500, 3);
  1417. TogglePlayerControllable(giveplayerid, 0);
  1418. PlayerTied[giveplayerid] = 1;
  1419. Rope[playerid]--;
  1420. new y, m, d;
  1421. new h,mi,s;
  1422. getdate(y,m,d);
  1423. gettime(h,mi,s);
  1424. format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /tie %s",d,m,y,h,mi,s,sendername, giveplayer
  1425. );
  1426. CommandLog(string);
  1427. }
  1428. else
  1429. {
  1430. SendClientMessage(playerid, COLOR_GREY, " Igrac nije u tvojim kolima ili ti nisi vozac !");
  1431. return 1;
  1432. }
  1433. }
  1434. else
  1435. {
  1436. SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
  1437. return 1;
  1438. }
  1439. }
  1440. }
  1441. else
  1442. {
  1443. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
  1444. return 1;
  1445. }
  1446. }
  1447. else
  1448. {
  1449. SendClientMessage(playerid, COLOR_GREY, " Nemas Konopac !");
  1450. }
  1451. }
  1452. return 1;
  1453. }
  1454. if(strcmp(cmd, "/untie", true) == 0)
  1455. {
  1456. if(IsPlayerConnected(playerid))
  1457. {
  1458. tmp = strtok(cmdtext, idx);
  1459. if(!strlen(tmp)) {
  1460. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /untie [playerID/DeoImena]");
  1461. return 1;
  1462. }
  1463. giveplayerid = ReturnUser(tmp);
  1464. if(IsPlayerConnected(giveplayerid))
  1465. {
  1466. if(giveplayerid != INVALID_PLAYER_ID)
  1467. {
  1468. if (ProxDetectorS(8.0, playerid, giveplayerid))
  1469. {
  1470. if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Nemozes odvezati sebe!"); return 1; }
  1471. if(PlayerTied[giveplayerid])
  1472. {
  1473. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  1474.  
  1475. format(string, sizeof(string), "* Odvezan si od %s.", sendername);
  1476. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  1477. format(string, sizeof(string), "* Odvezao si %s.", giveplayer);
  1478. SendClientMessage(playerid, COLOR_WHITE, string);
  1479. GameTextForPlayer(giveplayerid, "~g~Odvezan", 2500, 3);
  1480. TogglePlayerControllable(giveplayerid, 1);
  1481. PlayerTied[giveplayerid] = 0;
  1482. format(string, sizeof(string), "* %s odvezuje %s.", sendername, giveplayer);
  1483. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  1484. Rope[playerid]++;
  1485. }
  1486. else
  1487. {
  1488. SendClientMessage(playerid, COLOR_GREY, " Igrac nije vezan !");
  1489. return 1;
  1490. }
  1491. }
  1492. else
  1493. {
  1494. SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
  1495. return 1;
  1496. }
  1497. }
  1498. }
  1499. else
  1500. {
  1501. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
  1502. return 1;
  1503. }
  1504. }//not connected
  1505. return 1;
  1506. }
  1507. if(strcmp(cmd, "/auntie", true) == 0)
  1508. {
  1509. if(IsPlayerConnected(playerid))
  1510. {
  1511. if(PlayerInfo[playerid][pAdmin] >= 1)
  1512. {
  1513. tmp = strtok(cmdtext, idx);
  1514. if(!strlen(tmp))
  1515. {
  1516. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /auntie [playerID/DeoImena]");
  1517. return 1;
  1518. }
  1519. giveplayerid = ReturnUser(tmp);
  1520. if(IsPlayerConnected(giveplayerid))
  1521. {
  1522. if(giveplayerid != INVALID_PLAYER_ID)
  1523. {
  1524. if(PlayerTied[giveplayerid])
  1525. {
  1526. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  1527.  
  1528. format(string, sizeof(string), "* Admin %s te odvezao.", sendername);
  1529. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  1530. format(string, sizeof(string), "* Odvezao si %s.", giveplayer);
  1531. SendClientMessage(playerid, COLOR_WHITE, string);
  1532. GameTextForPlayer(giveplayerid, "~g~Odvezan", 2500, 3);
  1533. TogglePlayerControllable(giveplayerid, 1);
  1534. PlayerTied[giveplayerid] = 0;
  1535. format(string, sizeof(string), "* %s odvezuje %s.", sendername, giveplayer);
  1536. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  1537. format(string, sizeof(string), "[ADMIN]: %s je odvezao %s (%d)", sendername,giveplayer,giveplayerid);
  1538. ABroadCast(COLOR_LIGHTRED,string, 5);
  1539. new y, m, d;
  1540. new h,mi,s;
  1541. getdate(y,m,d);
  1542. gettime(h,mi,s);
  1543. format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s je odvezao %s.",d,m,y,h,mi,s,sendername,giveplayer);
  1544. GiveLog(string);
  1545. AdminLog(string);
  1546. }
  1547. else
  1548. {
  1549. SendClientMessage(playerid, COLOR_GREY, "** Igrac nije vezan !");
  1550. return 1;
  1551. }
  1552. }
  1553. }
  1554. else
  1555. {
  1556. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
  1557. return 1;
  1558. }
  1559. }
  1560. else
  1561. {
  1562. SendClientMessage(playerid, COLOR_GREY, " Nisi ovlascen !");
  1563. }
  1564. }//not connected
  1565. return 1;
  1566. }
  1567.  
  1568. if(strcmp(cmd, "/copuntie", true) == 0)
  1569. {
  1570. if(IsPlayerConnected(playerid))
  1571. {
  1572. if(IsACop(playerid))
  1573. {
  1574. /*if(PlayerInfo[playerid][pRank] < 3)
  1575. {
  1576. SendClientMessage(playerid, COLOR_GREY, " You need Rank 3 or higher to untie people !");
  1577. return 1;
  1578. }*/
  1579. if(PlayerInfo[playerid][pDBanned] == 1)
  1580. {
  1581. SendClientMessage(playerid, COLOR_GREY, "** Nije ti dozvoljeno ovo!");
  1582. return 1;
  1583. }
  1584. tmp = strtok(cmdtext, idx);
  1585. if(!strlen(tmp)) {
  1586. SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /copuntie [playerID/DeoImena]");
  1587. return 1;
  1588. }
  1589. giveplayerid = ReturnUser(tmp);
  1590. if(IsPlayerConnected(giveplayerid))
  1591. {
  1592. if(giveplayerid != INVALID_PLAYER_ID)
  1593. {
  1594. if (ProxDetectorS(8.0, playerid, giveplayerid))
  1595. {
  1596. if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Untie yourself!"); return 1; }
  1597. if(PlayerTied[giveplayerid])
  1598. {
  1599. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  1600.  
  1601. format(string, sizeof(string), "* Odvezan si od %s.", sendername);
  1602. SendClientMessage(giveplayerid, COLOR_WHITE, string);
  1603. format(string, sizeof(string), "* Odvezao si %s.", giveplayer);
  1604. SendClientMessage(playerid, COLOR_WHITE, string);
  1605. GameTextForPlayer(giveplayerid, "~g~Odvezan", 2500, 3);
  1606. TogglePlayerControllable(giveplayerid, 1);
  1607. PlayerTied[giveplayerid] = 0;
  1608. format(string, sizeof(string), "* %s je odvezao %s.", sendername, giveplayer);
  1609. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  1610. }
  1611. else
  1612. {
  1613. SendClientMessage(playerid, COLOR_GREY, " Igrac nije vezan !");
  1614. return 1;
  1615. }
  1616. }
  1617. else
  1618. {
  1619. SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
  1620. return 1;
  1621. }
  1622. }
  1623. }
  1624. else
  1625. {
  1626. SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
  1627. return 1;
  1628. }
  1629. }
  1630. else
  1631. {
  1632. SendClientMessage(playerid, COLOR_GREY, " Nisi policajac !");
  1633. }
  1634. }//not connected
  1635. return 1;
  1636. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement