} public OnPlayerConnect(playerid) { new szPlayerIP[16]; TotalConnect++; if(Iter_Count(Player) > MaxPlayersConnected) { MaxPlayersConnected = Iter_Count(Player); getdate(MPYear,MPMonth,MPDay); } GetPlayerIp(playerid, szPlayerIP, sizeof(szPlayerIP)); GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16); if(!InvalidNameCheck(playerid)) return 1; if(CheckBan(szPlayerIP) == 1) { SetPlayerName(playerid, "BannedPlayer"); SendClientMessage(playerid, COLOR_NEWS, "You're banned from . You can appeal your ban at "); Kick(playerid); return 1; } ResetPlayerVariables(playerid); SetTimerEx("Login", 1000, 0, "d", playerid); return 1; }
Show us the Login part, we can only see it setting a timer to the login part, nothing else
|
} forward OnPlayerLogin(playerid,password[]); public OnPlayerLogin(playerid,password[]) { new string[128]; new playername2[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername2, sizeof(playername2)); format(string, sizeof(string), "users/%s.ini", playername2); new File: UserFile = fopen(string, io_read); if(UserFile) { new PassData[256]; new keytmp[256], valtmp[256]; fread(UserFile , PassData , sizeof(PassData)); keytmp = ini_GetKey(PassData); if(strcmp(keytmp , "Key" , true) == 0) { valtmp = Ini_Value(PassData); strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255); } if(strcmp(PlayerInfo[playerid][pKey],password,true) == 0) { new key[ 256 ] , val[ 256 ]; new Data[ 256 ]; while (fread(UserFile , Data , sizeof(Data))) { key = ini_GetKey(Data); if(strcmp(key , "Level" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pLevel] = strval(val); } if(strcmp(key , "AdminLevel" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pAdmin] = strval(val); } if(strcmp(key, "AdminName", true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pAdminName], val, 0, strlen(val)-1, 255); } if(strcmp(key , "BanAppealer" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pBanAppealer] = strval(val); } if(strcmp(key , "Donator" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pDonator] = strval(val); } if(strcmp(key , "Band" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pBanned] = strval(val); } if(strcmp(key , "PermBand" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pPermaBanned] = strval(val); } if(strcmp(key , "Disabled" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pDisabled] = strval(val); } if(strcmp(key , "IP" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pIP], val, 0, strlen(val)-1, 255); } if(strcmp(key , "Registered" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pReg] = strval(val); } if(strcmp(key , "Tutorial" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pTut] = strval(val); } if(strcmp(key , "Sex" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pSex] = strval(val); } if(strcmp(key , "Age" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pAge] = strval(val); } if(strcmp(key , "Skin" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pSkin] = strval(val); } if(strcmp(key , "SPos_x" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pPos_x] = floatstr(val); } if(strcmp(key , "SPos_y" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pPos_y] = floatstr(val); } if(strcmp(key , "SPos_z" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pPos_z] = floatstr(val); } if(strcmp(key , "SPos_r" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pPos_r] = floatstr(val); } if(strcmp(key , "ConnectedTime" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pConnectTime] = strval(val); } if(strcmp(key , "Respect" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pRespect] = strval(val); } if(strcmp(key , "PhoneNr" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pNumber] = strval(val); } if(strcmp(key , "Warnings" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pWarns] = strval(val); } if(strcmp(key , "Gang" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pGang] = strval(val); } if(strcmp(key , "Faction" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pFaction] = strval(val); } if(strcmp(key , "Leader" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pLeader] = strval(val); } if(strcmp(key , "Rank" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pRank] = strval(val); } if(strcmp(key , "Job" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pJob] = strval(val); } if(strcmp(key , "Job2" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pJob2] = strval(val); } if(strcmp(key , "UpgradePoints" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][gPupgrade] = strval(val); } if(strcmp(key , "SpawnArmor" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pSarmor] = strval(val); } if(strcmp(key , "Cash" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pCash] = strval(val); } if(strcmp(key , "Bank" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pBank] = strval(val); } if(strcmp(key , "Insurance" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pInsurance] = strval(val); } if(strcmp(key , "Crimes" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pCrimes] = strval(val); } if(strcmp(key , "Arrested" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pArrested] = strval(val); } if(strcmp(key , "WantedLevel" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pWantedLevel] = strval(val); } if(strcmp(key , "Health" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pHealth] = floatstr(val); } if(strcmp(key , "Armor" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pArmor] = floatstr(val); } if(strcmp(key , "Pot" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pPot] = strval(val); } if(strcmp(key , "Crack" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pCrack] = strval(val); } if(strcmp(key , "Radio" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pRadio] = strval(val); } if(strcmp(key , "RadioFreq" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pRadioFreq] = strval(val); } if(strcmp(key , "Phonebook" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pPhoneBook] = strval(val); } if(strcmp(key , "Dice" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pDice] = strval(val); } if(strcmp(key , "CDPlayer" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pCDPlayer] = strval(val); } if(strcmp(key , "Materials" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pMats] = strval(val); } if(strcmp(key , "Rope" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pRope] = strval(val); } if(strcmp(key , "Cigars" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pCigar] = strval(val); } if(strcmp(key , "Sprunk" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pSprunk] = strval(val); } if(strcmp(key , "Spraycan" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pSpraycan] = strval(val); } if(strcmp(key , "House" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pHouse] = strval(val); } if(strcmp(key , "House2" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pHouse2] = strval(val); } if(strcmp(key , "Renting" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pRenting] = strval(val); } if(strcmp(key , "Int" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pInt] = strval(val); } if(strcmp(key , "VirtualWorld" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pVW] = strval(val); } if(strcmp(key , "Jailed" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pJailed] = strval(val); } if(strcmp(key , "JailTime" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pJailTime] = strval(val); } for(new s = 0; s < 12; s++) { format(string, 128, "Gun%d", s); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pGuns][s] = strval(val); } } if(strcmp(key , "Paycheck" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pPayCheck] = strval(val); } if(strcmp(key , "PayReady" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pPayReady] = strval(val); } if(strcmp(key , "Hospital" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pHospital] = strval(val); } if(strcmp(key , "DetSkill" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pDetSkill] = strval(val); } if(strcmp(key , "LawSkill" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pLawSkill] = strval(val); } if(strcmp(key , "SexSkill" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pSexSkill] = strval(val); } if(strcmp(key , "DrugsSkill" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pDrugsSkill] = strval(val); } if(strcmp(key , "SmugglerSkill" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pSmugSkill] = strval(val); } if(strcmp(key , "ArmsSkill" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pArmsSkill] = strval(val); } if(strcmp(key , "MechSkill" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pMechSkill] = strval(val); } if(strcmp(key , "FishSkill" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pFishSkill] = strval(val); } if(strcmp(key , "BoxSkill" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pBoxSkill] = strval(val); } if(strcmp(key , "TruckSkill" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pTruckSkill] = strval(val); } if(strcmp(key , "CarSkill" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pCarSkill] = strval(val); } //if(strcmp(key , "CraftSkill" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pCraftSkill] = strval(val); } if(strcmp(key , "LawyerTime" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pLawyerTime] = strval(val); } if(strcmp(key , "LawyerFreeTime" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pLawyerFreeTime] = strval(val); } if(strcmp(key , "DrugsTime" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pDrugsTime] = strval(val); } if(strcmp(key , "MechTime" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pMechTime] = strval(val); } if(strcmp(key , "SexTime" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pSexTime] = strval(val); } if(strcmp(key , "CarTime" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pCarTime] = strval(val); } if(strcmp(key , "Fishes" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pFishes] = strval(val); } if(strcmp(key , "BiggestFish" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pBiggestFish] = strval(val); } if(strcmp(key , "pWExists" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pWeedObject] = strval(val); } if(strcmp(key , "pWX" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pWeedPos][0] = floatstr(val); } if(strcmp(key , "pWY" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pWeedPos][1] = floatstr(val); } if(strcmp(key , "pWZ" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pWeedPos][2] = floatstr(val); } if(strcmp(key , "pWVW" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pWeedVW] = strval(val); } if(strcmp(key , "pWInt" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pWeedInt] = strval(val); } if(strcmp(key , "pWValue" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pWeedGrowth] = strval(val); } if(strcmp(key , "pWSeeds" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pWSeeds] = strval(val); } if(strcmp(key , "Wins" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pWins] = strval(val); } if(strcmp(key , "Loses" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pLoses] = strval(val); } if(strcmp(key , "FightingStyle" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pFightStyle] = strval(val); } if(strcmp(key , "Screwdriver" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pScrewdriver] = strval(val); } if(strcmp(key , "Smslog" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pSmslog] = strval(val); } if(strcmp(key , "Wristwatch" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pWristwatch] = strval(val); } if(strcmp(key , "Tire" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pTire] = strval(val); } if(strcmp(key , "Firstaid" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pFirstaid] = strval(val); } if(strcmp(key , "Rccam" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pRccam] = strval(val); } if(strcmp(key , "Receiver" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pReceiver] = strval(val); } if(strcmp(key , "GPS" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pGPS] = strval(val); } if(strcmp(key , "Sweep" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pSweep] = strval(val); } if(strcmp(key , "SweepLeft" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pSweepLeft] = strval(val); } if(strcmp(key , "Bugged" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pBugged] = strval(val); } for(new v = 0; v < MAX_PLAYERVEHICLES; v++) { format(string, 128, "pv%dPosX",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvPosX] = floatstr(val); } format(string, 128, "pv%dPosY",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvPosY] = floatstr(val); } format(string, 128, "pv%dPosZ",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvPosZ] = floatstr(val); } format(string, 128, "pv%dPosAngle",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvPosAngle] = floatstr(val); } format(string, 128, "pv%dModelId",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvModelId] = strval(val); } format(string, 128, "pv%dLock",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvLock] = strval(val); } format(string, 128, "pv%dLocked",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvLocked] = strval(val); } format(string, 128, "pv%dPaintJob",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvPaintJob] = strval(val); } format(string, 128, "pv%dColor1",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvColor1] = strval(val); } format(string, 128, "pv%dColor2",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvColor2] = strval(val); } format(string, 128, "pv%dPrice",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvPrice] = strval(val); } format(string, 128, "pv%dTicket",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvTicket] = strval(val); } format(string, 128, "pv%dWeapon0",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvWeapons][0] = strval(val); } format(string, 128, "pv%dWeapon1",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvWeapons][1] = strval(val); } format(string, 128, "pv%dWeapon2",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvWeapons][2] = strval(val); } format(string, 128, "pv%dWepUpgrade",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvWepUpgrade] = strval(val); } format(string, 128, "pv%dFuel",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvFuel] = floatstr(val); } format(string, 128, "pv%dImpound",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvImpounded] = strval(val); } format(string, 128, "pv%dSpawned",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvSpawned] = strval(val); } format(string, 128, "pv%dDisabled",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvDisabled] = strval(val); } format(string, 128, "pv%dNumPlate",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); strmid(PlayerVehicleInfo[playerid][v][pvNumberPlate], val, 0, strlen(val)-1, 32); } for(new m = 0; m < MAX_MODS; m++) { format(string, 128, "pv%dMod%d", v, m); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerVehicleInfo[playerid][v][pvMods][m] = strval(val); } } //format(string, 128, "pv%dAllowedPlayer",v); //if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); strmid(PlayerVehicleInfo[playerid][v][pvAllowPlayer], val, 0, strlen(val)-1, 255); } } if(strcmp(key , "OnDuty" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pDuty] = strval(val); } if(strcmp(key , "CarLic" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pCarLic] = strval(val); } if(strcmp(key , "FlyLic" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pFlyLic] = strval(val); } if(strcmp(key , "BoatLic" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pBoatLic] = strval(val); } if(strcmp(key , "FishLic" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pFishLic] = strval(val); } if(strcmp(key , "GunLic" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pGunLic] = strval(val); } if(strcmp(key , "Division" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pDivision] = strval(val); } if(strcmp(key , "TicketTime" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pTicketTime] = strval(val); } if(strcmp(key , "HeadValue" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pHeadValue] = strval(val); } if(strcmp(key , "ContractBy" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pContractBy], val, 0, strlen(val)-1, 255); } if(strcmp(key , "ContractDetail" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pContractDetail], val, 0, strlen(val)-1, 255); } if(strcmp(key , "Bombs" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pBombs] = strval(val); } if(strcmp(key , "CHits" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pCHits] = strval(val); } if(strcmp(key , "FHits" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pFHits] = strval(val); } if(strcmp(key, "PrisonedBy", true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pPrisonedBy], val, 0, strlen(val)-1, 255); } if(strcmp(key, "PrisonReason", true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pPrisonReason], val, 0, strlen(val)-1, 255); } if(strcmp(key , "AcceptReport" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pAcceptReport] = strval(val); } if(strcmp(key , "TrashReport" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pTrashReport] = strval(val); } if(strcmp(key , "Accent" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pAccent] = strval(val); } if(strcmp(key , "NewMuted" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pNMute] = strval(val); } if(strcmp(key , "NewMutedTotal" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pNMuteTotal] = strval(val); } if(strcmp(key , "AdMuted" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pADMute] = strval(val); } if(strcmp(key , "AdMutedTotal" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pADMuteTotal] = strval(val); } if(strcmp(key , "ReportMuted" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pRMuted] = strval(val); } if(strcmp(key , "ReportMutedTotal" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pRMutedTotal] = strval(val); } if(strcmp(key , "ReportMutedTime" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pRMutedTime] = strval(val); } if(strcmp(key , "Speedo" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pSpeedo] = strval(val); } if(strcmp(key , "GCMuted" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pGCMuted] = strval(val); } if(strcmp(key , "GCMutedTime" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pGCMutedTime] = strval(val); } if(strcmp(key , "CallsAccepted" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pCallsAccepted] = strval(val); } if(strcmp(key , "PatientsDelivered" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pPatientsDelivered] = strval(val); } if(strcmp(key , "TriageTime" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pTriageTime] = strval(val); } if(strcmp(key , "Married" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pMarried] = strval(val); } if(strcmp(key , "MarriedTo" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pMarriedTo], val, 0, strlen(val)-1, 255); } for(new v = 0; v < MAX_PLAYERTOYS; v++) { format(string, 128, "pt%dModelID",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerToyInfo[playerid][v][ptModelID] = strval(val); } format(string, 128, "pt%dBone",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerToyInfo[playerid][v][ptBone] = strval(val); } format(string, 128, "pt%dPosX",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerToyInfo[playerid][v][ptPosX] = floatstr(val); } format(string, 128, "pt%dPosY",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerToyInfo[playerid][v][ptPosY] = floatstr(val); } format(string, 128, "pt%dPosZ",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerToyInfo[playerid][v][ptPosZ] = floatstr(val); } format(string, 128, "pt%dRotX",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerToyInfo[playerid][v][ptRotX] = floatstr(val); } format(string, 128, "pt%dRotY",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerToyInfo[playerid][v][ptRotY] = floatstr(val); } format(string, 128, "pt%dRotZ",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerToyInfo[playerid][v][ptRotZ] = floatstr(val); } format(string, 128, "pt%dScaX",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerToyInfo[playerid][v][ptScaleX] = floatstr(val); } format(string, 128, "pt%dScaY",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerToyInfo[playerid][v][ptScaleY] = floatstr(val); } format(string, 128, "pt%dScaZ",v); if(strcmp(key , string , true) == 0) { val = Ini_Value(Data); PlayerToyInfo[playerid][v][ptScaleZ] = floatstr(val); } } if(strcmp(key , "KillLog0" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pKillLog0], val, 0, strlen(val)-1, 255); } if(strcmp(key , "KillLog1" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pKillLog1], val, 0, strlen(val)-1, 255); } if(strcmp(key , "KillLog2" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pKillLog2], val, 0, strlen(val)-1, 255); } if(strcmp(key , "KillLog3" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pKillLog3], val, 0, strlen(val)-1, 255); } if(strcmp(key , "KillLog4" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pKillLog4], val, 0, strlen(val)-1, 255); } if(strcmp(key , "KillLog5" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pKillLog5], val, 0, strlen(val)-1, 255); } if(strcmp(key , "KillLog6" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pKillLog6], val, 0, strlen(val)-1, 255); } if(strcmp(key , "KillLog7" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pKillLog7], val, 0, strlen(val)-1, 255); } if(strcmp(key , "KillLog8" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pKillLog8], val, 0, strlen(val)-1, 255); } if(strcmp(key , "KillLog9" , true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pKillLog9], val, 0, strlen(val)-1, 255); } if(strcmp(key, "Flag", true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pFlag], val, 0, strlen(val)-1, 255); } if(strcmp(key, "ReferredBy", true) == 0) { val = Ini_Value(Data); strmid(PlayerInfo[playerid][pReferredBy], val, 0, strlen(val)-1, 255); } if(strcmp(key , "RefTokens" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pRefTokens] = strval(val); } if(strcmp(key , "RefTokensOffline" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pRefTokensOffline] = strval(val); } if(strcmp(key , "Helper" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pHelper] = strval(val); } if(strcmp(key , "GangMod" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pGangMod] = strval(val); } if(strcmp(key , "LiveBanned" , true) == 0) { val = Ini_Value(Data); PlayerInfo[playerid][pLiveBanned] = strval(val); } }//end while fclose(UserFile);//close the file after everything has been read in the while } else { ShowMainMenuDialog(playerid, 3); gPlayerLogTries[playerid] += 1; if(gPlayerLogTries[playerid] == 2) { SendClientMessage(playerid, COLOR_NEWS, "Wrong password, you have been kicked out automatically."); Kick(playerid); } return 1; } if(PlayerInfo[playerid][pHospital] == 1) { PlayerInfo[playerid][pHospital] = 0; SetPVarInt(playerid, "MedicBill", 1); } TotalLogin++; GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16); if(PlayerInfo[playerid][pBanned] >= 1 || PlayerInfo[playerid][pPermaBanned] >= 1) { format(string, sizeof(string), "WARNING: %s (IP:%s) tried to login whilst banned and has been auto-banned.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pIP]); ABroadCast(COLOR_YELLOW, string, 1); AddBan(PlayerInfo[playerid][pIP]); Log("logs/ban.log", string); return Kick(playerid); } if(PlayerInfo[playerid][pTut] == 1) PlayerPlaySound(playerid,SOUND_OFF,2050.1995, 1344.5500, 13.2378); //Music Off gPlayerLogged[playerid] = 1; SpawnPlayer(playerid); SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]); if(PlayerInfo[playerid][pTut] == 1) { HideMainMenuGUI(playerid); InsideTut[playerid] = 0; } if(PlayerInfo[playerid][pSmslog] >= 1) { format(string, sizeof(string), "SMS logs have been removed, you have been refunded %d materials.", PlayerInfo[playerid][pSmslog] * 2000); SendClientMessage(playerid, COLOR_GREY, string); PlayerInfo[playerid][pMats] += PlayerInfo[playerid][pSmslog] * 2000; PlayerInfo[playerid][pSmslog] = 0; } if(PlayerInfo[playerid][pSprunk] > 10) { format(string, sizeof(string), "You're carrying too much Sprunk. You now have 10 cans, and have been refunded $%d for your loss.", PlayerInfo[playerid][pSprunk] - 10); SendClientMessage(playerid, COLOR_GREY, string); PlayerInfo[playerid][pCash] += PlayerInfo[playerid][pSprunk] - 10; PlayerInfo[playerid][pSprunk] = 10; } if(PlayerInfo[playerid][pDisabled] != 0) { format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has been auto kicked because their account is disabled.", GetPlayerNameEx(playerid)); ABroadCast(COLOR_YELLOW, string, 4); SendClientMessage(playerid, COLOR_NEWS, "This account is disabled. Please contact us via the forum ("WEBSITE")."); return Kick(playerid); } if(PlayerInfo[playerid][pAdmin] < 0 || PlayerInfo[playerid][pAdmin] > 6) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s attempted to log in with Admin Level %d.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pAdmin]); PlayerInfo[playerid][pAdmin] = 0; ABroadCast(COLOR_YELLOW, string, 4); return Kick(playerid); } if(AdminLoggedInBefore[playerid] == 0 && PlayerInfo[playerid][pTut] == 1) { format(string, sizeof(string), "Welcome to Horizon Roleplay, %s.", GetPlayerNameEx(playerid)); SendClientMessage(playerid, COLOR_NEWS, string); } SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1); if(PlayerInfo[playerid][pAdmin] > 0 && AdminLoggedInBefore[playerid] == 0 && PlayerInfo[playerid][pTut] == 1) { format(string, sizeof(string), "You have logged in as Level %d Admin.",PlayerInfo[playerid][pAdmin]); SendClientMessage(playerid, COLOR_WHITE,string); if(strlen(PlayerInfo[playerid][pAdminName]) > 2 && strlen(PlayerInfo[playerid][pAdminName]) < 20) { format(string, sizeof(string), "%s (%s) has logged in as Level %d Admin.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pAdminName], PlayerInfo[playerid][pAdmin]); } else { format(string, sizeof(string), "%s (No admin name set) has logged in as Level %d Admin.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pAdmin]); } foreach(Player, i) { if(PlayerInfo[i][pAdmin] >= 5 && PlayerInfo[i][pAdmin] >= PlayerInfo[playerid][pAdmin] && i != playerid) { SendClientMessage(i, COLOR_WHITE, string); } } } if(PlayerInfo[playerid][pInt] > 0 || PlayerInfo[playerid][pVW] > 0) { TogglePlayerControllable(playerid, 0); for(new o = 0; o < 6; o++) { TextDrawShowForPlayer(playerid, ObjectsLoadingTD[o]); } SetPVarInt(playerid, "LoadingObjects", 1); SetTimerEx("SafeLoadObjects", 3000, 0, "d", playerid); } SkinDelay(playerid); if(AdminLoggedInBefore[playerid] == 0 && PlayerInfo[playerid][pTut] == 1) { format(string, sizeof(string), "~w~Welcome~n~~y~%s", GetPlayerNameEx(playerid)); GameTextForPlayer(playerid, string, 5000, 1); new motdstring[128]; format(motdstring, sizeof(motdstring), "News: %s", GlobalMOTD); SendClientMessage(playerid, COLOR_WHITE, motdstring); new amotdstring[128]; format(amotdstring, sizeof(amotdstring), "Admin News: %s", AdminMOTD); if(PlayerInfo[playerid][pAdmin] > 0) SendClientMessage(playerid, COLOR_YELLOW, amotdstring); } SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightStyle]); if(AdminLoggedInBefore[playerid] == 0) { LoadPlayerVehicles(playerid); } SetPlayerToTeamColor(playerid); if(AdminLoggedInBefore[playerid] == 0) { if(PlayerInfo[playerid][pGang] < 255 && PlayerInfo[playerid][pTut] == 1) { format(string, sizeof(string), "Family MOTD: %s.", FamilyInfo[PlayerInfo[playerid][pGang]][FamilyMOTD]); SendClientMessage(playerid, COLOR_YELLOW, string); } if(!isnull(PlayerInfo[playerid][pFlag])) { format(string, sizeof(string), "%s has an outstanding flag.", GetPlayerNameEx(playerid)); ABroadCast(COLOR_WHITE, string, 1); } if(PlayerInfo[playerid][pRefTokensOffline] != 0) { format(string, sizeof(string), "You have gained %d referral token(s) while you were offline. Use /refshop to spend them.", PlayerInfo[playerid][pRefTokensOffline]); SendClientMessage(playerid, COLOR_YELLOW, string); PlayerInfo[playerid][pRefTokens] += PlayerInfo[playerid][pRefTokensOffline]; PlayerInfo[playerid][pRefTokensOffline] = 0; } if(PlayerInfo[playerid][pJob2] >= 1 && PlayerInfo[playerid][pDonator] < 2 && PlayerInfo[playerid][pLevel] < 25) { PlayerInfo[playerid][pJob2] = 0; SendClientMessage(playerid, COLOR_YELLOW, "You have lost your secondary job due to the fact that you no longer have a donator package or are below level 25."); } } new iCheckOne = INVALID_HOUSE_ID, iCheckTwo = INVALID_HOUSE_ID, szPlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, szPlayerName, sizeof(szPlayerName)); for(new i = 0; i < MAX_HOUSES; ++i) if(strcmp(szPlayerName, HouseInfo[i][hOwner], false) == 0) { if(iCheckOne != INVALID_HOUSE_ID) iCheckTwo = i; else if(iCheckTwo == INVALID_HOUSE_ID) iCheckOne = i; else break; } if(iCheckOne != INVALID_HOUSE_ID) PlayerInfo[playerid][pHouse] = iCheckOne; else PlayerInfo[playerid][pHouse] = INVALID_HOUSE_ID; if(iCheckTwo != INVALID_HOUSE_ID) PlayerInfo[playerid][pHouse2] = iCheckTwo; else PlayerInfo[playerid][pHouse2] = INVALID_HOUSE_ID; if(AdminLoggedInBefore[playerid] == 0) { if(PlayerInfo[playerid][pWeedObject] != 0) { PlayerInfo[playerid][pWeedObject] = CreateDynamicObject(3409, PlayerInfo[playerid][pWeedPos][0], PlayerInfo[playerid][pWeedPos][1], PlayerInfo[playerid][pWeedPos][2], 0.0, 0.0, 0.0, PlayerInfo[playerid][pWeedVW], PlayerInfo[playerid][pWeedInt]); } } if(PlayerInfo[playerid][pRenting] != INVALID_HOUSE_ID && (PlayerInfo[playerid][pHouse] != INVALID_HOUSE_ID || PlayerInfo[playerid][pHouse2] != INVALID_HOUSE_ID)) { PlayerInfo[playerid][pRenting] = INVALID_HOUSE_ID; } } AdminLoggedInBefore[playerid] = 1; return 1; }
print("A player was kicked. [Here]");
In OnPlayerLogin, find every Kick() and print before it. You'll know what causes the kick then.
Код:
print("A player was kicked. [Here]"); |