Advertisement
Guest User

altceva

a guest
Mar 1st, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.88 KB | None | 0 0
  1. function WhenBanCheck(playerid)
  2. {
  3. new rows, fields;
  4. cache_get_data(rows, fields, handle);
  5.  
  6. if(rows)
  7. {
  8. new tmp[64], admin[25], reason[25], bany, banm, band, unbany, unbanm, unband, unbanh, days;
  9. cache_get_field_content(0, "Admin", tmp), format(admin, 64, tmp);
  10. cache_get_field_content(0, "Reason", tmp), format(reason, 64, tmp);
  11. cache_get_field_content(0, "BanY", tmp), bany = strval(tmp);
  12. cache_get_field_content(0, "BanM", tmp), banm = strval(tmp);
  13. cache_get_field_content(0, "BanD", tmp), band = strval(tmp);
  14. cache_get_field_content(0, "UnbanY", tmp), unbany = strval(tmp);
  15. cache_get_field_content(0, "UnbanM", tmp), unbanm = strval(tmp);
  16. cache_get_field_content(0, "UnbanD", tmp), unband = strval(tmp);
  17. cache_get_field_content(0, "UnbanH", tmp), unbanh = strval(tmp);
  18. cache_get_field_content(0, "Days", tmp), days = strval(tmp);
  19. if(days == 0)
  20. {
  21. format(gString,sizeof(gString), "Contul tau a fost blocat permanent de administratorul %s pe %02d/%02d/%d, motiv: %s.", admin, band, banm, bany, reason);
  22. SendClientMessage(playerid, COLOR_LIGHTRED, gString);
  23. SendClientMessage(playerid, COLOR_LIGHTRED, "Poti sa faci o cerere de unban pe forum-ul nostru: www.blazing.ro");
  24. }
  25. else
  26. {
  27. format(gString,sizeof(gString), "Contul tau a fost blocat %d zile de administratorul %s pe %02d/%02d/%d, motiv: %s.", days, admin, band, banm, bany, reason);
  28. SendClientMessage(playerid, COLOR_LIGHTRED, gString);
  29. format(gString,sizeof(gString), "Contul tau va fii deblocat pe data de %02d/%02d/%d la %02d:00.", unband, unbanm, unbany, unbanh);
  30. SendClientMessage(playerid, COLOR_LIGHTRED, gString);
  31. }
  32. Kick(playerid);
  33. }
  34. else
  35. {
  36. gQuery[0] = (EOS);
  37. mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `players` WHERE `Name` = '%e'", GetName(playerid));
  38. mysql_tquery(handle, gQuery, "WhenAccountCheck", "i", playerid);
  39. }
  40. return 1;
  41. }
  42.  
  43. function WhenAccountCheck(playerid, password[])
  44. {
  45. new rows, fields;
  46. cache_get_data(rows, fields, handle);
  47.  
  48. SetPlayerInterior(playerid,0);
  49. TogglePlayerControllableEx(playerid, 0);
  50. SetPlayerVirtualWorld(playerid, playerid+1);
  51. SetPlayerPos(playerid,1439.0607,-1106.1150,93.3587);
  52. InterpolateCameraPos(playerid, 1364.3937,-726.6948,126.0533, 1346.7803,-2148.2166,117.6013, 20000);
  53. InterpolateCameraLookAt(playerid, 1308.7045,-1702.2900,120.4304, 1586.9072,-2277.0942,13.6560, 20000);
  54. PlayAudioStreamForPlayer(playerid, "http://k003.kiwi6.com/hotlink/w8rggqpjem/Welcome.mp3");
  55. for(new s = 0; s < 19; s++) SendClientMessage(playerid, COLOR_WHITE, " ");
  56. SendClientMessage(playerid, COLOR_WHITE, ""MARO"LX: {FFFFFF}Bine ai venit pe "MARO""SERVER_NAME" RPG {FFFFFF}!");
  57.  
  58. if(rows)
  59. {
  60. new tmp[64];
  61. gRegistred[playerid] = 1;
  62. cache_get_field_content(0, "LastLogin", tmp), format(PlayerInfo[playerid][pLastLogin], 128, tmp);
  63. format(gString,sizeof(gString),""MARO"Acest cont ( %s ) este inregistrat\n"ALB"Introdu parola contului pentru a te loga.\n\nUltima logare: "MARO"%s",GetName(playerid), PlayerInfo[playerid][pLastLogin]);
  64. ShowPlayerDialog(playerid, DIALOG_LOGIN ,DIALOG_STYLE_PASSWORD,"Logare",gString,"Logare","Exit");
  65. SendClientMessage(playerid,COLOR_LIGHTRED,"* Te rugam sa te loghezi in urmatoarele 30 secunde!");
  66. }
  67. else
  68. {
  69. gRegistred[playerid] = 0;
  70. format(gString,sizeof(gString),""MARO"Bun venit %s\n"ALB"Acest cont nu este inregistrat. Te rugam introduceti parola mai jos.",GetName(playerid));
  71. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Inregistrare", gString, "Inregistrare", "Inchide");
  72. SendClientMessage(playerid,COLOR_LIGHTRED,"* Te rugam sa te inregistrezi in urmatoarele 30 secunde!");
  73. }
  74. return 1;
  75. }
  76.  
  77. function OnPlayerRegister(playerid, password[])
  78. {
  79. if(IsPlayerConnected(playerid))
  80. {
  81. gQuery[0] = (EOS);
  82. mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO `players` (`Name`,`Password`) VALUES ('%e','%e')", GetName(playerid), password);
  83. mysql_tquery(handle, gQuery, "", "");
  84.  
  85. strmid(PlayerInfo[playerid][pPassword], password, 0, strlen(password), 255);
  86.  
  87. format(gString, sizeof(gString), ""ALB"Va rugam sa scrieti parola mai jos pentru a va conecta pe server", GetName(playerid));
  88. ShowPlayerDialog(playerid, DIALOG_LOGIN ,DIALOG_STYLE_PASSWORD, "Logare", gString, "Logare", "Exit");
  89. }
  90. return 1;
  91. }
  92.  
  93. function OnPlayerLoginIn(playerid, password[])
  94. {
  95. if(IsPlayerConnected(playerid))
  96. {
  97. gQuery[0] = (EOS);
  98. mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `players` WHERE `Name`='%e' AND `Password`='%e'", GetName(playerid), password);
  99. mysql_tquery(handle, gQuery, "WhenPlayerLogin", "i", playerid);
  100. }
  101. return 1;
  102. }
  103.  
  104. function WhenPlayerLogin(playerid)
  105. {
  106. if(IsPlayerConnected(playerid))
  107. {
  108. new rows, fields;
  109. new tmp[256];
  110. cache_get_data(rows, fields, handle);
  111.  
  112. if(rows != 0)
  113. {
  114. cache_get_field_content(0, "ID", tmp), PlayerInfo[playerid][pSQLID] = strval(tmp);
  115. cache_get_field_content(0, "Password", tmp), format(PlayerInfo[playerid][pPassword], 64, tmp);
  116. cache_get_field_content(0, "Level", tmp), PlayerInfo[playerid][pLevel] = strval(tmp);
  117. cache_get_field_content(0, "AdminLevel", tmp), PlayerInfo[playerid][pAdmin] = strval(tmp);
  118. cache_get_field_content(0, "HelperLevel", tmp), PlayerInfo[playerid][pHelper] = strval(tmp);
  119. cache_get_field_content(0, "Cash", tmp), PlayerInfo[playerid][pCash] = strval(tmp);
  120. cache_get_field_content(0, "Account", tmp), PlayerInfo[playerid][pAccount] = strval(tmp);
  121. cache_get_field_content(0, "Email", tmp), format(PlayerInfo[playerid][pEmail], 128, tmp);
  122. cache_get_field_content(0, "Registred", tmp), PlayerInfo[playerid][pRegistred] = strval(tmp);
  123. cache_get_field_content(0, "Tutorial", tmp), PlayerInfo[playerid][pTutorial] = strval(tmp);
  124. cache_get_field_content(0, "Sex", tmp), PlayerInfo[playerid][pSex] = strval(tmp);
  125. cache_get_field_content(0, "Age", tmp), PlayerInfo[playerid][pAge] = strval(tmp);
  126. cache_get_field_content(0, "PhoneNumber", tmp), PlayerInfo[playerid][pPhoneNumber] = strval(tmp);
  127. cache_get_field_content(0, "PhoneBook", tmp), PlayerInfo[playerid][pPhoneBook] = strval(tmp);
  128. cache_get_field_content(0, "WalkieTalkie", tmp), PlayerInfo[playerid][pWalkieTalkie] = strval(tmp);
  129. cache_get_field_content(0, "PremiumAccount", tmp), PlayerInfo[playerid][pPremiumAccount] = strval(tmp);
  130. cache_get_field_content(0, "Respect", tmp), PlayerInfo[playerid][pRespect] = strval(tmp);
  131. cache_get_field_content(0, "PayCheck", tmp), PlayerInfo[playerid][pPayCheck] = strval(tmp);
  132. cache_get_field_content(0, "PayDay", tmp), PlayerInfo[playerid][pPayDay] = strval(tmp);
  133. cache_get_field_content(0, "PayDayHad", tmp), PlayerInfo[playerid][pPayDayHad] = strval(tmp);
  134. cache_get_field_content(0, "HoursPlayed", tmp), PlayerInfo[playerid][pHoursPlayed] = strval(tmp);
  135. cache_get_field_content(0, "PersonalKills", tmp), PlayerInfo[playerid][pPersonalKills] = strval(tmp);
  136. cache_get_field_content(0, "PersonalDeaths", tmp), PlayerInfo[playerid][pPersonalDeaths] = strval(tmp);
  137. cache_get_field_content(0, "Leader", tmp), PlayerInfo[playerid][pLeader] = strval(tmp);
  138. cache_get_field_content(0, "Member", tmp), PlayerInfo[playerid][pMember] = strval(tmp);
  139. cache_get_field_content(0, "Rank", tmp), PlayerInfo[playerid][pRank] = strval(tmp);
  140. cache_get_field_content(0, "Skin", tmp), PlayerInfo[playerid][pSkin] = strval(tmp);
  141. cache_get_field_content(0, "FWarns", tmp), PlayerInfo[playerid][pFWarns] = strval(tmp);
  142. cache_get_field_content(0, "FPunish", tmp), PlayerInfo[playerid][pFPunish] = strval(tmp);
  143. cache_get_field_content(0, "Warns", tmp), PlayerInfo[playerid][pWarns] = strval(tmp);
  144. cache_get_field_content(0, "Muted", tmp), PlayerInfo[playerid][pMuted] = strval(tmp);
  145. cache_get_field_content(0, "MuteTime", tmp), PlayerInfo[playerid][pMuteTime] = strval(tmp);
  146. cache_get_field_content(0, "DrivingLic", tmp), PlayerInfo[playerid][pDrivingLic] = strval(tmp);
  147. cache_get_field_content(0, "FlyingLic", tmp), PlayerInfo[playerid][pFlyingLic] = strval(tmp);
  148. cache_get_field_content(0, "GunLic", tmp), PlayerInfo[playerid][pGunLic] = strval(tmp);
  149. cache_get_field_content(0, "SailLic", tmp), PlayerInfo[playerid][pSailLic] = strval(tmp);
  150. cache_get_field_content(0, "FishingLic", tmp), PlayerInfo[playerid][pFishingLic] = strval(tmp);
  151. cache_get_field_content(0, "BiggestFish", tmp), PlayerInfo[playerid][pBiggestFish] = strval(tmp);
  152. cache_get_field_content(0, "Job", tmp), PlayerInfo[playerid][pJob] = strval(tmp);
  153. cache_get_field_content(0, "Wanted", tmp), PlayerInfo[playerid][pWanted] = strval(tmp);
  154. cache_get_field_content(0, "WantedLost", tmp), PlayerInfo[playerid][pWantedLost] = strval(tmp);
  155. cache_get_field_content(0, "Jailed", tmp), PlayerInfo[playerid][pJailed] = strval(tmp);
  156. cache_get_field_content(0, "JailTime", tmp), PlayerInfo[playerid][pJailTime] = strval(tmp);
  157. cache_get_field_content(0, "Bail", tmp), PlayerInfo[playerid][pBail] = strval(tmp);
  158. cache_get_field_content(0, "Materials", tmp), PlayerInfo[playerid][pMats] = strval(tmp);
  159. cache_get_field_content(0, "Drugs", tmp), PlayerInfo[playerid][pDrugs] = strval(tmp);
  160. cache_get_field_content(0, "HouseKey", tmp), PlayerInfo[playerid][pHouseKey] = strval(tmp);
  161. cache_get_field_content(0, "RentKey", tmp), PlayerInfo[playerid][pRentKey] = strval(tmp);
  162. cache_get_field_content(0, "BizzKey", tmp), PlayerInfo[playerid][pBizzKey] = strval(tmp);
  163. cache_get_field_content(0, "HeadValue", tmp), PlayerInfo[playerid][pHeadValue] = strval(tmp);
  164. cache_get_field_content(0, "Contracted", tmp), PlayerInfo[playerid][pContracted] = strval(tmp);
  165. cache_get_field_content(0, "Contract", tmp), format(PlayerInfo[playerid][pContract], 25, tmp);
  166. cache_get_field_content(0, "ContractTime", tmp), PlayerInfo[playerid][pContractTime] = strval(tmp);
  167. cache_get_field_content(0, "TowPoints", tmp), PlayerInfo[playerid][pTowPoints] = strval(tmp);
  168. cache_get_field_content(0, "SpawnChange", tmp), PlayerInfo[playerid][pSpawnChange] = strval(tmp);
  169. cache_get_field_content(0, "AJailed", tmp), PlayerInfo[playerid][pAJailed] = strval(tmp);
  170. cache_get_field_content(0, "AJailTime", tmp), PlayerInfo[playerid][pAJailTime] = strval(tmp);
  171. cache_get_field_content(0, "Referral", tmp), PlayerInfo[playerid][pReferral] = strval(tmp);
  172. cache_get_field_content(0, "Rob", tmp), PlayerInfo[playerid][pRob] = strval(tmp);
  173. cache_get_field_content(0, "FreePoints", tmp), PlayerInfo[playerid][pFreePoints] = strval(tmp);
  174. cache_get_field_content(0, "CLeader", tmp), PlayerInfo[playerid][pCLeader] = strval(tmp);
  175. cache_get_field_content(0, "CMember", tmp), PlayerInfo[playerid][pCMember] = strval(tmp);
  176. cache_get_field_content(0, "CRank", tmp), PlayerInfo[playerid][pCRank] = strval(tmp);
  177. cache_get_field_content(0, "Kills", tmp), PlayerInfo[playerid][pKills] = strval(tmp);
  178. cache_get_field_content(0, "Deaths", tmp), PlayerInfo[playerid][pDeaths] = strval(tmp);
  179. cache_get_field_content(0, "Crimes", tmp), PlayerInfo[playerid][pCrimes] = strval(tmp);
  180. cache_get_field_content(0, "Arrests", tmp), PlayerInfo[playerid][pArrests] = strval(tmp);
  181. cache_get_field_content(0, "WantedDeaths", tmp), PlayerInfo[playerid][pWantedDeaths] = strval(tmp);
  182. cache_get_field_content(0, "VehicleSlots", tmp), PlayerInfo[playerid][pVehicleSlots] = strval(tmp);
  183. cache_get_field_content(0, "TruckerSkill", tmp), PlayerInfo[playerid][pTruckerSkill] = strval(tmp);
  184. cache_get_field_content(0, "GarbageSkill", tmp), PlayerInfo[playerid][pGarbageSkill] = strval(tmp);
  185. cache_get_field_content(0, "MechanicSkill", tmp), PlayerInfo[playerid][pMechanicSkill] = strval(tmp);
  186. cache_get_field_content(0, "ThiefSkill", tmp), PlayerInfo[playerid][pThiefSkill] = strval(tmp);
  187. cache_get_field_content(0, "ArmsSkill", tmp), PlayerInfo[playerid][pArmsSkill] = strval(tmp);
  188. cache_get_field_content(0, "FarmerSkill", tmp), PlayerInfo[playerid][pFarmerSkill] = strval(tmp);
  189. cache_get_field_content(0, "PizzaSkill", tmp), PlayerInfo[playerid][pPizzaSkill] = strval(tmp);
  190. cache_get_field_content(0, "Gold", tmp), PlayerInfo[playerid][pGold] = strval(tmp);
  191. cache_get_field_content(0, "MoneyBoost", tmp), PlayerInfo[playerid][pMoneyBoost] = strval(tmp);
  192. cache_get_field_content(0, "RPBoost", tmp), PlayerInfo[playerid][pRPBoost] = strval(tmp);
  193. cache_get_field_content(0, "Fuel", tmp), PlayerInfo[playerid][pFuel] = strval(tmp);
  194. cache_get_field_content(0, "UseHidden", tmp), PlayerInfo[playerid][pUseHidden] = strval(tmp);
  195. cache_get_field_content(0, "Glasses", tmp), PlayerInfo[playerid][pGlasses] = strval(tmp);
  196. cache_get_field_content(0, "Hat", tmp), PlayerInfo[playerid][pHat] = strval(tmp);
  197. cache_get_field_content(0, "FactionTime", tmp), PlayerInfo[playerid][pFactionTime] = strval(tmp);
  198. cache_get_field_content(0, "StaffPoints", tmp), PlayerInfo[playerid][pStaffPoints] = strval(tmp);
  199. cache_get_field_content(0, "TutVeh", tmp), PlayerInfo[playerid][pTutVeh] = strval(tmp);
  200. cache_get_field_content(0, "GeneralIP", tmp), format(PlayerInfo[playerid][pGeneralIP], 32, tmp);
  201. cache_get_field_content(0, "FactionPoints", tmp), PlayerInfo[playerid][pFactionPoints] = strval(tmp);
  202. cache_get_field_content(0, "GiftTime", tmp), PlayerInfo[playerid][pGiftTime] = strval(tmp);
  203. cache_get_field_content(0, "Pickup", tmp), PlayerInfo[playerid][pPickups][0] = strval(tmp);
  204. cache_get_field_content(0, "Pickup1", tmp), PlayerInfo[playerid][pPickups][1] = strval(tmp);
  205. cache_get_field_content(0, "Pickup2", tmp), PlayerInfo[playerid][pPickups][2] = strval(tmp);
  206. cache_get_field_content(0, "Pickup3", tmp), PlayerInfo[playerid][pPickups][3] = strval(tmp);
  207. cache_get_field_content(0, "Pickup4", tmp), PlayerInfo[playerid][pPickups][4] = strval(tmp);
  208. cache_get_field_content(0, "Pickup5", tmp), PlayerInfo[playerid][pPickups][5] = strval(tmp);
  209. cache_get_field_content(0, "Pickup6", tmp), PlayerInfo[playerid][pPickups][6] = strval(tmp);
  210. cache_get_field_content(0, "Pickup7", tmp), PlayerInfo[playerid][pPickups][7] = strval(tmp);
  211. cache_get_field_content(0, "Pickup8", tmp), PlayerInfo[playerid][pPickups][8] = strval(tmp);
  212. cache_get_field_content(0, "Pickup9", tmp), PlayerInfo[playerid][pPickups][9] = strval(tmp);
  213. cache_get_field_content(0, "Pickup10", tmp), PlayerInfo[playerid][pPickups][10] = strval(tmp);
  214. cache_get_field_content(0, "Pickup11", tmp), PlayerInfo[playerid][pPickups][11] = strval(tmp);
  215. cache_get_field_content(0, "Pickup12", tmp), PlayerInfo[playerid][pPickups][12] = strval(tmp);
  216. cache_get_field_content(0, "Pickup13", tmp), PlayerInfo[playerid][pPickups][13] = strval(tmp);
  217. cache_get_field_content(0, "Pickup14", tmp), PlayerInfo[playerid][pPickups][14] = strval(tmp);
  218. cache_get_field_content(0, "Pickup15", tmp), PlayerInfo[playerid][pPickups][15] = strval(tmp);
  219. cache_get_field_content(0, "Pickup16", tmp), PlayerInfo[playerid][pPickups][16] = strval(tmp);
  220. cache_get_field_content(0, "Pickup17", tmp), PlayerInfo[playerid][pPickups][17] = strval(tmp);
  221. cache_get_field_content(0, "Pickup18", tmp), PlayerInfo[playerid][pPickups][18] = strval(tmp);
  222. cache_get_field_content(0, "Pickup19", tmp), PlayerInfo[playerid][pPickups][19] = strval(tmp);
  223. cache_get_field_content(0, "TotalPickups", tmp), PlayerInfo[playerid][pTotalPickups] = strval(tmp);
  224. cache_get_field_content(0, "PaintKills", tmp), PlayerInfo[playerid][pPaintKills] = strval(tmp);
  225. cache_get_field_content(0, "Seconds", tmp), PlayerInfo[playerid][pSeconds] = strval(tmp);
  226. }
  227. else
  228. {
  229. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logare", ""ALB"Parola este gresita!\nTe rugam sa introduci parola pentru a te loga:", "Logare", "Exit");
  230. return 1;
  231. }
  232.  
  233. new playerip[16];
  234. GetPlayerIp(playerid,playerip,sizeof(playerip));
  235. if(NumIp(playerip, playerid) > 5 && !IsPremiumOnIP(playerip))
  236. {
  237. Kick(playerid);
  238. SendClientMessage(playerid, COLOR_LIGHTRED, ""MARO"(Kick): "ALB"Ai nevoie de Cont Premium ca sa conectezi 3 conturi cu acelasi IP!");
  239. return 1;
  240. }
  241.  
  242. if(PlayerInfo[playerid][pAdmin] >= 1) { // admini online
  243. counta++;
  244. }
  245. if(PlayerInfo[playerid][pHelper] >= 1) { // admini online
  246. counth++;
  247. }
  248. gQuery[0] = (EOS);
  249. mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `mdc` WHERE `ID` = %d", PlayerInfo[playerid][pSQLID]);
  250. mysql_tquery(handle, gQuery, "LoadCrimes", "i", playerid);
  251.  
  252. mysql_format(handle, gQuery, sizeof(gQuery), "UPDATE `players` SET `Status` = '1' WHERE `ID` = %d", PlayerInfo[playerid][pSQLID]);
  253. mysql_tquery(handle, gQuery, "", "");
  254.  
  255. new day, month, year;
  256. getdate(year, month, day);
  257. new hour, minute, second;
  258. gettime(hour, minute, second);
  259. new str[128];
  260. format(str, sizeof(str),"%02d/%02d/%d - %02d:%02d:%02d", day, month, year, hour, minute, second);
  261. format(PlayerInfo[playerid][pLastLogin], 128, str);
  262. Update(playerid, pLastLoginx);
  263.  
  264. format(gString, sizeof(gString), ""MARO"(Connect):{FFFFFF} %s(ID: %d) | IP: %s | Version: 0.3.7 | Ping: %d", GetName(playerid), playerid, GetIPEx(playerid), GetPlayerPing(playerid));
  265. ABroadCast(COLOR_WHITE, gString, 1);
  266.  
  267. SetCameraBehindPlayer(playerid);
  268. if(!strmatch(GetIPEx(playerid), PlayerInfo[playerid][pGeneralIP]))
  269. {
  270. gQuery[0] = (EOS);
  271. mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO `ips` (`PIP`,`PName`) VALUES ('%s', '%e')",GetIPEx(playerid),GetName(playerid));
  272. mysql_tquery(handle, gQuery, "", "");
  273. }
  274. format(PlayerInfo[playerid][pGeneralIP], 32, GetIPEx(playerid));
  275. Update(playerid, pGeneralIPx);
  276.  
  277. SetPlayerVirtualWorld(playerid, 0);
  278. if(PlayerInfo[playerid][pRegistred] == 1)
  279. {
  280. SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
  281. SetPlayerCash(playerid, PlayerInfo[playerid][pCash]);
  282. StopAudioStreamForPlayer(playerid);
  283.  
  284. format(gString, sizeof(gString), "~w~Bun venit ~n~~y~ %s", GetName( playerid ));
  285. GameTextForPlayer(playerid, gString, 4000, 1);
  286.  
  287. if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
  288. {
  289. format(gString, sizeof(gString), "Reports: ~y~%d ~w~/ Questions: ~y~%d", Reports, Questions);
  290. PlayerTextDrawSetString(playerid, PlayerText:StaffInfo[playerid], gString);
  291. PlayerTextDrawShow(playerid, StaffInfo[playerid]);
  292. }
  293. new faction = PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader];
  294. if(faction > 0)
  295. {
  296. format(gString, sizeof (gString), "%s din factiunea ta tocmai s-a conectat pe server.", GetName(playerid));
  297. SendFactionMessage(faction, COLOR_YELLOW, gString);
  298. }
  299. if(playeri < 1000)
  300. {
  301. format(gString, sizeof (gString), ""MARO"(Bonus):{FFFFFF} Cand serverul va atinge %d jucatori conectati o sa primesti %s$, %d RP si %d Gold.", playeri, FormatNumber(bani), rp, gold);
  302. SendClientMessage(playerid, COLOR_WHITE, gString);
  303. }
  304. if(DoubleMoney == 1) SendClientMessage(playerid, COLOR_WHITE, ""MARO"(Bonus):{FFFFFF} Bonusul tau salarial este dublat pana duminica la ora 18:00.");
  305. if(PlayerInfo[playerid][pHelper] > 0) SendClientMessage(playerid, COLOR_WHITE, ""MARO"(Staff):{FFFFFF} Foloseste comanda /hod pentru a deveni disponibil in calitate de helper.");
  306. if(PlayerInfo[playerid][pHelper] > 0 && PlayerInfo[playerid][pHelper] < 3) SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Trebuie sa fii la datorie ca sa folosesti aceasta comanda. Tasteaza /hod");
  307.  
  308. BuyLevelMsg(playerid);
  309. SetPlayerWantedLevel(playerid,PlayerInfo[playerid][pWanted]);
  310. gLogged[playerid] = 1;
  311.  
  312. CheckEvent();
  313. SetPlayerInterior(playerid, 0);
  314. SpawnPlayer(playerid);
  315. SetMaxCars(playerid);
  316.  
  317. if(PlayerInfo[playerid][pCMember] + PlayerInfo[playerid][pCLeader] != 0)
  318. {
  319. new namesa[25];
  320. format(namesa, sizeof(namesa), "%s", GetName(playerid));
  321. SetPlayerName(playerid, "clName");
  322. SetPlayerName(playerid, namesa);
  323.  
  324. PlayerTextDrawShow(playerid, NameText[playerid]);
  325.  
  326. new id = PlayerInfo[playerid][pCMember] + PlayerInfo[playerid][pCLeader];
  327. if(!strmatch(ClanInfo[id][clNews], "0"))
  328. {
  329. format(gString,sizeof(gString),""MARO"(Clan News): {FFFFFF}%s",ClanInfo[id][clNews]);
  330. SendClientMessage(playerid, COLOR_WHITE, gString);
  331. }
  332. }
  333. if(PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader] != 0)
  334. {
  335. new id = PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader];
  336. if(!strmatch(SafeInfo[id][sNews], "0"))
  337. {
  338. format(gString,sizeof(gString),""MARO"(Faction News): {FFFFFF}%s",SafeInfo[id][sNews]);
  339. SendClientMessage(playerid, COLOR_WHITE, gString);
  340. }
  341. }
  342. if(PlayerInfo[playerid][pWanted] > 0)
  343. {
  344. PlayerTextDrawShow(playerid, WantedTime[playerid]);
  345. format(gString, sizeof(gString), "Wanted: %d", PlayerInfo[playerid][pWanted]);
  346. SetPlayerChatBubble(playerid, gString, COLOR_LIGHTRED, 25.0, 900000);
  347. }
  348. }
  349. else
  350. {
  351. if(PlayerInfo[playerid][pTutorial] == 0)
  352. {
  353. SetMaxCars(playerid);
  354. OnPlayerSpawn(playerid);
  355. TogglePlayerControllableEx(playerid, 0);
  356. SetPlayerVirtualWorld(playerid, playerid+1);
  357. SetPlayerPos(playerid,1439.0607,-1106.1150,93.3587);
  358. InterpolateCameraPos(playerid, 1364.3937,-726.6948,126.0533, 1346.7803,-2148.2166,117.6013, 20000);
  359. InterpolateCameraLookAt(playerid, 1308.7045,-1702.2900,120.4304, 1586.9072,-2277.0942,13.6560, 20000);
  360. ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_MSGBOX, "Inregistrare[2/5]", "{FFFFFF}Te rugam sa specifici sexul tau pentru a continua inregistrarea", "Barbat", "Femeie");
  361. }
  362. }
  363. }
  364. return 1;
  365. }
  366.  
  367. function ReferralCheck(playerid)
  368. {
  369. if(IsPlayerConnected(playerid))
  370. {
  371. new rows, fields;
  372. new tmp[128];
  373. cache_get_data(rows, fields, handle);
  374.  
  375. if(rows != 0)
  376. {
  377. new name[25], id, registred;
  378. cache_get_field_content(0, "ID", tmp), id = strval(tmp);
  379. cache_get_field_content(0, "Registred", tmp), registred = strval(tmp);
  380. cache_get_field_content(0, "Name", tmp), format(name, 64, tmp);
  381. if(strmatch(name, GetName(playerid)))
  382. {
  383. format(gString, sizeof(gString), "{FFFFFF}Te rugam sa scrii numele celui care te-a adus pe server:");
  384. ShowPlayerDialog(playerid, DIALOG_REFERRAL, DIALOG_STYLE_INPUT, "Inregistrare[5/5]", gString, "Gata", "Sari");
  385. return 1;
  386. }
  387. if(registred == 0)
  388. {
  389. format(gString, sizeof(gString), "{FFFFFF}Acel jucator nu este inregistrat, scrie numele celui care te-a adus pe server:");
  390. ShowPlayerDialog(playerid, DIALOG_REFERRAL, DIALOG_STYLE_INPUT, "Inregistrare[5/5]", gString, "Gata", "Sari");
  391. return 1;
  392. }
  393. format(gString, sizeof(gString), "{FFFFFF}Ai fost adus aici de "MARO"%s ?", name);
  394. ShowPlayerDialog(playerid, DIALOG_REFERRAL_CHECK, DIALOG_STYLE_MSGBOX,"Inregistrare[5/5]", gString, "Da", "Nu");
  395. ReferralID[playerid] = id;
  396. format(ReferralName[playerid], 64, name);
  397. }
  398. else
  399. {
  400. format(gString, sizeof(gString), "{FFFFFF}Te rugam sa scrii numele corect:");
  401. ShowPlayerDialog(playerid, DIALOG_REFERRAL, DIALOG_STYLE_INPUT, "Inregistrare[5/5]", gString, "Gata", "Sari");
  402. }
  403. }
  404. return 1;
  405. }
  406.  
  407. function SetPlayerSpawn(playerid)
  408. {
  409. if(IsPlayerConnected(playerid))
  410. {
  411. SetPlayerTeam(playerid, 4);
  412. SetPlayerArmourEx(playerid, 0);
  413. SetPlayerHealthEx(playerid, 100);
  414. ResetPlayerWeapons(playerid);
  415. SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  416. TeamColor(playerid);
  417.  
  418. if(PlayerInfo[playerid][pGlasses] != -1) PutGlasses(playerid);
  419. if(PlayerInfo[playerid][pHat] != -1) PutHat(playerid);
  420. if(SpectatorID[playerid] != INVALID_PLAYER_ID) SpectatorID[playerid] = INVALID_PLAYER_ID, PlayerTextDrawHide(playerid, SpecText[playerid]);
  421.  
  422. if(BeforeSpectate[playerid][pSpectating])
  423. {
  424. SetPlayerVirtualWorld(playerid, BeforeSpectate[playerid][pWorld]);
  425. SetPlayerInterior(playerid, BeforeSpectate[playerid][pInt]);
  426.  
  427. if(BeforeSpectate[playerid][pState] == PLAYER_STATE_DRIVER)
  428. PutPlayerInVehicle(playerid, BeforeSpectate[playerid][pInVehicle], 0);
  429.  
  430. else if(BeforeSpectate[playerid][pState] == PLAYER_STATE_PASSENGER)
  431. PutPlayerInVehicle(playerid, BeforeSpectate[playerid][pInVehicle], 1 + random(3));
  432.  
  433. else
  434. SetPlayerPos(playerid, BeforeSpectate[playerid][pOldPos][0], BeforeSpectate[playerid][pOldPos][1], BeforeSpectate[playerid][pOldPos][2]);
  435.  
  436. BeforeSpectate[playerid][pSpectating] = false;
  437. return 1;
  438. }
  439.  
  440. if(PlayerInfo[playerid][pSpawnChange] == 1 || IsInWar1(playerid) || IsInWar2(playerid)) FactionSpawn(playerid);
  441. else if(PlayerInfo[playerid][pSpawnChange] == 2)
  442. {
  443. if(PlayerInfo[playerid][pHouseKey] != 0 || PlayerInfo[playerid][pRentKey] != 0)
  444. {
  445. new h = PlayerInfo[playerid][pHouseKey] + PlayerInfo[playerid][pRentKey];
  446. SetPlayerInterior(playerid,HouseInfo[h][hInt]);
  447. SetPlayerVirtualWorld(playerid,HouseInfo[h][hWorld]);
  448. SetPlayerPos(playerid,HouseInfo[h][hExitX],HouseInfo[h][hExitY],HouseInfo[h][hExitZ]);
  449. HouseEntered[playerid] = h;
  450. }
  451. else
  452. {
  453. PlayerInfo[playerid][pSpawnChange] = 1;
  454. Update(playerid, pSpawnChangex);
  455. SetPlayerSpawn(playerid);
  456. }
  457. }
  458. else if(PlayerInfo[playerid][pSpawnChange] == 3)
  459. {
  460. new clan = PlayerInfo[playerid][pCMember] + PlayerInfo[playerid][pCLeader];
  461. if(ClanInfo[clan][clHQType] == 1)
  462. {
  463. new h = ClanInfo[clan][clHouseHQ];
  464. SetPlayerInterior(playerid,HouseInfo[h][hInt]);
  465. SetPlayerVirtualWorld(playerid,HouseInfo[h][hWorld]);
  466. SetPlayerPos(playerid,HouseInfo[h][hExitX],HouseInfo[h][hExitY],HouseInfo[h][hExitZ]);
  467. HouseEntered[playerid] = h;
  468. }
  469. else
  470. {
  471. if(PlayerInfo[playerid][pHouseKey] != 0 || PlayerInfo[playerid][pRentKey] != 0) PlayerInfo[playerid][pSpawnChange] = 2;
  472. else PlayerInfo[playerid][pSpawnChange] = 1;
  473. Update(playerid, pSpawnChangex);
  474. SetPlayerSpawn(playerid);
  475. }
  476. }
  477. if(TurfsON[playerid]) ShowZones(playerid);
  478. if(HoldPizza[playerid] == 1 || TakenPizza[playerid] == 1)
  479. {
  480. HoldPizza[playerid] = 0;
  481. TakenPizza[playerid] = 0;
  482. if(IsPlayerAttachedObjectSlotUsed(playerid, 0)) RemovePlayerAttachedObject(playerid, 0);
  483. if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
  484. if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 2);
  485. if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
  486. if(IsPlayerAttachedObjectSlotUsed(playerid, 4)) RemovePlayerAttachedObject(playerid, 4);
  487. ClearAnimations(playerid);
  488. }
  489. if(ArmsPachet[playerid] >= 1)
  490. {
  491. ArmsPachet[playerid] = 0;
  492. if(IsPlayerAttachedObjectSlotUsed(playerid, 0)) RemovePlayerAttachedObject(playerid, 0);
  493. if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
  494. if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 2);
  495. if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
  496. if(IsPlayerAttachedObjectSlotUsed(playerid, 4)) RemovePlayerAttachedObject(playerid, 4);
  497. ClearAnimations(playerid);
  498. }
  499.  
  500. if(PlayerPaintballing[playerid] != 0)
  501. {
  502. ResetPlayerWeapons(playerid);
  503. SetPlayerArmourEx(playerid,0);
  504. SetPlayerHealthEx(playerid,100);
  505. GivePlayerWeapon(playerid, pgunp, 9999);
  506. new randoo = random(sizeof(PaintballSpawns));
  507. SetPlayerPos(playerid, PaintballSpawns[randoo][0], PaintballSpawns[randoo][1], PaintballSpawns[randoo][2]);
  508. SetPlayerHealthEx(playerid, 10000);
  509. defer paintinv(playerid);
  510. SetPlayerInterior(playerid,10);
  511. SetPlayerVirtualWorld(playerid,1);
  512. }
  513. if(InTraining[playerid] != 0)
  514. {
  515. new spawntra = random(sizeof(TrainingSpawns));
  516. SetPlayerPos(playerid, TrainingSpawns[spawntra][0], TrainingSpawns[spawntra][1], TrainingSpawns[spawntra][2]);
  517. SetPlayerInterior(playerid, 10);
  518. GivePlayerWeaponEx(playerid, 24, 9999);
  519. GivePlayerWeaponEx(playerid, 31, 9999);
  520. GivePlayerWeaponEx(playerid, 32, 9999);
  521. GivePlayerWeaponEx(playerid, 27, 9999);
  522. GivePlayerWeaponEx(playerid, 33, 9999);
  523. return 1;
  524. }
  525. if(InClanWar[playerid])
  526. {
  527. ResetPlayerWeapons(playerid);
  528. SetPlayerArmourEx(playerid,0);
  529. SetPlayerHealthEx(playerid,100);
  530.  
  531. new clan = PlayerInfo[playerid][pCLeader] + PlayerInfo[playerid][pCMember];
  532. if(clan == ClanWarT1)
  533. {
  534. new rando = random(3);
  535. SetPlayerInterior(playerid, 10);
  536. SetPlayerPos(playerid, ClanWarSpawn[rando][0], ClanWarSpawn[rando][1], ClanWarSpawn[rando][2]);
  537. TogglePlayerControllableEx(playerid, 1);
  538. }
  539. else if(clan == ClanWarT2)
  540. {
  541. new rando = random(3) + 3;
  542. SetPlayerInterior(playerid, 10);
  543. SetPlayerPos(playerid, ClanWarSpawn[rando][0], ClanWarSpawn[rando][1], ClanWarSpawn[rando][2]);
  544. TogglePlayerControllableEx(playerid, 1);
  545. }
  546. GivePlayerWeapon(playerid, 24, 99999);
  547. GivePlayerWeapon(playerid, 31, 99999);
  548. GivePlayerWeapon(playerid, 32, 99999);
  549. GivePlayerWeapon(playerid, 33, 99999);
  550. SetPlayerVirtualWorld(playerid,0);
  551. }
  552. if(PlayerInfo[playerid][pJailed] == 1)
  553. {
  554. SetPlayerInterior(playerid, 6);
  555. new randp = random(sizeof(JailSpawn));
  556. SetPlayerPos(playerid, JailSpawn[randp][0], JailSpawn[randp][1], JailSpawn[randp][2]);
  557. SendClientMessage(playerid, COLOR_LIGHTRED, "Sentinta incompleta, inapoi la inchisoare!");
  558. PlayerTextDrawShow(playerid, JailTime[playerid]);
  559. SetPlayerVirtualWorld(playerid, 0);
  560. ResetPlayerWeapons(playerid);
  561. }
  562. else
  563. {
  564. PlayerTextDrawHide(playerid, JailTime[playerid]);
  565. }
  566. if(PlayerInfo[playerid][pAJailed] == 1)
  567. {
  568. SetPlayerInterior(playerid, 10);
  569. SetPlayerPos(playerid, 223.4726,110.7459,999.0156);
  570. SetPlayerVirtualWorld(playerid, playerid+1);
  571. PlayerTextDrawShow(playerid, JailTime[playerid]);
  572. SetPlayerVirtualWorld(playerid, 0);
  573. ResetPlayerWeapons(playerid);
  574. }
  575. else
  576. {
  577. PlayerTextDrawHide(playerid, JailTime[playerid]);
  578. }
  579. }
  580. return 1;
  581. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement