31.08.2017, 10:47
Hello, I'd like an opinion on some code I have and how to optimize it to run as fast as possiable.
If you see a better way code this, please tell me
If you see a better way code this, please tell me
Код:
enum pInfo { pLoggedIn, pPass[256], pSpawn, UniqueID, pIP[33], pOwner, pDisconnected, pLevel, pArmorUpgrade, pUpgradePoints, pMinutes, pRegisterDay[32], pTMinutes, pHours, pGender, pAge, pMoney, Text3D:aMeID, aMeStatus, CardOwner, pTogReports, pAcceptedHelp, pAcceptReport, pTrashReport, pDutyHours, pModel, pAdmin, pBanned, pBannedBy[MAX_PLAYER_NAME], Float:pX, Float:pY, Float:pZ, pInt, pVW, pVehVW, pWalkStyle, pNeon, pVNeon, pTGun[2], pTGunAmmo[2], pvTGun[2], pvTGunAmmo[2], pFac, pFacRank, pFacLeader, pWeapon[13], pWeaponAmmo[13], pHospital, pFacDuty, pFacDiv, pFacDivLeader, pBiz, pVBiz, pVVBiz, pHouse, pVHouse, pVVHouse, pFuelStation, pFuel, pGarage, pVGarage, pJob, pJobSkill[MAX_JOBS], pJackSkill, pOwnsMask, HasBoughtMask, pMail, TicketReason[128], TicketPrice, sTickets, pZPackages, pFPackages, pTPackages, pMPackages, pDPackages, pMaterials, pMMaterials, pMMPackages, pHMaterials, pHPackages, pWeed, pAkamol, pNurofen, pMorphine, pcocaine, pTWeed, pTcocaine, pvTWeed, pvTcocaine, pHasCellphone, pCellphone, pPhonebook, pDice, pCigar, pSprunk, pSpray, pRope, pBlindfold, pWT, pWTC, pGas, pRadio, Float:pHealth, Float:pArmor, pInternet, pPrison, pPrisonTime, pPrisonReason[64], pPrisonBy[MAX_PLAYER_NAME], pRobbing, pWanted, pWanted1[64], pWanted2[64], pWanted3[64], pWanted4[64], pWanted5[64], pWanted6[64], pCrimes, pArrested, pContract, pContractBy[32], pTutorial, pWarns, pWarn1[64], pWarn2[64], pWarn3[64], pMute, pOMute, pNMute, pVMute, pRMute, pADMute, pSpawnFreeze, pFam, pFamRank, pCSuccess, pCFail, pDeath, pKill, pGold, pHelper, pExp, pGangMod, pFacMod, pBanAppealer, pCarLic, pFlyLic, pJetpack, pWepLic, pWeedLic, pAccent[16], pVIP, pVIPJob, pNumber, // ------ Personal Vehicles ------ // pVeh, // Vehicle 1 vModel, Float:vX, Float:vY, Float:vZ, Float:vA, vC1, vC2, vPJ, vPlate1[128], pVehMod[14], vLocked, vRegistered, pVVeh, // Vehicle 2 vVModel, Float:vVX, Float:vVY, Float:vVZ, Float:vVA, vVC1, vVC2, vVPJ, vPlate2[128], pVVehMod[14], vVLocked, vVRegistered, pVVVeh, // Vehicle 3 vVVModel, Float:vVVX, Float:vVVY, Float:vVVZ, Float:vVVA, vVVC1, vVVC2, vVVPJ, vPlate3[128], pVVVehMod[14], vVVLocked, vVVRegistered, p4VVeh, // Vehicle 4 v4VModel, Float:v4VX, Float:v4VY, Float:v4VZ, Float:v4VA, v4VC1, v4VC2, v4VPJ, vPlate4[128], p4VVehMod[14], v4VLocked, v4VRegistered, p5VVeh, // Vehicle 5 v5VModel, Float:v5VX, Float:v5VY, Float:v5VZ, Float:v5VA, v5VC1, v5VC2, v5VPJ, vPlate5[128], p5VVehMod[14], v5VLocked, v5VRegistered, // ------ End Of Personal Vehicles ------ // pTempVIP, pBuddyInvited, pVIPInviteDay, pBrinkDeliverTruck, pDeliverTruck, pNew, pRefPoints, pFightStyle, pScope, pCookies, pOldskool, pReward, pFish[5], pStoned, pGate[3], pDynamicFac, pFacDoor, pRelationShip, pRelationWith[128], pSafeAdmin } new PlayerInfo[MAX_PLAYERS+1][pInfo];