Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.56 KB | None | 0 0
  1. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  2. {
  3. if( playertextid == RegisterTD[ playerid ][ 3 ] ) { // ovo
  4. new regstring[512], regname[64]; GetPlayerName(playerid,regname,sizeof(regname));
  5. format(regstring,sizeof(regstring),""BELA"________________________________________________\n\n"SPLAVA"Dobrodosao na Unicate Gaming RPG\n\nVase Ime i Prezime: "CRVENA"%s\n"BELA"Vas korisnicki racun nije registrovan...\nUpisite vasu lozinku da bi ste se registrovali\n\nLozinka: "CRVENA"Min 6/Max 26 znakova\n\n"BELA"________________________________________________",regname);
  6. ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,""BELA"Registracija",regstring,"Registracija","Izlaz");
  7. }
  8. if( playertextid == RegisterTD[ playerid ][ 11 ] ) { // ovo
  9. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 14 ], "Musko" );
  10. PlayerInfo[ playerid ][ pSkin ] = 240;
  11. PlayerInfo[ playerid ][ pSex ] = 1;
  12. RegSex[ playerid ] = 1;
  13. }
  14. if( playertextid == RegisterTD[ playerid ][ 12 ] ) { // ovo
  15. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 14 ], "Zensko" );
  16. PlayerInfo[ playerid ][ pSkin ] = 93;
  17. PlayerInfo[ playerid ][ pSex ] = 2;
  18. RegSex[ playerid ] = 2;
  19. }
  20. if( playertextid == RegisterTD[ playerid ][ 7 ] ) { // ovo
  21. ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, ""BELA"Odakle ste ?", ""SPLAVA"- "BELA"Srbija\n"SPLAVA"- "BELA"Bosna i Hercegovina\n"SPLAVA"- "BELA"Kosovo\n"SPLAVA"- "BELA"Crna Gora\n"SPLAVA"- "BELA"Hrvatska\n"SPLAVA"- "BELA"Makedonija\n"SPLAVA"- "BELA"Slovenija\n"SPLAVA"- "BELA"Ostalo", "Dalje", "Odustani");
  22. }
  23. if( playertextid == RegisterTD[ playerid ][ 9 ] ) { // ovo
  24. ShowPlayerDialog(playerid, 4, 1, ""BELA"Koliko imate godina?", ""ZUTA"U prazno polje ispod upisi koliko imas godina\n\n"BELA"Godine upisi brojem\n"CRVENA"Nemojte ici ispod 7 i vise od 60!", "Dalje", "Odustani");
  25. }
  26. if( playertextid == RegisterTD[ playerid ][ 5 ] ) { // ovo
  27. ShowPlayerDialog(playerid, 12, 1, ""BELA"Email", ""BELA"Unos email-a\n"ZUTA"U prazno polje ispod unesite vasu email adresu\n\n"BELA"Zamolili bih vas da unesete tacan email", "Dalje", "Odustani");
  28. }
  29. if( playertextid == RegisterTD[ playerid ][ 16 ] ) {
  30. if( InputPassword[ playerid ] == false ) return SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"Nisi odabrao lozinku." );
  31. if( ChoseCountry[ playerid ] == false ) return SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"Nisi odabrao poreklo." );
  32. if( InputAge[ playerid ] == false ) return SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"Nisi odabrao godine starosti." );
  33. if( InputMail[ playerid ] == false ) return SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"Nisi uneo email." );
  34. if( RegSex[ playerid ] == 0 ) return SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"Nisi odabrao drzavu." );
  35. CancelSelectTextDraw( playerid );
  36. for(new i = 0; i < 21; i ++) {
  37. PlayerTextDrawHide( playerid, RegisterTD[ playerid ][ i ] );
  38. }
  39. //for(new i = 0; i < 30; i ++) {
  40. //PlayerTextDrawHide( playerid, LoginTD[ playerid ][ i ] );
  41. //}
  42. //PlayerTextDrawHide( playerid, LoginTD[ playerid ][ 18 ] );
  43. //PlayerTextDrawHide( playerid, LoginTD[ playerid ][ 19 ] );
  44. new INI:File = INI_Open(Korisnici(playerid));
  45. INI_SetTag(File,"data");
  46. INI_WriteInt(File,"Password", udb_hash( PlayerInfo[ playerid ][ pPass ] ) );
  47. INI_WriteInt(File,"NovacDzep",0);
  48. INI_WriteInt(File,"Admin",0);
  49. INI_WriteInt(File,"Ubistava",0);
  50. INI_WriteInt(File,"Smrti",0);
  51. INI_WriteInt(File,"Level",1);
  52. INI_WriteInt(File,"GameMaster",0);
  53. INI_WriteInt(File,"Skin", PlayerInfo[ playerid ][ pSkin ]);
  54. INI_WriteInt(File,"Godine", PlayerInfo[ playerid ][ pGodine ]);
  55. INI_WriteInt(File,"Drzava", PlayerInfo[ playerid ][ pDrzava ]);
  56. INI_WriteInt(File,"Pol", PlayerInfo[ playerid ][ pSex ]);
  57. INI_WriteInt(File,"Tutorial",0);
  58. INI_WriteInt(File,"Email",0);
  59. INI_WriteInt(File,"Lider",0);
  60. INI_WriteInt(File,"Clan",0);
  61. INI_WriteInt(File,"Rank",0);
  62. INI_WriteInt(File,"Mutiran",0);
  63. INI_WriteInt(File,"NovacBanka",0);
  64. INI_WriteInt(File,"Warn",0);
  65. INI_WriteInt(File,"BankovniRacun",0);
  66. INI_WriteInt(File,"Zatvor",0);
  67. INI_WriteInt(File,"ZatvorenVreme",0);
  68. INI_WriteInt(File,"Respekti",0);
  69. INI_WriteInt(File,"UhapsenPuta",0);
  70. INI_WriteInt(File,"Droga",0);
  71. INI_WriteInt(File,"Mats",0);
  72. INI_WriteInt(File,"PayDayPoeni",0);
  73. INI_WriteInt(File,"SatiIgre",0);
  74. INI_WriteInt(File,"IznosRate",0);
  75. INI_WriteInt(File,"IznosKredita",0);
  76. INI_WriteInt(File,"PreostaloZaOtplatu",0);
  77. INI_WriteInt(File,"ADozvola",0);
  78. INI_WriteInt(File,"KamionDozvola",0);
  79. INI_WriteInt(File,"AvionDozvola",0);
  80. INI_WriteInt(File,"MotorDozvola",0);
  81. INI_WriteInt(File,"BrodDozvola",0);
  82. INI_WriteInt(File,"GunDozvola",0);
  83. INI_WriteInt(File,"PosedovanjeFirme",-1);
  84. INI_WriteInt(File,"Mobilni",0);
  85. INI_WriteInt(File,"Imenik",0);
  86. INI_WriteInt(File,"MobKredit",0);
  87. INI_WriteInt(File,"Cigare",0);
  88. INI_WriteInt(File,"Upaljac",0);
  89. INI_WriteInt(File,"Kanap",0);
  90. INI_WriteInt(File,"Naocare",0);
  91. INI_WriteInt(File,"Sat",0);
  92. INI_WriteInt(File,"BorbeniStil",4);
  93. INI_WriteInt(File,"Posao",0);
  94. INI_WriteInt(File,"Hrana",0);
  95. INI_WriteInt(File,"PosedovanjeKuce",-1);
  96. INI_WriteInt(File,"ProveraSpawna",0);
  97. INI_WriteInt(File,"Rent",-1);
  98. INI_WriteInt(File,"PosedovanjeStana",-1);
  99. INI_WriteInt(File,"PosedovanjeVikendice",-1);
  100. INI_WriteInt(File,"OrgUgovor",0);
  101. INI_WriteInt(File,"PosaoUgovor",0);
  102. INI_WriteInt(File,"PosedovanjeAuta",-1);
  103. INI_WriteInt(File,"DzeparosVreme",0);
  104. INI_WriteInt(File,"PosedovanjeMotora",-1);
  105. INI_WriteInt(File,"Kaciga",-1);
  106. INI_WriteInt(File,"PosedovanjeBicikla",-1);
  107. INI_WriteInt(File,"PosedovanjeAviona",-1);
  108. INI_WriteInt(File,"PosedovanjePlovila",-1);
  109. INI_WriteInt(File,"DonatorBodovi", 0);
  110. INI_WriteInt(File,"Banovan",PlayerInfo[playerid][pBanovan]);
  111. INI_Close(File);
  112. PlayerInfo[ playerid ][ pNovacBanka ] = 0;
  113. PlayerInfo[ playerid ][ pLevel ] = 8;
  114. PlayerInfo[ playerid ][ pVip ] = 4;
  115. SetPlayerScore( playerid, PlayerInfo[ playerid ][ pLevel ] );
  116. PlayerInfo[ playerid ][ pTutorial ] = 0;
  117. PlayerInfo[ playerid ][ pNovacDzep ] = 1500000;
  118. PlayerInfo[ playerid ][ pProveraSpawna ] = SPAWN_NORMAL;
  119. GivePlayerMoney( playerid, PlayerInfo[ playerid ][ pNovacDzep ] );
  120. SetPlayerSkin( playerid, PlayerInfo[ playerid ][ pSkin ] );
  121.  
  122. TutorialTimer[playerid] = SetTimerEx("Tutorijal",465, false, "ii", playerid, 1 );
  123. }
  124. //if( playertextid == RegisterTD[ playerid ][ 18 ] ) {
  125. //SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"Prekinuli ste registraciju i kickovani ste");
  126. //freeze[playerid] = SetTimerEx("KonektKick", 500, 0, "d", playerid);
  127. //}
  128.  
  129.  
  130. if(playertextid == mdct[3])
  131. {
  132. SPD(playerid,54,DSI,""BELA"Dosije",""PPLAVA"Unesite ID igraca kome zelite da ocistite wanted\n"BELA"NAPOMENA: "PPLAVA"Ciscenje wanteda vide svi clanovi!","Unesi","Izlaz");
  133. return 1;
  134. }
  135. if(playertextid == mdct[4])
  136. {
  137. SPD(playerid,56,DSI,""BELA"Wanted Igraca",""PPLAVA"Unesite ID igraca kome zelis da das wanted level!","Unesi","Izlaz");
  138. return 1;
  139. }
  140. if(playertextid == mdct[5])
  141. {
  142. SPD(playerid,58,DSI,""BELA"Dosije",""PPLAVA"Unesite ID igraca ciji zelis da proveris dosije...","Unesi","Izlaz");
  143. return 1;
  144. }
  145. if(playertextid == mdct[6])
  146. {
  147. SPD(playerid,60,DSI,""BELA"Lociranje Igraca",""PPLAVA"Unesite ID igraca kojeg zelis da lociras ukoliko ima wanted level!","Unesi","Izlaz");
  148. return 1;
  149. }
  150. if(playertextid == mdct[7])
  151. {
  152. WantedLista(playerid);
  153. return 1;
  154. }
  155. if(playertextid == mdct[9])
  156. {
  157. CancelSelectTextDraw(playerid); MDC[playerid] = 0;
  158. for(new i = 0; i < 10; i++) { PlayerTextDrawHide(playerid,mdct[i]); }
  159. return 1;
  160. }
  161. if(playertextid == Bankomat[2][playerid])
  162. {
  163. if(PlayerInfo[playerid][pBankovniRacun] == 0) return SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"Nemate bankovni racun!");
  164. SPD(playerid, 318, DSI,""SRWBOJA"Podizanje novca",""BELA"Unesi koliko zelis novca da podignes sa vaseg racuna...","Podigni","Izlaz");
  165. return 1;
  166. }
  167. if(playertextid == Bankomat[3][playerid])
  168. {
  169. new string[100];
  170. if(PlayerInfo[playerid][pBankovniRacun] == 0) return SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"Nemate bankovni racun!");
  171. format(string, sizeof(string), ""BELA"Imate "ZELENA"%d$ "BELA"novca na vasem racunu...", PlayerInfo[playerid][pNovacBanka]);
  172. SPD(playerid, 320, DIALOG_STYLE_MSGBOX, ""ZELENA"Stanje Racuna", string, "Ok", "Izlaz");
  173. return 1;
  174. }
  175. if(playertextid == Bankomat[7][playerid])
  176. {
  177. AtmTD(playerid, 2); CancelSelectTextDraw(playerid); BankomatMeni[playerid] = -1;
  178. return 1;
  179. }
  180. return 1;
  181. }
  182.  
  183. fDialog(45) // ovo
  184. {
  185. TogglePlayerSpectating( playerid, true );
  186. InterpolateCameraPos(playerid, 316.629119, -2347.745361, -2.533203, 343.586669, -1786.615478, 40.193359, 20000);
  187. InterpolateCameraLookAt(playerid, 316.142669, -2342.800292, -3.089434, 344.673248, -1791.454101, 39.555686, 20000);
  188. OcistiChat( playerid, 25 );
  189. for(new i = 0; i < 20; i ++) {
  190. PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ i ] );
  191. }
  192. //for(new i = 0; i < 30; i ++) {
  193. //PlayerTextDrawShow( playerid, LoginTD[ playerid ][ i ] );
  194. //}
  195. //PlayerTextDrawShow( playerid, LoginTD[ playerid ][ 18 ] );
  196. //PlayerTextDrawShow( playerid, LoginTD[ playerid ][ 19 ] );
  197. //PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 62 ], GetName( playerid ) );
  198. SelectTextDraw( playerid, GREEN );
  199. return 1;
  200. }
  201.  
  202. fDialog(5)
  203. {
  204. if(!response) return Kick(playerid);
  205. switch(listitem)
  206. {
  207. case 0:
  208. {
  209. PlayerInfo[playerid][pDrzava] = 1;
  210. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 8 ], "Srbija" );
  211. ChoseCountry[ playerid ] = true;
  212. SelectTextDraw( playerid, GREEN );
  213. }
  214. case 1:
  215. {
  216. PlayerInfo[playerid][pDrzava] = 2; //Bosna
  217. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 8 ], "Bosna" );
  218. ChoseCountry[ playerid ] = true;
  219. SelectTextDraw( playerid, GREEN );
  220. }
  221. case 2:
  222. {
  223. PlayerInfo[playerid][pDrzava] = 3; //Kosovo
  224. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 8 ], "Kosovo" );
  225. ChoseCountry[ playerid ] = true;
  226. SelectTextDraw( playerid, GREEN );
  227. }
  228. case 3:
  229. {
  230. PlayerInfo[playerid][pDrzava] = 4; // Crna Gora
  231. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 8 ], "Crna Gora" );
  232. ChoseCountry[ playerid ] = true;
  233. SelectTextDraw( playerid, GREEN );
  234. }
  235. case 4:
  236. {
  237. PlayerInfo[playerid][pDrzava] = 5; //Hrvatska
  238. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 8 ], "Hrvatska" );
  239. ChoseCountry[ playerid ] = true;
  240. SelectTextDraw( playerid, GREEN );
  241. }
  242. case 5:
  243. {
  244. PlayerInfo[playerid][pDrzava] = 6; //Makedonija
  245. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 8 ], "Makedonija" );
  246. ChoseCountry[ playerid ] = true;
  247. SelectTextDraw( playerid, GREEN );
  248. }
  249. case 6:
  250. {
  251. PlayerInfo[playerid][pDrzava] = 7; //Slovenija
  252. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 8 ], "Slovenija" );
  253. ChoseCountry[ playerid ] = true;
  254. SelectTextDraw( playerid, GREEN );
  255. }
  256. case 7:
  257. {
  258. PlayerInfo[playerid][pDrzava] = 8; //Ostalo
  259. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 8 ], "Ostalo" );
  260. ChoseCountry[ playerid ] = true;
  261. SelectTextDraw( playerid, GREEN );
  262. }
  263. }
  264. return 1;
  265. }
  266.  
  267. fDialog(4) // ovo
  268. {
  269. if( !response ) return Kick(playerid);
  270. new godine;
  271. godine = strval( inputtext );
  272. if( godine < 7 || godine > 60 ) {
  273. SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"ne mozete ici ispod 7 i vise od 60 godina!");
  274. ShowPlayerDialog(playerid, 4, 1, ""BELA"Koliko imate godina?", ""ZUTA"U prazno polje ispod upisi koliko imas godina\n\n"BELA"Godine upisi brojem\n"CRVENA"Nemojte ici ispod 7 i vise od 60!", "Dalje", "Odustani");
  275. return 1;
  276. }
  277. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 10 ], inputtext );
  278. PlayerInfo[ playerid ][ pGodine ] = godine;
  279. InputAge[ playerid ] = true;
  280. SelectTextDraw( playerid, GREEN );
  281. return 1;
  282. }
  283.  
  284. fDialog(12) // ovo
  285. {
  286. if(!response) return Kick(playerid);
  287. new emailp = strfind(inputtext, "@", true);
  288. if(strfind(inputtext,"%",true) != -1) return 0;
  289. if(emailp == -1)
  290. {
  291. SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"Netacan email | Upisite tacnu email adresu!");
  292. ShowPlayerDialog(playerid, 12, 1, ""BELA"Email", ""BELA"Unos email-a\n"ZUTA"U prazno polje ispod unesite vasu email adresu\n\n"BELA"Zamolili bih vas da unesete tacan email", "Dalje", "Odustani");
  293. return 1;
  294. }
  295. new emailp2 = strfind(inputtext, ".", true);
  296. if(emailp2 == -1)
  297. {
  298. SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"Netacan email | Upisite tacnu email adresu!");
  299. ShowPlayerDialog(playerid, 12, 1, ""BELA"Email", ""BELA"Unos email-a\n"ZUTA"U prazno polje ispod unesite vasu email adresu\n\n"BELA"Zamolili bih vas da unesete tacan email", "Dalje", "Odustani");
  300. return 1;
  301. }
  302. strmid( PlayerInfo[ playerid ][ pEmail ], inputtext, 0, strlen( inputtext ), 34 );
  303. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 6 ], inputtext );
  304. InputMail[ playerid ] = true;
  305. SelectTextDraw( playerid, GREEN );
  306. return 1;
  307. }
  308.  
  309. fDialog(1)
  310. {
  311. if(!response) return Kick(playerid);
  312. if(strfind(inputtext, "%") != -1)
  313. {
  314. new regstring[512], regname[64]; GetPlayerName(playerid,regname,sizeof(regname));
  315. format(regstring,sizeof(regstring),""BELA"________________________________________________\n\n"ZELENA"Dobrodosao na Unicate Gaming RPG\n\nVase Ime i Prezime: "CRVENA"%s\n"BELA"Vas korisnicki racun nije registrovan...\nUpisite vasu lozinku da bi ste se registrovali\n\nLozinka: "CRVENA"Min 6/Max 12 znakova\n\n"BELA"________________________________________________",regname);
  316. ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,""BELA"Registracija",regstring,"Registracija","Izlaz");
  317. SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"BUDALO!");
  318. }
  319. else if(strlen(inputtext) < MIN_DUZINA_LOZINKE)
  320. {
  321. new regstring[512], regname[64]; GetPlayerName(playerid,regname,sizeof(regname));
  322. format(regstring,sizeof(regstring),""BELA"________________________________________________\n\n"ZELENA"Dobrodosao na Unicate Gaming RPG\n\nVase Ime i Prezime: "CRVENA"%s\n"BELA"Vas korisnicki racun nije registrovan...\nUpisite vasu lozinku da bi ste se registrovali\n\nLozinka: "CRVENA"Min 6/Max 12 znakova\n\n"BELA"________________________________________________",regname);
  323. ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,""BELA"Registracija",regstring,"Registracija","Izlaz");
  324. SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"Lozinka mora imati minimum 6 znakova, a maximum 12 znakova!");
  325. }
  326. else if(strlen(inputtext) > MAX_DUZINA_LOZINKE)
  327. {
  328. new regstring[512], regname[64]; GetPlayerName(playerid,regname,sizeof(regname));
  329. format(regstring,sizeof(regstring),""BELA"________________________________________________\n\n"ZELENA"Dobrodosao na Unicate Gaming RPG\n\nVase Ime i Prezime: "CRVENA"%s\n"BELA"Vas korisnicki racun nije registrovan...\nUpisite vasu lozinku da bi ste se registrovali\n\nLozinka: "CRVENA"Min 6/Max 12 znakova\n\n"BELA"________________________________________________",regname);
  330. ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,""BELA"Registracija",regstring,"Registracija","Izlaz");
  331. SCM(playerid,-1,".::(( UG:RPG ))::."CRVENA"Lozinka mora imati minimum 6 znakova, a maximum 12 znakova!");
  332. }
  333. else if(strlen(inputtext) >= MIN_DUZINA_LOZINKE && strlen(inputtext) <= MAX_DUZINA_LOZINKE)
  334. { // ovo
  335. strmid( PlayerInfo[ playerid ][ pPass ], inputtext, 0, strlen( inputtext ), 50);
  336. PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 4 ], inputtext );
  337. InputPassword[ playerid ] = true;
  338. SelectTextDraw( playerid, GREEN );
  339. }
  340. return 1;
  341. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement