Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2017
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.28 KB | None | 0 0
  1. /*
  2. Filterscript Admin System
  3. /makeadmin
  4. By Shomy
  5.  
  6. NAPOMENA: Ovaj Admin System koristi File "Korisnici". Dodajte folder "Korisnici"
  7. U Vasem scriptfiles folderu !
  8.  
  9. Ako vec imate File slican "Korisnici" a drugacije ime, promenite na liniji 20
  10. Umesto "/Korisnici/%s.ini" stavite "/(Ime Vaseg File)/%s.ini" !
  11.  
  12. */
  13. //==== [ INCLUDE ] ====//
  14.  
  15. #include < a_samp >
  16. #include < zcmd >
  17. #include < sscanf2 >
  18. #include < YSI\y_ini >
  19. #include < foreach >
  20.  
  21. //==== [ DEFINE ] ====//
  22.  
  23. #define PATH "/Korisnici/%s.ini"
  24. #define GRESKA(%0,%1) \
  25. SendClientMessageEx(%0, -1, "{FF8000}[GRESKA] {FFFFFF} "%1)
  26.  
  27. //==== [ SKRACENICE ] ====//
  28.  
  29. #define SCM SendClientMessage
  30. #define SCMTA SendClientMessageToAll
  31. #define SPD ShowPlayerDialog
  32. #define DSM DIALOG_STYLE_MSGBOX
  33. #define DSL DIALOG_STYLE_LIST
  34. #define DSI DIALOG_STYLE_INPUT
  35.  
  36. //==== [ BOJE ] ====//
  37.  
  38. #define COL_SERVER "{FF8000}"
  39. #define BELA "{FFFFFF}"
  40.  
  41. //==== [ DIALOZI ] ====//
  42.  
  43. #define DIALOG_BANSEBE 1
  44. #define DIALOG_BANNED 2
  45. #define DIALOG_DAJSVIMA 3
  46. #define DIALOG_MONEYUP 4
  47. #define DIALOG_AHELP 5
  48. #define DIALOG_APORT 6
  49.  
  50. //==== [ Enum ] ====//
  51.  
  52. enum pInfo
  53. {
  54. pAdminLevel,
  55. pBanovan,
  56. pAdminDuty,
  57. pMutiran
  58. }
  59.  
  60. //==== [ NEW ] ====//
  61.  
  62. new PlayerInfo[MAX_PLAYERS][pInfo];
  63. new String[128], Float:SpecX[MAX_PLAYERS], Float:SpecY[MAX_PLAYERS], Float:SpecZ[MAX_PLAYERS], vWorld[MAX_PLAYERS], Inter[MAX_PLAYERS];
  64. new IsSpecing[MAX_PLAYERS], Name[MAX_PLAYER_NAME], IsBeingSpeced[MAX_PLAYERS],spectatorid[MAX_PLAYERS];
  65. new Muted[MAX_PLAYERS];
  66.  
  67. //==== [ PUBLICS ] ====//
  68.  
  69. forward LoadUser_data(playerid,name[],value[]);
  70. public LoadUser_data(playerid,name[],value[])
  71. {
  72. INI_Int("AdminLevel",PlayerInfo[playerid][pAdminLevel]);
  73. return 1;
  74. }
  75. public OnPlayerText(playerid,text[])
  76. {
  77. if(PlayerInfo[playerid][pMutiran] == 1)
  78. {
  79. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Ne mozete da pricate, mutirani ste.");
  80. return 0;
  81. }
  82. return 1;
  83. }
  84. public OnPlayerSpawn(playerid)
  85. {
  86. if(IsSpecing[playerid] == 1)
  87. {
  88. SetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
  89. SetPlayerInterior(playerid,Inter[playerid]);
  90. SetPlayerVirtualWorld(playerid,vWorld[playerid]);
  91. IsSpecing[playerid] = 0;
  92. IsBeingSpeced[spectatorid[playerid]] = 0;
  93. SetPlayerSkin(playerid, 80);
  94. }
  95. return 1;
  96. }
  97. public OnPlayerConnect(playerid)
  98. {
  99. if(PlayerInfo[playerid][pBanovan] == 1)
  100. {
  101. SPD(playerid, DIALOG_BANNED, DSM, ""COL_SERVER"BAN",""BELA"Banovani ste sa servera !\nUkoliko mislite da je greska,\nPrijavite na forum www.VasForum.com\nInformacije o banu na forumu !",""BELA"U redu","");
  102. SetTimerEx( "TKick", 500, false, "i", playerid );
  103. }
  104. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  105. return 1;
  106. }
  107. public OnPlayerDisconnect(playerid, reason)
  108. {
  109. PlayerInfo[playerid][pAdminDuty] = 0;
  110. SacuvajIgraca(playerid);
  111. IsSpecing[playerid] = 0;
  112. return 1;
  113. }
  114. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  115. {
  116. if(dialogid == DIALOG_BANSEBE)
  117. {
  118. if(response)
  119. {
  120. PlayerInfo[playerid][pBanovan] = 1;
  121. SacuvajIgraca(playerid);
  122. new h,m,s,g,me,d,msg[80];
  123. gettime(h,m,s);
  124. getdate(g,me,d);
  125. format(msg,sizeof(msg), ""COL_SERVER"[INFO] "BELA"Datum bana %d.%d.%d. Vreme bana %d:%d:%d. Forum: www.VasForum.com",d,me,g,h,m,s);
  126. SCM(playerid, -1, ""COL_SERVER"[INFO] "BELA"Banovali ste samog sebe, ukoliko hocete unban slikajte ovo !");
  127. SCM(playerid, -1, msg);
  128. SetTimerEx( "TKick", 500, false, "i", playerid );
  129. }
  130. }
  131. if(dialogid == DIALOG_DAJSVIMA)
  132. {
  133. if(response)
  134. {
  135. switch(listitem)
  136. {
  137. case 0:
  138. {
  139. SPD(playerid, DIALOG_MONEYUP, DSI, ""COL_SERVER"Money Up",""BELA"Upisite kolicinu novca s kojim zelite nagraditi igrace.\nKolicina novca ne sme biti manja od 2000$\nIli veca od 20000$",""BELA"Nagradi",""BELA"Izlaz");
  140. }
  141. case 1:
  142. {
  143. GRESKA(playerid, "Trenutno mozete samo nagraditi igrace Money Upom !");
  144. }
  145. case 2:
  146. {
  147. GRESKA(playerid, "Trenutno mozete samo nagraditi igrace Money Upom !");
  148. }
  149. }
  150. }
  151. }
  152. if(dialogid == DIALOG_MONEYUP)
  153. {
  154. new pare;
  155. if(sscanf(inputtext, "d", pare)) return SPD(playerid, DIALOG_MONEYUP, DSI, ""COL_SERVER"Money Up",""BELA"Upisite kolicinu novca s kojim zelite nagraditi igrace.\nKolicina novca ne sme biti manja od 2000$\nIli veca od 20000$",""BELA"Nagradi",""BELA"Izlaz");
  156. if(pare < 2000 || pare > 20000)
  157. {
  158. SPD(playerid, DIALOG_MONEYUP, DSI, ""COL_SERVER"Money Up",""BELA"Upisite kolicinu novca s kojim zelite nagraditi igrace.\nKolicina novca ne sme biti manja od 2000$\nIli veca od 20000$",""BELA"Nagradi",""BELA"Izlaz");
  159. GRESKA(playerid, "Kolicina novca ne moze biti veca od 20000$ ili manja od 2000$ !");
  160. }
  161. else
  162. {
  163. foreach(Player, i)
  164. {
  165. new msg[80];
  166. format(msg,sizeof(msg), ""COL_SERVER"[INFO] "BELA"Admin %s je nagradio sve igrace sa %d$ !", GetName(playerid), pare);
  167. SCMTA(-1, msg);
  168. GivePlayerMoney(i, pare);
  169. }
  170. }
  171. }
  172. if(dialogid == DIALOG_APORT)
  173. {
  174. if(!response) return 0;
  175. if(response)
  176. {
  177. switch(listitem)
  178. {
  179. case 0:
  180. {
  181. if(!IsPlayerInAnyVehicle(playerid))
  182. {
  183. SetPlayerPos(playerid, 1480.9747,-1743.3533,13.5469);
  184. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Opstine !");
  185. SetPlayerInterior(playerid, 0);
  186. }
  187. else
  188. {
  189. new idv = GetPlayerVehicleID(playerid);
  190. SetVehiclePos(idv, 1480.9747,-1743.3533,13.5469);
  191. SetPlayerPos(playerid, 1480.9747,-1743.3533,13.5469);
  192. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Opstine !");
  193. PutPlayerInVehicle(playerid, idv, 0);
  194. SetPlayerInterior(playerid, 0);
  195.  
  196. }
  197. }
  198. case 1:
  199. {
  200. if(!IsPlayerInAnyVehicle(playerid))
  201. {
  202. SetPlayerPos(playerid, 1461.5502,-1024.9500,23.8281);
  203. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Banke ! ");
  204. SetPlayerInterior(playerid, 0);
  205. }
  206. else
  207. {
  208. new idv = GetPlayerVehicleID(playerid);
  209. SetVehiclePos(idv, 1461.5502,-1024.9500,23.8281);
  210. SetPlayerPos(playerid, 1461.5502,-1024.9500,23.8281);
  211. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Banke !");
  212. PutPlayerInVehicle(playerid, idv, 0);
  213. SetPlayerInterior(playerid, 0);
  214. }
  215. }
  216. case 2:
  217. {
  218. if(!IsPlayerInAnyVehicle(playerid))
  219. {
  220. SetPlayerPos(playerid, 1222.1575,-924.5607,42.8987);
  221. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Burga ! ");
  222. SetPlayerInterior(playerid, 0);
  223. }
  224. else
  225. {
  226. new idv = GetPlayerVehicleID(playerid);
  227. SetVehiclePos(idv, 1222.1575,-924.5607,42.8987);
  228. SetPlayerPos(playerid, 1222.1575,-924.5607,42.8987);
  229. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Burga !");
  230. PutPlayerInVehicle(playerid, idv, 0);
  231. SetPlayerInterior(playerid, 0);
  232. }
  233. }
  234. case 3:
  235. {
  236. if(!IsPlayerInAnyVehicle(playerid))
  237. {
  238. SetPlayerPos(playerid, 1420.7911,-1178.8344,25.9922);
  239. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Zlatare ! ");
  240. SetPlayerInterior(playerid, 0);
  241. }
  242. else
  243. {
  244. new idv = GetPlayerVehicleID(playerid);
  245. SetVehiclePos(idv, 1420.7911,-1178.8344,25.9922);
  246. SetPlayerPos(playerid, 1420.7911,-1178.8344,25.9922);
  247. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Zlatare !");
  248. PutPlayerInVehicle(playerid, idv, 0);
  249. SetPlayerInterior(playerid, 0);
  250. }
  251. }
  252. case 4:
  253. {
  254. if(!IsPlayerInAnyVehicle(playerid))
  255. {
  256. SetPlayerPos(playerid, 1310.0541,-1368.5321,13.5502);
  257. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Biroa ! ");
  258. SetPlayerInterior(playerid, 0);
  259. }
  260. else
  261. {
  262. new idv = GetPlayerVehicleID(playerid);
  263. SetVehiclePos(idv, 1310.0541,-1368.5321,13.5502);
  264. SetPlayerPos(playerid, 1310.0541,-1368.5321,13.5502);
  265. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Biroa !");
  266. PutPlayerInVehicle(playerid, idv, 0);
  267. SetPlayerInterior(playerid, 0);
  268. }
  269. }
  270. case 5:
  271. {
  272. if(!IsPlayerInAnyVehicle(playerid))
  273. {
  274. SetPlayerPos(playerid, 1178.5061,-1323.2313,14.1234);
  275. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Bolnice ! ");
  276. SetPlayerInterior(playerid, 0);
  277. }
  278. else
  279. {
  280. new idv = GetPlayerVehicleID(playerid);
  281. SetVehiclePos(idv, 1178.5061,-1323.2313,14.1234);
  282. SetPlayerPos(playerid, 1178.5061,-1323.2313,14.1234);
  283. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Bolnice !");
  284. PutPlayerInVehicle(playerid, idv, 0);
  285. SetPlayerInterior(playerid, 0);
  286. }
  287. }
  288. case 6:
  289. {
  290. if(!IsPlayerInAnyVehicle(playerid))
  291. {
  292. SetPlayerPos(playerid, 1545.6926,-1675.7408,13.5609);
  293. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Policije ! ");
  294. SetPlayerInterior(playerid, 0);
  295. }
  296. else
  297. {
  298. new idv = GetPlayerVehicleID(playerid);
  299. SetVehiclePos(idv, 1545.6926,-1675.7408,13.5609);
  300. SetPlayerPos(playerid, 1545.6926,-1675.7408,13.5609);
  301. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do Policije !");
  302. PutPlayerInVehicle(playerid, idv, 0);
  303. SetPlayerInterior(playerid, 0);
  304. }
  305. }
  306. case 7:
  307. {
  308. if(!IsPlayerInAnyVehicle(playerid))
  309. {
  310. SetPlayerPos(playerid, -1414.8940,-303.7203,13.9926);
  311. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do SF ! ");
  312. SetPlayerInterior(playerid, 0);
  313. }
  314. else
  315. {
  316. new idv = GetPlayerVehicleID(playerid);
  317. SetVehiclePos(idv, -1414.8940,-303.7203,13.9926);
  318. SetPlayerPos(playerid, -1414.8940,-303.7203,13.9926);
  319. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do SF !");
  320. PutPlayerInVehicle(playerid, idv, 0);
  321. SetPlayerInterior(playerid, 0);
  322. }
  323. }
  324. case 8:
  325. {
  326. if(!IsPlayerInAnyVehicle(playerid))
  327. {
  328. SetPlayerPos(playerid, 1693.4326,1448.2053,10.7641);
  329. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do LV ! ");
  330. SetPlayerInterior(playerid, 0);
  331. }
  332. else
  333. {
  334. new idv = GetPlayerVehicleID(playerid);
  335. SetVehiclePos(idv, 1693.4326,1448.2053,10.7641);
  336. SetPlayerPos(playerid, 1693.4326,1448.2053,10.7641);
  337. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Teleportovali ste se do LV !");
  338. PutPlayerInVehicle(playerid, idv, 0);
  339. SetPlayerInterior(playerid, 0);
  340. }
  341. }
  342. }
  343. }
  344. }
  345. return 1;
  346. }
  347. //==== [ STOCK ] ====//
  348.  
  349. stock SendClientMessageEx(playerid, color, const str[], {Float,_}:...) {
  350. static
  351. args,
  352. start,
  353. end,
  354. string[144]
  355. ;
  356. #emit LOAD.S.pri 8
  357. #emit STOR.pri args
  358.  
  359. if(args > 12)
  360. {
  361. #emit ADDR.pri str
  362. #emit STOR.pri start
  363.  
  364. for (end = start + (args - 12); end > start; end -= 4)
  365. {
  366. #emit LREF.pri end
  367. #emit PUSH.pri
  368. }
  369. #emit PUSH.S str
  370. #emit PUSH.C 144
  371. #emit PUSH.C string
  372. #emit PUSH.C args
  373. #emit SYSREQ.C format
  374.  
  375. SendClientMessage(playerid, color, string);
  376.  
  377. #emit LCTRL 5
  378. #emit SCTRL 4
  379. #emit RETN
  380. }
  381. return SendClientMessage(playerid, color, str);
  382. }
  383. stock Ovlasceni(playerid)
  384. {
  385. SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Niste ovlasceni !");
  386. return 1;
  387. }
  388. stock GetName(playerid)
  389. {
  390. new name[MAX_PLAYER_NAME];
  391. GetPlayerName(playerid, name, sizeof(name));
  392. return name;
  393. }
  394. stock UserPath(playerid)
  395. {
  396. new string[128],playername[MAX_PLAYER_NAME];
  397. GetPlayerName(playerid,playername,sizeof(playername));
  398. format(string,sizeof(string),PATH,playername);
  399. return string;
  400. }
  401. stock SacuvajIgraca(playerid)
  402. {
  403. new INI:File = INI_Open(UserPath(playerid));
  404. INI_WriteInt(File,"AdminLevel",PlayerInfo[playerid][pAdminLevel]);
  405. INI_WriteInt(File,"Banovan",PlayerInfo[playerid][pBanovan]);
  406. INI_WriteInt(File,"Mutiran",PlayerInfo[playerid][pMutiran]);
  407. INI_Close(File);
  408. }
  409. stock ClearChatToAll()
  410. {
  411. for (new c = 0; c < 150; c++)
  412. {
  413. SendClientMessageToAll(-1, " ");
  414. }
  415. }
  416.  
  417. //==== [ CMD ] ====//
  418.  
  419. CMD:makeadmin( playerid, params[] )
  420. {
  421. if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 6)
  422. {
  423. new id, msg1[128], msg2[128], alevel, msg[128], msg0[128];
  424. if(sscanf(params, "ud", id, alevel)) return SendClientMessage(playerid, -1, "{FF8000}[SERVER] {FFFFFF}Korisite /makeadmin [ID] [Level 1-7]");
  425. if(alevel > 7) return SendClientMessage(playerid, -1, "{FF8000}[SERVER] {FFFFFF}Admin level ne moze biti veci od 7 !");
  426. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "{FF8000}[SERVER] {FFFFFF}Taj igrac nije na serveru !");
  427. if(alevel == 0)
  428. {
  429. if(PlayerInfo[id][pAdminLevel] > 0)
  430. {
  431. format(msg,sizeof(msg), "{FF8000}[SERVER] {FFFFFF}Admin %s Vam je skinuo Admina.", GetName(playerid));
  432. SendClientMessage(id, -1, msg);
  433. format(msg0,sizeof(msg0), "{FF8000}[SERVER] {FFFFFF}Skinuli ste igracu %s Admina.", GetName(id));
  434. SendClientMessage(playerid, -1, msg0);
  435. PlayerInfo[id][pAdminLevel] = 0;
  436. }
  437. else return SendClientMessage(playerid, -1, "{FF8000}[SERVER] {FFFFFF}Taj igrac nema Admina ! ");
  438. }
  439. else
  440. {
  441. format(msg1,sizeof(msg1), "{FF8000}[SERVER] {FFFFFF}Admin %s Vam je dao Admin Level %d.", GetName(playerid), alevel);
  442. SendClientMessage(id, -1, msg1);
  443. format(msg2,sizeof(msg2), "{FF8000}[SERVER] {FFFFFF}Dali ste igracu %s Admin Level %d.", GetName(id), alevel);
  444. SendClientMessage(playerid, -1, msg2);
  445. PlayerInfo[id][pAdminLevel] = alevel;
  446. }
  447. }
  448. else return SendClientMessage(playerid, -1, "{FF8000}[SERVER] {FFFFFF}Niste ovlasceni !");
  449. return 1;
  450. }
  451. CMD:ban(playerid, params[])
  452. {
  453. new id, reason[80], msg[128], msg1[90];
  454. if(PlayerInfo[playerid][pAdminLevel] > 0)
  455. {
  456. if(sscanf(params, "us[80]", id, reason)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Koristite /ban [ID] [Razlog] !");
  457. if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac nije na serveru !");
  458. if(id == playerid) return SPD(playerid, DIALOG_BANSEBE, DSM, ""COL_SERVER"BAN",""BELA"Da li ste sigurni da zelite banovati sebe ?",""BELA"DA",""BELA"NE");
  459. if(PlayerInfo[id][pAdminLevel] == 7 && PlayerInfo[playerid][pAdminLevel] < 7)
  460. {
  461. new str[128];
  462. format(str,sizeof(str), ""COL_SERVER"[UPOZORENJE] "BELA"Admin %s je pokusao da vas banuje !", GetName(playerid));
  463. SCM(id, -1, str);
  464. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Da banujes vlasnika? Prijavljen si !");
  465. }
  466. if(PlayerInfo[id][pBanovan] == 0)
  467. {
  468. new h,m,s;
  469. PlayerInfo[id][pBanovan] = 1;
  470. SacuvajIgraca(playerid);
  471. format(msg,sizeof(msg), ""COL_SERVER"[BAN] "BELA"Igrac %s je banovan od strane admina %s. Razlog %s.", GetName(playerid), reason);
  472. SCMTA(-1, msg);
  473. gettime(h,m,s);
  474. format(msg1,sizeof(msg1), ""COL_SERVER"[INFO] "BELA"Vreme bana %d:%d:%d. Zalbe na forum www.VasForum.com !",h,m,s);
  475. SCM(id, -1, msg1);
  476. SetTimerEx( "TKick", 500, false, "i", id );
  477. }
  478. }
  479. else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Niste ovlasceni !");
  480. return 1;
  481. }
  482. CMD:kick(playerid, params[])
  483. {
  484. if(PlayerInfo[playerid][pAdminLevel] > 0)
  485. {
  486. new id, razlog[80], msg[128], msg1[128];
  487. if(sscanf(params, "us[80]", id, razlog)) return SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Koristite /kick [ID] [Razlog] !");
  488. if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac nije na serveru !");
  489. if(PlayerInfo[id][pAdminLevel] == 7 && PlayerInfo[playerid][pAdminLevel] < 7)
  490. {
  491. new str[128];
  492. format(str,sizeof(str), ""COL_SERVER"[UPOZORENJE] "BELA"Admin %s je pokusao da vas kickuje !", GetName(playerid));
  493. SCM(id, -1, str);
  494. SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Da kickujes vlasnika? Prijavljen si !");
  495. }
  496. else
  497. {
  498. new h,m,s;
  499. format(msg,sizeof(msg), ""COL_SERVER"[KICK] "BELA"Igrac %s je kickovan od strane admina %s. Razlog %s.", GetName(playerid), razlog);
  500. SCMTA(-1, msg);
  501. gettime(h,m,s);
  502. format(msg1,sizeof(msg1), ""COL_SERVER"[INFO] "BELA"Vreme kicka %d:%d:%d. Zalbe na forum www.VasForum.com !",h,m,s);
  503. SCM(id, -1, msg1);
  504. SetTimerEx( "TKick", 500, false, "i", id );
  505. }
  506. }
  507. else return Ovlasceni(playerid);
  508. return 1;
  509. }
  510. CMD:slap(playerid, params[])
  511. {
  512. if(PlayerInfo[playerid][pAdminLevel] > 0)
  513. {
  514. new id, razlog[80], msg[128], msg1[128];
  515. if(sscanf(params, "us[80]", id, razlog)) return SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Koristite /slap [ID] [Razlog] !");
  516. if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Taj igrac nije na serveru !");
  517. else
  518. {
  519. new Float:X,Float:Y,Float:Z,Float:A;
  520. GetPlayerPos(id, X,Y,Z);
  521. GetPlayerFacingAngle(id, A);
  522. SetPlayerPos(id, X,Y,Z+5);
  523. SetPlayerFacingAngle(id, A);
  524. format(msg,sizeof(msg), ""COL_SERVER"Admin %s Vas je osamario. Razlog %s.",GetName(playerid), razlog);
  525. SCM(id, -1, msg);
  526. format(msg1,sizeof(msg1), ""COL_SERVER"Osamarili ste igraca %s. Razlog %s.",GetName(id), razlog);
  527. SCM(playerid, -1, msg1);
  528. }
  529. }
  530. else return Ovlasceni(playerid);
  531. return 1;
  532.  
  533. }
  534. CMD:dajsvima(playerid, params[])
  535. {
  536. if(PlayerInfo[playerid][pAdminLevel] > 5)
  537. {
  538. SPD(playerid, DIALOG_DAJSVIMA, DSL, ""COL_SERVER"Nagrade",""BELA"Money Up\nLevel Up\nRespekti",""BELA"Izaberi",""BELA"Odustani");
  539. }
  540. else return Ovlasceni(playerid);
  541. return 1;
  542. }
  543. CMD:cc(playerid, params[])
  544. {
  545. if(PlayerInfo[playerid][pAdminLevel] > 0)
  546. {
  547. ClearChatToAll();
  548. for(new i = 0; i < MAX_PLAYERS; i++)
  549. {
  550. SCM(i, -1, ""COL_SERVER"====[ "BELA"Chat Ociscen "COL_SERVER"]====");
  551. }
  552. }
  553. return 1;
  554. }
  555. CMD:ah(playerid, params[],help)
  556. {
  557.  
  558. new info[2080];
  559. if(IsPlayerConnected(playerid))
  560. {
  561. if (PlayerInfo[playerid][pAdminLevel] >= 1)
  562. {
  563. strcat(info, ""COL_SERVER"||===============================================[ "BELA"Admin Help "COL_SERVER"]=============================================||\n\n", sizeof(info));
  564. }
  565. if (PlayerInfo[playerid][pAdminLevel] >= 1)
  566. {
  567. strcat(info, ""COL_SERVER"Admin Level 1 | "BELA"/specon /specoff /count /aduty /apopravi /cc /kick /goto /slap /freeze /unfreeze /rtc /mlista /ajail\n", sizeof(info));
  568. strcat(info, ""COL_SERVER"Admin Level 1 | "BELA"/port /jetpack /kill /avozilo /gethere /sethp /setarmor /vfix /a (admin chat) /ao (ooc) /uzmiip /nitro /ban /odg /zatvoreni\n\n", sizeof(info));
  569. }
  570. if (PlayerInfo[playerid][pAdminLevel] >= 2)
  571. {
  572. strcat(info, ""COL_SERVER"Admin Level 2 | "BELA"/vhelti /tod /podesivreme /mute /proveri /warn /offban /rtc /veh\n\n", sizeof(info));
  573. }
  574. if (PlayerInfo[playerid][pAdminLevel] >= 3)
  575. {
  576. strcat(info, ""COL_SERVER"Admin Level 3 | "BELA"/gotopos /unmute /bojavozila /skiniwarn /gotokuca /gotostan /gotovikendica /gotofirma\n\n", sizeof(info));
  577. }
  578. if (PlayerInfo[playerid][pAdminLevel] >= 4)
  579. {
  580. strcat(info, ""COL_SERVER"Admin Level 4 | "BELA"/setskin /fban /unban /agorivo /aocistiwl\n\n", sizeof(info));
  581. }
  582. if (PlayerInfo[playerid][pAdminLevel] >= 5)
  583. {
  584. strcat(info, ""COL_SERVER"Glavni Admin | "BELA"/jetpack /agl /aoruzije /svimaheal /svimapancir /sacuvajacounte /oslobodi /hdajnovac\n\n", sizeof(info));
  585. strcat(info, ""COL_SERVER"Glavni Admin | "BELA"/hpostavilidera /hpostavisupp\n\n", sizeof(info));
  586. }
  587. if (PlayerInfo[playerid][pAdminLevel] >= 6)
  588. {
  589. strcat(info, ""COL_SERVER"Direktor | "BELA"/makeadmin /makehelper /dajsvima /podesinovac /ubisve /kreirajfirmu /kreirajkucu\n", sizeof(info));
  590. strcat(info, ""COL_SERVER"Direktor | "BELA"/efirmu /efirmu2 /podesistats /postavilidera /spodesavanja /aprodajkucu /ekucu /estan\n", sizeof(info));
  591. strcat(info, ""COL_SERVER"Direktor | "BELA"/kreirajstan /aprodajstan /kreirajvikendicu /evikendicu /aprodajvikendicu /av(prodaj,parkiraj)\n", sizeof(info));
  592. strcat(info, ""COL_SERVER"Direktor | "BELA"/am(prodaj,parkiraj) /ab(parkiraj) /ale(parkiraj,prodaj) /kreirajbankomat /ebankomat /portbankomat\n", sizeof(info));
  593. strcat(info, ""COL_SERVER"Direktor | "BELA"/apl(prodaj,parkiraj) /rac /nagrade\n\n", sizeof(info));
  594. }
  595. if (PlayerInfo[playerid][pAdminLevel] >= 7)
  596. {
  597. strcat(info, ""COL_SERVER"Vlasnik| "BELA"** /server /spodesavanja **\n\n", sizeof(info));
  598. }
  599. if (PlayerInfo[playerid][pAdminLevel] >= 1)
  600. {
  601. strcat(info, ""COL_SERVER"||========================================================================================================||\n\n", sizeof(info));
  602. }
  603. SPD(playerid, DIALOG_AHELP, DSM, ""COL_SERVER"Admin Help", info, "U redu", "");
  604. }
  605. return 1;
  606. }
  607. CMD:spec(playerid, params[]) // SPEC i SPECOFF UZETI IZ DRUGOG MODA - MRZELO ME RADITI
  608. {
  609. new id;
  610. if(PlayerInfo[playerid][pAdminLevel] > 0)
  611. {
  612. if(sscanf(params,"u", id))return SendClientMessage(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Koristi: /spec [id]");
  613. if(id == playerid) return SendClientMessage(playerid,-1,""COL_SERVER"[SERVER] "BELA"Ne mozes da nadgledas samog sebe !");
  614. if(id == INVALID_PLAYER_ID)return SendClientMessage(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac nije na serveru !");
  615. if(IsSpecing[playerid] == 1)return SendClientMessage(playerid,-1,""COL_SERVER"[SERVER] "BELA"Vec nadgledas nekoga !");
  616. GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
  617. Inter[playerid] = GetPlayerInterior(playerid);
  618. vWorld[playerid] = GetPlayerVirtualWorld(playerid);
  619. TogglePlayerSpectating(playerid, true);
  620. if(IsPlayerInAnyVehicle(id))
  621. {
  622. if(GetPlayerInterior(id) > 0)
  623. {
  624. SetPlayerInterior(playerid,GetPlayerInterior(id));
  625. }
  626. if(GetPlayerVirtualWorld(id) > 0)
  627. {
  628. SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
  629. PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id));
  630. }
  631. }
  632. else
  633. {
  634. if(GetPlayerInterior(id) > 0)
  635. {
  636. SetPlayerInterior(playerid,GetPlayerInterior(id));
  637. }
  638. if(GetPlayerVirtualWorld(id) > 0)
  639. {
  640. SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
  641. }
  642. PlayerSpectatePlayer(playerid,id);
  643. }
  644. GetPlayerName(id, Name, sizeof(Name));
  645. format(String, sizeof(String),""COL_SERVER"[SERVER] "BELA"Poceo si sa nagledanjem igraca %s",Name);
  646. SendClientMessage(playerid,0x0080C0FF,String);
  647. IsSpecing[playerid] = 1;
  648. IsBeingSpeced[id] = 1;
  649. spectatorid[playerid] = id;
  650. }
  651. else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Nisi ovlasceni !");
  652. return 1;
  653. }
  654. CMD:specoff(playerid,params[]) // SPEC i SPECOFF UZETI IZ DRUGOG MODA - MRZELO ME RADITI
  655. {
  656. if(PlayerInfo[playerid][pAdminLevel] > 0)
  657. {
  658. if(IsSpecing[playerid] == 0) return SendClientMessage(playerid,-1,""COL_SERVER"[SERVER] "BELA"Ne nadgledas nikoga !");
  659. TogglePlayerSpectating(playerid, 0);
  660. }
  661. else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Nisi ovlasceni !");
  662. return 1;
  663. }
  664. CMD:aport(playerid,params[])
  665. {
  666. if(PlayerInfo[playerid][pAdminLevel] > 0)
  667. {
  668. SPD(playerid,DIALOG_APORT, DSL, ""COL_SERVER"Teleport",""BELA"Opstina\nBanka\nBurg\nZlatara\nBiro\nBolnica\nPolicija\nSF\nLV","Odaberi","Izlaz");
  669. }
  670. return 1;
  671. }
  672. CMD:jetpack(playerid, params[])
  673. {
  674. if(PlayerInfo[playerid][pAdminLevel] < 1) return SCM(playerid,-1,""COL_SERVER"[SERVER] "BELA"Niste ovlasceni !");
  675. if(PlayerInfo[playerid][pAdminDuty] == 0) return SCM(playerid,-1,""COL_SERVER"[SERVER] "BELA"Morate biti na admin duznosti!");
  676. SendClientMessage(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Uzeli ste jetpack!");
  677. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
  678. return 1;
  679. }
  680. CMD:aduty(playerid,params[])
  681. {
  682. if(IsPlayerConnected(playerid))
  683. {
  684. if(PlayerInfo[playerid][pAdminLevel] == 0) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Niste admin !");
  685. if(PlayerInfo[playerid][pAdminLevel] > 0)
  686. {
  687. new msgstring[150];
  688. if(PlayerInfo[playerid][pAdminDuty] == 0)
  689. {
  690. format(msgstring, sizeof(msgstring), ""COL_SERVER"(( "BELA"Admin "COL_SERVER"%s "BELA"je sada na duznosti. Za pomoc kucajte"COL_SERVER" /pitaj "BELA"! "COL_SERVER"))",GetName(playerid));
  691. SendClientMessageToAll(-1, msgstring);
  692. SetPVarInt(playerid, "LastSkin", GetPlayerSkin(playerid));
  693. SetPlayerSkin(playerid, 294);
  694. PlayerInfo[playerid][pAdminDuty] = 1;
  695. SetPlayerHealth(playerid, 9999);
  696. SetPlayerArmour(playerid, 9999);
  697. }
  698. else
  699. {
  700. format(msgstring, sizeof(msgstring), ""COL_SERVER"(( "BELA"Admin "COL_SERVER"%s "BELA"vise nije na duznosti. "COL_SERVER"))",GetName(playerid));
  701. SendClientMessageToAll(-1, msgstring);
  702. SetPlayerSkin(playerid, GetPVarInt(playerid, "LastSkin"));
  703. SetPlayerHealth(playerid, 100);
  704. SetPlayerArmour(playerid, 0);
  705. PlayerInfo[playerid][pAdminDuty] = 0;
  706. }
  707. }
  708. }
  709. return 1;
  710. }
  711. CMD:apopravi(playerid, params[])
  712. {
  713. if(PlayerInfo[playerid][pAdminLevel] > 0)
  714. {
  715. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Niste u vozilu !");
  716. if(IsPlayerInAnyVehicle(playerid))
  717. {
  718. RepairVehicle(GetPlayerVehicleID(playerid));
  719. SendClientMessage(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Popravili ste vozilo");
  720. new string[128];
  721. format(string,sizeof(string),""COL_SERVER"[ADMIN INFO] "BELA"Admin/Helper %s je popravio vozilo.", GetName(playerid));
  722. SendAHMessage(-1, string);
  723. }
  724. }
  725. return 1;
  726. }
  727. CMD:mute(playerid, params[])
  728. {
  729. new id;
  730. new time, minuti;
  731. time = gettime(minuti);
  732. if(PlayerInfo[playerid][pAdminLevel] > 0)
  733. {
  734. if(sscanf(params, "ud", id, time)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Koristite /mute [ID] [Vreme (Minuti)] !");
  735. if(time > 120 || time < 1) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Vreme ne moze biti vece od 120 minuta ( 2 sata ) ili manje od 1 minut !");
  736. if(PlayerInfo[id][pMutiran] == 0)
  737. {
  738. new string[80], msg1[80], AInfo[90];
  739. format(string,sizeof(string), ""COL_SERVER"[SERVER] "BELA"Admin %s vas je ucutkao na %d minuta", GetName(playerid), time);
  740. SCM(id, -1, string);
  741. format(msg1,sizeof(msg1), ""COL_SERVER"[SERVER] "BELA"Ucutkali ste igraca %s na %d minuta", GetName(id), time);
  742. SCM(playerid, -1, msg1);
  743. format(AInfo,sizeof(AInfo), ""COL_SERVER"[AInfo] "BELA"Admin %s je ucutkao igraca %s na %d minuta.", GetName(playerid), GetName(id), time);
  744. SendAHMessage(-1, AInfo);
  745. PlayerInfo[id][pMutiran] = 1;
  746. Muted[id] = SetTimerEx("MuteTimer",time*60000, false, "i", id);
  747. new INI:File = INI_Open(UserPath(playerid));
  748. INI_WriteInt(File,"Mutiran", 1);
  749. INI_Close(File);
  750. }
  751. else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac je vec mutiran !");
  752. }
  753. else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Niste ovlasceni !");
  754. return 1;
  755. }
  756. CMD:unmute(playerid, params[])
  757. {
  758. new id;
  759. new msg1[80], msg2[80], AInfo[90];
  760. if(PlayerInfo[playerid][pAdminLevel] > 0)
  761. {
  762. if(sscanf(params, "u", id)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Koristite /unmute [ID] !");
  763. if(PlayerInfo[id][pMutiran] == 1)
  764. {
  765. PlayerInfo[id][pMutiran] = 0;
  766. format(msg1,sizeof(msg1), ""COL_SERVER"[SERVER] "BELA"Admin %s vas je unmute, sada mozete normalno pisati !", GetName(playerid));
  767. format(msg2,sizeof(msg2), ""COL_SERVER"[SERVER] "BELA"Unmute ste igraca %s !",GetName(id));
  768. format(AInfo,sizeof(AInfo), ""COL_SERVER"[AInfo] "BELA"Admin %s je unmute igraca %s !", GetName(playerid),GetName(id));
  769. SCM(id, -1, msg1);
  770. SCM(playerid, -1, msg2);
  771. SendAHMessage(-1, AInfo);
  772. KillTimer(Muted[id]);
  773. new INI:File = INI_Open(UserPath(playerid));
  774. INI_WriteInt(File,"Mutiran", 0);
  775. INI_Close(File);
  776. }
  777. else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac nije mutiran !");
  778. }
  779. else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Niste ovlasceni !");
  780. return 1;
  781. }
  782.  
  783. //==== [ TIMERI ] ====//
  784.  
  785. forward TKick(playerid);
  786. public TKick(playerid)
  787. {
  788. Kick(playerid);
  789. return 1;
  790. }
  791. forward MuteTimer(playerid);
  792. public MuteTimer(playerid)
  793. {
  794. PlayerInfo[playerid][pMutiran] = 0;
  795. SacuvajIgraca(playerid);
  796. SCM(playerid, -1, ""COL_SERVER"[INFO] "BELA"Mute vreme je proslo, mozete ponovo pisati. ");
  797. return 1;
  798. }
  799.  
  800. //==== [ AH MSG ] ====//
  801.  
  802. forward SendAHMessage(color, string[]);
  803. public SendAHMessage(color, string[])
  804. {
  805. foreach(Player,i)
  806. {
  807. if(PlayerInfo[i][pAdminLevel] >= 1)
  808. {
  809. SCM(i, color, string);
  810. printf("%s", string);
  811. }
  812. }
  813. }
  814. //====================[ KRAJ FILTERSCRIPT ADMIN SYS BY SHOMY ]================//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement