Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.12 KB | None | 0 0
  1. //includes
  2. #include <a_samp>
  3. #include <zcmd>
  4. #include <sscanf2>
  5. #include <Dini>
  6. #include <streamer>
  7.  
  8. //defines
  9. #define SCRIPT_VERSION "v2.0"
  10. #define LAST_UPDATE "26.10.2013"
  11. #define SCRIPT_BY "Orion Mark"
  12. #define SCM SendClientMessage
  13.  
  14. //LOG/REG-------------------------------------------------------------------------------------------------------------
  15. #define GIVE_MONEY_COMMAND GivePlayerMoney // Komanda za davanje novaca igraču //|
  16. #define GET_MONEY_COMMAND GetPlayerMoney
  17. #define SET_MONEY_COMMAND SetPlayerMoney // Komanda za vidjeti koliko igrač ima novaca //|
  18. #define SET_SCORE_COMMAND SetPlayerScore // Komanda za namjestiti score igraču //|
  19. #define GET_SCORE_COMMAND GetPlayerScore // Komanda za provjeru koliko igrač ima score-a //|
  20. //|
  21. #define REGISTER_DIALOG 1101 //|
  22. #define LOGIN_DIALOG 1102 //|
  23. #define REGISTER_DIALOG2 1103 //|
  24. #define REGISTER_DIALOG3 1104 //|
  25.  
  26. #define SERVER_NAME "Orion Mark" // Upisi ime servera //|
  27. #define IS_LOGGED_VAR "IsLogged" // variabla koju koristite u GameModu za provjeru dali je igrac logiran //|
  28. #define MIN_PASS 5 // Minimalno znakova za lozinku //|
  29. #define MAX_PASS 20 // Maksimalno znakova za lozuinku //|
  30. #define MAX_WRONG_PASS 3 // Broj puta koliko se može pogriješiti lozinka //|
  31. #define MAX_LOGIN_TIME 60 // Maksimalno vrijeme logiranja u sekundama //|
  32. #define SAVE_LAST_POS // Dali da se sprema pozicija igrača kada se igrač diconnecta, ukoliko ne pobrisite ovo //|
  33. #define INTERIOR_VAR "int"// variabla koju koristite u GameModu za probvjeru igračevog interiora //|
  34. #define VW_VAR "vw" // variabla koju koristite u GameModu za probvjeru igračevog virtualnog worlds //|
  35. //|
  36. #define kickboja 0x970000FF // Boja za tekst kada je igrač kickan //|
  37. #define textboja "{DBDBDB}" // Boja za običan bijeli tekst //|
  38. #define loginboja "{80FFFF}" // Boja kada se igrač logira i registrira //|
  39. //--------------------------------------------------------------------------------------------------------------------
  40. ////////////////////////////stock za ProxDetector///////////////////////////////
  41. stock ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  42. {
  43. if(IsPlayerConnected(playerid))
  44. {
  45. new Float:posx, Float:posy, Float:posz;
  46. new Float:oldposx, Float:oldposy, Float:oldposz;
  47. new Float:tempposx, Float:tempposy, Float:tempposz;
  48. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  49. for(new i=0; i<MAX_PLAYERS; i++)
  50. {
  51. if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
  52. {
  53. GetPlayerPos(i, posx, posy, posz);
  54. tempposx = (oldposx -posx);
  55. tempposy = (oldposy -posy);
  56. tempposz = (oldposz -posz);
  57. if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  58. {
  59. SendClientMessage(i, col1, string);
  60. }
  61. else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  62. {
  63. SendClientMessage(i, col2, string);
  64. }
  65. else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  66. {
  67. SendClientMessage(i, col3, string);
  68. }
  69. else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  70. {
  71. SendClientMessage(i, col4, string);
  72. }
  73. else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  74. {
  75. SendClientMessage(i, col5, string);
  76. }
  77. }
  78. }
  79. }
  80. return 1;
  81. }
  82. ////////////////////////////////////////////////////////////////////////////////
  83. //moje boje
  84. #define CRVENA 0xFFF4040B
  85. #define ZUTA 0xFFF7EB02
  86. #define PLAVA 0xFF1800F9
  87. #define SVJETLOPLAVA 0xFF00E0F9
  88. #define ZELENA 0xFF01BA3E
  89. #define LJUBICASTA 0xFF763F8B
  90.  
  91. //REG/LOG-------------------------------------------------------------------------
  92. //Za dodavati nove funkcije za spremati statistike traži "//Statistika" //|
  93. //|
  94. forward KickTimer(); // Timer za kickati igrača //|
  95. forward MaxLoginTimer(); // Timer za provjeru koliko se igrač logira //|
  96. //|
  97. enum startpos { Float:posx, Float:posy, Float:posz, Float:posa, interior, vw }; //|
  98. new Float:StartPos[startpos] = {1714.4663,-1924.8250,13.5667,359.1107, 0, 0}; //|
  99. /*Ovo je pozicija na kojoj se igrač prvi puta spawna. //|
  100. POSX POSY POSZ POSA INTERIOR VW (POSA - facing angle) //|
  101. Podesite si za svoj server*/ //|
  102. //--------------------------------------------------------------------------------
  103. new IsLogged[MAX_PLAYERS];
  104. new file[256];
  105. ///////////////////////////////fowardi//////////////////////////////////////////
  106. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  107. forward ProxDetectorS(Float:radi, playerid, targetid);
  108. ////////////////////////////////////////////////////////////////////////////////
  109. main()
  110. {
  111. print("\n----------------------------------");
  112. print(" Orion Mark RolePlay v2.0 ");
  113. print("----------------------------------\n");
  114. }
  115. /////////enum
  116. enum pInfo
  117. {
  118. pMember,
  119. pLeader,
  120. pAdminLevel,
  121. pCash,
  122. pScore,
  123. pColor,
  124. pJob,
  125. pVw,
  126. pInt,
  127. pWarns,
  128. pFleader,
  129. pFmember,
  130. pTaxi
  131. }
  132. ///////////////////
  133. new PlayerInfo[MAX_PLAYERS][pInfo];
  134. //////////////////
  135. new TaxiVozilo[6];
  136. //================//
  137. stock ArrayVozila(carid)
  138. {
  139. for(new i = 0; i < sizeof(TaxiVozilo); i++)
  140. {
  141. if(carid == TaxiVozilo[i]) return 1;
  142. }
  143. return 0;
  144. }
  145. //////////////////
  146. new posaopickup;
  147. /////////////////
  148.  
  149. public OnGameModeInit()
  150. {
  151. //REG/LOG---------------------------------------------------------------------
  152. SetTimer("KickTimer", 1000, 1); //|
  153. SetTimer("MaxLoginTimer", 1000, 1); //|
  154. //----------------------------------------------------------------------------
  155. SetGameModeText("Orion Mark V2.0 @2013@");
  156. AddPlayerClass(0, 1730.4921,-1912.3363, 13.5628, 88.7482, 0, 0, 0, 0, 0, 0);
  157. /////////////////////////////////////mapanje by mato(MTA) kolodvor//////////////
  158. TaxiVozilo[0] = AddStaticVehicleEx(420,1778.3000500,-1888.0999800,13.2000000,268.2500000,215,142,15); //Taxi
  159. TaxiVozilo[1] = AddStaticVehicleEx(420,1778.0999800,-1892.1999500,13.2000000,266.0000000,215,142,15); //Taxi
  160. TaxiVozilo[2] = AddStaticVehicleEx(420,1777.8000500,-1896.3000500,13.2000000,266.5000000,215,142,15); //Taxi
  161. TaxiVozilo[3] = AddStaticVehicleEx(420,1777.5999800,-1900.1999500,13.2000000,268.7500000,215,142,15); //Taxi
  162. TaxiVozilo[4] = AddStaticVehicleEx(586,1776.4000200,-1903.3000500,13.0000000,268.7500000,189,190,15); //Wayfarer
  163. TaxiVozilo[5] = AddStaticVehicleEx(586,1776.4000200,-1906.0999800,13.0000000,269.0000000,132,148,15); //Wayfarer
  164. ////////////////////////////////////////////////////////////////////////////////
  165. CreateDynamicObject(4641, 1809.20, -1885.60, 14.10, 0.00, 0.00, 0.00);
  166. CreateDynamicObject(2420, 1806.10, -1935.50, 12.40, 0.00, 0.00, 180.25);
  167. CreateDynamicObject(1337, 1800.27, -1934.96, 12.90, 0.00, 0.00, 0.00);
  168. CreateDynamicObject(994, 1774.60, -1907.60, 12.40, 0.00, 0.00, 0.00);
  169. CreateDynamicObject(1251, 1777.80, -1904.70, 12.50, 0.00, 0.00, 88.25);
  170. CreateDynamicObject(1251, 1777.40, -1902.00, 12.50, 0.00, 0.00, 86.75);
  171. CreateDynamicObject(1251, 1777.80, -1898.40, 12.50, 0.00, 0.00, 85.00);
  172. CreateDynamicObject(1251, 1777.60, -1894.20, 12.70, 0.00, 0.00, 268.50);
  173. CreateDynamicObject(1251, 1777.90, -1890.20, 12.50, 0.00, 358.50, 268.00);
  174. CreateDynamicObject(3484, 2891.00, -1991.10, 16.80, 0.00, 0.00, 269.00);
  175. CreateDynamicObject(16089, 2907.10, -1983.60, 1.80, 0.00, 0.00, 0.00);
  176. CreateDynamicObject(16089, 2906.80, -1998.90, 1.80, 0.00, 0.00, 0.00);
  177. CreateDynamicObject(19464, 1850.19, -1902.06, 15.74, 0.00, 0.00, 269.97);
  178. CreateDynamicObject(19464, 1847.47, -1905.06, 15.78, 0.00, 0.00, 0.81);
  179. CreateDynamicObject(19464, 1853.17, -1904.98, 15.72, 0.00, 0.00, 0.00);
  180. CreateDynamicObject(19465, 1850.33, -1907.95, 16.50, 0.00, 0.00, 270.05);
  181. CreateDynamicObject(1491, 1849.58, -1908.11, 13.99, 0.00, 0.00, 0.10);
  182. CreateDynamicObject(19464, 1850.65, -1904.99, 18.24, 0.00, 90.00, 360.00);
  183. CreateDynamicObject(19464, 1850.00, -1905.03, 18.24, 0.00, 90.00, 0.00);
  184. ///////////////////////////////////posao test///////////////////////////////////
  185. posaopickup = CreateDynamicPickup(1274, 1, 1752.5016,-1903.1155,13.5630); // tu stavi koordinate gdje zelis da ti bude pickup
  186. posaopickup = CreateDynamicPickup(1274, 1, -382.7358,-1438.7871,26.2243); // tu stavi koordinate gdje zelis da ti bude pickup
  187. posaopickup = CreateDynamicPickup(1274, 1, 1545.9424,-1675.2585,13.5613); // tu stavi koordinate gdje zelis da ti bude pickup
  188. ////////////////////////////////////////////////////////////////////////////////
  189. return 1;
  190. }
  191.  
  192. public OnGameModeExit()
  193. {
  194. return 1;
  195. }
  196.  
  197. /*public OnPlayerRequestClass(playerid, classid)
  198. {
  199. SetPlayerPos(playerid, 1730.4921,-1912.3363,13.5628);
  200. SetPlayerCameraPos(playerid, 1730.4921,-1912.3363,13.5628);
  201. SetPlayerCameraLookAt(playerid, 1730.4921,-1912.3363,13.5628);
  202. return 1;
  203. }*/
  204.  
  205. public OnPlayerConnect(playerid)
  206. {
  207. //LOG/REG-----------------------------------------
  208. //Statistika //|
  209. SetPVarInt(playerid, IS_LOGGED_VAR, 0); //|
  210. SetPVarInt(playerid, "needkick", 0); //|
  211. SetPVarInt(playerid, "regpass", 0); //|
  212. SetPVarInt(playerid, "wrongpass", 0); //|
  213. SetPVarInt(playerid, "logintime", -1); //|
  214. GIVE_MONEY_COMMAND(playerid, 0); //|
  215. SET_SCORE_COMMAND(playerid, 0); //|
  216. SetPVarFloat(playerid, "posx", 0.0); //|
  217. SetPVarFloat(playerid, "posy", 0.0); //|
  218. SetPVarFloat(playerid, "posz", 0.0); //|
  219. SetPVarFloat(playerid, "posa", 0.0); //|
  220. SetPVarInt(playerid, INTERIOR_VAR, 0); //|
  221. SetPVarInt(playerid, VW_VAR, 0); //|
  222. //LOG/REG--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  223. new str[64], str2[300]; //|
  224. format(str, sizeof(str), "/Users/%s.ini", pName(playerid)); //|
  225. if(!dini_Exists(str)) { //|
  226. format(str2, sizeof(str2), "%s dobrodošao na %s !\n\nPravila:\n> RolePlay[RP]\n> Meta Gaming[MG]\n>Power Gaming[PG]\n>Death Match[DM]\n>Bunny Hop[BH]\n>Spawn Kill[SK]\n>Drive By[DB]\n>Revenge Kill[RK]\n>Bug Abuse[BU]\n>Ninja Jacking[NJ]\n\nDali prihvačaš navedena opravila ?\n\nHint: ukoliko ne prihvatis neces moci igrati na ovom serveru !",//|
  227. pName(playerid), SERVER_NAME); //|
  228. ShowPlayerDialog(playerid, REGISTER_DIALOG, DIALOG_STYLE_MSGBOX, "Dobrodošao !", str2, "Prihvacam", "Odustani"); //|
  229. }else{ //|
  230. ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_PASSWORD, "Logiranje", "Pronađen je tvoj korisnicki racun !\n\nMolimo te upisi lozinku:", "Logiraj se", "Odustani"); //|
  231. return 1; } //|
  232. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  233. RemoveBuildingForPlayer(playerid, 3668, 1852.8047, -1909.7969, 16.5000, 0.25);
  234. RemoveBuildingForPlayer(playerid, 3587, 1852.8047, -1909.7969, 16.5000, 0.25);/*3587*/
  235. return 1;
  236. }
  237.  
  238. public OnPlayerDisconnect(playerid, reason)
  239. {
  240. //LOG/REG-----------------
  241. LogOutPlayer(playerid); //|
  242. //------------------------
  243. dini_IntSet(file,"Cash",GetPlayerMoney(playerid));
  244. dini_IntSet(file,"Score",GetPlayerScore(playerid));
  245. dini_IntSet(file,"Color",GetPlayerColor(playerid));
  246. dini_IntSet(file,"AdminLevel",PlayerInfo[playerid][pAdminLevel]);
  247. dini_IntSet(file,"Police",PlayerInfo[playerid][pLeader]);
  248. dini_IntSet(file,"Job",PlayerInfo[playerid][pJob]);
  249. dini_IntSet(file,"Vw",GetPlayerVirtualWorld(playerid));
  250. dini_IntSet(file,"Int",GetPlayerInterior(playerid));
  251. dini_IntSet(file,"Warns",PlayerInfo[playerid][pWarns]);
  252. dini_IntSet(file,"Fleader",PlayerInfo[playerid][pFleader]);
  253. dini_IntSet(file,"Fmember",PlayerInfo[playerid][pFmember]);
  254. IsLogged[playerid] = 0;
  255. return 1;
  256. }
  257.  
  258. public OnPlayerSpawn(playerid) {
  259. //REG/LOG---------------------------------------------------------------------
  260. new str[64]; //|
  261. format(str, sizeof(str), "/Users/%s.ini", pName(playerid)); //|
  262. if(dini_Int(str, "firstspawn") == 1) { //|
  263. SetPlayerPos(playerid, StartPos[posx], StartPos[posy], StartPos[posz]); //|
  264. SetPlayerFacingAngle(playerid, StartPos[posa]); //|
  265. SetPlayerInterior(playerid, StartPos[interior]); //|
  266. SetPlayerVirtualWorld(playerid, StartPos[vw]); //|
  267. dini_IntSet(str, "firstspawn", 0); } //|
  268. //----------------------------------------------------------------------------
  269. return 1; }
  270.  
  271. public OnPlayerDeath(playerid, killerid, reason)
  272. {
  273. return 1;
  274. }
  275.  
  276. public OnVehicleSpawn(vehicleid)
  277. {
  278. return 1;
  279. }
  280.  
  281. public OnVehicleDeath(vehicleid, killerid)
  282. {
  283. return 1;
  284. }
  285.  
  286. public OnPlayerText(playerid, text[])
  287. {
  288. return 1;
  289. }
  290.  
  291. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  292. {
  293. return 1;
  294. }
  295.  
  296. public OnPlayerExitVehicle(playerid, vehicleid)
  297. {
  298. return 1;
  299. }
  300.  
  301. public OnPlayerStateChange(playerid, newstate, oldstate)
  302. {
  303. if(PlayerInfo[playerid][pLeader] == 0 || PlayerInfo[playerid][pTaxi] == 0)
  304. {
  305. }
  306. new vozilo= GetPlayerVehicleID(playerid);
  307. if(newstate == PLAYER_STATE_DRIVER)
  308. {
  309. if(ArrayVozila(vozilo))
  310. {
  311. new Float:x, Float:y, Float:z;
  312. GameTextForPlayer(playerid, "~w~Zakljucano~n~~b~Niste ovlasteni!!", 4000, 5);
  313. GetPlayerPos(playerid, x, y, z);
  314. SetPlayerPos(playerid, x-2, y, z+1);
  315. }
  316. }
  317. return 1;
  318. }
  319.  
  320. public OnPlayerEnterCheckpoint(playerid)
  321. {
  322. return 1;
  323. }
  324.  
  325. public OnPlayerLeaveCheckpoint(playerid)
  326. {
  327. return 1;
  328. }
  329.  
  330. public OnPlayerEnterRaceCheckpoint(playerid)
  331. {
  332. return 1;
  333. }
  334.  
  335. public OnPlayerLeaveRaceCheckpoint(playerid)
  336. {
  337. return 1;
  338. }
  339.  
  340. public OnRconCommand(cmd[])
  341. {
  342. return 1;
  343. }
  344.  
  345. public OnPlayerRequestSpawn(playerid)
  346. {
  347. //LOG/REG------------------------------------------------
  348. if(!GetPVarInt(playerid, IS_LOGGED_VAR)) { return 0; } //|
  349. //-------------------------------------------------------
  350. return 1;
  351. }
  352.  
  353. public OnObjectMoved(objectid)
  354. {
  355. return 1;
  356. }
  357.  
  358. public OnPlayerObjectMoved(playerid, objectid)
  359. {
  360. return 1;
  361. }
  362.  
  363. public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  364. {
  365. if(pickupid == posaopickup)
  366. {
  367. if(IsPlayerInRangeOfPoint(playerid, 5,1714.4663,-1924.8250,13.5667) || IsPlayerInRangeOfPoint(playerid, 5,382.7358,-1438.7871,26.2243) || IsPlayerInRangeOfPoint(playerid, 5,1752.5016,-1903.1155,13.5630))
  368. {
  369. GameTextForPlayer(playerid, "~y~Da se zaposlis w~Kucaj /posao", 5000, 3);
  370. }
  371. }
  372. return 1;
  373. }
  374.  
  375. public OnVehicleMod(playerid, vehicleid, componentid)
  376. {
  377. return 1;
  378. }
  379.  
  380. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  381. {
  382. return 1;
  383. }
  384.  
  385. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  386. {
  387. return 1;
  388. }
  389.  
  390. public OnPlayerSelectedMenuRow(playerid, row)
  391. {
  392. return 1;
  393. }
  394.  
  395. public OnPlayerExitedMenu(playerid)
  396. {
  397. return 1;
  398. }
  399.  
  400. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  401. {
  402. return 1;
  403. }
  404.  
  405. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  406. {
  407. return 1;
  408. }
  409.  
  410. public OnRconLoginAttempt(ip[], password[], success)
  411. {
  412. return 1;
  413. }
  414.  
  415. public OnPlayerUpdate(playerid)
  416. {
  417. return 1;
  418. }
  419.  
  420. public OnPlayerStreamIn(playerid, forplayerid)
  421. {
  422. return 1;
  423. }
  424.  
  425. public OnPlayerStreamOut(playerid, forplayerid)
  426. {
  427. return 1;
  428. }
  429.  
  430. public OnVehicleStreamIn(vehicleid, forplayerid)
  431. {
  432. return 1;
  433. }
  434.  
  435. public OnVehicleStreamOut(vehicleid, forplayerid)
  436. {
  437. return 1;
  438. }
  439.  
  440. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
  441. //===============
  442. //REG/LOG POČETAK
  443. //===============
  444. //--------------------------------------------------------------------------
  445. if(dialogid == REGISTER_DIALOG) {
  446. if(!response) { SendClientMessage(playerid, kickboja, "KICK"textboja": Kickan si sa servera jer nisi prihvatio pravila igre !"); SetPVarInt(playerid, "needkick", 1); return 1; }
  447. ShowPlayerDialog(playerid, REGISTER_DIALOG2, DIALOG_STYLE_INPUT, "Registracija", "Molimo te da upises lozinku.\n\nLozinku nemoj zaboraviti jer bez\nnje neces moci pristupiti svom racunu !", "Dalje", "Odustani");
  448. return 1; }
  449. //--------------------------------------------------------------------------
  450. if(dialogid == REGISTER_DIALOG2) {
  451. if(!response) { SendClientMessage(playerid, kickboja, "KICK"textboja": Kickan si sa servera jer si odustao od registracije !"); SetPVarInt(playerid, "needkick", 1); return 1; }
  452. new str[256];
  453. if(strlen(inputtext) < MIN_PASS || strlen(inputtext) > MAX_PASS) {
  454. format(str, sizeof(str), "Lozinka mora imati najmanje %d znakova a najviše %d znakova !\n\nMolimo te da ponovno upises loziku !", MIN_PASS, MAX_PASS);
  455. ShowPlayerDialog(playerid, REGISTER_DIALOG2, DIALOG_STYLE_INPUT, "Registracija", str, "Dalje", "Odustani");
  456. return 1; }
  457. SetPVarInt(playerid, "regpass", udb_hash(inputtext));
  458. ShowPlayerDialog(playerid, REGISTER_DIALOG3, DIALOG_STYLE_INPUT, "Registracija", "Ponovi lozinku kako bi je potvrdio !", "Dalje", "Odustani");
  459. return 1; }
  460. //--------------------------------------------------------------------------
  461. if(dialogid == REGISTER_DIALOG3) {
  462. if(!response) { SendClientMessage(playerid, kickboja, "KICK"textboja": Kickan si sa servera jer si odustao od registracije !"); SetPVarInt(playerid, "needkick", 1); return 1; }
  463. new str[128];
  464. if(strlen(inputtext) < MIN_PASS || strlen(inputtext) > MAX_PASS) {
  465. format(str, sizeof(str), "Lozinka mora imati najmanje %d znakova a najviše %d znakova !\n\nMolimo te da ponovno upises loziku !", MIN_PASS, MAX_PASS);
  466. ShowPlayerDialog(playerid, REGISTER_DIALOG3, DIALOG_STYLE_INPUT, "Registracija", str, "Dalje", "Odustani");
  467. return 1; }
  468. if(udb_hash(inputtext) != GetPVarInt(playerid, "regpass")) return ShowPlayerDialog(playerid, REGISTER_DIALOG3, DIALOG_STYLE_INPUT, "Registracija", "Upisana lozinka se ne slaže sa prethodno upisanom lozinkom !", "Dalje", "Odustani");
  469. //----------------------------------------------------------------------
  470. new str2[64];
  471. format(str2, sizeof(str2), "/Users/%s.ini", pName(playerid));
  472. //Statistika
  473. dini_Create(str2);
  474. dini_IntSet(str2, "firstspawn", 1);
  475. dini_IntSet(str2, "lozinka", udb_hash(inputtext));
  476. dini_IntSet(str2, "money", GET_MONEY_COMMAND(playerid));
  477. dini_IntSet(str2, "score", GET_SCORE_COMMAND(playerid));
  478. dini_FloatSet(str2, "posx", StartPos[posx]);
  479. dini_FloatSet(str2, "posy", StartPos[posy]);
  480. dini_FloatSet(str2, "posz", StartPos[posz]);
  481. dini_FloatSet(str2, "posa", StartPos[posa]);
  482. dini_IntSet(str2, "inteiror", StartPos[interior]);
  483. dini_IntSet(str2, "vw", StartPos[vw]);
  484. //----------------------------------------------------------------------
  485. new str3[128], dan, mje, god, sat, minu, sec;
  486. gettime(sat, minu, sec); getdate(dan, mje, god);
  487. ClearText(playerid);
  488. SendClientMessage(playerid, -1, ""loginboja"________________________________________________________");
  489. SendClientMessage(playerid, -1, ""loginboja"SERVER"textboja": Uspješno si se registrirao !");
  490. format(str3, sizeof(str3), ""loginboja"DATUM"textboja": %d.%d.%d", dan, mje, god); SendClientMessage(playerid, -1, str3);
  491. format(str3, sizeof(str3), ""loginboja"VRIJEME"textboja": %d:%d:%d", sat, minu, sec); SendClientMessage(playerid, -1, str3);
  492. format(str3, sizeof(str3), ""loginboja"INFO"textboja": %s dobrodosao na %s !", pName(playerid), SERVER_NAME); SendClientMessage(playerid, -1, str3);
  493. format(str3, sizeof(str3), ""loginboja"PASSWORD"textboja": kada se registriraš pritisni (spawn) !", pName(playerid), SERVER_NAME); SendClientMessage(playerid, -1, str3);
  494. SendClientMessage(playerid, -1, ""loginboja"________________________________________________________");
  495. SetPVarInt(playerid, IS_LOGGED_VAR, 1);
  496. LoginPlayer(playerid);
  497. return 1; }
  498. //--------------------------------------------------------------------------
  499. if(dialogid == LOGIN_DIALOG) {
  500. if(!response) { SendClientMessage(playerid, kickboja, "KICK"textboja": Kickan si sa servera jer si odustao od logiranja !"); SetPVarInt(playerid, "needkick", 1); return 1; }
  501. new str[64];
  502. format(str, sizeof(str), "/Users/%s.ini", pName(playerid));
  503. //----------------------------------------------------------------------
  504. if(udb_hash(inputtext) != dini_Int(str, "lozinka")) {
  505. SetPVarInt(playerid, "wrongpass", GetPVarInt(playerid, "wrongpass")+1);
  506. if(GetPVarInt(playerid, "wrongpass") >= MAX_WRONG_PASS) { SendClientMessage(playerid, kickboja, "KICK"textboja": Kickan si sa servera jer si previše puta pogriješio lozinku !"); SetPVarInt(playerid, "needkick", 1); return 1; }
  507. new str2[256];
  508. format(str2, sizeof(str2), "Error: Pogriješio si lozinku !\n\nPokušaj: %d/%d\n\nMolimo te upisi valjanu lozinku !", GetPVarInt(playerid, "wrongpass"), MAX_WRONG_PASS);
  509. ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_PASSWORD, "Logiranje", str2, "Logiraj se", "Odustani");
  510. dini_Create(file);
  511. dini_IntSet(file, "Password", udb_hash(inputtext));
  512. dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0);
  513. dini_IntSet(file,"Police",PlayerInfo[playerid][pLeader]);
  514. dini_IntSet(file, "Cash",PlayerInfo[playerid][pCash] = 500);
  515. dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0);
  516. dini_IntSet(file, "Job",PlayerInfo[playerid][pJob] = 0);
  517. dini_IntSet(file, "Color",PlayerInfo[playerid][pColor] = 0);
  518. dini_IntSet(file, "Vw",PlayerInfo[playerid][pVw] = 0);
  519. dini_IntSet(file, "Int",PlayerInfo[playerid][pInt] = 0);
  520. dini_IntSet(file, "Warns",PlayerInfo[playerid][pWarns] = 0);
  521. dini_IntSet(file, "Fleader",PlayerInfo[playerid][pFleader] = 0);
  522. dini_IntSet(file, "Fmember",PlayerInfo[playerid][pFmember] = 0);
  523. return 1; }
  524. //----------------------------------------------------------------------
  525. new str3[128], dan, mje, god, sat, minu, sec;
  526. gettime(sat, minu, sec); getdate(dan, mje, god);
  527. ClearText(playerid);
  528. SendClientMessage(playerid, -1, ""loginboja"________________________________________________________");
  529. SendClientMessage(playerid, -1, ""loginboja"SERVER"textboja": Uspješno si se logirao !");
  530. format(str3, sizeof(str3), ""loginboja"DATUM"textboja": %d.%d.%d", dan, mje, god); SendClientMessage(playerid, -1, str3);
  531. format(str3, sizeof(str3), ""loginboja"VRIJEME"textboja": %d:%d:%d", sat, minu, sec); SendClientMessage(playerid, -1, str3);
  532. format(str3, sizeof(str3), ""loginboja"INFO"textboja": %s dobrodosao natrag na %s !", pName(playerid), SERVER_NAME); SendClientMessage(playerid, -1, str3);
  533. format(str3, sizeof(str3), ""loginboja"PASSWORD"textboja": kada se logiraš pritisni (spawn) !", pName(playerid), SERVER_NAME); SendClientMessage(playerid, -1, str3);
  534. SendClientMessage(playerid, -1, ""loginboja"________________________________________________________");
  535. SetPVarInt(playerid, IS_LOGGED_VAR, 1);
  536. LoginPlayer(playerid);
  537. IsLogged[playerid] = 1;
  538. SetPlayerMoney(playerid, dini_Int(file, "Cash"));
  539. SetPlayerScore(playerid, dini_Int(file, "Score"));
  540. SetPlayerColor(playerid, dini_Int(file, "Color"));
  541. SetPlayerVirtualWorld(playerid, dini_Int(file, "Vw"));
  542. SetPlayerInterior(playerid, dini_Int(file, "Int"));
  543. PlayerInfo[playerid][pJob] = dini_Int(file, "Job");
  544. PlayerInfo[playerid][pWarns] = dini_Int(file, "Warns");
  545. PlayerInfo[playerid][pFleader] = dini_Int(file, "Fleader");
  546. PlayerInfo[playerid][pFmember] = dini_Int(file, "Fmember");
  547. PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
  548. PlayerInfo[playerid][pLeader] = dini_Int(file, "Police");
  549. return 1; }
  550. //===============
  551. //REG/LOG ZAVRŠETAK
  552. //===============
  553. //--------------------------------------------------------------------------
  554. return 1; }
  555.  
  556. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  557. {
  558. return 1;
  559. }
  560.  
  561. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  562. {
  563. if(!success) return SendClientMessage(playerid, 0xF81414,"Upisali ste pogresnu komandu | Kucajte /komande za listu komandi!");
  564. return true;
  565. }
  566.  
  567. public KickTimer() { //LOG/REG
  568. for(new i=0;i<MAX_PLAYERS;i++) {
  569. if(IsPlayerConnected(i) && GetPVarInt(i, "needkick") != 0) {
  570. if(GetPVarInt(i, "needkick") == 1) { SetPVarInt(i, "needkick", 2);
  571. }else if(GetPVarInt(i, "needkick") == 2) { SetPVarInt(i, "needkick", 0); Kick(i); } } }
  572. return 1; }
  573.  
  574. //==============================================================================
  575.  
  576. public MaxLoginTimer() { //LOG/REG
  577. for(new i=0;i<MAX_PLAYERS;i++) {
  578. if(IsPlayerConnected(i) && GetPVarInt(i, "logintime") != -1) {
  579. SetPVarInt(i, "logintime", GetPVarInt(i, "logintime")+1);
  580. if(GetPVarInt(i, "logintime") >= MAX_LOGIN_TIME) { SendClientMessage(i, kickboja, "KICK"textboja": Kickan si sa servera jer se nisi ulogirao u zadanom vremenu !"); SetPVarInt(i, "needkick", 1); return 1; } } }
  581. return 1; }
  582.  
  583. //==============================================================================
  584.  
  585. stock pName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); return name; }
  586.  
  587. //==============================================================================
  588.  
  589. stock udb_hash(buf[]) { //LOG/REG
  590. new length=strlen(buf), s1 = 1, s2 = 0, n;
  591. for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; }
  592. return (s2 << 16) + s1; }
  593.  
  594. //==============================================================================
  595.  
  596. stock ClearText(playerid) { //LOG/REG
  597. for(new i=0;i<100;i++) { SendClientMessage(playerid, -1, " "); }
  598. return 1; }
  599.  
  600. //==============================================================================
  601.  
  602. stock LoginPlayer(playerid) { //LOG/REG
  603. if(GetPVarInt(playerid, IS_LOGGED_VAR) == 1) {
  604. new str[64];
  605. format(str, sizeof(str), "/Users/%s.ini", pName(playerid));
  606. //Statistika
  607. //----------------------------------------------------------------------
  608. GIVE_MONEY_COMMAND(playerid, dini_Int(str, "money"));
  609. SET_SCORE_COMMAND(playerid, dini_Int(str, "score"));
  610. #if defined SAVE_LAST_POS
  611. SetPVarFloat(playerid, "posx", dini_Float(str, "posx"));
  612. SetPVarFloat(playerid, "posy", dini_Float(str, "posy"));
  613. SetPVarFloat(playerid, "posz", dini_Float(str, "posz"));
  614. SetPVarFloat(playerid, "posa", dini_Float(str, "posa"));
  615. SetPVarInt(playerid, INTERIOR_VAR, dini_Int(str, "interior"));
  616. SetPVarInt(playerid, VW_VAR, dini_Int(str, "vw"));
  617. #endif
  618. //----------------------------------------------------------------------
  619. return 1; }
  620. return 1; }
  621.  
  622. //==============================================================================
  623.  
  624. stock LogOutPlayer(playerid) { //LOG/REG
  625. if(GetPVarInt(playerid, IS_LOGGED_VAR) == 1) {
  626. new str[64];
  627. format(str, sizeof(str), "/Users/%s.ini", pName(playerid));
  628. //----------------------------------------------------------------------
  629. //Statistika
  630. dini_IntSet(str, "money", GET_MONEY_COMMAND(playerid));
  631. dini_IntSet(str, "score", GET_SCORE_COMMAND(playerid));
  632. #if defined SAVE_LAST_POS
  633. new Float:aposx, Float:aposy, Float:aposz, Float:aposa;
  634. GetPlayerPos(playerid, aposx, aposy, aposz);
  635. GetPlayerFacingAngle(playerid, aposa);
  636. dini_FloatSet(str, "posx", aposx);
  637. dini_FloatSet(str, "posy", aposy);
  638. dini_FloatSet(str, "posz", aposz);
  639. dini_FloatSet(str, "posa", aposa);
  640. dini_IntSet(str, "interior", GetPlayerInterior(playerid));
  641. dini_IntSet(str, "vw", GetPlayerVirtualWorld(playerid));
  642. #endif
  643. //----------------------------------------------------------------------
  644. return 1; }
  645. return 1; }
  646. /////////////////////////////komande////////////////////////////////////////////
  647. //////////////////////////////admin sistem//////////////////////////////////////
  648. CMD:setskin(playerid, params[])
  649. {
  650. new ID,skinid,ime[MAX_PLAYER_NAME],ime1[MAX_PLAYER_NAME],s[68],s1[68];
  651. if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xC2A2DAAA, "Niste ovlasteni");
  652. if (sscanf(params, "ud", ID,skinid)) SendClientMessage(playerid, 0xC2A2DAAA, "Komanda: /setskin [IgracevID/DeoImena] [ID skina]");
  653. if (ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xAA3333AA, "[Greska]: Taj igrac je Offline !");
  654. GetPlayerName(playerid, ime, sizeof(ime));
  655. GetPlayerName(ID, ime1, sizeof(ime1));
  656. format(s, sizeof(s), "%s vam je promenio skin", ime);
  657. format(s1, sizeof(s1), "Promenili ste skin %s-u", ime1);
  658. SendClientMessage(ID, 0xC2A2DAAA, s);
  659. SendClientMessage(playerid, 0xC2A2DAAA, s1);
  660. SetPlayerSkin(ID, skinid);
  661. return true;
  662. }
  663. ////////////////////////////////////////////////////////////////////////////////
  664. COMMAND:makeadmin(playerid, params[])
  665. {
  666. new id;
  667. new AdminLevel2;
  668. if(IsPlayerConnected(id))
  669. {
  670. if(PlayerInfo[playerid][pAdminLevel] >= 1338 || IsPlayerAdmin(playerid))
  671. {
  672. if(!sscanf(params, "ui", id, AdminLevel2))
  673. {
  674. if((AdminLevel2 >= 1 && AdminLevel2 <= 1338) || AdminLevel2 == 0)
  675. {
  676. new string[64];
  677. new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
  678. GetPlayerName(playerid, name, sizeof(name));
  679. GetPlayerName(id, PlayerName, sizeof(PlayerName));
  680. format(string, sizeof(string), "Admin %s ti je dao admin level %d .", name, AdminLevel2);
  681. SendClientMessage(id, 0xD8D8D8FF, string);
  682. format(string, sizeof(string), "Dao si %d Admin level %s .", AdminLevel2, PlayerName);
  683. SendClientMessage(playerid, 0xD8D8D8FF, string);
  684. PlayerInfo[id][pAdminLevel] = AdminLevel2;
  685. return 1;
  686. }
  687. else return SendClientMessage(playerid, 0xD8D8D8FF, "Dostupni leveli: 1, 2, 3, 1337 i 1338.");
  688. }
  689. else return SendClientMessage(playerid, 0x00FF00FF, "Koristenje: /makeadmin [ID] [AdminLevel]");
  690. }
  691. else return SendClientMessage(playerid, 0xFF0000FF, "RCON admini SAMO");
  692. }
  693. else return SendClientMessage(playerid, 0xD8D8D8FF, "Pogresan ID");
  694. }
  695. ////////////////////////////////////////////////////////////////////////////////
  696. CMD:ah(playerid, params[])
  697. {
  698. if(PlayerInfo[playerid][pAdminLevel] < 1) return SendClientMessage(playerid, 0xFF1700EC, "Nisi admin.");
  699. SendClientMessage(playerid, 0xFF1800F9, "ADMIN LVL 1:/komanda");
  700. SendClientMessage(playerid, 0xFF1800F9, "ADMIN LVL 2:/komanda");
  701. SendClientMessage(playerid, 0xFF1800F9, "ADMIN LVL 3:/komanda");
  702. SendClientMessage(playerid, 0xFF1800F9, "ADMIN LVL 4:/komanda");
  703. SendClientMessage(playerid, 0xFF1800F9, "ADMIN LVL 5:/setskin");
  704. SendClientMessage(playerid, 0xFF1800F9, "ADMIN LVL 6:/makeadmin /admin /makepolice");
  705. SendClientMessage(playerid, 0xFF1800F9, "RCON ADMIN1:/napradar /unradar");
  706. return 1;
  707. }
  708. /////////////////////////////kraj admin sistema/////////////////////////////////
  709. ////////////////////////////ostalo//////////////////////////////////////////////
  710. CMD:admin(playerid, params[])
  711. {
  712. if(PlayerInfo[playerid][pAdminLevel] < 1338) return SendClientMessage(playerid, 0xFF1700EC, "Nisi admin level 1338!!!");
  713. SendClientMessage(playerid, 0x33CCFFAA, "Uspjesno se se obukli,dobili zivot,dobili armour i promjenili skin u STAF!");
  714. SetPlayerHealth(playerid, 100);
  715. SetPlayerArmour(playerid, 100);
  716. GivePlayerMoney(playerid, 10000000);
  717. SetPlayerSkin(playerid, 217);
  718. return 1;
  719. }
  720. /////////////////////////////////chat komande///////////////////////////////////
  721. CMD:me(playerid, params[])
  722. {
  723. new s[80], s1[180], pName[MAX_PLAYER_NAME];
  724. GetPlayerName(playerid, pName, sizeof(pName));
  725. if(sscanf(params, "s", s)) return SendClientMessage(playerid, 0xFFFFFFFF, "/me <tekst>");
  726. format(s1, sizeof(s1), "* %s %s", pName, s);
  727. ProxDetector(30, playerid, s1, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA, LJUBICASTA);
  728. return 1;
  729. }
  730. ////////////////////////////////////////////////////////////////////////////////
  731. CMD:b(playerid, params[])
  732. {
  733. new BChat[128], pName[MAX_PLAYER_NAME], Text[128];
  734. if(sscanf(params, "s[128]", Text)) return SendClientMessage(playerid, 0xFFFFFFFF, "{76EC00}Koristi |{FFFFFF} /b <txt>");
  735. GetPlayerName(playerid, pName, sizeof(pName));
  736. format(BChat, sizeof(BChat), "%s govori: (( %s ))", pName, params);
  737. ProxDetector(30.0, playerid, BChat, 0xFFFFFFFF, 0xEFEFEFFF, 0xDFDFDFFF, 0xCFCFCFFF, 0xBFBFBFFF);
  738. return 1;
  739. }
  740. ////////////////////////////////kraj chat komandi///////////////////////////////
  741. //gps
  742. CMD:gps(playerid, params[])
  743. {
  744. new gpslokacija;
  745. if(sscanf(params, "d", gpslokacija))
  746. {
  747. SCM(playerid, 0xFFFFFFFF,"{168BFF}INFO: {959561}/gps [Br.lokacije/off]");
  748. SCM(playerid, 0xFFFFFFFF,"{168BFF}Dostupno: {959561}1 - Vijecnica| 2 - Banka");
  749. SCM(playerid, 0xFFFFFFFF,"{168BFF}Dostupno: {959561}3 - Police Department| 4 - Auto Salon");
  750. SCM(playerid, 0xFFFFFFFF,"{168BFF}Dostupno: {959561}5 - Moto Salon| 6 - Glavni Burg");
  751. SCM(playerid, 0xFFFFFFFF,"{168BFF}Dostupno: {959561}7 - Auto Skola| 8 - Sports Club");
  752. SCM(playerid, 0xFFFFFFFF,"{168BFF}Dostupno: {959561}9 - Bolnica| 10 - Spawn");
  753. SCM(playerid, 0xFFFFFFFF,"{168BFF}Dostupno: {959561}11 - Aerodrom");
  754. SCM(playerid, 0xFFFFFFFF,"{168BFF}Koristi {959561}/gpsoff {168BFF}da iskljucis GPS sistem");
  755. }
  756. else
  757. {
  758. if(IsPlayerInAnyVehicle(playerid))
  759. {
  760. if(gpslokacija == 1)
  761. {
  762. SetPlayerCheckpoint(playerid, 1481.2250,-1738.8350,13.384, 8.0); //vi si kodove namjestite za svoj server!
  763. SCM(playerid, 0xFFFFFFFF, "Oznacio si Vijecnicu na mapi!");
  764.  
  765. }
  766. if(gpslokacija == 2)
  767. {
  768. SetPlayerCheckpoint(playerid, 1460.7777,-1030.8097,23.227, 8.0);
  769. SCM(playerid, 0xFFFFFFFF, "Oznacio si Banku na mapi!");
  770.  
  771. }
  772. if(gpslokacija == 3)
  773. {
  774. SetPlayerCheckpoint(playerid, 1533.0452,-1672.7207,12.9527, 8.0);
  775. SCM(playerid, 0xFFFFFFFF, "Oznacio si PD na mapi!");
  776.  
  777. }
  778. if(gpslokacija == 4)
  779. {
  780. SetPlayerCheckpoint(playerid, 346.2969,-1369.2968,14.3973, 8.0);
  781. SCM(playerid, 0xFFFFFFFF, "Oznacio si AutoSalon na mapi!");
  782.  
  783. }
  784. if(gpslokacija == 5)
  785. {
  786. SetPlayerCheckpoint(playerid, 2804.8381,-1449.8196,39.6055, 8.0);
  787. SCM(playerid, 0xFFFFFFFF, "Oznacio si Moto Salon na mapi!");
  788.  
  789. }
  790. if(gpslokacija == 6)
  791. {
  792. SetPlayerCheckpoint(playerid, 1219.3871,-927.8369,42.8433, 8.0);
  793. SCM(playerid, 0xFFFFFFFF, "Oznacio si Glavni Burg na mapi!");
  794.  
  795. }
  796. if(gpslokacija == 7)
  797. {
  798. SetPlayerCheckpoint(playerid, 1814.9171,-1882.8190,13.5781, 8.0);
  799. SCM(playerid, 0xFFFFFFFF, "Oznacio si Auto Skolu na mapi!");
  800.  
  801. }
  802. if(gpslokacija == 8)
  803. {
  804. SetPlayerCheckpoint(playerid, 1037.4189,-896.8679,42.3564, 8.0);
  805. SCM(playerid, 0xFFFFFFFF, "Oznacio si Sport Club na mapi!");
  806.  
  807. }
  808. if(gpslokacija == 9)
  809. {
  810. SetPlayerCheckpoint(playerid, 1188.9955,-1323.3768,13.1392, 8.0);
  811. SCM(playerid, 0xFFFFFFFF, "Oznacio si Bolnicu na mapi!");
  812.  
  813. }
  814. if(gpslokacija == 10)
  815. {
  816. SetPlayerCheckpoint(playerid, 1727.4374,-2286.6729,-3.1227, 8.0);
  817. SCM(playerid, 0xFFFFFFFF, "Oznacio si Lokaciju Spawna na mapi!");
  818.  
  819. }
  820. if(gpslokacija == 11)
  821. {
  822. SetPlayerCheckpoint(playerid,1961.8522,-2176.8342,13.1100, 8.0);
  823. SCM(playerid, 0xFFFFFFFF, "Oznacio si Aerodrom na mapi!");
  824.  
  825. }
  826. }
  827. }
  828. return 1;
  829. }
  830. //gpsoff
  831. CMD:gpsoff(playerid, params[])
  832. {
  833. if(IsPlayerConnected(playerid))
  834. {
  835. DisablePlayerCheckpoint(playerid);
  836. SendClientMessage(playerid, 0xFFFFFFFF, "Iskljucio si GPS!");
  837. }
  838. return 1;
  839. }
  840. ///boje i ostalo
  841. ////////////////////////////////////////////////////////////////////////////////
  842. CMD:komande(playerid, params[])
  843. {
  844. SendClientMessage(playerid, 0x33CCFFAA, "_______________________________________________");
  845. SendClientMessage(playerid, 0x33CCFFAA, "CHAT:/b,/me,");
  846. SendClientMessage(playerid, 0x33CCFFAA, "OSTALE KOMANDE:/gps,/q");
  847. SendClientMessage(playerid, 0x33CCFFAA, "ADMIN I GAMEMASTER:/ah i gmh");
  848. SendClientMessage(playerid, 0x33CCFFAA, "VOZILO:automobil palite sa SHIFT!");
  849. SendClientMessage(playerid, 0x33CCFFAA, "________________________________________________");
  850. return 1;
  851. }
  852. ////////////////////////////////////////////////////////////////////////////////
  853. CMD:s(playerid, params[])
  854. {
  855. new SChat[128], pName[MAX_PLAYER_NAME], Text[128];
  856. if(sscanf(params, "s[128]", Text)) return SendClientMessage(playerid, 0xFFFFFFFF, "{76EC00}Koristi |{FFFFFF} /s <txt>");
  857. GetPlayerName(playerid, pName, sizeof(pName));
  858. format(SChat, sizeof(SChat), "%s glasno govori: (( %s ))", pName, params);
  859. ProxDetector(30.0, playerid, SChat, 0xFFFFFFFF, 0xEFEFEFFF, 0xDFDFDFFF, 0xCFCFCFFF, 0xBFBFBFFF);
  860. return 1;
  861. }
  862. ////////////////////////////////////////////////////////////////////////////////
  863. CMD:makepolice(playerid, params[])
  864. {
  865. new id;
  866. new Policel2;
  867. if(IsPlayerConnected(id))
  868. {
  869. if(PlayerInfo[playerid][pAdminLevel] >= 1338 || IsPlayerAdmin(playerid))
  870. {
  871. if(!sscanf(params, "ui", id, Policel2))
  872. {
  873. if((Policel2 >= 1 && Policel2 <= 1338) || Policel2 == 0)
  874. {
  875. new string[64];
  876. new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
  877. GetPlayerName(playerid, name, sizeof(name));
  878. GetPlayerName(id, PlayerName, sizeof(PlayerName));
  879. format(string, sizeof(string), "Admin %s ti je dao police level %d .", name, Policel2);
  880. SendClientMessage(id, 0xD8D8D8FF, string);
  881. format(string, sizeof(string), "Dao si %d Police level %s .", Policel2, PlayerName);
  882. SendClientMessage(playerid, 0xD8D8D8FF, string);
  883. PlayerInfo[id][pAdminLevel] = Policel2;
  884. return 1;
  885. }
  886. else return SendClientMessage(playerid, 0xD8D8D8FF, "Dostupni leveli: 1, 2, 3, 1337 i 1338.");
  887. }
  888. else return SendClientMessage(playerid, 0x00FF00FF, "Koristenje: /police [ID] [AdminLevel]");
  889. }
  890. else return SendClientMessage(playerid, 0xFF0000FF, "RCON admini SAMO");
  891. }
  892. else return SendClientMessage(playerid, 0xD8D8D8FF, "Pogresan ID");
  893. }
  894. ////////////////////////////////////////////////////////////////////////////////
  895. CMD:policija(playerid, params[])
  896. {
  897. SetPlayerPos(playerid, 1545.9424,-1675.2585,13.5613);
  898. SCM(playerid, 0xFF8040FF, "Uspjesno ste se teleportirali do Policije");
  899. return 1;
  900. }
  901. ////////////////////////////////////////////////////////////////////////////////
  902. CMD:veh(playerid, params[])
  903. {
  904. new
  905. vID,
  906. Cl1,
  907. Cl2,
  908. Float:X,
  909. Float:Y,
  910. Float:Z,
  911. Float:Ang;
  912. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "[ERROR]: Nisi Admin!");
  913. if(sscanf(params, "ii", vID, Cl1, Cl2)) return SendClientMessage(playerid, 0xFF8040FF, "{0000FF}[OM:RP | KOMANDA]:{FF8040} /veh <vehicleid> <boja1> <boja2>");
  914. GetPlayerPos(playerid, X, Y, Z);
  915. GetPlayerFacingAngle(playerid, Ang);
  916. CreateVehicle(vID, X + 5.0, Y, Z, Ang, Cl1, Cl2, 1200000);
  917. return true;
  918. }
  919. ////////////////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement