Advertisement
Guest User

Untitled

a guest
Dec 10th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.26 KB | None | 0 0
  1. public OnPlayerConnect(playerid) {
  2.  
  3. isStranged[playerid] = 0;
  4. PlayerInfo[playerid][Robbing] = 0;
  5. PlayerInfo[playerid][OwnedRobbing] = 0;
  6. if(IsPlayerNPC(playerid)) return 1;
  7.  
  8. g_arrQueryHandle{playerid} = random(256);
  9.  
  10. PlayerInfo[playerid][pChetne] = 0;
  11.  
  12. TotalConnect++;
  13. if(Iter_Count(Player) > MaxPlayersConnected) {
  14. MaxPlayersConnected = Iter_Count(Player);
  15. getdate(MPYear,MPMonth,MPDay);
  16. }
  17.  
  18. SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
  19. SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
  20.  
  21. SetPVarInt(playerid, "IsInArena", -1);
  22. SetPVarInt(playerid, "ArenaNumber", -1);
  23. SetPVarInt(playerid, "ArenaEnterPass", -1);
  24. SetPVarInt(playerid, "ArenaEnterTeam", -1);
  25. SetPVarInt(playerid, "EditingTurfs", -1);
  26. SetPVarInt(playerid, "EditingTurfsStage", -1);
  27. SetPVarInt(playerid, "EditingHillStage", -1);
  28. SetPVarInt(playerid, "EditingFamC", -1);
  29. SetPVarInt(playerid, "editingfamhq", INVALID_FAMILY_ID);
  30. SetPVarInt(playerid, "UsingSurfAttachedObject", -1);
  31. SetPVarInt(playerid, "UsingBriefAttachedObject", -1);
  32. SetPVarInt(playerid, "AOSlotPaintballFlag", -1);
  33. SetPVarInt(playerid, "MovingStretcher", -1);
  34. SetPVarInt(playerid, "DraggingPlayer", INVALID_PLAYER_ID);
  35. SetPVarInt(playerid, "ttSeller", INVALID_PLAYER_ID);
  36. SetPVarInt(playerid, "ttBuyer", INVALID_PLAYER_ID);
  37. SetPVarInt(playerid, "ttCost", 0);
  38. SetPVarInt(playerid, "buyingVoucher", INVALID_PLAYER_ID);
  39. SetPVarInt(playerid, "sellerVoucher", INVALID_PLAYER_ID);
  40. SetPVarInt(playerid, "buyerVoucher", INVALID_PLAYER_ID);
  41. DeletePVar(playerid, "BeingDragged");
  42. DeletePVar(playerid, "PlayerCuffed");
  43. DeletePVar(playerid, "COMMUNITY_ADVISOR_REQUEST");
  44.  
  45. baocaotime[playerid] = 0;
  46. HackingMods[playerid] = 0;
  47. pSpeed[playerid] = 0.0;
  48. //SetTimerEx("HackingTimer", 1000, 0, "i", playerid);
  49.  
  50. for(new i = 0; i < 3; i++) {
  51. StopaniFloats[playerid][i] = 0;
  52. }
  53.  
  54. for(new i = 0; i < 3; i++) {
  55. ConfigEventCPs[playerid][i] = 0;
  56. }
  57. ConfigEventCPId[playerid] = 0;
  58. RCPIdCurrent[playerid] = 0;
  59.  
  60. for(new i = 0; i < 6; i++) {
  61. EventFloats[playerid][i] = 0.0;
  62. }
  63. EventLastInt[playerid] = 0; EventLastVW[playerid] = 0;
  64.  
  65. for(new i = 0; i < 6; i++) {
  66. HHcheckFloats[playerid][i] = 0;
  67. }
  68.  
  69. for(new i = 0; i < MAX_PLAYERVEHICLES; ++i) {
  70. PlayerVehicleInfo[playerid][i][pvModelId] = 0;
  71. PlayerVehicleInfo[playerid][i][pvId] = INVALID_PLAYER_VEHICLE_ID;
  72. PlayerVehicleInfo[playerid][i][pvSpawned] = 0;
  73. PlayerVehicleInfo[playerid][i][pvSlotId] = 0;
  74. }
  75.  
  76. for(new i = 0; i < MAX_PLAYERTOYS; i++) {
  77. PlayerToyInfo[playerid][i][ptID] = -1;
  78. PlayerToyInfo[playerid][i][ptModelID] = 0;
  79. PlayerToyInfo[playerid][i][ptBone] = 0;
  80. PlayerToyInfo[playerid][i][ptSpecial] = 0;
  81. }
  82.  
  83. for(new i = 0; i < 11; i++) {
  84. PlayerHoldingObject[playerid][i] = 0;
  85. }
  86.  
  87. for(new i = 0; i < 5; i++) {
  88. LottoNumbers[playerid][i] = 0;
  89. }
  90.  
  91. for(new i = 0; i < MAX_BUSINESSSALES; i++) {
  92. Selected[playerid][i] = 0;
  93. }
  94. for(new x=0; x < mS_SELECTION_ITEMS; x++) {
  95. gSelectionItems[playerid][x] = PlayerText:INVALID_TEXT_DRAW;
  96. }
  97.  
  98. gHeaderTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
  99. gBackgroundTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
  100. gCurrentPageTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
  101. gNextButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
  102. gPrevButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
  103. gCancelButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
  104.  
  105. SpoofKill[playerid] = 0;
  106. KillTime[playerid] = 0;
  107. gItemAt[playerid] = 0;
  108. TruckUsed[playerid] = INVALID_VEHICLE_ID;
  109. pDrunkLevelLast[playerid] = 0;
  110. pFPS[playerid] = 0;
  111. BackupClearTimer[playerid] = 0;
  112. Backup[playerid] = 0;
  113. CarRadars[playerid] = 0;
  114. CurrentArmor[playerid] = 0.0;
  115. PlayerInfo[playerid][pReg] = 0;
  116. HHcheckVW[playerid] = 0;
  117. HHcheckInt[playerid] = 0;
  118. OrderAssignedTo[playerid] = INVALID_PLAYER_ID;
  119. TruckUsed[playerid] = INVALID_VEHICLE_ID;
  120. HouseOffer[playerid] = INVALID_PLAYER_ID;
  121. House[playerid] = 0;
  122. HousePrice[playerid] = 0;
  123. playerTabbed[playerid] = 0;
  124. playerAFK[playerid] = 0;
  125. gBug{playerid} = 1;
  126. TazerTimeout[playerid] = 0;
  127. gRadio{playerid} = 1;
  128. playerLastTyped[playerid] = 0;
  129. pTazer{playerid} = 0;
  130. pTazerReplace{playerid} = 0;
  131. pCurrentWeapon{playerid} = 0;
  132. MedicAccepted[playerid] = INVALID_PLAYER_ID;
  133. DefendOffer[playerid] = INVALID_PLAYER_ID;
  134. AppealOffer[playerid] = INVALID_PLAYER_ID;
  135. AppealOfferAccepted[playerid] = 0;
  136. PlayerInfo[playerid][pWantedLevel] = 0;
  137. DefendPrice[playerid] = 0;
  138. Spectating[playerid] = 0;
  139. GettingSpectated[playerid] = INVALID_PLAYER_ID;
  140. PlayerInfo[playerid][pPhonePrivacy] = 0;
  141. NewbieTimer[playerid] = 0;
  142. HlKickTimer[playerid] = 0;
  143. HelperTimer[playerid] = 0;
  144. VehicleOffer[playerid] = INVALID_PLAYER_ID;
  145. VehiclePrice[playerid] = 0;
  146. VehicleId[playerid] = -1;
  147. NOPTrigger[playerid] = 0;
  148. JustReported[playerid] = -1;
  149. UsedCrack[playerid] = 0;
  150. UsedWeed[playerid] = 0;
  151. SexOffer[playerid] = INVALID_PLAYER_ID;
  152. DrinkOffer[playerid] = INVALID_PLAYER_ID;
  153. PotOffer[playerid] = INVALID_PLAYER_ID;
  154. PotStorageID[playerid] = -1;
  155. CrackOffer[playerid] = INVALID_PLAYER_ID;
  156. CrackStorageID[playerid] = -1;
  157. GunOffer[playerid] = INVALID_PLAYER_ID;
  158. GunStorageID[playerid] = -1;
  159. CraftOffer[playerid] = INVALID_PLAYER_ID;
  160. RepairOffer[playerid] = INVALID_PLAYER_ID;
  161. GuardOffer[playerid] = INVALID_PLAYER_ID;
  162. LiveOffer[playerid] = INVALID_PLAYER_ID;
  163. RefillOffer[playerid] = INVALID_PLAYER_ID;
  164. MatsOffer[playerid] = INVALID_PLAYER_ID;
  165. MatsStorageID[playerid] = -1;
  166. MatsPrice[playerid] = 0;
  167. MatsAmount[playerid] = 0;
  168. BoxOffer[playerid] = INVALID_PLAYER_ID;
  169. MarryWitnessOffer[playerid] = INVALID_PLAYER_ID;
  170. ProposeOffer[playerid] = INVALID_PLAYER_ID;
  171. DivorceOffer[playerid] = INVALID_PLAYER_ID;
  172. HidePM[playerid] = 0;
  173. PhoneOnline[playerid] = 0;
  174. unbanip[playerid][0] = 0;
  175. advisorchat[playerid] = 1;
  176. ChosenSkin[playerid]=0;
  177. SelectFChar[playerid]=0;
  178. MatsHolding[playerid]=0;
  179. MatDeliver[playerid]=0;
  180. MatDeliver2[playerid]=0;
  181. szAdvert[playerid][0] = 0;
  182. AdvertType[playerid] = 0;
  183. SelectFCharPlace[playerid]=0;
  184. GettingJob[playerid]=0;
  185. GettingJob2[playerid]=0;
  186. GuardOffer[playerid]= INVALID_PLAYER_ID;
  187. GuardPrice[playerid]=0;
  188. ApprovedLawyer[playerid]=0;
  189. CallLawyer[playerid]=0;
  190. WantLawyer[playerid]=0;
  191. CurrentMoney[playerid]=0;
  192. UsedFind[playerid]=0;
  193. CP[playerid]=0;
  194. Condom[playerid]=0;
  195. SexOffer[playerid]= INVALID_PLAYER_ID;
  196. SexPrice[playerid]=0;
  197. PlayerInfo[playerid][pAdmin]=0;
  198. RepairOffer[playerid]= INVALID_PLAYER_ID;
  199. RepairPrice[playerid]=0;
  200. RepairCar[playerid]=0;
  201. TalkingLive[playerid]=INVALID_PLAYER_ID;
  202. LiveOffer[playerid]= INVALID_PLAYER_ID;
  203. RefillOffer[playerid]= INVALID_PLAYER_ID;
  204. RefillPrice[playerid]=0;
  205. InsidePlane[playerid]=INVALID_VEHICLE_ID;
  206. InsideMainMenu{playerid}=0;
  207. InsideTut{playerid}=0;
  208. PotOffer[playerid]= INVALID_PLAYER_ID;
  209. PotStorageID[playerid]=-1;
  210. CrackOffer[playerid]= INVALID_PLAYER_ID;
  211. CrackStorageID[playerid]=-1;
  212. PlayerCuffed[playerid]=0;
  213. PlayerCuffedTime[playerid]=0;
  214. PotPrice[playerid]=0;
  215. CrackPrice[playerid]=0;
  216. RegistrationStep[playerid]=0;
  217. PotGram[playerid]=0;
  218. CrackGram[playerid]=0;
  219. PlayerInfo[playerid][pBanned]=0;
  220. ConnectedToPC[playerid]=0;
  221. OrderReady[playerid]=0;
  222. GunId[playerid]=0;
  223. GunMats[playerid]=0;
  224. CraftId[playerid]=0;
  225. CraftMats[playerid]=0;
  226. HitOffer[playerid]= INVALID_PLAYER_ID;
  227. HitToGet[playerid]= INVALID_PLAYER_ID;
  228. InviteOffer[playerid]= INVALID_PLAYER_ID;
  229. InviteFamily[playerid]=INVALID_FAMILY_ID;
  230. hInviteHouse[playerid]=INVALID_HOUSE_ID;
  231. hInviteOffer[playerid]= INVALID_PLAYER_ID;
  232. hInviteOfferTo[playerid]= INVALID_PLAYER_ID;
  233. JailPrice[playerid]=0;
  234. GotHit[playerid]=0;
  235. GoChase[playerid]= INVALID_PLAYER_ID;
  236. GetChased[playerid]= INVALID_PLAYER_ID;
  237. CalledCops[playerid]=0;
  238. CopsCallTime[playerid]=0;
  239. BoxWaitTime[playerid]=0;
  240. CalledMedics[playerid]=0;
  241. TransportDuty[playerid]=0;
  242. PlayerTied[playerid]=0;
  243. MedicsCallTime[playerid]=0;
  244. BusCallTime[playerid]=0;
  245. TaxiCallTime[playerid]=0;
  246. EMSCallTime[playerid]=0;
  247. MedicCallTime[playerid]=0;
  248. MechanicCallTime[playerid]=0;
  249. FindTimePoints[playerid]=0;
  250. FindingPlayer[playerid]=-1;
  251. FindTime[playerid]=0;
  252. JobDuty[playerid]=0;
  253. Mobile[playerid]=INVALID_PLAYER_ID;
  254. Music[playerid]=0;
  255. BoxOffer[playerid]= INVALID_PLAYER_ID;
  256. PlayerBoxing[playerid]=0;
  257. Spectate[playerid]= INVALID_PLAYER_ID;
  258. PlayerDrunk[playerid]=0;
  259. PlayerDrunkTime[playerid]=0;
  260. format(PlayerInfo[playerid][pPrisonReason],128,"None");
  261. FishCount[playerid]=0;
  262. HelpingNewbie[playerid]= INVALID_PLAYER_ID;
  263. turfWarsRadar[playerid]=0;
  264. courtjail[playerid]=0;
  265. gLastCar[playerid]=0;
  266. FirstSpawn[playerid]=0;
  267. JetPack[playerid]=0;
  268. PlayerInfo[playerid][pKills]=0;
  269. PlayerInfo[playerid][pPaintTeam]=0;
  270. TextSpamTimes[playerid] = 0;
  271. TextSpamUnmute[playerid] = 0;
  272. CommandSpamTimes[playerid] = 0;
  273. CommandSpamUnmute[playerid] = 0;
  274. gOoc[playerid] = 0;
  275. arr_Towing[playerid] = INVALID_VEHICLE_ID;
  276. gNews[playerid] = 0;
  277. gNewbie[playerid] = 1;
  278. gHelp[playerid] = 1;
  279. gFam[playerid] = 0;
  280. gPlayerLogged{playerid} = 0;
  281. gPlayerLogTries[playerid] = 0;
  282. IsSpawned[playerid] = 0;
  283. SpawnKick[playerid] = 0;
  284. PlayerStoned[playerid] = 0;
  285. PlayerInfo[playerid][pPot] = 0;
  286. StartTime[playerid] = 0;
  287. TicketOffer[playerid] = INVALID_PLAYER_ID;
  288. TicketMoney[playerid] = 0;
  289. PlayerInfo[playerid][pVehicleKeysFrom] = INVALID_PLAYER_ID;
  290. ActiveChatbox[playerid] = 1;
  291. TutStep[playerid] = 0;
  292. PlayerInfo[playerid][pVehicleKeys] = INVALID_PLAYER_VEHICLE_ID;
  293. TaxiAccepted[playerid] = INVALID_PLAYER_ID;
  294. EMSAccepted[playerid] = INVALID_PLAYER_ID;
  295. BusAccepted[playerid] = INVALID_PLAYER_ID;
  296. PlayerInfo[playerid][pCrack] = 0;
  297. HireCar[playerid] = 299;
  298. TransportValue[playerid] = 0;
  299. TransportMoney[playerid] = 0;
  300. TransportTime[playerid] = 0;
  301. TransportCost[playerid] = 0;
  302. TransportDriver[playerid] = INVALID_PLAYER_ID;
  303. Locator[playerid] = 0;
  304. ReleasingMenu[playerid] = INVALID_PLAYER_ID;
  305. Fishes[playerid][pLastFish] = 0;
  306. Fishes[playerid][pFishID] = 0;
  307. ProposeOffer[playerid] = INVALID_PLAYER_ID;
  308. MarryWitness[playerid] = INVALID_PLAYER_ID;
  309. MarryWitnessOffer[playerid] = INVALID_PLAYER_ID;
  310. MarriageCeremoney[playerid] = 0;
  311. ProposedTo[playerid] = INVALID_PLAYER_ID;
  312. GotProposedBy[playerid] = INVALID_PLAYER_ID;
  313. DivorceOffer[playerid] = INVALID_PLAYER_ID;
  314. gBike[playerid] = 0;
  315. gBikeRenting[playerid] = 0;
  316. Fixr[playerid] = 0;
  317. VehicleSpawned[playerid] = 0;
  318. ReportCount[playerid] = 0;
  319. ReportHourCount[playerid] = 0;
  320. PlayerInfo[playerid][pServiceTime] = 0;
  321. Homes[playerid] = 0;
  322. sobeitCheckvar[playerid] = 0;
  323. sobeitCheckIsDone[playerid] = 0;
  324. IsPlayerFrozen[playerid] = 0;
  325. strdel(PlayerInfo[playerid][pAutoTextReply], 0, 64);
  326. rBigEarT[playerid] = 0;
  327. aLastShot[playerid] = INVALID_PLAYER_ID;
  328. if(IsValidDynamic3DTextLabel(RFLTeamN3D[playerid])) {
  329. DestroyDynamic3DTextLabel(RFLTeamN3D[playerid]);
  330. }
  331.  
  332. // These need to be reset to prevent some bugs (DO NOT REMOVE)
  333. PlayerInfo[playerid][pModel] = 0;
  334. PlayerInfo[playerid][pLeader] = INVALID_GROUP_ID;
  335. PlayerInfo[playerid][pMember] = INVALID_GROUP_ID;
  336. PlayerInfo[playerid][pDivision] = INVALID_DIVISION;
  337. PlayerInfo[playerid][pFMember] = INVALID_FAMILY_ID;
  338. PlayerInfo[playerid][pRank] = INVALID_RANK;
  339. PlayerInfo[playerid][pOrder] = 0;
  340. PlayerInfo[playerid][pOrderConfirmed] = 0;
  341. PlayerInfo[playerid][pBusiness] = INVALID_BUSINESS_ID;
  342. acstruct[playerid][LastOnFootPosition][0] = 0.0; acstruct[playerid][LastOnFootPosition][1] = 0.0; acstruct[playerid][LastOnFootPosition][2] = 0.0;
  343. acstruct[playerid][checkmaptp] = 0; acstruct[playerid][maptplastclick] = 0;
  344. acstruct[playerid][maptp][0] = 0.0; acstruct[playerid][maptp][1] = 0.0; acstruct[playerid][maptp][2] = 0.0;
  345.  
  346. for(new x = 0; x < MAX_PLAYERS; x++)
  347. {
  348. ShotPlayer[playerid][x] = 0;
  349. }
  350.  
  351. for(new v = 0; v < MAX_PLAYERVEHICLES; v++) {
  352. PlayerVehicleInfo[playerid][v][pvAllowedPlayerId] = INVALID_PLAYER_ID;
  353. }
  354.  
  355. for(new s = 0; s < 12; s++) {
  356. PlayerInfo[playerid][pAGuns][s] = 0;
  357. PlayerInfo[playerid][pGuns][s] = 0;
  358. }
  359.  
  360. for(new s = 0; s < 40; s++) {
  361. ListItemReportId[playerid][s] = -1;
  362. }
  363.  
  364. for(new s = 0; s < 20; s++) {
  365. ListItemRCPId[playerid][s] = -1;
  366. }
  367.  
  368. CancelReport[playerid] = -1;
  369. GiveKeysTo[playerid] = INVALID_PLAYER_ID;
  370. RocketExplosions[playerid] = -1;
  371. ClearFishes(playerid);
  372. ClearMarriage(playerid);
  373.  
  374. // Crash Fix - GhoulSlayeR
  375. if(!InvalidNameCheck(playerid)) {
  376. return 1;
  377. }
  378.  
  379. CheckAdminWhitelist(playerid);
  380. CheckBanEx(playerid);
  381.  
  382. /*new string[128], serial[64];
  383. gpci(playerid, serial, sizeof(serial));
  384. format(string, sizeof(string), "%s/checks/gpci.php?g=%s&n=%s&i=%s", SAMP_WEB, serial, GetPlayerNameExt(playerid), GetPlayerIpEx(playerid));
  385. HTTP(0, HTTP_HEAD, string, "", "");*/
  386.  
  387. // Main Menu Features
  388. InsideMainMenu{playerid} = 0;
  389. InsideTut{playerid} = 0;
  390. ShowMainMenuGUI(playerid);
  391. SetPlayerJoinCamera(playerid);
  392. ClearChatbox(playerid);
  393. SetPlayerVirtualWorld(playerid, 0);
  394. SetPlayerColor(playerid,TEAM_HIT_COLOR);
  395. PlayAudioStreamForPlayerEx(playerid, "http://mp3.zing.vn/download/song/GTA-San-Andreas-theme-song-unknown/kncnybmSRaEHTLvxybGZm");
  396. SyncPlayerTime(playerid);
  397. ShowNoticeGUIFrame(playerid, 1);
  398. logincheck[playerid] = SetTimerEx("LoginCheck", 120000, 0, "i", playerid);
  399. SetTimerEx("LoginCheckEx", 5000, 0, "i", playerid);
  400. RemoveBuildings(playerid);
  401. return 1;
  402. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement