Guest User

Pomoc

a guest
Dec 2nd, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.37 KB | None | 0 0
  1. //error
  2. C:\Users\Neca\Desktop\Mod Editor\Betix\gamemodes\Unlimited.pwn(275 -- 276) : error 029: invalid expression, assumed zero
  3. C:\Users\Neca\Desktop\Mod Editor\Betix\gamemodes\Unlimited.pwn(277) : error 028: invalid subscript (not an array or too many subscripts): "Kick"
  4. C:\Users\Neca\Desktop\Mod Editor\Betix\gamemodes\Unlimited.pwn(277) : warning 215: expression has no effect
  5. C:\Users\Neca\Desktop\Mod Editor\Betix\gamemodes\Unlimited.pwn(277) : error 001: expected token: ";", but found "]"
  6. C:\Users\Neca\Desktop\Mod Editor\Betix\gamemodes\Unlimited.pwn(277) : error 029: invalid expression, assumed zero
  7. C:\Users\Neca\Desktop\Mod Editor\Betix\gamemodes\Unlimited.pwn(277) : fatal error 107: too many error messages on one line
  8.  
  9. Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
  10.  
  11.  
  12. 5 Errors.
  13.  
  14. //skripta
  15. #include < a_samp >
  16. #include < YSI\y_ini >
  17. #include < zcmd >
  18.  
  19. #define DIALOG_REGISTER 1
  20. #define DIALOG_LOGIN 2
  21.  
  22. #define BELA 0xFFFFFF
  23. #define CRVENA 0xF81414
  24. #define ZELENA 0x00FF22
  25. #define SVETLO_PLAVA 0x00CED1
  26.  
  27. #define PATH "/Korisnici/)%s.ini"
  28.  
  29. enum pInfo
  30. {
  31. pSifra,
  32. pNovac,
  33. pUbistva,
  34. pSmrti,
  35. pAdmin,
  36. pBan,
  37. pNovacBanka,
  38. pLevel
  39. }
  40. new PlayerInfo[MAX_PLAYERS][pInfo];
  41. forward LoadUser_data(playerid,name[],value[]);
  42. public LoadUser_data(playerid,name[],value[])
  43. {
  44. INI_Int("Sifra",PlayerInfo[playerid][pSifra]);
  45. INI_Int("Novac",PlayerInfo[playerid][pNovac]);
  46. INI_Int("Ubistva",PlayerInfo[playerid][pUbistva]);
  47. INI_Int("Smrti",PlayerInfo[playerid][pSmrti]);
  48. INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  49. INI_Int("Ban",PlayerInfo[playerid][pBan]);
  50. INI_Int("NovacBanka",PlayerInfo[playerid][pNovacBanka]);
  51. INI_Int("Level",PlayerInfo[playerid][pLevel]);
  52. return 1;
  53. }
  54. stock UserPath(playerid)
  55. {
  56. new string[128],playername[MAX_PLAYER_NAME];
  57. GetPlayerName(playerid,playername,sizeof(playername));
  58. format(string,sizeof(string),PATH,playername);
  59. return string;
  60. }
  61. stock udb_hash(buf[])
  62. {
  63. new length=strlen(buf);
  64. new s1 = 1;
  65. new s2 = 0;
  66. new n;
  67. for (n=0; n<length; n++)
  68. {
  69. s1 = (s1 + buf[n]) % 65521;
  70. s2 = (s2 + s1) % 65521;
  71. }
  72. return (s2 << 16) + s1;
  73. }
  74. public OnGameModeInit()
  75. {
  76. // Don't use these lines if it's a filterscript
  77. SetGameModeText("Blank Script");
  78. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  79. return 1;
  80. }
  81.  
  82. public OnGameModeExit()
  83. {
  84. return 1;
  85. }
  86.  
  87. public OnPlayerRequestClass(playerid, classid)
  88. {
  89. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  90. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  91. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  92. return 1;
  93. }
  94.  
  95. public OnPlayerConnect(playerid)
  96. {
  97. if(fexist(UserPath(playerid)))
  98. {
  99. INI_ParseFile(UserPath(playerid),"LoadUser_%s",.bExtra = true,.extra = playerid);
  100. ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login...","Ukucaj te vasu sifru od Acounta!","Loginuj se","Izadji");
  101.  
  102. }
  103. else
  104. {
  105. ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registracija...","Ukucaj te zeljenu sifru!","Registruj Se","Izadji");
  106. }
  107. return 1;
  108. }
  109.  
  110. public OnPlayerDisconnect(playerid, reason)
  111. {
  112. new INI:File = INI_Open(UserPath(playerid));
  113. INI_SetTag(File,"data");
  114. INI_WriteInt(File,"Novac",GetPlayerMoney(playerid));
  115. INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
  116. INI_WriteInt(File,"Ban",PlayerInfo[playerid][pBan]);
  117. INI_WriteInt(File,"Level",GetPlayerScore(playerid));
  118. INI_WriteInt(File,"NovacBanka",PlayerInfo[playerid][pNovacBanka]);
  119. INI_WriteInt(File,"Ubistva",PlayerInfo[playerid][pUbistva]);
  120. INI_WriteInt(File,"Smrti",PlayerInfo[playerid][pSmrti]);
  121. INI_Close(File);
  122. return 1;
  123. }
  124.  
  125. public OnPlayerSpawn(playerid)
  126. {
  127. return 1;
  128. }
  129.  
  130. public OnPlayerDeath(playerid, killerid, reason)
  131. {
  132. return 1;
  133. }
  134.  
  135. public OnVehicleSpawn(vehicleid)
  136. {
  137. return 1;
  138. }
  139.  
  140. public OnVehicleDeath(vehicleid, killerid)
  141. {
  142. return 1;
  143. }
  144.  
  145. public OnPlayerText(playerid, text[])
  146. {
  147. return 1;
  148. }
  149.  
  150. public OnPlayerCommandText(playerid, cmdtext[])
  151. {
  152. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  153. {
  154. // Do something here
  155. return 1;
  156. }
  157. return 0;
  158. }
  159.  
  160. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  161. {
  162. return 1;
  163. }
  164.  
  165. public OnPlayerExitVehicle(playerid, vehicleid)
  166. {
  167. return 1;
  168. }
  169.  
  170. public OnPlayerStateChange(playerid, newstate, oldstate)
  171. {
  172. return 1;
  173. }
  174.  
  175. public OnPlayerEnterCheckpoint(playerid)
  176. {
  177. return 1;
  178. }
  179.  
  180. public OnPlayerLeaveCheckpoint(playerid)
  181. {
  182. return 1;
  183. }
  184.  
  185. public OnPlayerEnterRaceCheckpoint(playerid)
  186. {
  187. return 1;
  188. }
  189.  
  190. public OnPlayerLeaveRaceCheckpoint(playerid)
  191. {
  192. return 1;
  193. }
  194.  
  195. public OnRconCommand(cmd[])
  196. {
  197. return 1;
  198. }
  199.  
  200. public OnPlayerRequestSpawn(playerid)
  201. {
  202. return 1;
  203. }
  204.  
  205. public OnObjectMoved(objectid)
  206. {
  207. return 1;
  208. }
  209.  
  210. public OnPlayerObjectMoved(playerid, objectid)
  211. {
  212. return 1;
  213. }
  214.  
  215. public OnPlayerPickUpPickup(playerid, pickupid)
  216. {
  217. return 1;
  218. }
  219.  
  220. public OnVehicleMod(playerid, vehicleid, componentid)
  221. {
  222. return 1;
  223. }
  224.  
  225. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  226. {
  227. return 1;
  228. }
  229.  
  230. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  231. {
  232. return 1;
  233. }
  234.  
  235. public OnPlayerSelectedMenuRow(playerid, row)
  236. {
  237. return 1;
  238. }
  239.  
  240. public OnPlayerExitedMenu(playerid)
  241. {
  242. return 1;
  243. }
  244.  
  245. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  246. {
  247. return 1;
  248. }
  249.  
  250. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  251. {
  252. return 1;
  253. }
  254.  
  255. public OnRconLoginAttempt(ip[], password[], success)
  256. {
  257. return 1;
  258. }
  259.  
  260. public OnPlayerUpdate(playerid)
  261. {
  262. return 1;
  263. }
  264.  
  265. public OnPlayerStreamIn(playerid, forplayerid)
  266. {
  267. return 1;
  268. }
  269.  
  270. public OnPlayerStreamOut(playerid, forplayerid)
  271. {
  272. return 1;
  273. }
  274.  
  275. public OnVehicleStreamIn(vehicleid, forplayerid)
  276. {
  277. return 1;
  278. }
  279.  
  280. public OnVehicleStreamOut(vehicleid, forplayerid)
  281. {
  282. return 1;
  283. }
  284.  
  285. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  286. {
  287. switch(dialogid)
  288. {
  289. case DIALOG_REGISTER
  290. {
  291. if(!response) return Kick [playerid]
  292. if(response)
  293. {
  294. if(!strl(inputtext)) return ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registracija...","Pogresio si sifru","Registruj Se","Izadji");
  295. new INI:File = INI_Open(UserPath(playerid));
  296. INI_SetTag(File,"data");
  297. INI_WriteInt(File,"Sifra",udb_hash(inputtext));
  298. INI_WriteInt(File,"Novac",0);
  299. INI_WriteInt(File,"Admin",0);
  300. INI_WriteInt(File,"Level",0);
  301. INI_WriteInt(File,"NovacBanka",0);
  302. INI_WriteInt(File,"Ban",0);
  303. INI_Close(File);
  304. }
  305. case DIALOG_LOGIN;
  306. {
  307. if(!response) return Kick(playerid);
  308. if(response)
  309. {
  310. if(udb_hash(inputtext) == PlayerInfo[playerid][pSifra])
  311. {
  312. INI_ParsFile(UserPath(playerid),"LoadUser_%s",.bExtra = true,.extra = playerid);
  313. GivePlayerMoney(playerid,PlayerInfo[playerid][pNovac]);
  314. SetPlayerScore(playerid,PlayerInfo[playerid][pLevel]);
  315. SendClientMessage(playerid,-1,"Ti si se uspesno ulogovao na acount!");
  316. }
  317. else
  318. {
  319. ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login...",Pogresna Lozinka,pokusaj ponovo!","Loginuj Se!","Izadji!");
  320. }
  321. }
  322. }
  323. }
  324. }
  325.  
  326. return 1;
  327. }
  328.  
  329. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  330. {
  331. return 1;
  332. }
Advertisement
Add Comment
Please, Sign In to add comment