Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.58 KB | None | 0 0
  1. function IsPlayerLogin(playerid,password[]) {
  2. new playername2[MAX_PLAYER_NAME];
  3. GetPlayerName(playerid, playername2, sizeof(playername2));
  4. new qstr[100];
  5. new result[456];
  6. format(qstr,100,"SELECT * FROM users WHERE `name`='%s' AND `password`='%s'",playername2,password);
  7. mysql_query(SQL,qstr);
  8. mysql_store_result();
  9. if(mysql_num_rows() > 0) {
  10. if(mysql_retrieve_row()) {
  11. GameTextForPlayer(playerid, "~y~Loading account...", 20000, 4);
  12. PlayerTextdraws(playerid);
  13.  
  14. mysql_fetch_field_row(result,"password"); format(PlayerInfo[playerid][pKey], 128, result);
  15. mysql_fetch_field_row(result,"Level"); PlayerInfo[playerid][pLevel] = strval( result );
  16. mysql_fetch_field_row(result,"Admin"); PlayerInfo[playerid][pAdmin] = strval( result );
  17. mysql_fetch_field_row(result,"Backpack"); PlayerInfo[playerid][pBackpack] = strval( result );
  18. mysql_fetch_field_row(result,"Security"); format(PlayerInfo[playerid][pSecurity], 64, result);
  19. mysql_fetch_field_row(result,"SpinPoints"); PlayerInfo[playerid][pSpinPoints] = strval(result);
  20.  
  21. mysql_fetch_field_row(result,"ShowProgress1"); PlayerInfo[playerid][pShowProgress][0] = strval( result );
  22. mysql_fetch_field_row(result,"ShowProgress2"); PlayerInfo[playerid][pShowProgress][1] = strval( result );
  23.  
  24. mysql_fetch_field_row(result,"DM"); PlayerInfo[playerid][pDM] = strval( result );
  25. mysql_fetch_field_row(result,"Vip"); PlayerInfo[playerid][pVip] = strval( result );
  26. mysql_fetch_field_row(result,"Helper"); PlayerInfo[playerid][pHelper] = strval( result );
  27. mysql_fetch_field_row(result,"Premium"); PlayerInfo[playerid][pPremiumAccount] = strval( result );
  28. mysql_fetch_field_row(result,"ConnectedTime"); PlayerInfo[playerid][pConnectTime] = floatstr( result );
  29. mysql_fetch_field_row(result,"Registered"); PlayerInfo[playerid][pReg] = strval( result );
  30. mysql_fetch_field_row(result,"Sex"); PlayerInfo[playerid][pSex] = strval( result );
  31. mysql_fetch_field_row(result,"Age"); PlayerInfo[playerid][pAge] = strval( result );
  32. mysql_fetch_field_row(result,"Muted"); PlayerInfo[playerid][pMuted] = strval( result );
  33. mysql_fetch_field_row(result,"MuteTime"); PlayerInfo[playerid][pMuteTime] = strval( result );
  34. mysql_fetch_field_row(result,"Respect"); PlayerInfo[playerid][pExp] = strval( result );
  35. mysql_fetch_field_row(result,"Money"); PlayerInfo[playerid][pCash] = strval( result );
  36. mysql_fetch_field_row(result,"Bank"); PlayerInfo[playerid][pAccount] = strval( result );
  37. mysql_fetch_field_row(result,"Crimes"); PlayerInfo[playerid][pCrimes] = strval( result );
  38. mysql_fetch_field_row(result,"Kills"); PlayerInfo[playerid][pKills] = strval( result );
  39. mysql_fetch_field_row(result,"Deaths"); PlayerInfo[playerid][pDeaths] = strval( result );
  40. mysql_fetch_field_row(result,"Arrested"); PlayerInfo[playerid][pArrested] = strval( result );
  41. mysql_fetch_field_row(result,"WantedDeaths"); PlayerInfo[playerid][pWantedDeaths] = strval( result );
  42. mysql_fetch_field_row(result,"Phonebook"); PlayerInfo[playerid][pPhoneBook] = strval( result );
  43. mysql_fetch_field_row(result,"LottoNr"); PlayerInfo[playerid][pLottoNr] = strval( result );
  44. mysql_fetch_field_row(result,"WantedLevel"); PlayerInfo[playerid][pWantedLevel] = strval( result );
  45. mysql_fetch_field_row(result,"Fishes"); PlayerInfo[playerid][pFishes] = strval( result );
  46. mysql_fetch_field_row(result,"RFishes"); PlayerInfo[playerid][pRFishes] = strval( result );
  47. mysql_fetch_field_row(result,"Job"); PlayerInfo[playerid][pJob] = strval( result );
  48. mysql_fetch_field_row(result,"Paycheck"); PlayerInfo[playerid][pPayCheck] = strval( result );
  49. mysql_fetch_field_row(result,"HeadValue"); PlayerInfo[playerid][pHeadValue] = strval( result );
  50. mysql_fetch_field_row(result,"Jailed"); PlayerInfo[playerid][pJailed] = strval( result );
  51. mysql_fetch_field_row(result,"JailTime"); PlayerInfo[playerid][pJailTime] = strval( result );
  52. mysql_fetch_field_row(result,"Materials"); PlayerInfo[playerid][pMats] = strval( result );
  53. mysql_fetch_field_row(result,"Drugs"); PlayerInfo[playerid][pDrugs] = strval( result );
  54. mysql_fetch_field_row(result,"Leader"); PlayerInfo[playerid][pLeader] = strval( result );
  55. mysql_fetch_field_row(result,"Member"); PlayerInfo[playerid][pMember] = strval( result );
  56. mysql_fetch_field_row(result,"Rank"); PlayerInfo[playerid][pRank] = strval( result );
  57. mysql_fetch_field_row(result,"CChar"); PlayerInfo[playerid][pChar] = strval( result );
  58. mysql_fetch_field_row(result,"FWarn"); PlayerInfo[playerid][pFACWarns] = strval( result );
  59. mysql_fetch_field_row(result,"FPunish"); PlayerInfo[playerid][pFpunish] = strval( result );
  60. mysql_fetch_field_row(result,"Acceptpoints"); PlayerInfo[playerid][pLawyer] = strval( result );
  61. mysql_fetch_field_row(result,"SexSkill"); PlayerInfo[playerid][pSexSkill] = strval( result );
  62. mysql_fetch_field_row(result,"LawSkill"); PlayerInfo[playerid][pLawSkill] = strval( result );
  63. mysql_fetch_field_row(result,"MechSkill"); PlayerInfo[playerid][pMechSkill] = strval( result );
  64. mysql_fetch_field_row(result,"NewsSkill"); PlayerInfo[playerid][pNewsSkill] = strval( result );
  65. mysql_fetch_field_row(result,"DrugsSkill"); PlayerInfo[playerid][pDrugsSkill] = strval( result );
  66. mysql_fetch_field_row(result,"MowerSkill"); PlayerInfo[playerid][pWoodSkill] = strval( result );
  67. mysql_fetch_field_row(result,"StivuitorSkill"); PlayerInfo[playerid][pStivuitorSkill] = strval( result );
  68. mysql_fetch_field_row(result,"TruckerSkill"); PlayerInfo[playerid][pTruckerSkill] = strval( result );
  69. mysql_fetch_field_row(result,"IceSkill"); PlayerInfo[playerid][pJackerSkill] = strval( result );
  70. mysql_fetch_field_row(result,"GarbageSkill"); PlayerInfo[playerid][pGarbageSkill] = strval( result );
  71. mysql_fetch_field_row(result,"FarmerSkill"); PlayerInfo[playerid][pFarmerSkill] = strval( result );
  72. mysql_fetch_field_row(result,"FishSkill"); PlayerInfo[playerid][pFishSkill] = strval( result );
  73. mysql_fetch_field_row(result,"MatSkill"); PlayerInfo[playerid][pMatSkill] = strval( result );
  74. mysql_fetch_field_row(result,"RobSkill"); PlayerInfo[playerid][pRobSkill] = strval( result );
  75. mysql_fetch_field_row(result,"pHealth"); PlayerInfo[playerid][pHealth] = floatstr( result );
  76. mysql_fetch_field_row(result,"Inter"); PlayerInfo[playerid][pInt] = strval( result );
  77. mysql_fetch_field_row(result,"Local"); PlayerInfo[playerid][pLocal] = strval( result );
  78. mysql_fetch_field_row(result,"Team"); PlayerInfo[playerid][pTeam] = strval( result );
  79. mysql_fetch_field_row(result,"Model"); PlayerInfo[playerid][pModel] = strval( result );
  80. mysql_fetch_field_row(result,"PhoneNr"); PlayerInfo[playerid][pPhone] = strval( result );
  81. mysql_fetch_field_row(result,"House"); PlayerInfo[playerid][pHouse] = strval( result );
  82. mysql_fetch_field_row(result,"Bizz"); PlayerInfo[playerid][pBizz] = strval( result );
  83. mysql_fetch_field_row(result,"Rob"); PlayerInfo[playerid][pRob] = strval( result );
  84. mysql_fetch_field_row(result,"CarLicT"); PlayerInfo[playerid][pCarLicT] = strval( result );
  85. mysql_fetch_field_row(result,"CarLic"); PlayerInfo[playerid][pCarLic] = strval( result );
  86. mysql_fetch_field_row(result,"FlyLicT"); PlayerInfo[playerid][pFlyLicT] = strval( result );
  87. mysql_fetch_field_row(result,"FlyLic"); PlayerInfo[playerid][pFlyLic] = strval( result );
  88. mysql_fetch_field_row(result,"BoatLicT"); PlayerInfo[playerid][pBoatLicT] = strval( result );
  89. mysql_fetch_field_row(result,"BoatLic"); PlayerInfo[playerid][pBoatLic] = strval( result );
  90. mysql_fetch_field_row(result,"FishLicT"); PlayerInfo[playerid][pFishLicT] = strval( result );
  91. mysql_fetch_field_row(result,"FishLic"); PlayerInfo[playerid][pFishLic] = strval( result );
  92. mysql_fetch_field_row(result,"GunLicT"); PlayerInfo[playerid][pGunLicT] = strval( result );
  93. mysql_fetch_field_row(result,"GunLic"); PlayerInfo[playerid][pGunLic] = strval( result );
  94. mysql_fetch_field_row(result,"PayDay"); PlayerInfo[playerid][pPayDay] = strval( result );
  95. mysql_fetch_field_row(result,"PayDayHad"); PlayerInfo[playerid][pPayDayHad] = strval( result );
  96. mysql_fetch_field_row(result,"Tutorial"); PlayerInfo[playerid][pTut] = strval( result );
  97. mysql_fetch_field_row(result,"Warnings"); PlayerInfo[playerid][pWarns] = strval( result );
  98. mysql_fetch_field_row(result,"Rented"); PlayerInfo[playerid][pRented] = strval( result );
  99. mysql_fetch_field_row(result,"Fuel"); PlayerInfo[playerid][pFuel] = strval( result );
  100. mysql_fetch_field_row(result,"Married"); PlayerInfo[playerid][pMarried] = strval( result );
  101. mysql_fetch_field_row(result,"MarriedTo"); strmid(PlayerInfo[playerid][pMarriedTo], result, 0, strlen(result), 255);
  102. mysql_fetch_field_row(result,"WTalkie"); PlayerInfo[playerid][pWTalkie] = strval( result );
  103. mysql_fetch_field_row(result,"Lighter"); PlayerInfo[playerid][pLighter] = strval( result );
  104. mysql_fetch_field_row(result,"Cigarettes"); PlayerInfo[playerid][pCigarettes] = strval( result );
  105. mysql_fetch_field_row(result,"Email"); strmid(PlayerInfo[playerid][pEmail], result, 0, strlen(result), 255);
  106. mysql_fetch_field_row(result,"RegisterDate"); strmid(PlayerInfo[playerid][pRegistredDate], result, 0, strlen(result), 255);
  107. mysql_fetch_field_row(result,"Banned"); PlayerInfo[playerid][pBanned] = strval( result );
  108. mysql_fetch_field_row(result,"Radio2"); PlayerInfo[playerid][pMP3] = strval( result );
  109. mysql_fetch_field_row(result,"HitT"); PlayerInfo[playerid][pHitT] = strval( result );
  110. mysql_fetch_field_row(result,"CRank"); PlayerInfo[playerid][pCRank] = strval( result );
  111. mysql_fetch_field_row(result,"WantedTime"); WantedTime[playerid] = strval( result );
  112. mysql_fetch_field_row(result,"DeletedAds"); PlayerInfo[playerid][pDeletedAds] = strval(result);
  113.  
  114. //mysql_fetch_field_row(result,"Phone"); PlayerInfo[playerid][pPhone] = strval( result );
  115. mysql_fetch_field_row(result,"id"); PlayerInfo[playerid][pSQLID] = strval( result );
  116.  
  117.  
  118. mysql_fetch_field_row(result,"WarTurf"); new turf = strval( result );
  119. mysql_fetch_field_row(result,"WarKills"); ucideri[playerid][turf] = strval( result );
  120. mysql_fetch_field_row(result,"WarDeaths"); decese[playerid][turf] = strval( result );
  121. WarKills[playerid] = ucideri[playerid][turf];
  122. WarDeaths[playerid] = decese[playerid][turf];
  123.  
  124. mysql_fetch_field_row(result,"Referral"); PlayerInfo[playerid][pReferral] = strval( result );
  125. mysql_fetch_field_row(result,"ReferralRP"); PlayerInfo[playerid][pReferralRP] = strval( result );
  126. mysql_fetch_field_row(result,"ReferralMoney"); PlayerInfo[playerid][pReferralMoney] = strval( result );
  127.  
  128. mysql_fetch_field_row(result,"referralp"); PlayerInfo[playerid][pReferralP] = strval( result );
  129.  
  130. mysql_fetch_field_row(result,"Victim"); strmid(PlayerInfo[playerid][pVictim], result, 0, strlen(result), 255);
  131. mysql_fetch_field_row(result,"Accused"); strmid(PlayerInfo[playerid][pAccused], result, 0, strlen(result), 255);
  132. mysql_fetch_field_row(result,"Crime1"); strmid(PlayerInfo[playerid][pCrime1], result, 0, strlen(result), 255);
  133. mysql_fetch_field_row(result,"Crime2"); strmid(PlayerInfo[playerid][pCrime2], result, 0, strlen(result), 255);
  134. mysql_fetch_field_row(result,"Crime3"); strmid(PlayerInfo[playerid][pCrime3], result, 0, strlen(result), 255);
  135. mysql_fetch_field_row(result,"BTemp"); PlayerInfo[playerid][pBTemp] = strval( result );
  136. mysql_fetch_field_row(result,"BYear"); PlayerInfo[playerid][pBYear] = strval( result );
  137. mysql_fetch_field_row(result,"BMonth"); PlayerInfo[playerid][pBMonth] = strval( result );
  138. mysql_fetch_field_row(result,"BDay"); PlayerInfo[playerid][pBDay] = strval( result );
  139. mysql_fetch_field_row(result,"BBy"); strmid(PlayerInfo[playerid][pBBy], result, 0, strlen(result), 255);
  140. mysql_fetch_field_row(result,"BReason"); strmid(PlayerInfo[playerid][pBReason], result, 0, strlen(result), 255);
  141. mysql_fetch_field_row(result,"ALeader"); PlayerInfo[playerid][pALeader] = strval( result );
  142.  
  143. mysql_fetch_field_row(result,"ShowJob"); PlayerInfo[playerid][pShowJob] = strval( result );
  144. mysql_fetch_field_row(result,"NewbieMute"); PlayerInfo[playerid][pNewbieMute] = strval( result );
  145. mysql_fetch_field_row(result,"ReportTime"); PlayerInfo[playerid][pReportTime] = strval( result );
  146. mysql_fetch_field_row(result, "WTChannel"); WTChannel[playerid] = strval( result );
  147.  
  148. mysql_fetch_field_row(result,"HelpedPlayers"); PlayerInfo[playerid][pHelpedPlayers] = strval( result );
  149. mysql_fetch_field_row(result,"HelpedPlayersToday"); PlayerInfo[playerid][pHelpedPlayersToday] = strval( result );
  150. mysql_fetch_field_row(result,"ShowFP"); PlayerInfo[playerid][pShowFP] = strval( result );
  151. mysql_fetch_field_row(result,"ShowLogo"); PlayerInfo[playerid][pShowLogo] = strval( result );
  152. mysql_fetch_field_row(result,"ShowCeas"); PlayerInfo[playerid][pShowCeas] = strval( result );
  153.  
  154. mysql_fetch_field_row(result,"GoldPoints"); PlayerInfo[playerid][pPremiumPoints] = strval( result );
  155.  
  156. // tog
  157. NewbieChat[playerid] = cache_get_field_content_int(0, "NewbieChat", SQL);
  158. toglc[playerid] = cache_get_field_content_int(0, "TogLC", SQL);
  159. gFam[playerid] = cache_get_field_content_int(0, "TogFC", SQL);
  160. WTToggle[playerid] = cache_get_field_content_int(0, "TogWT", SQL);
  161. HidePM[playerid] = cache_get_field_content_int(0, "HidePM", SQL);
  162. gNews[playerid] = cache_get_field_content_int(0, "TogNews", SQL);
  163. toglicitatie[playerid] = cache_get_field_content_int(0, "TogLicitatie", SQL);
  164. togclan[playerid] = cache_get_field_content_int(0, "TogClan", SQL);
  165. togvip[playerid] = cache_get_field_content_int(0, "TogVip", SQL);
  166. togevent[playerid] = cache_get_field_content_int(0, "TogEvent", SQL);
  167. togding[playerid] = cache_get_field_content_int(0, "TogDing", SQL);
  168. togsurf[playerid] = cache_get_field_content_int(0, "TogSurf", SQL);
  169. tograport[playerid] = cache_get_field_content_int(0, "TogRaport", SQL);
  170. togalert[playerid] = cache_get_field_content_int(0, "TogAlert", SQL);
  171. togjob[playerid] = cache_get_field_content_int(0, "TogJob", SQL);
  172. togsc[playerid] = cache_get_field_content_int(0, "TogSC", SQL);
  173. togfind[playerid] = cache_get_field_content_int(0, "TogFind", SQL);
  174. PhoneOnline[playerid] = cache_get_field_content_int(0, "PhoneOnline", SQL);
  175.  
  176. mysql_fetch_field_row(result,"Clan"); PlayerInfo[playerid][pClan] = strval( result );
  177. mysql_fetch_field_row(result,"Tag"); PlayerInfo[playerid][pTag] = strval( result );
  178.  
  179. mysql_fetch_field_row(result,"ClanRank"); PlayerInfo[playerid][pClanRank] = strval( result );
  180. mysql_fetch_field_row(result,"ClanWarn"); PlayerInfo[playerid][pClanWarn] = strval( result );
  181. mysql_fetch_field_row(result,"ClanDays"); PlayerInfo[playerid][pClanDays] = strval( result );
  182.  
  183. mysql_fetch_field_row(result,"InvalidCommands"); PlayerInfo[playerid][pInvalidCommands] = strval( result );
  184. mysql_fetch_field_row(result,"Commands"); PlayerInfo[playerid][pCommands][0] = strval( result );
  185. mysql_fetch_field_row(result,"Commands2"); PlayerInfo[playerid][pCommands][1] = strval( result );
  186. mysql_fetch_field_row(result,"Commands3"); PlayerInfo[playerid][pCommands][2] = strval( result );
  187. mysql_fetch_field_row(result,"Commands4"); PlayerInfo[playerid][pCommands][3] = strval( result );
  188. mysql_fetch_field_row(result,"Commands5"); PlayerInfo[playerid][pCommands][4] = strval( result );
  189.  
  190. cache_get_field_content(0, "OrderGuns", result); format(gString, sizeof gString, result);
  191. sscanf(gString, "p<|>iiiii", PlayerInfo[playerid][pOrderWeapons][0], PlayerInfo[playerid][pOrderWeapons][1], PlayerInfo[playerid][pOrderWeapons][2], PlayerInfo[playerid][pOrderWeapons][3], PlayerInfo[playerid][pOrderWeapons][4]);
  192.  
  193. if(SpecialWeek == 1) {
  194. new questsvar[1028];
  195. cache_get_field_content(0, "SpecialQuest", result); format(questsvar, 256, result);
  196. sscanf(questsvar, "p<|>iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii",
  197. PlayerInfo[playerid][pSpecialQuest][0], PlayerInfo[playerid][pSpecialQuest][1], PlayerInfo[playerid][pSpecialQuest][2], PlayerInfo[playerid][pSpecialQuest][3], PlayerInfo[playerid][pSpecialQuest][4],
  198. PlayerInfo[playerid][pSpecialQuest][5], PlayerInfo[playerid][pSpecialQuest][6], PlayerInfo[playerid][pSpecialQuest][7], PlayerInfo[playerid][pSpecialQuest][8], PlayerInfo[playerid][pSpecialQuest][9],
  199. PlayerInfo[playerid][pSpecialQuest][10], PlayerInfo[playerid][pSpecialQuest][11], PlayerInfo[playerid][pSpecialQuest][12], PlayerInfo[playerid][pSpecialQuest][13], PlayerInfo[playerid][pSpecialQuest][14],
  200. PlayerInfo[playerid][pSpecialQuest][15], PlayerInfo[playerid][pSpecialQuest][16], PlayerInfo[playerid][pSpecialQuest][17], PlayerInfo[playerid][pSpecialQuest][18], PlayerInfo[playerid][pSpecialQuest][19],
  201. PlayerInfo[playerid][pSpecialQuest][20], PlayerInfo[playerid][pSpecialQuest][21], PlayerInfo[playerid][pSpecialQuest][22], PlayerInfo[playerid][pSpecialQuest][23], PlayerInfo[playerid][pSpecialQuest][24],
  202. PlayerInfo[playerid][pSpecialQuest][25], PlayerInfo[playerid][pSpecialQuest][26], PlayerInfo[playerid][pSpecialQuest][27], PlayerInfo[playerid][pSpecialQuest][28], PlayerInfo[playerid][pSpecialQuest][29],
  203. PlayerInfo[playerid][pSpecialQuest][30], PlayerInfo[playerid][pSpecialQuest][31], PlayerInfo[playerid][pSpecialQuest][32], PlayerInfo[playerid][pSpecialQuest][33], PlayerInfo[playerid][pSpecialQuest][34],
  204. PlayerInfo[playerid][pSpecialQuest][35], PlayerInfo[playerid][pSpecialQuest][36], PlayerInfo[playerid][pSpecialQuest][37], PlayerInfo[playerid][pSpecialQuest][38], PlayerInfo[playerid][pSpecialQuest][39],
  205. PlayerInfo[playerid][pSpecialQuest][40], PlayerInfo[playerid][pSpecialQuest][41], PlayerInfo[playerid][pSpecialQuest][42], PlayerInfo[playerid][pSpecialQuest][43], PlayerInfo[playerid][pSpecialQuest][44],
  206. PlayerInfo[playerid][pSpecialQuest][45], PlayerInfo[playerid][pSpecialQuest][46], PlayerInfo[playerid][pSpecialQuest][47], PlayerInfo[playerid][pSpecialQuest][48], PlayerInfo[playerid][pSpecialQuest][49],
  207. PlayerInfo[playerid][pSpecialQuest][50], PlayerInfo[playerid][pSpecialQuest][51], PlayerInfo[playerid][pSpecialQuest][52], PlayerInfo[playerid][pSpecialQuest][53], PlayerInfo[playerid][pSpecialQuest][54],
  208. PlayerInfo[playerid][pSpecialQuest][55], PlayerInfo[playerid][pSpecialQuest][56], PlayerInfo[playerid][pSpecialQuest][57], PlayerInfo[playerid][pSpecialQuest][58], PlayerInfo[playerid][pSpecialQuest][59],
  209. PlayerInfo[playerid][pSpecialQuest][60], PlayerInfo[playerid][pSpecialQuest][61], PlayerInfo[playerid][pSpecialQuest][62], PlayerInfo[playerid][pSpecialQuest][63], PlayerInfo[playerid][pSpecialQuest][64],
  210. PlayerInfo[playerid][pSpecialQuest][65], PlayerInfo[playerid][pSpecialQuest][66], PlayerInfo[playerid][pSpecialQuest][67], PlayerInfo[playerid][pSpecialQuest][68], PlayerInfo[playerid][pSpecialQuest][69],
  211. PlayerInfo[playerid][pSpecialQuest][70], PlayerInfo[playerid][pSpecialQuest][71], PlayerInfo[playerid][pSpecialQuest][72], PlayerInfo[playerid][pSpecialQuest][73], PlayerInfo[playerid][pSpecialQuest][74],
  212. PlayerInfo[playerid][pSpecialQuest][75], PlayerInfo[playerid][pSpecialQuest][76], PlayerInfo[playerid][pSpecialQuest][77], PlayerInfo[playerid][pSpecialQuest][78], PlayerInfo[playerid][pSpecialQuest][79],
  213. PlayerInfo[playerid][pSpecialQuest][80], PlayerInfo[playerid][pSpecialQuest][81], PlayerInfo[playerid][pSpecialQuest][82], PlayerInfo[playerid][pSpecialQuest][83], PlayerInfo[playerid][pSpecialQuest][84],
  214. PlayerInfo[playerid][pSpecialQuest][85], PlayerInfo[playerid][pSpecialQuest][86], PlayerInfo[playerid][pSpecialQuest][87], PlayerInfo[playerid][pSpecialQuest][88], PlayerInfo[playerid][pSpecialQuest][89],
  215. PlayerInfo[playerid][pSpecialQuest][90], PlayerInfo[playerid][pSpecialQuest][91], PlayerInfo[playerid][pSpecialQuest][92], PlayerInfo[playerid][pSpecialQuest][93], PlayerInfo[playerid][pSpecialQuest][94],
  216. PlayerInfo[playerid][pSpecialQuest][95], PlayerInfo[playerid][pSpecialQuest][96], PlayerInfo[playerid][pSpecialQuest][97], PlayerInfo[playerid][pSpecialQuest][98], PlayerInfo[playerid][pSpecialQuest][99]);
  217. for(new i = 0; i < 100; i++) {
  218. if(PlayerInfo[playerid][pSpecialQuest][i] == 0) {
  219. PlayerInfo[playerid][pObjectQuest][i] = CreatePlayerObject(playerid, 2710, QuestPos[i][0], QuestPos[i][1], QuestPos[i][2], 0, 0, 0, 300.0);
  220. }
  221. }
  222. }
  223.  
  224. new achivar[256];
  225. cache_get_field_content(0, "AchievementStatus", result); format(achivar, 256, result);
  226. sscanf(achivar, "p<|>iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii",
  227. PlayerInfo[playerid][pAchievementStatus][0], PlayerInfo[playerid][pAchievementStatus][1], PlayerInfo[playerid][pAchievementStatus][2], PlayerInfo[playerid][pAchievementStatus][3], PlayerInfo[playerid][pAchievementStatus][4],
  228. PlayerInfo[playerid][pAchievementStatus][5], PlayerInfo[playerid][pAchievementStatus][6], PlayerInfo[playerid][pAchievementStatus][7], PlayerInfo[playerid][pAchievementStatus][8], PlayerInfo[playerid][pAchievementStatus][9],
  229. PlayerInfo[playerid][pAchievementStatus][10], PlayerInfo[playerid][pAchievementStatus][11], PlayerInfo[playerid][pAchievementStatus][12], PlayerInfo[playerid][pAchievementStatus][13], PlayerInfo[playerid][pAchievementStatus][14],
  230. PlayerInfo[playerid][pAchievementStatus][15], PlayerInfo[playerid][pAchievementStatus][16], PlayerInfo[playerid][pAchievementStatus][17], PlayerInfo[playerid][pAchievementStatus][18], PlayerInfo[playerid][pAchievementStatus][19],
  231. PlayerInfo[playerid][pAchievementStatus][20], PlayerInfo[playerid][pAchievementStatus][21], PlayerInfo[playerid][pAchievementStatus][22], PlayerInfo[playerid][pAchievementStatus][23], PlayerInfo[playerid][pAchievementStatus][24],
  232. PlayerInfo[playerid][pAchievementStatus][25], PlayerInfo[playerid][pAchievementStatus][26], PlayerInfo[playerid][pAchievementStatus][27], PlayerInfo[playerid][pAchievementStatus][28], PlayerInfo[playerid][pAchievementStatus][29],
  233. PlayerInfo[playerid][pAchievementStatus][30], PlayerInfo[playerid][pAchievementStatus][31]);
  234.  
  235. SpawnChange[playerid] = cache_get_field_content_int(0, "SpawnChange");
  236. PlayerInfo[playerid][pSeconds] = cache_get_field_content_float(0, "Seconds");
  237. PlayerInfo[playerid][pUsed] = cache_get_field_content_int(0, "Used");
  238.  
  239. PlayerInfo[playerid][pRacePlace][0] = cache_get_field_content_int(0, "RacePlace1");
  240. PlayerInfo[playerid][pRacePlace][1] = cache_get_field_content_int(0, "RacePlace2");
  241. PlayerInfo[playerid][pRacePlace][2] = cache_get_field_content_int(0, "RacePlace3");
  242. PlayerInfo[playerid][pRacePlace][3] = cache_get_field_content_int(0, "RacePlace4");
  243.  
  244. PlayerInfo[playerid][pArenaStats][0] = cache_get_field_content_int(0, "ArenaKills");
  245. PlayerInfo[playerid][pArenaStats][1] = cache_get_field_content_int(0, "ArenaDeaths");
  246.  
  247. PlayerInfo[playerid][pPaintKills][0] = cache_get_field_content_int(0, "PaintKills1");
  248. PlayerInfo[playerid][pPaintKills][1] = cache_get_field_content_int(0, "PaintKills2");
  249. PlayerInfo[playerid][pPaintKills][2] = cache_get_field_content_int(0, "PaintKills3");
  250.  
  251. PlayerInfo[playerid][pPaintDeaths][2] = cache_get_field_content_int(0, "PaintDeaths1");
  252. PlayerInfo[playerid][pPaintDeaths][2] = cache_get_field_content_int(0, "PaintDeaths2");
  253. PlayerInfo[playerid][pPaintDeaths][2] = cache_get_field_content_int(0, "PaintDeaths3");
  254.  
  255. PlayerInfo[playerid][pCarLicS] = cache_get_field_content_int(0, "CarLicS", SQL);
  256. PlayerInfo[playerid][pBoatLicS] = cache_get_field_content_int(0, "BoatLicS", SQL);
  257. PlayerInfo[playerid][pFlyLicS] = cache_get_field_content_int(0, "FlyLicS", SQL);
  258. PlayerInfo[playerid][pGunLicS] = cache_get_field_content_int(0, "GunLicS", SQL);
  259.  
  260. PlayerInfo[playerid][pCarKey][0] = cache_get_field_content_int(0, "CarKey1", SQL);
  261. PlayerInfo[playerid][pCarKey][1] = cache_get_field_content_int(0, "CarKey2", SQL);
  262. PlayerInfo[playerid][pCarKey][2] = cache_get_field_content_int(0, "CarKey3", SQL);
  263. PlayerInfo[playerid][pCarKey][3] = cache_get_field_content_int(0, "CarKey4", SQL);
  264. PlayerInfo[playerid][pCarKey][4] = cache_get_field_content_int(0, "CarKey5", SQL);
  265. PlayerInfo[playerid][pCarKey][5] = cache_get_field_content_int(0, "CarKey6", SQL);
  266. PlayerInfo[playerid][pCarKey][6] = cache_get_field_content_int(0, "CarKey7", SQL);
  267. PlayerInfo[playerid][pCarKey][7] = cache_get_field_content_int(0, "CarKey8", SQL);
  268. PlayerInfo[playerid][pCarKey][8] = cache_get_field_content_int(0, "CarKey9", SQL);
  269. PlayerInfo[playerid][pCarKey][9] = cache_get_field_content_int(0, "CarKey10", SQL);
  270. PlayerInfo[playerid][pShowDMG] = cache_get_field_content_int(0, "ShowDMG", SQL);
  271. PlayerInfo[playerid][pSlot][0] = cache_get_field_content_int(0, "Slot1", SQL);
  272. PlayerInfo[playerid][pSlot][1] = cache_get_field_content_int(0, "Slot2", SQL);
  273. PlayerInfo[playerid][pSlot][2] = cache_get_field_content_int(0, "Slot3", SQL);
  274. PlayerInfo[playerid][pSlot][3] = cache_get_field_content_int(0, "Slot4", SQL);
  275. PlayerInfo[playerid][pSlot][4] = cache_get_field_content_int(0, "Slot5", SQL);
  276.  
  277. PlayerInfo[playerid][pDailyMission][0] = cache_get_field_content_int(0, "DailyMission", SQL);
  278. PlayerInfo[playerid][pDailyMission][1] = cache_get_field_content_int(0, "DailyMission2", SQL);
  279. PlayerInfo[playerid][pNeedProgress][0] = cache_get_field_content_int(0, "NeedProgress1", SQL);
  280. PlayerInfo[playerid][pNeedProgress][1] = cache_get_field_content_int(0, "NeedProgress2", SQL);
  281. PlayerInfo[playerid][pProgress][0] = cache_get_field_content_int(0, "Progress", SQL);
  282. PlayerInfo[playerid][pProgress][1] = cache_get_field_content_int(0, "Progress2", SQL);
  283. PlayerInfo[playerid][pPizzaSkill] = cache_get_field_content_int(0, "PizzaSkill", SQL);
  284. PlayerInfo[playerid][pCurierSkill] = cache_get_field_content_int(0, "CurierSkill", SQL);
  285. PlayerInfo[playerid][pGasCan] = cache_get_field_content_int(0, "GasCan", SQL);
  286. new string[180];
  287. PlayerInfo[playerid][pGlasses] = cache_get_field_content_int(0, "Glasses", SQL);
  288. PlayerInfo[playerid][pShowGlasses] = cache_get_field_content_int(0, "ShowGlasses", SQL);
  289.  
  290. PlayerInfo[playerid][pShowHP] = cache_get_field_content_int(0, "ShowHP", SQL);
  291. PlayerInfo[playerid][pShowCP] = cache_get_field_content_int(0, "ShowCP", SQL);
  292. PlayerInfo[playerid][pShowAP] = cache_get_field_content_int(0, "ShowAP", SQL);
  293.  
  294. PlayerInfo[playerid][pPin] = cache_get_field_content_int(0, "Pin", SQL);
  295. PlayerInfo[playerid][pColor] = cache_get_field_content_int(0, "Color", SQL);
  296. PlayerInfo[playerid][pYT] = cache_get_field_content_int(0, "Youtuber", SQL);
  297. PlayerInfo[playerid][pDays] = cache_get_field_content_int(0, "Days", SQL);
  298.  
  299. PlayerInfo[playerid][pPilotSkill] = cache_get_field_content_int(0, "PilotSkill", SQL);
  300. PlayerInfo[playerid][pHat] = cache_get_field_content_int(0, "Hat", SQL);
  301. PlayerInfo[playerid][pCoins] = cache_get_field_content_int(0, "Coins", SQL);
  302. PlayerInfo[playerid][pShowHat] = cache_get_field_content_int(0, "ShowHat", SQL);
  303. PlayerInfo[playerid][pDailyLogin] = cache_get_field_content_int(0, "DailyLogin", SQL);
  304.  
  305. PlayerInfo[playerid][pCrash] = cache_get_field_content_int(0, "Crash", SQL);
  306. PlayerInfo[playerid][pAJail] = cache_get_field_content_int(0, "AJail", SQL);
  307.  
  308. PlayerInfo[playerid][pHW] = cache_get_field_content_int(0, "HW", SQL);
  309. PlayerInfo[playerid][pAW] = cache_get_field_content_int(0, "AW", SQL);
  310. PlayerInfo[playerid][pLW] = cache_get_field_content_int(0, "LW", SQL);
  311.  
  312. new clanid = PlayerInfo[playerid][pClan];
  313. if(PlayerInfo[playerid][pClan] != 0 && PlayerInfo[playerid][pTag] == 0) {
  314. format(string, sizeof(string), "%s%s", ClanInfo[clanid][clTag], PlayerInfo[playerid][pUsername]);
  315. SetPlayerName(playerid, string);
  316. }
  317. else if(PlayerInfo[playerid][pClan] != 0 && PlayerInfo[playerid][pTag] == 1) {
  318. format(string, sizeof(string), "%s%s", PlayerInfo[playerid][pUsername], ClanInfo[clanid][clTag]);
  319. SetPlayerName(playerid, string);
  320. }
  321.  
  322. LoadPlayerCars(playerid);
  323. SetPlayerToTeamColor(playerid);
  324. new ip[16];
  325. GetPlayerIp(playerid, ip, sizeof(ip));
  326. format(string, sizeof(string), "UPDATE `users` SET `Status` = '1', `IP`='%s' WHERE `ID`='%d'", ip, PlayerInfo[playerid][pSQLID]);
  327. mysql_tquery(SQL,string, "", "");
  328. UpdateVar(playerid, "DayLogin", 1);
  329. TextDrawHideForPlayer(playerid, ServerTD);
  330. GameTextForPlayer(playerid, " ", 1000, 4);
  331. playersToday ++;
  332.  
  333. if(ServerSystem[17] == 0) checkS0beit(playerid);
  334. else SpawnPlayer(playerid);
  335. }
  336. for( new j = 0; j <= 100; j++) SCM(playerid, COLOR_WHITE, "");
  337. }
  338. else {
  339. new loginstring[128];
  340. format(loginstring,sizeof(loginstring),"Parola introdusa de tine este incorecta!\nIntrodu parola corecta altfel vei primi kick!",GetName(playerid));
  341. ShowPlayerDialog(playerid, DIALOG_LOGIN3,DIALOG_STYLE_PASSWORD,"Logare",loginstring,"Logare","Quit");
  342. mysql_free_result();
  343. gPlayerLogTries[playerid] += 1;
  344. new string[180];
  345. if(gPlayerLogTries[playerid] < 3) format(string, sizeof(string), "Parola incorecta! Mai ai la dispozitie %d incercari.", 3-gPlayerLogTries[playerid]);
  346. else format(string, sizeof(string), "Parola incorecta! Incercarile au fost epuizate si ai primit kick.", 3-gPlayerLogTries[playerid]);
  347. SCM(playerid, COLOR_WARNING, string);
  348. if(gPlayerLogTries[playerid] == 3) KickEx(playerid);
  349. return 1;
  350. }
  351. mysql_free_result();
  352. ResetPlayerCash(playerid);
  353. GivePlayerCash(playerid,PlayerInfo[playerid][pCash]);
  354. CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
  355. KillTimer(login[playerid]);
  356. if(PlayerInfo[playerid][pReg] == 0) {
  357. PlayerInfo[playerid][pLevel] = 1;
  358. PlayerInfo[playerid][pHealth] = 100.0;
  359. PlayerInfo[playerid][pInt] = 0;
  360. PlayerInfo[playerid][pLocal] = 255;
  361. PlayerInfo[playerid][pTeam] = 3;
  362. PlayerInfo[playerid][pModel] = 250;
  363. PlayerInfo[playerid][pHouse] = 999;
  364. PlayerInfo[playerid][pBizz] = 255;
  365. PlayerInfo[playerid][pAccount] = 1000;
  366. PlayerInfo[playerid][pReg] = 1;
  367. SetPlayerInterior(playerid,0);
  368. new string[300];
  369. new d,m,y;
  370. getdate(y,m,d);
  371. new h,mine,s;
  372. gettime(h,mine,s);
  373. format(string, sizeof(string), "%d/%d/%d %d:%d:%d",d,m,y,h,mine,s);
  374. strmid(PlayerInfo[playerid][pRegistredDate], string, 0, strlen(string), 255);
  375. new str[180];
  376. format(str,sizeof(str),"UPDATE users SET `Team`='3',`Model`='250' WHERE `ID`='%d'",PlayerInfo[playerid][pSQLID]);
  377. mysql_query(SQL,str);
  378. Update(playerid,pCashx);
  379. Update(playerid,pLevelx);
  380. Update(playerid,pHousex);
  381. Update(playerid,pBizzx);
  382. Update(playerid,pPnumberx);
  383. Update(playerid,pRegx);
  384. Update(playerid,pRegistredDatex);
  385. }
  386. if(PlayerInfo[playerid][pBTemp] == 1) { TempBanCheck(playerid); return 1; }
  387. if(PlayerInfo[playerid][pBanned] == 1) {
  388. for( new j = 0; j <= 100; j++) SCM(playerid, COLOR_WHITE, "");
  389. SCM(playerid, COLOR_WARNING, "Acest cont este banat permanent!");
  390. new str[180];
  391. format(str, sizeof str, "Ai fost banat de adminul %s.",PlayerInfo[playerid][pBBy]);
  392. SCM(playerid, COLOR_CLIENT, str);
  393. format(str, sizeof str, "Motivul: %s",PlayerInfo[playerid][pBReason]);
  394. SCM(playerid, COLOR_CLIENT, str);
  395. KickEx(playerid);
  396. SetPlayerCameraPos(playerid, 1183.0143, -965.7394, 129.6071);
  397. SetPlayerCameraLookAt(playerid, 1183.7214, -965.0270, 129.2470);
  398. TogglePlayerSpectating(playerid, 0);
  399. return 1;
  400. }
  401. if(PlayerInfo[playerid][pAdmin] > 0) Iter_Add(Admins, playerid);
  402. if(PlayerInfo[playerid][pHelper] > 0) Iter_Add(Helpers, playerid);
  403. if(PlayerInfo[playerid][pMember] > 0) Iter_Add(groupMembers[PlayerInfo[playerid][pMember]], playerid);
  404. StopAudioStreamForPlayer(playerid);
  405. SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
  406. new string2[180];
  407. if(PlayerInfo[playerid][pTut] != 0) {
  408. format(string2, 256, "Bine ai venit, %s!", GetName(playerid));
  409. SCM(playerid, -1, string2);
  410. if(PlayerInfo[playerid][pMember] != 0) {
  411. if(PlayerInfo[playerid][pDays] == 30) {
  412. if(PlayerInfo[playerid][pMember] == 11) finishAchievement(playerid, 23);
  413. else if(IsACop(playerid)) finishAchievement(playerid, 24);
  414. else if(IsAMember(playerid)) finishAchievement(playerid, 25);
  415. else finishAchievement(playerid, 22);
  416. }
  417. }
  418. }
  419. PlayerInfo[playerid][pShowJob] = 1; togjob[playerid] = 0;
  420. if(PlayerInfo[playerid][pWantedLevel] > 0 && PlayerInfo[playerid][pTut] != 0) {
  421. format(string2, sizeof(string2), "Aveai wanted %d inainte sa iesi de pe server.",PlayerInfo[playerid][pWantedLevel]);
  422. SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
  423. SCM(playerid, COLOR_LIGHTRED, string2);
  424. }
  425. SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], 1673.2865,1447.7628,10.7859, 1.0, -1, -1, -1, -1, -1, -1);
  426. if(gTeam[playerid] == 0) gTeam[playerid] = 3;
  427. else gTeam[playerid] = PlayerInfo[playerid][pTeam];
  428. if(PlayerInfo[playerid][pMember] != 0 && PlayerInfo[playerid][pTut] != 0) {
  429. new disc[84];
  430. format(disc,sizeof(disc),"(Factiune) %s s-a conectat pe server.",GetName(playerid));
  431. SendFactionMessage(PlayerInfo[playerid][pMember], COLOR_CLIENT, disc);
  432. }
  433.  
  434. HudProgress[playerid][0] = CreatePlayerProgressBar(playerid, 513.00, 150.00, 85.50, 2.50, 0x00FF00FF, 100.0);
  435. HudProgress[playerid][1] = CreatePlayerProgressBar(playerid, 513.00, 175.00, 85.50, 2.50, 0x00FF00FF, 100.0);
  436. UpdateProgress(playerid, 0);
  437. UpdateProgress(playerid, 1);
  438.  
  439. new sendername[25],playersip[64],iplog[184];
  440. GetPlayerName(playerid,sendername,sizeof(sendername));
  441. GetPlayerIp(playerid,playersip,sizeof(playersip));
  442. LogIP(playersip,PlayerInfo[playerid][pSQLID]);
  443. format(iplog,sizeof(iplog),"%s(%d) connected on the server with IP: %s.",sendername,playerid,playersip);
  444. SendIP(COLOR_WHITE,iplog);
  445. IsPlayerLogged[playerid] = 1;
  446. if(PlayerInfo[playerid][pTut] == 0) {
  447. gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
  448. TogglePlayerControllable(playerid, 0);
  449. RegistrationStep[playerid] = 1;
  450. SCM(playerid, 0xFFDE96FF, "Te rugam sa raspunzi la urmatoarele intrebari.");
  451. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_MSGBOX, "Register:", "Care este sexul caracterului tau?\nMasculin sau Feminin?", "Masculin", "Feminin");
  452. SetPlayerInterior(playerid, 0);
  453. }
  454. printf("%s has logged in with IP %s.",sendername,playersip);
  455. if(PlayerInfo[playerid][pDailyMission][0] == -1 || PlayerInfo[playerid][pDailyMission][1] == -1) GiveQuest(playerid);
  456. if(PlayerInfo[playerid][pHelper] != 0) SCMf(playerid, 0x87E32BFF, "(Staff MOTD): {FFFFFF}%s", StaffMotd);
  457. if(PlayerInfo[playerid][pTut] != 0) {
  458. SCM(playerid, -1, "Pentru a vedea ce misiuni ai in aceasta zi, foloseste /quests.");
  459. if(strlen(PlayerInfo[playerid][pPin]) == 0) {
  460. if(PlayerInfo[playerid][pLevel] < 5) {
  461. SCM(playerid, COLOR_LIGHTBLUE, "* Pentru o securitate cat mai mare a contului tau, iti poti pune un PIN format din 4 cifre.");
  462. SCM(playerid, COLOR_LIGHTBLUE, "* Foloseste comanda '/setpin' pentru a-ti pune un PIN!");
  463. }
  464. }
  465. else {
  466. SCM(playerid, COLOR_LIGHTBLUE, "* Contul tau are un PIN setat. Foloseste comanda '/loginpin' pentru a pune codul de securitate.");
  467. }
  468. new clanid = PlayerInfo[playerid][pClan], string[180];
  469. if(clanid != 0) {
  470. format(string, sizeof(string), "{%s}(CMOTD): %s.", ClanInfo[PlayerInfo[playerid][pClan]][clColor], ClanInfo[PlayerInfo[playerid][pClan]][clMotd]);
  471. MesajLung(playerid, -1, string);
  472. }
  473. if(PlayerInfo[playerid][pMember] != 0) {
  474. if(strlen(DynamicFactions[PlayerInfo[playerid][pMember]][fAnn]) > 0)
  475. {
  476. new factioninfo[128];
  477. format(factioninfo,sizeof(factioninfo), "(FMOTD): %s",DynamicFactions[PlayerInfo[playerid][pMember]][fAnn]);
  478. MesajLung(playerid,COLOR_YELLOW,factioninfo);
  479. }
  480. }
  481. new szQuery[256], szString[180], onf, Cache: results;
  482. format(szQuery, sizeof(szQuery), "SELECT * FROM `friends` WHERE `AddBy` = '%d'", PlayerInfo[playerid][pSQLID]);
  483. results = mysql_query(SQL, szQuery);
  484. // playerid login
  485. for(new i, j = cache_get_row_count (); i != j; ++i)
  486. {
  487. cache_get_field_content(i, "friendName", szString);
  488. new userID = GetPlayerID(szString);
  489. if(userID != INVALID_PLAYER_ID) onf ++;
  490. }
  491. cache_delete(results);
  492. format(string, sizeof(string), "Ai %d prieteni conectati in lista ta de prieteni.", onf);
  493.  
  494. if(onf != 0) {
  495. PlayerTextDrawSetString(playerid, FriendTD, string);
  496. PlayerTextDrawShow(playerid, FriendTD);
  497. SetTimerEx("HideFriendTD", 3000, false, "i", playerid);
  498. }
  499.  
  500. if(PlayerInfo[playerid][pDailyLogin] == 0) SCM(playerid, COLOR_LIGHTBLUE, "Vei primi de doua ori mai multi bani si puncte de respect la urmatorul payday.");
  501. if(PlayerInfo[playerid][pBizz] != 255) finishAchievement(playerid, 2);
  502. if(PlayerInfo[playerid][pHouse] != 999 && strcmp(GetName(playerid), HouseInfo[PlayerInfo[playerid][pHouse]][hOwner], true) == 0) finishAchievement(playerid, 3);
  503.  
  504.  
  505. // if exist player in other friend list
  506. foreach(new i: Player) {
  507. if(IsPlayerConnected(i) && IsPlayerLogged[i] == 1) {
  508. format(szQuery, sizeof(szQuery), "SELECT * FROM `friends` WHERE `AddBy` = '%d' AND `friendID` = '%d'", PlayerInfo[i][pSQLID], PlayerInfo[playerid][pSQLID]);
  509. results = mysql_query(SQL, szQuery);
  510. cache_get_field_content(0, "AddBy", szString);
  511. new friendID = strval(szString);
  512. cache_delete(results);
  513. if(PlayerInfo[i][pSQLID] == friendID && friendID != 0) {
  514. if(PlayerInfo[playerid][pAdmin] < 7) {
  515. format(string, sizeof(string), "Prietenul tau, %s, s-a conectat pe server.", GetName(playerid));
  516. PlayerTextDrawSetString(i, FriendTD, string);
  517. PlayerTextDrawShow(i, FriendTD);
  518. SetTimerEx("HideFriendTD", 3000, false, "i", i);
  519. }
  520. }
  521. }
  522. }
  523. }
  524. return 1;
  525. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement