Advertisement
Guest User

Untitled

a guest
Jun 14th, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.19 KB | None | 0 0
  1. public LoadAccount(playerid,pass[],passwortstate)
  2. {
  3. new query[356],result[25],rows,fields;
  4. if(/*mysql_ping() == 0*/mysql_errno(MySqlConnection) != 0)
  5. {
  6. getdate(tag,monat,jahr);
  7. gettime(stunde,minute,sekunde);
  8. ForEachPlayer(i)
  9. {
  10. if(IsPlayerConnected(i) && !IsPlayerNPC(i) && GetPVarInt(i,"Eingeloggt") == 1)
  11. {
  12. SaveAccount(i);
  13. }
  14. }
  15. Log("Restartssqllog","Admin: System hat den Server gerestartet(Dead MySql Connection)!");
  16. OnGameModeSave();
  17. GameModeExit();
  18. return 1;
  19. }
  20. cache_get_data(rows,fields);
  21. if(rows)
  22. {
  23. if(passwortstate == 1)
  24. {
  25. cache_get_field_content(0,"Passwort",result);
  26. new tmpp[25];
  27. strmid(tmpp, MD5_Hash(pass), 0, 24, 25);
  28. if(!strcmp(/*MD5_Hash(pass)*/tmpp,result,true))
  29. {
  30. format(query,sizeof(query),"SELECT * FROM "#DATENBANKTAG"_account_main WHERE Name='%s'",SpielerName(playerid));
  31. mysql_function_query(MySqlConnection,query,true,"LoadAccount","isi",playerid," ",0);
  32. return 1;
  33. }
  34. format(query,sizeof(query),"{C9C9C9}Willkommen zurück "#SERVERFARBE"%s {C9C9C9}!\n{C9C9C9}Dein Account ist registriert.\nBitte Logge dich mit deinem entsprechendem Passwort ein.\n\n"#SERVERFARBE"** "#SERVERNAME" **{C9C9C9}",SpielerName(playerid));
  35. ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,""#SERVERFARBE""#SERVERNAME"{FFFFFF}: Login",query,"Login","Abbrechen");
  36. return 1;
  37. }
  38. cache_get_field_content(0,"Tutorial",result);
  39. Spieler[playerid][pViewTutorial] = strval(result);
  40. strdel(result,0,sizeof(result));
  41. cache_get_field_content(0,"Admin",result);
  42. Spieler[playerid][pAdmin] = strval(result);
  43. strdel(result,0,sizeof(result));
  44. cache_get_field_content(0,"Verwarnungen",result);
  45. Spieler[playerid][pWarns] = strval(result);
  46. strdel(result,0,sizeof(result));
  47. cache_get_field_content(0,"FLeaderRechte",result);
  48. Spieler[playerid][pLeader] = strval(result);
  49. strdel(result,0,sizeof(result));
  50. cache_get_field_content(0,"Fraktion",result);
  51. Spieler[playerid][pFraktion] = strval(result);
  52. strdel(result,0,sizeof(result));
  53. cache_get_field_content(0,"FraktionsRang",result);
  54. Spieler[playerid][pFraktRang] = strval(result);
  55. strdel(result,0,sizeof(result));
  56. cache_get_field_content(0,"FraktionsURang",result);
  57. Spieler[playerid][pFraktURang] = strval(result);
  58. strdel(result,0,sizeof(result));
  59. cache_get_field_content(0,"FraktionsSperre",result);
  60. Spieler[playerid][pFraktionSperre] = strval(result);
  61. strdel(result,0,sizeof(result));
  62. cache_get_field_content(0,"FraktionsGehalt",result);
  63. Spieler[playerid][pFraktionsGehalt] = strval(result);
  64. strdel(result,0,sizeof(result));
  65. cache_get_field_content(0,"Job",result);
  66. Spieler[playerid][pJob] = strval(result);
  67. strdel(result,0,sizeof(result));
  68. cache_get_field_content(0,"JobWarns",result);
  69. Spieler[playerid][JobWarns] = strval(result);
  70. strdel(result,0,sizeof(result));
  71. cache_get_field_content(0,"JobSperre",result);
  72. Spieler[playerid][pJobSperre] = strval(result);
  73. strdel(result,0,sizeof(result));
  74. cache_get_field_content(0,"ArbeitslosenGeld",result);
  75. Spieler[playerid][pWorkLess] = strval(result);
  76. strdel(result,0,sizeof(result));
  77. cache_get_field_content(0,"Geschlecht",result);
  78. Spieler[playerid][pSex] = strval(result);
  79. strdel(result,0,sizeof(result));
  80. cache_get_field_content(0,"SpielerAlter",result);
  81. Spieler[playerid][pYearsOld] = strval(result);
  82. strdel(result,0,sizeof(result));
  83. cache_get_field_content(0,"Level",result);
  84. SetPlayerLevel(playerid,strval(result));
  85. strdel(result,0,sizeof(result));
  86. cache_get_field_content(0,"Geld",result);
  87. ACMoney(playerid,strval(result));
  88. strdel(result,0,sizeof(result));
  89. cache_get_field_content(0,"GWD",result);
  90. Spieler[playerid][pGrundwehrdienst] = strval(result);
  91. strdel(result,0,sizeof(result));
  92. cache_get_field_content(0,"Zivinote",result);
  93. Spieler[playerid][pZiviNote] = strval(result);
  94. strdel(result,0,sizeof(result));
  95. cache_get_field_content(0,"FAbteilung",result);
  96. Spieler[playerid][pFraktABTInvite] = strval(result);
  97. strdel(result,0,sizeof(result));
  98. cache_get_field_content(0,"Bankguthaben",result);
  99. Spieler[playerid][pBank] = strval(result);
  100. strdel(result,0,sizeof(result));
  101. cache_get_field_content(0,"BankPin",result);
  102. Spieler[playerid][pBankPin] = strval(result);
  103. strdel(result,0,sizeof(result));
  104. cache_get_field_content(0,"WantedSterne",result);
  105. SetPlayerWantedLevel(playerid,strval(result));
  106. strdel(result,0,sizeof(result));
  107. cache_get_field_content(0,"WantedPunkte",result);
  108. Spieler[playerid][pWantedPoints] = strval(result);
  109. strdel(result,0,sizeof(result));
  110. cache_get_field_content(0,"Suspects",result);
  111. Spieler[playerid][pSuspectPoints] = strval(result);
  112. strdel(result,0,sizeof(result));
  113. cache_get_field_content(0,"Wanted_Grund1",result);
  114. strmid(pWantedReason1[playerid],result,0,strlen(result),64);
  115. strdel(result,0,sizeof(result));
  116. cache_get_field_content(0,"Wanted_Grund2",result);
  117. strmid(pWantedReason2[playerid],result,0,strlen(result),64);
  118. strdel(result,0,sizeof(result));
  119. cache_get_field_content(0,"Wanted_Grund3",result);
  120. strmid(pWantedReason3[playerid],result,0,strlen(result),64);
  121. strdel(result,0,sizeof(result));
  122. cache_get_field_content(0,"Wanted_Grund4",result);
  123. strmid(pWantedReason4[playerid],result,0,strlen(result),64);
  124. strdel(result,0,sizeof(result));
  125. cache_get_field_content(0,"Wanted_Grund5",result);
  126. strmid(pWantedReason5[playerid],result,0,strlen(result),64);
  127. strdel(result,0,sizeof(result));
  128. cache_get_field_content(0,"Crimes",result);
  129. Spieler[playerid][pLastSuspects] = strval(result);
  130. strdel(result,0,sizeof(result));
  131. cache_get_field_content(0,"STVOcrimes",result);
  132. Spieler[playerid][pSTVOpoints] = strval(result);
  133. strdel(result,0,sizeof(result));
  134. cache_get_field_content(0,"KampfStyle",result);
  135. SetPlayerFightingStyle(playerid,strval(result));
  136. strdel(result,0,sizeof(result));
  137. cache_get_field_content(0,"Handy",result);
  138. Spieler[playerid][pHandy] = strval(result);
  139. strdel(result,0,sizeof(result));
  140. cache_get_field_content(0,"Handycoins",result);
  141. Spieler[playerid][pHandyCoins] = strval(result);
  142. strdel(result,0,sizeof(result));
  143. cache_get_field_content(0,"HandyStatus",result);
  144. Spieler[playerid][pHandystate] = strval(result);
  145. strdel(result,0,sizeof(result));
  146. cache_get_field_content(0,"HandyAkku",result);
  147. Spieler[playerid][pHandyakku] = floatstr(result);
  148. strdel(result,0,sizeof(result));
  149. cache_get_field_content(0,"HandyNummer",result);
  150. Spieler[playerid][pPhonenumber] = strval(result);
  151. strdel(result,0,sizeof(result));
  152. cache_get_field_content(0,"Handyflat",result);
  153. Spieler[playerid][pHandyFlat] = strval(result);
  154. strdel(result,0,sizeof(result));
  155. cache_get_field_content(0,"Handyflatbuyinbiz",result);
  156. Spieler[playerid][pHandyBuyByBiz] = strval(result);
  157. strdel(result,0,sizeof(result));
  158. cache_get_field_content(0,"Letzte_X",result);
  159. Spieler[playerid][LastInGamePos_x] = floatstr(result);
  160. strdel(result,0,sizeof(result));
  161. cache_get_field_content(0,"Letzte_Y",result);
  162. Spieler[playerid][LastInGamePos_y] = floatstr(result);
  163. strdel(result,0,sizeof(result));
  164. cache_get_field_content(0,"Letzte_Z",result);
  165. Spieler[playerid][LastInGamePos_z] = floatstr(result);
  166. strdel(result,0,sizeof(result));
  167. cache_get_field_content(0,"Letzte_Interior",result);
  168. Spieler[playerid][LastInGamePos_int] = strval(result);
  169. strdel(result,0,sizeof(result));
  170. cache_get_field_content(0,"Letzte_VirtualWorld",result);
  171. Spieler[playerid][LastInGamePos_world] = strval(result);
  172. strdel(result,0,sizeof(result));
  173. cache_get_field_content(0,"pSelectHome",result);
  174. Spieler[playerid][pSelectHome] = strval(result);
  175. strdel(result,0,sizeof(result));
  176. cache_get_field_content(0,"HausMieter",result);
  177. Spieler[playerid][pRentHome] = strval(result);
  178. strdel(result,0,sizeof(result));
  179. cache_get_field_content(0,"Spawn",result);
  180. Spieler[playerid][pSpawn] = strval(result);
  181. strdel(result,0,sizeof(result));
  182. cache_get_field_content(0,"Hotel",result);
  183. Spieler[playerid][pHotel] = strval(result);
  184. strdel(result,0,sizeof(result));
  185. cache_get_field_content(0,"Tod",result);
  186. Spieler[playerid][pDeath] = strval(result);
  187. strdel(result,0,sizeof(result));
  188. cache_get_field_content(0,"Tot_X",result);
  189. Spieler[playerid][tot_x] = floatstr(result);
  190. strdel(result,0,sizeof(result));
  191. cache_get_field_content(0,"Tot_Y",result);
  192. Spieler[playerid][tot_y] = floatstr(result);
  193. strdel(result,0,sizeof(result));
  194. cache_get_field_content(0,"Tot_Z",result);
  195. Spieler[playerid][tot_z] = floatstr(result);
  196. strdel(result,0,sizeof(result));
  197. cache_get_field_content(0,"Tot_Interior",result);
  198. Spieler[playerid][tot_int] = strval(result);
  199. strdel(result,0,sizeof(result));
  200. cache_get_field_content(0,"Tot_VirtualWorld",result);
  201. Spieler[playerid][tot_world] = strval(result);
  202. strdel(result,0,sizeof(result));
  203. cache_get_field_content(0,"TotZeit",result);
  204. Spieler[playerid][pDeathTime] = strval(result);
  205. strdel(result,0,sizeof(result));
  206. cache_get_field_content(0,"Friedhof",result);
  207. Spieler[playerid][pFriedhof] = strval(result);
  208. strdel(result,0,sizeof(result));
  209. cache_get_field_content(0,"FriedhofZeit",result);
  210. Spieler[playerid][pFriedhofTime] = strval(result);
  211. strdel(result,0,sizeof(result));
  212. cache_get_field_content(0,"ImKnast",result);
  213. Spieler[playerid][pJailed] = strval(result);
  214. strdel(result,0,sizeof(result));
  215. cache_get_field_content(0,"KnastZeit",result);
  216. Spieler[playerid][pJailTime] = strval(result);
  217. strdel(result,0,sizeof(result));
  218. cache_get_field_content(0,"KnastKaution",result);
  219. Spieler[playerid][pKaution] = strval(result);
  220. strdel(result,0,sizeof(result));
  221. cache_get_field_content(0,"Muted",result);
  222. Spieler[playerid][pMuted] = strval(result);
  223. strdel(result,0,sizeof(result));
  224. cache_get_field_content(0,"MuteZeit",result);
  225. Spieler[playerid][pMuteTime] = strval(result);
  226. strdel(result,0,sizeof(result));
  227. cache_get_field_content(0,"ImPrison",result);
  228. Spieler[playerid][pInPrison] = strval(result);
  229. strdel(result,0,sizeof(result));
  230. cache_get_field_content(0,"PrisonCheckPointsAbgelaufen",result);
  231. Spieler[playerid][pPrisonCPsgelaufen] = strval(result);
  232. strdel(result,0,sizeof(result));
  233. cache_get_field_content(0,"PrisonCheckPointsGegeben",result);
  234. Spieler[playerid][pPrisonCPsgegeben] = strval(result);
  235. strdel(result,0,sizeof(result));
  236. cache_get_field_content(0,"Morde",result);
  237. Spieler[playerid][pMorde] = strval(result);
  238. strdel(result,0,sizeof(result));
  239. cache_get_field_content(0,"Tode",result);
  240. Spieler[playerid][pTode] = strval(result);
  241. strdel(result,0,sizeof(result));
  242. cache_get_field_content(0,"SkinID",result);
  243. Spieler[playerid][pSkin] = strval(result);
  244. strdel(result,0,sizeof(result));
  245. cache_get_field_content(0,"FraktionSkinID",result);
  246. Spieler[playerid][pFraktSkin] = strval(result);
  247. strdel(result,0,sizeof(result));
  248. cache_get_field_content(0,"PaintBallKills",result);
  249. Spieler[playerid][pPBKills] = strval(result);
  250. strdel(result,0,sizeof(result));
  251. cache_get_field_content(0,"PaintBallTode",result);
  252. Spieler[playerid][pPBDeaths] = strval(result);
  253. strdel(result,0,sizeof(result));
  254. cache_get_field_content(0,"PaintBallRang",result);
  255. Spieler[playerid][pPBRang] = strval(result);
  256. strdel(result,0,sizeof(result));
  257. cache_get_field_content(0,"PaintBallBesuche",result);
  258. Spieler[playerid][pPBVisits] = strval(result);
  259. strdel(result,0,sizeof(result));
  260. cache_get_field_content(0,"AngenommeneReports",result);
  261. Spieler[playerid][Reports] = strval(result);
  262. strdel(result,0,sizeof(result));
  263. cache_get_field_content(0,"KopfGeld",result);
  264. Spieler[playerid][pHeadMoney] = strval(result);
  265. strdel(result,0,sizeof(result));
  266. cache_get_field_content(0,"pWantedDeaths",result);
  267. Spieler[playerid][pWantedDeaths] = strval(result);
  268. strdel(result,0,sizeof(result));
  269. cache_get_field_content(0,"pBuyTickets",result);
  270. Spieler[playerid][pBuyTickets] = strval(result);
  271. strdel(result,0,sizeof(result));
  272. cache_get_field_content(0,"pJailedCount",result);
  273. Spieler[playerid][pJailedCount] = strval(result);
  274. strdel(result,0,sizeof(result));
  275. cache_get_field_content(0,"Bankkonto",result);
  276. Spieler[playerid][pBankkonto] = strval(result);
  277. strdel(result,0,sizeof(result));
  278. cache_get_field_content(0,"pArmyPlaneOrder",result);
  279. Spieler[playerid][pArmyPlaneOrder] = strval(result);
  280. strdel(result,0,sizeof(result));
  281. cache_get_field_content(0,"pArmyHeliOrder",result);
  282. Spieler[playerid][pArmyHeliOrder] = strval(result);
  283. strdel(result,0,sizeof(result));
  284. cache_get_field_content(0,"pArmyWaffenOrder",result);
  285. Spieler[playerid][pArmyWaffenOrder] = strval(result);
  286. strdel(result,0,sizeof(result));
  287. cache_get_field_content(0,"LevelUPKosten",result);
  288. Spieler[playerid][pLevelKosten] = strval(result);
  289. strdel(result,0,sizeof(result));
  290. cache_get_field_content(0,"RespectForLevelUp",result);
  291. Spieler[playerid][pRespektToLevelUp] = strval(result);
  292. strdel(result,0,sizeof(result));
  293. cache_get_field_content(0,"RespectFromPayday",result);
  294. Spieler[playerid][pRespektFromPayday] = strval(result);
  295. strdel(result,0,sizeof(result));
  296. cache_get_field_content(0,"TimeAfterRegister",result);
  297. Spieler[playerid][pTimeAfterRegister] = strval(result);
  298. strdel(result,0,sizeof(result));
  299. cache_get_field_content(0,"Time4Payday",result);
  300. Spieler[playerid][pMinutesAfterPayday] = strval(result);
  301. strdel(result,0,sizeof(result));
  302. cache_get_field_content(0,"TimeoutCrashExeorKick",result);
  303. Spieler[playerid][pAntiOfflineFlucht] = strval(result);
  304. strdel(result,0,sizeof(result));
  305. cache_get_field_content(0,"RpChat",result);
  306. Spieler[playerid][pAntiOfflineFlucht] = strval(result);
  307. strdel(result,0,sizeof(result));
  308. cache_get_field_content(0,"HabGeworben",result);
  309. Spieler[playerid][HatGeworben] = strval(result);
  310. strdel(result,0,sizeof(result));
  311. cache_get_field_content(0,"pPremium",result);
  312. Spieler[playerid][pPremium] = strval(result);
  313. strdel(result,0,sizeof(result));
  314. cache_get_field_content(0,"GeworbenerSpieler",result);
  315. strmid(Spieler[playerid][GeworbenPlaya],result,0,strlen(result),24);
  316. strdel(result,0,sizeof(result));
  317. cache_get_field_content(0,"pScheinSperre",result);
  318. Spieler[playerid][pScheinSperre] = strval(result);
  319. strdel(result,0,sizeof(result));
  320. cache_get_field_content(0,"DigiHud",result);
  321. Spieler[playerid][DigiHud] = strval(result);
  322. strdel(result,0,sizeof(result));
  323. cache_get_field_content(0,"pDHitsound",result);
  324. Spieler[playerid][pDHitsound] = strval(result);
  325. strdel(result,0,sizeof(result));
  326. cache_get_field_content(0,"Bonus",result);
  327. Spieler[playerid][pStartbonus] = strval(result);
  328. strdel(result,0,sizeof(result));
  329. cache_get_field_content(0,"Gutschein",result);
  330. Spieler[playerid][pGutschein] = strval(result);
  331. strdel(result,0,sizeof(result));
  332. cache_get_field_content(0,"pCoins",result);
  333. Spieler[playerid][pCoins] = strval(result);
  334. strdel(result,0,sizeof(result));
  335. cache_get_field_content(0,"pFirmaLeader",result);
  336. Spieler[playerid][pFirmaLeader] = strval(result);
  337. strdel(result,0,sizeof(result));
  338. cache_get_field_content(0,"pFirmaMember",result);
  339. Spieler[playerid][pFirmaMember] = strval(result);
  340. strdel(result,0,sizeof(result));
  341. cache_get_field_content(0,"pOrgLeader",result);
  342. Spieler[playerid][pOrgLeader] = strval(result);
  343. strdel(result,0,sizeof(result));
  344. cache_get_field_content(0,"pOrgMember",result);
  345. Spieler[playerid][pOrgMember] = strval(result);
  346. strdel(result,0,sizeof(result));
  347. cache_get_field_content(0,"pParteiLeader",result);
  348. Spieler[playerid][pParteiLeader] = strval(result);
  349. strdel(result,0,sizeof(result));
  350. cache_get_field_content(0,"pParteiMember",result);
  351. Spieler[playerid][pParteiMember] = strval(result);
  352. strdel(result,0,sizeof(result));
  353. cache_get_field_content(0,"pLohn",result);
  354. Spieler[playerid][pLohn] = strval(result);
  355. strdel(result,0,sizeof(result));
  356. cache_get_field_content(0,"WaitPerso",result);
  357. Spieler[playerid][WaitPerso] = strval(result);
  358. strdel(result,0,sizeof(result));
  359. cache_get_field_content(0,"pMarried",result);
  360. strmid(Spieler[playerid][pMarried],result,0,strlen(result),sizeof(result));
  361. strdel(result,0,sizeof(result));
  362. strdel(result,0,sizeof(result));
  363. cache_get_field_content(0,"pBuyClothes",result);
  364. Spieler[playerid][pBuyClothes] = strval(result);
  365. strdel(result,0,sizeof(result));
  366. cache_get_field_content(0,"pTsIdent",result);
  367. strmid(Spieler[playerid][pTsIdent],result,0,strlen(result),24);
  368. strdel(result,0,sizeof(result));
  369. cache_get_field_content(0,"pIll",result);
  370. Spieler[playerid][pIll] = strval(result);
  371. strdel(result,0,sizeof(result));
  372. cache_get_field_content(0,"pConterminatedTime",result);
  373. Spieler[playerid][pConterminatedTime] = strval(result);
  374. strdel(result,0,sizeof(result));
  375. cache_get_field_content(0,"pBitchSkill",result);
  376. Spieler[playerid][pBitchSkill] = strval(result);
  377. strdel(result,0,sizeof(result));
  378. cache_get_field_content(0,"pBitchFuckCount",result);
  379. Spieler[playerid][pBitchFuckCount] = strval(result);
  380. strdel(result,0,sizeof(result));
  381. cache_get_field_content(0,"pMedicHealplayerSkill",result);
  382. Spieler[playerid][pMedicHealplayerSkill] = strval(result);
  383. strdel(result,0,sizeof(result));
  384. cache_get_field_content(0,"pMedicHealCount",result);
  385. Spieler[playerid][pMedicHealCount] = strval(result);
  386. strdel(result,0,sizeof(result));
  387. new stringlogin[256];
  388. format(stringlogin,sizeof(stringlogin),"SELECT * FROM "#DATENBANKTAG"_account_weapons WHERE Name = '%s'",SpielerName(playerid));
  389. mysql_function_query(MySqlConnection,stringlogin,true,"LoadAccountWeapons","i",playerid);
  390. format(stringlogin,sizeof(stringlogin),"SELECT * FROM "#DATENBANKTAG"_account_fish WHERE Name = '%s'",SpielerName(playerid));
  391. mysql_function_query(MySqlConnection,stringlogin,true,"LoadAccountFish","i",playerid);
  392. format(stringlogin,sizeof(stringlogin),"SELECT * FROM "#DATENBANKTAG"_account_koffer WHERE Name = '%s'",SpielerName(playerid));
  393. mysql_function_query(MySqlConnection,stringlogin,true,"LoadAccountKoffer","i",playerid);
  394. format(stringlogin,sizeof(stringlogin),"SELECT * FROM "#DATENBANKTAG"_account_blacklist WHERE Name = '%s'",SpielerName(playerid));
  395. mysql_function_query(MySqlConnection,stringlogin,true,"LoadAccountBlacklists","i",playerid);
  396. format(stringlogin,sizeof(stringlogin),"SELECT * FROM "#DATENBANKTAG"_account_inventar WHERE Name = '%s'",SpielerName(playerid));
  397. mysql_function_query(MySqlConnection,stringlogin,true,"LoadAccountInventar","i",playerid);
  398. format(stringlogin,sizeof(stringlogin),"SELECT * FROM "#DATENBANKTAG"_account_licenses WHERE Name = '%s'",SpielerName(playerid));
  399. mysql_function_query(MySqlConnection,stringlogin,true,"LoadAccountLicenses","i",playerid);
  400. format(stringlogin,sizeof(stringlogin),"SELECT * FROM "#DATENBANKTAG"_account_banksafe WHERE Name = '%s'",SpielerName(playerid));
  401. mysql_function_query(MySqlConnection,stringlogin,true,"LoadAccountBankSafe","i",playerid);
  402. for(new slot=0;slot<MAX_PLAYER_VEHS;slot++)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement