Guest User

Untitled

a guest
Oct 17th, 2015
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.69 KB | None | 0 0
  1.  
  2. //==================================[ Igraci ]==================================
  3.  
  4. #undef MAX_PLAYERS //
  5. #define MAX_PLAYERS 100
  6. #define MAX_POKUSAJ_LOGINA 3
  7. #define I_FILE "Korisnici/%s.ini"
  8. #define FILE_BAN "Banovani/%s.ini"
  9. #define A_FILE "Admini/%s.ini"
  10. #define LOZINKA_STRING 50
  11. #define POCETNI_M_SKIN 119
  12. #define POCETNI_Z_SKIN 93
  13. #define POCETNI_NOVAC 500
  14.  
  15. #define OBICAN_ZATVOR 1
  16. #define ALKATRAZ 2
  17.  
  18.  
  19. //////////////////////////////////////////////////////////////////////////////////////////////////////////////
  20.  
  21. public OnPlayerConnect( playerid ) {
  22. SetPlayerColor( playerid, 0xFFFFFF00 );
  23. /*if(!RolePlayImeProvera( ImeIgraca( playerid ) ) ) {
  24. SCM( playerid, CRVENA, "Dobili ste kick zbog krivo formatiranog imena!" );
  25. SCM( playerid, CRVENA, "Vase ime mora biti u formatu Ime_Prezime!" );
  26. Kick( playerid );
  27. return true; }*/
  28. if(!ProveraRPImena(playerid)) //NOVO
  29. {
  30. SCM( playerid, CRVENA, "Dobili ste kick zbog krivo formatiranog imena!" );
  31. SCM( playerid, CRVENA, "Vase ime mora biti u formatu Ime_Prezime!" );
  32. Kick( playerid );
  33. return 1;
  34. }
  35. ResetujVarijable( playerid );
  36. CreatePlayerTextDraws( playerid );
  37. OnOffZmigavci[playerid] = 0; //sistem zmigavaca
  38. //--------------------------------------------------------------------------
  39. PP_Info[playerid][LastBackGround] = 3; //poker system
  40. Start[playerid] = PlayerText:INVALID_TEXT_DRAW;
  41. //--------------------------------------------------------------------------
  42. new banfile[ 100 ]; format( banfile, sizeof( banfile ), FILE_BAN, ImeIgraca( playerid ) );
  43. if( fexist( banfile ) )
  44. {
  45. new string1[ 256 ];
  46. format( string1, sizeof( string1 ), "{FF0000}Banovani ste...\n\n{5D9FCE}%s {FFFFFF}vi ste banovani sa ovog servera.\nAko ne znate razlog bana pogledajte ga na forumu.\nUkoliko zelite unban zatrazite ga na nasem forumu.\nAdresa naseg foruma je:\n\n{5D9FCE}www.unique-samp.com", ImeIgraca( playerid ) );
  47. SPD( playerid, dialog_BANSTATUS, DSMSG, D_NASLOV, string1, D_ODABERI, D_ODUSTANI );
  48. Kickovanje( playerid, " ");
  49. return 1;
  50. }
  51.  
  52. if( fexist( Korisnici ( playerid ) ) ) {
  53. INI_ParseFile( Korisnici( playerid ), "OcitajKorisnika", .bExtra = true, .extra = playerid);
  54.  
  55. if( PlayerInfo[ playerid ][ xBDays ] > 0) {
  56. new year, month, day;
  57. getdate( year, month, day );
  58.  
  59. if( PlayerInfo[ playerid ][ xBDays ] > day && PlayerInfo[ playerid ][ xBMonths ] >= month && PlayerInfo[ playerid ][ xBYears ] >= year ) {
  60. SCM( playerid, CRVENA, "__________________BAN________________");
  61. va_SendClientMessage( playerid, BELA, "{FFFFFF}Banovan si sa ovog servera do {5D9FCE}%d/%d/%d{FFFFFF}.", PlayerInfo[ playerid ][ xBDays ], PlayerInfo[ playerid ][ xBMonths ], PlayerInfo[ playerid ][ xBYears ] );
  62. SCM( playerid, BELA, "{FFFFFF}Ukoliko mislis da je ovo greska.");
  63. SCM( playerid, BELA, "{FFFFFF}Zahtev za unban mozes traziti na {5D9FCE}forumu.{FFFFFF}");
  64. SCM( playerid, BELA, "{FFFFFF}Forum: {5D9FCE}www.unique-samp.com");
  65. SCM( playerid, CRVENA, "_____________________________________");
  66. Kickovanje( playerid, " ");
  67. return 1;
  68. }
  69. }
  70.  
  71. if( PlayerInfo[ playerid ][ xBDays ] > 0) {
  72. new year, month, day;
  73. getdate( year, month, day );
  74. if( PlayerInfo[ playerid ][ xBDays ] < day ){
  75. PlayerInfo[ playerid ][ xBDays ] = 0;
  76. }
  77. }
  78.  
  79. if( PlayerInfo[ playerid ][ xRegistrovan ] == 1 ) {
  80. SetTimerEx( "RegLog", 100, false, "d", playerid );
  81. format( sDStrg, sizeof( sDStrg ),DialogTekstovi[ 0 ], MAX_POKUSAJ_LOGINA );
  82. PrviSpawn[ playerid ] = 1;
  83. SPD( playerid, dialog_LOGIN, DSP, D_NASLOV, sDStrg, D_ODABERI, D_ODUSTANI );
  84. }
  85. else {
  86. SetTimerEx( "RegLog", 100, false, "d", playerid );
  87. SPD( playerid, dialog_REGISTRACIJA_KORAK_1, DSMSG, D_NASLOV, DialogTekstovi[ 1 ], D_ODABERI, D_ODUSTANI );
  88. }
  89. }
  90. else {
  91. SetTimerEx( "RegLog", 100, false, "d", playerid );
  92. SPD( playerid, dialog_REGISTRACIJA_KORAK_1, DSMSG, D_NASLOV, DialogTekstovi[ 1 ], D_ODABERI, D_ODUSTANI );
  93. }
  94. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  95.  
  96. //------------------------------------------------------------------------------
  97. }
  98. ////////////////////////////////////////////////////////////////////////////
  99. if( dialogid == dialog_LOGIN ) {
  100. if( !response ) return Kick( playerid );
  101. if( response )
  102. {
  103. if( !strcmp( inputtext, PlayerInfo[ playerid ][ xLozinka ], false ) && !isnull( inputtext ) ) {
  104. INI_ParseFile( Korisnici( playerid ), "OcitajKorisnika", .bExtra = true, .extra = playerid );
  105. if( PlayerInfo[ playerid ][ xAdmin ] > 0 ) INI_ParseFile( Admini( playerid ), "OcitajAdmina", .bExtra = true, .extra = playerid );
  106. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 0 ] );
  107. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 1 ] );
  108. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 2 ] );
  109. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 3 ] );
  110. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 4 ] );
  111. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 5 ] );
  112. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 6 ] );
  113. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 7 ] );
  114. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 8 ] );
  115. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 9 ] );
  116. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 10 ] );
  117. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 11 ] );
  118. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 12 ] );
  119. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 13 ] );
  120. /*PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 14 ] );
  121. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 15 ] );
  122. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 16 ] );
  123. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 17 ] );
  124. PlayerTextDrawHide( playerid, GFREGLOG[ playerid ][ 18 ] );*/
  125. //AdminLogin( playerid ); //markirano77
  126. if(duplirespect == 1) TextDrawShowForPlayer(playerid, HapyHours);//
  127. NewsTextDrawsShowForPlayer( playerid );
  128. PlayerInfo[ playerid ][ xMute ] = 0;
  129.  
  130. if( PlayerInfo[ playerid ][ xPocetniTut ] == 0 ) {
  131. TogglePlayerSpectating( playerid, 1 );
  132. InterpolateCameraPos(playerid, -2317.101318, 2010.638549, 72.219375, -2537.027832, 2375.906982, 27.088499, 50000, CAMERA_MOVE);
  133. InterpolateCameraLookAt(playerid, -2318.851562, 2015.165405, 71.017623, -2533.084228, 2372.862060, 26.668331, 50000, CAMERA_MOVE);
  134. SetPlayerInterior( playerid, 0 );
  135. SetPlayerVirtualWorld( playerid, 1 );
  136. SetPlayerPos( playerid, -89.6918,1315.8743,78.2802);
  137. SCM( playerid, SIVA," ");
  138. SCM( playerid, SIVA," ");
  139. SCM( playerid, SIVA," ");
  140. SCM( playerid, SIVA," ");
  141. SCM( playerid, SIVA," ");
  142. SCM( playerid, SIVA," ");
  143. SCM( playerid, GEFORCE, "~ DOBRO DOSLI NA UNIQUE ~");
  144. SCM( playerid, SIVA," ");
  145. SCM( playerid, BELA, "Pre svega zelimo vam pozeleti dobrodoslicu na nas server.");
  146. SCM( playerid, BELA, "Ovo je tutorijal u kojem cemo vam pokazati najvaznije lokacije na serveru.");
  147. SCM( playerid, BELA, "Objasnit cemo vam kako uspesno zapoceti igru i uciniti je zanimljivom.");
  148. SCM( playerid, BELA, "Verujem da znate da je ovo RP server i da je dosta tesko doci do novca.");
  149. SCM( playerid, BELA, "Na pocetku imate 500$ kod sebe, koje ce vam pomoci.");
  150. SetTimerEx( "PocetniTut", 25000, false, "ii", playerid, 1 );
  151. }
  152. else {
  153. SetSpawnInfo( playerid, 0, PlayerInfo[ playerid ][ xSkin ], -2481.2727,2255.3000,4.5532,103.2964, 0, 0, 0, 0, 0, 0 );
  154. SpawnPlayer( playerid ); PlayerLogged[ playerid ] = 1;
  155. }
  156. }
  157. else {
  158. if ( PokusajLogina[ playerid ] == MAX_POKUSAJ_LOGINA - 1 ) {
  159. format( globalstring, sizeof( globalstring ), "Uneli ste krivu lozinku %d puta i dobili kick!", MAX_POKUSAJ_LOGINA );
  160. SCM( playerid, CRVENA, globalstring);
  161. Kick( playerid );
  162. return true;
  163. }
  164. PokusajLogina[ playerid ]++;
  165. SCM( playerid, CRVENA, "Kriva lozinka!" );
  166. format( sDStrg, sizeof( sDStrg ),DialogTekstovi[ 0 ], MAX_POKUSAJ_LOGINA );
  167. SPD( playerid, dialog_LOGIN, DSP, D_NASLOV, sDStrg, D_ODABERI, D_ODUSTANI );
  168. }
  169. }
  170. return true;
  171. }
  172. else if( dialogid == dialog_REGISTRACIJA_KORAK_1 ) {
  173. if( response ) {
  174. ZapoceoRegistraciju[ playerid ] = 1;
  175. SPD( playerid, dialog_REGISTRACIJA_KORAK_2, DSP, D_NASLOV, DialogTekstovi[ 2 ], D_ODABERI, D_ODUSTANI ); }
  176. else {
  177. SCM( playerid, CRVENA, "Doslo je do greske, pokusajte ponovo!");
  178. Kick( playerid ); }
  179. return true;
  180. }
  181. else if( dialogid == dialog_REGISTRACIJA_KORAK_2 ) {
  182. if( response && strlen( inputtext ) ) {
  183. new password[ LOZINKA_STRING ];
  184. if( strlen( inputtext ) >= sizeof( password )) return SendErrorMessage( playerid, "Password je predugacak!" ),
  185. SPD( playerid, dialog_REGISTRACIJA_KORAK_2, DSP, D_NASLOV, DialogTekstovi[ 2 ], D_ODABERI, D_ODUSTANI );
  186. format( password, sizeof( password ), "%s", inputtext );
  187.  
  188. strmid( PlayerInfo[ playerid ][ xLozinka ], inputtext, 0, strlen( inputtext ), 255);
  189.  
  190. new INI:File = INI_Open( Korisnici( playerid ) ); //kreiranje statsa
  191. INI_SetTag( File, "Informacije");
  192. INI_WriteString( File, "Lozinka", password );
  193. INI_WriteInt( File, "Pol", 0 );
  194. INI_WriteInt( File, "Godine", 0 );
  195. INI_WriteInt( File, "Novac", 0 );
  196. INI_WriteInt( File, "Level", 0 );
  197. INI_WriteInt( File, "Respekt", 0 );
  198. INI_WriteInt( File, "Poboljsanja", 0 );
  199. INI_WriteInt( File, "PayDay", 0 );
  200. INI_WriteInt( File, "Admin", 0 );
  201. INI_WriteInt( File, "AdminID", 0 );
  202. INI_WriteInt( File, "Skin", 0 );
  203. INI_WriteInt( File, "Spawn", 0 );
  204. INI_WriteInt( File, "Lider", 0 );
  205. INI_WriteInt( File, "Clan", 0 );
  206. INI_WriteInt( File, "Rank", 0 );
  207. INI_WriteInt( File, "VoziloID1", -1 );
  208. INI_WriteInt( File, "VoziloID2", -1 );
  209. INI_WriteInt( File, "VoziloID3", -1 );
  210. INI_WriteInt( File, "VoziloID4", -1 );
  211. INI_WriteInt( File, "VoziloID5", -1 );
  212. INI_WriteInt( File, "Droga", 0 );
  213. INI_WriteInt( File, "Materijali", 0 );
  214. INI_WriteInt( File, "FirmaID", -1 );
  215. INI_WriteInt( File, "Posao", 0 );
  216. INI_WriteInt( File, "Ugovor", 0 );
  217. INI_WriteInt( File, "MehSkill", 0 );
  218. INI_WriteInt( File, "MDelovi", 0 );
  219. INI_WriteInt( File, "Head", 0 );
  220. INI_WriteFloat( File, "HeadPos1", PlayerInfo[ playerid ][ xHeadPos ][ 0 ] );
  221. INI_WriteFloat( File, "HeadPos2", PlayerInfo[ playerid ][ xHeadPos ][ 1 ] );
  222. INI_WriteFloat( File, "HeadPos3", PlayerInfo[ playerid ][ xHeadPos ][ 2 ] );
  223. INI_WriteFloat( File, "HeadPos4", PlayerInfo[ playerid ][ xHeadPos ][ 3 ] );
  224. INI_WriteFloat( File, "HeadPos5", PlayerInfo[ playerid ][ xHeadPos ][ 4 ] );
  225. INI_WriteFloat( File, "HeadPos6", PlayerInfo[ playerid ][ xHeadPos ][ 5 ] );
  226. INI_WriteFloat( File, "HeadPos7", PlayerInfo[ playerid ][ xHeadPos ][ 6 ] );
  227. INI_WriteFloat( File, "HeadPos8", PlayerInfo[ playerid ][ xHeadPos ][ 7 ] );
  228. INI_WriteFloat( File, "HeadPos9", PlayerInfo[ playerid ][ xHeadPos ][ 8 ] );
  229. INI_WriteInt( File, "Face", 0 );
  230. INI_WriteFloat( File, "FacePos1", PlayerInfo[ playerid ][ xFacePos ][ 0 ] );
  231. INI_WriteFloat( File, "FacePos2", PlayerInfo[ playerid ][ xFacePos ][ 1 ] );
  232. INI_WriteFloat( File, "FacePos3", PlayerInfo[ playerid ][ xFacePos ][ 2 ] );
  233. INI_WriteFloat( File, "FacePos4", PlayerInfo[ playerid ][ xFacePos ][ 3 ] );
  234. INI_WriteFloat( File, "FacePos5", PlayerInfo[ playerid ][ xFacePos ][ 4 ] );
  235. INI_WriteFloat( File, "FacePos6", PlayerInfo[ playerid ][ xFacePos ][ 5 ] );
  236. INI_WriteFloat( File, "FacePos7", PlayerInfo[ playerid ][ xFacePos ][ 6 ] );
  237. INI_WriteFloat( File, "FacePos8", PlayerInfo[ playerid ][ xFacePos ][ 7 ] );
  238. INI_WriteFloat( File, "FacePos9", PlayerInfo[ playerid ][ xFacePos ][ 8 ] );
  239. INI_WriteInt( File, "SungMask", 0 );
  240. INI_WriteFloat( File, "SungMaskPos1", PlayerInfo[ playerid ][ xSungMaskPos ][ 0 ] );
  241. INI_WriteFloat( File, "SungMaskPos2", PlayerInfo[ playerid ][ xSungMaskPos ][ 1 ] );
  242. INI_WriteFloat( File, "SungMaskPos3", PlayerInfo[ playerid ][ xSungMaskPos ][ 2 ] );
  243. INI_WriteFloat( File, "SungMaskPos4", PlayerInfo[ playerid ][ xSungMaskPos ][ 3 ] );
  244. INI_WriteFloat( File, "SungMaskPos5", PlayerInfo[ playerid ][ xSungMaskPos ][ 4 ] );
  245. INI_WriteFloat( File, "SungMaskPos6", PlayerInfo[ playerid ][ xSungMaskPos ][ 5 ] );
  246. INI_WriteFloat( File, "SungMaskPos7", PlayerInfo[ playerid ][ xSungMaskPos ][ 6 ] );
  247. INI_WriteFloat( File, "SungMaskPos8", PlayerInfo[ playerid ][ xSungMaskPos ][ 7 ] );
  248. INI_WriteFloat( File, "SungMaskPos9", PlayerInfo[ playerid ][ xSungMaskPos ][ 8 ] );
  249. INI_WriteInt( File, "Cigare", 0 );
  250. INI_WriteInt( File, "Upaljac", 0 );
  251. INI_WriteInt( File, "BStil", 0 );
  252. INI_WriteInt( File, "Registrovan", 0 );
  253. INI_WriteFloat( File, "SHealth", 0 );
  254. INI_WriteInt( File, "BrojTelefona", 0 );
  255. INI_WriteInt( File, "Vozacka", 0 );
  256. INI_WriteInt( File, "Motorska", 0 );
  257. INI_WriteInt( File, "KamionskaC1", 0 );
  258. INI_WriteInt( File, "KamionskaC2", 0 );
  259. INI_WriteInt( File, "KamionskaC3", 0 );
  260. INI_WriteInt( File, "Brodska", 0 );
  261. INI_WriteInt( File, "Letelica", 0 );
  262. INI_WriteInt( File, "Osnovna", 0 );
  263. INI_WriteInt( File, "Srednja", 0 );
  264. INI_WriteInt( File, "Fakultet", 0 );
  265. INI_WriteInt( File, "SkolaLimit", 0 );
  266. INI_WriteInt( File, "Ubijen", 0 );
  267. INI_WriteFloat( File, "Death1", 0 );
  268. INI_WriteFloat( File, "Death2", 0 );
  269. INI_WriteFloat( File, "Death3", 0 );
  270. INI_WriteInt( File, "Drug1", 0 );
  271. INI_WriteInt( File, "Drug2", 0 );
  272. INI_WriteInt( File, "Drug3", 0 );
  273. INI_WriteInt( File, "Drug4", 0 );
  274. INI_WriteInt( File, "Drug5", 0 );
  275. INI_WriteInt( File, "DrugCode1", 0 );
  276. INI_WriteInt( File, "DrugCode2", 0 );
  277. INI_WriteInt( File, "DrugCode3", 0 );
  278. INI_WriteInt( File, "DrugCode4", 0 );
  279. INI_WriteInt( File, "DrugCode5", 0 );
  280. INI_WriteInt( File, "Solna", 0 );
  281. INI_WriteInt( File, "Pseudo", 0 );
  282. INI_WriteInt( File, "SodaB", 0 );
  283. INI_WriteInt( File, "CrveniF", 0 );
  284. INI_WriteInt( File, "LysAcid", 0 );
  285. INI_WriteInt( File, "DesVoda", 0 );
  286. INI_WriteInt( File, "Marihuana", 0 );
  287. INI_WriteInt( File, "Opium", 0 );
  288. INI_WriteInt( File, "Kalcijum", 0 );
  289. INI_WriteInt( File, "AmonijumHlorid", 0 );
  290. INI_WriteInt( File, "Kokain", 0 );
  291. INI_WriteInt( File, "Kokain2", 0 );
  292. INI_WriteInt( File, "MetilAmin", 0 );
  293. INI_WriteFloat( File, "Hunger", 5.0 );
  294. INI_WriteBool( File, "HeroinAddict", false );
  295. INI_WriteInt( File, "HeroinUsed", 0 );
  296. INI_WriteInt( File, "HeroinIndicator", 0 );
  297. INI_WriteBool( File, "CokeCrackAddict", false );
  298. INI_WriteInt( File, "CokeCrackUsed", 0 );
  299. INI_WriteInt( File, "CokeCrackIndicator", 0 );
  300. INI_WriteBool( File, "MethAddict", false );
  301. INI_WriteInt( File, "MethIndicator", 0 );
  302. INI_WriteInt( File, "MethUsed", 0 );
  303. INI_WriteBool( File, "Inekcija", false );
  304. INI_WriteBool( File, "Toolkit", false );
  305. INI_WriteInt( File, "IDelovi", 0 );
  306. INI_WriteInt( File, "Property1", -1 );
  307. INI_WriteInt( File, "Property2", -1 );
  308. INI_WriteInt( File, "Property3", -1 );
  309. INI_WriteBool( File, "GunLicense", false );
  310. INI_WriteInt( File, "TelefonBon", 0 );
  311. INI_WriteInt( File, "ModelTelefona", 0 );
  312. INI_WriteInt( File, "Snaga", 0 );
  313. INI_WriteInt( File, "Zatvor", 0 );
  314. INI_WriteInt( File, "ZatvorVreme", 0 );
  315. INI_WriteInt( File, "Wanted", 0 );
  316. INI_WriteInt( File, "Uhapsen", 0 );
  317. INI_WriteInt( File, "PDUhapsio", 0 );
  318. INI_WriteInt( File, "PDStatsTicket", 0 );
  319. INI_WriteInt( File, "PDStatsTicketMoney", 0 );
  320. INI_WriteInt( File, "TakenWeps", 0 );
  321. INI_WriteInt( File, "TakenDrugs", 0 );
  322. INI_WriteInt( File, "PocetniTut", 0 );
  323. INI_WriteInt( File, "AKod", 0 );
  324. INI_WriteInt( File, "GMKod", 0 );
  325. INI_WriteInt( File, "Sat", 0 );
  326. INI_WriteBool( File, "Mask", false );
  327. INI_WriteInt( File, "MaskID", 0 );
  328. INI_WriteInt( File, "BRacun", 0 );
  329. INI_WriteInt( File, "PreostaloZaOtplatu", 0 );
  330. INI_WriteInt( File, "IznosRate", 0 );
  331. INI_WriteInt( File, "IznosKredita", 0 );
  332. INI_WriteInt( File, "OnlineSati", 0 );
  333. INI_WriteInt( File, "GM", 0 );
  334. INI_WriteInt( File, "HelperID", 0 );
  335. INI_WriteInt( File, "RPLearn", 0 );
  336. INI_WriteInt( File, "Warn", 0 );
  337. INI_WriteInt( File, "Mute", 0 );
  338. INI_WriteFloat( File, "Marker1", 0.0000 );
  339. INI_WriteFloat( File, "Marker2", 0.0000 );
  340. INI_WriteFloat( File, "Marker3", 0.0000 );
  341. INI_WriteInt( File, "BrojNews", 0 );
  342. INI_WriteInt( File, "OrgUgovor", 0 );
  343. INI_WriteInt( File, "PaketID", -1 );
  344. INI_WriteInt( File, "Srafciger", false );
  345. INI_WriteInt( File, "Pajser", false );
  346. INI_WriteInt( File, "Cekic", false );
  347. INI_WriteInt( File, "GpsLevel", 0 );
  348. INI_WriteInt( File, "Helmet", 0 );
  349. INI_WriteInt( File, "BanDays", 0 );
  350. INI_WriteInt( File, "BanMonths", 0 );
  351. INI_WriteInt( File, "BanYear", 0 );
  352. INI_WriteInt( File, "GradRank", 0 );
  353. INI_WriteInt( File, "Ozo", 0 );
  354. INI_WriteInt( File, "UlazBL", 0 );
  355. INI_WriteInt( File,"LottoNr", 0 );
  356. INI_WriteInt( File,"LottoNr2", 0 );
  357. INI_WriteInt( File,"LottoNr3", 0 );
  358. INI_WriteInt( File,"LottoNr4", 0 );
  359. INI_WriteInt( File,"LottoNr5", 0 );
  360. INI_WriteInt( File,"LottoNr6", 0 );
  361. INI_WriteInt( File,"LottoNr7", 0 );
  362. INI_WriteInt( File,"LottoNovac", 0 );
  363. INI_WriteBool( File, "Boombox", false );
  364. INI_WriteFloat( File, "HelmetPos1", PlayerInfo[ playerid ][ xHelmetPos ][ 0 ] );
  365. INI_WriteFloat( File, "HelmetPos2", PlayerInfo[ playerid ][ xHelmetPos ][ 1 ] );
  366. INI_WriteFloat( File, "HelmetPos3", PlayerInfo[ playerid ][ xHelmetPos ][ 2 ] );
  367. INI_WriteFloat( File, "HelmetPos4", PlayerInfo[ playerid ][ xHelmetPos ][ 3 ] );
  368. INI_WriteFloat( File, "HelmetPos5", PlayerInfo[ playerid ][ xHelmetPos ][ 4 ] );
  369. INI_WriteFloat( File, "HelmetPos6", PlayerInfo[ playerid ][ xHelmetPos ][ 5 ] );
  370. INI_WriteFloat( File, "HelmetPos7", PlayerInfo[ playerid ][ xHelmetPos ][ 6 ] );
  371. INI_WriteFloat( File, "HelmetPos8", PlayerInfo[ playerid ][ xHelmetPos ][ 7 ] );
  372. INI_WriteFloat( File, "HelmetPos9", PlayerInfo[ playerid ][ xHelmetPos ][ 8 ] );
  373. INI_WriteInt( File, "LicnaKarta",0);
  374. INI_WriteInt( File, "Pasos",0);
  375. INI_WriteInt( File, "MP3",0);
  376. INI_WriteInt( File, "Skate",0);
  377. INI_WriteInt( File, "Laptop",0);
  378. INI_WriteInt( File, "ImaImanje",0);
  379. INI_WriteInt( File, "SjemeSljiva",0);
  380. INI_WriteInt( File, "SjemeKruska",0);
  381. INI_WriteInt( File, "SjemeJabuka",0);
  382. INI_WriteInt( File, "DrvaMax",0);
  383. INI_WriteInt( File, "Sljiva",0);
  384. INI_WriteInt( File, "Krusaka",0);
  385. INI_WriteInt( File, "Jabuka",0);
  386. INI_WriteInt( File, "Voce",0);
  387. INI_WriteInt( File, "LovKomb",0);
  388. INI_WriteInt( File, "DozvolaLov",0);
  389. INI_WriteInt( File, "LovMeso",0);
  390. INI_WriteInt( File, "Spawned",0);
  391.  
  392. INI_Close( File );
  393.  
  394. SPD( playerid, dialog_REGISTRACIJA_KORAK_3, DSI, D_NASLOV, DialogTekstovi[ 3 ], D_ODABERI, D_ODUSTANI ); }
  395. else {
  396. SCM( playerid, CRVENA, "Doslo je do greske, pokusajte ponovo!");
  397. Kick( playerid ); }
  398. return true;
  399. }
  400. else if( dialogid == dialog_REGISTRACIJA_KORAK_3 ) {
  401. if( response && strlen( inputtext ) ) {
  402. if( strval( inputtext ) < 15 || strval( inputtext ) > 80 ) return SendErrorMessage( playerid, "Krivi unos!" ), SPD( playerid, dialog_REGISTRACIJA_KORAK_3, DSI, D_NASLOV, DialogTekstovi[ 3 ], D_ODABERI, D_ODUSTANI );
  403. PlayerInfo[ playerid ][ xGodine ] = strval( inputtext );
  404. SPD( playerid, dialog_REGISTRACIJA_KORAK_4, DSI, D_NASLOV, DialogTekstovi[ 4 ], D_ODABERI, D_ODUSTANI ); }
  405. else {
  406. SCM( playerid, CRVENA, "Doslo je do greske, pokusajte ponovo!" );
  407. SPD( playerid, dialog_REGISTRACIJA_KORAK_3, DSI, D_NASLOV, DialogTekstovi[ 3 ], D_ODABERI, D_ODUSTANI ); }
  408. return true;
  409. }
  410. else if( dialogid == dialog_REGISTRACIJA_KORAK_4 ) {
  411. if( response && strlen( inputtext ) ) {
  412. if( strfind( inputtext, "musko", true ) != -1 ) {
  413. PlayerInfo[ playerid ][ xPol ] = 1;
  414. PlayerInfo[ playerid ][ xPocetniTut ] = 0;
  415. PlayerInfo[ playerid ][ xSpawn ] = SPAWN_OBICAN;
  416. DajIgracuNovac( playerid, POCETNI_NOVAC );
  417. PlayerInfo[ playerid ][ xLevel ] = 1;
  418. SetPlayerScore( playerid, PlayerInfo[ playerid ][ xLevel ] );
  419. SetPlayerSkin( playerid, POCETNI_M_SKIN );
  420. PlayerInfo[ playerid ][ xSkin ] = POCETNI_M_SKIN;
  421. PlayerInfo[ playerid ][ xRegistrovan ] = 1;
  422. SavePlayer( playerid );
  423. ZapoceoRegistraciju[ playerid ] = 0;
  424. format( sDStrg, sizeof( sDStrg ),DialogTekstovi[ 0 ], MAX_POKUSAJ_LOGINA );
  425. SPD( playerid, dialog_LOGIN, DSP, D_NASLOV, sDStrg, D_ODABERI, D_ODUSTANI );
  426. return true; }
  427. else if( strfind( inputtext, "zensko", true ) != -1 ) {
  428. PlayerInfo[ playerid ][ xPol ] = 2;
  429. PlayerInfo[ playerid ][ xPocetniTut ] = 0;
  430. PlayerInfo[ playerid ][ xSpawn ] = SPAWN_OBICAN;
  431. DajIgracuNovac( playerid, POCETNI_NOVAC );
  432. PlayerInfo[ playerid ][ xLevel ] = 1;
  433. SetPlayerScore( playerid, PlayerInfo[ playerid ][ xLevel ] );
  434. SetPlayerSkin( playerid, POCETNI_Z_SKIN );
  435. PlayerInfo[ playerid ][ xSkin ] = POCETNI_Z_SKIN;
  436. PlayerInfo[ playerid ][ xRegistrovan ] = 1;
  437. SavePlayer( playerid );
  438. ZapoceoRegistraciju[ playerid ] = 0;
  439. format( sDStrg, sizeof( sDStrg ),DialogTekstovi[ 0 ], MAX_POKUSAJ_LOGINA );
  440. SPD( playerid, dialog_LOGIN, DSP, D_NASLOV, sDStrg, D_ODABERI, D_ODUSTANI );
  441. return true; }
  442. else {
  443. SCM( playerid, CRVENA, "Doslo je do greske, pokusajte ponovo!" );
  444. SPD( playerid, dialog_REGISTRACIJA_KORAK_4, DSI, D_NASLOV, DialogTekstovi[ 4 ], D_ODABERI, D_ODUSTANI );
  445. return true; } }
  446. else {
  447. SCM( playerid, CRVENA, "Doslo je do greske, pokusajte ponovo!" );
  448. SPD( playerid, dialog_REGISTRACIJA_KORAK_4, DSI, D_NASLOV, DialogTekstovi[ 4 ], D_ODABERI, D_ODUSTANI ); }
  449.  
  450.  
  451. //////////////////////////////////////////////////////////////////////////////////////////
  452.  
  453. }
  454.  
  455. public RegLog( playerid )
  456. {
  457. for( new chat = 0; chat <= 30; chat++ )
  458. SCM( playerid, BELA, " " );
  459. PlayAudioStreamForPlayer(playerid,"http://k007.kiwi6.com/hotlink/1pahxl3aes/GUNS-AND-ROSES-WELCOME-TO-THE-JUNGLE.mp3");
  460. //InterpolateCameraPos(playerid, 158.636703, 1199.878784, 22.574916, 176.294143, 1205.160156, 22.574916, 10000); //uvod camera
  461. //InterpolateCameraLookAt(playerid, 161.102996, 1204.206054, 23.013414, 174.276763, 1209.726196, 22.860698, 10000);
  462. // SetPlayerPos(playerid, 158.6774,1192.7378,15.1227);
  463. // SetPlayerCameraPos(playerid, 173.8670, 1193.0315, 25.3380);
  464. //SetPlayerCameraLookAt(playerid, 173.6935, 1194.0223, 25.2229);
  465. //InterpolateCameraPos(playerid, 1806.392456, -2006.840209, 65.831573, 1979.851684, -1851.406005, 65.831573, 10000);
  466. //InterpolateCameraLookAt(playerid, 1804.158203, -2002.398681, 65.301322, 1975.568481, -1848.893554, 65.246978, 10000);
  467. InterpolateCameraPos(playerid, -2550.198974, 2160.588867, 27.575992, -2337.907470, 2290.606689, 20.683963, 10000);
  468. InterpolateCameraLookAt(playerid, -2549.379882, 2165.511962, 27.271495, -2342.870849, 2290.589843, 20.079975, 10000);
  469. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 0 ] );
  470. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 1 ] );
  471. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 2 ] );
  472. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 3 ] );
  473. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 4 ] );
  474. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 5 ] );
  475. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 6 ] );
  476. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 7 ] );
  477. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 8 ] );
  478. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 9 ] );
  479. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 10 ] );
  480. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 11 ] );
  481. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 12 ] );
  482. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 13 ] );
  483. /*PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 14 ] );
  484. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 15 ] );
  485. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 16 ] );
  486. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 17 ] );
  487. PlayerTextDrawShow( playerid, GFREGLOG[ playerid ][ 18 ] );*/
  488. return true;
Advertisement
Add Comment
Please, Sign In to add comment