Advertisement
Guest User

Untitled

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