/* Limitless Roleplay by Emmet and Josh Einstein Here it is. The script which I spent two months of my life working on. Then I wake up to it being leaked by former management Tyler Saunter. If anyone is going to release this script, it's going to be me. Furthermore, Tyler is a moron and claims that this script is revision v1.0.7 when it's infact a buggy old version aka v1.0.5c. He attempted to piss off me and Josh by releasing my script but nobody gives a fuck, not even me the creator of the script. Infact I'm even releasing it myself just to shit on his attempt at hurting us. I welcome anyone to use this script if they wish, but be warned though, there are lots of bugs and exploits left unpatched. Since v1.0.5c I have fixed 71+ bugs and counting. If you want to put the effort in patching all of those bugs then be my guest. So here you have it folks - the base for what is known today as Limitless Roleplay. SA-MP is not worth wasting your time on anymore, especially with pieces of shit like Tyler who throw temper tantrums and release other peoples hard work. Tyler has contributed nothing to the server other than a few licenses which Josh has already obtained for himself since then. I regret ever coming back to SA-MP. After all I deleted my SA-MP forum account and went underground so I could actually play the game for once and help out my friends with their server needs. But after all this it's just not worth it anymore. Fuck you, fuck SA-MP and most importantly fuck Travis and Tyler Saunter. I'm quitting SA-MP and I hope whoever stumbles across this script to use it to their full potential. Enjoy! -Emmet and JEinstein */ // --------------------------------------- #include #include #include #include #include #include #include // --------------------------------------- #define MYSQL_HOSTNAME "127.0.0.1" #define MYSQL_DATABASE "limitless-rp" #define MYSQL_USERNAME "root" #define MYSQL_PASSWORD "" // --------------------------------------- #define COLOR_WHITE 0xFFFFFFFF #define COLOR_YELLOW 0xFFD200FF #define COLOR_YELLOW2 0xF5DEB3FF #define COLOR_LIGHTORANGE 0xF7A763FF #define COLOR_AQUA 0x33CCFFFF #define COLOR_GREEN 0x32CD32FF #define COLOR_GREY 0xAFAFAFFF #define COLOR_GREY1 0xE6E6E6FF #define COLOR_GREY2 0xC8C8C8FF #define COLOR_GREY3 0xAAAAAAFF #define COLOR_GREY4 0x8C8C8CFF #define COLOR_GREY5 0x6E6E6EFF #define COLOR_LIGHTRED 0xFF6347FF #define COLOR_ORANGE 0xFF9900FF #define COLOR_RED 0xAA3333FF #define COLOR_PURPLE 0xC2A2DAFF #define COLOR_NEWBIE 0x7DAEFFFF #define COLOR_BLUE 0x233EFAFF #define COLOR_ROYALBLUE 0x9999FFFF #define COLOR_DOCTOR 0xFF8282FF #define COLOR_DARKGREEN 0x00AA00FF #define COLOR_VIP 0xA028ADFF #define COLOR_WALKIETALKIE 0xB2EBE0FF #define COLOR_LIMITLESSBLUE 0x089DCEFF #define COLOR_LIGHTGREEN 0x9ACD32FF #define COLOR_GLOBAL 0xFFA500FF // 0x4DBD33FF #define COLOR_ADMINCHAT 0xED6464FF// 0xFF4500FF #define COLOR_FACTIONCHAT 0xBDF38BFF // --------------------------------------- #define MAX_LISTED_NUMBERS 50 #define MAX_LISTED_OBJECTS 50 #define MAX_LISTED_STATIONS 50 #define MAX_SPLIT_LENGTH 70 // --------------------------------------- #define MAX_REPORTS 50 #define MAX_HOUSES 1000 #define MAX_GARAGES 1000 #define MAX_BUSINESSES 500 #define MAX_ENTRANCES 500 #define MAX_PLAYER_CLOTHING 10 #define MAX_SPAWNED_VEHICLES 3 #define MAX_ANTICHEAT_WARNINGS 5 #define MAX_FACTIONS 10 #define MAX_FACTION_RANKS 20 #define MAX_FACTION_SKINS 10 #define MAX_FACTION_DIVISIONS 5 #define MAX_DEPLOYABLES 50 #define MAX_FIRES 100 #define MAX_LANDS 50 #define MAX_GANGS 10 #define MAX_GANG_SKINS 10 #define MAX_POINTS 10 #define MAX_TURFS 150 #define MAX_BANK_ROBBERS 5 // --------------------------------------- #define THREAD_LOOKUP_BANS 1 #define THREAD_LOOKUP_ACCOUNT 2 #define THREAD_ACCOUNT_REGISTER 3 #define THREAD_PROCESS_LOGIN 4 #define THREAD_COUNT_FLAGS 5 #define THREAD_TRACE_IP 6 #define THREAD_LOGIN_UPDATE 7 #define THREAD_LIST_CHANGES 8 #define THREAD_LIST_HELPERS 9 #define THREAD_LOAD_HOUSES 10 #define THREAD_LIST_TENANTS 11 #define THREAD_LOAD_FURNITURE 12 #define THREAD_LOAD_GARAGES 13 #define THREAD_LOAD_BUSINESSES 14 #define THREAD_LOAD_ENTRANCES 15 #define THREAD_LOAD_CLOTHING 16 #define THREAD_LOAD_FACTIONS 17 #define THREAD_LOAD_FACTIONRANKS 18 #define THREAD_LOAD_FACTIONSKINS 19 #define THREAD_LOAD_FACTIONPAY 20 #define THREAD_LOAD_DIVISIONS 21 #define THREAD_LOAD_LANDS 22 #define THREAD_LOAD_LANDOBJECTS 23 #define THREAD_LOAD_GANGS 24 #define THREAD_LOAD_GANGRANKS 25 #define THREAD_LOAD_GANGSKINS 26 #define THREAD_LOAD_POINTS 27 #define THREAD_LOAD_TURFS 28 #define THREAD_HOUSE_INFORMATION 29 #define THREAD_COUNT_FURNITURE 30 #define THREAD_SELL_FURNITURE 31 #define THREAD_CLEAR_FURNITURE 32 #define THREAD_COUNT_TEXTS 33 #define THREAD_VIEW_TEXTS 34 #define THREAD_LIST_VEHICLES 35 #define THREAD_FACTION_ROSTER 36 #define THREAD_GANG_ROSTER 37 #define THREAD_VIEW_PHONEBOOK 38 #define THREAD_COUNT_LANDOBJECTS 39 #define THREAD_SELL_LANDOBJECT 40 #define THREAD_DUPLICATE_LANDOBJECT 41 #define THREAD_DUPLICATED_OBJECT 42 #define THREAD_CLEAR_LANDOBJECTS 43 #define THREAD_LIST_LANDOBJECTS 44 #define THREAD_LAND_INFORMATION 45 #define THREAD_LOAD_VEHICLES 46 #define THREAD_GANG_INFORMATION 47 #define THREAD_OFFLINE_IP 48 #define THREAD_CHECK_REFERRAL 49 #define THREAD_REWARD_REFERRER 50 #define THREAD_LIST_FLAGGED 51 // --------------------------------------- #define RED_TEAM 0 #define BLUE_TEAM 1 // --------------------------------------- #define strcpy(%0,%1) strcat(((%0[0] = 0), %0), %1) #define percent(%0,%1) floatround((float((%0)) / 100) * (%1)) #define Random(%0,%1) (random((%1) - (%0)) + (%0)) // --------------------------------------- #define SERVER_REVISION "v1.0.5c" // Change this every commit. #define SERVER_ANTICHEAT "The_Watcher" #define SERVER_INTRO // Comment this line to disable the intro for unregistered users. #define SERVER_MUSIC_URL "music.limitlessrp.com" #define SERVER_FETCH_URL "music.limitlessrp.com" // --------------------------------------- #undef SSCANF_Join #undef SSCANF_Leave // --------------------------------------- enum { DIALOG_REGISTER = 1, DIALOG_CONFIRMPASS, DIALOG_LOGIN, DIALOG_GENDER, DIALOG_AGE, DIALOG_REFERRAL, DIALOG_INTERIORS, DIALOG_BUYFURNITURE1, DIALOG_BUYFURNITURE2, DIALOG_BUY, DIALOG_BUYCLOTHES, DIALOG_PICKLOAD, DIALOG_UNREADTEXTS, DIALOG_ATM, DIALOG_CHANGEPASS, DIALOG_BUYCLOTHING, DIALOG_CLOTHING, DIALOG_CLOTHINGMENU, DIALOG_CLOTHINGEDIT, DIALOG_CLOTHINGBONE, DIALOG_BUYVEHICLE, DIALOG_BUYVEHICLE2, DIALOG_SPAWNCAR, DIALOG_DESPAWNCAR, DIALOG_FINDCAR, DIALOG_BIZINTERIOR, DIALOG_FACTIONLOCKER, DIALOG_FACTIONEQUIPMENT, DIALOG_FACTIONSKINS, DIALOG_HITMANCLOTHES, DIALOG_MDC, DIALOG_MDCWANTED, DIALOG_MDCPLAYER1, DIALOG_MDCPLAYER2, DIALOG_MDCCHARGES, DIALOG_PLAYERLOOKUP, DIALOG_VEHICLELOOKUP1, DIALOG_VEHICLELOOKUP2, DIALOG_FACTIONPAY1, DIALOG_FACTIONPAY2, DIALOG_PHONEBOOK, DIALOG_CREATEZONE, DIALOG_CONFIRMZONE, DIALOG_LANDBUILD1, DIALOG_LANDBUILD2, DIALOG_LANDMENU, DIALOG_LANDEDITOBJECT, DIALOG_LANDOBJECTMENU, DIALOG_LANDOBJECTS, DIALOG_LANDSELLALL, DIALOG_LANDPERMS, DIALOG_MP3PLAYER, DIALOG_MP3MUSIC, DIALOG_MP3RADIO, DIALOG_MP3URL, DIALOG_MP3RADIOGENRES, DIALOG_MP3RADIOSUBGENRES, DIALOG_MP3RADIORESULTS, DIALOG_MP3RADIOSEARCH, DIALOG_USECOOKIES, DIALOG_COOKIESHOUTOUT, DIALOG_COOKIEWEATHER, DIALOG_COOKIENUMBER, DIALOG_COOKIEJOB, DIALOG_GANGSTASH, DIALOG_GANGSTASHWEAPONS1, DIALOG_GANGSTASHWEAPONS2, DIALOG_GANGSTASHDRUGS1, DIALOG_GANGSTASHDRUGS2, DIALOG_GANGSTASHAMMO1, DIALOG_GANGSTASHAMMO2, DIALOG_GANGSTASHCRAFT, DIALOG_GANGSTASHMATS, DIALOG_GANGSTASHCASH, DIALOG_GANGDEPOSIT, DIALOG_GANGWITHDRAW, DIALOG_GANGSKINS, DIALOG_GANGFINDCAR, DIALOG_GANGPOINTSHOP, DIALOG_GANGARMSDEALER, DIALOG_GANGARMSWEAPONS, DIALOG_GANGARMSAMMO, DIALOG_GANGAMMOBUY, DIALOG_GANGARMSEDIT, DIALOG_GANGARMSPRICES, DIALOG_GANGARMSPRICE, DIALOG_GANGARMSDEPOSITMATS, DIALOG_GANGARMSWITHDRAWMATS, DIALOG_GANGAMMODEPOSITS, DIALOG_GANGAMMODEPOSIT, DIALOG_GANGAMMOWITHDRAWS, DIALOG_GANGAMMOWITHDRAW, DIALOG_GANGDRUGDEALER, DIALOG_GANGDRUGSHOP, DIALOG_GANGDRUGEDIT, DIALOG_GANGDRUGPRICES, DIALOG_GANGDRUGPRICE, DIALOG_GANGDRUGBUY, DIALOG_GANGDRUGDEPOSITS, DIALOG_GANGDRUGDEPOSIT, DIALOG_GANGDRUGWITHDRAWS, DIALOG_GANGDRUGWITHDRAW, DIALOG_FREENAMECHANGE } enum { VEHICLE_ENGINE, VEHICLE_LIGHTS, VEHICLE_ALARM, VEHICLE_DOORS, VEHICLE_BONNET, VEHICLE_BOOT, VEHICLE_OBJECTIVE }; enum { STASH_CAPACITY_CASH, STASH_CAPACITY_MATERIALS, STASH_CAPACITY_WEED, STASH_CAPACITY_COCAINE, STASH_CAPACITY_METH, STASH_CAPACITY_PAINKILLERS, STASH_CAPACITY_HPAMMO, STASH_CAPACITY_POISONAMMO, STASH_CAPACITY_FMJAMMO, STASH_CAPACITY_WEAPONS }; enum { E_OBJECT_TYPE, E_OBJECT_INDEX_ID, E_OBJECT_EXTRA_ID, E_OBJECT_3DTEXT_ID, E_OBJECT_OPENED, E_OBJECT_WEAPONID, E_OBJECT_AMMO, E_OBJECT_FACTION, E_OBJECT_X, E_OBJECT_Y, E_OBJECT_Z }; enum { E_OBJECT_FURNITURE, E_OBJECT_WEAPON, E_OBJECT_LAND }; enum { EDIT_FURNITURE_PREVIEW = 1, EDIT_FURNITURE, EDIT_CLOTHING_PREVIEW, EDIT_CLOTHING, EDIT_LAND_OBJECT_PREVIEW, EDIT_LAND_OBJECT, EDIT_LAND_GATE_MOVE }; enum { DEPLOY_SPIKESTRIP, DEPLOY_CONE, DEPLOY_ROADBLOCK, DEPLOY_BARREL, DEPLOY_FLARE }; enum { BUSINESS_STORE, BUSINESS_GUNSHOP, BUSINESS_CLOTHES, BUSINESS_GYM, BUSINESS_RESTAURANT, BUSINESS_AGENCY, BUSINESS_BARCLUB }; enum { FACTION_NONE, FACTION_POLICE, FACTION_MEDIC, FACTION_NEWS, FACTION_GOVERNMENT, FACTION_HITMAN, FACTION_FEDERAL }; enum { JOB_NONE = -1, JOB_PIZZAMAN, JOB_COURIER, JOB_FISHERMAN, JOB_BODYGUARD, JOB_WEAPONDEALER, JOB_MECHANIC, JOB_MINER, JOB_SWEEPER, JOB_TAXIDRIVER, JOB_DRUGDEALER, JOB_LAWYER, JOB_DETECTIVE }; enum { CHECKPOINT_NONE = 0, CHECKPOINT_PIZZA, CHECKPOINT_TEST, CHECKPOINT_MINING, CHECKPOINT_MATS, CHECKPOINT_DRUGS, CHECKPOINT_HOUSE, CHECKPOINT_ROBBERY, CHECKPOINT_MISC }; enum { HANGUP_DROPPED, HANGUP_USER }; enum { MUSIC_NONE, MUSIC_MP3PLAYER, MUSIC_BOOMBOX, MUSIC_VEHICLE }; enum { ITEM_WEAPON, ITEM_SELLGUN, ITEM_MATERIALS, ITEM_WEED, ITEM_COCAINE, ITEM_METH, ITEM_PAINKILLERS, ITEM_SEEDS, ITEM_EPHEDRINE, ITEM_CASH, ITEM_HPAMMO, ITEM_POISONAMMO, ITEM_FMJAMMO }; enum { CAPACITY_MATERIALS, CAPACITY_WEED, CAPACITY_COCAINE, CAPACITY_METH, CAPACITY_PAINKILLERS, CAPACITY_SEEDS, CAPACITY_EPHEDRINE, CAPACITY_HPAMMO, CAPACITY_POISONAMMO, CAPACITY_FMJAMMO }; enum { LIMIT_HOUSES, LIMIT_BUSINESSES, LIMIT_GARAGES, LIMIT_VEHICLES }; enum { POINT_DRUGFACTORY = 1, POINT_DRUGDEN, POINT_CRACKHOUSE, POINT_AUTOEXPORT, POINT_FUEL, POINT_MATPICKUP1, POINT_MATPICKUP2, POINT_MATFACTORY1, POINT_MATFACTORY2 }; enum { GANGWEAPON_9MM, GANGWEAPON_SDPISTOL, GANGWEAPON_DEAGLE, GANGWEAPON_SHOTGUN, GANGWEAPON_SPAS12, GANGWEAPON_SAWNOFF, GANGWEAPON_TEC9, GANGWEAPON_UZI, GANGWEAPON_MP5, GANGWEAPON_AK47, GANGWEAPON_M4, GANGWEAPON_RIFLE, GANGWEAPON_SNIPER, GANGWEAPON_MOLOTOV }; enum { TAG_NONE, TAG_ADMIN, TAG_HELPER, TAG_VIP }; enum { AMMO_HP, AMMO_POISON, AMMO_FMJ }; enum { AMMOTYPE_NORMAL, AMMOTYPE_HP, AMMOTYPE_POISON, AMMOTYPE_FMJ }; enum { ZONETYPE_LAND = 1, ZONETYPE_TURF }; enum pEnum { PlayerText:pText[6], pPassword[129], pUsername[MAX_PLAYER_NAME], pID, pLogged, pKicked, pLoginTries, pSetup, pGender, pAge, pSkin, Float:pCameraX, Float:pCameraY, Float:pCameraZ, Float:pPosX, Float:pPosY, Float:pPosZ, Float:pPosA, pInterior, pWorld, pCash, pBank, pPaycheck, pLevel, pEXP, pMinutes, pHours, pAdmin, pAdminName[MAX_PLAYER_NAME], pHelper, Float:pHealth, Float:pArmor, pUpgradePoints, pWarnings, pInjured, pHospital, Float:pSpawnHealth, Float:pSpawnArmor, pJailType, pJailTime, pNewbieMuted, pHelpMuted, pAdMuted, pLiveMuted, pGlobalMuted, pReportMuted, pReportWarns, pFightStyle, pAccent[16], pCookies, pPhone, pJob, pSecondJob, pCrimes, pArrested, pWantedLevel, pMaterials, pWeed, pCocaine, pMeth, pPainkillers, pSeeds, pEphedrine, pMuriaticAcid, pBakingSoda, pCigars, pWalkieTalkie, pChannel, pRentingHouse, pSpraycans, pBoombox, pMP3Player, pPhonebook, pFishingRod, pFishingBait, pFishWeight, pComponents, pCourierSkill, pFishingSkill, pGuardSkill, pWeaponSkill, pMechanicSkill, pLawyerSkill, pSmugglerSkill, pDetectiveSkill, pToggleTextdraws, pToggleOOC, pTogglePhone, pToggleAdmin, pToggleHelper, pToggleNewbie, pToggleWT, pToggleRadio, pToggleVIP, pToggleMusic, pToggleFaction, pToggleGang, pToggleNews, pToggleGlobal, pToggleCam, pToggleHUD, pCarLicense, pVIPPackage, pVIPTime, pVIPCooldown, pWeapons[13], pTempWeapons[13], pAmmo[13], pFaction, pFactionRank, pGang, pGangRank, pDivision, pContracted, pContractBy[MAX_PLAYER_NAME], pBombs, pCompletedHits, pFailedHits, pReports, pHelpRequests, pSpeedometer, // (1) KM/H (2) MPH pFactionMod, pGangMod, pBanAppealer, pWeedPlanted, pWeedTime, pWeedGrams, Float:pWeedX, Float:pWeedY, Float:pWeedZ, Float:pWeedA, pInventoryUpgrade, pAddictUpgrade, pTraderUpgrade, pAssetUpgrade, pHPAmmo, pPoisonAmmo, pFMJAmmo, pAmmoType, pAmmoWeapon, pDMWarnings, pWeaponRestricted, pReferralUID, pWatch, pGPS, pPrisonedBy[MAX_PLAYER_NAME], pPrisonReason[128], pClothes, pShowLands, pShowTurfs, pWatchOn, pGPSOn, pDoubleXP, pCourierCooldown, pPizzaCooldown, pDetectiveCooldown, pGasCan, pLastReport, pLastNewbie, pLastRequest, pLastPay, pLastRepair, pLastRefuel, pLastDrug, pLastDefend, pLastSell, pLastEnter, pLastPress, pLastDeath, pLastDesync, pLastGlobal, pLastPizza, pLastStuck, pLastUpdate, pLastLoad, pLastBet, pFPS, pDrunkLevel, pSpectating, pAdminDuty, pActiveReport, pHospitalTime, pListen, pJoinedEvent, pPaintball, pDueling, pEventTeam, pAwaitingClothing, pTutorial, pTutorialTimer, pFreezeTimer, pHelpRequest[128], pAcceptedHelp, pHouseOffer, pHouseOffered, pHousePrice, pGarageOffer, pGarageOffered, pGaragePrice, pBizOffer, pBizOffered, pBizPrice, pVestOffer, pVestPrice, pCarOffer, pCarOffered, pCarPrice, pFactionOffer, pFactionOffered, pGangOffer, pGangOffered, pFriskOffer, pTicketOffer, pTicketPrice, pLiveOffer, pLiveBroadcast, pShakeOffer, pShakeType, pLandOffer, pLandOffered, pLandPrice, pSellOffer, pSellType, pSellExtra, pSellPrice, pDefendOffer, pDefendPrice, pDiceOffer, pDiceBet, pInviteOffer, pInviteHouse, pRobberyOffer, pFurnitureIndex, pFurnitureHouse, pObjectLand, pClothingIndex, pEditType, pEditObject, pCategory, pSelected, pFactionEdit, pPrice, pFurniturePerms, pLandPerms, pPizzas, pPizzaTime, Float:pDistance, pCP, pShipment, pFishTime, pUsedBait, pSmuggleMats, pSmuggleDrugs, pRefuel, pRefuelAmount, pCallLine, pCallStage, Float:pAFKPos[6], pAFK, pAFKTime, pLoopAnim, pDrivingTest, pTestVehicle, pTestCP, pMiningTime, pMiningRock, pSweeping, pSweepTime, pSweepEarnings, Text3D:pSpecialTag, pTagType, pVIPColor, pTaxiFare, pTaxiPassenger, pTaxiBill, pTaxiTime, pSkinSelected, pDuty, pBackup, pTazer, pTazedTime, pCuffed, pDraggedBy, pFirstAid, pDelivered, pPlantedBomb, Float:pBombX, Float:pBombY, Float:pBombZ, pBombObject, pContractTaken, pPage, pSpamTime, pMuted, Text3D:pBoomboxText, pBoomboxPlaced, // BOOMBOX pBoomboxObject, pBoomboxListen, pBoomboxURL[128], Float:pMinX, // LAND CREATION Float:pMinY, Float:pMaxX, Float:pMaxY, pZoneType, pZonePickups[4], pZoneID, pZoneCreation, // pLandCost, pTurfType, pTurfName[32], pGenre[32], pSubgenre[32], pSearch, pMusicType, pStreamType, pNameChange[MAX_PLAYER_NAME], pFreeNamechange, pPassportLevel, pPassportSkin, pVehicleKeys, pCurrentWeapon, pCurrentAmmo, pCurrentVehicle, pVehicleCount, pACWarns, pACTime, pACFired, pACAmmo, pArmorTime, pWeedObject, pPickPlant, pPickTime, pCookMeth, pCookTime, pCookGrams, pDrugsUsed, pDrugsTime, pBandana, pGangCar, pCapturingPoint, pCaptureTime, Float:pPointX, Float:pPointY, Float:pPointZ, pWatchingIntro, // server intro pLoginCamera, pSmuggleTime, pDealerGang, pPoisonTime, pJetpack, pTextFrom, pWhisperFrom, pMechanicCall, pTaxiCall, pEmergencyCall, pEmergencyType, pEmergency[128], pClip, pReloading, pFindTime, pFindPlayer, pRobCash, pLootTime }; enum rEnum { rExists, rReporter, rAccepted, rHandledBy, rText[128], rTime }; enum eventEnum { eReady, eStarted, eLocked, eType, // (1) DM (2) TDM (3) Race eJoinText[128], Float:eHealth, Float:eArmor, Float:ePosX[2], Float:ePosY[2], Float:ePosZ[2], Float:ePosA[2], eInterior, eWorld, eWeapons[5], eSkin[2], eCS, eQS, eHeal, eNext }; enum robberyEnum { rTime, rPlanning, rStarted, rStolen, rRobbers[MAX_BANK_ROBBERS], rObjects[2], Text3D:rText[5] }; enum mEnum { Float:mPosX, Float:mPosY, Float:mPosZ, Float:mPosA, mInterior, mWorld }; enum hEnum { hExists, hID, hOwnerID, hOwner[MAX_PLAYER_NAME], hType, hPrice, hRentPrice, hLevel, hLocked, hTimestamp, Float:hPosX, Float:hPosY, Float:hPosZ, Float:hPosA, Float:hIntX, Float:hIntY, Float:hIntZ, Float:hIntA, hInterior, hWorld, hOutsideInt, hOutsideVW, hCash, hMaterials, hWeed, hCocaine, hMeth, hPainkillers, hWeapons[10], hHPAmmo, hPoisonAmmo, hFMJAmmo, hLabels, hPickup, Text3D:hText }; enum gEnum { gExists, gID, gOwnerID, gOwner[MAX_PLAYER_NAME], gType, gPrice, gLocked, gTimestamp, Float:gPosX, Float:gPosY, Float:gPosZ, Float:gPosA, Float:gExitX, Float:gExitY, Float:gExitZ, Float:gExitA, gWorld, gPickup, Text3D:gText }; enum bEnum { bExists, bID, bOwnerID, bOwner[MAX_PLAYER_NAME], bType, bPrice, bEntryFee, bLocked, bTimestamp, Float:bPosX, Float:bPosY, Float:bPosZ, Float:bPosA, Float:bIntX, Float:bIntY, Float:bIntZ, Float:bIntA, bInterior, bWorld, bOutsideInt, bOutsideVW, bCash, bProducts, bPickup, bMapIcon, Text3D:bText }; enum eEnum { eExists, eID, eOwnerID, eOwner[MAX_PLAYER_NAME], eName[40], eIcon, eLocked, Float:eRadius, Float:ePosX, Float:ePosY, Float:ePosZ, Float:ePosA, Float:eIntX, Float:eIntY, Float:eIntZ, Float:eIntA, eInterior, eWorld, eOutsideInt, eOutsideVW, eAdminLevel, eFactionType, eVIP, eVehicles, eFreeze, ePassword[64], eLabel, ePickup, Text3D:eText }; enum cEnum { cExists, cID, cName[32], cModel, cBone, cAttached, Float:cPosX, Float:cPosY, Float:cPosZ, Float:cRotX, Float:cRotY, Float:cRotZ, Float:cScaleX, Float:cScaleY, Float:cScaleZ, cAttachedIndex }; enum vEnum { vID, vOwnerID, vOwner[MAX_PLAYER_NAME], vModel, vPrice, vTickets, vLocked, vPlate[32], Float:vHealth, Float:vPosX, Float:vPosY, Float:vPosZ, Float:vPosA, vColor1, vColor2, vPaintjob, vInterior, vWorld, vNeon, vNeonEnabled, vTrunk, vMods[14], vCash, vMaterials, vWeed, vCocaine, vMeth, vPainkillers, vWeapons[3], vHPAmmo, vPoisonAmmo, vFMJAmmo, vGang, vFactionType, vJob, vRespawnDelay, vObjects[2], vTimer }; enum fEnum { fName[48], fLeader[MAX_PLAYER_NAME], fType, fColor, fRankCount, Float:fLockerX, Float:fLockerY, Float:fLockerZ, fLockerInterior, fLockerWorld, fSkins[MAX_FACTION_SKINS], fPaycheck[MAX_FACTION_RANKS], fTurfTokens, Text3D:fText, fPickup }; enum dEnum { dExists, dType, Float:dPosX, Float:dPosY, Float:dPosZ, Float:dPosA, dObject }; enum lEnum { lExists, lID, lOwnerID, lOwner[MAX_PLAYER_NAME], lPrice, Float:lMinX, Float:lMinY, Float:lMaxX, Float:lMaxY, Float:lHeight, lGangZone, lArea, lLabels }; enum gaEnum { gSetup, gName[32], gMOTD[128], gLeader[MAX_PLAYER_NAME], gColor, gStrikes, gLevel, gPoints, gTurfTokens, Float:gStashX, Float:gStashY, Float:gStashZ, gStashInterior, gStashWorld, gCash, gMaterials, gWeed, gCocaine, gMeth, gPainkillers, gHPAmmo, gPoisonAmmo, gFMJAmmo, gSkins[MAX_GANG_SKINS], gWeapons[14], gArmsDealer, gDrugDealer, Float:gArmsX, Float:gArmsY, Float:gArmsZ, Float:gArmsA, Float:gDrugX, Float:gDrugY, Float:gDrugZ, Float:gDrugA, gArmsWorld, gDrugWorld, gDrugWeed, gDrugCocaine, gDrugMeth, gArmsMaterials, gArmsPrices[12], gDrugPrices[3], gArmsHPAmmo, gArmsPoisonAmmo, gArmsFMJAmmo, Text3D:gText[3], gPickup, gActors[2] }; enum ptEnum { pExists, pName[32], pCapturedBy[MAX_PLAYER_NAME], pCapturedGang, pType, pProfits, pTime, Float:pPointX, Float:pPointY, Float:pPointZ, pPointInterior, pPointWorld, pCaptureTime, pCapturer, Text3D:pText, pPickup }; enum tEnum { tExists, tName[32], tCapturedBy[MAX_PLAYER_NAME], tCapturedGang, tType, tTime, Float:tMinX, Float:tMinY, Float:tMaxX, Float:tMaxY, Float:tHeight, tGangZone, tArea, tCaptureTime, tCapturer }; // --------------------------------------- #if defined SERVER_INTRO new Text:introTextdraws[26]; #endif new connectionID; new radioConnectionID; new queryBuffer[1024]; new Text:WebsiteTD; new Text:AnimationTD; new Text:TimeTD; new Text:LoginScreen[4]; new enabledOOC; new enabledNewbie = 1; new enabledGlobal = 1; new enabledReports = 1; new pizzaVehicles[6]; new courierVehicles[7]; new sweeperVehicles[4]; new taxiVehicles[4]; new testVehicles[5]; new gHour, gWorldTime, gWeather = 2; new gCharity, gCharityHealth, gCharityArmor; new gPlayerRecord, gRecordDate[24], gServerMOTD[128], gTax, gVault, gAnticheatBans; new gConnections, gTotalRegistered, gTotalKills, gTotalDeaths, gTotalHours; new gDoubleXP; new gLastAd; new gGMX; new gAnticheat = 1; new gVIPHealth, gVIPArmor; new gParachutes[2]; new gSeedsStock = 200, gCocaineStock = 100, gEphedrineStock = 50; new Text3D:gSeedsStockText, Text3D:gCocaineText, Text3D:gEphedrineStockText; new gPrisonCells[24], gPDDoors[3], gPDGates[2], gFBIGates[2]; new gFires, gFireObjects[MAX_FIRES] = {INVALID_OBJECT_ID, ...}, Float:gFireHealth[MAX_FIRES]; new EventInfo[eventEnum]; new RobberyInfo[robberyEnum]; new MarkedPositions[MAX_PLAYERS][3][mEnum]; new PlayerInfo[MAX_PLAYERS+1][pEnum]; new ReportInfo[MAX_REPORTS][rEnum]; new HouseInfo[MAX_HOUSES][hEnum]; new GarageInfo[MAX_GARAGES][gEnum]; new BusinessInfo[MAX_BUSINESSES][bEnum]; new EntranceInfo[MAX_ENTRANCES][eEnum]; new ClothingInfo[MAX_PLAYERS][MAX_PLAYER_CLOTHING][cEnum]; new VehicleInfo[MAX_VEHICLES][vEnum]; new FactionInfo[MAX_FACTIONS][fEnum]; new FactionRanks[MAX_FACTIONS][MAX_FACTION_RANKS][32]; new FactionDivisions[MAX_FACTIONS][MAX_FACTION_DIVISIONS][32]; new DeployInfo[MAX_DEPLOYABLES][dEnum]; new LandInfo[MAX_LANDS][lEnum]; new GangInfo[MAX_GANGS][gaEnum]; new GangRanks[MAX_FACTIONS][7][32]; new PointInfo[MAX_POINTS][ptEnum]; new TurfInfo[MAX_TURFS][tEnum]; new adminVehicle[MAX_VEHICLES char]; new vehicleFuel[MAX_VEHICLES] = {100, ...}; new vehicleSiren[MAX_VEHICLES] = {INVALID_OBJECT_ID, ...}; new vehicleStream[MAX_VEHICLES][128]; new vehicleColors[MAX_VEHICLES][2]; new bool:chattingWith[MAX_PLAYERS][MAX_PLAYERS char]; // --------------------------------------- new const vehicleNames[212][] = { "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection", "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife", "Article Trailer", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Article Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic", "Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking", "Blista Compact", "Police Maverick", "Boxville", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stuntplane", "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune", "Cadrona", "SWAT Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan", "Blade", "Streak", "Freight", "Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite", "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper", "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Petrol Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club", "Freight Box", "Article Trailer 3", "Andromada", "Dodo", "RC Cam", "Launch", "LSPD Car", "SFPD Car", "LVPD Car", "Police Rancher", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville", "Tiller", "Utility Trailer" }; new const weaponSlotIDs[] = { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 10, 10, 10, 8, 8, 8, 0, 0, 0, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 4, 6, 6, 7, 7, 7, 7, 8, 12, 9, 9, 9, 11, 11, 11 }; new const weaponModelIDs[] = { 0, 331, 333, 334, 335, 336, 337, 338, 339, 341, 321, 322, 323, 324, 325, 326, 342, 343, 344, 0, 0, 0, 346, 347, 348, 349, 350, 351, 352, 353, 355, 356, 372, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 368, 371 }; enum houseInt { intClass[16], intPrice, intID, Float:intX, Float:intY, Float:intZ, Float:intA }; new const houseInteriors[][houseInt] = { {"Apartment", 50000, 1, 244.1997, 305.0676, 999.1484, 270.2194}, {"Apartment", 75000, 2, 1434.0806, -1832.7854, 1313.5573, 270.0000}, {"Apartment", 10000, 10, 2259.7649, -1135.8751, 1050.6328, 270.0000}, {"Apartment", 10000, 8, 2008.8319, -1698.8461, 1165.7001, 90.0000}, {"Apartment", 125000, 5, 2233.6501, -1114.7767, 1050.8828, 0.0000}, {"Apartment", 125000, 1, 2217.9814, -1076.2471, 1050.4844, 90.0000}, {"Low Class", 150000, 9, 1178.3398, -419.0833, 1234.7045, 180.0000}, {"Low Class", 150000, 3, 828.6323, -1014.0038, 799.9664, 270.0000}, {"Low Class", 175000, 5, 1320.1091, -167.6174, 1088.0741, 90.0000}, {"Medium Class", 175000, 3, 1363.7614, -2145.6965, 1050.5886, 0.0000}, {"Medium Class", 200000, 5, 2654.4524, -1023.7827, 929.9266, 180.0000}, {"Medium Class", 200000, 11, 2184.1011, -1130.3905, 1128.7655, 270.0000}, {"Upper Class", 250000, 10, 2269.9143, -1210.5028, 1047.5625, 90.0000}, {"Upper Class", 250000, 6, 1749.6356, -1822.4457, 1000.3405, 0.0000}, {"Upper Class", 300000, 12, 2324.3862, -1148.8784, 1050.7101, 0.0000}, {"Upper Class", 400000, 4, 1282.0646, -1140.2067, 980.0524, 0.0000}, {"Mansion", 500000, 1, 1834.2408, -1278.7684, 832.1602, 180.0000}, {"Mansion", 1000000, 7, 925.0102, -496.8101, 843.8953, 90.0000}, {"Mansion", 2000000, 5, 1298.8682, -796.2053, 1084.0078, 0.0000} }; enum garageInt { intName[16], intPrice, intID, Float:intPX, Float:intPY, Float:intPZ, Float:intPA, Float:intVX, Float:intVY, Float:intVZ, Float:intVA }; new const garageInteriors[][garageInt] = { {"Small", 100000, 1, 1521.2797, -1639.7163, 1124.5045, 180.0000, 1516.8326, -1643.9105, 1124.3364, 180.0000}, {"Medium", 125000, 2, 1520.6278, -1639.7173, 1374.5045, 180.0000, 1514.9481, -1644.1083, 1374.3365, 180.0000}, {"Large", 250000, 3, 1672.8816, -2363.5818, 1535.4829, 90.0000, 1660.5437, -2362.9001, 1535.2944, 0.0000} }; enum bizInt { intType[24], intPrice, intID, Float:intX, Float:intY, Float:intZ, Float:intA }; new const bizInteriors[][bizInt] = { {"Supermarket", 600000, 6, -27.4377, -57.6114, 1003.5469, 0.0000}, {"Gun Shop", 800000, 6, 316.2873, -169.6470, 999.6010, 0.0000}, {"Clothes Shop", 750000, 14, 204.3860, -168.4586, 1000.5234, 0.0000}, {"Gym", 600000, 7, 773.7802, -78.2581, 1000.6619, 0.0000}, {"Restaurant", 500000, 10, 363.3276, -74.6505, 1001.5078, 315.0000}, {"Advertisement Agency", 675000, 3, 834.1517, 7.4096, 1004.1870, 90.0000}, {"Club/Bar", 475000, 11, 501.8694, -68.0046, 998.7578, 179.6117} }; enum furnitureEnum { fCategory[24], fName[32], fModel, fPrice }; new const furnitureCategories[][] = { {"Appliances"}, {"Bathroom"}, {"Bedroom"}, {"Carpets"}, {"Kitchen"}, {"Tables"}, {"Chairs"}, {"Posters/Frames"}, {"Storage"}, {"Plants"}, {"Trash"}, {"Doors & gates"}, {"Walls"}, {"Decor"} }; new const furnitureArray[][furnitureEnum] = { {"Appliances", "Blender", 19830, 500}, {"Appliances", "Coffee machine", 11743, 500}, {"Appliances", "Grill", 19831, 500}, {"Appliances", "Electrical outlet", 19813, 50}, {"Appliances", "Light switch", 19829, 50}, {"Appliances", "Keyboard", 19808, 50}, {"Appliances", "White telephone", 19807, 50}, {"Appliances", "Black telephone", 11705, 50}, {"Appliances", "Large LCD television", 19786, 1000}, {"Appliances", "Small LCD television", 19787, 750}, {"Appliances", "Round gold TV", 2224, 1500}, {"Appliances", "TV on wheels", 14532, 250}, {"Appliances", "Flat screen TV", 1792, 400}, {"Appliances", "Wide screen TV", 1786, 400}, {"Appliances", "Surveillance TV", 1749, 400}, {"Appliances", "Regular TV", 1518, 250}, {"Appliances", "Grey sided TV", 2322, 200}, {"Appliances", "Wood sided TV", 1429, 200}, {"Appliances", "Microwave", 2149, 100}, {"Appliances", "Pizza rack", 2453, 50}, {"Appliances", "Wide sprunk fridge", 2452, 100}, {"Appliances", "Small sprunk fridge", 2533, 50}, {"Appliances", "Duality game", 2779, 500}, {"Appliances", "Bee Bee Gone game", 2778, 500}, {"Appliances", "Space Monkeys game", 2681, 500}, {"Appliances", "Sprunk machine", 1775, 1000}, {"Appliances", "Candy machine", 1776, 1000}, {"Appliances", "Water machine", 1808, 100}, {"Appliances", "Radiator", 1738, 50}, {"Appliances", "Metal fridge", 1780, 100}, {"Appliances", "Pizza cooker", 2426, 50}, {"Appliances", "Deep fryer", 2415, 100}, {"Appliances", "Soda dispenser", 2427, 100}, {"Appliances", "Aluminum stove", 2417, 100}, {"Appliances", "Lamp", 2105, 50}, {"Appliances", "Diagnostic machine", 19903, 4000}, {"Appliances", "VHS player", 1785, 200}, {"Appliances", "Playstation console", 2028, 500}, {"Appliances", "Retro gaming console", 1718, 500}, {"Appliances", "Hi-Fi speaker", 1839, 250}, {"Appliances", "Black subwoofer", 2232, 250}, {"Appliances", "Subwoofer", 1840, 250}, {"Appliances", "Small black speaker", 2229, 250}, {"Appliances", "Speaker on a stand", 2233, 100}, {"Appliances", "Speaker & stereo system", 2099, 500}, {"Appliances", "Surveillance camera", 1886, 50}, {"Appliances", "Security camera", 1622, 50}, {"Appliances", "Exercise bike", 2630, 500}, {"Appliances", "Treadmill", 2627, 500}, {"Appliances", "Lift bench", 2629, 250}, {"Appliances", "Pull up machine", 2628, 500}, {"Appliances", "White turntable", 1954, 500}, {"Bathroom", "Toilet", 2514, 250}, {"Bathroom", "Bathtub", 2519, 500}, {"Bathroom", "Toilet paper", 19873, 50}, {"Bathroom", "Towel rack", 11707, 100}, {"Bathroom", "Toilet with rug", 2528, 500}, {"Bathroom", "Toilet with rolls", 2525, 500}, {"Bathroom", "Sink top", 2515, 100}, {"Bathroom", "Dual sink top", 2150, 200}, {"Bathroom", "Wood sided bathtub", 2526, 500}, {"Bathroom", "Sprunk bathtub", 2097, 1000}, {"Bathroom", "Shower curtains", 14481, 100}, {"Bathroom", "Metal shower cabin", 2520, 500}, {"Bathroom", "Glass shower cabin", 2517, 500}, {"Bathroom", "Shower with curtains", 2527, 500}, {"Bathroom", "Wall sink", 2518, 250}, {"Bathroom", "Plain sink", 2739, 250}, {"Bathroom", "Sink with extra soap", 2524, 250}, {"Bathroom", "Sink with rug", 2523, 250}, {"Bathroom", "Industrial sink", 11709, 500}, {"Bedroom", "Prison bed", 1800, 100}, {"Bedroom", "Folding bed", 1812, 100}, {"Bedroom", "Red double bed", 11720, 500}, {"Bedroom", "Wood double bed", 14866, 500}, {"Bedroom", "Double plaid bed", 1794, 500}, {"Bedroom", "Brown bed", 2229, 500}, {"Bedroom", "Blue striped bed", 2302, 500}, {"Bedroom", "Dark blue striped bed", 2298, 500}, {"Bedroom", "White striped bed", 2090, 500}, {"Bedroom", "Bed with cabinet", 2300, 500}, {"Bedroom", "Pink & blue striped bed", 2301, 500}, {"Bedroom", "Zebra print bed", 14446, 500}, {"Bedroom", "Low striped bed", 1795, 500}, {"Bedroom", "Low dark striped bed", 1798, 500}, {"Bedroom", "Single plaid bed", 1796, 500}, {"Bedroom", "Plain striped mattress", 1793, 500}, {"Bedroom", "Silk sheeted bed", 1701, 500}, {"Bedroom", "Framed striped bed", 1801, 500}, {"Bedroom", "Framed brown bed", 1802, 500}, {"Bedroom", "Wooden cabinet", 2330, 250}, {"Bedroom", "Cabinet with TV", 2296, 500}, {"Bedroom", "Dresser", 1416, 250}, {"Bedroom", "Small dresser", 2095, 250}, {"Bedroom", "Medium dresser", 1743, 250}, {"Bedroom", "Wide dresser", 2087, 250}, {"Bedroom", "Small wardrobe", 2307, 250}, {"Bedroom", "Huge open wardrobe", 14556, 500}, {"Bedroom", "Busted cabinet", 913, 500}, {"Bedroom", "Busted dresser", 911, 250}, {"Bedroom", "Dresser with no drawers", 912, 100}, {"Carpets", "Rockstar carpet", 11737, 250}, {"Carpets", "Plain red carpet", 2631, 250}, {"Carpets", "Plain green carpet", 2632, 250}, {"Carpets", "Patterned carpet", 2842, 250}, {"Carpets", "Zig-zag patterned carpet", 2836, 250}, {"Carpets", "Brown red striped carpet", 2847, 250}, {"Carpets", "Old timer's carpet", 2833, 250}, {"Carpets", "Red checkered carpet", 2818, 250}, {"Carpets", "Green circled carpet", 2817, 250}, {"Carpets", "Plain polkadot carpet", 2834, 250}, {"Carpets", "Tiger rug", 1828, 1000}, {"Carpets", "Plain round rug", 2835, 250}, {"Carpets", "Round green rug", 2841, 250}, {"Kitchen", "CJ's kitchen", 14384, 3000}, {"Kitchen", "Whole kitchen", 14720, 3000}, {"Kitchen", "White kitchen sink", 2132, 500}, {"Kitchen", "White kitchen counter", 2134, 500}, {"Kitchen", "White kitchen fridge", 2131, 500}, {"Kitchen", "White kitchen drawers", 2133, 500}, {"Kitchen", "White kitchen corner", 2341, 500}, {"Kitchen", "White kitchen cupboard", 2141, 500}, {"Kitchen", "Green kitchen sink", 2336, 500}, {"Kitchen", "Green kitchen counter", 2334, 500}, {"Kitchen", "Green kitchen fridge", 2147, 500}, {"Kitchen", "Green kitchen corner", 2338, 500}, {"Kitchen", "Green kitchen washer", 2337, 500}, {"Kitchen", "Green kitchen cupboard", 2158, 500}, {"Kitchen", "Green kitchen stove", 2170, 500}, {"Kitchen", "Red kitchen sink", 2130, 500}, {"Kitchen", "Red kitchen fridge", 2127, 500}, {"Kitchen", "Red kitchen cupboard", 2128, 500}, {"Kitchen", "Red kitchen corner", 2304, 500}, {"Kitchen", "Red kitchen counter", 2129, 500}, {"Kitchen", "Wood kitchen sink", 2136, 500}, {"Kitchen", "Wood kitchen counter", 2139, 500}, {"Kitchen", "Wood kitchen cupboard", 2140, 500}, {"Kitchen", "Wood kitchen washer", 2303, 500}, {"Kitchen", "Wood kitchen unit", 2138, 500}, {"Kitchen", "Wood kitchen corner", 2305, 500}, {"Kitchen", "Wood kitchen stove", 2135, 500}, {"Kitchen", "Modern stove", 19923, 1000}, {"Kitchen", "Old timer's stove", 19915, 1000}, {"Kitchen", "Fork", 11715, 50}, {"Kitchen", "Butter knife", 11716, 50}, {"Kitchen", "Steak knife", 19583, 50}, {"Kitchen", "Spatula", 19586, 50}, {"Kitchen", "Double handled pan", 19585, 100}, {"Kitchen", "Single handled pan", 19584, 100}, {"Kitchen", "Frying pan", 19581, 100}, {"Kitchen", "Tall striped saucepan", 11719, 100}, {"Kitchen", "Striped saucepan", 11718, 100}, {"Kitchen", "Cooked steak", 19982, 50}, {"Kitchen", "Raw steak", 19582, 50}, {"Kitchen", "Green apple", 19576, 50}, {"Kitchen", "Red apple", 19575, 50}, {"Kitchen", "Orange", 19574, 50}, {"Kitchen", "Banana", 19578, 50}, {"Kitchen", "Tomato", 19577, 50}, {"Tables", "Lab table", 3383, 2000}, {"Tables", "Pool table", 2964, 2000}, {"Tables", "Blackjack table", 2188, 2000}, {"Tables", "Betting table", 1824, 2000}, {"Tables", "Roulette table", 1896, 2000}, {"Tables", "Poker table", 19474, 1000}, {"Tables", "Burger shot table", 2644, 500}, {"Tables", "Cluckin' bell table", 2763, 500}, {"Tables", "Wide cluckin' bell table", 2762, 500}, {"Tables", "Square coffee table", 2370, 500}, {"Tables", "Donut shop table", 2747, 500}, {"Tables", "Pizza table", 2764, 500}, {"Tables", "Wide coffee table", 2319, 500}, {"Tables", "Rectangular green table", 11691, 500}, {"Tables", "Squared green table", 11690, 500}, {"Tables", "Round glass table", 1827, 500}, {"Tables", "Round wooden table", 2111, 500}, {"Tables", "Wide dining table", 2357, 500}, {"Tables", "Plain wooden table", 2115, 500}, {"Tables", "Plain brown wooden table", 1516, 500}, {"Tables", "White polkadot table", 1770, 500}, {"Tables", "Brown dining table", 1737, 500}, {"Tables", "Round stone table", 2030, 500}, {"Tables", "Wooden table with rim", 2699, 500}, {"Tables", "Low coffee table", 1814, 500}, {"Tables", "Low brown wooden table", 1433, 500}, {"Tables", "Bedroom table", 2333, 500}, {"Tables", "Round table with chairs", 1432, 500}, {"Tables", "Table with benches", 1281, 500}, {"Tables", "Checkered table & chairs", 1594, 500}, {"Tables", "Wooden workshop table", 19922, 500}, {"Tables", "Hexagon shaped table", 2725, 500}, {"Tables", "Table with VCR", 2313, 500}, {"Tables", "Low wooden TV stand", 2314, 500}, {"Tables", "Low brown TV stand", 2315, 500}, {"Tables", "Plain brown office desk", 2206, 500}, {"Tables", "Office desk with computer", 2181, 1000}, {"Tables", "Plain wooden office desk", 2185, 1000}, {"Tables", "Computer desk", 2008, 1000}, {"Chairs", "Blue swivel chair", 2356, 250}, {"Chairs", "Brown dining chair", 1811, 250}, {"Chairs", "Red folding chair", 2121, 250}, {"Chairs", "Upholstered chair", 2748, 1000}, {"Chairs", "Folding office chair", 1721, 250}, {"Chairs", "Round black chair", 2776, 250}, {"Chairs", "Black stool", 1716, 250}, {"Chairs", "Brown stool", 2350, 250}, {"Chairs", "Red stool", 2125, 250}, {"Chairs", "Tall wooden dining chair", 2124, 250}, {"Chairs", "Tall brown dining chair", 1739, 250}, {"Chairs", "Checkered dining chair", 2807, 250}, {"Chairs", "Plain office chair", 1671, 250}, {"Chairs", "Brown folding chair", 19996, 250}, {"Chairs", "Light brown chair", 19994, 250}, {"Chairs", "Black lounge chair", 1704, 500}, {"Chairs", "Beige lounge chair", 1705, 500}, {"Chairs", "Dark blue reclining chair", 1708, 500}, {"Chairs", "Brown corner chair", 11682, 500}, {"Chairs", "Old timer's lounge chair", 1711, 500}, {"Chairs", "Old timer's rocking chair", 1735, 500}, {"Chairs", "Two chairs and a table", 2571, 500}, {"Chairs", "Dark brown foot stool", 2293, 500}, {"Chairs", "Rocking chair", 11734, 250}, {"Chairs", "Plaid sofa", 1764, 750}, {"Chairs", "Long black sofa", 1723, 750}, {"Chairs", "Beige sofa", 1702, 750}, {"Chairs", "Brown couch", 1757, 750}, {"Chairs", "Old timer's sofa", 1728, 750}, {"Chairs", "Brown corner couch piece", 2292, 500}, {"Chairs", "White & grey couch", 1761, 750}, {"Chairs", "Patterned couch", 1760, 750}, {"Chairs", "Plaid couch", 1764, 750}, {"Chairs", "Dark blue couch", 1768, 750}, {"Chairs", "Wide brown couch", 2290, 750}, {"Chairs", "Green couch", 1766, 750}, {"Chairs", "Patterned armrest couch", 1763, 750}, {"Chairs", "Red couch", 11717, 750}, {"Chairs", "Very wide beige couch", 1710, 1500}, {"Chairs", "Ultra wide beige couch", 1709, 2000}, {"Chairs", "Red and white couch", 1707, 750}, {"Posters/Frames", "Burger shot poster", 2641, 50}, {"Posters/Frames", "Cluckin' bell poster", 2766, 50}, {"Posters/Frames", "Wash wands poster", 2685, 50}, {"Posters/Frames", "For lease poster", 11289, 50}, {"Posters/Frames", "Monkey juice poster", 19328, 50}, {"Posters/Frames", "Ring donuts poster", 2715, 50}, {"Posters/Frames", "Battered ring posterr", 2716, 50}, {"Posters/Frames", "Pizza poster", 2668, 50}, {"Posters/Frames", "T-Shirt poster", 2729, 50}, {"Posters/Frames", "Suburban poster", 2658, 50}, {"Posters/Frames", "Zip poster", 2736, 50}, {"Posters/Frames", "Binco poster", 2722, 50}, {"Posters/Frames", "99c binco poster", 2719, 50}, {"Posters/Frames", "Binco sale poster", 2721, 50}, {"Posters/Frames", "Heat poster", 2661, 50}, {"Posters/Frames", "Eris poster", 2655, 50}, {"Posters/Frames", "Bobo poster", 2662, 50}, {"Posters/Frames", "Base 5 poster", 2691, 50}, {"Posters/Frames", "Base 5 cutout #1", 2693, 50}, {"Posters/Frames", "Base 5 cutout #2", 2692, 50}, {"Posters/Frames", "Long base 5 poster #1", 2695, 50}, {"Posters/Frames", "Long base 5 poster #2", 2696, 50}, {"Posters/Frames", "White prolaps poster", 2697, 50}, {"Posters/Frames", "Black prolaps poster", 2656, 50}, {"Posters/Frames", "San Fierro frame", 19175, 100}, {"Posters/Frames", "Flint County frame", 19174, 100}, {"Posters/Frames", "Gant Bridge frame", 19173, 100}, {"Posters/Frames", "Los Santos frame", 19172, 100}, {"Posters/Frames", "City View frame", 2289, 100}, {"Posters/Frames", "Los Angeles frame", 2258, 100}, {"Posters/Frames", "Wooden frame", 2288, 100}, {"Posters/Frames", "Sail Boat frame", 2287, 100}, {"Posters/Frames", "Ship frame", 2286, 100}, {"Posters/Frames", "Water frame", 2285, 100}, {"Posters/Frames", "Church frame", 2284, 100}, {"Posters/Frames", "Rural frame", 2282, 100}, {"Posters/Frames", "Sunset frame", 2281, 100}, {"Posters/Frames", "Coast frame", 2280, 100}, {"Posters/Frames", "Mount chiliad frame", 2279, 100}, {"Posters/Frames", "Cargo ship frame", 2278, 100}, {"Posters/Frames", "Cat frame", 2277, 100}, {"Posters/Frames", "Bridge frame", 2276, 100}, {"Posters/Frames", "Fruit Bowl frame", 2275, 100}, {"Posters/Frames", "Flower frame", 2274, 100}, {"Posters/Frames", "Bouquet frame", 2273, 100}, {"Posters/Frames", "Landscape frame", 2272, 100}, {"Posters/Frames", "Paper frame", 2271, 100}, {"Posters/Frames", "Leaves frame", 2270, 100}, {"Posters/Frames", "Lake frame", 2269, 100}, {"Posters/Frames", "Black cat frame", 2268, 100}, {"Posters/Frames", "Cruise ship frame", 2267, 100}, {"Posters/Frames", "Night downtown frame", 2266, 100}, {"Posters/Frames", "Dseert rocks frame", 2265, 100}, {"Posters/Frames", "Beach frame", 2264, 100}, {"Posters/Frames", "Dock frame", 2263, 100}, {"Posters/Frames", "Downtown frame", 2262, 100}, {"Posters/Frames", "Golden gate frame", 2261, 100}, {"Posters/Frames", "Old Boat frame", 2260, 100}, {"Posters/Frames", "Bowling frame", 2259, 100}, {"Posters/Frames", "Pattern frame", 2283, 100}, {"Posters/Frames", "Squares frame", 2257, 100}, {"Posters/Frames", "Palm trees frame", 2256, 100}, {"Posters/Frames", "Erotic frame", 2255, 100}, {"Posters/Frames", "Yellow car frame", 2254, 10}, {"Storage", "Book shelf", 1742, 500}, {"Storage", "Wardrobe", 2307, 400}, {"Storage", "Wooden crate", 1217, 150}, {"Storage", "Metal crate", 964, 150}, {"Storage", "Wide office cabinet", 2200, 150}, {"Storage", "Yellow cabinet", 1730, 150}, {"Storage", "Open gym locker", 11730, 250}, {"Storage", "Closed gym locker", 11729, 250}, {"Storage", "Toolbox", 19921, 500}, {"Storage", "Chest", 19918, 100}, {"Storage", "Dresser", 2094, 250}, {"Storage", "Warehouse rack", 3761, 150}, {"Storage", "Barrel rack", 925, 250}, {"Storage", "Sex toy rack", 2581, 250}, {"Storage", "Sex magazine rack #1", 2578, 250}, {"Storage", "Sex magazine rack #2", 2579, 250}, {"Storage", "Rack with no shelves", 2509, 250}, {"Storage", "Rack with 3 shelves", 2482, 250}, {"Storage", "Rack with 4 shelves", 2475, 250}, {"Storage", "Small rack", 2463, 250}, {"Storage", "Wide rack", 2462, 250}, {"Storage", "Dresser with drawers", 1743, 250}, {"Storage", "Wide dresser", 2087, 250}, {"Storage", "Tall dresser", 2088, 250}, {"Storage", "Brown dresser", 2089, 250}, {"Storage", "Single dresser", 2095, 250}, {"Storage", "White filing cabinet", 2197, 250}, {"Storage", "Green filing cabinet", 2610, 250}, {"Storage", "Dual filing cabinets", 2007, 250}, {"Storage", "Black shelf", 2078, 250}, {"Storage", "Brown shelf", 2204, 250}, {"Storage", "Tool shelf", 19899, 250}, {"Storage", "Tool cabinet", 19900, 250}, {"Storage", "Wall mounted shelf", 19940, 250}, {"Storage", "Clothes shelf", 2708, 250}, {"Storage", "Gun rack", 2046, 250}, {"Storage", "Shop shelf", 19640, 250}, {"Storage", "Blue office shelf", 2191, 250}, {"Storage", "Wooden office shelf", 2199, 250}, {"Storage", "Office book shelf", 2161, 250}, {"Storage", "Tall office cabinet", 2167, 100}, {"Storage", "Wide office cabinet", 2163, 100}, {"Plants", "Palm plant #1", 625, 100}, {"Plants", "Palm plant #2", 626, 100}, {"Plants", "Palm plant #3", 627, 100}, {"Plants", "Palm plant #4", 628, 100}, {"Plants", "Palm plant #5", 630, 100}, {"Plants", "Palm plant #6", 631, 100}, {"Plants", "Palm plant #7", 632, 100}, {"Plants", "Palm plant #8", 633, 100}, {"Plants", "Palm plant #9", 646, 100}, {"Plants", "Palm plant #10", 644, 100}, {"Plants", "Palm plant #11", 2001, 100}, {"Plants", "Palm plant #12", 2010, 100}, {"Plants", "Palm plant #13", 2011, 150}, {"Plants", "Potted plant #1", 948, 150}, {"Plants", "Potted plant #2", 949, 150}, {"Plants", "Potted plant #3", 950, 150}, {"Plants", "Potted plant #4", 2194, 150}, {"Plants", "Potted plant #5", 2195, 150}, {"Plants", "Potted plant #6", 2203, 150}, {"Plants", "Potted plant #7", 2240, 150}, {"Plants", "Potted plant #8", 2241, 150}, {"Plants", "Potted plant #9", 2242, 150}, {"Plants", "Potted plant #10", 2244, 150}, {"Plants", "Potted plant #11", 2245, 150}, {"Plants", "Potted plant #12", 2246, 150}, {"Plants", "Potted plant #13", 2248, 150}, {"Plants", "Potted plant #14", 2252, 150}, {"Plants", "Potted plant #15", 2253, 150}, {"Plants", "Potted plant #16", 2811, 150}, {"Plants", "Wide plant", 638, 250}, {"Plants", "Single bush plant", 1361, 250}, {"Plants", "Wide bush plant", 1360, 250}, {"Plants", "Bush plant and bench", 1364, 500}, {"Plants", "Window plant #1", 3802, 200}, {"Plants", "Window plant #2", 3810, 200}, {"Trash", "Wastebin", 11706, 50}, {"Trash", "Blue trashcan on wheels", 1339, 50}, {"Trash", "Blue trashcan", 1430, 50}, {"Trash", "Trashcan with holes", 1359, 50}, {"Trash", "Cluckin' bell trashcan", 2770, 50}, {"Trash", "Burger shot trashcan", 2420, 50}, {"Trash", "Round bagged trashcan", 1330, 50}, {"Trash", "Round white trashcan", 1329, 50}, {"Trash", "Metal trashcan", 1328, 50}, {"Trash", "Full dumpster", 1415, 50}, {"Trash", "Closed dumpster", 1227, 50}, {"Trash", "Bottle disposal unit", 1336, 50}, {"Trash", "Blue dumpster", 1334, 50}, {"Trash", "Red dumpster", 1333, 50}, {"Trash", "Hippo trashcan", 1371, 50}, {"Trash", "Poor trashcan", 1347, 50}, {"Trash", "Cement trashcan", 1300, 50}, {"Trash", "Trashcan filled with wood", 1442, 50}, {"Trash", "Two pallets & trash", 1450, 50}, {"Trash", "Single pallet", 1448, 50}, {"Trash", "Garbage bag", 1265, 50}, {"Trash", "Burger shot bag", 2663, 50}, {"Trash", "Pile of boxes", 1440, 50}, {"Trash", "Cardboard box", 1221, 50}, {"Trash", "Open pizza box", 2860, 50}, {"Trash", "Takeaway trash", 2866, 50}, {"Trash", "Burger shot trash", 2840, 50}, {"Trash", "Dirty dishes #1", 2812, 50}, {"Trash", "Dirty dishes #2", 2822, 50}, {"Trash", "Dirty dishes #3", 2829, 50}, {"Trash", "Dirty dishes #4", 2830, 50}, {"Trash", "Dirty dishes #5", 2831, 50}, {"Trash", "Dirty dishes #6", 2832, 50}, {"Trash", "Clean dishes #1", 2862, 50}, {"Trash", "Clean dishes #2", 2863, 50}, {"Trash", "Clean dishes #3", 2864, 50}, {"Trash", "Clean dishes #4", 2865, 50}, {"Trash", "Assorted trash #1", 2672, 50}, {"Trash", "Assorted trash #2", 2677, 50}, {"Trash", "Assorted trash #3", 2675, 50}, {"Trash", "Assorted trash #4", 2676, 50}, {"Trash", "Assorted trash #5", 2674, 50}, {"Trash", "Assorted trash #6", 2673, 50}, {"Trash", "Assorted trash #7", 2670, 50}, {"Doors & gates", "Door with bars", 2930, 100}, {"Doors & gates", "Petrol door", 2911, 100}, {"Doors & gates", "Flat door", 3061, 100}, {"Doors & gates", "Wardrobe door", 1567, 100}, {"Doors & gates", "Green push door", 1492, 100}, {"Doors & gates", "Red windowed door", 1493, 100}, {"Doors & gates", "Black wooden door", 1494, 100}, {"Doors & gates", "Brown windowed door", 3089, 100}, {"Doors & gates", "Wooden farm door", 1497, 100}, {"Doors & gates", "White wooden door", 1498, 100}, {"Doors & gates", "Warehouse door", 1499, 100}, {"Doors & gates", "Red door", 1504, 100}, {"Doors & gates", "Blue door", 1505, 100}, {"Doors & gates", "White door", 1506, 100}, {"Doors & gates", "Yellow door", 1507, 100}, {"Doors & gates", "Kitchen door", 1523, 100}, {"Doors & gates", "Motel door", 1535, 100}, {"Doors & gates", "Blue motel door", 2970, 100}, {"Doors & gates", "24/7 door", 1560, 100}, {"Doors & gates", "Barred door", 3061, 100}, {"Doors & gates", "Red motel door", 3029, 100}, {"Doors & gates", "Security door", 2949, 100}, {"Doors & gates", "Tall white door", 2948, 100}, {"Doors & gates", "Bank door", 2946, 100}, {"Doors & gates", "Ship door", 2944, 100}, {"Doors & gates", "Tower door", 977, 100}, {"Doors & gates", "Maintenance doors", 11714, 100}, {"Doors & gates", "Dual dffice door", 19176, 100}, {"Doors & gates", "Screen door #1", 1495, 100}, {"Doors & gates", "Screen door #2", 1500, 100}, {"Doors & gates", "Screen door #3", 1501, 100}, {"Doors & gates", "Shop door #1", 1532, 100}, {"Doors & gates", "Shop door #2", 1496, 100}, {"Doors & gates", "Shop door #3", 1533, 100}, {"Doors & gates", "Shop door #4", 1537, 100}, {"Doors & gates", "Shop door #5", 1538, 100}, {"Doors & gates", "Office door #1", 1566, 100}, {"Doors & gates", "Office door #2", 1569, 100}, {"Doors & gates", "Office door #3", 1536, 100}, {"Doors & gates", "Office door #4", 1557, 100}, {"Doors & gates", "Office door #5", 1556, 100}, {"Doors & gates", "Wooden push door #1", 1491, 100}, {"Doors & gates", "Wooden push door #2", 1502, 100}, {"Doors & gates", "Garage door #1", 8957, 100}, {"Doors & gates", "Garage door #2", 7891, 100}, {"Doors & gates", "Garage door #3", 3037, 100}, {"Doors & gates", "Garage door #4", 19861, 100}, {"Doors & gates", "Garage door #5", 19864, 100}, {"Doors & gates", "Plain metal bar gate", 19912, 1000}, {"Doors & gates", "Tall metal bar gate", 971, 1000}, {"Doors & gates", "Long metal bar gate", 975, 1000}, {"Doors & gates", "Los Santos Airport gate", 980, 1000}, {"Doors & gates", "Fenced gate", 985, 1000}, {"Doors & gates", "No parking gate", 19870, 1000}, {"Doors & gates", "Fenced gate on wheels", 988, 1000}, {"Walls", "wall001", 19353, 100}, {"Walls", "wall002", 19354, 100}, {"Walls", "wall003", 19355, 100}, {"Walls", "wall004", 19356, 100}, {"Walls", "wall005", 19357, 100}, {"Walls", "wall006", 19358, 100}, {"Walls", "wall007", 19359, 100}, {"Walls", "wall008", 19360, 100}, {"Walls", "wall009", 19361, 100}, {"Walls", "wall010", 19362, 100}, {"Walls", "wall011", 19363, 100}, {"Walls", "wall012", 19364, 100}, {"Walls", "wall013", 19365, 100}, {"Walls", "wall014", 19366, 100}, {"Walls", "wall015", 19367, 100}, {"Walls", "wall016", 19368, 100}, {"Walls", "wall017", 19369, 100}, {"Walls", "wall018", 19370, 100}, {"Walls", "wall019", 19371, 100}, {"Walls", "wall020", 19372, 100}, {"Walls", "wall021", 19373, 100}, {"Walls", "wall022", 19374, 100}, {"Walls", "wall023", 19375, 100}, {"Walls", "wall024", 19376, 100}, {"Walls", "wall025", 19377, 100}, {"Walls", "wall026", 19378, 100}, {"Walls", "wall027", 19379, 100}, {"Walls", "wall028", 19380, 100}, {"Walls", "wall029", 19381, 100}, {"Walls", "wall030", 19382, 100}, {"Walls", "wall031", 19383, 100}, {"Walls", "wall032", 19384, 100}, {"Walls", "wall033", 19385, 100}, {"Walls", "wall034", 19386, 100}, {"Walls", "wall035", 19387, 100}, {"Walls", "wall036", 19388, 100}, {"Walls", "wall037", 19389, 100}, {"Walls", "wall038", 19390, 100}, {"Walls", "wall039", 19391, 100}, {"Walls", "wall040", 19392, 100}, {"Walls", "wall041", 19393, 100}, {"Walls", "wall042", 19394, 100}, {"Walls", "wall043", 19395, 100}, {"Walls", "wall044", 19396, 100}, {"Walls", "wall045", 19397, 100}, {"Walls", "wall046", 19398, 100}, {"Walls", "wall047", 19399, 100}, {"Walls", "wall048", 19400, 100}, {"Walls", "wall049", 19401, 100}, {"Walls", "wall050", 19402, 100}, {"Walls", "wall051", 19403, 100}, {"Walls", "wall052", 19404, 100}, {"Walls", "wall053", 19405, 100}, {"Walls", "wall054", 19406, 100}, {"Walls", "wall055", 19407, 100}, {"Walls", "wall056", 19408, 100}, {"Walls", "wall057", 19409, 100}, {"Walls", "wall058", 19410, 100}, {"Walls", "wall059", 19411, 100}, {"Walls", "wall060", 19412, 100}, {"Walls", "wall061", 19413, 100}, {"Walls", "wall062", 19414, 100}, {"Walls", "wall063", 19415, 100}, {"Walls", "wall064", 19416, 100}, {"Walls", "wall065", 19417, 100}, {"Walls", "wall066", 19426, 100}, {"Walls", "wall067", 19427, 100}, {"Walls", "wall068", 19428, 100}, {"Walls", "wall069", 19429, 100}, {"Walls", "wall070", 19430, 100}, {"Walls", "wall071", 19431, 100}, {"Walls", "wall072", 19432, 100}, {"Walls", "wall073", 19433, 100}, {"Walls", "wall074", 19434, 100}, {"Walls", "wall075", 19435, 100}, {"Walls", "wall076", 19436, 100}, {"Walls", "wall077", 19437, 100}, {"Walls", "wall078", 19438, 100}, {"Walls", "wall079", 19439, 100}, {"Walls", "wall080", 19440, 100}, {"Walls", "wall081", 19441, 100}, {"Walls", "wall082", 19442, 100}, {"Walls", "wall083", 19443, 100}, {"Walls", "wall084", 19444, 100}, {"Walls", "wall085", 19445, 100}, {"Walls", "wall086", 19446, 100}, {"Walls", "wall087", 19447, 100}, {"Walls", "wall088", 19448, 100}, {"Walls", "wall089", 19449, 100}, {"Walls", "wall090", 19450, 100}, {"Walls", "wall091", 19451, 100}, {"Walls", "wall092", 19452, 100}, {"Walls", "wall093", 19453, 100}, {"Walls", "wall094", 19454, 100}, {"Walls", "wall095", 19455, 100}, {"Walls", "wall096", 19456, 100}, {"Walls", "wall097", 19457, 100}, {"Walls", "wall098", 19458, 100}, {"Walls", "wall099", 19459, 100}, {"Walls", "wall100", 19460, 100}, {"Walls", "wall101", 19461, 100}, {"Walls", "wall102", 19462, 100}, {"Walls", "wall103", 19463, 100}, {"Walls", "wall104", 19464, 100}, {"Walls", "wall105", 19465, 100}, {"Decor", "Guard tower", 3279, 5000}, {"Decor", "Tool board", 19815, 50}, {"Decor", "Mailbox", 19867, 50}, {"Decor", "Single key", 11746, 50}, {"Decor", "Oxygen cylinder", 19816, 50}, {"Decor", "Cauldron", 19527, 50}, {"Decor", "Valve", 2983, 50}, {"Decor", "Writing board", 19805, 50}, {"Decor", "Punching bag", 1985, 50}, {"Decor", "Desk fan", 2192, 50}, {"Decor", "Satellite dish", 3031, 50}, {"Decor", "Shopping cart", 1349, 50}, {"Decor", "Fireplace logs", 19632, 50}, {"Decor", "Telescope", 2600, 50}, {"Decor", "Ladder", 1428, 50}, {"Decor", "Plank", 2937, 50}, {"Decor", "Blue curtains", 2558, 50}, {"Decor", "Old curtains", 14443, 50}, {"Decor", "Blinds", 18084, 50}, {"Decor", "United states flag", 11245, 50}, {"Decor", "Double US flag", 2614, 50}, {"Decor", "Confederate flag", 2048, 50}, {"Decor", "Basketball court", 946, 50}, {"Decor", "Basketball", 2114, 50}, {"Decor", "Fire exit sign", 11710, 50}, {"Decor", "Fire extinguisher", 2690, 50}, {"Decor", "Fire extinguisher panel", 11713, 50}, {"Decor", "Fire alarm", 11713, 50}, {"Decor", "Fire hydrant", 1211, 50}, {"Decor", "Cocaine packet", 2891, 50}, {"Decor", "Drug bundle", 1279, 50}, {"Decor", "White package", 1575, 50}, {"Decor", "Orange package", 1576, 50}, {"Decor", "Yellow package", 1577, 50}, {"Decor", "Green package", 1578, 50}, {"Decor", "Blue package", 1579, 50}, {"Decor", "Red package", 1580, 50}, {"Decor", "Marijuana bundle", 2901, 50}, {"Decor", "Marijuana plant", 3409, 50}, {"Decor", "Ashtray", 1510, 50}, {"Decor", "Ashtray with cigar", 1665, 50}, {"Decor", "Pumpkin", 19320, 50}, {"Decor", "Christmas tree", 19076, 50}, {"Decor", "Stage", 19608, 250}, {"Decor", "Gold record", 19617, 100}, {"Decor", "Moose head", 1736, 300}, {"Decor", "Cow", 19833, 500}, {"Decor", "Rocking horse", 11733, 50}, {"Decor", "Deer", 19315, 50}, {"Decor", "Boot", 11735, 50}, {"Decor", "Old radiator", 1738, 50}, {"Decor", "Radiator", 11721, 50}, {"Decor", "Round light", 11727, 50}, {"Decor", "Mop & pail", 1778, 50}, {"Decor", "Chambermaid", 1789, 50}, {"Decor", "Bucket", 2713, 50}, {"Decor", "Trolley", 2994, 50}, {"Decor", "Body bags", 16444, 50}, {"Decor", "Beach ball", 1598, 50}, {"Decor", "Blackboard", 3077, 50}, {"Decor", "Dumbell", 3072, 50}, {"Decor", "Sports bag", 11745, 50}, {"Decor", "Portable toilet", 2984, 50}, {"Decor", "Round burger shot sign", 2643, 50}, {"Decor", "Stretcher", 1997, 50}, {"Decor", "Hospital bed", 2146, 50}, {"Decor", "Work lamp", 2196, 50}, {"Decor", "Fire bell", 1613, 50}, {"Decor", "Sword", 19590, 50}, {"Decor", "Wooden bat", 19914, 50}, {"Decor", "Hand fan", 19591, 50}, {"Decor", "Shop basket", 19592, 50}, {"Decor", "Safe door", 19619, 50}, {"Decor", "Safe enclosure", 19618, 50}, {"Decor", "Bag of money", 1550, 50}, {"Decor", "Oil can", 19621, 50}, {"Decor", "Wrench", 19627, 50}, {"Decor", "Engine", 19917, 50}, {"Decor", "Broom", 19622, 50}, {"Decor", "Briefcase", 19624, 50}, {"Decor", "Cigarette", 19625, 50}, {"Decor", "Fire wood", 19632, 50}, {"Decor", "Compacted trash", 19772, 50}, {"Decor", "Medic kit", 11738, 50}, {"Decor", "Clip", 19995, 50}, {"Decor", "Dippo lighter", 19998, 50}, {"Decor", "Briquettes", 19573, 50}, {"Decor", "Meat Sack", 2805, 50}, {"Decor", "Small meat sack", 2803, 50}, {"Decor", "Stack of magazines", 2855, 50}, {"Decor", "Scattered magazines", 2852, 50}, {"Decor", "Scattered books", 2854, 50}, {"Decor", "Wooden stairs", 3361, 50}, {"Decor", "Long concrete stairs", 14410, 50}, {"Decor", "Short concrete stairs", 14416, 50}, {"Decor", "Short stairs", 14877, 50}, {"Decor", "Big window", 19325, 100}, {"Decor", "Small window", 19466, 50}, {"Decor", "Breakable window", 1649, 75}, {"Decor", "Target #1", 2056, 50}, {"Decor", "Target #2", 2055, 50}, {"Decor", "Target #3", 2051, 50}, {"Decor", "Target #4", 2050, 50}, {"Decor", "Target #5", 2049, 50}, {"Decor", "Clothes pile #1", 2819, 50}, {"Decor", "Clothes pile #2", 2843, 50}, {"Decor", "Clothes pile #3", 2844, 50}, {"Decor", "Clothes pile #4", 2845, 50}, {"Decor", "Clothes pile #5", 2846, 50} }; enum entranceEnum { eName[32], eInterior, eWorld, eFreeze, Float:ePosX, Float:ePosY, Float:ePosZ, Float:ePosA, Float:eIntX, Float:eIntY, Float:eIntZ, Float:eIntA }; new const staticEntrances[][entranceEnum] = { {"Country General", 1, 1, false, 2034.2003, -1402.1976, 17.2951, 180.0000, -45.3173, 157.9171, 999.0613, 180.0000}, {"All Saints Hospital", 1, 2, false, 1172.5100, -1325.3057, 15.4045, 270.0000, -45.3173, 157.9171, 999.0613, 180.0000}, {"Mulholland Savings", 5, 3, true, 1465.1348, -1010.5063, 26.8438, 180.0000, 1667.3536, -995.3700, 683.6913, 0.0000}, {"City Hall", 3, 4, false, 1482.6517, -1771.6108, 18.7958, 0.0000, 390.1344, 173.7334, 1008.3828, 90.0000}, {"Police department", 2, 5, true, 1554.8918, -1675.6486, 16.1953, 90.0000, 1206.6467, -1314.2941, 796.7880, 270.0000}, {"Licensing department", 3, 6, false, 1219.2590, -1812.1093, 16.5938, 180.0000, -2029.7135, -119.2240, 1035.1719, 0.0000}, {"VIP lounge", 3, 7, false, 1015.6364, -1550.5270, 14.8594, 270.0000, -2634.8132, 1409.7212, 906.4647, 90.0000}, {"Drug den", 5, 8, false, 2166.1746, -1671.4641, 15.0737, 225.0000, 318.6025, 1114.9443, 1083.8828, 0.0000}, {"Crack house", 5, 9, false, 2351.9138, -1170.1725, 28.0507, 0.0000, 2352.3337, -1180.9257, 1027.9766, 90.0000}, {"Heisenberg's trailer", 2, 10, false, -65.0972, -1574.3820, 2.6107, 180.0000, 1.6362, -3.0563, 999.4284, 90.0000}, {"FBI headquarters", 1, 11, true, 330.6662, -1509.9915, 36.0391, 225.0000, -501.1844, 286.8678, 2001.0950, 0.0000}, {"Los Santos Casino", 5, 12, true, 1022.5460, -1121.6831, 23.8720, 180.0000, 1095.5776, 33.3495, 1000.6797, 180.0000} }; enum jobEnum { jobName[32], Float:jobX, Float:jobY, Float:jobZ }; new const jobLocations[][jobEnum] = { {"Pizzaman", 2104.7771, -1805.1772, 13.5547}, {"Courier", -77.3655, -1136.5300, 1.0781}, {"Fisherman", 393.2632, -2070.5837, 7.8359}, {"Bodyguard", 2227.4705, -1715.9694, 13.5302}, {"Weapons Dealer", 1366.1694, -1274.5873, 13.5469}, {"Mechanic", 2328.2659, -2314.9421, 13.5469}, {"Miner", 1262.5063, -1265.6266, 13.3809}, {"Street Sweeper", 2194.4561, -1973.1625, 13.5592}, {"Taxi Driver", 1748.1373, -1863.0981, 13.5755}, {"Drug Dealer", 2165.3611, -1673.0824, 15.0778}, {"Lawyer", 1381.0668, -1086.6857, 27.3906}, {"Detective", 1211.7496, -1319.7920, 796.7880} }; enum atmEnum { Float:atmX, Float:atmY, Float:atmZ, Float:atmA }; new const atmMachines[][atmEnum] = { {2228.394775, -1714.255126, 13.158315, 270.000000}, {1928.599975, -1779.941650, 13.136871, 90.000000}, {1493.294677, -1772.306640, 18.385747, 180.000000}, {1102.299438, -1438.380981, 15.396868, 90.000000}, {563.902526, -1293.948730, 16.858232, 180.000000}, {2233.269042, -1158.040527, 25.540679, 270.000000}, {827.125183, -1345.751220, 13.182147, 270.000000}, {827.125183, -1346.811157, 13.182147, 270.000000}, {1093.036621, 29.262479, 1000.309509, 0.000000}, {-14.377381, -180.600250, 1003.186889, 180.000000}, {9.334012, -31.044189, 1003.159179, 270.000000}, {-24.413511, -91.806381, 1003.126708, 180.000000}, {-21.125793, -140.438766, 1003.166564, 180.000000}, {-24.290849, -57.946674, 1003.176574, 180.000000} }; enum fireEnum { fireIndex, Float:fireX, Float:fireY, Float:fireZ, Float:fireA, }; new const randomFireSpawns[][fireEnum] = { {0, 1720.231079, -1740.936889, 11.432815, 180.922180}, {0, 1723.581298, -1740.882934, 11.432815, 180.922180}, {0, 1726.050537, -1740.842773, 11.432815, 180.922180}, {0, 1716.479858, -1740.926757, 11.432815, 180.922180}, {0, 1713.465332, -1740.676391, 11.432815, 180.922180}, {0, 1723.581298, -1740.882934, 13.742803, 180.922180}, {0, 1726.050537, -1740.842773, 14.072817, 180.922180}, {0, 1720.231079, -1740.936889, 14.142808, 180.922180}, {0, 1716.479858, -1740.926757, 14.642818, 180.922180}, {0, 1713.465332, -1740.676391, 14.992820, 180.922180}, {0, 1729.405151, -1742.339111, 11.432815, 180.922180}, {0, 1729.405883, -1742.379028, 14.632813, 180.922180}, {0, 1729.453002, -1745.278564, 11.432815, 180.922180}, {0, 1729.452514, -1745.258789, 14.632813, 180.922180}, {0, 1729.500610, -1748.218139, 11.432815, 180.922180}, {0, 1729.497314, -1748.038085, 14.632813, 180.922180}, {0, 1729.548095, -1751.127929, 11.432815, 180.922180}, {0, 1729.547485, -1751.098022, 14.632813, 180.922180}, {0, 1729.587524, -1753.567871, 11.432815, 180.922180}, {0, 1729.587280, -1753.588500, 14.632813, 180.922180}, {0, 1710.109741, -1740.329467, 11.432815, 180.922180}, {0, 1707.230224, -1740.376220, 11.432815, 180.922180}, {0, 1704.329956, -1740.422607, 11.432815, 180.922180}, {0, 1710.109741, -1740.329467, 14.922813, 180.922180}, {0, 1707.150390, -1740.377075, 14.922813, 180.922180}, {0, 1704.710327, -1740.416137, 14.922813, 180.922180}, {1, 1972.983886, -1923.633544, 11.286870, 358.727569}, {1, 1975.173583, -1923.682617, 11.286870, 358.727569}, {1, 1977.542724, -1923.735229, 11.286870, 358.727569}, {1, 1979.951782, -1923.788696, 11.286870, 358.727569}, {1, 1982.091552, -1923.836547, 11.286870, 358.727569}, {1, 1984.420532, -1923.887817, 11.286870, 358.727569}, {1, 1986.800292, -1923.941040, 11.286870, 358.727569}, {1, 1989.079589, -1923.991821, 11.286870, 358.727569}, {1, 1991.318847, -1924.041625, 11.286870, 358.727569}, {1, 1993.569335, -1924.091918, 11.286870, 358.727569}, {1, 1995.939086, -1924.143676, 11.286870, 358.727569}, {1, 1998.008422, -1924.189697, 11.286870, 358.727569}, {1, 1998.008422, -1924.189697, 14.286870, 358.727569}, {1, 1995.939086, -1924.143676, 14.286870, 358.727569}, {1, 1993.569335, -1924.091918, 14.286870, 358.727569}, {1, 1991.318847, -1924.041625, 14.286870, 358.727569}, {1, 1989.079589, -1923.991821, 14.286870, 358.727569}, {1, 1986.800292, -1923.941040, 14.286870, 358.727569}, {1, 1984.420532, -1923.887817, 14.286870, 358.727569}, {1, 1982.091552, -1923.836547, 14.286870, 358.727569}, {1, 1979.951782, -1923.788696, 14.286870, 358.727569}, {1, 1977.542724, -1923.735229, 14.286870, 358.727569}, {1, 1975.173583, -1923.682617, 14.286870, 358.727569}, {1, 1972.983886, -1923.633544, 14.286870, 358.727569}, {2, 2422.197753, -1963.760864, 11.329407, 270.000000}, {2, 2422.197753, -1965.961059, 11.329407, 270.000000}, {2, 2422.538085, -1968.141479, 11.329407, 270.000000}, {2, 2422.437988, -1970.161865, 11.329407, 270.000000}, {2, 2422.488037, -1972.322143, 11.329407, 270.000000}, {2, 2422.488037, -1974.422363, 11.329407, 270.000000}, {2, 2422.488037, -1976.602905, 11.329407, 270.000000}, {2, 2422.568115, -1978.533569, 11.329407, 270.000000}, {2, 2422.678222, -1980.704101, 11.329407, 270.000000}, {2, 2422.197753, -1963.760864, 13.829407, 270.000000}, {2, 2422.197753, -1965.961059, 13.829407, 270.000000}, {2, 2422.538085, -1968.141479, 13.829407, 270.000000}, {2, 2422.437988, -1970.161865, 13.829407, 270.000000}, {2, 2422.488037, -1972.322143, 13.829407, 270.000000}, {2, 2422.488037, -1974.422363, 13.829407, 270.000000}, {2, 2422.488037, -1976.602905, 13.829407, 270.000000}, {2, 2422.568115, -1978.533569, 13.829407, 270.000000}, {2, 2422.678222, -1980.704101, 13.829407, 270.000000}, {3, 855.264770, -1038.802124, 23.446907, 215.000000}, {3, 853.698852, -1040.191894, 23.446907, 215.000000}, {3, 851.837646, -1041.666137, 23.446907, 215.000000}, {3, 850.262207, -1042.989501, 23.446907, 215.000000}, {3, 848.620910, -1044.236816, 23.446907, 215.000000}, {3, 846.878112, -1045.530883, 23.446907, 215.000000}, {3, 844.986694, -1046.648193, 23.446907, 215.000000}, {3, 843.184570, -1048.032226, 23.446907, 215.000000}, {3, 841.548889, -1049.287597, 23.446907, 215.000000}, {3, 839.740478, -1050.627563, 23.446907, 215.000000}, {4, 512.298522, -1522.487792, 12.252450, 90.000000}, {4, 512.298522, -1520.456787, 12.252450, 90.000000}, {4, 512.298522, -1518.425903, 12.252450, 90.000000}, {4, 512.298522, -1516.165405, 12.252450, 90.000000}, {4, 512.298522, -1514.245239, 12.252450, 90.000000}, {4, 512.068359, -1511.944091, 12.252450, 90.000000}, {4, 512.068359, -1509.814208, 12.252450, 90.000000}, {4, 512.298522, -1507.425292, 12.252450, 90.000000}, {4, 512.298522, -1505.304931, 12.252450, 90.000000}, {4, 512.298522, -1503.384521, 12.252450, 90.000000}, {4, 512.298522, -1501.624389, 12.252450, 90.000000}, {4, 512.298522, -1499.298339, 12.252450, 90.000000}, {4, 512.298522, -1522.487792, 13.752450, 90.000000}, {4, 512.298522, -1520.456787, 13.752450, 90.000000}, {4, 512.298522, -1518.425903, 13.752450, 90.000000}, {4, 512.298522, -1516.165405, 13.752450, 90.000000}, {4, 512.298522, -1514.245239, 13.752450, 90.000000}, {4, 512.068359, -1511.944091, 13.752450, 90.000000}, {4, 512.068359, -1509.814208, 13.752450, 90.000000}, {4, 512.298522, -1507.425292, 13.752450, 90.000000}, {4, 512.298522, -1505.304931, 13.752450, 90.000000}, {4, 512.298522, -1503.384521, 13.752450, 90.000000}, {4, 512.298522, -1501.624389, 13.752450, 90.000000}, {4, 512.298522, -1499.298339, 13.752450, 90.000000}, {5, 2012.939208, -1282.796264, 21.760301, 179.226959}, {5, 2010.718627, -1282.766845, 21.760301, 179.226959}, {5, 2008.219238, -1282.732910, 21.760301, 179.226959}, {5, 2005.989379, -1282.702880, 21.760301, 179.226959}, {5, 2003.889770, -1282.674316, 21.760301, 179.226959}, {5, 2001.719848, -1282.645507, 21.760301, 179.226959}, {5, 1999.509765, -1282.615966, 21.760301, 179.226959}, {5, 1997.539794, -1282.589599, 21.760301, 179.226959}, {5, 1995.449462, -1282.561889, 21.760301, 179.226959}, {5, 1993.546508, -1282.786621, 21.760301, 179.226959}, {5, 1991.387695, -1282.647827, 21.760301, 179.226959}, {5, 1989.187133, -1282.638427, 21.760301, 179.226959}, {5, 1987.196044, -1282.701660, 21.760301, 179.226959}, {5, 1985.255126, -1282.785278, 21.760301, 179.226959}, {5, 1983.203491, -1282.928100, 21.760301, 179.226959}, {5, 1981.183105, -1282.901489, 21.760301, 179.226959}, {5, 1979.322875, -1282.876708, 21.760301, 179.226959}, {5, 1977.321655, -1282.920288, 21.760301, 179.226959}, {5, 1975.070434, -1282.950805, 21.760301, 179.226959}, {5, 1973.359741, -1282.997802, 21.760301, 179.226959}, {6, 2520.653076, -1268.459106, 32.786579, 268.202911}, {6, 2520.595947, -1270.278076, 32.786579, 268.202911}, {6, 2520.631347, -1272.040527, 32.786579, 268.202911}, {6, 2520.779785, -1273.676757, 32.786579, 268.202911}, {6, 2520.882080, -1275.182128, 32.786579, 268.202911}, {6, 2520.826904, -1276.951538, 32.786579, 268.202911}, {6, 2520.767822, -1278.821655, 32.786579, 268.202911}, {6, 2520.811035, -1280.303833, 32.786579, 268.202911}, {6, 2520.782958, -1281.844604, 32.786579, 268.202911}, {6, 2520.734863, -1283.715209, 32.786579, 268.202911}, {6, 2521.593261, -1265.743408, 32.543724, 178.275573}, {6, 2520.653076, -1268.459106, 34.286579, 268.202911}, {6, 2520.595947, -1270.278076, 34.286579, 268.202911}, {6, 2520.631347, -1272.040527, 34.286579, 268.202911}, {6, 2520.779785, -1273.676757, 34.286579, 268.202911}, {6, 2520.882080, -1275.182128, 34.286579, 268.202911}, {6, 2520.826904, -1276.951538, 34.286579, 268.202911}, {6, 2520.767822, -1278.821655, 34.286579, 268.202911}, {6, 2520.811035, -1280.303833, 34.286579, 268.202911}, {6, 2520.782958, -1281.844604, 34.286579, 268.202911}, {6, 2520.734863, -1283.715209, 34.286579, 268.202911}, {6, 2521.593261, -1265.743408, 34.043724, 178.275573}, {7, 2420.582031, -1510.028320, 22.002197, 87.980613}, {7, 2420.656494, -1507.899536, 22.002197, 87.980613}, {7, 2420.729248, -1505.820434, 22.002197, 87.980613}, {7, 2420.797607, -1503.861328, 22.002197, 87.980613}, {7, 2420.706298, -1501.856079, 22.002197, 87.980613}, {7, 2420.772460, -1499.967163, 22.002197, 87.980613}, {7, 2420.558349, -1498.327880, 22.002197, 87.980613}, {7, 2420.629638, -1496.288818, 22.002197, 87.980613}, {7, 2420.637451, -1494.617797, 22.002197, 87.980613}, {7, 2418.689453, -1511.844482, 21.619995, 0.000000}, {7, 2416.989501, -1511.844482, 21.619995, 0.000000}, {7, 2415.138427, -1511.844482, 21.619995, 0.000000}, {7, 2413.137939, -1511.844482, 21.619995, 0.000000}, {7, 2411.336914, -1511.844482, 21.619995, 0.000000}, {7, 2409.695800, -1511.844482, 21.619995, 0.000000}, {7, 2408.024169, -1511.844482, 21.619995, 0.000000}, {7, 2406.803466, -1511.844482, 21.619995, 0.000000}, {7, 2405.712890, -1511.844482, 21.619995, 0.000000}, {8, 1769.756469, -1721.183105, 11.426870, 0.000000}, {8, 1771.825805, -1721.219238, 11.426870, 0.000000}, {8, 1774.065917, -1721.219238, 11.426870, 0.000000}, {8, 1776.336303, -1721.219238, 11.426870, 0.000000}, {8, 1778.396972, -1721.219238, 11.426870, 0.000000}, {8, 1780.507202, -1721.219238, 11.426870, 0.000000}, {8, 1782.597290, -1721.219238, 11.426870, 0.000000}, {8, 1784.728027, -1721.219238, 11.426870, 0.000000}, {8, 1786.797851, -1721.219238, 11.426870, 0.000000}, {8, 1788.677001, -1721.219238, 11.426870, 0.000000}, {8, 1790.987304, -1721.219238, 11.426870, 0.000000}, {8, 1792.916625, -1721.219238, 11.426870, 0.000000}, {8, 1794.967285, -1721.219238, 11.426870, 0.000000}, {8, 1796.447021, -1721.219238, 11.426870, 0.000000}, {8, 1798.347534, -1721.219238, 11.426870, 0.000000}, {9, 2723.256591, -2020.687255, 11.477196, 0.000000}, {9, 2723.196289, -2022.766357, 11.477196, 0.000000}, {9, 2723.316894, -2024.821044, 11.477196, 0.000000}, {9, 2723.316894, -2026.461547, 11.477196, 0.000000}, {9, 2723.316894, -2028.431030, 11.477196, 0.000000}, {9, 2723.316894, -2030.141479, 11.477196, 0.000000}, {9, 2723.316894, -2031.961547, 11.477196, 0.000000}, {9, 2723.316894, -2033.631713, 11.477196, 0.000000}, {9, 2723.316894, -2035.612060, 11.477196, 0.000000}, {9, 2723.316894, -2037.552978, 11.477196, 0.000000}, {9, 2723.316894, -2038.973632, 11.477196, 0.000000} }; new const Float:minerPositions[][] = { {1276.6024, -1252.0608, 13.8471}, {1264.3618, -1240.3776, 16.0091}, {1255.6558, -1242.5010, 17.6045}, {1255.5265, -1251.3208, 13.8461} }; new const Float:paintballSpawns[][] = { {1291.2968, -0.1334, 1001.0228, 180.0000}, {1304.6259, -28.7442, 1001.0326, 90.0000}, {1260.6687, -0.6802, 1001.0234, 180.0000}, {1251.9862, -26.3548, 1001.0340, 270.0000}, {1278.8584, -44.1545, 1001.0236, 0.0000}, {1256.5944, -61.9047, 1002.4999, 0.0000}, {1297.3204, -61.4144, 1002.4980, 0.0000} }; new const Float:drivingTestCPs[][] = { {1257.5657, -1849.3583, 13.0332}, {1128.2242, -1849.8821, 13.0332}, {1063.3004, -1839.3625, 13.0332}, {987.0623, -1784.1073, 14.0711}, {920.1835, -1758.3966, 13.3804}, {919.8111, -1656.9091, 13.3828}, {919.9860, -1560.1482, 13.3828}, {930.4203, -1492.2578, 13.3754}, {980.7775, -1492.2339, 13.3828}, {1054.2943, -1491.7645, 13.3828}, {1065.0643, -1416.5730, 13.3828}, {1115.0032, -1408.2512, 13.3828}, {1178.4860, -1408.3331, 13.3828}, {1268.5947, -1408.8792, 13.3828}, {1339.5221, -1416.9095, 13.3828}, {1320.8999, -1494.4954, 13.3828}, {1295.2820, -1573.4578, 13.3828}, {1294.6698, -1666.3483, 13.3828}, {1284.0913, -1709.6714, 13.3828}, {1212.7543, -1709.5531, 13.3828}, {1172.5828, -1724.7937, 13.6049}, {1172.4504, -1783.9113, 13.3984}, {1179.8055, -1855.1219, 13.3984}, {1213.0060, -1842.1384, 13.3984} }; new const Float:cellPositions[][] = { {1205.69995117, -1328.09997559, 797.00000000, 1205.699951, -1326.500000, 797.000000}, {1205.69995117, -1331.30004883, 797.00000000, 1205.699951, -1329.700073, 797.000000}, {1205.69995117, -1331.30004883, 800.50000000, 1205.699951, -1329.700073, 800.500000}, {1205.69995117, -1328.09997559, 800.50000000, 1205.699951, -1326.500000, 800.500000}, {1215.30004883, -1328.09997559, 797.00000000, 1215.300048, -1326.500000, 797.000000}, {1215.30004883, -1331.30004883, 797.00000000, 1215.300048, -1329.700073, 797.000000}, {1215.30004883, -1331.30004883, 800.50000000, 1215.300048, -1329.700073, 800.500000}, {1215.30004883, -1328.09997559, 800.50000000, 1215.300048, -1326.500000, 800.500000}, {1215.30004883, -1334.50000000, 797.00000000, 1215.300048, -1332.900024, 797.000000}, {1215.29980469, -1337.69921875, 797.00000000, 1215.299804, -1336.099243, 797.000000}, {1215.30004883, -1340.90002441, 797.00000000, 1215.300048, -1339.300048, 797.000000}, {1215.30004883, -1340.90002441, 800.50000000, 1215.300048, -1339.300048, 800.500000}, {1215.30004883, -1337.69995117, 800.50000000, 1215.300048, -1336.099975, 800.500000}, {1215.30004883, -1334.50000000, 800.50000000, 1215.300048, -1332.900024, 800.500000}, {1205.69995117, -1334.50000000, 800.50000000, 1205.699951, -1332.900024, 800.500000}, {1205.69995117, -1337.69995117, 800.50000000, 1205.699951, -1336.099975, 800.500000}, {1205.69995117, -1340.90002441, 800.50000000, 1205.699951, -1339.300048, 800.500000}, {1205.69995117, -1334.50000000, 797.00000000, 1205.699951, -1332.900024, 797.000000}, {1205.69995117, -1337.69995117, 797.00000000, 1205.699951, -1336.099975, 797.000000}, {1205.69995117, -1340.90002441, 797.00000000, 1205.699951, -1339.300048, 797.000000}, {1215.30004883, -1344.09997559, 800.50000000, 1215.300048, -1342.500000, 800.500000}, {1215.30004883, -1344.09997559, 797.00000000, 1215.300048, -1342.500000, 797.000000}, {1205.69995117, -1344.09997559, 800.50000000, 1205.699951, -1342.500000, 800.500000}, {1205.69995117, -1344.09997559, 797.00000000, 1205.699951, -1342.500000, 797.000000} }; new const Float:cellSpawns[][] = { {1203.1132, -1327.7273, 796.7505, 270.0000}, {1203.1155, -1327.7273, 800.2859, 270.0000}, {1203.3879, -1330.7003, 796.7505, 270.0000}, {1203.6357, -1330.7050, 800.2859, 270.0000}, {1203.2362, -1333.9489, 796.7505, 270.0000}, {1203.4561, -1333.9528, 800.2859, 270.0000}, {1203.6705, -1337.3608, 796.7505, 270.0000}, {1203.8181, -1337.3634, 800.2859, 270.0000}, {1203.5663, -1340.5317, 796.7505, 270.0000}, {1203.6039, -1340.5325, 800.2859, 270.0000}, {1203.6083, -1343.6737, 796.7505, 270.0000}, {1204.0961, -1343.5482, 800.2859, 270.0000}, {1217.6519, -1344.3740, 796.7456, 90.0000}, {1217.5179, -1344.3721, 800.2859, 90.0000}, {1217.6549, -1341.3425, 796.7456, 90.0000}, {1217.5161, -1341.4125, 800.2859, 90.0000}, {1217.5902, -1338.0251, 796.7456, 90.0000}, {1217.5662, -1338.0247, 800.2859, 90.0000}, {1217.5626, -1334.7852, 796.7456, 90.0000}, {1217.5070, -1334.7842, 800.2859, 90.0000}, {1217.6984, -1331.5767, 796.7456, 90.0000}, {1217.4537, -1331.5715, 800.2859, 90.0000}, {1217.5966, -1328.5653, 796.7456, 90.0000}, {1217.4222, -1328.5616, 800.2859, 90.0000} }; new const Float:arrestPoints[][] = { {1229.3544, -1311.8627, 796.7859}, // PD interior {1528.5728, -1677.8324, 5.8906}, // PD garage {1564.6931, -1662.1338, 28.3956}, // PD roof {310.3752, -1515.3691, 24.9219} // FBI garage }; new const factionTypes[][] = { {"Civilian"}, {"Law enforcement"}, {"Medical & fire"}, {"News agency"}, {"Government"}, {"Hitman agency"}, {"Federal police"} }; new const deployableItems[][] = { {"Spikestrip"}, {"Traffic cone"}, {"Roadblock"}, {"Barrel"}, {"Smoke flare"} }; new const clothingTypes[][] = { {"Glasses"}, {"Bandanas & masks"}, {"Hats & caps"}, {"Misc clothing"} }; enum clothingEnum { clothingType[20], clothingName[32], clothingModel, clothingBone, clothingPrice }; new const clothingArray[][clothingEnum] = { {"Glasses", "Red tinted shades", 19006, 2, 500}, {"Glasses", "Brown tinted shades", 19007, 2, 500}, {"Glasses", "Green tinted shades", 19008, 2, 500}, {"Glasses", "Blue tinted shades", 19009, 2, 500}, {"Glasses", "Pink tinted shades", 19010, 2, 500}, {"Glasses", "Spiralled shades", 19011, 2, 500}, {"Glasses", "Black tinted shades", 19012, 2, 500}, {"Glasses", "Gag glasses", 19013, 2, 500}, {"Glasses", "Checkered shades", 19014, 2, 500}, {"Glasses", "Reading glasses", 19015, 2, 500}, {"Glasses", "X-Ray glasses", 19016, 2, 500}, {"Glasses", "Plastic black shades", 19017, 2, 500}, {"Glasses", "Plastic orange shades", 19018, 2, 500}, {"Glasses", "Plastic red shades", 19019, 2, 500}, {"Glasses", "Plastic blue shades", 19020, 2, 500}, {"Glasses", "Plastic green shades", 19021, 2, 500}, {"Glasses", "Clear sunglasses", 19022, 2, 500}, {"Glasses", "Blue sunglasses", 19023, 2, 500}, {"Glasses", "Purple sunglasses", 19024, 2, 500}, {"Glasses", "Pink sunglasses", 19025, 2, 500}, {"Glasses", "Red sunglasses", 19026, 2, 500}, {"Glasses", "Brown sunglasses", 19027, 2, 500}, {"Glasses", "Yellow sunglasses", 19028, 2, 500}, {"Glasses", "Green sunglasses", 19029, 2, 500}, {"Glasses", "Plain brown shades", 19030, 2, 500}, {"Glasses", "Plain yellow shades", 19031, 2, 500}, {"Glasses", "Plain red shades", 19032, 2, 500}, {"Glasses", "Plain black shades", 19033, 2, 500}, {"Glasses", "Checkered glasses", 19034, 2, 500}, {"Glasses", "Wavy glasses", 19035, 2, 500}, {"Bandanas & masks", "Balaclava", 19801, 2, 375}, {"Bandanas & masks", "Dark blue bandana", 18891, 2, 375}, {"Bandanas & masks", "Red bandana", 18892, 2, 375}, {"Bandanas & masks", "Red & white bandana", 18893, 2, 375}, {"Bandanas & masks", "Orange star bandana", 18894, 2, 375}, {"Bandanas & masks", "Skull bandana", 18895, 2, 375}, {"Bandanas & masks", "Black bandana", 18896, 2, 375}, {"Bandanas & masks", "Blue bandana", 18897, 2, 375}, {"Bandanas & masks", "Green bandana", 18898, 2, 375}, {"Bandanas & masks", "Pink bandana", 18899, 2, 375}, {"Bandanas & masks", "Hippie bandana", 18900, 2, 375}, {"Bandanas & masks", "Tiger bandana", 18901, 2, 375}, {"Bandanas & masks", "Yellow bandana", 18902, 2, 375}, {"Bandanas & masks", "Purple bandana", 18903, 2, 375}, {"Bandanas & masks", "Cool blue bandana", 18904, 2, 375}, {"Bandanas & masks", "Brown bandana", 18905, 2, 375}, {"Bandanas & masks", "Skull bandana mask", 18911, 2, 375}, {"Bandanas & masks", "Black bandana mask", 18912, 2, 375}, {"Bandanas & masks", "Grove bandana mask", 18913, 2, 375}, {"Bandanas & masks", "Camo bandana mask", 18914, 2, 375}, {"Bandanas & masks", "Hippie bandana mask", 18915, 2, 375}, {"Bandanas & masks", "Yellow bandana mask", 18916, 2, 375}, {"Bandanas & masks", "Blue bandana mask", 18917, 2, 375}, {"Bandanas & masks", "Green bandana mask", 18918, 2, 375}, {"Bandanas & masks", "White bandana mask", 18919, 2, 375}, {"Bandanas & masks", "Flower bandana mask", 18920, 2, 375}, {"Bandanas & masks", "White hockey mask", 19036, 2, 375}, {"Bandanas & masks", "Red hockey mask", 19037, 2, 375}, {"Bandanas & masks", "Green hockey mask", 19038, 2, 375}, {"Bandanas & masks", "Sexy mask", 19557, 2, 375}, {"Bandanas & masks", "Devil mask", 11704, 2, 375}, {"Bandanas & masks", "Gas mask", 19472, 2, 375}, {"Bandanas & masks", "Zorro mask", 18974, 2, 375}, {"Bandanas & masks", "Gimp mask", 19163, 2, 375}, {"Hats & caps", "Santa hat", 19064, 2, 240}, {"Hats & caps", "Dude hat", 19160, 2, 240}, {"Hats & caps", "Top hat", 19352, 2, 240}, {"Hats & caps", "Witch hat", 19528, 2, 240}, {"Hats & caps", "Yellow fire hat", 19330, 2, 240}, {"Hats & caps", "Black fire hat", 19331, 2, 240}, {"Hats & caps", "Black beret", 18921, 2, 240}, {"Hats & caps", "Brown beret", 18922, 2, 240}, {"Hats & caps", "Blue beret", 18923, 2, 240}, {"Hats & caps", "Camo beret", 18924, 2, 240}, {"Hats & caps", "Red beret", 18925, 2, 240}, {"Hats & caps", "Camo cap", 18926, 2, 240}, {"Hats & caps", "Wave cap", 18927, 2, 240}, {"Hats & caps", "Hippy cap", 18928, 2, 240}, {"Hats & caps", "Green cap", 18929, 2, 240}, {"Hats & caps", "Red cap", 18930, 2, 240}, {"Hats & caps", "Blue cap", 18931, 2, 240}, {"Hats & caps", "Orange cap", 18932, 2, 240}, {"Hats & caps", "White cap", 18933, 2, 240}, {"Hats & caps", "Plain pink cap", 18934, 2, 240}, {"Hats & caps", "Plain yellow cap", 18935, 2, 240}, {"Hats & caps", "Blue back cap", 18939, 2, 240}, {"Hats & caps", "Wave back cap", 18940, 2, 240}, {"Hats & caps", "Black back cap", 18941, 2, 240}, {"Hats & caps", "White back cap", 18942, 2, 240}, {"Hats & caps", "Green back cap", 18943, 2, 240}, {"Hats & caps", "Red boater hat", 18944, 2, 240}, {"Hats & caps", "Green boater hat", 18945, 2, 240}, {"Hats & caps", "Striped boater hat", 18946, 2, 240}, {"Hats & caps", "Black bowler hat", 18947, 2, 240}, {"Hats & caps", "White bowler hat", 19488, 2, 240}, {"Hats & caps", "Blue bowler hat", 18948, 2, 240}, {"Hats & caps", "Green bowler hat", 18949, 2, 240}, {"Hats & caps", "Red bowler hat", 18950, 2, 240}, {"Hats & caps", "Yellow bowler hat", 18951, 2, 240}, {"Hats & caps", "Black knit cap", 18953, 2, 240}, {"Hats & caps", "White knit cap", 18954, 2, 240}, {"Hats & caps", "Hippie hat", 18960, 2, 240}, {"Hats & caps", "Born 2 truck hat", 18961, 2, 240}, {"Hats & caps", "Brown cowboy hat", 19098, 2, 240}, {"Hats & caps", "Black cowboy hat", 19096, 2, 240}, {"Hats & caps", "Skully cap", 18964, 2, 240}, {"Hats & caps", "Black bucket hat", 18967, 2, 240}, {"Hats & caps", "Plaid bucket hat", 18968, 2, 240}, {"Hats & caps", "Zig-Zag bucket hat", 18969, 2, 240}, {"Hats & caps", "Camo bucket hat", 19106, 2, 240}, {"Hats & caps", "Hippy hat", 19113, 2, 240}, {"Hats & caps", "Don't shoot me hat", 19114, 2, 240}, {"Hats & caps", "Skull hat", 19115, 2, 240}, {"Hats & caps", "Tiger hat", 18970, 2, 240}, {"Hats & caps", "Hard hat", 18638, 2, 240}, {"Hats & caps", "Straw hat", 19553, 2, 240}, {"Hats & caps", "Pizza hat", 19558, 2, 240}, {"Hats & caps", "Beanie hat", 19554, 2, 240}, {"Hats & caps", "Checkered fedora", 18971, 2, 240}, {"Hats & caps", "Orange fedora", 18972, 2, 240}, {"Hats & caps", "Yellow fedora", 18973, 2, 240}, {"Hats & caps", "Camoflauge helmet", 19101, 2, 240}, {"Hats & caps", "Black helmet", 19116, 2, 240}, {"Hats & caps", "Red helmet", 19117, 2, 240}, {"Hats & caps", "Green helmet", 19118, 2, 240}, {"Hats & caps", "Blue helmet", 19119, 2, 240}, {"Hats & caps", "Yellow helmet", 19120, 2, 240}, {"Hats & caps", "Boxing helmet", 18952, 2, 240}, {"Hats & caps", "Motorcycle helmet", 18645, 2, 240}, {"Misc clothing", "Gold watch", 19039, 6, 500}, {"Misc clothing", "Silver watch", 19040, 6, 500}, {"Misc clothing", "Bronze watch", 19041, 6, 500}, {"Misc clothing", "Yellow watch", 19042, 6, 500}, {"Misc clothing", "White watch", 19043, 6, 500}, {"Misc clothing", "Purple watch", 19044, 6, 500}, {"Misc clothing", "Pink watch", 19045, 6, 500}, {"Misc clothing", "Green watch", 19046, 6, 500}, {"Misc clothing", "Blue watch", 19047, 6, 500}, {"Misc clothing", "Camo watch", 19053, 6, 500}, {"Misc clothing", "White headphones", 19421, 2, 500}, {"Misc clothing", "Black headphones", 19422, 2, 500}, {"Misc clothing", "Orange headphones", 19423, 2, 500}, {"Misc clothing", "Blue headphones", 19424, 2, 500}, {"Misc clothing", "Red clown hair", 19274, 2, 500}, {"Misc clothing", "Grey clown hair", 19518, 2, 500}, {"Misc clothing", "Black hair", 19077, 2, 500}, {"Misc clothing", "Grey hair", 19517, 2, 500}, {"Misc clothing", "Bass guitar", 19317, 1, 500}, {"Misc clothing", "White guitar", 19318, 1, 500}, {"Misc clothing", "Black guitar", 19319, 1, 500}, {"Misc clothing", "Pilot hat", 19520, 2, 500}, {"Misc clothing", "Bag of money", 1550, 1, 500}, {"Misc clothing", "Shop basket", 19592, 6, 500}, {"Misc clothing", "Oil can", 19621, 6, 500}, {"Misc clothing", "Broom", 19622, 1, 500}, {"Misc clothing", "Camera", 19623, 6, 500}, {"Misc clothing", "Briefcase", 19624, 6, 500}, {"Misc clothing", "Cigarette", 19625, 2, 500}, {"Misc clothing", "Spade", 19626, 1, 500}, {"Misc clothing", "Left boxing glove", 19555, 5, 500}, {"Misc clothing", "Right boxing glove", 19556, 6, 500}, {"Misc clothing", "Scarf", 19469, 2, 500}, {"Misc clothing", "Eye patch", 19085, 2, 500}, {"Misc clothing", "Hiker backpack", 19559, 1, 500}, {"Misc clothing", "Construction vest", 19904, 1, 500}, {"Misc clothing", "Police radio", 19942, 1, 500}, {"Misc clothing", "Bodybag", 19944, 1, 500}, {"Misc clothing", "Sports bag", 11745, 1, 500}, {"Misc clothing", "Holster", 19773, 8, 500}, {"Misc clothing", "Fedora", 18639, 2, 500}, {"Misc clothing", "Afro", 18640, 2, 500}, {"Misc clothing", "Flashlight", 18641, 6, 500}, {"Misc clothing", "Hammer", 18635, 6, 500}, {"Misc clothing", "Wrench", 18633, 2, 500} }; enum carEnum { carCategory[16], carModel, carPrice }; new const vehicleArray[][carEnum] = { {"Bikes", 481, 5000}, {"Bikes", 509, 5000}, {"Bikes", 510, 10000}, {"Bikes", 462, 15000}, {"Bikes", 471, 17500}, {"Bikes", 448, 20000}, {"Bikes", 468, 30000}, {"Bikes", 586, 37500}, {"Bikes", 463, 50000}, {"Bikes", 521, 75000}, {"Bikes", 461, 80000}, {"Saloons", 549, 23000}, {"Saloons", 542, 24500}, {"Saloons", 546, 27500}, {"Saloons", 517, 29000}, {"Saloons", 419, 30000}, {"Saloons", 466, 32500}, {"Saloons", 467, 33000}, {"Saloons", 475, 34500}, {"Saloons", 492, 37500}, {"Saloons", 445, 42500}, {"Saloons", 529, 45000}, {"Saloons", 540, 47500}, {"Saloons", 550, 52500}, {"Saloons", 421, 55000}, {"Saloons", 551, 65000}, {"Saloons", 547, 70000}, {"Saloons", 426, 87500}, {"Saloons", 409, 90000}, {"Saloons", 580, 125000}, {"Off-Road", 500, 57500}, {"Off-Road", 400, 65000}, {"Off-Road", 489, 67500}, {"Off-Road", 495, 75000}, {"Off-Road", 579, 80000}, {"Station wagons", 418, 27500}, {"Station wagons", 404, 35000}, {"Station wagons", 479, 37500}, {"Station wagons", 458, 40000}, {"Station wagons", 561, 55000}, {"Sports cars", 496, 40000}, {"Sports cars", 402, 80000}, {"Sports cars", 477, 50000}, {"Sports cars", 565, 55000}, {"Sports cars", 589, 60000}, {"Sports cars", 558, 65000}, {"Sports cars", 559, 70000}, {"Sports cars", 587, 72500}, {"Sports cars", 562, 75000}, {"Sports cars", 603, 80000}, {"Sports cars", 494, 85000}, {"Sports cars", 560, 100000}, {"Sports cars", 429, 125000}, {"Sports cars", 541, 225000}, {"Sports cars", 415, 275000}, {"Sports cars", 451, 375000}, {"Sports cars", 411, 400000}, {"Lowriders", 412, 35000}, {"Lowriders", 576, 40000}, {"Lowriders", 534, 47500}, {"Lowriders", 566, 50000}, {"Lowriders", 535, 52500}, {"Lowriders", 536, 57500}, {"Lowriders", 567, 60000}, {"Lowriders", 575, 75000}, {"Industrial", 478, 20000}, {"Industrial", 543, 27500}, {"Industrial", 600, 30000}, {"Industrial", 422, 35000}, {"Industrial", 413, 40000}, {"Industrial", 440, 45000}, {"Industrial", 525, 57500}, {"Industrial", 554, 62500}, {"Industrial", 482, 65000}, {"Industrial", 552, 70000}, {"Industrial", 414, 75000}, {"Industrial", 498, 80000}, {"Industrial", 578, 105000}, {"Public service", 420, 30000}, {"Public service", 438, 32500}, {"Public service", 437, 75000}, {"Public service", 431, 75000} }; enum bizInts { intName[32], intID, Float:intX, Float:intY, Float:intZ, Float:intA }; new const bizInteriorArray[][bizInts] = { {"24/7 (version 1)", 17, -25.9733, -187.8952, 1003.5468, 0.0000}, {"24/7 (version 2)", 10, 6.0159, -31.0345, 1003.5493, 0.0000}, {"24/7 (version 3)", 18, -30.9967, -91.4492, 1003.5468, 0.0000}, {"24/7 (version 4)", 16, -25.9416, -140.6656, 1003.5468, 0.0000}, {"24/7 (version 5)", 4, -27.3069, -30.8341, 1003.5573, 0.0000}, {"24/7 (version 6)", 6, -27.4368, -57.4361, 1003.5468, 0.0000}, {"Ammunation (version 1)", 7, 315.7398, -143.1958, 999.6016, 0.0000}, {"Ammunation (version 2)", 1, 285.3190, -41.1576, 1001.5156, 0.0000}, {"Ammunation (version 3)", 4, 285.7825, -85.9860, 1001.5228, 0.0000}, {"Ammunation (version 4)", 6, 296.7723, -111.6399, 1001.5156, 0.0000}, {"Ammunation (version 5)", 6, 316.2890, -169.7619, 999.6010, 0.0000}, {"Binco", 15, 207.6329, -110.7673, 1005.1328, 0.0000}, {"Pro-Laps", 3, 206.9459, -139.5319, 1003.5078, 0.0000}, {"Didier Sachs", 14, 204.2969, -168.3488, 1000.5233, 0.0000}, {"Victim", 5, 226.7738, -8.2257, 1002.2108, 90.0000}, {"Zip", 18, 161.3670, -96.4953, 1001.8046, 0.0000}, {"SubUrban", 1, 203.7149, -50.2200, 1001.8046, 0.0000}, {"Betting (version 1)", 3, 834.1848, 7.3453, 1004.1870, 90.0000}, {"Betting (version 2)", 1, -2170.3428, 640.7771, 1052.3817, 0.0000}, {"Donut Shop", 17, 377.0733, -193.0574, 1000.6400, 0.0000}, {"Burger Shot", 10, 363.1346, -74.8441, 1001.5078, 315.0000}, {"Pizza Stack", 5, 372.3019, -133.1221, 1001.4921, 0.0000}, {"Cluckin' Bell", 9, 364.8536, -11.1400, 1001.8516, 0.0000}, {"Marco's Bistro", 1, -795.0334, 489.8574, 1376.1953, 0.0000}, {"Cafeteria", 4, 459.7685, -88.6637, 999.5547, 90.0000}, {"Barber Shop", 3, 418.5545, -83.9392, 1001.8046, 0.0000}, {"Tattoo Shop", 3, -204.4362, -43.8119, 1002.2733, 0.0000}, {"Ganton Gym", 5, 772.2800, -4.7154, 1000.7288, 0.0000}, {"Las Venturas Gym", 7, 773.8508, -78.3952, 1000.6621, 0.0000}, {"San Fierro Gym", 6, 774.1206, -49.9538, 1000.5858, 0.0000}, {"Sex Shop", 3, -100.3628, -24.4456, 1000.7188, 0.0000}, {"RC Shop", 6, -2240.3610, 128.2816, 1035.4210, 270.0000}, {"Four Dragons Casino", 10, 2018.2132, 1017.7788, 996.8750, 90.0000}, {"Caligulas Casino", 1, 2234.0485, 1714.1568, 1012.3596, 180.0000}, {"Red Sands Casino", 12, 1133.1075, -15.3114, 1000.6796, 0.0000}, {"Alhambra", 17, 493.3728, -23.9953, 1000.6796, 0.0000}, {"Pig Pen", 2, 1204.7922, -13.2587, 1000.9218, 0.0000}, {"Big Spread Ranch", 3, 1212.1400, -26.3005, 1000.9531, 180.0000}, {"Ten Green Bottles", 11, 501.9559, -67.9867, 998.7578, 180.0000}, {"Lil' Probe Inn", 18, -228.7570, 1401.2421, 27.7656, 270.0000}, {"Warehouse", 18, 1307.0178, 4.1193, 1001.0289, 90.0000} }; enum intEnum { intName[32], intID, Float:intX, Float:intY, Float:intZ, Float:intA } new const interiorArray[][intEnum] = { {"24/7 (version 1)", 17, -25.7220, -187.8215, 1003.5468, 5.0760}, {"24/7 (version 2)", 10, 6.0854, -28.8966, 1003.5493, 5.0363}, {"24/7 (version 3)", 18, -30.9874, -89.6806, 1003.5468, 359.8399}, {"24/7 (version 4)", 16, -26.1856, -140.9163, 1003.5468, 2.9086}, {"24/7 (version 5)", 4, -27.8439, -26.6737, 1003.5573, 184.3117}, {"24/7 (version 6)", 6, -26.8339, -55.5844, 1003.5468, 3.9528}, {"8-Track Stadium", 7, -1403.0114, -250.4526, 1043.5340, 355.8576}, {"Abandoned AC Tower", 10, 419.8934, 2537.1154, 10.0000, 67.6537}, {"Ammunation (version 1)", 7, 315.2438, -140.8858, 999.6016, 7.4225}, {"Ammunation (version 2)", 1, 285.8359, -39.0166, 1001.5156, 0.7529}, {"Ammunation (version 3)", 4, 291.7626, -80.1305, 1001.5156, 290.2195}, {"Ammunation (version 4)", 6, 297.1440, -109.8702, 1001.5156, 20.2254}, {"Ammunation (version 5)", 6, 316.5025, -167.6271, 999.5938, 10.3030}, {"Andromada", 9, 315.4544, 976.5972, 1960.8509, 359.6368}, {"Angel Pine Trailer", 2, 1.1851, -3.2386, 999.4284, 87.5718}, {"Area 69", 0, 215.1515, 1874.0577, 13.1406, 177.5538}, {"Atrium", 18, 1727.2851, -1642.9449, 20.2254, 172.4192}, {"B Dup's Apartment", 3, 1527.0467, -12.0235, 1002.0971, 350.0013}, {"B Dup's Crack Palace", 2, 1523.5096, -47.8209, 1002.2697, 262.7037}, {"Bar", 11, 501.9577, -70.5646, 998.7578, 171.5706}, {"Barbara's Love nest", 5, 322.5014, 303.6906, 999.1483, 8.1745}, {"Barber Shop (version 1)", 3, 418.4666, -80.4595, 1001.8046, 343.2358}, {"Barber Shop (version 2)", 12, 411.9707, -51.9216, 1001.8983, 173.3448}, {"Barber Shop (version 3)", 2, 414.2987, -18.8043, 1001.8046, 41.4263}, {"Big Smoke's Crack Palace", 2, 2536.5322, -1294.8425, 1044.1250, 254.9548}, {"Bike School (version 1)", 3, 1494.8587, 1306.4798, 1093.2951, 196.0650}, {"Bike School (version 2)", 0, 1168.5118, 1360.1145, 10.9293, 196.5933}, {"Binco", 15, 207.5218, -109.7446, 1005.1328, 358.6199}, {"Blastin' Fools Records", 3, 1037.8276, 0.3970, 1001.2844, 353.9335}, {"Blood Bowl Stadium", 15, -1417.8927, 932.4481, 1041.5312, 0.7013}, {"Blueberry Liquor Store", 0, 255.2082, -59.6753, 1.5701, 1.4644}, {"Brothel 1", 3, 974.0177, -9.5937, 1001.1483, 22.6044}, {"Brothel 2", 3, 961.9307, -51.9071, 1001.1171, 95.5381}, {"Budget Inn Motel Room", 12, 446.3247, 509.9660, 1001.4193, 330.5671}, {"Burger Shot", 10, 366.0248, -73.3478, 1001.5078, 292.0083}, {"Burglary House 1", 15, 295.1390, 1473.3719, 1080.2578, 352.9526}, {"Burglary House 2", 3, 234.6087, 1187.8194, 1080.2578, 349.4844}, {"Burglary House 3", 5, 227.7559, 1114.3842, 1080.9920, 266.2622}, {"Burglary House 4", 4, 261.1163, 1287.2197, 1080.2578, 178.9149}, {"Burglary House 5", 4, 221.6766, 1142.4962, 1082.6092, 184.9618}, {"Burglary House 6", 10, 24.3768, 1341.1827, 1084.3750, 8.3304}, {"Burglary House 7", 4, -262.1759, 1456.6158, 1084.3670, 82.4589}, {"Burglary House 8", 5, 22.8610, 1404.9165, 1084.4295, 349.6158}, {"Burglary House 9", 5, 140.3679, 1367.8835, 1083.8620, 349.2372}, {"Burglary House 10", 6, 234.2825, 1065.2290, 1084.2099, 4.3864}, {"Burglary House 11", 6, -68.5145, 1353.8485, 1080.2109, 3.5741}, {"Burglary House 12", 2, 225.5706, 1240.0643, 1082.1406, 96.2852}, {"Burglary House 13", 15, -285.2510, 1471.1970, 1084.3750, 85.6547}, {"Burglary House 14", 8, -42.5265, 1408.2298, 1084.4295, 172.0679}, {"Burglary House 15", 9, 84.9244, 1324.2983, 1083.8592, 159.5581}, {"Burglary House 16", 9, 260.7420, 1238.2259, 1084.2578, 84.3084}, {"Burglary House 17", 1, 224.2879, 1289.1905, 1082.1406, 359.8680}, {"Burglary House 18", 5, 239.2819, 1114.1989, 1080.9920, 270.2654}, {"Burglary House 19", 2, 446.6260, 1397.7380, 1084.3045, 343.9645}, {"Burning Desire Building", 5, 2350.1596, -1181.0656, 1027.9764, 99.1864}, {"Caligula's Casino", 1, 2233.9362, 1711.8038, 1011.6312, 184.3890}, {"Caligula's Roof", 1, 2268.5156, 1647.7680, 1084.2342, 99.7331}, {"Casino (Redsands West)", 12, 1133.3498, -7.8460, 1000.6796, 165.8482}, {"Cemetary", 0, 818.7714, -1102.8687, 25.7940, 91.1437}, {"Club", 17, 493.1441, -24.2607, 1000.6796, 356.9862}, {"Cluckin' Bell", 9, 366.0002, -9.4336, 1001.8516, 160.5278}, {"Cobra Gym", 6, 773.8886, -47.7696, 1000.5858, 10.7159}, {"Colonel Furhberger's", 8, 2807.3603, -1171.7048, 1025.5703, 193.7117}, {"Crack Den", 5, 227.3921, 1114.6572, 1080.9985, 267.4590}, {"Denise's Bedroom", 1, 245.2306, 304.7632, 999.1483, 273.4364}, {"Didier Sachs", 14, 204.1658, -165.7678, 1000.5233, 181.7583}, {"Dillimore Gas Station", 0, 663.0587, -573.6273, 16.3358, 264.9829}, {"Diner 1", 5, 454.9851, -107.2546, 999.4376, 309.0195}, {"Dirtbike Stadium", 4, -1421.5616, -663.8261, 1059.5567, 170.9340}, {"Driving School", 3, -2031.1196, -115.8285, 1035.1717, 190.1876}, {"Fanny Batter's Whore House", 6, 748.4622, 1438.2376, 1102.9531, 0.6068}, {"Four Dragons", 10, 2016.1156, 1017.1541, 996.8750, 88.0055}, {"Francis International Airport", 14, -1813.2130, -58.0120, 1058.9641, 335.3197}, {"Ganton Gym", 5, 770.8032, -0.7031, 1000.7266, 22.8598}, {"Helena's Barn", 3, 290.6228, 309.0621, 999.1483, 89.9162}, {"Inside Track Betting", 3, 830.6016, 5.9404, 1004.1796, 125.8149}, {"Jay's Diner", 4, 449.0172, -88.9894, 999.5546, 89.6606}, {"Jefferson Motel", 15, 2217.2810, -1150.5349, 1025.7967, 273.7326}, {"Jet Interior", 1, 1.5491, 23.3183, 1199.5937, 359.9053}, {"K.A.C.C. Military Fuels Depot", 0, 2548.4807, 2823.7429, 10.8203, 270.6003}, {"Katie's Lovenest", 2, 269.6405, 305.9512, 999.1483, 215.6625}, {"Kickstart Stadium", 14, -1420.4277, 1616.9221, 1052.5312, 159.1255}, {"Las Venturas Gym", 7, 773.7318, -74.6957, 1000.6541, 5.2304}, {"Las Venturas Police Department", 3, 288.4721, 170.0646, 1007.1793, 22.0477}, {"Las Venturas Tattoo parlor", 3, -201.2236, -43.2463, 1002.2733, 45.8613}, {"Liberty City", 1, -741.8494, 493.0036, 1371.9764, 71.7780}, {"Lil' Probe Inn", 18, -227.5702, 1401.5544, 27.7656, 269.2976}, {"Loco Low Co", 2, 611.3535, -77.5574, 997.9995, 320.9263}, {"Los Santos Airport", 14, -1864.9433, 55.7323, 1055.5274, 85.8541}, {"Los Santos Police Department", 6, 246.6694, 65.8039, 1003.6406, 7.9562}, {"Los Santos Tattoo Parlor", 16, -202.8419, -24.0324, 1002.2733, 252.8153}, {"Lost San Fierro Tattoo parlor", 17, -202.9380, -6.7006, 1002.2733, 204.2693}, {"Madd Dogg's Mansion", 5, 1267.8405, -776.9586, 1091.9062, 231.3417}, {"Michelle's Love Nest", 4, 306.1965, 307.8190, 1003.3046, 203.1354}, {"Millie's Bedroom", 6, 344.9984, 307.1824, 999.1557, 193.6430}, {"OG Loc's House", 3, 512.9290, -11.6927, 1001.5653, 198.7669}, {"Old Venturas Strip Casino", 2, 2236.6997, -1078.9477, 1049.0234, 2.5706}, {"Otto's Autos", 0, -1658.1656, 1215.0002, 7.2500, 103.9074}, {"Oval Stadium", 1, -1402.6612, 106.3897, 1032.2734, 105.1354}, {"Palamino Bank", 0, 2306.3825, -15.2363, 26.7495, 274.4898}, {"Palamino Diner", 0, 2331.8984, 6.7814, 26.5032, 100.2357}, {"Pizza Stack", 5, 372.5563, -131.3607, 1001.4921, 354.2283}, {"Planning Department", 3, 386.5259, 173.6381, 1008.3828, 63.7397}, {"Pro-Laps", 3, 206.4627, -137.7075, 1003.0938, 10.9347}, {"RC Battlefield", 10, -1129.8907, 1057.5423, 1346.4139, 274.5267}, {"Rosenberg's Office", 2, 2182.2016, 1628.5848, 1043.8723, 224.8601}, {"Rusty Brown's Donuts", 17, 378.0260, -190.5155, 1000.6328, 141.0245}, {"Ryder's House", 2, 2447.8703, -1704.4509, 1013.5078, 314.5252}, {"Safe House (version 1)", 5, 2233.6918, -1112.8105, 1050.8828, 8.6483}, {"Safe House (version 2)", 9, 2319.1271, -1023.9561, 1050.2109, 167.3959}, {"Safe House (version 3)", 10, 2261.0976, -1137.8833, 1050.6328, 266.8800}, {"San Fierro Garage", 1, -2041.2332, 178.3968, 28.8465, 156.2153}, {"San Fierro Police Department", 10, 246.0688, 108.9701, 1003.2188, 0.2921}, {"Secret Valley Diner", 6, 442.1293, -52.4780, 999.7166, 177.9394}, {"Sex Shop", 3, -100.2674, -22.9375, 1000.7188, 17.2849}, {"Sherman Dam", 17, -944.2401, 1886.1534, 5.0050, 179.8547}, {"Sindacco Abatoir", 1, 963.0584, 2159.7563, 1011.0302, 175.3130}, {"SubUrban", 1, 204.1174, -46.8045, 1001.8046, 357.5776}, {"Sweet's House", 1, 2527.0175, -1679.2076, 1015.4984, 260.9707}, {"The Big Spread Ranch", 3, 1212.1489, -28.5387, 1000.9531, 170.5691}, {"The Camel's Toe Safehouse", 1, 2216.1281, -1076.3050, 1050.4842, 86.4280}, {"The Johnson House", 3, 2496.0549, -1695.1749, 1014.7421, 179.2174}, {"The Pig Pen (strip club 2)", 2, 1204.6689, -13.5429, 1000.9218, 350.0202}, {"The Pleasure Domes", 3, -2638.8232, 1407.3393, 906.4608, 94.6792}, {"The Welcome Pump", 1, 681.6215, -451.8933, -25.6172, 166.1660}, {"Torreno's Ranch", 0, -688.1494, 942.0825, 13.6328, 177.6573}, {"Transfenders", 1, 621.4528, -23.7289, 1000.9218, 15.6787}, {"Unused Safe House", 12, 2323.7062, -1147.6507, 1050.7099, 206.5352}, {"Verdant Bluffs Safehouse", 8, 2365.1088, -1133.0793, 1050.8750, 177.3946}, {"Vice Stadium", 16, -1401.0670, 1265.3706, 1039.8670, 178.6483}, {"Victim", 5, 225.0305, -9.1836, 1002.2180, 85.5322}, {"Wang Cars", 0, -1961.6280, 295.2377, 35.4687, 264.4891}, {"Wardrobe/Changing room", 14, 256.9046, -41.6537, 1002.0233, 85.8774}, {"Warehouse 1", 18, 1290.4106, 1.9512, 1001.0200, 179.9418}, {"Warehouse 2", 1, 1412.1472, -2.2836, 1000.9240, 114.6610}, {"Warehouse 3", 0, 2135.2004, -2276.2814, 20.6718, 318.5899}, {"Wheel Arch Angels", 3, 612.2191, -123.9028, 997.9921, 266.5704}, {"Willowfield Safehouse", 11, 2283.3117, 1139.3070, 1050.8984, 19.7031}, {"World of Coq", 1, 445.6003, -6.9822, 1000.7343, 172.2104}, {"Wu-Zi Mu's", 1, -2158.6730, 642.0900, 1052.3750, 86.5401}, {"Zero's RC Shop", 6, -2240.1027, 136.9730, 1035.4139, 269.0953}, {"Zip", 18, 161.4048, -94.2416, 1001.8046, 0.7936}, {"Zombotech", 0, -1916.1268, 714.8615, 46.5625, 152.2839} }; enum radioEnum { rGenre[32], rSubgenre[32] }; new const radioGenreList[][radioEnum] = { {"Alternative", "Alternative"}, {"Alternative", "Adult Alternative"}, {"Alternative", "Britpop"}, {"Alternative", "Classic Alternative"}, {"Alternative", "College"}, {"Alternative", "Dancepunk"}, {"Alternative", "Dream Pop"}, {"Alternative", "Emo"}, {"Alternative", "Goth"}, {"Alternative", "Grunge"}, {"Alternative", "Hardcore"}, {"Alternative", "Indie Pop"}, {"Alternative", "Indie Rock"}, {"Alternative", "Industrial"}, {"Alternative", "LoFi"}, {"Alternative", "Modern Rock"}, {"Alternative", "New Wave"}, {"Alternative", "Noise Pop"}, {"Alternative", "Post Punk"}, {"Alternative", "Power Pop"}, {"Alternative", "Punk"}, {"Alternative", "Ska"}, {"Alternative", "Xtreme"}, {"Blues", "Blues"}, {"Blues", "Acoustic Blues"}, {"Blues", "Cajun and Zydeco"}, {"Blues", "Chicago Blues"}, {"Blues", "Contemporary Blues"}, {"Blues", "Country Blues"}, {"Blues", "Delta Blues"}, {"Blues", "Electric Blues"}, {"Classical", "Classical"}, {"Classical", "Baroque"}, {"Classical", "Chamber"}, {"Classical", "Choral"}, {"Classical", "Classical Period"}, {"Classical", "Early Classical"}, {"Classical", "Impressionist"}, {"Classical", "Modern"}, {"Classical", "Opera"}, {"Classical", "Piano"}, {"Classical", "Romantic"}, {"Classical", "Symphony"}, {"Country", "Country"}, {"Country", "Alt Country"}, {"Country", "Americana"}, {"Country", "Bluegrass"}, {"Country", "Classic Country"}, {"Country", "Contemporary Country"}, {"Country", "Honky Tonk"}, {"Country", "Hot Country Hits"}, {"Country", "Western"}, {"Decades", "Decades"}, {"Decades", "00s"}, {"Decades", "30s"}, {"Decades", "40s"}, {"Decades", "50s"}, {"Decades", "60s"}, {"Decades", "70s"}, {"Decades", "80s"}, {"Decades", "90s"}, {"Easy Listening", "Easy Listening"}, {"Easy Listening", "Exotica"}, {"Easy Listening", "Light Rock"}, {"Easy Listening", "Lounge"}, {"Easy Listening", "Orchestral Pop"}, {"Easy Listening", "Polka"}, {"Easy Listening", "Space Age Pop"}, {"Electronic", "Electronic"}, {"Electronic", "Acid House"}, {"Electronic", "Ambient"}, {"Electronic", "Big Beat"}, {"Electronic", "Breakbeat"}, {"Electronic", "Dance"}, {"Electronic", "Demo"}, {"Electronic", "Disco"}, {"Electronic", "Downtempo"}, {"Electronic", "Drum and Bass"}, {"Electronic", "Dubstep"}, {"Electronic", "Electro"}, {"Electronic", "Garage"}, {"Electronic", "Hard House"}, {"Electronic", "House"}, {"Electronic", "IDM"}, {"Electronic", "Jungle"}, {"Electronic", "Progressive"}, {"Electronic", "Techno"}, {"Electronic", "Trance"}, {"Electronic", "Tribal"}, {"Electronic", "Trip Hop"}, {"Folk", "Folk"}, {"Folk", "Alternative Folk"}, {"Folk", "Contemporary Folk"}, {"Folk", "Folk Rock"}, {"Folk", "New Acoustic"}, {"Folk", "Old Time"}, {"Folk", "Traditional Folk"}, {"Folk", "World Folk"}, {"Inspirational", "Inspirational"}, {"Inspirational", "Christian"}, {"Inspirational", "Christian Metal"}, {"Inspirational", "Christian Rap"}, {"Inspirational", "Christian Rock"}, {"Inspirational", "Classic Christian"}, {"Inspirational", "Contemporary Gospel"}, {"Inspirational", "Gospel"}, {"Inspirational", "Praise and Worship"}, {"Inspirational", "Sermon and Services"}, {"Inspirational", "Southern Gospel"}, {"Inspirational", "Traditional Gospel"}, {"International", "International"}, {"International", "African"}, {"International", "Afrikaans"}, {"International", "Arabic"}, {"International", "Asian"}, {"International", "Bollywood"}, {"International", "Brazilian"}, {"International", "Caribbean"}, {"International", "Celtic"}, {"International", "Chinese"}, {"International", "Creole"}, {"International", "European"}, {"International", "Filipino"}, {"International", "French"}, {"International", "German"}, {"International", "Greek"}, {"International", "Hawaiian & Pacific"}, {"International", "Hebrew"}, {"International", "Hindi"}, {"International", "Indian"}, {"International", "Islamic"}, {"International", "Japanese"}, {"International", "Korean"}, {"International", "Mediterranean"}, {"International", "Middle Eastern"}, {"International", "North American"}, {"International", "Russian"}, {"International", "Soca"}, {"International", "South American"}, {"International", "Tamil"}, {"International", "Turkish"}, {"International", "Worldbeat"}, {"International", "Zouk"}, {"Jazz", "Jazz"}, {"Jazz", "Acid Jazz"}, {"Jazz", "Avant Garde"}, {"Jazz", "Big Band"}, {"Jazz", "Bop"}, {"Jazz", "Classic Jazz"}, {"Jazz", "Cool Jazz"}, {"Jazz", "Fusion"}, {"Jazz", "Hard Bop"}, {"Jazz", "Latin Jazz"}, {"Jazz", "Smooth Jazz"}, {"Jazz", "Swing"}, {"Jazz", "Vocal Jazz"}, {"Jazz", "World Fusion"}, {"Latin", "Latin"}, {"Latin", "Bachata"}, {"Latin", "Banda"}, {"Latin", "Bossa Nova"}, {"Latin", "Cumbia"}, {"Latin", "Flamenco"}, {"Latin", "Latin Dance"}, {"Latin", "Latin Pop"}, {"Latin", "Latin Rap"}, {"Latin", "Latin Rock"}, {"Latin", "Mariachi"}, {"Latin", "Merengue"}, {"Latin", "Ranchera"}, {"Latin", "Reggaeton"}, {"Latin", "Regional Mexican"}, {"Latin", "Salsa"}, {"Latin", "Samba"}, {"Latin", "Tango"}, {"Latin", "Tejano"}, {"Latin", "Tropicalia"}, {"Metal", "Metal"}, {"Metal", "Black Metal"}, {"Metal", "Classic Metal"}, {"Metal", "Death Metal"}, {"Metal", "Extreme Metal"}, {"Metal", "Grindcore"}, {"Metal", "Hair Metal"}, {"Metal", "Heavy Metal"}, {"Metal", "Metalcore"}, {"Metal", "Power Metal"}, {"Metal", "Progressive Metal"}, {"Metal", "Thrash Metal"}, {"Misc", "Misc"}, {"New Age", "New Age"}, {"New Age", "Environmental"}, {"New Age", "Ethnic Fusion"}, {"New Age", "Healing"}, {"New Age", "Meditation"}, {"New Age", "Spiritual"}, {"Pop", "Pop"}, {"Pop", "Adult Contemporary"}, {"Pop", "Barbershop"}, {"Pop", "Bubblegum Pop"}, {"Pop", "Dance Pop"}, {"Pop", "Idols"}, {"Pop", "JPOP"}, {"Pop", "KPOP"}, {"Pop", "Oldies"}, {"Pop", "Soft Rock"}, {"Pop", "Teen Pop"}, {"Pop", "Top 40"}, {"Pop", "World Pop"}, {"Public Radio", "Public Radio"}, {"Public Radio", "College"}, {"Public Radio", "News"}, {"Public Radio", "Sports"}, {"Public Radio", "Talk"}, {"Public Radio", "Weather"}, {"R&B and Urban", "R&B and Urban"}, {"R&B and Urban", "Classic R&B"}, {"R&B and Urban", "Contemporary R&B"}, {"R&B and Urban", "Funk"}, {"R&B and Urban", "Motown"}, {"R&B and Urban", "Neo Soul"}, {"R&B and Urban", "Quiet Storm"}, {"R&B and Urban", "Soul"}, {"R&B and Urban", "Urban Contemporary"}, {"Rap", "Rap"}, {"Rap", "Alternative Rap"}, {"Rap", "Dirty South"}, {"Rap", "East Coast Rap"}, {"Rap", "Freestyle"}, {"Rap", "Gangsta Rap"}, {"Rap", "Hip Hop"}, {"Rap", "Mixtapes"}, {"Rap", "Old School"}, {"Rap", "Turntablism"}, {"Rap", "Underground Hip Hop"}, {"Rap", "West Coast Rap"}, {"Reggae", "Reggae"}, {"Reggae", "Contemporary Reggae"}, {"Reggae", "Dancehall"}, {"Reggae", "Dub"}, {"Reggae", "Pop Reggae"}, {"Reggae", "Ragga"}, {"Reggae", "Reggae Roots"}, {"Reggae", "Rock Steady"}, {"Rock", "Rock"}, {"Rock", "Adult Alternative"}, {"Rock", "Celtic Rock"}, {"Rock", "Classic Rock"}, {"Rock", "Garage Rock"}, {"Rock", "Glam"}, {"Rock", "Hard Rock"}, {"Rock", "Jam Bands"}, {"Rock", "JROCK"}, {"Rock", "Progressive Rock"}, {"Rock", "Psychedelic"}, {"Rock", "Rock & Roll"}, {"Rock", "Rockabilly"}, {"Rock", "Singer & Songwriter"}, {"Rock", "Surf"}, {"Seasonal and Holiday", "Seasonal and Holiday"}, {"Seasonal and Holiday", "Birthday"}, {"Seasonal and Holiday", "Christmas"}, {"Seasonal and Holiday", "Halloween"}, {"Seasonal and Holiday", "Kwanzaa"}, {"Seasonal and Holiday", "Valentine"}, {"Seasonal and Holiday", "Winter"}, {"Soundtracks", "Soundtracks"}, {"Soundtracks", "Anime"}, {"Soundtracks", "Kids"}, {"Soundtracks", "Original Score"}, {"Soundtracks", "Showtunes"}, {"Soundtracks", "Video Game Music"}, {"Talk", "Talk"}, {"Talk", "BlogTalk"}, {"Talk", "Comedy"}, {"Talk", "Community"}, {"Talk", "Educational"}, {"Talk", "Government"}, {"Talk", "News"}, {"Talk", "Old Time Radio"}, {"Talk", "Other Talk"}, {"Talk", "Political"}, {"Talk", "Scanner"}, {"Talk", "Spoken Word"}, {"Talk", "Sports"}, {"Talk", "Technology"}, {"Themes", "Themes"}, {"Themes", "Adult"}, {"Themes", "Best Of"}, {"Themes", "Chill"}, {"Themes", "Eclectic"}, {"Themes", "Experimental"}, {"Themes", "Female"}, {"Themes", "Heartache"}, {"Themes", "Instrumental"}, {"Themes", "LGBT"}, {"Themes", "Love and Romance"}, {"Themes", "Party Mix"}, {"Themes", "Patriotic"}, {"Themes", "Rainy Day Mix"}, {"Themes", "Reality"}, {"Themes", "Sexy"}, {"Themes", "Shuffle"}, {"Themes", "Travel Mix"}, {"Themes", "Trippy"}, {"Themes", "Work Mix"} }; enum zoneEnum { zoneName[32], Float:zoneMinX, Float:zoneMinY, Float:zoneMinZ, Float:zoneMaxX, Float:zoneMaxY, Float:zoneMaxZ }; new const zoneArray[][zoneEnum] = { {"The Big Ear", -410.00, 1403.30, -3.00, -137.90, 1681.20, 200.00}, {"Aldea Malvada", -1372.10, 2498.50, 0.00, -1277.50, 2615.30, 200.00}, {"Angel Pine", -2324.90, -2584.20, -6.10, -1964.20, -2212.10, 200.00}, {"Arco del Oeste", -901.10, 2221.80, 0.00, -592.00, 2571.90, 200.00}, {"Avispa Country Club", -2646.40, -355.40, 0.00, -2270.00, -222.50, 200.00}, {"Avispa Country Club", -2831.80, -430.20, -6.10, -2646.40, -222.50, 200.00}, {"Avispa Country Club", -2361.50, -417.10, 0.00, -2270.00, -355.40, 200.00}, {"Avispa Country Club", -2667.80, -302.10, -28.80, -2646.40, -262.30, 71.10}, {"Avispa Country Club", -2470.00, -355.40, 0.00, -2270.00, -318.40, 46.10}, {"Avispa Country Club", -2550.00, -355.40, 0.00, -2470.00, -318.40, 39.70}, {"Back o Beyond", -1166.90, -2641.10, 0.00, -321.70, -1856.00, 200.00}, {"Battery Point", -2741.00, 1268.40, -4.50, -2533.00, 1490.40, 200.00}, {"Bayside", -2741.00, 2175.10, 0.00, -2353.10, 2722.70, 200.00}, {"Bayside Marina", -2353.10, 2275.70, 0.00, -2153.10, 2475.70, 200.00}, {"Beacon Hill", -399.60, -1075.50, -1.40, -319.00, -977.50, 198.50}, {"Blackfield", 964.30, 1203.20, -89.00, 1197.30, 1403.20, 110.90}, {"Blackfield", 964.30, 1403.20, -89.00, 1197.30, 1726.20, 110.90}, {"Blackfield Chapel", 1375.60, 596.30, -89.00, 1558.00, 823.20, 110.90}, {"Blackfield Chapel", 1325.60, 596.30, -89.00, 1375.60, 795.00, 110.90}, {"Blackfield Intersection", 1197.30, 1044.60, -89.00, 1277.00, 1163.30, 110.90}, {"Blackfield Intersection", 1166.50, 795.00, -89.00, 1375.60, 1044.60, 110.90}, {"Blackfield Intersection", 1277.00, 1044.60, -89.00, 1315.30, 1087.60, 110.90}, {"Blackfield Intersection", 1375.60, 823.20, -89.00, 1457.30, 919.40, 110.90}, {"Blueberry", 104.50, -220.10, 2.30, 349.60, 152.20, 200.00}, {"Blueberry", 19.60, -404.10, 3.80, 349.60, -220.10, 200.00}, {"Blueberry Acres", -319.60, -220.10, 0.00, 104.50, 293.30, 200.00}, {"Caligula's Palace", 2087.30, 1543.20, -89.00, 2437.30, 1703.20, 110.90}, {"Caligula's Palace", 2137.40, 1703.20, -89.00, 2437.30, 1783.20, 110.90}, {"Calton Heights", -2274.10, 744.10, -6.10, -1982.30, 1358.90, 200.00}, {"Chinatown", -2274.10, 578.30, -7.60, -2078.60, 744.10, 200.00}, {"City Hall", -2867.80, 277.40, -9.10, -2593.40, 458.40, 200.00}, {"Come-A-Lot", 2087.30, 943.20, -89.00, 2623.10, 1203.20, 110.90}, {"Commerce", 1323.90, -1842.20, -89.00, 1701.90, -1722.20, 110.90}, {"Commerce", 1323.90, -1722.20, -89.00, 1440.90, -1577.50, 110.90}, {"Commerce", 1370.80, -1577.50, -89.00, 1463.90, -1384.90, 110.90}, {"Commerce", 1463.90, -1577.50, -89.00, 1667.90, -1430.80, 110.90}, {"Commerce", 1583.50, -1722.20, -89.00, 1758.90, -1577.50, 110.90}, {"Commerce", 1667.90, -1577.50, -89.00, 1812.60, -1430.80, 110.90}, {"Conference Center", 1046.10, -1804.20, -89.00, 1323.90, -1722.20, 110.90}, {"Conference Center", 1073.20, -1842.20, -89.00, 1323.90, -1804.20, 110.90}, {"Cranberry Station", -2007.80, 56.30, 0.00, -1922.00, 224.70, 100.00}, {"Creek", 2749.90, 1937.20, -89.00, 2921.60, 2669.70, 110.90}, {"Dillimore", 580.70, -674.80, -9.50, 861.00, -404.70, 200.00}, {"Doherty", -2270.00, -324.10, -0.00, -1794.90, -222.50, 200.00}, {"Doherty", -2173.00, -222.50, -0.00, -1794.90, 265.20, 200.00}, {"Downtown", -1982.30, 744.10, -6.10, -1871.70, 1274.20, 200.00}, {"Downtown", -1871.70, 1176.40, -4.50, -1620.30, 1274.20, 200.00}, {"Downtown", -1700.00, 744.20, -6.10, -1580.00, 1176.50, 200.00}, {"Downtown", -1580.00, 744.20, -6.10, -1499.80, 1025.90, 200.00}, {"Downtown", -2078.60, 578.30, -7.60, -1499.80, 744.20, 200.00}, {"Downtown", -1993.20, 265.20, -9.10, -1794.90, 578.30, 200.00}, {"Downtown Los Santos", 1463.90, -1430.80, -89.00, 1724.70, -1290.80, 110.90}, {"Downtown Los Santos", 1724.70, -1430.80, -89.00, 1812.60, -1250.90, 110.90}, {"Downtown Los Santos", 1463.90, -1290.80, -89.00, 1724.70, -1150.80, 110.90}, {"Downtown Los Santos", 1370.80, -1384.90, -89.00, 1463.90, -1170.80, 110.90}, {"Downtown Los Santos", 1724.70, -1250.90, -89.00, 1812.60, -1150.80, 110.90}, {"Downtown Los Santos", 1370.80, -1170.80, -89.00, 1463.90, -1130.80, 110.90}, {"Downtown Los Santos", 1378.30, -1130.80, -89.00, 1463.90, -1026.30, 110.90}, {"Downtown Los Santos", 1391.00, -1026.30, -89.00, 1463.90, -926.90, 110.90}, {"Downtown Los Santos", 1507.50, -1385.20, 110.90, 1582.50, -1325.30, 335.90}, {"East Beach", 2632.80, -1852.80, -89.00, 2959.30, -1668.10, 110.90}, {"East Beach", 2632.80, -1668.10, -89.00, 2747.70, -1393.40, 110.90}, {"East Beach", 2747.70, -1668.10, -89.00, 2959.30, -1498.60, 110.90}, {"East Beach", 2747.70, -1498.60, -89.00, 2959.30, -1120.00, 110.90}, {"East Los Santos", 2421.00, -1628.50, -89.00, 2632.80, -1454.30, 110.90}, {"East Los Santos", 2222.50, -1628.50, -89.00, 2421.00, -1494.00, 110.90}, {"East Los Santos", 2266.20, -1494.00, -89.00, 2381.60, -1372.00, 110.90}, {"East Los Santos", 2381.60, -1494.00, -89.00, 2421.00, -1454.30, 110.90}, {"East Los Santos", 2281.40, -1372.00, -89.00, 2381.60, -1135.00, 110.90}, {"East Los Santos", 2381.60, -1454.30, -89.00, 2462.10, -1135.00, 110.90}, {"East Los Santos", 2462.10, -1454.30, -89.00, 2581.70, -1135.00, 110.90}, {"Easter Basin", -1794.90, 249.90, -9.10, -1242.90, 578.30, 200.00}, {"Easter Basin", -1794.90, -50.00, -0.00, -1499.80, 249.90, 200.00}, {"Easter Bay Airport", -1499.80, -50.00, -0.00, -1242.90, 249.90, 200.00}, {"Easter Bay Airport", -1794.90, -730.10, -3.00, -1213.90, -50.00, 200.00}, {"Easter Bay Airport", -1213.90, -730.10, 0.00, -1132.80, -50.00, 200.00}, {"Easter Bay Airport", -1242.90, -50.00, 0.00, -1213.90, 578.30, 200.00}, {"Easter Bay Airport", -1213.90, -50.00, -4.50, -947.90, 578.30, 200.00}, {"Easter Bay Airport", -1315.40, -405.30, 15.40, -1264.40, -209.50, 25.40}, {"Easter Bay Airport", -1354.30, -287.30, 15.40, -1315.40, -209.50, 25.40}, {"Easter Bay Airport", -1490.30, -209.50, 15.40, -1264.40, -148.30, 25.40}, {"Easter Bay Chemicals", -1132.80, -768.00, 0.00, -956.40, -578.10, 200.00}, {"Easter Bay Chemicals", -1132.80, -787.30, 0.00, -956.40, -768.00, 200.00}, {"El Castillo del Diablo", -464.50, 2217.60, 0.00, -208.50, 2580.30, 200.00}, {"El Castillo del Diablo", -208.50, 2123.00, -7.60, 114.00, 2337.10, 200.00}, {"El Castillo del Diablo", -208.50, 2337.10, 0.00, 8.40, 2487.10, 200.00}, {"El Corona", 1812.60, -2179.20, -89.00, 1970.60, -1852.80, 110.90}, {"El Corona", 1692.60, -2179.20, -89.00, 1812.60, -1842.20, 110.90}, {"El Quebrados", -1645.20, 2498.50, 0.00, -1372.10, 2777.80, 200.00}, {"Esplanade East", -1620.30, 1176.50, -4.50, -1580.00, 1274.20, 200.00}, {"Esplanade East", -1580.00, 1025.90, -6.10, -1499.80, 1274.20, 200.00}, {"Esplanade East", -1499.80, 578.30, -79.60, -1339.80, 1274.20, 20.30}, {"Esplanade North", -2533.00, 1358.90, -4.50, -1996.60, 1501.20, 200.00}, {"Esplanade North", -1996.60, 1358.90, -4.50, -1524.20, 1592.50, 200.00}, {"Esplanade North", -1982.30, 1274.20, -4.50, -1524.20, 1358.90, 200.00}, {"Fallen Tree", -792.20, -698.50, -5.30, -452.40, -380.00, 200.00}, {"Fallow Bridge", 434.30, 366.50, 0.00, 603.00, 555.60, 200.00}, {"Fern Ridge", 508.10, -139.20, 0.00, 1306.60, 119.50, 200.00}, {"Financial", -1871.70, 744.10, -6.10, -1701.30, 1176.40, 300.00}, {"Fisher's Lagoon", 1916.90, -233.30, -100.00, 2131.70, 13.80, 200.00}, {"Flint Intersection", -187.70, -1596.70, -89.00, 17.00, -1276.60, 110.90}, {"Flint Range", -594.10, -1648.50, 0.00, -187.70, -1276.60, 200.00}, {"Fort Carson", -376.20, 826.30, -3.00, 123.70, 1220.40, 200.00}, {"Foster Valley", -2270.00, -430.20, -0.00, -2178.60, -324.10, 200.00}, {"Foster Valley", -2178.60, -599.80, -0.00, -1794.90, -324.10, 200.00}, {"Foster Valley", -2178.60, -1115.50, 0.00, -1794.90, -599.80, 200.00}, {"Foster Valley", -2178.60, -1250.90, 0.00, -1794.90, -1115.50, 200.00}, {"Frederick Bridge", 2759.20, 296.50, 0.00, 2774.20, 594.70, 200.00}, {"Gant Bridge", -2741.40, 1659.60, -6.10, -2616.40, 2175.10, 200.00}, {"Gant Bridge", -2741.00, 1490.40, -6.10, -2616.40, 1659.60, 200.00}, {"Ganton", 2222.50, -1852.80, -89.00, 2632.80, -1722.30, 110.90}, {"Ganton", 2222.50, -1722.30, -89.00, 2632.80, -1628.50, 110.90}, {"Garcia", -2411.20, -222.50, -0.00, -2173.00, 265.20, 200.00}, {"Garcia", -2395.10, -222.50, -5.30, -2354.00, -204.70, 200.00}, {"Garver Bridge", -1339.80, 828.10, -89.00, -1213.90, 1057.00, 110.90}, {"Garver Bridge", -1213.90, 950.00, -89.00, -1087.90, 1178.90, 110.90}, {"Garver Bridge", -1499.80, 696.40, -179.60, -1339.80, 925.30, 20.30}, {"Glen Park", 1812.60, -1449.60, -89.00, 1996.90, -1350.70, 110.90}, {"Glen Park", 1812.60, -1100.80, -89.00, 1994.30, -973.30, 110.90}, {"Glen Park", 1812.60, -1350.70, -89.00, 2056.80, -1100.80, 110.90}, {"Green Palms", 176.50, 1305.40, -3.00, 338.60, 1520.70, 200.00}, {"Greenglass College", 964.30, 1044.60, -89.00, 1197.30, 1203.20, 110.90}, {"Greenglass College", 964.30, 930.80, -89.00, 1166.50, 1044.60, 110.90}, {"Hampton Barns", 603.00, 264.30, 0.00, 761.90, 366.50, 200.00}, {"Hankypanky Point", 2576.90, 62.10, 0.00, 2759.20, 385.50, 200.00}, {"Harry Gold Parkway", 1777.30, 863.20, -89.00, 1817.30, 2342.80, 110.90}, {"Hashbury", -2593.40, -222.50, -0.00, -2411.20, 54.70, 200.00}, {"Hilltop Farm", 967.30, -450.30, -3.00, 1176.70, -217.90, 200.00}, {"Hunter Quarry", 337.20, 710.80, -115.20, 860.50, 1031.70, 203.70}, {"Idlewood", 1812.60, -1852.80, -89.00, 1971.60, -1742.30, 110.90}, {"Idlewood", 1812.60, -1742.30, -89.00, 1951.60, -1602.30, 110.90}, {"Idlewood", 1951.60, -1742.30, -89.00, 2124.60, -1602.30, 110.90}, {"Idlewood", 1812.60, -1602.30, -89.00, 2124.60, -1449.60, 110.90}, {"Idlewood", 2124.60, -1742.30, -89.00, 2222.50, -1494.00, 110.90}, {"Idlewood", 1971.60, -1852.80, -89.00, 2222.50, -1742.30, 110.90}, {"Jefferson", 1996.90, -1449.60, -89.00, 2056.80, -1350.70, 110.90}, {"Jefferson", 2124.60, -1494.00, -89.00, 2266.20, -1449.60, 110.90}, {"Jefferson", 2056.80, -1372.00, -89.00, 2281.40, -1210.70, 110.90}, {"Jefferson", 2056.80, -1210.70, -89.00, 2185.30, -1126.30, 110.90}, {"Jefferson", 2185.30, -1210.70, -89.00, 2281.40, -1154.50, 110.90}, {"Jefferson", 2056.80, -1449.60, -89.00, 2266.20, -1372.00, 110.90}, {"Julius Thruway East", 2623.10, 943.20, -89.00, 2749.90, 1055.90, 110.90}, {"Julius Thruway East", 2685.10, 1055.90, -89.00, 2749.90, 2626.50, 110.90}, {"Julius Thruway East", 2536.40, 2442.50, -89.00, 2685.10, 2542.50, 110.90}, {"Julius Thruway East", 2625.10, 2202.70, -89.00, 2685.10, 2442.50, 110.90}, {"Julius Thruway North", 2498.20, 2542.50, -89.00, 2685.10, 2626.50, 110.90}, {"Julius Thruway North", 2237.40, 2542.50, -89.00, 2498.20, 2663.10, 110.90}, {"Julius Thruway North", 2121.40, 2508.20, -89.00, 2237.40, 2663.10, 110.90}, {"Julius Thruway North", 1938.80, 2508.20, -89.00, 2121.40, 2624.20, 110.90}, {"Julius Thruway North", 1534.50, 2433.20, -89.00, 1848.40, 2583.20, 110.90}, {"Julius Thruway North", 1848.40, 2478.40, -89.00, 1938.80, 2553.40, 110.90}, {"Julius Thruway North", 1704.50, 2342.80, -89.00, 1848.40, 2433.20, 110.90}, {"Julius Thruway North", 1377.30, 2433.20, -89.00, 1534.50, 2507.20, 110.90}, {"Julius Thruway South", 1457.30, 823.20, -89.00, 2377.30, 863.20, 110.90}, {"Julius Thruway South", 2377.30, 788.80, -89.00, 2537.30, 897.90, 110.90}, {"Julius Thruway West", 1197.30, 1163.30, -89.00, 1236.60, 2243.20, 110.90}, {"Julius Thruway West", 1236.60, 2142.80, -89.00, 1297.40, 2243.20, 110.90}, {"Juniper Hill", -2533.00, 578.30, -7.60, -2274.10, 968.30, 200.00}, {"Juniper Hollow", -2533.00, 968.30, -6.10, -2274.10, 1358.90, 200.00}, {"K.A.C.C. Military Fuels", 2498.20, 2626.50, -89.00, 2749.90, 2861.50, 110.90}, {"Kincaid Bridge", -1339.80, 599.20, -89.00, -1213.90, 828.10, 110.90}, {"Kincaid Bridge", -1213.90, 721.10, -89.00, -1087.90, 950.00, 110.90}, {"Kincaid Bridge", -1087.90, 855.30, -89.00, -961.90, 986.20, 110.90}, {"King's", -2329.30, 458.40, -7.60, -1993.20, 578.30, 200.00}, {"King's", -2411.20, 265.20, -9.10, -1993.20, 373.50, 200.00}, {"King's", -2253.50, 373.50, -9.10, -1993.20, 458.40, 200.00}, {"LVA Freight Depot", 1457.30, 863.20, -89.00, 1777.40, 1143.20, 110.90}, {"LVA Freight Depot", 1375.60, 919.40, -89.00, 1457.30, 1203.20, 110.90}, {"LVA Freight Depot", 1277.00, 1087.60, -89.00, 1375.60, 1203.20, 110.90}, {"LVA Freight Depot", 1315.30, 1044.60, -89.00, 1375.60, 1087.60, 110.90}, {"LVA Freight Depot", 1236.60, 1163.40, -89.00, 1277.00, 1203.20, 110.90}, {"Las Barrancas", -926.10, 1398.70, -3.00, -719.20, 1634.60, 200.00}, {"Las Brujas", -365.10, 2123.00, -3.00, -208.50, 2217.60, 200.00}, {"Las Colinas", 1994.30, -1100.80, -89.00, 2056.80, -920.80, 110.90}, {"Las Colinas", 2056.80, -1126.30, -89.00, 2126.80, -920.80, 110.90}, {"Las Colinas", 2185.30, -1154.50, -89.00, 2281.40, -934.40, 110.90}, {"Las Colinas", 2126.80, -1126.30, -89.00, 2185.30, -934.40, 110.90}, {"Las Colinas", 2747.70, -1120.00, -89.00, 2959.30, -945.00, 110.90}, {"Las Colinas", 2632.70, -1135.00, -89.00, 2747.70, -945.00, 110.90}, {"Las Colinas", 2281.40, -1135.00, -89.00, 2632.70, -945.00, 110.90}, {"Las Payasadas", -354.30, 2580.30, 2.00, -133.60, 2816.80, 200.00}, {"Las Venturas Airport", 1236.60, 1203.20, -89.00, 1457.30, 1883.10, 110.90}, {"Las Venturas Airport", 1457.30, 1203.20, -89.00, 1777.30, 1883.10, 110.90}, {"Las Venturas Airport", 1457.30, 1143.20, -89.00, 1777.40, 1203.20, 110.90}, {"Las Venturas Airport", 1515.80, 1586.40, -12.50, 1729.90, 1714.50, 87.50}, {"Last Dime Motel", 1823.00, 596.30, -89.00, 1997.20, 823.20, 110.90}, {"Leafy Hollow", -1166.90, -1856.00, 0.00, -815.60, -1602.00, 200.00}, {"Liberty City", -1000.00, 400.00, 1300.00, -700.00, 600.00, 1400.00}, {"Lil' Probe Inn", -90.20, 1286.80, -3.00, 153.80, 1554.10, 200.00}, {"Linden Side", 2749.90, 943.20, -89.00, 2923.30, 1198.90, 110.90}, {"Linden Station", 2749.90, 1198.90, -89.00, 2923.30, 1548.90, 110.90}, {"Linden Station", 2811.20, 1229.50, -39.50, 2861.20, 1407.50, 60.40}, {"Little Mexico", 1701.90, -1842.20, -89.00, 1812.60, -1722.20, 110.90}, {"Little Mexico", 1758.90, -1722.20, -89.00, 1812.60, -1577.50, 110.90}, {"Los Flores", 2581.70, -1454.30, -89.00, 2632.80, -1393.40, 110.90}, {"Los Flores", 2581.70, -1393.40, -89.00, 2747.70, -1135.00, 110.90}, {"Los Santos International", 1249.60, -2394.30, -89.00, 1852.00, -2179.20, 110.90}, {"Los Santos International", 1852.00, -2394.30, -89.00, 2089.00, -2179.20, 110.90}, {"Los Santos International", 1382.70, -2730.80, -89.00, 2201.80, -2394.30, 110.90}, {"Los Santos International", 1974.60, -2394.30, -39.00, 2089.00, -2256.50, 60.90}, {"Los Santos International", 1400.90, -2669.20, -39.00, 2189.80, -2597.20, 60.90}, {"Los Santos International", 2051.60, -2597.20, -39.00, 2152.40, -2394.30, 60.90}, {"Marina", 647.70, -1804.20, -89.00, 851.40, -1577.50, 110.90}, {"Marina", 647.70, -1577.50, -89.00, 807.90, -1416.20, 110.90}, {"Marina", 807.90, -1577.50, -89.00, 926.90, -1416.20, 110.90}, {"Market", 787.40, -1416.20, -89.00, 1072.60, -1310.20, 110.90}, {"Market", 952.60, -1310.20, -89.00, 1072.60, -1130.80, 110.90}, {"Market", 1072.60, -1416.20, -89.00, 1370.80, -1130.80, 110.90}, {"Market", 926.90, -1577.50, -89.00, 1370.80, -1416.20, 110.90}, {"Market Station", 787.40, -1410.90, -34.10, 866.00, -1310.20, 65.80}, {"Martin Bridge", -222.10, 293.30, 0.00, -122.10, 476.40, 200.00}, {"Missionary Hill", -2994.40, -811.20, 0.00, -2178.60, -430.20, 200.00}, {"Montgomery", 1119.50, 119.50, -3.00, 1451.40, 493.30, 200.00}, {"Montgomery", 1451.40, 347.40, -6.10, 1582.40, 420.80, 200.00}, {"Montgomery Intersection", 1546.60, 208.10, 0.00, 1745.80, 347.40, 200.00}, {"Montgomery Intersection", 1582.40, 347.40, 0.00, 1664.60, 401.70, 200.00}, {"Mulholland", 1414.00, -768.00, -89.00, 1667.60, -452.40, 110.90}, {"Mulholland", 1281.10, -452.40, -89.00, 1641.10, -290.90, 110.90}, {"Mulholland", 1269.10, -768.00, -89.00, 1414.00, -452.40, 110.90}, {"Mulholland", 1357.00, -926.90, -89.00, 1463.90, -768.00, 110.90}, {"Mulholland", 1318.10, -910.10, -89.00, 1357.00, -768.00, 110.90}, {"Mulholland", 1169.10, -910.10, -89.00, 1318.10, -768.00, 110.90}, {"Mulholland", 768.60, -954.60, -89.00, 952.60, -860.60, 110.90}, {"Mulholland", 687.80, -860.60, -89.00, 911.80, -768.00, 110.90}, {"Mulholland", 737.50, -768.00, -89.00, 1142.20, -674.80, 110.90}, {"Mulholland", 1096.40, -910.10, -89.00, 1169.10, -768.00, 110.90}, {"Mulholland", 952.60, -937.10, -89.00, 1096.40, -860.60, 110.90}, {"Mulholland", 911.80, -860.60, -89.00, 1096.40, -768.00, 110.90}, {"Mulholland", 861.00, -674.80, -89.00, 1156.50, -600.80, 110.90}, {"Mulholland Intersection", 1463.90, -1150.80, -89.00, 1812.60, -768.00, 110.90}, {"North Rock", 2285.30, -768.00, 0.00, 2770.50, -269.70, 200.00}, {"Ocean Docks", 2373.70, -2697.00, -89.00, 2809.20, -2330.40, 110.90}, {"Ocean Docks", 2201.80, -2418.30, -89.00, 2324.00, -2095.00, 110.90}, {"Ocean Docks", 2324.00, -2302.30, -89.00, 2703.50, -2145.10, 110.90}, {"Ocean Docks", 2089.00, -2394.30, -89.00, 2201.80, -2235.80, 110.90}, {"Ocean Docks", 2201.80, -2730.80, -89.00, 2324.00, -2418.30, 110.90}, {"Ocean Docks", 2703.50, -2302.30, -89.00, 2959.30, -2126.90, 110.90}, {"Ocean Docks", 2324.00, -2145.10, -89.00, 2703.50, -2059.20, 110.90}, {"Ocean Flats", -2994.40, 277.40, -9.10, -2867.80, 458.40, 200.00}, {"Ocean Flats", -2994.40, -222.50, -0.00, -2593.40, 277.40, 200.00}, {"Ocean Flats", -2994.40, -430.20, -0.00, -2831.80, -222.50, 200.00}, {"Octane Springs", 338.60, 1228.50, 0.00, 664.30, 1655.00, 200.00}, {"Old Venturas Strip", 2162.30, 2012.10, -89.00, 2685.10, 2202.70, 110.90}, {"Palisades", -2994.40, 458.40, -6.10, -2741.00, 1339.60, 200.00}, {"Palomino Creek", 2160.20, -149.00, 0.00, 2576.90, 228.30, 200.00}, {"Paradiso", -2741.00, 793.40, -6.10, -2533.00, 1268.40, 200.00}, {"Pershing Square", 1440.90, -1722.20, -89.00, 1583.50, -1577.50, 110.90}, {"Pilgrim", 2437.30, 1383.20, -89.00, 2624.40, 1783.20, 110.90}, {"Pilgrim", 2624.40, 1383.20, -89.00, 2685.10, 1783.20, 110.90}, {"Pilson Intersection", 1098.30, 2243.20, -89.00, 1377.30, 2507.20, 110.90}, {"Pirates in Men's Pants", 1817.30, 1469.20, -89.00, 2027.40, 1703.20, 110.90}, {"Playa del Seville", 2703.50, -2126.90, -89.00, 2959.30, -1852.80, 110.90}, {"Prickle Pine", 1534.50, 2583.20, -89.00, 1848.40, 2863.20, 110.90}, {"Prickle Pine", 1117.40, 2507.20, -89.00, 1534.50, 2723.20, 110.90}, {"Prickle Pine", 1848.40, 2553.40, -89.00, 1938.80, 2863.20, 110.90}, {"Prickle Pine", 1938.80, 2624.20, -89.00, 2121.40, 2861.50, 110.90}, {"Queens", -2533.00, 458.40, 0.00, -2329.30, 578.30, 200.00}, {"Queens", -2593.40, 54.70, 0.00, -2411.20, 458.40, 200.00}, {"Queens", -2411.20, 373.50, 0.00, -2253.50, 458.40, 200.00}, {"Randolph Industrial Estate", 1558.00, 596.30, -89.00, 1823.00, 823.20, 110.90}, {"Redsands East", 1817.30, 2011.80, -89.00, 2106.70, 2202.70, 110.90}, {"Redsands East", 1817.30, 2202.70, -89.00, 2011.90, 2342.80, 110.90}, {"Redsands East", 1848.40, 2342.80, -89.00, 2011.90, 2478.40, 110.90}, {"Redsands West", 1236.60, 1883.10, -89.00, 1777.30, 2142.80, 110.90}, {"Redsands West", 1297.40, 2142.80, -89.00, 1777.30, 2243.20, 110.90}, {"Redsands West", 1377.30, 2243.20, -89.00, 1704.50, 2433.20, 110.90}, {"Redsands West", 1704.50, 2243.20, -89.00, 1777.30, 2342.80, 110.90}, {"Regular Tom", -405.70, 1712.80, -3.00, -276.70, 1892.70, 200.00}, {"Richman", 647.50, -1118.20, -89.00, 787.40, -954.60, 110.90}, {"Richman", 647.50, -954.60, -89.00, 768.60, -860.60, 110.90}, {"Richman", 225.10, -1369.60, -89.00, 334.50, -1292.00, 110.90}, {"Richman", 225.10, -1292.00, -89.00, 466.20, -1235.00, 110.90}, {"Richman", 72.60, -1404.90, -89.00, 225.10, -1235.00, 110.90}, {"Richman", 72.60, -1235.00, -89.00, 321.30, -1008.10, 110.90}, {"Richman", 321.30, -1235.00, -89.00, 647.50, -1044.00, 110.90}, {"Richman", 321.30, -1044.00, -89.00, 647.50, -860.60, 110.90}, {"Richman", 321.30, -860.60, -89.00, 687.80, -768.00, 110.90}, {"Richman", 321.30, -768.00, -89.00, 700.70, -674.80, 110.90}, {"Robada Intersection", -1119.00, 1178.90, -89.00, -862.00, 1351.40, 110.90}, {"Roca Escalante", 2237.40, 2202.70, -89.00, 2536.40, 2542.50, 110.90}, {"Roca Escalante", 2536.40, 2202.70, -89.00, 2625.10, 2442.50, 110.90}, {"Rockshore East", 2537.30, 676.50, -89.00, 2902.30, 943.20, 110.90}, {"Rockshore West", 1997.20, 596.30, -89.00, 2377.30, 823.20, 110.90}, {"Rockshore West", 2377.30, 596.30, -89.00, 2537.30, 788.80, 110.90}, {"Rodeo", 72.60, -1684.60, -89.00, 225.10, -1544.10, 110.90}, {"Rodeo", 72.60, -1544.10, -89.00, 225.10, -1404.90, 110.90}, {"Rodeo", 225.10, -1684.60, -89.00, 312.80, -1501.90, 110.90}, {"Rodeo", 225.10, -1501.90, -89.00, 334.50, -1369.60, 110.90}, {"Rodeo", 334.50, -1501.90, -89.00, 422.60, -1406.00, 110.90}, {"Rodeo", 312.80, -1684.60, -89.00, 422.60, -1501.90, 110.90}, {"Rodeo", 422.60, -1684.60, -89.00, 558.00, -1570.20, 110.90}, {"Rodeo", 558.00, -1684.60, -89.00, 647.50, -1384.90, 110.90}, {"Rodeo", 466.20, -1570.20, -89.00, 558.00, -1385.00, 110.90}, {"Rodeo", 422.60, -1570.20, -89.00, 466.20, -1406.00, 110.90}, {"Rodeo", 466.20, -1385.00, -89.00, 647.50, -1235.00, 110.90}, {"Rodeo", 334.50, -1406.00, -89.00, 466.20, -1292.00, 110.90}, {"Royal Casino", 2087.30, 1383.20, -89.00, 2437.30, 1543.20, 110.90}, {"San Andreas Sound", 2450.30, 385.50, -100.00, 2759.20, 562.30, 200.00}, {"Santa Flora", -2741.00, 458.40, -7.60, -2533.00, 793.40, 200.00}, {"Santa Maria Beach", 342.60, -2173.20, -89.00, 647.70, -1684.60, 110.90}, {"Santa Maria Beach", 72.60, -2173.20, -89.00, 342.60, -1684.60, 110.90}, {"Shady Cabin", -1632.80, -2263.40, -3.00, -1601.30, -2231.70, 200.00}, {"Shady Creeks", -1820.60, -2643.60, -8.00, -1226.70, -1771.60, 200.00}, {"Shady Creeks", -2030.10, -2174.80, -6.10, -1820.60, -1771.60, 200.00}, {"Sobell Rail Yards", 2749.90, 1548.90, -89.00, 2923.30, 1937.20, 110.90}, {"Spinybed", 2121.40, 2663.10, -89.00, 2498.20, 2861.50, 110.90}, {"Starfish Casino", 2437.30, 1783.20, -89.00, 2685.10, 2012.10, 110.90}, {"Starfish Casino", 2437.30, 1858.10, -39.00, 2495.00, 1970.80, 60.90}, {"Starfish Casino", 2162.30, 1883.20, -89.00, 2437.30, 2012.10, 110.90}, {"Temple", 1252.30, -1130.80, -89.00, 1378.30, -1026.30, 110.90}, {"Temple", 1252.30, -1026.30, -89.00, 1391.00, -926.90, 110.90}, {"Temple", 1252.30, -926.90, -89.00, 1357.00, -910.10, 110.90}, {"Temple", 952.60, -1130.80, -89.00, 1096.40, -937.10, 110.90}, {"Temple", 1096.40, -1130.80, -89.00, 1252.30, -1026.30, 110.90}, {"Temple", 1096.40, -1026.30, -89.00, 1252.30, -910.10, 110.90}, {"The Camel's Toe", 2087.30, 1203.20, -89.00, 2640.40, 1383.20, 110.90}, {"The Clown's Pocket", 2162.30, 1783.20, -89.00, 2437.30, 1883.20, 110.90}, {"The Emerald Isle", 2011.90, 2202.70, -89.00, 2237.40, 2508.20, 110.90}, {"The Farm", -1209.60, -1317.10, 114.90, -908.10, -787.30, 251.90}, {"The Four Dragons Casino", 1817.30, 863.20, -89.00, 2027.30, 1083.20, 110.90}, {"The High Roller", 1817.30, 1283.20, -89.00, 2027.30, 1469.20, 110.90}, {"The Mako Span", 1664.60, 401.70, 0.00, 1785.10, 567.20, 200.00}, {"The Panopticon", -947.90, -304.30, -1.10, -319.60, 327.00, 200.00}, {"The Pink Swan", 1817.30, 1083.20, -89.00, 2027.30, 1283.20, 110.90}, {"The Sherman Dam", -968.70, 1929.40, -3.00, -481.10, 2155.20, 200.00}, {"The Strip", 2027.40, 863.20, -89.00, 2087.30, 1703.20, 110.90}, {"The Strip", 2106.70, 1863.20, -89.00, 2162.30, 2202.70, 110.90}, {"The Strip", 2027.40, 1783.20, -89.00, 2162.30, 1863.20, 110.90}, {"The Strip", 2027.40, 1703.20, -89.00, 2137.40, 1783.20, 110.90}, {"The Visage", 1817.30, 1863.20, -89.00, 2106.70, 2011.80, 110.90}, {"The Visage", 1817.30, 1703.20, -89.00, 2027.40, 1863.20, 110.90}, {"Unity Station", 1692.60, -1971.80, -20.40, 1812.60, -1932.80, 79.50}, {"Valle Ocultado", -936.60, 2611.40, 2.00, -715.90, 2847.90, 200.00}, {"Verdant Bluffs", 930.20, -2488.40, -89.00, 1249.60, -2006.70, 110.90}, {"Verdant Bluffs", 1073.20, -2006.70, -89.00, 1249.60, -1842.20, 110.90}, {"Verdant Bluffs", 1249.60, -2179.20, -89.00, 1692.60, -1842.20, 110.90}, {"Verdant Meadows", 37.00, 2337.10, -3.00, 435.90, 2677.90, 200.00}, {"Verona Beach", 647.70, -2173.20, -89.00, 930.20, -1804.20, 110.90}, {"Verona Beach", 930.20, -2006.70, -89.00, 1073.20, -1804.20, 110.90}, {"Verona Beach", 851.40, -1804.20, -89.00, 1046.10, -1577.50, 110.90}, {"Verona Beach", 1161.50, -1722.20, -89.00, 1323.90, -1577.50, 110.90}, {"Verona Beach", 1046.10, -1722.20, -89.00, 1161.50, -1577.50, 110.90}, {"Vinewood", 787.40, -1310.20, -89.00, 952.60, -1130.80, 110.90}, {"Vinewood", 787.40, -1130.80, -89.00, 952.60, -954.60, 110.90}, {"Vinewood", 647.50, -1227.20, -89.00, 787.40, -1118.20, 110.90}, {"Vinewood", 647.70, -1416.20, -89.00, 787.40, -1227.20, 110.90}, {"Whitewood Estates", 883.30, 1726.20, -89.00, 1098.30, 2507.20, 110.90}, {"Whitewood Estates", 1098.30, 1726.20, -89.00, 1197.30, 2243.20, 110.90}, {"Willowfield", 1970.60, -2179.20, -89.00, 2089.00, -1852.80, 110.90}, {"Willowfield", 2089.00, -2235.80, -89.00, 2201.80, -1989.90, 110.90}, {"Willowfield", 2089.00, -1989.90, -89.00, 2324.00, -1852.80, 110.90}, {"Willowfield", 2201.80, -2095.00, -89.00, 2324.00, -1989.90, 110.90}, {"Willowfield", 2541.70, -1941.40, -89.00, 2703.50, -1852.80, 110.90}, {"Willowfield", 2324.00, -2059.20, -89.00, 2541.70, -1852.80, 110.90}, {"Willowfield", 2541.70, -2059.20, -89.00, 2703.50, -1941.40, 110.90}, {"Yellow Bell Station", 1377.40, 2600.40, -21.90, 1492.40, 2687.30, 78.00}, {"Los Santos", 44.60, -2892.90, -242.90, 2997.00, -768.00, 900.00}, {"Las Venturas", 869.40, 596.30, -242.90, 2997.00, 2993.80, 900.00}, {"Bone County", -480.50, 596.30, -242.90, 869.40, 2993.80, 900.00}, {"Tierra Robada", -2997.40, 1659.60, -242.90, -480.50, 2993.80, 900.00}, {"Tierra Robada", -1213.90, 596.30, -242.90, -480.50, 1659.60, 900.00}, {"San Fierro", -2997.40, -1115.50, -242.90, -1213.90, 1659.60, 900.00}, {"Red County", -1213.90, -768.00, -242.90, 2997.00, 596.30, 900.00}, {"Flint County", -1213.90, -2892.90, -242.90, 44.60, -768.00, 900.00}, {"Whetstone", -2997.40, -2892.90, -242.90, -1213.90, -1115.50, 900.00} }; // --------------------------------------- native WP_Hash(buffer[], len, const str[]); native IsValidVehicle(vehicleid); // --------------------------------------- main(){} GetDate() { new date[5], string[24]; getdate(date[0], date[1], date[2]); gettime(date[3], date[4]); format(string, sizeof(string), "%i-%02d-%02d %02d:%02d", date[0], date[1], date[2], date[3], date[4]); return string; } GetAdminRank(playerid) { new string[24]; switch(PlayerInfo[playerid][pAdmin]) { case 0: string = "None"; case 1: string = "Secret Admin"; case 2: string = "Junior Admin"; case 3: string = "General Admin"; case 4: string = "Senior Admin"; case 5: string = "Head Admin"; case 6: string = "Assistant Manager"; case 7: string = "Community Manager"; } return string; } GetHelperRank(playerid) { new string[24]; switch(PlayerInfo[playerid][pHelper]) { case 0: string = "None"; case 1: string = "Junior Helper"; case 2: string = "Senior Helper"; case 3: string = "Asst. Head Helper"; case 4: string = "Head Helper"; } return string; } GetPlayerIP(playerid) { new ip[16]; GetPlayerIp(playerid, ip, sizeof(ip)); return ip; } GetPlayerIPRange(playerid, ch = '*') { new string[16], part[2]; if(!sscanf(GetPlayerIP(playerid), "p<.>ii{ii}", part[0], part[1])) { format(string, sizeof(string), "%i.%i.%c.%c", part[0], part[1], ch, ch); } return string; } /*GetBoneName(boneid) { new string[16]; switch(boneid) { case 1: string = "Spine"; case 2: string = "Head"; case 3: string = "Left upper arm"; case 4: string = "Right upper arm"; case 5: string = "Left hand"; case 6: string = "Right hand"; case 7: string = "Left thigh"; case 8: string = "Right thigh"; case 9: string = "Left foot"; case 10: string = "Right foot"; case 11: string = "Right calf"; case 12: string = "Left calf"; case 13: string = "Left forearm"; case 14: string = "Right forearm"; case 15: string = "Left shoulder"; case 16: string = "Right shoulder"; case 17: string = "Neck"; case 18: string = "Jaw"; } return string; }*/ GetDeathReason(reason) { new string[24]; switch(reason) { case 0: string = "Fists"; case 18: string = "Molotov Cocktail"; case 44: string = "Nightvision Goggles"; case 45: string = "Infrared Goggles"; case 49: string = "Vehicle"; case 50: string = "Helicopter Blades"; case 51: string = "Explosion"; case 53: string = "Drowned"; case 54: string = "Splat"; default: GetWeaponName(reason, string, sizeof(string)); } return string; } GetWeaponNameEx(weaponid) { new weapon[24]; GetWeaponName(weaponid, weapon, sizeof(weapon)); switch(weaponid) { case 0: weapon = "None"; case 18: weapon = "Molotov Cocktail"; case 44: weapon = "Nightvision Goggles"; case 45: weapon = "Infrared Goggles"; } return weapon; } GetVIPRank(level) { new string[16]; switch(level) { case 0: string = "None"; case 1: string = "Limited"; case 2: string = "Limitless"; case 3: string = "Legendary"; } return string; } GetJobName(jobid) { new name[32]; if(jobid == JOB_NONE) name = "None"; else strcat(name, jobLocations[jobid][jobName]); return name; } IncreaseJobSkill(playerid, jobid) { if((gDoubleXP) || PlayerInfo[playerid][pDoubleXP] > 0) { GiveJobSkill(playerid, jobid); } GiveJobSkill(playerid, jobid); } GiveJobSkill(playerid, jobid) { new level = GetJobLevel(playerid, jobid); switch(jobid) { case JOB_COURIER: { PlayerInfo[playerid][pCourierSkill]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET courierskill = courierskill + 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); if(GetJobLevel(playerid, jobid) != level) { SendClientMessageEx(playerid, COLOR_GREEN, "Your courier skill level is now %i/5. You will deliver more products and earn more money now.", level + 1); } } case JOB_FISHERMAN: { PlayerInfo[playerid][pFishingSkill]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fishingskill = fishingskill + 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); if(GetJobLevel(playerid, jobid) != level) { SendClientMessageEx(playerid, COLOR_GREEN, "Your fishing skill level is now %i/5. You will catch bigger fish and your cooldowns are reduced.", level + 1); } } case JOB_BODYGUARD: { PlayerInfo[playerid][pGuardSkill]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET guardskill = guardskill + 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); if(GetJobLevel(playerid, jobid) != level) { SendClientMessageEx(playerid, COLOR_GREEN, "Your bodyguard skill level is now %i/5. Vests that you sell will now contain extra armor.", level + 1); } } case JOB_WEAPONDEALER: { PlayerInfo[playerid][pWeaponSkill]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weaponskill = weaponskill + 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); if(GetJobLevel(playerid, jobid) != level) { SendClientMessageEx(playerid, COLOR_GREEN, "Your weapons dealer skill level is now %i/5. You have unlocked more weapons.", level + 1); } } case JOB_MECHANIC: { PlayerInfo[playerid][pMechanicSkill]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET mechanicskill = mechanicskill + 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); if(GetJobLevel(playerid, jobid) != level) { SendClientMessageEx(playerid, COLOR_GREEN, "Your mechanic skill level is now %i/5. You will now pay less for components.", level + 1); } } case JOB_DRUGDEALER: { PlayerInfo[playerid][pSmugglerSkill]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET smugglerskill = smugglerskill + 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); if(GetJobLevel(playerid, jobid) != level) { SendClientMessageEx(playerid, COLOR_GREEN, "Your drug smuggler skill level is now %i/5. You will now earn more cash for smuggling.", level + 1); } } case JOB_LAWYER: { PlayerInfo[playerid][pLawyerSkill]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET lawyerskill = lawyerskill + 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); if(GetJobLevel(playerid, jobid) != level) { SendClientMessageEx(playerid, COLOR_GREEN, "Your lawyer skill level is now %i/5. Your cooldown times are reduced and you can free people for more time.", level + 1); } } case JOB_DETECTIVE: { PlayerInfo[playerid][pDetectiveSkill]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET detectiveskill = detectiveskill + 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); if(GetJobLevel(playerid, jobid) != level) { SendClientMessageEx(playerid, COLOR_GREEN, "Your detective skill level is now %i/5. Your cooldown times are now reduced.", level + 1); } } } } GetJobLevel(playerid, jobid) { if(jobid == JOB_COURIER) { if(0 <= PlayerInfo[playerid][pCourierSkill] <= 49) { return 1; } else if(50 <= PlayerInfo[playerid][pCourierSkill] <= 99) { return 2; } else if(100 <= PlayerInfo[playerid][pCourierSkill] <= 199) { return 3; } else if(200 <= PlayerInfo[playerid][pCourierSkill] <= 349) { return 4; } else if(PlayerInfo[playerid][pCourierSkill] >= 350) { return 5; } } else if(jobid == JOB_FISHERMAN) { if(0 <= PlayerInfo[playerid][pFishingSkill] <= 49) { return 1; } else if(50 <= PlayerInfo[playerid][pFishingSkill] <= 99) { return 2; } else if(100 <= PlayerInfo[playerid][pFishingSkill] <= 199) { return 3; } else if(200 <= PlayerInfo[playerid][pFishingSkill] <= 349) { return 4; } else if(PlayerInfo[playerid][pFishingSkill] >= 350) { return 5; } } else if(jobid == JOB_BODYGUARD) { if(0 <= PlayerInfo[playerid][pGuardSkill] <= 24) { return 1; } else if(25 <= PlayerInfo[playerid][pGuardSkill] <= 49) { return 2; } else if(50 <= PlayerInfo[playerid][pGuardSkill] <= 99) { return 3; } else if(100 <= PlayerInfo[playerid][pGuardSkill] <= 199) { return 4; } else if(PlayerInfo[playerid][pGuardSkill] >= 200) { return 5; } } else if(jobid == JOB_WEAPONDEALER) { if(0 <= PlayerInfo[playerid][pWeaponSkill] <= 49) { return 1; } else if(50 <= PlayerInfo[playerid][pWeaponSkill] <= 99) { return 2; } else if(100 <= PlayerInfo[playerid][pWeaponSkill] <= 199) { return 3; } else if(200 <= PlayerInfo[playerid][pWeaponSkill] <= 499) { return 4; } else if(PlayerInfo[playerid][pWeaponSkill] >= 500) { return 5; } } else if(jobid == JOB_MECHANIC) { if(0 <= PlayerInfo[playerid][pMechanicSkill] <= 24) { return 1; } else if(25 <= PlayerInfo[playerid][pMechanicSkill] <= 49) { return 2; } else if(50 <= PlayerInfo[playerid][pMechanicSkill] <= 99) { return 3; } else if(100 <= PlayerInfo[playerid][pMechanicSkill] <= 199) { return 4; } else if(PlayerInfo[playerid][pMechanicSkill] >= 200) { return 5; } } else if(jobid == JOB_DRUGDEALER) { if(0 <= PlayerInfo[playerid][pSmugglerSkill] <= 24) { return 1; } else if(25 <= PlayerInfo[playerid][pSmugglerSkill] <= 49) { return 2; } else if(50 <= PlayerInfo[playerid][pSmugglerSkill] <= 74) { return 3; } else if(75 <= PlayerInfo[playerid][pSmugglerSkill] <= 99) { return 4; } else if(PlayerInfo[playerid][pSmugglerSkill] >= 100) { return 5; } } else if(jobid == JOB_LAWYER) { if(0 <= PlayerInfo[playerid][pLawyerSkill] <= 24) { return 1; } else if(25 <= PlayerInfo[playerid][pLawyerSkill] <= 49) { return 2; } else if(50 <= PlayerInfo[playerid][pLawyerSkill] <= 99) { return 3; } else if(100 <= PlayerInfo[playerid][pLawyerSkill] <= 199) { return 4; } else if(PlayerInfo[playerid][pLawyerSkill] >= 200) { return 5; } } else if(jobid == JOB_DETECTIVE) { if(0 <= PlayerInfo[playerid][pDetectiveSkill] <= 49) { return 1; } else if(50 <= PlayerInfo[playerid][pDetectiveSkill] <= 99) { return 2; } else if(100 <= PlayerInfo[playerid][pDetectiveSkill] <= 199) { return 3; } else if(200 <= PlayerInfo[playerid][pDetectiveSkill] <= 399) { return 4; } else if(PlayerInfo[playerid][pDetectiveSkill] >= 400) { return 5; } } return 0; } GetPlayerCapacity(playerid, item) { switch(item) { case CAPACITY_MATERIALS: { return 50000 + (PlayerInfo[playerid][pInventoryUpgrade] * 10000); } case CAPACITY_WEED: { switch(PlayerInfo[playerid][pInventoryUpgrade]) { case 0: return 50; case 1: return 75; case 2: return 100; case 3: return 125; case 4: return 150; case 5: return 200; } } case CAPACITY_COCAINE: { switch(PlayerInfo[playerid][pInventoryUpgrade]) { case 0: return 25; case 1: return 50; case 2: return 75; case 3: return 100; case 4: return 125; case 5: return 150; } } case CAPACITY_METH: { switch(PlayerInfo[playerid][pInventoryUpgrade]) { case 0: return 20; case 1: return 40; case 2: return 60; case 3: return 80; case 4: return 100; case 5: return 150; } } case CAPACITY_PAINKILLERS: { switch(PlayerInfo[playerid][pInventoryUpgrade]) { case 0: return 5; case 1: return 10; case 2: return 15; case 3: return 20; case 4: return 25; case 5: return 30; } } case CAPACITY_SEEDS: { switch(PlayerInfo[playerid][pInventoryUpgrade]) { case 0: return 10; case 1: return 20; case 2: return 30; case 3: return 40; case 4: return 50; case 5: return 60; } } case CAPACITY_EPHEDRINE: { switch(PlayerInfo[playerid][pInventoryUpgrade]) { case 0: return 10; case 1: return 15; case 2: return 20; case 3: return 25; case 4: return 30; case 5: return 40; } } case CAPACITY_HPAMMO: { switch(PlayerInfo[playerid][pInventoryUpgrade]) { case 0: return 50; case 1: return 75; case 2: return 100; case 3: return 125; case 4: return 150; case 5: return 175; } } case CAPACITY_POISONAMMO: { switch(PlayerInfo[playerid][pInventoryUpgrade]) { case 0: return 40; case 1: return 55; case 2: return 70; case 3: return 85; case 4: return 100; case 5: return 120; } } case CAPACITY_FMJAMMO: { switch(PlayerInfo[playerid][pInventoryUpgrade]) { case 0: return 30; case 1: return 35; case 2: return 40; case 3: return 45; case 4: return 50; case 5: return 60; } } } return 0; } GetPlayerAssetCount(playerid, type) { new count; switch(type) { case LIMIT_HOUSES: { for(new i = 0; i < MAX_HOUSES; i ++) { if(HouseInfo[i][hExists] && IsHouseOwner(playerid, i)) { count++; } } } case LIMIT_BUSINESSES: { for(new i = 0; i < MAX_BUSINESSES; i ++) { if(BusinessInfo[i][bExists] && IsBusinessOwner(playerid, i)) { count++; } } } case LIMIT_GARAGES: { for(new i = 0; i < MAX_GARAGES; i ++) { if(GarageInfo[i][gExists] && IsGarageOwner(playerid, i)) { count++; } } } } return count; } GetPlayerAssetLimit(playerid, type) { switch(type) { case LIMIT_HOUSES: { switch(PlayerInfo[playerid][pVIPPackage]) { case 2: return 4; case 3: return 6; } switch(PlayerInfo[playerid][pAssetUpgrade]) { case 0, 1: return 1; case 2, 3: return 2; case 4: return 3; } } case LIMIT_BUSINESSES: { switch(PlayerInfo[playerid][pAssetUpgrade]) { case 0, 1: return 1; case 2, 3: return 2; case 4: return 3; } } case LIMIT_GARAGES: { switch(PlayerInfo[playerid][pAssetUpgrade]) { case 0, 1: return 1; case 2, 3: return 2; case 4: return 3; } } case LIMIT_VEHICLES: { switch(PlayerInfo[playerid][pVIPPackage]) { case 1: return 10; case 2: return 15; case 3: return 20; } switch(PlayerInfo[playerid][pAssetUpgrade]) { case 0: return 3; case 1: return 4; case 2: return 5; case 3: return 7; case 4: return 10; } } } return 0; } DeployObject(type, Float:x, Float:y, Float:z, Float:angle) { for(new i = 0; i < MAX_DEPLOYABLES; i ++) { if(!DeployInfo[i][dExists]) { DeployInfo[i][dExists] = 1; DeployInfo[i][dType] = type; DeployInfo[i][dPosX] = x; DeployInfo[i][dPosY] = y; DeployInfo[i][dPosZ] = z; DeployInfo[i][dPosA] = angle; if(type == DEPLOY_SPIKESTRIP) { DeployInfo[i][dObject] = CreateDynamicObject(2899, x + 1.0 * floatsin(-angle, degrees), y + 1.0 * floatcos(-angle, degrees), z - 0.9, 0.0, 0.0, angle + 90.0); } else if(type == DEPLOY_CONE) { DeployInfo[i][dObject] = CreateDynamicObject(1238, x + 1.0 * floatsin(-angle, degrees), y + 1.0 * floatcos(-angle, degrees), z - 0.7, 0.0, 0.0, angle); } else if(type == DEPLOY_ROADBLOCK) { DeployInfo[i][dObject] = CreateDynamicObject(981, x + 3.0 * floatsin(-angle, degrees), y + 3.0 * floatcos(-angle, degrees), z, 0.0, 0.0, angle); } else if(type == DEPLOY_BARREL) { DeployInfo[i][dObject] = CreateDynamicObject(1237, x + 1.0 * floatsin(-angle, degrees), y + 1.0 * floatcos(-angle, degrees), z - 1.0, 0.0, 0.0, angle); } else if(type == DEPLOY_FLARE) { DeployInfo[i][dObject] = CreateDynamicObject(18728, x, y, z - 1.4, 0.0, 0.0, angle); } return i; } } return -1; } IsFireActive() { for(new i = 0; i < MAX_FIRES; i ++) { if(IsValidDynamicObject(gFireObjects[i])) { return 1; } } return 0; } HandleContract(playerid, killerid) { if(GetFactionType(killerid) == FACTION_HITMAN && PlayerInfo[killerid][pContractTaken] == playerid) { new price = PlayerInfo[playerid][pContracted]; SendClientMessageEx(killerid, COLOR_YELLOW, "You have completed your contract on %s and received $%i.", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_YELLOW, "You have been killed by a hitman and lost $%i.", price); GivePlayerCash(playerid, -price); GivePlayerCash(killerid, price); PlayerInfo[killerid][pContractTaken] = INVALID_PLAYER_ID; PlayerInfo[killerid][pCompletedHits]++; PlayerInfo[playerid][pContracted] = 0; PlayerInfo[playerid][pContractBy] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET contracted = 0, contractby = 'Nobody' WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET completedhits = %i WHERE uid = %i", PlayerInfo[killerid][pCompletedHits], PlayerInfo[killerid][pID]); mysql_tquery(connectionID, queryBuffer); foreach(new i : Player) { if(PlayerInfo[i][pContractTaken] == playerid) { PlayerInfo[i][pContractTaken] = INVALID_PLAYER_ID; } } Log_Write("log_contracts", "%s (uid: %i) successfully completed their hit on %s (uid: %i) for $%i.", GetPlayerRPName(killerid), PlayerInfo[killerid][pID], GetPlayerRPName(playerid), PlayerInfo[playerid][pID], price); } else if(PlayerInfo[playerid][pContractTaken] == killerid) { new price = PlayerInfo[killerid][pContracted]; SendClientMessageEx(playerid, COLOR_YELLOW, "You have failed your contract on %s and lost $%i.", GetPlayerRPName(playerid), price); SendClientMessageEx(killerid, COLOR_YELLOW, "You have killed a hitman chasing after you and received $%i. The contract on your head has been removed.", price); GivePlayerCash(playerid, -price); GivePlayerCash(killerid, price); PlayerInfo[playerid][pContractTaken] = INVALID_PLAYER_ID; PlayerInfo[playerid][pFailedHits]++; PlayerInfo[killerid][pContracted] = 0; PlayerInfo[killerid][pContractBy] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET contracted = 0, contractby = 'Nobody' WHERE uid = %i", PlayerInfo[killerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET failedhits = %i WHERE uid = %i", PlayerInfo[playerid][pFailedHits], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); foreach(new i : Player) { if(PlayerInfo[i][pContractTaken] == killerid) { PlayerInfo[i][pContractTaken] = INVALID_PLAYER_ID; } } Log_Write("log_contracts", "%s (uid: %i) failed their hit on %s (uid: %i) and lost $%i.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID], GetPlayerRPName(killerid), PlayerInfo[killerid][pID], price); } } GetPlayerNameEx(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); return name; } GetPlayerRPName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); for(new i = 0, l = strlen(name); i < l; i ++) { if(name[i] == '_') { name[i] = ' '; } } return name; } GetPlayerZoneName(playerid) { new zone[32], Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); if(GetInsideHouse(playerid) >= 0) zone = "House"; else if(GetInsideBusiness(playerid) >= 0) zone = "Business"; else if(GetInsideGarage(playerid) >= 0) zone = "Garage"; else if(GetPlayerInterior(playerid)) zone = "Interior"; else strcpy(zone, GetZoneName(x, y, z)); return zone; } GetPlayerPosEx(playerid, &Float:x, &Float:y, &Float:z) { new id; if((id = GetInsideHouse(playerid)) >= 0) { x = HouseInfo[id][hPosX]; y = HouseInfo[id][hPosY]; z = HouseInfo[id][hPosZ]; return 1; } else if((id = GetInsideBusiness(playerid)) >= 0) { x = BusinessInfo[id][bPosX]; y = BusinessInfo[id][bPosY]; z = BusinessInfo[id][bPosZ]; return 1; } else if((id = GetInsideGarage(playerid)) >= 0) { x = GarageInfo[id][gPosX]; y = GarageInfo[id][gPosY]; z = GarageInfo[id][gPosZ]; return 1; } else if((id = GetInsideEntrance(playerid)) >= 0) { x = EntranceInfo[id][ePosX]; y = EntranceInfo[id][ePosY]; z = EntranceInfo[id][ePosZ]; return 1; } else if(GetPlayerInterior(playerid)) { for(new i = 0; i < sizeof(staticEntrances); i ++) { if(IsPlayerInRangeOfPoint(playerid, 100.0, staticEntrances[i][eIntX], staticEntrances[i][eIntY], staticEntrances[i][eIntZ])) { x = staticEntrances[i][ePosX]; y = staticEntrances[i][ePosY]; z = staticEntrances[i][ePosZ]; return 1; } } } else { GetPlayerPos(playerid, x, y, z); return 1; } return 0; } GetVehicleZoneName(vehicleid) { new zone[32], Float:x, Float:y, Float:z; GetVehiclePos(vehicleid, x, y, z); if(GetVehicleVirtualWorld(vehicleid)) zone = "Garage"; else strcpy(zone, GetZoneName(x, y, z)); return zone; } GetZoneName(Float:x, Float:y, Float:z) { new zone[32]; for(new i = 0; i < sizeof(zoneArray); i ++) { if((zoneArray[i][zoneMinX] <= x <= zoneArray[i][zoneMaxX]) && (zoneArray[i][zoneMinY] <= y <= zoneArray[i][zoneMaxY]) && (zoneArray[i][zoneMinZ] <= z <= zoneArray[i][zoneMaxZ])) { strcpy(zone, zoneArray[i][zoneName]); return zone; } } return zone; } ClearChat(playerid) { for(new i = 0; i < 30; i ++) { SendClientMessage(playerid, -1, " "); } } Float:Streamer_GetExtraFloat(objectid, type) { new string[24]; getproperty(.id = objectid, .value = type, .string = string); strunpack(string, string); return floatstr(string); } Streamer_SetExtraFloat(objectid, type, Float:value) { new string[24]; format(string, sizeof(string), "%f", value); setproperty(.id = objectid, .value = type, .string = string); return 1; } Streamer_GetExtraInt(objectid, type) { new extra[11]; if(Streamer_GetArrayData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_EXTRA_ID, extra, sizeof(extra))) { return extra[type]; } return 0; } Streamer_SetExtraInt(objectid, type, value) { new extra[11]; if(Streamer_GetArrayData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_EXTRA_ID, extra, sizeof(extra))) { extra[type] = value; return Streamer_SetArrayData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_EXTRA_ID, extra, sizeof(extra)); } return 0; } SetDoubleXP(enable) { new hostname[128]; GetServerVarAsString("hostname", hostname, sizeof(hostname)); if(enable) { if(strfind(hostname, "Double XP") == -1) { format(hostname, sizeof(hostname), "hostname %s (Double XP)", hostname); SendRconCommand(hostname); } } else { new pos = strfind(hostname, " (Double XP)"); if(pos != -1) { hostname[pos] = 0; format(hostname, sizeof(hostname), "hostname %s", hostname); SendRconCommand(hostname); } } gDoubleXP = enable; } stock Float:DistanceCameraTargetToLocation(Float:cx, Float:cy, Float:cz, Float:ox, Float:oy, Float:oz, Float:vx, Float:vy, Float:vz) { new Float:x, Float:y, Float:z, Float:distance; distance = floatround(floatsqroot(((cx - ox) * (cx - ox)) + ((cy - oy) * (cy - oy)) + ((cz - oz) * (cz - oz)))); x = vx * distance + cx; y = vy * distance + cy; z = vz * distance + cz; return floatsqroot((x - ox) * (x - ox) + (y - oy) * (y - oy) + (z - oz) * (z - oz)); } GateCheck(playerid) { new id; if(IsPlayerInRangeOfPoint(playerid, 8.0, 1544.639892, -1631.008666, 13.252797)) // PD barrier { if(GetFactionType(playerid) != FACTION_POLICE) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to open this gate."); } if(!Streamer_GetExtraInt(gPDGates[0], E_OBJECT_OPENED)) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their remote to open the gate.", GetPlayerRPName(playerid)); MoveDynamicObject(gPDGates[0], 1544.689941, -1630.818481, 13.116797, 0.2, 0.000000, 0.000000, 90.000000); Streamer_SetExtraInt(gPDGates[0], E_OBJECT_OPENED, 1); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their remote to close the gate.", GetPlayerRPName(playerid)); MoveDynamicObject(gPDGates[0], 1544.639892, -1631.008666, 13.252797, 0.2, 0.000000, 90.000000, 90.000000); Streamer_SetExtraInt(gPDGates[0], E_OBJECT_OPENED, 0); } return 1; } else if(IsPlayerInRangeOfPoint(playerid, 8.0, 1588.042602, -1638.079956, 14.602818)) // PD garage gate { if(GetFactionType(playerid) != FACTION_POLICE) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to open this gate."); } if(!Streamer_GetExtraInt(gPDGates[1], E_OBJECT_OPENED)) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their remote to open the gate.", GetPlayerRPName(playerid)); MoveDynamicObject(gPDGates[1], 1597.332763, -1638.079956, 14.602818, 3.0); Streamer_SetExtraInt(gPDGates[1], E_OBJECT_OPENED, 1); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their remote to close the gate.", GetPlayerRPName(playerid)); MoveDynamicObject(gPDGates[1], 1588.042602, -1638.079956, 14.602818, 3.0); Streamer_SetExtraInt(gPDGates[1], E_OBJECT_OPENED, 0); } return 1; } else if(IsPlayerInRangeOfPoint(playerid, 8.0, 321.255279, -1488.601318, 25.281988)) // FBI garage gate { if(GetFactionType(playerid) != FACTION_FEDERAL) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to open this gate."); } if(!Streamer_GetExtraInt(gFBIGates[0], E_OBJECT_OPENED)) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their remote to open the gate.", GetPlayerRPName(playerid)); MoveDynamicObject(gFBIGates[0], 327.033508, -1492.691650, 25.281988, 3.0); Streamer_SetExtraInt(gFBIGates[0], E_OBJECT_OPENED, 1); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their remote to close the gate.", GetPlayerRPName(playerid)); MoveDynamicObject(gFBIGates[0], 321.255279, -1488.601318, 25.281988, 3.0); Streamer_SetExtraInt(gFBIGates[0], E_OBJECT_OPENED, 0); } return 1; } else if(IsPlayerInRangeOfPoint(playerid, 8.0, 283.590423, -1542.835083, 25.281988)) // FBI garage gate { if(GetFactionType(playerid) != FACTION_FEDERAL) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to open this gate."); } if(!Streamer_GetExtraInt(gFBIGates[1], E_OBJECT_OPENED)) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their remote to open the gate.", GetPlayerRPName(playerid)); MoveDynamicObject(gFBIGates[1], 289.593841, -1547.023071, 25.281988, 3.0); Streamer_SetExtraInt(gFBIGates[1], E_OBJECT_OPENED, 1); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their remote to close the gate.", GetPlayerRPName(playerid)); MoveDynamicObject(gFBIGates[1], 283.590423, -1542.835083, 25.281988, 3.0); Streamer_SetExtraInt(gFBIGates[1], E_OBJECT_OPENED, 0); } return 1; } if((id = GetNearbyLand(playerid)) >= 0 && (IsLandOwner(playerid, id) || PlayerInfo[playerid][pLandPerms] == id)) { for(new i = 0; i <= Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i ++) { if(IsValidDynamicObject(i) && IsGateObject(i) && IsPlayerInRangeOfPoint(playerid, 8.0, Streamer_GetExtraFloat(i, E_OBJECT_X), Streamer_GetExtraFloat(i, E_OBJECT_Y), Streamer_GetExtraFloat(i, E_OBJECT_Z)) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == LandInfo[id][lID]) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM landobjects WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID)); mysql_tquery(connectionID, queryBuffer, "OnPlayerUseLandGate", "ii", playerid, i); return 1; } } } return 0; } DoorCheck(playerid) { new Float:angle, id; for(new i = 0; i < sizeof(gPDDoors); i ++) { if(IsPlayerInRangeOfDynamicObject(playerid, gPDDoors[i], 3.0)) { if(GetFactionType(playerid) != FACTION_POLICE) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to open this door."); } Streamer_GetFloatData(STREAMER_TYPE_OBJECT, gPDDoors[i], E_STREAMER_R_Z, angle); if(!Streamer_GetExtraInt(gPDDoors[i], E_OBJECT_OPENED)) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their card to open the door.", GetPlayerRPName(playerid)); SetDynamicObjectRot(gPDDoors[i], 0.0000, 0.0000, angle + 90.0); Streamer_SetExtraInt(gPDDoors[i], E_OBJECT_OPENED, 1); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their card to close the door.", GetPlayerRPName(playerid)); SetDynamicObjectRot(gPDDoors[i], 0.0000, 0.0000, angle - 90.0); Streamer_SetExtraInt(gPDDoors[i], E_OBJECT_OPENED, 0); } return 1; } } for(new i = 0; i <= Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i ++) { if(IsValidDynamicObject(i) && IsPlayerInRangeOfDynamicObject(playerid, i, 2.5) && IsDoorObject(i)) { if((id = GetInsideHouse(playerid)) >= 0 && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_FURNITURE && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == HouseInfo[id][hID]) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT door_opened, door_locked FROM furniture WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID)); mysql_tquery(connectionID, queryBuffer, "OnPlayerUseFurnitureDoor", "iii", playerid, i, Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID)); return 1; } else if((id = GetNearbyLand(playerid)) >= 0 && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == LandInfo[id][lID]) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT door_opened, door_locked FROM landobjects WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID)); mysql_tquery(connectionID, queryBuffer, "OnPlayerUseLandDoor", "iii", playerid, i, Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID)); return 1; } } } return 0; } EnterCheck(playerid) { new id, string[40]; if((gettime() - PlayerInfo[playerid][pLastEnter]) < 3 && PlayerInfo[playerid][pAdminDuty] == 0) { return SendClientMessage(playerid, COLOR_GREY, "You need to wait before using this command again."); } if((id = GetNearbyHouse(playerid)) >= 0) { if(HouseInfo[id][hLocked]) { GameTextForPlayer(playerid, "~r~Locked", 5000, 1); return 0; } if(IsHouseOwner(playerid, id)) { HouseInfo[id][hTimestamp] = gettime(); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET timestamp = %i WHERE id = %i", gettime(), HouseInfo[id][hID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has entered their house.", GetPlayerRPName(playerid)); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has entered the house.", GetPlayerRPName(playerid)); } PlayerInfo[playerid][pLastEnter] = gettime(); SetPlayerPos(playerid, HouseInfo[id][hIntX], HouseInfo[id][hIntY], HouseInfo[id][hIntZ]); SetPlayerFacingAngle(playerid, HouseInfo[id][hIntA]); SetPlayerInterior(playerid, HouseInfo[id][hInterior]); SetPlayerVirtualWorld(playerid, HouseInfo[id][hWorld]); SetCameraBehindPlayer(playerid); return 1; } else if((id = GetNearbyGarage(playerid)) >= 0) { if(GarageInfo[id][gLocked]) { GameTextForPlayer(playerid, "~r~Locked", 5000, 1); return 0; } if(IsGarageOwner(playerid, id)) { GarageInfo[id][gTimestamp] = gettime(); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET timestamp = %i WHERE id = %i", gettime(), GarageInfo[id][gID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has entered their garage.", GetPlayerRPName(playerid)); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has entered the garage.", GetPlayerRPName(playerid)); } if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { TeleportToCoords(playerid, garageInteriors[GarageInfo[id][gType]][intVX], garageInteriors[GarageInfo[id][gType]][intVY], garageInteriors[GarageInfo[id][gType]][intVZ], garageInteriors[GarageInfo[id][gType]][intVA], garageInteriors[GarageInfo[id][gType]][intID], GarageInfo[id][gWorld]); } else { PlayerInfo[playerid][pLastEnter] = gettime(); SetPlayerPos(playerid, garageInteriors[GarageInfo[id][gType]][intPX], garageInteriors[GarageInfo[id][gType]][intPY], garageInteriors[GarageInfo[id][gType]][intPZ]); SetPlayerFacingAngle(playerid, garageInteriors[GarageInfo[id][gType]][intPA]); SetPlayerInterior(playerid, garageInteriors[GarageInfo[id][gType]][intID]); SetPlayerVirtualWorld(playerid, GarageInfo[id][gWorld]); SetCameraBehindPlayer(playerid); } return 1; } else if((id = GetNearbyBusiness(playerid)) >= 0) { if(BusinessInfo[id][bLocked]) { GameTextForPlayer(playerid, "~r~Closed", 5000, 1); return 0; } if(IsBusinessOwner(playerid, id)) { BusinessInfo[id][bTimestamp] = gettime(); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET timestamp = %i WHERE id = %i", gettime(), BusinessInfo[id][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has entered their business.", GetPlayerRPName(playerid)); } else { if(BusinessInfo[id][bEntryFee] > 0) { if(PlayerInfo[playerid][pCash] < BusinessInfo[id][bEntryFee]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to pay the entry fee. You may not enter."); } format(string, sizeof(string), "~r~-$%i", BusinessInfo[id][bEntryFee]); GameTextForPlayer(playerid, string, 5000, 1); BusinessInfo[id][bCash] += BusinessInfo[id][bEntryFee]; GivePlayerCash(playerid, -BusinessInfo[id][bEntryFee]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[id][bCash], BusinessInfo[id][bID]); mysql_tquery(connectionID, queryBuffer); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has entered the business.", GetPlayerRPName(playerid)); switch(BusinessInfo[id][bType]) { case BUSINESS_STORE, BUSINESS_GUNSHOP, BUSINESS_CLOTHES, BUSINESS_RESTAURANT, BUSINESS_BARCLUB: SendClientMessageEx(playerid, COLOR_GREEN, "Welcome to %s's %s [%i products]. /buy to purchase from this business.", BusinessInfo[id][bOwner], bizInteriors[BusinessInfo[id][bType]][intType], BusinessInfo[id][bProducts]); case BUSINESS_GYM: SendClientMessageEx(playerid, COLOR_GREEN, "Welcome to %s's %s. /buy to purchase a fighting style.", BusinessInfo[id][bOwner], bizInteriors[BusinessInfo[id][bType]][intType]); case BUSINESS_AGENCY: SendClientMessageEx(playerid, COLOR_GREEN, "Welcome to %s's %s. /(ad)vertise to make an advertisement.", BusinessInfo[id][bOwner], bizInteriors[BusinessInfo[id][bType]][intType]); } } PlayerInfo[playerid][pLastEnter] = gettime(); SetPlayerPos(playerid, BusinessInfo[id][bIntX], BusinessInfo[id][bIntY], BusinessInfo[id][bIntZ]); SetPlayerFacingAngle(playerid, BusinessInfo[id][bIntA]); SetPlayerInterior(playerid, BusinessInfo[id][bInterior]); SetPlayerVirtualWorld(playerid, BusinessInfo[id][bWorld]); SetCameraBehindPlayer(playerid); return 1; } else if((id = GetNearbyEntrance(playerid)) >= 0) { if(EntranceInfo[id][eLocked]) { GameTextForPlayer(playerid, "~r~Locked", 5000, 1); return 0; } if(EntranceInfo[id][eIntX] == 0.0 && EntranceInfo[id][eIntY] == 0.0 && EntranceInfo[id][eIntZ] == 0.0) { SendClientMessage(playerid, COLOR_GREY, "This entrance has no interior and therefore cannot be entered."); return 0; } if(!PlayerInfo[playerid][pAdminDuty]) { if(EntranceInfo[id][eAdminLevel] && PlayerInfo[playerid][pAdmin] < EntranceInfo[id][eAdminLevel]) { SendClientMessage(playerid, COLOR_GREY, "Your administrator level is too low. You may not enter."); return 0; } if(EntranceInfo[id][eFactionType] > 0 && GetFactionType(playerid) != EntranceInfo[id][eFactionType]) { SendClientMessage(playerid, COLOR_GREY, "This entrance is only accesible to a specific faction type. You may not enter."); return 0; } if(EntranceInfo[id][eVIP] && PlayerInfo[playerid][pVIPPackage] < EntranceInfo[id][eVIP]) { SendClientMessage(playerid, COLOR_GREY, "Your VIP rank is too low. You may not enter."); return 0; } } PlayerInfo[playerid][pLastEnter] = gettime(); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has entered the building.", GetPlayerRPName(playerid)); if(EntranceInfo[id][eVehicles] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(EntranceInfo[id][eFreeze]) { TeleportToCoords(playerid, EntranceInfo[id][eIntX], EntranceInfo[id][eIntY], EntranceInfo[id][eIntZ], EntranceInfo[id][eIntA], EntranceInfo[id][eInterior], EntranceInfo[id][eWorld], true); } else { TeleportToCoords(playerid, EntranceInfo[id][eIntX], EntranceInfo[id][eIntY], EntranceInfo[id][eIntZ], EntranceInfo[id][eIntA], EntranceInfo[id][eInterior], EntranceInfo[id][eWorld]); } } else { if(EntranceInfo[id][eFreeze]) { SetFreezePos(playerid, EntranceInfo[id][eIntX], EntranceInfo[id][eIntY], EntranceInfo[id][eIntZ]); } else { SetPlayerPos(playerid, EntranceInfo[id][eIntX], EntranceInfo[id][eIntY], EntranceInfo[id][eIntZ]); } SetPlayerFacingAngle(playerid, EntranceInfo[id][eIntA]); SetPlayerInterior(playerid, EntranceInfo[id][eInterior]); SetPlayerVirtualWorld(playerid, EntranceInfo[id][eWorld]); SetCameraBehindPlayer(playerid); } if(!EntranceInfo[id][eFreeze]) { format(string, sizeof(string), "~w~%s", EntranceInfo[id][eName]); GameTextForPlayer(playerid, string, 5000, 1); } return 1; } else { for(new i = 0; i < sizeof(staticEntrances); i ++) { if(IsPlayerInRangeOfPoint(playerid, 3.0, staticEntrances[i][ePosX], staticEntrances[i][ePosY], staticEntrances[i][ePosZ])) { if(!strcmp(staticEntrances[i][eName], "VIP lounge") && PlayerInfo[playerid][pVIPPackage] == 0) { SendClientMessage(playerid, COLOR_GREY, "This lounge is only available to those with a VIP subscription."); return 0; } if(staticEntrances[i][eFreeze]) { SetFreezePos(playerid, staticEntrances[i][eIntX], staticEntrances[i][eIntY], staticEntrances[i][eIntZ]); } else { SetPlayerPos(playerid, staticEntrances[i][eIntX], staticEntrances[i][eIntY], staticEntrances[i][eIntZ]); format(string, sizeof(string), "~w~%s", staticEntrances[i][eName]); GameTextForPlayer(playerid, string, 5000, 1); } PlayerInfo[playerid][pLastEnter] = gettime(); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has entered the building.", GetPlayerRPName(playerid)); SetPlayerFacingAngle(playerid, staticEntrances[i][eIntA]); SetPlayerInterior(playerid, staticEntrances[i][eInterior]); SetPlayerVirtualWorld(playerid, staticEntrances[i][eWorld]); SetCameraBehindPlayer(playerid); return 1; } } } return 0; } ExitCheck(playerid) { new id; if((gettime() - PlayerInfo[playerid][pLastEnter]) < 3 && PlayerInfo[playerid][pAdminDuty] == 0) { return SendClientMessage(playerid, COLOR_GREY, "You need to wait before using this command again."); } if((id = GetInsideHouse(playerid)) >= 0 && IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[id][hIntX], HouseInfo[id][hIntY], HouseInfo[id][hIntZ])) { PlayerInfo[playerid][pLastEnter] = gettime(); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has exited the house.", GetPlayerRPName(playerid)); SetPlayerPos(playerid, HouseInfo[id][hPosX], HouseInfo[id][hPosY], HouseInfo[id][hPosZ]); SetPlayerFacingAngle(playerid, HouseInfo[id][hPosA]); SetPlayerInterior(playerid, HouseInfo[id][hOutsideInt]); SetPlayerVirtualWorld(playerid, HouseInfo[id][hOutsideVW]); SetCameraBehindPlayer(playerid); return 1; } else if((id = GetInsideGarage(playerid)) >= 0) { if( (GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsPlayerInRangeOfPoint(playerid, 6.0, garageInteriors[GarageInfo[id][gType]][intVX], garageInteriors[GarageInfo[id][gType]][intVY], garageInteriors[GarageInfo[id][gType]][intVZ])) || ((GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) && (IsPlayerInRangeOfPoint(playerid, 2.0, garageInteriors[GarageInfo[id][gType]][intPX], garageInteriors[GarageInfo[id][gType]][intPY], garageInteriors[GarageInfo[id][gType]][intPZ]) || IsPlayerInRangeOfPoint(playerid, 4.0, garageInteriors[GarageInfo[id][gType]][intVX], garageInteriors[GarageInfo[id][gType]][intVY], garageInteriors[GarageInfo[id][gType]][intVZ])))) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has exited the garage.", GetPlayerRPName(playerid)); if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { TeleportToCoords(playerid, GarageInfo[id][gExitX], GarageInfo[id][gExitY], GarageInfo[id][gExitZ], GarageInfo[id][gExitA], 0, 0); } else { SetPlayerPos(playerid, GarageInfo[id][gPosX], GarageInfo[id][gPosY], GarageInfo[id][gPosZ]); SetPlayerFacingAngle(playerid, GarageInfo[id][gPosA]); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); } } PlayerInfo[playerid][pLastEnter] = gettime(); return 1; } else if((id = GetInsideBusiness(playerid)) >= 0 && IsPlayerInRangeOfPoint(playerid, 3.0, BusinessInfo[id][bIntX], BusinessInfo[id][bIntY], BusinessInfo[id][bIntZ])) { PlayerInfo[playerid][pLastEnter] = gettime(); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has exited the business.", GetPlayerRPName(playerid)); SetPlayerPos(playerid, BusinessInfo[id][bPosX], BusinessInfo[id][bPosY], BusinessInfo[id][bPosZ]); SetPlayerFacingAngle(playerid, BusinessInfo[id][bPosA]); SetPlayerInterior(playerid, BusinessInfo[id][bOutsideInt]); SetPlayerVirtualWorld(playerid, BusinessInfo[id][bOutsideVW]); SetCameraBehindPlayer(playerid); return 1; } else if((id = GetInsideEntrance(playerid)) >= 0 && IsPlayerInRangeOfPoint(playerid, (IsPlayerInAnyVehicle(playerid)) ? (7.0) : (3.0), EntranceInfo[id][eIntX], EntranceInfo[id][eIntY], EntranceInfo[id][eIntZ])) { PlayerInfo[playerid][pLastEnter] = gettime(); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has exited the building.", GetPlayerRPName(playerid)); if(EntranceInfo[id][eVehicles] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(EntranceInfo[id][eFreeze]) { TeleportToCoords(playerid, EntranceInfo[id][ePosX], EntranceInfo[id][ePosY], EntranceInfo[id][ePosZ], EntranceInfo[id][ePosA], EntranceInfo[id][eOutsideInt], EntranceInfo[id][eOutsideVW], true); } else { TeleportToCoords(playerid, EntranceInfo[id][ePosX], EntranceInfo[id][ePosY], EntranceInfo[id][ePosZ], EntranceInfo[id][ePosA], EntranceInfo[id][eOutsideInt], EntranceInfo[id][eOutsideVW]); } } else { if(EntranceInfo[id][eFreeze]) { SetFreezePos(playerid, EntranceInfo[id][ePosX], EntranceInfo[id][ePosY], EntranceInfo[id][ePosZ]); } else { SetPlayerPos(playerid, EntranceInfo[id][ePosX], EntranceInfo[id][ePosY], EntranceInfo[id][ePosZ]); } SetPlayerFacingAngle(playerid, EntranceInfo[id][ePosA]); SetPlayerInterior(playerid, EntranceInfo[id][eOutsideInt]); SetPlayerVirtualWorld(playerid, EntranceInfo[id][eOutsideVW]); SetCameraBehindPlayer(playerid); } return 1; } else { for(new i = 0; i < sizeof(staticEntrances); i ++) { if(IsPlayerInRangeOfPoint(playerid, 3.0, staticEntrances[i][eIntX], staticEntrances[i][eIntY], staticEntrances[i][eIntZ]) && GetPlayerVirtualWorld(playerid) == staticEntrances[i][eWorld]) { if(staticEntrances[i][eFreeze]) { SetFreezePos(playerid, staticEntrances[i][ePosX], staticEntrances[i][ePosY], staticEntrances[i][ePosZ]); } else { SetPlayerPos(playerid, staticEntrances[i][ePosX], staticEntrances[i][ePosY], staticEntrances[i][ePosZ]); } PlayerInfo[playerid][pLastEnter] = gettime(); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has exited the building.", GetPlayerRPName(playerid)); SetPlayerFacingAngle(playerid, staticEntrances[i][ePosA]); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); return 1; } } } return 0; } AddReportToQueue(playerid, text[]) { for(new i = 0; i < MAX_REPORTS; i ++) { if(!ReportInfo[i][rExists]) { strcpy(ReportInfo[i][rText], text, 128); ReportInfo[i][rExists] = 1; ReportInfo[i][rAccepted] = 0; ReportInfo[i][rReporter] = playerid; ReportInfo[i][rHandledBy] = INVALID_PLAYER_ID; ReportInfo[i][rTime] = 5; PlayerInfo[playerid][pLastReport] = gettime(); SendAdminMessage(COLOR_YELLOW2, "Report from [%i]%s (RID: %i): %s", playerid, GetPlayerRPName(playerid), i, text); return 1; } } return 0; } AddBan(username[], ip[], from[], reason[], permanent = 0) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id FROM bans WHERE username = '%s' OR ip = '%s'", username, ip); mysql_tquery(connectionID, queryBuffer, "OnBanAttempt", "ssssi", username, ip, from, reason, permanent); } BanPlayer(playerid, from[], reason[], permanent = 0) { if(!strcmp(from, SERVER_ANTICHEAT)) { gAnticheatBans++; SaveServerInfo(); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO log_bans VALUES(null, %i, NOW(), '%s (IP: %s) was banned by %s, reason: %e')", PlayerInfo[playerid][pID], GetPlayerNameEx(playerid), GetPlayerIP(playerid), from, reason); mysql_tquery(connectionID, queryBuffer); AddBan(GetPlayerNameEx(playerid), GetPlayerIP(playerid), from, reason, permanent); KickIP(GetPlayerIP(playerid)); } Rangeban(playerid, from[], reason[]) { AddBan(GetPlayerNameEx(playerid), GetPlayerIPRange(playerid), from, reason); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO log_bans VALUES(null, %i, NOW(), '%s (IP: %s) was rangebanned by %s, reason: %e')", PlayerInfo[playerid][pID], GetPlayerNameEx(playerid), GetPlayerIP(playerid), from, reason); mysql_tquery(connectionID, queryBuffer); KickIP(GetPlayerIP(playerid)); } KickIP(ip[]) { foreach(new i : Player) { if(!strcmp(GetPlayerIP(i), ip)) { KickPlayer(i); } } } GetPlayerHealthEx(playerid) { new Float:health; GetPlayerHealth(playerid, health); return floatround(health); } GetPlayerArmourEx(playerid) { new Float:armor; GetPlayerArmour(playerid, armor); return floatround(armor); } GivePlayerHealth(playerid, Float:amount) { new Float:health; GetPlayerHealth(playerid, health); SetPlayerHealth(playerid, (health + amount > 100.0) ? (100.0) : (health + amount)); } GivePlayerArmour(playerid, Float:amount) { new Float:armor; GetPlayerArmour(playerid, armor); SetScriptArmour(playerid, (armor + amount > 100.0) ? (100.0) : (armor + amount)); } AddToPaycheck(playerid, amount) { if(PlayerInfo[playerid][pLogged]) { PlayerInfo[playerid][pPaycheck] = PlayerInfo[playerid][pPaycheck] + amount; if(!PlayerInfo[playerid][pAdminDuty]) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET paycheck = paycheck + %i WHERE uid = %i", amount, PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } } } GivePlayerCash(playerid, amount) { if(PlayerInfo[playerid][pLogged]) { PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] + amount; if(!PlayerInfo[playerid][pAdminDuty]) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cash = cash + %i WHERE uid = %i", amount, PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } } } FriskPlayer(playerid, targetid) { SendClientMessageEx(playerid, COLOR_GREEN, "|____ %s's Items ____|", GetPlayerRPName(targetid)); if(PlayerInfo[targetid][pCash] < 5000) { SendClientMessageEx(playerid, COLOR_GREY2, "Cash: $%i", PlayerInfo[targetid][pCash]); } else { SendClientMessage(playerid, COLOR_GREY2, "Cash: $5000+"); } if(PlayerInfo[targetid][pPhone]) { SendClientMessage(playerid, COLOR_GREY2, "Mobile phone"); } if(PlayerInfo[targetid][pWalkieTalkie]) { SendClientMessage(playerid, COLOR_GREY2, "Walkie talkie"); } if(PlayerInfo[targetid][pSpraycans]) { SendClientMessageEx(playerid, COLOR_GREY2, "Spraycans (%i)", PlayerInfo[targetid][pSpraycans]); } if(PlayerInfo[targetid][pBoombox]) { SendClientMessage(playerid, COLOR_GREY2, "Boombox"); } if(PlayerInfo[targetid][pMP3Player]) { SendClientMessage(playerid, COLOR_GREY2, "MP3 player"); } if(PlayerInfo[targetid][pPhonebook]) { SendClientMessage(playerid, COLOR_GREY2, "Phonebook"); } if(PlayerInfo[targetid][pMaterials] > 0) { SendClientMessageEx(playerid, COLOR_GREY2, "Materials (%i)", PlayerInfo[targetid][pMaterials]); } if(PlayerInfo[targetid][pWeed]) { SendClientMessageEx(playerid, COLOR_RED, "Weed (%ig)", PlayerInfo[targetid][pWeed]); } if(PlayerInfo[targetid][pCocaine]) { SendClientMessageEx(playerid, COLOR_RED, "Cocaine (%ig)", PlayerInfo[targetid][pCocaine]); } if(PlayerInfo[targetid][pMeth]) { SendClientMessageEx(playerid, COLOR_RED, "Meth (%ig)", PlayerInfo[targetid][pMeth]); } if(PlayerInfo[targetid][pPainkillers]) { SendClientMessageEx(playerid, COLOR_RED, "Painkillers (%i)", PlayerInfo[targetid][pPainkillers]); } if(PlayerInfo[targetid][pSeeds]) { SendClientMessageEx(playerid, COLOR_RED, "Marijuana seeds (%i)", PlayerInfo[targetid][pSeeds]); } if(PlayerInfo[targetid][pEphedrine]) { SendClientMessageEx(playerid, COLOR_RED, "Raw ephedrine (%i)", PlayerInfo[targetid][pEphedrine]); } if(PlayerInfo[targetid][pHPAmmo]) { SendClientMessageEx(playerid, COLOR_RED, "Hollow point ammo (%i)", PlayerInfo[targetid][pHPAmmo]); } if(PlayerInfo[targetid][pPoisonAmmo]) { SendClientMessageEx(playerid, COLOR_RED, "Poison tip ammo (%i)", PlayerInfo[targetid][pPoisonAmmo]); } if(PlayerInfo[targetid][pFMJAmmo]) { SendClientMessageEx(playerid, COLOR_RED, "FMJ ammo (%i)", PlayerInfo[targetid][pFMJAmmo]); } switch(PlayerInfo[targetid][pSmuggleDrugs]) { case 1: SendClientMessageEx(playerid, COLOR_RED, "Seeds package"); case 2: SendClientMessageEx(playerid, COLOR_RED, "Cocaine package"); case 3: SendClientMessageEx(playerid, COLOR_RED, "Raw ephedrine package"); } for(new i = 0; i < 13; i ++) { if(PlayerInfo[targetid][pWeapons][i] > 0) { SendClientMessageEx(playerid, COLOR_RED, "%s", GetWeaponNameEx(PlayerInfo[targetid][pWeapons][i])); } } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s searches for illegal items on %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); } DisplayInventory(playerid, targetid = INVALID_PLAYER_ID) { if(targetid == INVALID_PLAYER_ID) targetid = playerid; new package[12]; switch(PlayerInfo[playerid][pSmuggleDrugs]) { case 0: package = "None"; case 1: package = "Seeds"; case 2: package = "Cocaine"; case 3: package = "Ephedrine"; } //SendClientMessage(targetid, COLOR_GREEN, "______________________________________________________________________"); SendClientMessageEx(targetid, COLOR_GREEN, "|____ %s's inventory & capacities [Inventory Skill: %i/5] ____|", GetPlayerRPName(playerid), PlayerInfo[playerid][pInventoryUpgrade]); SendClientMessageEx(targetid, COLOR_LIGHTORANGE, "Weed: %i/%ig - Cocaine: %i/%ig - Meth: %i/%ig - Painkillers: %i/%i - Seeds: %i/%i", PlayerInfo[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED), PlayerInfo[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE), PlayerInfo[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH), PlayerInfo[playerid][pPainkillers], GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS), PlayerInfo[playerid][pSeeds], GetPlayerCapacity(playerid, CAPACITY_SEEDS)); SendClientMessageEx(targetid, COLOR_LIGHTORANGE, "Materials: %i/%i - Ephedrine: %i/%ig - Muriatic acid: %i/10 - Baking soda: %i/3", PlayerInfo[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS), PlayerInfo[playerid][pEphedrine], GetPlayerCapacity(playerid, CAPACITY_EPHEDRINE), PlayerInfo[playerid][pMuriaticAcid], PlayerInfo[playerid][pBakingSoda]); SendClientMessageEx(targetid, COLOR_YELLOW2, "Fishing rod: %s - Fish bait: %i/20 - Boombox: %s - MP3 player: %s - Phonebook: %s", (PlayerInfo[playerid][pFishingRod]) ? ("Yes") : ("No"), PlayerInfo[playerid][pFishingBait], (PlayerInfo[playerid][pBoombox]) ? ("Yes") : ("No"), (PlayerInfo[playerid][pMP3Player]) ? ("Yes") : ("No"), (PlayerInfo[playerid][pPhonebook]) ? ("Yes") : ("No")); SendClientMessageEx(targetid, COLOR_YELLOW2, "Drivers license: %s - Components: %i - Cigars: %i - Spraycans: %i/20 - Bombs: %i/3", (PlayerInfo[playerid][pCarLicense]) ? ("Yes") : ("No"), PlayerInfo[playerid][pComponents], PlayerInfo[playerid][pCigars], PlayerInfo[playerid][pSpraycans], PlayerInfo[playerid][pBombs]); SendClientMessageEx(targetid, COLOR_LIMITLESSBLUE, "Gasoline: %i/20L - Walkie talkie: %s - Mobile phone: %s - Drug package: %s", PlayerInfo[playerid][pGasCan], (PlayerInfo[playerid][pWalkieTalkie]) ? ("Yes") : ("No"), (PlayerInfo[playerid][pPhone]) ? ("Yes") : ("No"), package); SendClientMessageEx(targetid, COLOR_LIMITLESSBLUE, "Watch: %s - GPS: %s - Hollow point: %i/%i - Poison tip: %i/%i - FMJ ammo: %i/%i", (PlayerInfo[playerid][pWatch]) ? ("Yes") : ("No"), (PlayerInfo[playerid][pGPS]) ? ("Yes") : ("No"), PlayerInfo[playerid][pHPAmmo], GetPlayerCapacity(playerid, CAPACITY_HPAMMO), PlayerInfo[playerid][pPoisonAmmo], GetPlayerCapacity(playerid, CAPACITY_POISONAMMO), PlayerInfo[playerid][pFMJAmmo], GetPlayerCapacity(playerid, CAPACITY_FMJAMMO)); //SendClientMessage(targetid, COLOR_GREEN, "______________________________________________________________________"); } DisplayStats(playerid, targetid = INVALID_PLAYER_ID) { if(targetid == INVALID_PLAYER_ID) targetid = playerid; new name[24], gender[8], faction[48], facrank[32], gang[32], gangrank[32], division[32], Float:health, Float:armor, Float:maxarmor; if(playerid == MAX_PLAYERS) { strcpy(name, PlayerInfo[playerid][pUsername]); } else { strcat(name, GetPlayerRPName(playerid)); } if(PlayerInfo[playerid][pGender] == 1) gender = "Male"; else if(PlayerInfo[playerid][pGender] == 2) gender = "Female"; if(PlayerInfo[playerid][pFaction] >= 0) { strcpy(faction, FactionInfo[PlayerInfo[playerid][pFaction]][fName]); strcpy(facrank, FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]]); if(PlayerInfo[playerid][pDivision] >= 0) { strcpy(division, FactionDivisions[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pDivision]]); } else { division = "None"; } } else { faction = "None"; facrank = "N/A"; division = "None"; } if(PlayerInfo[playerid][pGang] >= 0) { strcpy(gang, GangInfo[PlayerInfo[playerid][pGang]][gName]); strcpy(gangrank, GangRanks[PlayerInfo[playerid][pGang]][PlayerInfo[playerid][pGangRank]]); } else { gang = "None"; gangrank = "N/A"; } switch(PlayerInfo[playerid][pVIPPackage]) { case 0: maxarmor = 100.0; case 1, 2: maxarmor = 125.0; case 3: maxarmor = 150.0; } if(playerid == MAX_PLAYERS) { health = PlayerInfo[playerid][pHealth]; armor = PlayerInfo[playerid][pArmor]; } else { GetPlayerHealth(playerid, health); GetPlayerArmour(playerid, armor); } SendClientMessageEx(targetid, COLOR_GREEN, "|____ %s's statistics on Limitless Roleplay [%s] ____|", name, GetDate()); SendClientMessageEx(targetid, COLOR_ORANGE, "Level: %i - Gender: %s - Age: %i - Cash: $%i - Bank: $%i - Hours: %i - Ph: %i", PlayerInfo[playerid][pLevel], gender, PlayerInfo[playerid][pAge], PlayerInfo[playerid][pCash], PlayerInfo[playerid][pBank], PlayerInfo[playerid][pHours], PlayerInfo[playerid][pPhone]); SendClientMessageEx(targetid, COLOR_ORANGE, "Total Wealth: $%i - Experience: %i/%i - Next Level: $%i - Upgrade Points: %i", PlayerInfo[playerid][pCash] + PlayerInfo[playerid][pBank], PlayerInfo[playerid][pEXP], (PlayerInfo[playerid][pLevel] * 4), (PlayerInfo[playerid][pLevel] + 1) * 5000, PlayerInfo[playerid][pUpgradePoints]); SendClientMessageEx(targetid, COLOR_YELLOW2, "Inventory Upgrade: %i/5 - Addict Upgrade: %i/3 - Trader Upgrade: %i/3 - Asset Upgrade: %i/4", PlayerInfo[playerid][pInventoryUpgrade], PlayerInfo[playerid][pAddictUpgrade], PlayerInfo[playerid][pTraderUpgrade], PlayerInfo[playerid][pAssetUpgrade]); SendClientMessageEx(targetid, COLOR_YELLOW2, "Job: %s - Job Level: %i - Crimes Commited: %i - Arrested: %i - Wanted Level: %i", GetJobName(PlayerInfo[playerid][pJob]), GetJobLevel(playerid, PlayerInfo[playerid][pJob]), PlayerInfo[playerid][pCrimes], PlayerInfo[playerid][pArrested], PlayerInfo[playerid][pWantedLevel]); SendClientMessageEx(targetid, COLOR_LIGHTORANGE, "Warnings: %i - Spawn Health: %.1f/100.0 - Spawn Armor: %.1f/%.1f - Jail Time: %i seconds", PlayerInfo[playerid][pWarnings], PlayerInfo[playerid][pSpawnHealth], PlayerInfo[playerid][pSpawnArmor], maxarmor, PlayerInfo[playerid][pJailTime]); SendClientMessageEx(targetid, COLOR_LIGHTORANGE, "Faction: %s - Rank: %s (%i) - Division: %s - Gang: %s - Rank: %s (%i)", faction, facrank, PlayerInfo[playerid][pFactionRank], division, gang, gangrank, PlayerInfo[playerid][pGangRank]); SendClientMessageEx(targetid, COLOR_LIMITLESSBLUE, "Paycheck: $%i - Channel: %i - Cookies: %i - Helper: %s - VIP Package: %s", PlayerInfo[playerid][pPaycheck], PlayerInfo[playerid][pChannel], PlayerInfo[playerid][pCookies], GetHelperRank(playerid), GetVIPRank(PlayerInfo[playerid][pVIPPackage])); SendClientMessageEx(targetid, COLOR_LIMITLESSBLUE, "Second Job: %s - DM Warnings: %i/5 - Report Warnings: %i/3 - Weapon Restriction: %i hours", GetJobName(PlayerInfo[playerid][pSecondJob]), PlayerInfo[playerid][pDMWarnings], PlayerInfo[playerid][pReportWarns], PlayerInfo[playerid][pWeaponRestricted]); if(PlayerInfo[targetid][pAdmin] > 0) { SendClientMessageEx(targetid, COLOR_LIGHTRED, "Interior: %i - Virtual: %i - FPS: %i - AFK: %s - Reports: %i - Help Requests: %i", (playerid == MAX_PLAYERS) ? (PlayerInfo[playerid][pInterior]) : (GetPlayerInterior(playerid)), (playerid == MAX_PLAYERS) ? (PlayerInfo[playerid][pWorld]) : (GetPlayerVirtualWorld(playerid)), (playerid == MAX_PLAYERS) ? (0) : (PlayerInfo[playerid][pFPS]), (playerid == MAX_PLAYERS) ? ("No") : ((PlayerInfo[playerid][pAFK]) ? ("Yes") : ("No")), PlayerInfo[playerid][pReports], PlayerInfo[playerid][pHelpRequests]); } if(playerid == targetid) { SendClientMessage(targetid, COLOR_LIGHTORANGE, "** For a list of items and their capacities in your inventory, use /(inv)entory."); } else if(playerid != MAX_PLAYERS) { SendClientMessageEx(targetid, COLOR_LIGHTORANGE, "** For a list of items and their capacities in their inventory, use /checkinv %i.", playerid); } } ShowDialogToPlayer(playerid, dialogid) { new string[2048]; switch(dialogid) { case DIALOG_REGISTER: { format(string, sizeof(string), "{F7A763}Welcome to Limitless Roleplay, %s.\n{FF6347}Please enter your password of choice below in order to register:", GetPlayerNameEx(playerid)); ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "{089DCE}Limitless Roleplay | Register", string, "Register", "Quit"); } case DIALOG_LOGIN: { format(string, sizeof(string), "{F7A763}Welcome back to Limitless Roleplay, %s.\n{33CC33}Please enter your password below in order to authenticate:", GetPlayerNameEx(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{089DCE}Limitless Roleplay | Login", string, "Login", "Quit"); } case DIALOG_GENDER: { ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "Please choose your gender.", "Male\nFemale", "Select", ""); } case DIALOG_AGE: { ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Please enter your age.", "Please input the age of your character below (13-99):", "Submit", "Back"); } case DIALOG_REFERRAL: { ShowPlayerDialog(playerid, DIALOG_REFERRAL, DIALOG_STYLE_INPUT, "Have you been referred by anyone?", "Please enter the name the player who referred you here:\n(Click on 'Skip' if you haven't been referred by anyone.)", "Submit", "Skip"); } case DIALOG_BUYFURNITURE1: { for(new i = 0; i < sizeof(furnitureCategories); i ++) { format(string, sizeof(string), "%s\n%s", string, furnitureCategories[i]); } ShowPlayerDialog(playerid, DIALOG_BUYFURNITURE1, DIALOG_STYLE_LIST, "Choose a category to browse.", string, "Select", "Cancel"); } case DIALOG_BUYFURNITURE2: { new index = -1; for(new i = 0; i < sizeof(furnitureArray); i ++) { if(!strcmp(furnitureArray[i][fCategory], furnitureCategories[PlayerInfo[playerid][pCategory]])) { if(index == -1) { index = i; } format(string, sizeof(string), "%s\n%s ($%i)", string, furnitureArray[i][fName], furnitureArray[i][fPrice]); } } PlayerInfo[playerid][pFurnitureIndex] = index; ShowPlayerDialog(playerid, DIALOG_BUYFURNITURE2, DIALOG_STYLE_LIST, "Choose an item in order to preview it.", string, "Select", "Back"); } case DIALOG_ATM: { format(string, sizeof(string), "How much would you like to withdraw? (Your account balance is $%i.)", PlayerInfo[playerid][pBank]); ShowPlayerDialog(playerid, DIALOG_ATM, DIALOG_STYLE_INPUT, "Cash withdrawal", string, "Submit", "Cancel"); } case DIALOG_BUYCLOTHING: { new index = -1; for(new i = 0; i < sizeof(clothingArray); i ++) { if(!strcmp(clothingArray[i][clothingType], clothingTypes[PlayerInfo[playerid][pCategory]])) { if(index == -1) { index = i; } format(string, sizeof(string), "%s\n%s", string, clothingArray[i][clothingName]); } } PlayerInfo[playerid][pClothingIndex] = index; ShowPlayerDialog(playerid, DIALOG_BUYCLOTHING, DIALOG_STYLE_LIST, "Choose an item in order to preview it.", string, "Select", "Cancel"); } case DIALOG_BUYCLOTHES: { new businessid = GetInsideBusiness(playerid); if(businessid >= 0 && BusinessInfo[businessid][bType] == BUSINESS_CLOTHES) { format(string, sizeof(string), "%s's %s [%i products]", BusinessInfo[businessid][bOwner], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bProducts]); if(PlayerInfo[playerid][pVIPPackage] > 0) { ShowPlayerDialog(playerid, DIALOG_BUYCLOTHES, DIALOG_STYLE_INPUT, string, "NOTE: New clothes are free for VIP members.\n\nPlease input the ID of the skin you wish to purchase.\n(( List of skins: http://wiki.sa-mp.com/wiki/Skins:All ))", "Submit", "Cancel"); } else { ShowPlayerDialog(playerid, DIALOG_BUYCLOTHES, DIALOG_STYLE_INPUT, string, "NOTE: New clothes costs $2,000.\n\nPlease input the ID of the skin you wish to purchase.\n(( List of skins: http://wiki.sa-mp.com/wiki/Skins:All ))", "Submit", "Cancel"); } } } case DIALOG_FACTIONPAY1: { string = "#\tRank\tPaycheck"; for(new i = 0; i < FactionInfo[PlayerInfo[playerid][pFactionEdit]][fRankCount]; i ++) { format(string, sizeof(string), "%s\n%i\t%s\t{00AA00}$%i{FFFFFF}", string, i, FactionRanks[PlayerInfo[playerid][pFactionEdit]][i], FactionInfo[PlayerInfo[playerid][pFactionEdit]][fPaycheck][i]); } ShowPlayerDialog(playerid, DIALOG_FACTIONPAY1, DIALOG_STYLE_TABLIST_HEADERS, FactionInfo[PlayerInfo[playerid][pFactionEdit]][fName], string, "Change", "Cancel"); } case DIALOG_PHONEBOOK: { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM phonebook ORDER BY name ASC LIMIT %i, %i", (PlayerInfo[playerid][pPage] - 1) * MAX_LISTED_NUMBERS, MAX_LISTED_NUMBERS); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_VIEW_PHONEBOOK, playerid); } case DIALOG_LANDBUILD1: { for(new i = 0; i < sizeof(furnitureCategories); i ++) { format(string, sizeof(string), "%s\n%s", string, furnitureCategories[i]); } ShowPlayerDialog(playerid, DIALOG_LANDBUILD1, DIALOG_STYLE_LIST, "Choose a category to browse.", string, "Select", "Back"); } case DIALOG_LANDBUILD2: { new index = -1; for(new i = 0; i < sizeof(furnitureArray); i ++) { if(!strcmp(furnitureArray[i][fCategory], furnitureCategories[PlayerInfo[playerid][pCategory]])) { if(index == -1) { index = i; } format(string, sizeof(string), "%s\n%s ($%i)", string, furnitureArray[i][fName], furnitureArray[i][fPrice]); } } PlayerInfo[playerid][pFurnitureIndex] = index; ShowPlayerDialog(playerid, DIALOG_LANDBUILD2, DIALOG_STYLE_LIST, "Choose an item in order to preview it.", string, "Select", "Back"); } case DIALOG_LANDMENU: { ShowPlayerDialog(playerid, DIALOG_LANDMENU, DIALOG_STYLE_LIST, "Land menu", "Build object\nEdit object\nToggle labels\nList all objects\nSell all objects\nPermissions", "Select", "Cancel"); } case DIALOG_LANDOBJECTMENU: { if(IsGateObject(PlayerInfo[playerid][pSelected])) { ShowPlayerDialog(playerid, DIALOG_LANDOBJECTMENU, DIALOG_STYLE_LIST, "Object menu", "Edit object\nEdit gate destination\nDuplicate object\nSell object", "Select", "Cancel"); } else { ShowPlayerDialog(playerid, DIALOG_LANDOBJECTMENU, DIALOG_STYLE_LIST, "Object menu", "Edit object\nDuplicate object\nSell object", "Select", "Cancel"); } } case DIALOG_LANDOBJECTS: { new landid = GetNearbyLand(playerid); if(landid >= 0 && HasLandPerms(playerid, landid)) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM landobjects WHERE landid = %i ORDER BY id DESC LIMIT %i, %i", LandInfo[landid][lID], (PlayerInfo[playerid][pPage] - 1) * MAX_LISTED_OBJECTS, MAX_LISTED_OBJECTS); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LIST_LANDOBJECTS, playerid); } } case DIALOG_MP3PLAYER: { ShowPlayerDialog(playerid, DIALOG_MP3PLAYER, DIALOG_STYLE_LIST, "MP3 player", "Custom URL\nUploaded Music\nRadio Stations\nStop Music", "Select", "Cancel"); } case DIALOG_MP3RADIO: { ShowPlayerDialog(playerid, DIALOG_MP3RADIO, DIALOG_STYLE_LIST, "Radio Stations", "Browse Genres\nSearch by Name", "Select", "Back"); } case DIALOG_MP3RADIOGENRES: { new genre[32] = "n/a"; for(new i = 0; i < sizeof(radioGenreList); i ++) { if(strcmp(radioGenreList[i][rGenre], genre) != 0) { strcpy(genre, radioGenreList[i][rGenre]); strcat(string, genre); strcat(string, "\n"); } } ShowPlayerDialog(playerid, DIALOG_MP3RADIOGENRES, DIALOG_STYLE_LIST, "Choose a genre to browse stations in.", string, "Select", "Back"); } case DIALOG_MP3RADIOSUBGENRES: { for(new i = 0; i < sizeof(radioGenreList); i ++) { if(!strcmp(radioGenreList[i][rGenre], PlayerInfo[playerid][pGenre])) { format(string, sizeof(string), "%s\n%s", string, radioGenreList[i][rSubgenre]); } } ShowPlayerDialog(playerid, DIALOG_MP3RADIOSUBGENRES, DIALOG_STYLE_LIST, "Choose a subgenre to browse stations in.", string, "Select", "Back"); } case DIALOG_MP3RADIORESULTS: { if(PlayerInfo[playerid][pSearch]) { mysql_format(radioConnectionID, queryBuffer, sizeof(queryBuffer), "SELECT name FROM radiostations WHERE name LIKE '%%%e%%' OR subgenre LIKE '%%%e%%' ORDER BY name LIMIT %i, %i", PlayerInfo[playerid][pGenre], PlayerInfo[playerid][pGenre], (PlayerInfo[playerid][pPage] - 1) * MAX_LISTED_STATIONS, MAX_LISTED_STATIONS); mysql_tquery(radioConnectionID, queryBuffer, "Radio_ListStations", "i", playerid); } else { mysql_format(radioConnectionID, queryBuffer, sizeof(queryBuffer), "SELECT name FROM radiostations WHERE genre = '%e' AND subgenre = '%e' ORDER BY name LIMIT %i, %i", PlayerInfo[playerid][pGenre], PlayerInfo[playerid][pSubgenre], (PlayerInfo[playerid][pPage] - 1) * MAX_LISTED_STATIONS, MAX_LISTED_STATIONS); mysql_tquery(radioConnectionID, queryBuffer, "Radio_ListStations", "i", playerid); } } case DIALOG_MP3RADIOSEARCH: { ShowPlayerDialog(playerid, DIALOG_MP3RADIOSEARCH, DIALOG_STYLE_INPUT, "Search by Name", "Enter the full or partial name of the radio station:", "Submit", "Back"); } case DIALOG_GANGSTASH: { format(string, sizeof(string), "Gang stash ($%i/$%i) (Materials: %i/%i)", GangInfo[PlayerInfo[playerid][pGang]][gCash], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_CASH), GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_MATERIALS)); ShowPlayerDialog(playerid, DIALOG_GANGSTASH, DIALOG_STYLE_LIST, string, "Weapons\nAmmo\nKevlar Vest\nDrugs\nCrafting\nMaterials\nCash", "Select", "Cancel"); } case DIALOG_GANGSTASHWEAPONS1: { format(string, sizeof(string), "[%i] 9mm (R1+)\n[%i] Sdpistol (R1+)\n[%i] Deagle (R2+)\n[%i] Shotgun (R1+)\n[%i] SPAS-12 (R4+)\n[%i] Sawn-off (R4+)\n[%i] Tec-9 (R1+)\n[%i] Micro Uzi (R1+)\n[%i] MP5 (R2+)\n[%i] AK-47 (R3+)\n[%i] M4 (R4+)\n[%i] Rifle (R2+)\n[%i] Sniper (R5+)\n[%i] Molotov (R5+)", GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_9MM], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SDPISTOL], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_DEAGLE], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SHOTGUN], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SPAS12], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SAWNOFF], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_TEC9], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_UZI], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_MP5], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_AK47], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_M4], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_RIFLE], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SNIPER], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_MOLOTOV]); ShowPlayerDialog(playerid, DIALOG_GANGSTASHWEAPONS1, DIALOG_STYLE_LIST, "Gang stash | Weapons", string, "Select", "Back"); } case DIALOG_GANGSTASHDRUGS1: { format(string, sizeof(string), "Weed (%i/%ig)\nCocaine (%i/%ig)\nMeth (%i/%ig)\nPainkillers (%i/%i)", GangInfo[PlayerInfo[playerid][pGang]][gWeed], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_WEED), GangInfo[PlayerInfo[playerid][pGang]][gCocaine], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_COCAINE), GangInfo[PlayerInfo[playerid][pGang]][gMeth], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_METH), GangInfo[PlayerInfo[playerid][pGang]][gPainkillers], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_PAINKILLERS)); ShowPlayerDialog(playerid, DIALOG_GANGSTASHDRUGS1, DIALOG_STYLE_LIST, "Gang stash | Drugs", string, "Select", "Back"); } case DIALOG_GANGSTASHDRUGS2: { if(PlayerInfo[playerid][pSelected] == ITEM_WEED) { ShowPlayerDialog(playerid, DIALOG_GANGSTASHDRUGS2, DIALOG_STYLE_LIST, "Gang stash | Weed", "Withdraw\nDeposit", "Select", "Back"); } else if(PlayerInfo[playerid][pSelected] == ITEM_COCAINE) { ShowPlayerDialog(playerid, DIALOG_GANGSTASHDRUGS2, DIALOG_STYLE_LIST, "Gang stash | Cocaine", "Withdraw\nDeposit", "Select", "Back"); } else if(PlayerInfo[playerid][pSelected] == ITEM_METH) { ShowPlayerDialog(playerid, DIALOG_GANGSTASHDRUGS2, DIALOG_STYLE_LIST, "Gang stash | Meth", "Withdraw\nDeposit", "Select", "Back"); } else if(PlayerInfo[playerid][pSelected] == ITEM_PAINKILLERS) { ShowPlayerDialog(playerid, DIALOG_GANGSTASHDRUGS2, DIALOG_STYLE_LIST, "Gang stash | Painkillers", "Withdraw\nDeposit", "Select", "Back"); } } case DIALOG_GANGSTASHAMMO1: { format(string, sizeof(string), "HP ammo (%i/%i)\nPoison ammo (%i/%i)\nFMJ ammo (%i/%i)", GangInfo[PlayerInfo[playerid][pGang]][gHPAmmo], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_HPAMMO), GangInfo[PlayerInfo[playerid][pGang]][gPoisonAmmo], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_POISONAMMO), GangInfo[PlayerInfo[playerid][pGang]][gFMJAmmo], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_FMJAMMO)); ShowPlayerDialog(playerid, DIALOG_GANGSTASHAMMO1, DIALOG_STYLE_LIST, "Gang stash | Ammo", string, "Select", "Back"); } case DIALOG_GANGSTASHAMMO2: { if(PlayerInfo[playerid][pSelected] == ITEM_HPAMMO) { ShowPlayerDialog(playerid, DIALOG_GANGSTASHAMMO2, DIALOG_STYLE_LIST, "Gang stash | HP ammo", "Withdraw\nDeposit", "Select", "Back"); } else if(PlayerInfo[playerid][pSelected] == ITEM_POISONAMMO) { ShowPlayerDialog(playerid, DIALOG_GANGSTASHAMMO2, DIALOG_STYLE_LIST, "Gang stash | Poison ammo", "Withdraw\nDeposit", "Select", "Back"); } else if(PlayerInfo[playerid][pSelected] == ITEM_FMJAMMO) { ShowPlayerDialog(playerid, DIALOG_GANGSTASHAMMO2, DIALOG_STYLE_LIST, "Gang stash | FMJ ammo", "Withdraw\nDeposit", "Select", "Back"); } } case DIALOG_GANGSTASHCRAFT: { format(string, sizeof(string), "Gang stash | Crafting (Your safe has %i materials.)", GangInfo[PlayerInfo[playerid][pGang]][gMaterials]); ShowPlayerDialog(playerid, DIALOG_GANGSTASHCRAFT, DIALOG_STYLE_TABLIST_HEADERS, string, "#\tWeapon\tCost\n1\t9mm\t150 materials\n2\tSdpistol\t200 materials\n3\tShotgun\t500 materials\n4\tMicro SMG\t500 materials\n5\tTec-9\t500 materials\n6\tMP5\t1000 materials\n7\tRifle\t1000 materials\n8\tDesert Eagle\t2000 materials\n9\tMolotov\t5000 materials\n10\tAK-47\t3000 materials\n11\tSawed-off Shotgun\t3000 materials", "Craft", "Back"); } case DIALOG_GANGSTASHMATS: { format(string, sizeof(string), "Withdraw (%i/%i)\nDeposit", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_MATERIALS)); ShowPlayerDialog(playerid, DIALOG_GANGSTASHMATS, DIALOG_STYLE_LIST, "Gang stash | Materials", string, "Select", "Back"); } case DIALOG_GANGSTASHCASH: { format(string, sizeof(string), "Withdraw ($%i/$%i)\nDeposit", GangInfo[PlayerInfo[playerid][pGang]][gCash], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_CASH)); ShowPlayerDialog(playerid, DIALOG_GANGSTASHCASH, DIALOG_STYLE_LIST, "Gang stash | Cash", string, "Select", "Back"); } case DIALOG_GANGWITHDRAW: { if(PlayerInfo[playerid][pSelected] == ITEM_WEED) { format(string, sizeof(string), "How much weed would you like to withdraw? (The safe contains %i/%i grams.)", GangInfo[PlayerInfo[playerid][pGang]][gWeed], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_WEED)); } else if(PlayerInfo[playerid][pSelected] == ITEM_COCAINE) { format(string, sizeof(string), "How much cocaine would you like to withdraw? (The safe contains %i/%i grams.)", GangInfo[PlayerInfo[playerid][pGang]][gCocaine], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_COCAINE)); } else if(PlayerInfo[playerid][pSelected] == ITEM_METH) { format(string, sizeof(string), "How much meth would you like to withdraw? (The safe contains %i/%i grams.)", GangInfo[PlayerInfo[playerid][pGang]][gMeth], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_METH)); } else if(PlayerInfo[playerid][pSelected] == ITEM_PAINKILLERS) { format(string, sizeof(string), "How much painkillers would you like to withdraw? (The safe contains %i/%i.)", GangInfo[PlayerInfo[playerid][pGang]][gPainkillers], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_PAINKILLERS)); } else if(PlayerInfo[playerid][pSelected] == ITEM_MATERIALS) { format(string, sizeof(string), "How much materials would you like to withdraw? (The safe contains %i/%i.)", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_MATERIALS)); } else if(PlayerInfo[playerid][pSelected] == ITEM_CASH) { format(string, sizeof(string), "How much cash would you like to withdraw? (The safe contains $%i/$%i.)", GangInfo[PlayerInfo[playerid][pGang]][gCash], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_CASH)); } else if(PlayerInfo[playerid][pSelected] == ITEM_HPAMMO) { format(string, sizeof(string), "How much HP ammo would you like to withdraw? (The safe contains %i/%i rounds.)", GangInfo[PlayerInfo[playerid][pGang]][gHPAmmo], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_HPAMMO)); } else if(PlayerInfo[playerid][pSelected] == ITEM_POISONAMMO) { format(string, sizeof(string), "How much poison ammo would you like to withdraw? (The safe contains %i/%i rounds.)", GangInfo[PlayerInfo[playerid][pGang]][gPoisonAmmo], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_POISONAMMO)); } else if(PlayerInfo[playerid][pSelected] == ITEM_FMJAMMO) { format(string, sizeof(string), "How much FMJ ammo would you like to withdraw? (The safe contains %i/%i rounds.)", GangInfo[PlayerInfo[playerid][pGang]][gFMJAmmo], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_FMJAMMO)); } ShowPlayerDialog(playerid, DIALOG_GANGWITHDRAW, DIALOG_STYLE_INPUT, "Gang stash | Withdraw", string, "Submit", "Back"); } case DIALOG_GANGDEPOSIT: { if(PlayerInfo[playerid][pSelected] == ITEM_WEED) { format(string, sizeof(string), "How much weed would you like to deposit? (The safe contains %i/%i grams.)", GangInfo[PlayerInfo[playerid][pGang]][gWeed], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_WEED)); } else if(PlayerInfo[playerid][pSelected] == ITEM_COCAINE) { format(string, sizeof(string), "How much cocaine would you like to deposit? (The safe contains %i/%i grams.)", GangInfo[PlayerInfo[playerid][pGang]][gCocaine], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_COCAINE)); } else if(PlayerInfo[playerid][pSelected] == ITEM_METH) { format(string, sizeof(string), "How much meth would you like to deposit? (The safe contains %i/%i grams.)", GangInfo[PlayerInfo[playerid][pGang]][gMeth], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_METH)); } else if(PlayerInfo[playerid][pSelected] == ITEM_PAINKILLERS) { format(string, sizeof(string), "How much painkillers would you like to deposit? (The safe contains %i/%i.)", GangInfo[PlayerInfo[playerid][pGang]][gPainkillers], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_PAINKILLERS)); } else if(PlayerInfo[playerid][pSelected] == ITEM_MATERIALS) { format(string, sizeof(string), "How much materials would you like to deposit? (The safe contains %i/%i.)", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_MATERIALS)); } else if(PlayerInfo[playerid][pSelected] == ITEM_CASH) { format(string, sizeof(string), "How much cash would you like to deposit? (The safe contains $%i/$%i.)", GangInfo[PlayerInfo[playerid][pGang]][gCash], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_CASH)); } else if(PlayerInfo[playerid][pSelected] == ITEM_HPAMMO) { format(string, sizeof(string), "How much HP ammo would you like to deposit? (The safe contains %i/%i rounds.)", GangInfo[PlayerInfo[playerid][pGang]][gHPAmmo], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_HPAMMO)); } else if(PlayerInfo[playerid][pSelected] == ITEM_POISONAMMO) { format(string, sizeof(string), "How much poison ammo would you like to deposit? (The safe contains %i/%i rounds.)", GangInfo[PlayerInfo[playerid][pGang]][gPoisonAmmo], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_POISONAMMO)); } else if(PlayerInfo[playerid][pSelected] == ITEM_FMJAMMO) { format(string, sizeof(string), "How much FMJ ammo would you like to deposit? (The safe contains %i/%i rounds.)", GangInfo[PlayerInfo[playerid][pGang]][gFMJAmmo], GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_FMJAMMO)); } ShowPlayerDialog(playerid, DIALOG_GANGDEPOSIT, DIALOG_STYLE_INPUT, "Gang stash | Deposit", string, "Submit", "Back"); } case DIALOG_GANGARMSPRICES: { format(string, sizeof(string), "#\tWeapon\tPrice\tCost\n1\tMicro Uzi\t$%i\t500 materials\n2\tTec-9\t$%i\t500 materials\n3\tMP5\t$%i\t1000 materials\n4\tDesert Eagle\t$%i\t2000 materials\n5\tMolotov\t$%i\t5000 materials\n6\tAK-47\t$%i\t3000 materials\n7\tM4\t$%i\t4000 materials\n8\tSniper\t$%i\t6500 materials\n9\tSawnoff Shotgun\t$%i\t3000 materials\n10\tHollow Point Ammo\t$%i\t%i rounds\n11\tPoison Tip Ammo\t$%i\t%i rounds\n12\tFMJ Ammo\t$%i\t%i rounds", GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][0], GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][1], GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][2], GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][3], GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][4], GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][5], GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][6], GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][7], GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][8], GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][9], GangInfo[PlayerInfo[playerid][pGang]][gArmsHPAmmo], GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][10], GangInfo[PlayerInfo[playerid][pGang]][gArmsPoisonAmmo], GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][11], GangInfo[PlayerInfo[playerid][pGang]][gArmsFMJAmmo]); ShowPlayerDialog(playerid, DIALOG_GANGARMSPRICES, DIALOG_STYLE_TABLIST_HEADERS, "Choose a weapon price to edit.", string, "Change", "Back"); } case DIALOG_GANGARMSDEALER: { ShowPlayerDialog(playerid, DIALOG_GANGARMSDEALER, DIALOG_STYLE_LIST, "Arms dealer", "Buy Guns\nBuy Ammo\nEdit", "Select", "Cancel"); } case DIALOG_GANGARMSWEAPONS: { new title[48]; format(title, sizeof(title), "Gang arms dealer (Materials available: %i.)", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials]); format(string, sizeof(string), "#\tWeapon\tPrice\tCost\n1\tMicro Uzi\t$%i\t500 materials\n2\tTec-9\t$%i\t500 materials\n3\tMP5\t$%i\t1000 materials\n4\tDesert Eagle\t$%i\t2000 materials\n5\tMolotov\t$%i\t5000 materials\n6\tAK-47\t$%i\t3000 materials\n7\tM4\t$%i\t4000 materials\n8\tSniper\t$%i\t6500 materials\n9\tSawnoff Shotgun\t$%i\t3000 materials", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][0], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][1], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][2], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][3], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][4], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][5], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][6], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][7], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][8]); ShowPlayerDialog(playerid, DIALOG_GANGARMSWEAPONS, DIALOG_STYLE_TABLIST_HEADERS, title, string, "Buy", "Back"); } case DIALOG_GANGARMSAMMO: { format(string, sizeof(string), "#\tType\tCost\tStock\n1\tHollow Point Ammo\t$%i\t%i rounds\n2\tPoison Tip Ammo\t$%i\t%i rounds\n3\tFMJ Ammo\t$%i\t%i rounds", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][9], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsHPAmmo], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][10], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPoisonAmmo], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][11], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsFMJAmmo]); ShowPlayerDialog(playerid, DIALOG_GANGARMSAMMO, DIALOG_STYLE_TABLIST_HEADERS, "Arms dealer | Ammo", string, "Buy", "Back"); } case DIALOG_GANGAMMOBUY: { if(PlayerInfo[playerid][pSelected] == 0) { format(string, sizeof(string), "How much hollow point ammo would you like to buy? ($%i per round. %i rounds available.)", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][9], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsHPAmmo]); } else if(PlayerInfo[playerid][pSelected] == 1) { format(string, sizeof(string), "How much poison tip ammo would you like to buy? ($%i per round. %i rounds available.)", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][10], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPoisonAmmo]); } else if(PlayerInfo[playerid][pSelected] == 2) { format(string, sizeof(string), "How much FMJ ammo would you like to buy? ($%i per round. %i rounds available.)", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][11], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsFMJAmmo]); } ShowPlayerDialog(playerid, DIALOG_GANGAMMOBUY, DIALOG_STYLE_INPUT, "Arms dealer | Buy ammo", string, "Submit", "Back"); } case DIALOG_GANGARMSEDIT: { format(string, sizeof(string), "Arms dealer (Materials available: %i.)", GangInfo[PlayerInfo[playerid][pGang]][gArmsMaterials]); ShowPlayerDialog(playerid, DIALOG_GANGARMSEDIT, DIALOG_STYLE_LIST, string, "Edit prices\nDeposit mats\nWithdraw mats\nDeposit ammo\nWithdraw ammo", "Select", "Back"); } case DIALOG_GANGARMSDEPOSITMATS: { format(string, sizeof(string), "How much materials would you like to deposit? (This arms dealer contains %i materials.)", GangInfo[PlayerInfo[playerid][pGang]][gArmsMaterials]); ShowPlayerDialog(playerid, DIALOG_GANGARMSDEPOSITMATS, DIALOG_STYLE_INPUT, "Arms dealer | Deposit", string, "Submit", "Back"); } case DIALOG_GANGARMSWITHDRAWMATS: { format(string, sizeof(string), "How much materials would you like to withdraw? (This arms dealer contains %i materials.)", GangInfo[PlayerInfo[playerid][pGang]][gArmsMaterials]); ShowPlayerDialog(playerid, DIALOG_GANGARMSWITHDRAWMATS, DIALOG_STYLE_INPUT, "Arms dealer | Withdraw", string, "Submit", "Back"); } case DIALOG_GANGAMMODEPOSITS: { format(string, sizeof(string), "Hollow point (%i)\nPoison tip (%i)\nFMJ ammo (%i)", GangInfo[PlayerInfo[playerid][pGang]][gArmsHPAmmo], GangInfo[PlayerInfo[playerid][pGang]][gArmsPoisonAmmo], GangInfo[PlayerInfo[playerid][pGang]][gArmsFMJAmmo]); ShowPlayerDialog(playerid, DIALOG_GANGAMMODEPOSITS, DIALOG_STYLE_LIST, "Arms dealer | Deposit ammo", string, "Select", "Back"); } case DIALOG_GANGAMMODEPOSIT: { if(PlayerInfo[playerid][pSelected] == 0) { format(string, sizeof(string), "How much hollow point ammo would you like to deposit? (This arms dealer contains %i rounds.)", GangInfo[PlayerInfo[playerid][pGang]][gArmsHPAmmo]); } else if(PlayerInfo[playerid][pSelected] == 1) { format(string, sizeof(string), "How much poison tip ammo would you like to deposit? (This arms dealer contains %i rounds.)", GangInfo[PlayerInfo[playerid][pGang]][gArmsPoisonAmmo]); } else if(PlayerInfo[playerid][pSelected] == 2) { format(string, sizeof(string), "How much FMJ ammo would you like to deposit? (This arms dealer contains %i rounds.)", GangInfo[PlayerInfo[playerid][pGang]][gArmsFMJAmmo]); } ShowPlayerDialog(playerid, DIALOG_GANGAMMODEPOSIT, DIALOG_STYLE_INPUT, "Arms dealer | Deposit ammo", string, "Submit", "Back"); } case DIALOG_GANGAMMOWITHDRAWS: { format(string, sizeof(string), "Hollow point (%i)\nPoison tip (%i)\nFMJ ammo (%i)", GangInfo[PlayerInfo[playerid][pGang]][gArmsHPAmmo], GangInfo[PlayerInfo[playerid][pGang]][gArmsPoisonAmmo], GangInfo[PlayerInfo[playerid][pGang]][gArmsFMJAmmo]); ShowPlayerDialog(playerid, DIALOG_GANGAMMOWITHDRAWS, DIALOG_STYLE_LIST, "Arms dealer | Withdraw ammo", string, "Select", "Back"); } case DIALOG_GANGAMMOWITHDRAW: { if(PlayerInfo[playerid][pSelected] == 0) { format(string, sizeof(string), "How much hollow point ammo would you like to withdraw? (This arms dealer contains %i rounds.)", GangInfo[PlayerInfo[playerid][pGang]][gArmsHPAmmo]); } else if(PlayerInfo[playerid][pSelected] == 1) { format(string, sizeof(string), "How much poison tip ammo would you like to withdraw? (This arms dealer contains %i rounds.)", GangInfo[PlayerInfo[playerid][pGang]][gArmsPoisonAmmo]); } else if(PlayerInfo[playerid][pSelected] == 2) { format(string, sizeof(string), "How much FMJ ammo would you like to withdraw? (This arms dealer contains %i rounds.)", GangInfo[PlayerInfo[playerid][pGang]][gArmsFMJAmmo]); } ShowPlayerDialog(playerid, DIALOG_GANGAMMOWITHDRAW, DIALOG_STYLE_INPUT, "Arms dealer | Withdraw", string, "Submit", "Back"); } case DIALOG_GANGDRUGDEALER: { ShowPlayerDialog(playerid, DIALOG_GANGDRUGDEALER, DIALOG_STYLE_LIST, "Drug dealer", "Buy Drugs\nEdit", "Select", "Cancel"); } case DIALOG_GANGDRUGSHOP: { format(string, sizeof(string), "Drug\tPrice\tStock\nWeed\t$%i\t%i grams\nCocaine\t$%i\t%i grams\nMeth\t$%i\t%i grams", GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugPrices][0], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugWeed], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugPrices][1], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugCocaine], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugPrices][2], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugMeth]); ShowPlayerDialog(playerid, DIALOG_GANGDRUGSHOP, DIALOG_STYLE_TABLIST_HEADERS, "Drug dealer", string, "Buy", "Back"); } case DIALOG_GANGDRUGBUY: { if(PlayerInfo[playerid][pSelected] == 0) { format(string, sizeof(string), "How much weed would you like to buy? ($%i per gram. %i grams available.)", GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugPrices][0], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugWeed]); } else if(PlayerInfo[playerid][pSelected] == 1) { format(string, sizeof(string), "How much cocaine would you like to buy? ($%i per gram. %i grams available.)", GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugPrices][1], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugCocaine]); } else if(PlayerInfo[playerid][pSelected] == 2) { format(string, sizeof(string), "How much meth would you like to buy? ($%i per gram. %i grams available.)", GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugPrices][2], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugMeth]); } ShowPlayerDialog(playerid, DIALOG_GANGDRUGBUY, DIALOG_STYLE_INPUT, "Drug dealer | Buy", string, "Submit", "Back"); } case DIALOG_GANGDRUGEDIT: { format(string, sizeof(string), "Drug dealer (Weed: %i) (Cocaine: %i) (Meth: %i)", GangInfo[PlayerInfo[playerid][pGang]][gDrugWeed], GangInfo[PlayerInfo[playerid][pGang]][gDrugCocaine], GangInfo[PlayerInfo[playerid][pGang]][gDrugMeth]); ShowPlayerDialog(playerid, DIALOG_GANGDRUGEDIT, DIALOG_STYLE_LIST, string, "Edit prices\nDeposit drugs\nWithdraw drugs", "Select", "Back"); } case DIALOG_GANGDRUGPRICES: { format(string, sizeof(string), "Drug\tPrice\tStock\nWeed\t$%i\t%i grams\nCocaine\t$%i\t%i grams\nMeth\t$%i\t%i grams", GangInfo[PlayerInfo[playerid][pGang]][gDrugPrices][0], GangInfo[PlayerInfo[playerid][pGang]][gDrugWeed], GangInfo[PlayerInfo[playerid][pGang]][gDrugPrices][1], GangInfo[PlayerInfo[playerid][pGang]][gDrugCocaine], GangInfo[PlayerInfo[playerid][pGang]][gDrugPrices][2], GangInfo[PlayerInfo[playerid][pGang]][gDrugMeth]); ShowPlayerDialog(playerid, DIALOG_GANGDRUGPRICES, DIALOG_STYLE_TABLIST_HEADERS, "Choose a drug price to edit.", string, "Change", "Back"); } case DIALOG_GANGDRUGDEPOSITS: { format(string, sizeof(string), "Weed (%ig)\nCocaine (%ig)\nMeth (%ig)", GangInfo[PlayerInfo[playerid][pGang]][gDrugWeed], GangInfo[PlayerInfo[playerid][pGang]][gDrugCocaine], GangInfo[PlayerInfo[playerid][pGang]][gDrugMeth]); ShowPlayerDialog(playerid, DIALOG_GANGDRUGDEPOSITS, DIALOG_STYLE_LIST, "Drug dealer | Deposit", string, "Select", "Back"); } case DIALOG_GANGDRUGDEPOSIT: { if(PlayerInfo[playerid][pSelected] == 0) { format(string, sizeof(string), "How much weed would you like to deposit? (This drug dealer contains %i grams.)", GangInfo[PlayerInfo[playerid][pGang]][gDrugWeed]); } else if(PlayerInfo[playerid][pSelected] == 1) { format(string, sizeof(string), "How much cocaine would you like to deposit? (This drug dealer contains %i grams.)", GangInfo[PlayerInfo[playerid][pGang]][gDrugCocaine]); } else if(PlayerInfo[playerid][pSelected] == 2) { format(string, sizeof(string), "How much meth would you like to deposit? (This drug dealer contains %i grams.)", GangInfo[PlayerInfo[playerid][pGang]][gDrugMeth]); } ShowPlayerDialog(playerid, DIALOG_GANGDRUGDEPOSIT, DIALOG_STYLE_INPUT, "Drug dealer | Deposit", string, "Submit", "Back"); } case DIALOG_GANGDRUGWITHDRAWS: { format(string, sizeof(string), "Weed (%ig)\nCocaine (%ig)\nMeth (%ig)", GangInfo[PlayerInfo[playerid][pGang]][gDrugWeed], GangInfo[PlayerInfo[playerid][pGang]][gDrugCocaine], GangInfo[PlayerInfo[playerid][pGang]][gDrugMeth]); ShowPlayerDialog(playerid, DIALOG_GANGDRUGWITHDRAWS, DIALOG_STYLE_LIST, "Drug dealer | Withdraw", string, "Select", "Back"); } case DIALOG_GANGDRUGWITHDRAW: { if(PlayerInfo[playerid][pSelected] == 0) { format(string, sizeof(string), "How much weed would you like to withdraw? (This drug dealer contains %i grams.)", GangInfo[PlayerInfo[playerid][pGang]][gDrugWeed]); } else if(PlayerInfo[playerid][pSelected] == 1) { format(string, sizeof(string), "How much cocaine would you like to withdraw? (This drug dealer contains %i grams.)", GangInfo[PlayerInfo[playerid][pGang]][gDrugCocaine]); } else if(PlayerInfo[playerid][pSelected] == 2) { format(string, sizeof(string), "How much meth would you like to withdraw? (This drug dealer contains %i grams.)", GangInfo[PlayerInfo[playerid][pGang]][gDrugMeth]); } ShowPlayerDialog(playerid, DIALOG_GANGDRUGWITHDRAW, DIALOG_STYLE_INPUT, "Drug dealer | Withdraw", string, "Submit", "Back"); } } return 1; } SetPlayerToSpawn(playerid) { if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) { SetSpawnInfo(playerid, NO_TEAM, PlayerInfo[playerid][pSkin], 820.5590, -1342.6283, 13.5216, 90.0000, 0, 0, 0, 0, 0, 0); TogglePlayerSpectating(playerid, 0); } else { if(IsPlayerInAnyVehicle(playerid)) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x, y, z + 5.0); } SpawnPlayer(playerid); } PlayerInfo[playerid][pACTime] = gettime() + 2; } SetPlayerToFacePlayer(playerid, targetid) { new Float:px, Float:py, Float:pz, Float:tx, Float:ty, Float:tz; GetPlayerPos(targetid, tx, ty, tz); GetPlayerPos(playerid, px, py, pz); SetPlayerFacingAngle(playerid, 180.0 - atan2(px - tx, py - ty)); } SavePlayerVariables(playerid) { if(PlayerInfo[playerid][pLogged] && !PlayerInfo[playerid][pAdminDuty]) { if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING && !IsPlayerInRangeOfPoint(playerid, 2.0, 0.0, 0.0, 0.0) && !PlayerInfo[playerid][pJoinedEvent] && !PlayerInfo[playerid][pPaintball] && !PlayerInfo[playerid][pAcceptedHelp] && PlayerInfo[playerid][pDueling] == INVALID_PLAYER_ID) { SavePlayerWeapons(playerid); GetPlayerCameraPos(playerid, PlayerInfo[playerid][pCameraX], PlayerInfo[playerid][pCameraY], PlayerInfo[playerid][pCameraZ]); GetPlayerPos(playerid, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]); GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPosA]); GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]); GetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]); PlayerInfo[playerid][pInterior] = GetPlayerInterior(playerid); PlayerInfo[playerid][pWorld] = GetPlayerVirtualWorld(playerid); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET camera_x = '%f', camera_y = '%f', camera_z = '%f', pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', interior = %i, world = %i, health = '%f', armor = '%f', minutes = %i, warnings = %i, injured = %i, hospital = %i, upgradepoints = %i, spawnhealth = '%f', spawnarmor = '%f', jailtype = %i, jailtime = %i WHERE uid = %i", PlayerInfo[playerid][pCameraX], PlayerInfo[playerid][pCameraY], PlayerInfo[playerid][pCameraZ], PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ], PlayerInfo[playerid][pPosA], PlayerInfo[playerid][pInterior], PlayerInfo[playerid][pWorld], PlayerInfo[playerid][pHealth], PlayerInfo[playerid][pArmor], PlayerInfo[playerid][pMinutes], PlayerInfo[playerid][pWarnings], PlayerInfo[playerid][pInjured], PlayerInfo[playerid][pHospital], PlayerInfo[playerid][pUpgradePoints], PlayerInfo[playerid][pSpawnHealth], PlayerInfo[playerid][pSpawnArmor], PlayerInfo[playerid][pJailType], PlayerInfo[playerid][pJailTime], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET newbiemuted = %i, helpmuted = %i, admuted = %i, livemuted = %i, globalmuted = %i, reportmuted = %i, reportwarns = %i, fightstyle = %i, cookies = %i, toggletextdraws = %i, toggleooc = %i, togglephone = %i, toggleadmin = %i, togglehelper = %i, togglenewbie = %i, togglewt = %i, togglevip = %i WHERE uid = %i", PlayerInfo[playerid][pNewbieMuted], PlayerInfo[playerid][pHelpMuted], PlayerInfo[playerid][pAdMuted], PlayerInfo[playerid][pLiveMuted], PlayerInfo[playerid][pGlobalMuted], PlayerInfo[playerid][pReportMuted], PlayerInfo[playerid][pReportWarns], PlayerInfo[playerid][pFightStyle], PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pToggleTextdraws], PlayerInfo[playerid][pToggleOOC], PlayerInfo[playerid][pTogglePhone], PlayerInfo[playerid][pToggleAdmin], PlayerInfo[playerid][pToggleHelper], PlayerInfo[playerid][pToggleNewbie], PlayerInfo[playerid][pToggleWT], PlayerInfo[playerid][pToggleVIP], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET toggleradio = %i, togglemusic = %i, togglefaction = %i, togglenews = %i, toggleglobal = %i, togglecam = %i, togglehud = %i, weedtime = %i, weedgrams = %i, showturfs = %i, showlands = %i, watchon = %i, gpson = %i, couriercooldown = %i, pizzacooldown = %i, detectivecooldown = %i, duty = %i, bandana = %i WHERE uid = %i", PlayerInfo[playerid][pToggleRadio], PlayerInfo[playerid][pToggleMusic], PlayerInfo[playerid][pToggleFaction], PlayerInfo[playerid][pToggleNews], PlayerInfo[playerid][pToggleGlobal], PlayerInfo[playerid][pToggleCam], PlayerInfo[playerid][pToggleHUD], PlayerInfo[playerid][pWeedTime], PlayerInfo[playerid][pWeedGrams], PlayerInfo[playerid][pShowTurfs], PlayerInfo[playerid][pShowLands], PlayerInfo[playerid][pWatchOn], PlayerInfo[playerid][pGPSOn], PlayerInfo[playerid][pCourierCooldown], PlayerInfo[playerid][pPizzaCooldown], PlayerInfo[playerid][pDetectiveCooldown], PlayerInfo[playerid][pDuty], PlayerInfo[playerid][pBandana], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } } SavePlayerWeapons(playerid) { if(PlayerInfo[playerid][pLogged] && !PlayerInfo[playerid][pJoinedEvent] && !PlayerInfo[playerid][pPaintball] && PlayerInfo[playerid][pDueling] == INVALID_PLAYER_ID) { // Saving weapons. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weapon_0 = %i, weapon_1 = %i, weapon_2 = %i, weapon_3 = %i, weapon_4 = %i, weapon_5 = %i, weapon_6 = %i, weapon_7 = %i, weapon_8 = %i, weapon_9 = %i, weapon_10 = %i, weapon_11 = %i, weapon_12 = %i WHERE uid = %i", PlayerInfo[playerid][pWeapons][0], PlayerInfo[playerid][pWeapons][1], PlayerInfo[playerid][pWeapons][2], PlayerInfo[playerid][pWeapons][3], PlayerInfo[playerid][pWeapons][4], PlayerInfo[playerid][pWeapons][5], PlayerInfo[playerid][pWeapons][6], PlayerInfo[playerid][pWeapons][7], PlayerInfo[playerid][pWeapons][8], PlayerInfo[playerid][pWeapons][9], PlayerInfo[playerid][pWeapons][10], PlayerInfo[playerid][pWeapons][11], PlayerInfo[playerid][pWeapons][12], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); // And finally the ammo. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET hpammo = %i, poisonammo = %i, fmjammo = %i, ammotype = %i, ammoweapon = %i WHERE uid = %i", PlayerInfo[playerid][pHPAmmo], PlayerInfo[playerid][pPoisonAmmo], PlayerInfo[playerid][pFMJAmmo], PlayerInfo[playerid][pAmmoType], PlayerInfo[playerid][pAmmoWeapon], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } } SendPaycheck(playerid) { // Paycheck amounts are temporary until a job system is put in place. if(PlayerInfo[playerid][pPaycheck] <= 0) { PlayerInfo[playerid][pPaycheck] = min(PlayerInfo[playerid][pLevel], 21) * 1200; } new paycheck = PlayerInfo[playerid][pPaycheck]; new interest, rate; new tax = (paycheck / 100) * gTax; // 10% tax new rent = 0, renting = -1; // temp new total = paycheck - tax; switch(PlayerInfo[playerid][pVIPPackage]) { case 0: rate = 1; case 1: rate = 3; case 2: rate = 5; case 3: rate = 8; } interest = (PlayerInfo[playerid][pBank] / 1000) * rate; total += interest; if(PlayerInfo[playerid][pRentingHouse]) { for(new i = 0; i < MAX_HOUSES; i ++) { if(HouseInfo[i][hExists] && HouseInfo[i][hID] == PlayerInfo[playerid][pRentingHouse] && HouseInfo[i][hRentPrice] > 0) { rent = HouseInfo[i][hRentPrice]; renting = i; } } } SendClientMessage(playerid, COLOR_GREEN, "|____ Paycheck ____|"); SendClientMessageEx(playerid, COLOR_GREY2, "Paycheck: {33CC33}+$%i", paycheck); if(PlayerInfo[playerid][pFaction] >= 0 && FactionInfo[PlayerInfo[playerid][pFaction]][fPaycheck][PlayerInfo[playerid][pFactionRank]] > 0) { SendClientMessageEx(playerid, COLOR_GREY2, "Faction Pay: {33CC33}+$%i", FactionInfo[PlayerInfo[playerid][pFaction]][fPaycheck][PlayerInfo[playerid][pFactionRank]]); total += FactionInfo[PlayerInfo[playerid][pFaction]][fPaycheck][PlayerInfo[playerid][pFactionRank]]; } SendClientMessageEx(playerid, COLOR_GREY2, "Interest: {33CC33}+$%i {C8C8C8}(rate: %.1f)", interest, floatdiv(float(rate), 10)); SendClientMessageEx(playerid, COLOR_GREY2, "Income Tax: {FF6347}-$%i {C8C8C8}(%i percent)", tax, gTax); if(renting != -1) { if(total >= rent || PlayerInfo[playerid][pBank] >= rent) { if(total >= rent) { total -= rent; } else { PlayerInfo[playerid][pBank] -= rent; } SendClientMessageEx(playerid, COLOR_GREY2, "Rent Paid: {FF6347}-$%i", rent); HouseInfo[renting][hCash] += rent; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET cash = %i WHERE id = %i", HouseInfo[renting][hCash], HouseInfo[renting][hID]); mysql_tquery(connectionID, queryBuffer); } else { rent = -1; } } SendClientMessageEx(playerid, COLOR_GREY2, "Old Balance: $%i", PlayerInfo[playerid][pBank]); SendClientMessage(playerid, COLOR_GREEN, "|-----------------------------|"); SendClientMessageEx(playerid, COLOR_GREY2, "New Balance: $%i", PlayerInfo[playerid][pBank] + total); SendClientMessageEx(playerid, COLOR_AQUA, "You have played %i/25 minutes this hour and earned your paycheck.", PlayerInfo[playerid][pMinutes]); GameTextForPlayer(playerid, "~g~Paycheck~n~~w~Added to bank account", 5000, 1); if(rent == -1) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET rentinghouse = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[playerid][pRentingHouse] = 0; SendClientMessage(playerid, COLOR_RED, "You couldn't afford to pay rent and were evicted as a result."); } AddToTaxVault(tax); if((gDoubleXP) || PlayerInfo[playerid][pDoubleXP] > 0) PlayerInfo[playerid][pEXP] += 2; else PlayerInfo[playerid][pEXP]++; if(PlayerInfo[playerid][pGang] >= 0) { GiveGangPoints(PlayerInfo[playerid][pGang], 1); } PlayerInfo[playerid][pHours]++; PlayerInfo[playerid][pBank] += total; PlayerInfo[playerid][pMinutes] = 0; PlayerInfo[playerid][pPaycheck] = 0; if(PlayerInfo[playerid][pWeaponRestricted] > 0) { PlayerInfo[playerid][pWeaponRestricted]--; } if((!gDoubleXP) && PlayerInfo[playerid][pDoubleXP] > 0) { PlayerInfo[playerid][pDoubleXP]--; if(PlayerInfo[playerid][pDoubleXP] > 0) SendClientMessageEx(playerid, COLOR_YELLOW, "Your double XP token expires in %i more hours.", PlayerInfo[playerid][pDoubleXP]); else SendClientMessage(playerid, COLOR_YELLOW, "Your double XP token has expired."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET minutes = 0, hours = hours + 1, exp = %i, bank = %i, paycheck = 0, weaponrestricted = %i, doublexp = %i WHERE uid = %i", PlayerInfo[playerid][pEXP], PlayerInfo[playerid][pBank], PlayerInfo[playerid][pWeaponRestricted], PlayerInfo[playerid][pDoubleXP], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); gTotalHours++; SaveServerInfo(); } HangupCall(playerid, reason) { new callerid = PlayerInfo[playerid][pCallLine]; if(reason == HANGUP_DROPPED) { SendClientMessage(playerid, COLOR_WHITE, "** The call has been dropped..."); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s presses a button and hangs up their mobile phone.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_WHITE, "** You hung up your phone and ended the call."); if(callerid != playerid) { SendClientMessage(callerid, COLOR_WHITE, "** They hung up their phone and ended the call."); } } if(callerid != playerid) { if(GetPlayerSpecialAction(callerid) == SPECIAL_ACTION_USECELLPHONE) { SetPlayerSpecialAction(callerid, SPECIAL_ACTION_STOPUSECELLPHONE); } PlayerInfo[callerid][pCallStage] = 0; PlayerInfo[callerid][pCallLine] = INVALID_PLAYER_ID; } if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USECELLPHONE) { SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE); } PlayerInfo[playerid][pCallStage] = 0; PlayerInfo[playerid][pCallLine] = INVALID_PLAYER_ID; } AddToTaxVault(amount) { gVault += amount; SaveServerInfo(); } SaveServerInfo() { new File:file = fopen("server_info.ini", io_write); if(file) { new string[255]; format(string, sizeof(string), "%i|%i|%i|%s|%s|%i|%i|%i|%i|%i|%i", gTax, gVault, gPlayerRecord, gRecordDate, gServerMOTD, gConnections, gTotalRegistered, gTotalKills, gTotalDeaths, gTotalHours, gAnticheatBans); fwrite(file, string); fclose(file); } } LoadServerInfo() { new File:file = fopen("server_info.ini", io_read); if(file) { new string[255]; fread(file, string); sscanf(string, "p<|>iiis[24]s[128]iiiiii", gTax, gVault, gPlayerRecord, gRecordDate, gServerMOTD, gConnections, gTotalRegistered, gTotalKills, gTotalDeaths, gTotalHours, gAnticheatBans); fclose(file); } if(gTax == 0) { gTax = 10; } } RefreshLoginScreen() { new string[80]; mysql_tquery(connectionID, "SELECT * FROM changes ORDER BY slot", "OnQueryFinished", "ii", THREAD_LOGIN_UPDATE, 1); mysql_tquery(connectionID, "SELECT username, hours FROM users WHERE hours > 0 ORDER BY hours DESC LIMIT 10", "OnQueryFinished", "ii", THREAD_LOGIN_UPDATE, 2); if(gPlayerRecord) { format(string, sizeof(string), "The player record count is ~y~%i~w~, achieved on %s.", gPlayerRecord, gRecordDate); TextDrawSetString(LoginScreen[1], string); } else { TextDrawSetString(LoginScreen[1], "There is no record player count that has been recorded yet."); } } RefreshTime() { new hour, minute, string[12]; gettime(hour, minute); format(string, sizeof(string), "%02d:%02d", hour, minute); TextDrawSetString(TimeTD, string); } GetBankRobbers() { new count; for(new i = 0; i < MAX_BANK_ROBBERS; i ++) { if(RobberyInfo[rRobbers][i] != INVALID_PLAYER_ID) { count++; } } return count; } AddToBankRobbery(playerid) { for(new i = 0; i < MAX_BANK_ROBBERS; i ++) { if(RobberyInfo[rRobbers][i] == INVALID_PLAYER_ID) { RobberyInfo[rRobbers][i] = playerid; PlayerInfo[playerid][pRobCash] = 0; break; } } } RemoveFromBankRobbery(playerid) { for(new i = 0; i < MAX_BANK_ROBBERS; i ++) { if(RobberyInfo[rRobbers][i] == playerid) { RobberyInfo[rRobbers][i] = INVALID_PLAYER_ID; } } if(!GetBankRobbers()) { ResetRobbery(); } else if(RobberyInfo[rPlanning] && RobberyInfo[rRobbers][0] == INVALID_PLAYER_ID) { for(new i = 1; i < MAX_BANK_ROBBERS; i ++) { if(RobberyInfo[rRobbers][i] != INVALID_PLAYER_ID) { RobberyInfo[rRobbers][0] = RobberyInfo[rRobbers][i]; RobberyInfo[rRobbers][i] = INVALID_PLAYER_ID; SendClientMessageEx(RobberyInfo[rRobbers][0], COLOR_AQUA, "You are now the leader of this bank heist!"); break; } } } PlayerInfo[playerid][pRobCash] = 0; PlayerInfo[playerid][pCP] = CHECKPOINT_NONE; RemovePlayerAttachedObject(playerid, 8); RemovePlayerAttachedObject(playerid, 9); PlayerPlaySound(playerid, 3402, 0.0, 0.0, 0.0); DisablePlayerCheckpoint(playerid); return 0; } IsPlayerInBankRobbery(playerid) { if(RobberyInfo[rPlanning] || RobberyInfo[rStarted]) { for(new i = 0; i < MAX_BANK_ROBBERS; i ++) { if(RobberyInfo[rRobbers][i] == playerid) { return 1; } } } return 0; } ResetRobbery() { if(RobberyInfo[rStarted]) { SendClientMessageToAllEx(COLOR_AQUA, "Breaking News: The bank robbery is now finished. $%i was stolen from the bank.", RobberyInfo[rStolen]); } if(IsValidDynamicObject(RobberyInfo[rObjects][0])) { DestroyDynamicObject(RobberyInfo[rObjects][0]); } if(IsValidDynamicObject(RobberyInfo[rObjects][1])) { DestroyDynamicObject(RobberyInfo[rObjects][1]); } for(new i = 0; i < 5; i ++) { DestroyDynamic3DTextLabel(RobberyInfo[rText][i]); RobberyInfo[rText][i] = Text3D:INVALID_3DTEXT_ID; } for(new i = 0; i < MAX_BANK_ROBBERS; i ++) { RobberyInfo[rRobbers][i] = INVALID_PLAYER_ID; } RobberyInfo[rTime] = 12; RobberyInfo[rPlanning] = 0; RobberyInfo[rStarted] = 0; RobberyInfo[rStolen] = 0; RobberyInfo[rObjects][0] = CreateDynamicObject(19799, 1678.248901, -988.194702, 671.695007, 0.000000, 0.000000, 0.000000); RobberyInfo[rObjects][1] = INVALID_OBJECT_ID; } ResetEvent() { if(EventInfo[eStarted]) { foreach(new i : Player) { if(PlayerInfo[i][pJoinedEvent]) { PlayerInfo[i][pJoinedEvent] = 0; SetPlayerToSpawn(i); } } } for(new i = 0; i < 5; i ++) { EventInfo[eWeapons][i] = 0; } EventInfo[eReady] = 0; EventInfo[eStarted] = 0; EventInfo[eLocked] = 0; EventInfo[eType] = 0; EventInfo[eJoinText] = 0; EventInfo[eHealth] = 100.0; EventInfo[eArmor] = 0.0; EventInfo[eInterior] = 0; EventInfo[eWorld] = 0; EventInfo[eNext] = 0; EventInfo[eCS] = 0; EventInfo[eQS] = 0; EventInfo[eHeal] = 0; for(new i = 0; i < 2; i ++) { EventInfo[ePosX][i] = 0.0; EventInfo[ePosY][i] = 0.0; EventInfo[ePosZ][i] = 0.0; EventInfo[ePosA][i] = 0.0; EventInfo[eSkin][i] = 0; } } PreloadPlayerAnims(playerid) { static const animLibraries[][] = { !"AIRPORT", !"ATTRACTORS", !"BAR", !"BASEBALL", !"BD_FIRE", !"BEACH", !"BENCHPRESS", !"BF_INJECTION", !"BIKED", !"BIKEH", !"BIKELEAP", !"BIKES", !"BIKEV", !"BIKE_DBZ", !"BMX", !"BOMBER", !"BOX", !"BSKTBALL", !"BUDDY", !"BUS", !"CAMERA", !"CAR", !"CARRY", !"CAR_CHAT", !"CASINO", !"CHAINSAW", !"CHOPPA", !"CLOTHES", !"COACH", !"COLT45", !"COP_AMBIENT", !"COP_DVBYZ", !"CRACK", !"CRIB", !"DAM_JUMP", !"DANCING", !"DEALER", !"DILDO", !"DODGE", !"DOZER", !"DRIVEBYS", !"FAT", !"FIGHT_B", !"FIGHT_C", !"FIGHT_D", !"FIGHT_E", !"FINALE", !"FINALE2", !"FLAME", !"FLOWERS", !"FOOD", !"FREEWEIGHTS", !"GANGS", !"GHANDS", !"GHETTO_DB", !"GOGGLES", !"GRAFFITI", !"GRAVEYARD", !"GRENADE", !"GYMNASIUM", !"HAIRCUTS", !"HEIST9", !"INT_HOUSE", !"INT_OFFICE", !"INT_SHOP", !"JST_BUISNESS", !"KART", !"KISSING", !"KNIFE", !"LAPDAN1", !"LAPDAN2", !"LAPDAN3", !"LOWRIDER", !"MD_CHASE", !"MD_END", !"MEDIC", !"MISC", !"MTB", !"MUSCULAR", !"NEVADA", !"ON_LOOKERS", !"OTB", !"PARACHUTE", !"PARK", !"PAULNMAC", !"PED", !"PLAYER_DVBYS", !"PLAYIDLES", !"POLICE", !"POOL", !"POOR", !"PYTHON", !"QUAD", !"QUAD_DBZ", !"RAPPING", !"RIFLE", !"RIOT", !"ROB_BANK", !"ROCKET", !"RUSTLER", !"RYDER", !"SCRATCHING", !"SHAMAL", !"SHOP", !"SHOTGUN", !"SILENCED", !"SKATE", !"SMOKING", !"SNIPER", !"SPRAYCAN", !"STRIP", !"SUNBATHE", !"SWAT", !"SWEET", !"SWIM", !"SWORD", !"TANK", !"TATTOOS", !"TEC", !"TRAIN", !"TRUCK", !"UZI", !"VAN", !"VENDING", !"VORTEX", !"WAYFARER", !"WEAPONS", !"WUZI", !"WOP", !"GFUNK", !"RUNNINGMAN", !"BLOWJOBZ", !"SAMP" }; for(new i = 0; i < sizeof(animLibraries); i ++) { ApplyAnimation(playerid, animLibraries[i], "null", 0.0, 0, 0, 0, 0, 0, 1); } } ApplyAnimationEx(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time) { ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, 1); if(loop > 0 || freeze > 0) { PlayerInfo[playerid][pLoopAnim] = 1; if(!PlayerInfo[playerid][pToggleTextdraws]) { TextDrawShowForPlayer(playerid, AnimationTD); } } } PlayerUseAnims(playerid) { if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT || GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pMiningTime] > 0 || PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pCuffed] > 0) { return 0; } return 1; } GetAvailableAttachedSlot(playerid) { for(new i = 0; i < 5; i ++) { if(!IsPlayerAttachedObjectSlotUsed(playerid, i)) { return i; } } return -1; } CancelTaxiRide(playerid) // playerid is the driver of the taxi. { new passengerid = PlayerInfo[playerid][pTaxiPassenger], bill = PlayerInfo[playerid][pTaxiBill], string[20]; SendClientMessageEx(passengerid, COLOR_AQUA, "This ride costed you {FF6347}$%i{33CCFF}.", bill); SendClientMessageEx(playerid, COLOR_AQUA, "You earned {00AA00}$%i{33CCFF} on your paycheck for this ride.", bill); format(string, sizeof(string), "~r~-$%i", bill); GameTextForPlayer(passengerid, string, 5000, 1); format(string, sizeof(string), "~g~+$%i", bill); GameTextForPlayer(playerid, string, 5000, 1); GivePlayerCash(passengerid, -bill); AddToPaycheck(playerid, bill); PlayerInfo[playerid][pTaxiPassenger] = INVALID_PLAYER_ID; PlayerInfo[playerid][pTaxiBill] = 0; PlayerInfo[playerid][pTaxiTime] = 0; } SetFreezePos(playerid, Float:x, Float:y, Float:z) { if(PlayerInfo[playerid][pFreezeTimer] >= 0) { KillTimer(PlayerInfo[playerid][pFreezeTimer]); } PlayerInfo[playerid][pFreezeTimer] = SetTimerEx("UnfreezePlayer", 3000, false, "ifff", playerid, x, y, z); SetPlayerPos(playerid, x, y, z); TogglePlayerControllable(playerid, false); GameTextForPlayer(playerid, "~w~Loading objects...", 3000, 3); } IsPlayerChatActive(playerid) { foreach(new i : Player) { if(chattingWith[playerid]{i}) { return 1; } } return 0; } PlayerHasJob(playerid, job) { return (PlayerInfo[playerid][pJob] == job || PlayerInfo[playerid][pSecondJob] == job); } SetScriptArmour(playerid, Float:amount) { PlayerInfo[playerid][pACTime] = gettime() + 5; PlayerInfo[playerid][pArmorTime] = gettime() + 5; PlayerInfo[playerid][pArmor] = amount; return SetPlayerArmour(playerid, amount); } GetWeaponClipSize(weaponid) { switch(weaponid) { case 22, 23: return 17; case 26: return 2; case 24, 27: return 7; case 28, 31, 32: return 50; case 29, 30: return 30; } return 0; } ResetPlayerWeaponsEx(playerid) { ResetPlayerWeapons(playerid); SetPlayerArmedWeapon(playerid, 0); for(new i = 0; i < 13; i ++) { PlayerInfo[playerid][pWeapons][i] = 0; PlayerInfo[playerid][pTempWeapons][i] = 0; } PlayerInfo[playerid][pACTime] = gettime() + 2; } RemovePlayerWeapon(playerid, weaponid) { // Reset the player's weapons. ResetPlayerWeapons(playerid); // Set the armed slot to zero. SetPlayerArmedWeapon(playerid, 0); // Set the weapon in the slot to zero. PlayerInfo[playerid][pACTime] = gettime() + 2; PlayerInfo[playerid][pWeapons][weaponSlotIDs[weaponid]] = 0; PlayerInfo[playerid][pTempWeapons][weaponSlotIDs[weaponid]] = 0; // Set the player's weapons. SetPlayerWeapons(playerid); // Save them to prevent rollbacks. SavePlayerWeapons(playerid); } SetWeaponAmmo(playerid, type, amount) { if(type == AMMO_HP) { PlayerInfo[playerid][pHPAmmo] = amount; } else if(type == AMMO_POISON) { PlayerInfo[playerid][pPoisonAmmo] = amount; } else if(type == AMMO_FMJ) { PlayerInfo[playerid][pFMJAmmo] = amount; } SetPlayerWeapons(playerid); } GivePlayerWeaponEx(playerid, weaponid, bool:temp = false) { if(1 <= weaponid <= 46) { if(temp) { PlayerInfo[playerid][pTempWeapons][weaponSlotIDs[weaponid]] = weaponid; GivePlayerWeapon(playerid, weaponid, 19999); } else { PlayerInfo[playerid][pWeapons][weaponSlotIDs[weaponid]] = weaponid; SetPlayerWeapons(playerid); } if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetPlayerArmedWeapon(playerid, 0); } else if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { switch(weaponid) { case 22, 23, 25, 28..34: { SetPlayerArmedWeapon(playerid, weaponid); } default: { SetPlayerArmedWeapon(playerid, 0); } } } else { SetPlayerArmedWeapon(playerid, weaponid); } SavePlayerWeapons(playerid); PlayerInfo[playerid][pACTime] = gettime() + 2; } } GetScriptWeapon(playerid) { new weaponid = GetPlayerWeapon(playerid); if(PlayerHasWeapon(playerid, weaponid)) { return weaponid; } return 0; } PlayerHasWeapon(playerid, weaponid) { switch(weaponid) { case 0, 2, 40, 46: { return 1; } } if(weaponid == 23 && (PlayerInfo[playerid][pTazer] || (IsLawEnforcement(playerid) || GetFactionType(playerid) == FACTION_GOVERNMENT))) { return 1; } return PlayerInfo[playerid][pWeapons][weaponSlotIDs[weaponid]] == weaponid || PlayerInfo[playerid][pTempWeapons][weaponSlotIDs[weaponid]] == weaponid; } SetPlayerWeapons(playerid) { if(!PlayerInfo[playerid][pJoinedEvent] && !PlayerInfo[playerid][pPaintball] && PlayerInfo[playerid][pDueling] == INVALID_PLAYER_ID && !PlayerInfo[playerid][pJailType] && !PlayerInfo[playerid][pWeaponRestricted]) { new weaponid = GetPlayerWeapon(playerid); ResetPlayerWeapons(playerid); for(new i = 0; i < 13; i ++) { /*if(PlayerInfo[playerid][pTempWeapons][i] > 0) { PlayerInfo[playerid][pTempWeapons][i] = 0; }*/ if(PlayerInfo[playerid][pWeapons][i] > 0) { if(i == 2 && PlayerInfo[playerid][pTazer]) { GivePlayerWeaponEx(playerid, 23, true); continue; } if(PlayerInfo[playerid][pAmmoType] != AMMOTYPE_NORMAL && PlayerInfo[playerid][pAmmoWeapon] == PlayerInfo[playerid][pWeapons][i]) { if(PlayerInfo[playerid][pAmmoType] == AMMOTYPE_HP && PlayerInfo[playerid][pHPAmmo] > 0) { GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapons][i], PlayerInfo[playerid][pHPAmmo]); } else if(PlayerInfo[playerid][pAmmoType] == AMMOTYPE_POISON && PlayerInfo[playerid][pPoisonAmmo] > 0) { GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapons][i], PlayerInfo[playerid][pPoisonAmmo]); } else if(PlayerInfo[playerid][pAmmoType] == AMMOTYPE_FMJ && PlayerInfo[playerid][pFMJAmmo] > 0) { GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapons][i], PlayerInfo[playerid][pFMJAmmo]); } else { GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapons][i], 19999); SendClientMessageEx(playerid, COLOR_WHITE, "** Your %s is now using normal ammunition again as you ran out of special ammo.", GetWeaponNameEx(PlayerInfo[playerid][pWeapons][i])); PlayerInfo[playerid][pAmmoType] = AMMOTYPE_NORMAL; PlayerInfo[playerid][pAmmoWeapon] = 0; } } else { if(16 <= PlayerInfo[playerid][pWeapons][i] <= 18) GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapons][i], 1); else GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapons][i], 19999); } } } switch(GetPlayerState(playerid)) { case PLAYER_STATE_DRIVER: { SetPlayerArmedWeapon(playerid, 0); } case PLAYER_STATE_PASSENGER: { switch(weaponid) { case 22, 23, 25, 28..34: { SetPlayerArmedWeapon(playerid, weaponid); } default: { SetPlayerArmedWeapon(playerid, 0); } } } default: { SetPlayerArmedWeapon(playerid, weaponid); } } } } SetPlayerClothing(playerid) { // Reset any clothing that the player has on them. for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++) { if(ClothingInfo[playerid][i][cExists] && ClothingInfo[playerid][i][cAttached]) { RemovePlayerAttachedObject(playerid, ClothingInfo[playerid][i][cAttachedIndex]); } } // Now, we reapply the clothing to the player. for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++) { if(ClothingInfo[playerid][i][cExists] && ClothingInfo[playerid][i][cAttached]) { if(ClothingInfo[playerid][i][cAttachedIndex] == -1) { ClothingInfo[playerid][i][cAttachedIndex] = GetAvailableAttachedSlot(playerid); } if(ClothingInfo[playerid][i][cAttachedIndex] >= 0) { SetPlayerAttachedObject(playerid, ClothingInfo[playerid][i][cAttachedIndex], ClothingInfo[playerid][i][cModel], ClothingInfo[playerid][i][cBone], ClothingInfo[playerid][i][cPosX], ClothingInfo[playerid][i][cPosY], ClothingInfo[playerid][i][cPosZ], ClothingInfo[playerid][i][cRotX], ClothingInfo[playerid][i][cRotY], ClothingInfo[playerid][i][cRotZ], ClothingInfo[playerid][i][cScaleX], ClothingInfo[playerid][i][cScaleY], ClothingInfo[playerid][i][cScaleZ]); } else { // Clothing wasn't attached... slots are probably all full. ClothingInfo[playerid][i][cAttached] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE clothing SET attached = 0 WHERE id = %i", ClothingInfo[playerid][i][cID]); mysql_tquery(connectionID, queryBuffer); } } } PlayerInfo[playerid][pAwaitingClothing] = 0; } SetPlayerInPaintball(playerid) { new rand = random(sizeof(paintballSpawns)); if(!PlayerInfo[playerid][pPaintball]) { SavePlayerVariables(playerid); ResetPlayerWeapons(playerid); } SetPlayerPos(playerid, paintballSpawns[rand][0], paintballSpawns[rand][1], paintballSpawns[rand][2]); SetPlayerFacingAngle(playerid, paintballSpawns[rand][3]); SetPlayerInterior(playerid, 18); SetPlayerVirtualWorld(playerid, 1000); SetCameraBehindPlayer(playerid); SetPlayerHealth(playerid, 100.0); SetPlayerArmour(playerid, 100.0); GivePlayerWeaponEx(playerid, 24, true); GivePlayerWeaponEx(playerid, 27, true); GivePlayerWeaponEx(playerid, 29, true); GivePlayerWeaponEx(playerid, 31, true); GivePlayerWeaponEx(playerid, 34, true); PlayerInfo[playerid][pPaintball] = 1; } SetPlayerInEvent(playerid) { SavePlayerVariables(playerid); ResetPlayerWeapons(playerid); PlayerInfo[playerid][pJoinedEvent] = 1; if(EventInfo[eType] == 2) { PlayerInfo[playerid][pEventTeam] = EventInfo[eNext]; if(EventInfo[eNext] == RED_TEAM) { EventInfo[eNext] = BLUE_TEAM; } else { EventInfo[eNext] = RED_TEAM; } if(PlayerInfo[playerid][pEventTeam] == RED_TEAM) { GameTextForPlayer(playerid, "~w~You are on~n~~r~Red Team", 3000, 4); } else if(PlayerInfo[playerid][pEventTeam] == BLUE_TEAM) { GameTextForPlayer(playerid, "~w~You are on~n~~b~Blue Team", 3000, 6); } } else { PlayerInfo[playerid][pEventTeam] = 0; } for(new x = 0; x < 5; x ++) { if(EventInfo[eWeapons][x]) { GivePlayerWeaponEx(playerid, EventInfo[eWeapons][x], true); } } SetPlayerPos(playerid, EventInfo[ePosX][PlayerInfo[playerid][pEventTeam]], EventInfo[ePosY][PlayerInfo[playerid][pEventTeam]], EventInfo[ePosZ][PlayerInfo[playerid][pEventTeam]]); SetPlayerFacingAngle(playerid, EventInfo[ePosA][PlayerInfo[playerid][pEventTeam]]); SetPlayerInterior(playerid, EventInfo[eInterior]); SetPlayerVirtualWorld(playerid, EventInfo[eWorld]); SetPlayerHealth(playerid, EventInfo[eHealth]); SetPlayerArmour(playerid, EventInfo[eArmor]); SetCameraBehindPlayer(playerid); if(EventInfo[eSkin][PlayerInfo[playerid][pEventTeam]]) { SetPlayerSkin(playerid, EventInfo[eSkin][PlayerInfo[playerid][pEventTeam]]); } if(!isnull(EventInfo[eJoinText])) { GameTextForPlayer(playerid, EventInfo[eJoinText], 6000, 3); } if(EventInfo[eType] == 1 || EventInfo[eType] == 2) { SendClientMessageEx(playerid, COLOR_WHITE, "** Event rules: Crackshooting is %s, Quickswapping is %s, Healing is %s.", (EventInfo[eCS]) ? ("{FFD700}Allowed{FFFFFF}") : ("{FF6347}Not allowed{FFFFFF}"), (EventInfo[eQS]) ? ("{FFD700}Allowed{FFFFFF}") : ("{FF6347}Not allowed{FFFFFF}"), (EventInfo[eHeal]) ? ("{FFD700}Allowed{FFFFFF}") : ("{FF6347}Not allowed{FFFFFF}")); } return 1; } SetPlayerInHospital(playerid, time = 15) { PlayerInfo[playerid][pHospitalTime] = time; PlayerInfo[playerid][pHospital] = 1; TogglePlayerControllable(playerid, 0); SetPlayerDrunkLevel(playerid, 50000); GameTextForPlayer(playerid, "~w~Recovering...", 1500, 3); SetPlayerPos(playerid, -10.4534, 149.3639, 999.0613); SetPlayerCameraPos(playerid, -833.5241, -1358.8575, 86.9054); SetPlayerCameraLookAt(playerid, -830.8118, -1360.3612, 87.0289); //SetPlayerCameraLookAt(playerid, -830.8118, -1360.3612, 87.0289); SetPlayerInterior(playerid, 0); } SetPlayerInJail(playerid) { if(PlayerInfo[playerid][pCallLine] != INVALID_PLAYER_ID) { HangupCall(PlayerInfo[playerid][pCallLine], HANGUP_DROPPED); } if(PlayerInfo[playerid][pJailType] == 1) // OOC jail { switch(random(4)) { case 0: { SetPlayerPos(playerid, 227.4201, 110.0224, 999.0156); } case 1: { SetPlayerPos(playerid, 223.4770, 110.1765, 999.0156); } case 2: { SetPlayerPos(playerid, 219.4810, 110.4918, 999.0156); } case 3: { SetPlayerPos(playerid, 215.6093, 110.7171, 999.0156); } } SetPlayerFacingAngle(playerid, 0.0000); SetPlayerInterior(playerid, 10); SetPlayerVirtualWorld(playerid, 99999); SetCameraBehindPlayer(playerid); } else if(PlayerInfo[playerid][pJailType] == 2) // OOC prison { SetPlayerPos(playerid, -1132.9137, 856.5791, 3.0703); SetPlayerFacingAngle(playerid, 36.0000); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 99999); SetCameraBehindPlayer(playerid); } else if(PlayerInfo[playerid][pJailType] == 3) // IC prison { new index = random(sizeof(cellSpawns)); SetFreezePos(playerid, cellSpawns[index][0], cellSpawns[index][1], cellSpawns[index][2]); SetPlayerFacingAngle(playerid, cellSpawns[index][3]); SetPlayerInterior(playerid, 2); SetPlayerVirtualWorld(playerid, 5); SetCameraBehindPlayer(playerid); } } AFKCheck(playerid) { new Float:x, Float:y, Float:z, Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, x, y, z); GetPlayerCameraPos(playerid, cx, cy, cz); if(PlayerInfo[playerid][pAFKPos][0] == x && PlayerInfo[playerid][pAFKPos][1] == y && PlayerInfo[playerid][pAFKPos][2] == z && PlayerInfo[playerid][pAFKPos][3] == cx && PlayerInfo[playerid][pAFKPos][4] == cy && PlayerInfo[playerid][pAFKPos][5] == cz) { PlayerInfo[playerid][pAFKTime]++; if(!PlayerInfo[playerid][pAFK] && PlayerInfo[playerid][pAFKTime] >= 60) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** You are now marked as {00AA00}Away from keyboard{F7A763} as you haven't moved in one minute."); PlayerInfo[playerid][pAFK] = 1; } } else { if(PlayerInfo[playerid][pAFK]) { if(PlayerInfo[playerid][pAFKTime] < 120) { SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** You are no longer marked as Away from Keyboard after %i seconds.", PlayerInfo[playerid][pAFKTime]); } else { SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** You are no longer marked as Away from Keyboard after %i minutes.", PlayerInfo[playerid][pAFKTime] / 60); } PlayerInfo[playerid][pAFK] = 0; } PlayerInfo[playerid][pAFKTime] = 0; } PlayerInfo[playerid][pAFKPos][0] = x; PlayerInfo[playerid][pAFKPos][1] = y; PlayerInfo[playerid][pAFKPos][2] = z; PlayerInfo[playerid][pAFKPos][3] = cx; PlayerInfo[playerid][pAFKPos][4] = cy; PlayerInfo[playerid][pAFKPos][5] = cz; } TeleportToVehicle(playerid, vehicleid) { new Float:x, Float:y, Float:z, Float:a, interior, garageid; GetVehiclePos(vehicleid, x, y, z); GetVehicleZAngle(vehicleid, a); if((garageid = GetVehicleGarage(vehicleid)) >= 0) { interior = garageInteriors[GarageInfo[garageid][gType]][intID]; } TeleportToCoords(playerid, x + 1, y + 1, z + 1, a, interior, GetVehicleVirtualWorld(vehicleid)); } TeleportToPlayer(playerid, targetid, bool:vehicle = true) { new Float:x, Float:y, Float:z, Float:a; GetPlayerPos(targetid, x, y, z); GetPlayerFacingAngle(targetid, a); TeleportToCoords(playerid, x + 1, y + 1, z, a, GetPlayerInterior(targetid), GetPlayerVirtualWorld(targetid), .vehicle = vehicle); } TeleportToCoords(playerid, Float:x, Float:y, Float:z, Float:angle, interiorid, worldid, bool:freeze = false, bool:vehicle = true) { new vehicleid = GetPlayerVehicleID(playerid); if((vehicle) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { foreach(new i : Player) { if(IsPlayerInVehicle(i, vehicleid)) { SetPlayerInterior(i, interiorid); SetPlayerVirtualWorld(i, worldid); } } SetVehiclePos(vehicleid, x, y, z); SetVehicleZAngle(vehicleid, angle); SetVehicleVirtualWorld(vehicleid, worldid); LinkVehicleToInterior(vehicleid, interiorid); } else { SetPlayerPos(playerid, x, y, z); SetPlayerFacingAngle(playerid, angle); SetPlayerInterior(playerid, interiorid); SetPlayerVirtualWorld(playerid, worldid); SetCameraBehindPlayer(playerid); } if((freeze) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetTimerEx("VehicleUnfreeze", 3000, false, "iifffii", playerid, GetPlayerVehicleID(playerid), x, y, z, interiorid, worldid); GameTextForPlayer(playerid, "~w~Loading objects...", 3000, 3); TogglePlayerControllable(playerid, 0); } } ShowLandsOnMap(playerid, enable) { for(new i = 0; i < MAX_LANDS; i ++) { if(LandInfo[i][lExists]) { if(enable) { GangZoneShowForPlayer(playerid, LandInfo[i][lGangZone], (LandInfo[i][lOwnerID] > 0) ? (0xFF6347AA) : (0x33CC33AA)); } else { GangZoneHideForPlayer(playerid, LandInfo[i][lGangZone]); } } } PlayerInfo[playerid][pShowLands] = enable; } ShowTurfsOnMap(playerid, enable) { for(new i = 0; i < MAX_TURFS; i ++) { if(TurfInfo[i][tExists]) { if(enable) { GangZoneShowForPlayer(playerid, TurfInfo[i][tGangZone], GetTurfColor(i)); if(TurfInfo[i][tCapturer] == INVALID_PLAYER_ID) { GangZoneStopFlashForPlayer(playerid, TurfInfo[i][tGangZone]); } else { if(PlayerInfo[TurfInfo[i][tCapturer]][pGang] == -1 && GetFactionType(TurfInfo[i][tCapturer]) == FACTION_POLICE) GangZoneFlashForPlayer(playerid, TurfInfo[i][tGangZone], 0x000000AA); else if(PlayerInfo[TurfInfo[i][tCapturer]][pGang] >= 0) GangZoneFlashForPlayer(playerid, TurfInfo[i][tGangZone], (GangInfo[PlayerInfo[TurfInfo[i][tCapturer]][pGang]][gColor] & ~0xff) + 0xAA); } } else { GangZoneHideForPlayer(playerid, TurfInfo[i][tGangZone]); } } } PlayerInfo[playerid][pShowTurfs] = enable; } CancelZoneCreation(playerid) { for(new i = 0; i < 4; i ++) { DestroyDynamicPickup(PlayerInfo[playerid][pZonePickups][i]); PlayerInfo[playerid][pZonePickups][i] = -1; } GangZoneDestroy(PlayerInfo[playerid][pZoneID]); PlayerInfo[playerid][pZoneID] = -1; PlayerInfo[playerid][pZoneCreation] = 0; PlayerInfo[playerid][pMinX] = 0.0; PlayerInfo[playerid][pMinY] = 0.0; PlayerInfo[playerid][pMaxX] = 0.0; PlayerInfo[playerid][pMaxY] = 0.0; } ResetCooking(playerid) { PlayerInfo[playerid][pCookMeth] = 0; PlayerInfo[playerid][pCookGrams] = 0; PlayerInfo[playerid][pCookTime] = 0; } ResetPlayer(playerid) { if(PlayerInfo[playerid][pJoinedEvent]) { SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); ResetPlayerWeapons(playerid); PlayerInfo[playerid][pJoinedEvent] = 0; } if(PlayerInfo[playerid][pPaintball]) { ResetPlayerWeapons(playerid); PlayerInfo[playerid][pPaintball] = 0; } if(PlayerInfo[playerid][pHospital]) { GameTextForPlayer(playerid, " ", 100, 3); PlayerInfo[playerid][pHospital] = 0; PlayerInfo[playerid][pHospitalTime] = 0; } if(PlayerInfo[playerid][pMiningTime] > 0) { ClearAnimations(playerid, 1); } if(PlayerInfo[playerid][pTazedTime] > 0) { ClearAnimations(playerid, 1); TogglePlayerControllable(playerid, 1); } if(PlayerInfo[playerid][pCuffed]) { TogglePlayerControllable(playerid, 1); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE); } if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY) { SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE); } if(PlayerInfo[playerid][pLiveBroadcast] != INVALID_PLAYER_ID) { PlayerInfo[PlayerInfo[playerid][pLiveBroadcast]][pLiveBroadcast] = INVALID_PLAYER_ID; PlayerInfo[playerid][pLiveBroadcast] = INVALID_PLAYER_ID; } if(PlayerInfo[playerid][pPlantedBomb]) { DestroyDynamicObject(PlayerInfo[playerid][pBombObject]); PlayerInfo[playerid][pBombObject] = INVALID_OBJECT_ID; PlayerInfo[playerid][pPlantedBomb] = 0; } if(PlayerInfo[playerid][pFreezeTimer] >= 0) { KillTimer(PlayerInfo[playerid][pFreezeTimer]); TogglePlayerControllable(playerid, 1); PlayerInfo[playerid][pFreezeTimer] = -1; } if(PlayerInfo[playerid][pDueling] != INVALID_PLAYER_ID) { PlayerInfo[PlayerInfo[playerid][pDueling]][pDueling] = INVALID_PLAYER_ID; PlayerInfo[playerid][pDueling] = INVALID_PLAYER_ID; } if(RobberyInfo[rPlanning] || RobberyInfo[rStarted]) { RemoveFromBankRobbery(playerid); } PlayerInfo[playerid][pInjured] = 0; PlayerInfo[playerid][pAcceptedHelp] = 0; PlayerInfo[playerid][pMiningTime] = 0; PlayerInfo[playerid][pMiningRock] = 0; PlayerInfo[playerid][pSweeping] = 0; PlayerInfo[playerid][pSweepTime] = 0; PlayerInfo[playerid][pSweepEarnings] = 0; PlayerInfo[playerid][pTazer] = 0; PlayerInfo[playerid][pTazedTime] = 0; PlayerInfo[playerid][pCuffed] = 0; PlayerInfo[playerid][pDraggedBy] = INVALID_PLAYER_ID; PlayerInfo[playerid][pDelivered] = 0; PlayerInfo[playerid][pContractTaken] = INVALID_PLAYER_ID; PlayerInfo[playerid][pPoisonTime] = 0; PlayerInfo[playerid][pCapturingPoint] = -1; PlayerInfo[playerid][pCaptureTime] = 0; CancelActiveCheckpoint(playerid); RemovePlayerAttachedObject(playerid, 9); } CancelActiveCheckpoint(playerid) { if(PlayerInfo[playerid][pDrivingTest]) { SetVehicleToRespawn(PlayerInfo[playerid][pTestVehicle]); } if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY) { SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE); RemovePlayerAttachedObject(playerid, 9); } DisablePlayerCheckpoint(playerid); PlayerInfo[playerid][pCP] = CHECKPOINT_NONE; PlayerInfo[playerid][pPizzas] = 0; PlayerInfo[playerid][pSmuggleMats] = 0; PlayerInfo[playerid][pSmuggleDrugs] = 0; PlayerInfo[playerid][pDrivingTest] = 0; PlayerInfo[playerid][pTestVehicle] = INVALID_VEHICLE_ID; PlayerInfo[playerid][pTestCP] = 0; PlayerInfo[playerid][pMiningRock] = 0; PlayerInfo[playerid][pShipment] = -1; } ReferralCheck(playerid) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, ip FROM users WHERE uid = %i", PlayerInfo[playerid][pReferralUID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_REWARD_REFERRER, playerid); } SetPlayerSpecialTag(playerid, type) { new string[128]; if(IsValidDynamic3DTextLabel(PlayerInfo[playerid][pSpecialTag])) { DestroyDynamic3DTextLabel(PlayerInfo[playerid][pSpecialTag]); PlayerInfo[playerid][pSpecialTag] = Text3D:INVALID_3DTEXT_ID; } foreach(new i : Player) { if(type == TAG_NONE) ShowPlayerNameTagForPlayer(i, playerid, 1); else ShowPlayerNameTagForPlayer(i, playerid, 0); } switch(type) { case TAG_ADMIN: { if(!strcmp(PlayerInfo[playerid][pAdminName], "None", true)) format(string, sizeof(string), "%s\n{089DCE}LL:RP Administrator\n{FF6347}%s", GetPlayerNameEx(playerid), GetAdminRank(playerid)); else format(string, sizeof(string), "%s\n{089DCE}LL:RP Administrator\n{FF6347}%s", PlayerInfo[playerid][pAdminName], GetAdminRank(playerid)); PlayerInfo[playerid][pSpecialTag] = CreateDynamic3DTextLabel(string, COLOR_WHITE, 0.0, 0.0, 0.2, 20.0, .attachedplayer = playerid, .testlos = 1); } case TAG_HELPER: { format(string, sizeof(string), "%s\n{089DCE}Helper Assisting\n{00FF00}%s", GetPlayerRPName(playerid), GetHelperRank(playerid)); PlayerInfo[playerid][pSpecialTag] = CreateDynamic3DTextLabel(string, COLOR_WHITE, 0.0, 0.0, 0.2, 20.0, .attachedplayer = playerid, .testlos = 1); } case TAG_VIP: { format(string, sizeof(string), "%s\n{A028AD}Very Important Player\n{33CC33}%s VIP", GetPlayerRPName(playerid), GetVIPRank(PlayerInfo[playerid][pVIPPackage])); PlayerInfo[playerid][pSpecialTag] = CreateDynamic3DTextLabel(string, COLOR_WHITE, 0.0, 0.0, 0.2, 20.0, .attachedplayer = playerid, .testlos = 1); } } PlayerInfo[playerid][pTagType] = type; } SendNewbieChatMessage(playerid, text[]) { new string[64]; if(PlayerInfo[playerid][pAdmin] > 1) { format(string, sizeof(string), "%s %s", GetAdminRank(playerid), GetPlayerRPName(playerid)); } else if(PlayerInfo[playerid][pHelper] > 0) { format(string, sizeof(string), "%s %s", GetHelperRank(playerid), GetPlayerRPName(playerid)); } else if(PlayerInfo[playerid][pVIPPackage] > 0) { format(string, sizeof(string), "{A028AD}%s VIP{7DAEFF} %s", GetVIPRank(PlayerInfo[playerid][pVIPPackage]), GetPlayerRPName(playerid)); } else if(PlayerInfo[playerid][pLevel] > 1) { format(string, sizeof(string), "Player %s", GetPlayerRPName(playerid)); } else { format(string, sizeof(string), "Newbie %s", GetPlayerRPName(playerid)); } foreach(new i : Player) { if(!PlayerInfo[i][pToggleNewbie]) { if(strlen(text) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, COLOR_NEWBIE, "** %s: %.*s...", string, MAX_SPLIT_LENGTH, text); SendClientMessageEx(i, COLOR_NEWBIE, "** %s: ...%s", string, text[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, COLOR_NEWBIE, "** %s: %s", string, text); } } } if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pHelper] == 0) { PlayerInfo[playerid][pLastNewbie] = gettime(); } } #if defined SERVER_INTRO ShowServerIntro(playerid) { if(!PlayerInfo[playerid][pWatchingIntro]) { TogglePlayerSpectating(playerid, 1); TogglePlayerControllable(playerid, 0); PlayAudioStreamForPlayer(playerid, "http://limitlessrp.com/music/gtav.mp3"); SetPlayerVirtualWorld(playerid, playerid); SetPlayerPos(playerid, 155.3337, -1776.4384, 14.8978+5.0); SetPlayerCameraPos(playerid, 155.3337, -1776.4384, 14.8978); SetPlayerCameraLookAt(playerid, 156.2734, -1776.0850, 14.2128); InterpolateCameraLookAt(playerid, 156.2734, -1776.0850, 14.2128, 156.2713, -1776.0797, 14.7078, 5000, CAMERA_MOVE); TextDrawShowForPlayer(playerid, introTextdraws[0]); TextDrawShowForPlayer(playerid, introTextdraws[1]); TextDrawShowForPlayer(playerid, introTextdraws[2]); SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 0); SetTimerEx("ShowLoginScreenTextdraw", 2400, false, "ii", playerid, 1); PlayerInfo[playerid][pWatchingIntro] = 1; } } #endif SellWeapon(playerid, targetid, weaponid, price = 0) { new cost; switch(weaponid) { case 2, 5..8, 10, 14, 15: cost = 50; case 22: cost = 100; case 23: cost = 150; case 24: cost = 2000; case 25: cost = 200; case 28, 32: cost = 500; case 30: cost = 3500; case 31: cost = 4500; case 33: cost = 1000; } if(PlayerInfo[playerid][pMaterials] >= cost) { PlayerInfo[playerid][pMaterials] -= cost; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); if(targetid == playerid) { SendClientMessageEx(playerid, COLOR_AQUA, "You have crafted yourself a {FF6347}%s{33CCFF}.", GetWeaponNameEx(weaponid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s puts together some materials and crafts themselves a %s.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid)); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s puts together some materials and crafts a %s for %s.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid), GetPlayerRPName(targetid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have sold %s a {FF6347}%s{33CCFF} for {00AA00}$%i{33CCFF}.", GetPlayerRPName(targetid), GetWeaponNameEx(weaponid), price); SendClientMessageEx(targetid, COLOR_AQUA, "%s has sold you a {FF6347}%s{33CCFF} for {00AA00}$%i{33CCFF}.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid), price); GivePlayerCash(playerid, price); GivePlayerCash(targetid, -price); } if(weaponid >= 22) { IncreaseJobSkill(playerid, JOB_WEAPONDEALER); } GivePlayerWeaponEx(targetid, weaponid); return 1; } else { SendClientMessage(targetid, COLOR_GREY, "That player has ran out of materials."); } return 0; } Namechange(playerid, oldname[], newname[]) { for(new i = 0; i < MAX_HOUSES; i ++) { if(HouseInfo[i][hExists] && !strcmp(HouseInfo[i][hOwner], oldname, false)) { strcpy(HouseInfo[i][hOwner], newname, MAX_PLAYER_NAME); ReloadHouse(i); } } for(new i = 0; i < MAX_GARAGES; i ++) { if(GarageInfo[i][gExists] && !strcmp(GarageInfo[i][gOwner], oldname, false)) { strcpy(GarageInfo[i][gOwner], newname, MAX_PLAYER_NAME); ReloadGarage(i); } } for(new i = 0; i < MAX_BUSINESSES; i ++) { if(BusinessInfo[i][bExists] && !strcmp(BusinessInfo[i][bOwner], oldname, false)) { strcpy(BusinessInfo[i][bOwner], newname, MAX_PLAYER_NAME); ReloadBusiness(i); } } for(new i = 0; i < MAX_LANDS; i ++) { if(LandInfo[i][lExists] && !strcmp(LandInfo[i][lOwner], oldname, false)) { strcpy(LandInfo[i][lOwner], newname, MAX_PLAYER_NAME); ReloadLand(i); } } for(new i = 0; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && VehicleInfo[i][vID] && !strcmp(VehicleInfo[i][vOwner], oldname, false)) { strcpy(VehicleInfo[i][vOwner], newname, MAX_PLAYER_NAME); } } // Updating queries. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET owner = '%s' WHERE owner = '%s'", newname, oldname); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET owner = '%s' WHERE owner = '%s'", newname, oldname); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET owner = '%s' WHERE owner = '%s'", newname, oldname); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET owner = '%s' WHERE owner = '%s'", newname, oldname); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE lands SET owner = '%s' WHERE owner = '%s'", newname, oldname); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET username = '%s' WHERE uid = %i", newname, PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); strcpy(PlayerInfo[playerid][pUsername], newname, MAX_PLAYER_NAME); SetPlayerName(playerid, newname); SavePlayerVariables(playerid); } IsABoat(vehicleid) { switch(GetVehicleModel(vehicleid)) { case 430, 446, 452..454, 472, 473, 484, 493, 595: return 1; } return 0; } IsLawEnforcement(playerid) { return GetFactionType(playerid) == FACTION_POLICE || GetFactionType(playerid) == FACTION_FEDERAL; } IsPlayerBeingFound(playerid) { foreach(new i : Player) { if(PlayerInfo[i][pFindPlayer] == playerid && PlayerInfo[i][pFindTime] > 0) { return 1; } } return 0; } IsGateModel(modelid) { switch(modelid) { case 8957, 7891, 3037, 19861, 19864, 19912, 971, 975, 980, 985, 19870, 988: { return 1; } } return 0; } IsGateObject(objectid) { new modelid = Streamer_GetIntData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_MODEL_ID); if((modelid) && IsGateModel(modelid)) { return 1; } return 0; } IsDoorObject(objectid) { new modelid = Streamer_GetIntData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_MODEL_ID); if((modelid) && !IsGateObject(objectid)) { for(new i = 0; i < sizeof(furnitureArray); i ++) { if(!strcmp(furnitureArray[i][fCategory], "Doors & gates") && furnitureArray[i][fModel] == modelid) { return 1; } } } return 0; } RemoveFaction(factionid) { foreach(new i : Player) { if(PlayerInfo[i][pFaction] == factionid) { ResetPlayerWeaponsEx(i); SendClientMessageEx(i, COLOR_LIGHTRED, "The faction you were apart of has been deleted by an administrator."); SetPlayerSkin(i, 230); PlayerInfo[i][pFaction] = -1; PlayerInfo[i][pFactionRank] = 0; PlayerInfo[i][pDivision] = -1; PlayerInfo[i][pDuty] = 0; } } DestroyDynamic3DTextLabel(FactionInfo[factionid][fText]); DestroyDynamicPickup(FactionInfo[factionid][fPickup]); FactionInfo[factionid][fName] = 0; FactionInfo[factionid][fLeader] = 0; FactionInfo[factionid][fType] = FACTION_NONE; FactionInfo[factionid][fColor] = 0; FactionInfo[factionid][fRankCount] = 0; FactionInfo[factionid][fLockerX] = 0.0; FactionInfo[factionid][fLockerY] = 0.0; FactionInfo[factionid][fLockerZ] = 0.0; FactionInfo[factionid][fLockerInterior] = 0; FactionInfo[factionid][fLockerWorld] = 0; FactionInfo[factionid][fTurfTokens] = 0; FactionInfo[factionid][fText] = Text3D:INVALID_3DTEXT_ID; FactionInfo[factionid][fPickup] = -1; for(new i = 0; i < MAX_FACTION_RANKS; i ++) { strcpy(FactionRanks[factionid][i], "Unspecified", 32); FactionInfo[factionid][fPaycheck][i] = 0; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM factions WHERE id = %i", factionid); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM factionranks WHERE id = %i", factionid); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM factionskins WHERE id = %i", factionid); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM factionpay WHERE id = %i", factionid); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM divisions WHERE id = %i", factionid); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET faction = -1, factionrank = 0, division = -1 WHERE faction = %i", factionid); mysql_tquery(connectionID, queryBuffer); } GetFactionSkinCount(factionid) { new count; for(new i = 0; i < MAX_FACTION_SKINS; i ++) { if(FactionInfo[factionid][fSkins][i] != 0) { count++; } } return count; } GetFactionType(playerid) { if(PlayerInfo[playerid][pFaction] >= 0) { return FactionInfo[PlayerInfo[playerid][pFaction]][fType]; } return FACTION_NONE; } ReloadFaction(factionid) { if(FactionInfo[factionid][fType] != FACTION_NONE) { new string[128]; DestroyDynamic3DTextLabel(FactionInfo[factionid][fText]); DestroyDynamicPickup(FactionInfo[factionid][fPickup]); if(FactionInfo[factionid][fLockerX] != 0.0 && FactionInfo[factionid][fLockerY] != 0.0 && FactionInfo[factionid][fLockerZ] != 0.0) { format(string, sizeof(string), "%s\nLocker access\n/locker to access locker.", FactionInfo[factionid][fName]); FactionInfo[factionid][fText] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, FactionInfo[factionid][fLockerX], FactionInfo[factionid][fLockerY], FactionInfo[factionid][fLockerZ], 10.0, .worldid = FactionInfo[factionid][fLockerWorld], .interiorid = FactionInfo[factionid][fLockerInterior]); FactionInfo[factionid][fPickup] = CreateDynamicPickup(1239, 1, FactionInfo[factionid][fLockerX], FactionInfo[factionid][fLockerY], FactionInfo[factionid][fLockerZ], .worldid = FactionInfo[factionid][fLockerWorld], .interiorid = FactionInfo[factionid][fLockerInterior]); } } } SetupFaction(factionid, name[], type) { strcpy(FactionInfo[factionid][fName], name, 48); strcpy(FactionInfo[factionid][fLeader], "No-one", MAX_PLAYER_NAME); FactionInfo[factionid][fType] = type; FactionInfo[factionid][fColor] = 0xFFFFFF00; FactionInfo[factionid][fRankCount] = 6; FactionInfo[factionid][fLockerX] = 0.0; FactionInfo[factionid][fLockerY] = 0.0; FactionInfo[factionid][fLockerZ] = 0.0; FactionInfo[factionid][fLockerInterior] = 0; FactionInfo[factionid][fLockerWorld] = 0; FactionInfo[factionid][fTurfTokens] = 0; FactionInfo[factionid][fText] = Text3D:INVALID_3DTEXT_ID; FactionInfo[factionid][fPickup] = -1; for(new i = 0; i < MAX_FACTION_RANKS; i ++) { strcpy(FactionRanks[factionid][i], "Unspecified", 32); FactionInfo[factionid][fPaycheck][i] = 0; } for(new i = 0; i < MAX_FACTION_SKINS; i ++) { FactionInfo[factionid][fSkins][i] = 0; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO factions (id, name, type) VALUES(%i, '%e', %i)", factionid, name, type); mysql_tquery(connectionID, queryBuffer); } SetupGang(gangid, name[]) { strcpy(GangInfo[gangid][gName], name, 32); strcpy(GangInfo[gangid][gMOTD], "None", 128); strcpy(GangInfo[gangid][gLeader], "No-one", MAX_PLAYER_NAME); GangInfo[gangid][gSetup] = 1; GangInfo[gangid][gColor] = 0xFFFFFF00; GangInfo[gangid][gStrikes] = 0; GangInfo[gangid][gLevel] = 1; GangInfo[gangid][gPoints] = 0; GangInfo[gangid][gTurfTokens] = 0; GangInfo[gangid][gStashX] = 0.0; GangInfo[gangid][gStashY] = 0.0; GangInfo[gangid][gStashZ] = 0.0; GangInfo[gangid][gStashInterior] = 0; GangInfo[gangid][gStashWorld] = 0; GangInfo[gangid][gCash] = 0; GangInfo[gangid][gMaterials] = 0; GangInfo[gangid][gWeed] = 0; GangInfo[gangid][gCocaine] = 0; GangInfo[gangid][gMeth] = 0; GangInfo[gangid][gPainkillers] = 0; GangInfo[gangid][gHPAmmo] = 0; GangInfo[gangid][gPoisonAmmo] = 0; GangInfo[gangid][gFMJAmmo] = 0; GangInfo[gangid][gArmsDealer] = 0; GangInfo[gangid][gDrugDealer] = 0; GangInfo[gangid][gArmsX] = 0.0; GangInfo[gangid][gArmsY] = 0.0; GangInfo[gangid][gArmsZ] = 0.0; GangInfo[gangid][gDrugX] = 0.0; GangInfo[gangid][gDrugY] = 0.0; GangInfo[gangid][gDrugZ] = 0.0; GangInfo[gangid][gArmsWorld] = 0; GangInfo[gangid][gDrugWorld] = 0; GangInfo[gangid][gDrugWeed] = 0; GangInfo[gangid][gDrugCocaine] = 0; GangInfo[gangid][gDrugMeth] = 0; GangInfo[gangid][gArmsMaterials] = 0; GangInfo[gangid][gArmsHPAmmo] = 0; GangInfo[gangid][gArmsPoisonAmmo] = 0; GangInfo[gangid][gArmsFMJAmmo] = 0; GangInfo[gangid][gPickup] = -1; GangInfo[gangid][gActors][0] = INVALID_ACTOR_ID; GangInfo[gangid][gActors][1] = INVALID_ACTOR_ID; GangInfo[gangid][gText][0] = Text3D:INVALID_3DTEXT_ID; GangInfo[gangid][gText][1] = Text3D:INVALID_3DTEXT_ID; GangInfo[gangid][gText][2] = Text3D:INVALID_3DTEXT_ID; for(new i = 0; i < 7; i ++) { strcpy(GangRanks[gangid][i], "Unspecified", 32); } for(new i = 0; i < 12; i ++) { if(i < 3) { GangInfo[gangid][gDrugPrices][i] = 0; } GangInfo[gangid][gArmsPrices][i] = 0; } for(new i = 0; i < MAX_GANG_SKINS; i ++) { GangInfo[gangid][gSkins][i] = 0; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO gangs (id, name) VALUES(%i, '%e')", gangid, name); mysql_tquery(connectionID, queryBuffer); } AddPointMoney(type, amount) { for(new i = 0; i < MAX_POINTS; i ++) { if(PointInfo[i][pExists] && PointInfo[i][pType] == type) { if(PointInfo[i][pCapturedGang] >= 0) { amount /= 2; GangInfo[PointInfo[i][pCapturedGang]][gCash] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET cash = %i WHERE id = %i", GangInfo[PointInfo[i][pCapturedGang]][gCash], PointInfo[i][pCapturedGang]); mysql_tquery(connectionID, queryBuffer); } PointInfo[i][pProfits] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET profits = %i WHERE id = %i", PointInfo[i][pProfits], i); mysql_tquery(connectionID, queryBuffer); } } } ReloadPoint(pointid) { if(PointInfo[pointid][pExists]) { new string[128], name[32] = "None"; DestroyDynamic3DTextLabel(PointInfo[pointid][pText]); DestroyDynamicPickup(PointInfo[pointid][pPickup]); if(PointInfo[pointid][pCapturedGang] >= 0) { strcpy(name, GangInfo[PointInfo[pointid][pCapturedGang]][gName]); } if(PointInfo[pointid][pTime] > 0) format(string, sizeof(string), "%s\nOwned by: %s\nAvailable in %i hours.", PointInfo[pointid][pName], name, PointInfo[pointid][pTime]); else format(string, sizeof(string), "%s\nOwned by: %s\nAvailable to capture!", PointInfo[pointid][pName], name); PointInfo[pointid][pText] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, PointInfo[pointid][pPointX], PointInfo[pointid][pPointY], PointInfo[pointid][pPointZ], 10.0, .worldid = PointInfo[pointid][pPointWorld], .interiorid = PointInfo[pointid][pPointInterior]); PointInfo[pointid][pPickup] = CreateDynamicPickup(1239, 1, PointInfo[pointid][pPointX], PointInfo[pointid][pPointY], PointInfo[pointid][pPointZ], .worldid = PointInfo[pointid][pPointWorld], .interiorid = PointInfo[pointid][pPointInterior]); } } ReloadGang(gangid) { if(GangInfo[gangid][gSetup]) { new string[128]; DestroyDynamic3DTextLabel(GangInfo[gangid][gText][0]); DestroyDynamic3DTextLabel(GangInfo[gangid][gText][1]); DestroyDynamic3DTextLabel(GangInfo[gangid][gText][2]); DestroyDynamicPickup(GangInfo[gangid][gPickup]); DestroyActor(GangInfo[gangid][gActors][0]); DestroyActor(GangInfo[gangid][gActors][1]); if(GangInfo[gangid][gStashX] != 0.0 && GangInfo[gangid][gStashY] != 0.0 && GangInfo[gangid][gStashZ] != 0.0) { format(string, sizeof(string), "Level %i Gang Stash\n%s", GangInfo[gangid][gLevel], GangInfo[gangid][gName]); GangInfo[gangid][gText][0] = CreateDynamic3DTextLabel(string, COLOR_ORANGE, GangInfo[gangid][gStashX], GangInfo[gangid][gStashY], GangInfo[gangid][gStashZ], 10.0, .worldid = GangInfo[gangid][gStashWorld], .interiorid = GangInfo[gangid][gStashInterior]); GangInfo[gangid][gPickup] = CreateDynamicPickup(1239, 1, GangInfo[gangid][gStashX], GangInfo[gangid][gStashY], GangInfo[gangid][gStashZ], .worldid = GangInfo[gangid][gStashWorld], .interiorid = GangInfo[gangid][gStashInterior]); } if(GangInfo[gangid][gArmsDealer] && GangInfo[gangid][gArmsX] != 0.0 && GangInfo[gangid][gArmsY] != 0.0 && GangInfo[gangid][gArmsZ] != 0.0) { format(string, sizeof(string), "%s\nArms Dealer\n/armsdealer for more info.", GangInfo[gangid][gName]); GangInfo[gangid][gActors][0] = CreateActor(179, GangInfo[gangid][gArmsX], GangInfo[gangid][gArmsY], GangInfo[gangid][gArmsZ], GangInfo[gangid][gArmsA]); GangInfo[gangid][gText][1] = CreateDynamic3DTextLabel(string, COLOR_ORANGE, GangInfo[gangid][gArmsX], GangInfo[gangid][gArmsY], GangInfo[gangid][gArmsZ] + 0.3, 10.0, .worldid = GangInfo[gangid][gArmsWorld]); SetActorVirtualWorld(GangInfo[gangid][gActors][0], GangInfo[gangid][gArmsWorld]); } if(GangInfo[gangid][gDrugDealer] && GangInfo[gangid][gDrugX] != 0.0 && GangInfo[gangid][gDrugY] != 0.0 && GangInfo[gangid][gDrugZ] != 0.0) { format(string, sizeof(string), "%s\nDrug Dealer\n/drugdealer for more info.", GangInfo[gangid][gName]); GangInfo[gangid][gActors][1] = CreateActor(28, GangInfo[gangid][gDrugX], GangInfo[gangid][gDrugY], GangInfo[gangid][gDrugZ], GangInfo[gangid][gDrugA]); GangInfo[gangid][gText][2] = CreateDynamic3DTextLabel(string, COLOR_ORANGE, GangInfo[gangid][gDrugX], GangInfo[gangid][gDrugY], GangInfo[gangid][gDrugZ] + 0.3, 10.0, .worldid = GangInfo[gangid][gDrugWorld]); SetActorVirtualWorld(GangInfo[gangid][gActors][1], GangInfo[gangid][gDrugWorld]); } } } GiveGangPoints(gangid, amount) { if(GangInfo[gangid][gSetup]) { GangInfo[gangid][gPoints] = GangInfo[gangid][gPoints] + amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET points = %i WHERE id = %i", GangInfo[gangid][gPoints], gangid); mysql_tquery(connectionID, queryBuffer); } } RemoveGang(gangid) { foreach(new i : Player) { if(PlayerInfo[i][pGang] == gangid) { SendClientMessageEx(i, COLOR_LIGHTRED, "The gang you were apart of has been deleted by an administrator."); PlayerInfo[i][pGang] = -1; PlayerInfo[i][pGangRank] = 0; } } DestroyDynamic3DTextLabel(GangInfo[gangid][gText][0]); DestroyDynamic3DTextLabel(GangInfo[gangid][gText][1]); DestroyDynamic3DTextLabel(GangInfo[gangid][gText][2]); DestroyDynamicPickup(GangInfo[gangid][gPickup]); DestroyActor(GangInfo[gangid][gActors][0]); DestroyActor(GangInfo[gangid][gActors][1]); GangInfo[gangid][gSetup] = 0; GangInfo[gangid][gName] = 0; GangInfo[gangid][gMOTD] = 0; GangInfo[gangid][gLeader] = 0; GangInfo[gangid][gColor] = 0; GangInfo[gangid][gStrikes] = 0; GangInfo[gangid][gLevel] = 0; GangInfo[gangid][gPoints] = 0; GangInfo[gangid][gTurfTokens] = 0; GangInfo[gangid][gStashX] = 0.0; GangInfo[gangid][gStashY] = 0.0; GangInfo[gangid][gStashZ] = 0.0; GangInfo[gangid][gStashInterior] = 0; GangInfo[gangid][gStashWorld] = 0; GangInfo[gangid][gCash] = 0; GangInfo[gangid][gMaterials] = 0; GangInfo[gangid][gWeed] = 0; GangInfo[gangid][gCocaine] = 0; GangInfo[gangid][gMeth] = 0; GangInfo[gangid][gPainkillers] = 0; GangInfo[gangid][gArmsDealer] = 0; GangInfo[gangid][gDrugDealer] = 0; GangInfo[gangid][gArmsX] = 0.0; GangInfo[gangid][gArmsY] = 0.0; GangInfo[gangid][gArmsZ] = 0.0; GangInfo[gangid][gDrugX] = 0.0; GangInfo[gangid][gDrugY] = 0.0; GangInfo[gangid][gDrugZ] = 0.0; GangInfo[gangid][gArmsWorld] = 0; GangInfo[gangid][gDrugWorld] = 0; GangInfo[gangid][gDrugWeed] = 0; GangInfo[gangid][gDrugCocaine] = 0; GangInfo[gangid][gDrugMeth] = 0; GangInfo[gangid][gArmsMaterials] = 0; GangInfo[gangid][gArmsHPAmmo] = 0; GangInfo[gangid][gArmsPoisonAmmo] = 0; GangInfo[gangid][gArmsFMJAmmo] = 0; GangInfo[gangid][gPickup] = -1; GangInfo[gangid][gActors][0] = INVALID_ACTOR_ID; GangInfo[gangid][gActors][1] = INVALID_ACTOR_ID; GangInfo[gangid][gText][0] = Text3D:INVALID_3DTEXT_ID; GangInfo[gangid][gText][1] = Text3D:INVALID_3DTEXT_ID; GangInfo[gangid][gText][2] = Text3D:INVALID_3DTEXT_ID; for(new i = 0; i < 7; i ++) { strcpy(GangRanks[gangid][i], "Unspecified", 32); } for(new i = 0; i < 14; i ++) { GangInfo[gangid][gWeapons][i] = 0; } for(new i = 0; i < MAX_GANG_SKINS; i ++) { GangInfo[gangid][gSkins][i] = 0; } for(new i = 0; i < MAX_POINTS; i ++) { if(PointInfo[i][pExists] && PointInfo[i][pCapturedGang] == gangid) { PointInfo[i][pCapturedGang] = -1; } } for(new i = 0; i < MAX_TURFS; i ++) { if(TurfInfo[i][tExists] && TurfInfo[i][tCapturedGang] == gangid) { TurfInfo[i][tCapturedGang] = -1; } } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM gangs WHERE id = %i", gangid); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM gangranks WHERE id = %i", gangid); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM gangskins WHERE id = %i", gangid); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET capturedgang = -1 WHERE capturedgang = %i", gangid); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET capturedgang = -1 WHERE capturedgang = %i", gangid); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gang = -1, gangrank = 0 WHERE gang = %i", gangid); mysql_tquery(connectionID, queryBuffer); } GetGangVehicles(gangid) { new count; for(new i = 0; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && VehicleInfo[i][vID] > 0 && VehicleInfo[i][vGang] == gangid) { count++; } } return count; } GetGangVehicleLimit(gangid) { switch(GangInfo[gangid][gLevel]) { case 1: return 6; case 2: return 8; case 3: return 12; } return 0; } GetGangMemberLimit(gangid) { switch(GangInfo[gangid][gLevel]) { case 1: return 30; case 2: return 60; case 3: return 80; } return 0; } GetGangSkinCount(gangid) { new count; for(new i = 0; i < MAX_GANG_SKINS; i ++) { if(GangInfo[gangid][gSkins][i] != 0) { count++; } } return count; } GetSpawnedVehicles(playerid) { new count; for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && IsVehicleOwner(playerid, i)) { count++; } } return count; } GetVehicleGarage(vehicleid) { for(new i = 0; i < MAX_GARAGES; i ++) { if(GarageInfo[i][gExists] && GarageInfo[i][gWorld] == GetVehicleVirtualWorld(vehicleid)) { return i; } } return -1; } GetNearbyVehicle(playerid) { new Float:x, Float:y, Float:z; for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && IsVehicleStreamedIn(i, playerid)) { GetVehiclePos(i, x, y, z); if(IsPlayerInRangeOfPoint(playerid, 3.5, x, y, z)) { return i; } } } return INVALID_VEHICLE_ID; } IsVehicleOwner(playerid, vehicleid) { return (VehicleInfo[vehicleid][vOwnerID] == PlayerInfo[playerid][pID]) || (VehicleInfo[vehicleid][vOwnerID] > 0 && PlayerInfo[playerid][pAdminDuty]); } SetVehicleNeon(vehicleid, modelid) { if(18647 <= modelid <= 18652) { if(VehicleInfo[vehicleid][vNeonEnabled]) { DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][0]); DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][1]); } VehicleInfo[vehicleid][vNeon] = modelid; VehicleInfo[vehicleid][vNeonEnabled] = (modelid > 0); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET neon = %i, neonenabled = 1 WHERE id = %i", VehicleInfo[vehicleid][vNeon], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); ReloadVehicleNeon(vehicleid); } } ReloadVehicleNeon(vehicleid) { if(VehicleInfo[vehicleid][vID] > 0) { DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][0]); DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][1]); if(VehicleInfo[vehicleid][vNeon] && VehicleInfo[vehicleid][vNeonEnabled]) { new Float:x, Float:y, Float:z; GetVehicleModelInfo(VehicleInfo[vehicleid][vModel], VEHICLE_MODEL_INFO_SIZE, x, y, z); VehicleInfo[vehicleid][vObjects][0] = CreateDynamicObject(VehicleInfo[vehicleid][vNeon], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); VehicleInfo[vehicleid][vObjects][1] = CreateDynamicObject(VehicleInfo[vehicleid][vNeon], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(VehicleInfo[vehicleid][vObjects][0], vehicleid, -x / 2.8, 0.0, -0.6, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(VehicleInfo[vehicleid][vObjects][1], vehicleid, x / 2.8, 0.0, -0.6, 0.0, 0.0, 0.0); } } } ResyncVehicle(vehicleid) { new worldid = GetVehicleVirtualWorld(vehicleid); SetVehicleVirtualWorld(vehicleid, cellmax); SetVehicleVirtualWorld(vehicleid, worldid); } SaveVehicleModifications(vehicleid) { for(new i = 0; i < 14; i ++) { VehicleInfo[vehicleid][vMods][i] = GetVehicleComponentInSlot(vehicleid, i); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET mod_%i = %i WHERE id = %i", i + 1, VehicleInfo[vehicleid][vMods][i], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); } } ReloadVehicle(vehicleid) { if(VehicleInfo[vehicleid][vPaintjob] >= 0) { ChangeVehiclePaintjob(vehicleid, VehicleInfo[vehicleid][vPaintjob]); } if(VehicleInfo[vehicleid][vNeon] && VehicleInfo[vehicleid][vNeonEnabled]) { ReloadVehicleNeon(vehicleid); } for(new i = 0; i < 14; i ++) { if(VehicleInfo[vehicleid][vMods][i] >= 1000) { AddVehicleComponent(vehicleid, VehicleInfo[vehicleid][vMods][i]); } } if(strcmp(VehicleInfo[vehicleid][vPlate], "None") != 0) { SetVehicleNumberPlate(vehicleid, VehicleInfo[vehicleid][vPlate]); ResyncVehicle(vehicleid); } LinkVehicleToInterior(vehicleid, VehicleInfo[vehicleid][vInterior]); SetVehicleVirtualWorld(vehicleid, VehicleInfo[vehicleid][vWorld]); SetVehicleHealth(vehicleid, VehicleInfo[vehicleid][vHealth]); SetVehicleParams(vehicleid, VEHICLE_DOORS, VehicleInfo[vehicleid][vLocked]); } DespawnVehicle(vehicleid, bool:save = true) { if(VehicleInfo[vehicleid][vID] > 0) { if(VehicleInfo[vehicleid][vNeonEnabled]) { DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][0]); DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][1]); } if(save) { new Float:health; GetVehicleHealth(vehicleid, health); SaveVehicleModifications(vehicleid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET fuel = %i, health = '%f' WHERE id = %i", vehicleFuel[vehicleid], health, VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); } DestroyVehicle(vehicleid); ResetVehicle(vehicleid); } } ResetVehicle(vehicleid) { strcpy(VehicleInfo[vehicleid][vPlate], "None", 32); if(VehicleInfo[vehicleid][vTimer] >= 0) { KillTimer(VehicleInfo[vehicleid][vTimer]); } VehicleInfo[vehicleid][vID] = 0; VehicleInfo[vehicleid][vOwnerID] = 0; VehicleInfo[vehicleid][vOwner] = 0; VehicleInfo[vehicleid][vModel] = 0; VehicleInfo[vehicleid][vPrice] = 0; VehicleInfo[vehicleid][vTickets] = 0; VehicleInfo[vehicleid][vLocked] = 0; VehicleInfo[vehicleid][vHealth] = 1000.0; VehicleInfo[vehicleid][vPosX] = 0.0; VehicleInfo[vehicleid][vPosY] = 0.0; VehicleInfo[vehicleid][vPosZ] = 0.0; VehicleInfo[vehicleid][vPosA] = 0.0; VehicleInfo[vehicleid][vColor1] = 0; VehicleInfo[vehicleid][vColor2] = 0; VehicleInfo[vehicleid][vPaintjob] = -1; VehicleInfo[vehicleid][vInterior] = 0; VehicleInfo[vehicleid][vWorld] = 0; VehicleInfo[vehicleid][vCash] = 0; VehicleInfo[vehicleid][vMaterials] = 0; VehicleInfo[vehicleid][vWeed] = 0; VehicleInfo[vehicleid][vCocaine] = 0; VehicleInfo[vehicleid][vMeth] = 0; VehicleInfo[vehicleid][vPainkillers] = 0; VehicleInfo[vehicleid][vWeapons][0] = 0; VehicleInfo[vehicleid][vWeapons][1] = 0; VehicleInfo[vehicleid][vWeapons][2] = 0; VehicleInfo[vehicleid][vHPAmmo] = 0; VehicleInfo[vehicleid][vPoisonAmmo] = 0; VehicleInfo[vehicleid][vFMJAmmo] = 0; VehicleInfo[vehicleid][vGang] = -1; VehicleInfo[vehicleid][vFactionType] = FACTION_NONE; VehicleInfo[vehicleid][vJob] = JOB_NONE; VehicleInfo[vehicleid][vObjects][0] = INVALID_OBJECT_ID; VehicleInfo[vehicleid][vObjects][1] = INVALID_OBJECT_ID; VehicleInfo[vehicleid][vTimer] = -1; for(new i = 0; i < 14; i ++) { VehicleInfo[vehicleid][vMods][i] = 0; } } IsPointInLand(landid, Float:x, Float:y) { if((LandInfo[landid][lMinX] <= x <= LandInfo[landid][lMaxX]) && (LandInfo[landid][lMinY] <= y <= LandInfo[landid][lMaxY])) { return 1; } return 0; } GangZoneCreateEx(Float:minx, Float:miny, Float:maxx, Float:maxy) { return GangZoneCreate((minx > maxx) ? (maxx) : (minx), (miny > maxy) ? (maxy) : (miny), (minx > maxx) ? (minx) : (maxx), (miny > maxy) ? (miny) : (maxy)); } HasLandPerms(playerid, landid) { return IsLandOwner(playerid, landid) || PlayerInfo[playerid][pLandPerms] == landid; } IsLandOwner(playerid, landid) { return (LandInfo[landid][lOwnerID] == PlayerInfo[playerid][pID]) || (LandInfo[landid][lOwnerID] > 0 && PlayerInfo[playerid][pAdminDuty]); } SetLandOwner(landid, playerid) { if(playerid == INVALID_PLAYER_ID) { strcpy(LandInfo[landid][lOwner], "Nobody", MAX_PLAYER_NAME); LandInfo[landid][lOwnerID] = 0; } else { GetPlayerName(playerid, LandInfo[landid][lOwner], MAX_PLAYER_NAME); LandInfo[landid][lOwnerID] = PlayerInfo[playerid][pID]; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE lands SET ownerid = %i, owner = '%s' WHERE id = %i", LandInfo[landid][lOwnerID], LandInfo[landid][lOwner], LandInfo[landid][lID]); mysql_tquery(connectionID, queryBuffer); ReloadLand(landid); } GetLandObjectID(sql_id) { for(new i = 0; i <= Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i ++) { if(IsValidDynamicObject(i) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID) == sql_id) { return i; } } return INVALID_OBJECT_ID; } GetLandObjectCapacity(playerid) { return (PlayerInfo[playerid][pVIPPackage] * 50) + 250; } RemoveLandObject(objectid) { if(IsValidDynamicObject(objectid) && Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) == E_OBJECT_LAND) { new id = Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID); DeleteLandObject(objectid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM landobjects WHERE id = %i", id); mysql_tquery(connectionID, queryBuffer); } } DeleteLandObject(objectid) { if(IsValidDynamicObject(objectid) && Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) == E_OBJECT_LAND) { new Text3D:textid = Text3D:Streamer_GetExtraInt(objectid, E_OBJECT_3DTEXT_ID); if(IsValidDynamic3DTextLabel(textid)) { DestroyDynamic3DTextLabel(textid); } DestroyDynamicObject(objectid); } } RemoveAllLandObjects(landid) { if(LandInfo[landid][lExists]) { for(new i = 0; i <= Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i ++) { if(IsValidDynamicObject(i) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == LandInfo[landid][lID]) { DeleteLandObject(i); } } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM landobjects WHERE landid = %i", LandInfo[landid][lID]); mysql_tquery(connectionID, queryBuffer); } } ReloadLandObject(objectid, labels) { if(IsValidDynamicObject(objectid) && Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) == E_OBJECT_LAND) { new id = Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID); DeleteLandObject(objectid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM landobjects WHERE id = %i", id); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_LANDOBJECTS, labels); } } ReloadAllLandObjects(landid) { if(LandInfo[landid][lExists]) { for(new i = 0; i <= Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i ++) { if(IsValidDynamicObject(i) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == LandInfo[landid][lID]) { DeleteLandObject(i); } } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM landobjects WHERE landid = %i", LandInfo[landid][lID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_LANDOBJECTS, LandInfo[landid][lLabels]); } } ReloadLand(landid) { if(LandInfo[landid][lExists]) { DestroyDynamicArea(LandInfo[landid][lArea]); GangZoneDestroy(LandInfo[landid][lGangZone]); LandInfo[landid][lArea] = CreateDynamicRectangle(LandInfo[landid][lMinX], LandInfo[landid][lMinY], LandInfo[landid][lMaxX], LandInfo[landid][lMaxY]); LandInfo[landid][lGangZone] = GangZoneCreateEx(LandInfo[landid][lMinX], LandInfo[landid][lMinY], LandInfo[landid][lMaxX], LandInfo[landid][lMaxY]); foreach(new i : Player) { if(PlayerInfo[i][pShowLands]) { GangZoneShowForPlayer(i, LandInfo[landid][lGangZone], (LandInfo[landid][lOwnerID] > 0) ? (0xFF6347AA) : (0x33CC33AA)); } } } } GetNearbyLand(playerid) { for(new i = 0; i < MAX_LANDS; i ++) { if(LandInfo[i][lExists] && IsPlayerInDynamicArea(playerid, LandInfo[i][lArea])) { return i; } } return -1; } TurfTaxCheck(playerid, amount) { new turfid = GetNearbyTurf(playerid); if(turfid >= 0 && TurfInfo[turfid][tType] == 7 && TurfInfo[turfid][tCapturedGang] >= 0) { amount = percent(amount, 10); SendClientMessageEx(playerid, COLOR_AQUA, "You have been taxed a 10 percent fee of {FF6347}$%i{33CCFF} for selling in %s's turf.", amount, GangInfo[TurfInfo[turfid][tCapturedGang]][gName]); GivePlayerCash(playerid, -amount); GangInfo[TurfInfo[turfid][tCapturedGang]][gCash] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET cash = %i WHERE id = %i", GangInfo[TurfInfo[turfid][tCapturedGang]][gCash], TurfInfo[turfid][tCapturedGang]); mysql_tquery(connectionID, queryBuffer); } } GetNearbyTurf(playerid) { for(new i = 0; i < MAX_TURFS; i ++) { if(TurfInfo[i][tExists] && IsPlayerInDynamicArea(playerid, TurfInfo[i][tArea])) { return i; } } return -1; } GetTurfColor(turfid) { if(TurfInfo[turfid][tCapturedGang] >= 0) { return (GangInfo[TurfInfo[turfid][tCapturedGang]][gColor] & ~0xff) + 0xAA; } return 0x000000AA; } ReloadTurf(turfid) { if(TurfInfo[turfid][tExists]) { DestroyDynamicArea(TurfInfo[turfid][tArea]); GangZoneDestroy(TurfInfo[turfid][tGangZone]); TurfInfo[turfid][tArea] = CreateDynamicRectangle(TurfInfo[turfid][tMinX], TurfInfo[turfid][tMinY], TurfInfo[turfid][tMaxX], TurfInfo[turfid][tMaxY]); TurfInfo[turfid][tGangZone] = GangZoneCreateEx(TurfInfo[turfid][tMinX], TurfInfo[turfid][tMinY], TurfInfo[turfid][tMaxX], TurfInfo[turfid][tMaxY]); foreach(new i : Player) { if(PlayerInfo[i][pShowTurfs]) { ShowTurfsOnMap(i, true); } } } } GetNearbyEntranceEx(playerid) { return GetNearbyEntrance(playerid) == -1 ? GetInsideEntrance(playerid) : GetNearbyEntrance(playerid); } GetNearbyEntrance(playerid) { for(new i = 0; i < MAX_ENTRANCES; i ++) { if(EntranceInfo[i][eExists] && IsPlayerInRangeOfPoint(playerid, EntranceInfo[i][eRadius], EntranceInfo[i][ePosX], EntranceInfo[i][ePosY], EntranceInfo[i][ePosZ]) && GetPlayerInterior(playerid) == EntranceInfo[i][eOutsideInt] && GetPlayerVirtualWorld(playerid) == EntranceInfo[i][eOutsideVW]) { return i; } } return -1; } GetInsideEntrance(playerid) { for(new i = 0; i < MAX_ENTRANCES; i ++) { if(EntranceInfo[i][eExists] && IsPlayerInRangeOfPoint(playerid, 100.0, EntranceInfo[i][eIntX], EntranceInfo[i][eIntY], EntranceInfo[i][eIntZ]) && GetPlayerInterior(playerid) == EntranceInfo[i][eInterior] && GetPlayerVirtualWorld(playerid) == EntranceInfo[i][eWorld]) { return i; } } return -1; } SetEntranceOwner(entranceid, playerid) { if(playerid == INVALID_PLAYER_ID) { strcpy(EntranceInfo[entranceid][eOwner], "Nobody", MAX_PLAYER_NAME); EntranceInfo[entranceid][eOwnerID] = 0; } else { GetPlayerName(playerid, EntranceInfo[entranceid][eOwner], MAX_PLAYER_NAME); EntranceInfo[entranceid][eOwnerID] = PlayerInfo[playerid][pID]; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET ownerid = %i, owner = '%s' WHERE id = %i", EntranceInfo[entranceid][eOwnerID], EntranceInfo[entranceid][eOwner], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); } ReloadEntrance(entranceid) { if(EntranceInfo[entranceid][eExists]) { new string[128]; DestroyDynamic3DTextLabel(EntranceInfo[entranceid][eText]); DestroyDynamicPickup(EntranceInfo[entranceid][ePickup]); if(EntranceInfo[entranceid][eLabel]) { if(EntranceInfo[entranceid][eOwnerID]) { format(string, sizeof(string), "%s\nOwner: %s\n/enter to go inside.", EntranceInfo[entranceid][eName], EntranceInfo[entranceid][eOwner]); } else { format(string, sizeof(string), "%s\n/enter to go inside.", EntranceInfo[entranceid][eName]); } EntranceInfo[entranceid][eText] = CreateDynamic3DTextLabel(string, COLOR_GREY1, EntranceInfo[entranceid][ePosX], EntranceInfo[entranceid][ePosY], (EntranceInfo[entranceid][eIcon] == 19902) ? (EntranceInfo[entranceid][ePosZ] + 0.1) : (EntranceInfo[entranceid][ePosZ]), 10.0, .worldid = EntranceInfo[entranceid][eOutsideVW], .interiorid = EntranceInfo[entranceid][eOutsideInt]); } EntranceInfo[entranceid][ePickup] = CreateDynamicPickup(EntranceInfo[entranceid][eIcon], 1, EntranceInfo[entranceid][ePosX], EntranceInfo[entranceid][ePosY], (EntranceInfo[entranceid][eIcon] == 19902) ? (EntranceInfo[entranceid][ePosZ] - 1.0) : (EntranceInfo[entranceid][ePosZ]), .worldid = EntranceInfo[entranceid][eOutsideVW], .interiorid = EntranceInfo[entranceid][eOutsideInt]); } } IsEntranceOwner(playerid, entranceid) { return (EntranceInfo[entranceid][eOwnerID] == PlayerInfo[playerid][pID]) || (EntranceInfo[entranceid][eOwnerID] > 0 && PlayerInfo[playerid][pAdminDuty]); } GetClosestBusiness(playerid, type) { new Float:distance[2] = {99999.0, 0.0}, index = -1; for(new i = 0; i < MAX_BUSINESSES; i ++) { if((BusinessInfo[i][bExists] && BusinessInfo[i][bType] == type) && (BusinessInfo[i][bOutsideInt] == 0 && BusinessInfo[i][bOutsideVW] == 0)) { distance[1] = GetPlayerDistanceFromPoint(playerid, BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ]); if(distance[0] > distance[1]) { distance[0] = distance[1]; index = i; } } } return index; } GetNearbyBusinessEx(playerid) { return GetNearbyBusiness(playerid) == -1 ? GetInsideBusiness(playerid) : GetNearbyBusiness(playerid); } GetNearbyBusiness(playerid, Float:radius = 2.0) { for(new i = 0; i < MAX_BUSINESSES; i ++) { if(BusinessInfo[i][bExists] && IsPlayerInRangeOfPoint(playerid, radius, BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ]) && GetPlayerInterior(playerid) == BusinessInfo[i][bOutsideInt] && GetPlayerVirtualWorld(playerid) == BusinessInfo[i][bOutsideVW]) { return i; } } return -1; } GetInsideBusiness(playerid) { for(new i = 0; i < MAX_BUSINESSES; i ++) { if(BusinessInfo[i][bExists] && IsPlayerInRangeOfPoint(playerid, 100.0, BusinessInfo[i][bIntX], BusinessInfo[i][bIntY], BusinessInfo[i][bIntZ]) && GetPlayerInterior(playerid) == BusinessInfo[i][bInterior] && GetPlayerVirtualWorld(playerid) == BusinessInfo[i][bWorld]) { return i; } } return -1; } SetBusinessOwner(businessid, playerid) { if(playerid == INVALID_PLAYER_ID) { strcpy(BusinessInfo[businessid][bOwner], "Nobody", MAX_PLAYER_NAME); BusinessInfo[businessid][bOwnerID] = 0; } else { GetPlayerName(playerid, BusinessInfo[businessid][bOwner], MAX_PLAYER_NAME); BusinessInfo[businessid][bOwnerID] = PlayerInfo[playerid][pID]; } BusinessInfo[businessid][bTimestamp] = gettime(); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET timestamp = %i, ownerid = %i, owner = '%s' WHERE id = %i", BusinessInfo[businessid][bTimestamp], BusinessInfo[businessid][bOwnerID], BusinessInfo[businessid][bOwner], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); ReloadBusiness(businessid); } ReloadBusiness(businessid) { if(BusinessInfo[businessid][bExists]) { new string[128]; DestroyDynamic3DTextLabel(BusinessInfo[businessid][bText]); DestroyDynamicPickup(BusinessInfo[businessid][bPickup]); DestroyDynamicMapIcon(BusinessInfo[businessid][bMapIcon]); if(BusinessInfo[businessid][bOwnerID] == 0) { format(string, sizeof(string), "[Business]\nPrice: $%i\nType: %s\nEntry Fee: $%i\nStatus: %s", BusinessInfo[businessid][bPrice], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bEntryFee], (BusinessInfo[businessid][bLocked]) ? ("Closed") : ("Opened")); } else { format(string, sizeof(string), "[Business]\nOwner: %s\nType: %s\nEntry Fee: $%i\nStatus: %s", BusinessInfo[businessid][bOwner], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bEntryFee], (BusinessInfo[businessid][bLocked]) ? ("Closed") : ("Opened")); } BusinessInfo[businessid][bText] = CreateDynamic3DTextLabel(string, COLOR_GREY1, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ] + 0.1, 10.0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]); BusinessInfo[businessid][bPickup] = CreateDynamicPickup(1272, 1, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]); switch(BusinessInfo[businessid][bType]) { case BUSINESS_STORE: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 17, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]); case BUSINESS_GUNSHOP: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 6, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]); case BUSINESS_CLOTHES: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 45, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]); case BUSINESS_RESTAURANT: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 10, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]); case BUSINESS_GYM: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 54, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]); case BUSINESS_AGENCY: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 58, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]); case BUSINESS_BARCLUB: BusinessInfo[businessid][bMapIcon] = CreateDynamicMapIcon(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 49, 0, .worldid = BusinessInfo[businessid][bOutsideVW], .interiorid = BusinessInfo[businessid][bOutsideInt]); } } } IsBusinessOwner(playerid, businessid) { return (BusinessInfo[businessid][bOwnerID] == PlayerInfo[playerid][pID]) || (BusinessInfo[businessid][bOwnerID] > 0 && PlayerInfo[playerid][pAdminDuty]); } IsGarageOwner(playerid, garageid) { return (GarageInfo[garageid][gOwnerID] == PlayerInfo[playerid][pID]) || (GarageInfo[garageid][gOwnerID] > 0 && PlayerInfo[playerid][pAdminDuty]); } GetNearbyGarageEx(playerid) { return GetNearbyGarage(playerid) == -1 ? GetInsideGarage(playerid) : GetNearbyGarage(playerid); } GetNearbyGarage(playerid) { for(new i = 0; i < MAX_GARAGES; i ++) { if(GarageInfo[i][gExists] && IsPlayerInRangeOfPoint(playerid, 4.0, GarageInfo[i][gPosX], GarageInfo[i][gPosY], GarageInfo[i][gPosZ])) { return i; } } return -1; } GetInsideGarage(playerid) { for(new i = 0; i < MAX_GARAGES; i ++) { if(GarageInfo[i][gExists] && IsPlayerInRangeOfPoint(playerid, 50.0, garageInteriors[GarageInfo[i][gType]][intVX], garageInteriors[GarageInfo[i][gType]][intVY], garageInteriors[GarageInfo[i][gType]][intVZ]) && GetPlayerInterior(playerid) == garageInteriors[GarageInfo[i][gType]][intID] && GetPlayerVirtualWorld(playerid) == GarageInfo[i][gWorld]) { return i; } } return -1; } ReloadGarage(garageid) { if(GarageInfo[garageid][gExists]) { new string[128]; DestroyDynamic3DTextLabel(GarageInfo[garageid][gText]); DestroyDynamicPickup(GarageInfo[garageid][gPickup]); if(GarageInfo[garageid][gOwnerID] == 0) { format(string, sizeof(string), "[Garage]\nPrice: $%i\nSize: %s\nCapacity: %i cars", GarageInfo[garageid][gPrice], garageInteriors[GarageInfo[garageid][gType]][intName], GarageInfo[garageid][gType] + 1); } else { format(string, sizeof(string), "[Garage]\nOwner: %s\nSize: %s\nCapacity: %i cars", GarageInfo[garageid][gOwner], garageInteriors[GarageInfo[garageid][gType]][intName], GarageInfo[garageid][gType] + 1); } GarageInfo[garageid][gText] = CreateDynamic3DTextLabel(string, 0x004CFFFF, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ] + 0.1, 10.0); GarageInfo[garageid][gPickup] = CreateDynamicPickup(1318, 1, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ]); } } SetGarageOwner(garageid, playerid) { if(playerid == INVALID_PLAYER_ID) { strcpy(GarageInfo[garageid][gOwner], "Nobody", MAX_PLAYER_NAME); GarageInfo[garageid][gOwnerID] = 0; } else { GetPlayerName(playerid, GarageInfo[garageid][gOwner], MAX_PLAYER_NAME); GarageInfo[garageid][gOwnerID] = PlayerInfo[playerid][pID]; } GarageInfo[garageid][gTimestamp] = gettime(); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET timestamp = %i, ownerid = %i, owner = '%s' WHERE id = %i", GarageInfo[garageid][gTimestamp], GarageInfo[garageid][gOwnerID], GarageInfo[garageid][gOwner], GarageInfo[garageid][gID]); mysql_tquery(connectionID, queryBuffer); ReloadGarage(garageid); } HasFurniturePerms(playerid, houseid) { return IsHouseOwner(playerid, houseid) || PlayerInfo[playerid][pFurniturePerms] == houseid; } IsHouseOwner(playerid, houseid) { return (HouseInfo[houseid][hOwnerID] == PlayerInfo[playerid][pID]) || (HouseInfo[houseid][hOwnerID] > 0 && PlayerInfo[playerid][pAdminDuty]); } GetVehicleStashCapacity(vehicleid, item) { static const stashCapacities[][] = { // Cash Mats W C M P HP PT FMJ W {25000, 5000, 25, 25, 10, 5, 80, 60, 50, 3}, // level 1 {50000, 10000, 50, 50, 25, 10, 100, 80, 60, 4}, // level 2 {100000, 25000, 100, 75, 50, 20, 125, 100, 70, 5} // level 3 }; if(VehicleInfo[vehicleid][vTrunk] > 0) { return stashCapacities[VehicleInfo[vehicleid][vTrunk] - 1][item]; } return 0; } GetGangStashCapacity(gangid, item) { static const stashCapacities[][] = { {1000000, 100000, 500, 500, 250, 50, 1000, 500, 250}, {2000000, 200000, 1000, 1000, 500, 100, 1500, 1000, 500}, {3000000, 300000, 1500, 1500, 1000, 250, 2000, 1500, 1000} }; return stashCapacities[GangInfo[gangid][gLevel] - 1][item]; } GetHouseStashCapacity(houseid, item) { static const stashCapacities[][] = { // Cash Mats W C M P HP PT FMJ W {50000, 5000, 50, 25, 20, 10, 80, 60, 50, 2}, // level 1 {100000, 10000, 100, 50, 40, 20, 100, 80, 60, 4}, // level 2 {250000, 25000, 150, 75, 60, 30, 125, 100, 70, 6}, // level 3 {500000, 50000, 200, 100, 80, 40, 150, 125, 80, 8}, // level 4 {1000000, 100000, 300, 200, 100, 50, 200, 150, 100, 10} // level 5 }; return stashCapacities[HouseInfo[houseid][hLevel] - 1][item]; } GetHouseTenantCapacity(houseid) { switch(HouseInfo[houseid][hLevel]) { case 0: return 5; case 1: return 10; case 2: return 15; case 3: return 20; case 4: return 25; case 5: return 30; } return 0; } GetHouseFurnitureCapacity(houseid) { switch(HouseInfo[houseid][hLevel]) { case 0: return 25; case 1: return 50; case 2: return 75; case 3: return 100; case 4: return 150; case 5: return 300; } return 0; } GetRandomHouse(playerid) // For pizzaboy job. { new index, houseIDs[MAX_HOUSES] = {-1, ...}; for(new i = 0; i < MAX_HOUSES; i ++) { if(HouseInfo[i][hExists] && HouseInfo[i][hOutsideInt] == 0 && HouseInfo[i][hOutsideVW] == 0) { if(300.0 <= GetPlayerDistanceFromPoint(playerid, HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ]) <= 1200.0) { houseIDs[index++] = i; } } } if(index == 0) { return -1; } return houseIDs[random(index)]; } GetNearbyHouseEx(playerid) { return GetNearbyHouse(playerid) == -1 ? GetInsideHouse(playerid) : GetNearbyHouse(playerid); } GetNearbyHouse(playerid) { for(new i = 0; i < MAX_HOUSES; i ++) { if(HouseInfo[i][hExists] && IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVW]) { return i; } } return -1; } GetInsideHouse(playerid) { for(new i = 0; i < MAX_HOUSES; i ++) { if(HouseInfo[i][hExists] && IsPlayerInRangeOfPoint(playerid, 100.0, HouseInfo[i][hIntX], HouseInfo[i][hIntY], HouseInfo[i][hIntZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hInterior] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hWorld]) { return i; } } return -1; } SetHouseOwner(houseid, playerid) { if(playerid == INVALID_PLAYER_ID) { strcpy(HouseInfo[houseid][hOwner], "Nobody", MAX_PLAYER_NAME); HouseInfo[houseid][hOwnerID] = 0; } else { GetPlayerName(playerid, HouseInfo[houseid][hOwner], MAX_PLAYER_NAME); HouseInfo[houseid][hOwnerID] = PlayerInfo[playerid][pID]; } HouseInfo[houseid][hTimestamp] = gettime(); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET timestamp = %i, ownerid = %i, owner = '%s' WHERE id = %i", HouseInfo[houseid][hTimestamp], HouseInfo[houseid][hOwnerID], HouseInfo[houseid][hOwner], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); ReloadHouse(houseid); } RemoveFurniture(objectid) { if(IsValidDynamicObject(objectid) && Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) == E_OBJECT_FURNITURE) { new id = Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID); DeleteFurnitureObject(objectid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM furniture WHERE id = %i", id); mysql_tquery(connectionID, queryBuffer); } } DeleteFurnitureObject(objectid) { if(IsValidDynamicObject(objectid) && Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) == E_OBJECT_FURNITURE) { new Text3D:textid = Text3D:Streamer_GetExtraInt(objectid, E_OBJECT_3DTEXT_ID); if(IsValidDynamic3DTextLabel(textid)) { DestroyDynamic3DTextLabel(textid); } DestroyDynamicObject(objectid); } } RemoveAllFurniture(houseid) { if(HouseInfo[houseid][hExists]) { for(new i = 0; i <= Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i ++) { if(IsValidDynamicObject(i) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_FURNITURE && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == HouseInfo[houseid][hID]) { DeleteFurnitureObject(i); } } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM furniture WHERE houseid = %i", HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); } } ReloadFurniture(objectid, labels) { if(IsValidDynamicObject(objectid) && Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) == E_OBJECT_FURNITURE) { new id = Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID); DeleteFurnitureObject(objectid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM furniture WHERE id = %i", id); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_FURNITURE, labels); } } ReloadAllFurniture(houseid) { if(HouseInfo[houseid][hExists]) { for(new i = 0; i <= Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i ++) { if(IsValidDynamicObject(i) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_FURNITURE && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == HouseInfo[houseid][hID]) { DeleteFurnitureObject(i); } } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM furniture WHERE houseid = %i", HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_FURNITURE, HouseInfo[houseid][hLabels]); } } ReloadHouse(houseid) { if(HouseInfo[houseid][hExists]) { new string[128], type[16]; DestroyDynamic3DTextLabel(HouseInfo[houseid][hText]); DestroyDynamicPickup(HouseInfo[houseid][hPickup]); if(HouseInfo[houseid][hType] == -1) { type = "Other"; } else { strcpy(type, houseInteriors[HouseInfo[houseid][hType]][intClass]); } if(HouseInfo[houseid][hOwnerID] == 0) { format(string, sizeof(string), "[For Sale]\nPrice: $%i\nClass: %s\nHouse Level: %i", HouseInfo[houseid][hPrice], type, HouseInfo[houseid][hLevel]); } else { if(HouseInfo[houseid][hRentPrice] > 0) { format(string, sizeof(string), "[House]\nOwner: %s\nClass: %s\nRent: $%i\nHouse Level: %i", HouseInfo[houseid][hOwner], type, HouseInfo[houseid][hRentPrice], HouseInfo[houseid][hLevel]); } else { format(string, sizeof(string), "[House]\nOwner: %s\nClass: %s\nHouse Level: %i", HouseInfo[houseid][hOwner], type, HouseInfo[houseid][hLevel]); } } HouseInfo[houseid][hText] = CreateDynamic3DTextLabel(string, COLOR_GREEN, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ] + 0.1, 10.0, .worldid = HouseInfo[houseid][hOutsideVW], .interiorid = HouseInfo[houseid][hOutsideInt]); HouseInfo[houseid][hPickup] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ], .worldid = HouseInfo[houseid][hOutsideVW], .interiorid = HouseInfo[houseid][hOutsideInt]); } } IsNumeric(const string[]) { new len = strlen(string), i; if(string[0] == '-') i = 1; while(i < len) { if(!('0' <= string[i++] <= '9')) return 0; } return 1; } GetVehicleParams(vehicleid, param) { new params[7]; GetVehicleParamsEx(vehicleid, params[0], params[1], params[2], params[3], params[4], params[5], params[6]); return params[param] == VEHICLE_PARAMS_ON; } SetVehicleParams(vehicleid, param, status) { new params[7]; GetVehicleParamsEx(vehicleid, params[0], params[1], params[2], params[3], params[4], params[5], params[6]); params[param] = status; return SetVehicleParamsEx(vehicleid, params[0], params[1], params[2], params[3], params[4], params[5], params[6]); } Float:GetVehicleSpeedMPH(vehicleid) { new Float:x, Float:y, Float:z; if(GetVehicleVelocity(vehicleid, x, y, z)) { return floatsqroot((x * x) + (y * y) + (z * z)) * 100; } return 0.0; } Float:GetVehicleSpeed(vehicleid) { new Float:x, Float:y, Float:z; if(GetVehicleVelocity(vehicleid, x, y, z)) { return floatsqroot((x * x) + (y * y) + (z * z)) * 181.5; } return 0.0; } VehicleHasWindows(vehicleid) { static const vehicleWindows[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0 }; new model = GetVehicleModel(vehicleid); if(400 <= model <= 611) { return vehicleWindows[model - 400]; } return 0; } VehicleHasEngine(vehicleid) { static const vehicleEngines[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0 }; new modelid = GetVehicleModel(vehicleid); if(400 <= modelid <= 611) { return vehicleEngines[modelid - 400]; } return 0; } GetVehicleSeatCount(vehicleid) { static const vehicleSeats[] = { 4, 2, 2, 2, 4, 4, 1, 2, 2, 4, 2, 2, 2, 4, 2, 2, 4, 2, 4, 2, 4, 4, 2, 2, 2, 1, 4, 4, 4, 2, 1, 7, 1, 2, 2, 0, 2, 7, 4, 2, 4, 1, 2, 2, 2, 4, 1, 2, 1, 0, 0, 2, 1, 1, 1, 2, 2, 2, 4, 4, 2, 2, 2, 2, 1, 1, 4, 4, 2, 2, 4, 2, 1, 1, 2, 2, 1, 2, 2, 4, 2, 1, 4, 3, 1, 1, 1, 4, 2, 2, 4, 2, 4, 1, 2, 2, 2, 4, 4, 2, 2, 1, 2, 2, 2, 2, 2, 4, 2, 1, 1, 2, 1, 1, 2, 2, 4, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 4, 1, 1, 1, 2, 2, 2, 2, 7, 7, 1, 4, 2, 2, 2, 2, 2, 4, 4, 2, 2, 4, 4, 2, 1, 2, 2, 2, 2, 2, 2, 4, 4, 2, 2, 1, 2, 4, 4, 1, 0, 0, 1, 1, 2, 1, 2, 2, 1, 2, 4, 4, 2, 4, 1, 0, 4, 2, 2, 2, 2, 0, 0, 7, 2, 2, 1, 4, 4, 4, 2, 2, 2, 2, 2, 4, 2, 0, 0, 0, 4, 0, 0 }; new modelid = GetVehicleModel(vehicleid); if(400 <= modelid <= 611) { return vehicleSeats[modelid - 400]; } return 0; } IsSeatOccupied(vehicleid, seatid) { foreach(new i : Player) { if(IsPlayerInVehicle(i, vehicleid) && GetPlayerVehicleSeat(i) == seatid) { return 1; } } return 0; } GetVehicleName(vehicleid) { new modelid = GetVehicleModel(vehicleid), name[32]; if(400 <= modelid <= 611) strcat(name, vehicleNames[modelid - 400]); else name = "Unknown"; return name; } GetVehicleModelByName(const string[]) { new modelid = strval(string); if(400 <= modelid <= 611) { return modelid; } for(new i = 0; i < sizeof(vehicleNames); i ++) { if(strfind(vehicleNames[i], string, true) != -1) { return i + 400; } } return 0; } GetVehicleDriver(vehicleid) { foreach(new i : Player) { if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER) { return i; } } return INVALID_PLAYER_ID; } IsVehicleOccupied(vehicleid) { foreach(new i : Player) { if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER) { return 1; } } return 0; } AnticheatCheck(playerid) { if(gettime() > PlayerInfo[playerid][pACTime] && !PlayerInfo[playerid][pKicked]) { // Speedhacking if((gAnticheat) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && GetVehicleSpeed(GetPlayerVehicleID(playerid)) > 350 && PlayerInfo[playerid][pAdmin] < 2) { PlayerInfo[playerid][pACWarns]++; if(PlayerInfo[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly speedhacking, speed: %.1f km/h.", GetPlayerRPName(playerid), playerid, GetVehicleSpeed(GetPlayerVehicleID(playerid))); Log_Write("log_cheat", "%s (uid: %i) possibly speedhacked, speed: %.1f km/h", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetVehicleSpeed(GetPlayerVehicleID(playerid))); } else { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Speed hacking", GetPlayerRPName(playerid), SERVER_ANTICHEAT); BanPlayer(playerid, SERVER_ANTICHEAT, "Speed hacking"); } } // Jetpack if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK && PlayerInfo[playerid][pAdmin] < 2 && !PlayerInfo[playerid][pJetpack]) { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Jetpack", GetPlayerRPName(playerid), SERVER_ANTICHEAT); BanPlayer(playerid, SERVER_ANTICHEAT, "Jetpack"); } // Flying hacks if((gAnticheat) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { switch(GetPlayerAnimationIndex(playerid)) { case 958, 1538, 1539, 1543: { new Float:z, Float:vx, Float:vy, Float:vz; GetPlayerPos(playerid, z, z, z); GetPlayerVelocity(playerid, vx, vy, vz); if((z > 20.0) && (0.9 <= floatsqroot((vx * vx) + (vy * vy) + (vz * vz)) <= 1.9) && PlayerInfo[playerid][pAdmin] < 2) { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Flying hacks", GetPlayerRPName(playerid), SERVER_ANTICHEAT); BanPlayer(playerid, SERVER_ANTICHEAT, "Flying hacks"); } } } } // Armor hacks if(!PlayerInfo[playerid][pJoinedEvent] && !PlayerInfo[playerid][pPaintball] && PlayerInfo[playerid][pDueling] == INVALID_PLAYER_ID) { new Float:armor; GetPlayerArmour(playerid, armor); if(!(gettime() - PlayerInfo[playerid][pLastUpdate] > 5)) { if(floatround(armor) > floatround(PlayerInfo[playerid][pArmor]) && gettime() > PlayerInfo[playerid][pACTime] && gettime() > PlayerInfo[playerid][pArmorTime] && PlayerInfo[playerid][pAdmin] < 2) { PlayerInfo[playerid][pACWarns]++; PlayerInfo[playerid][pArmorTime] = gettime() + 10; if(PlayerInfo[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly armor hacking. (old: %.2f, new: %.2f)", GetPlayerRPName(playerid), playerid, PlayerInfo[playerid][pArmor], armor); Log_Write("log_cheat", "%s (uid: %i) possibly hacked armor. (old: %.2f, new: %.2f)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], PlayerInfo[playerid][pArmor], armor); } else { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Armor hacking", GetPlayerRPName(playerid), SERVER_ANTICHEAT); BanPlayer(playerid, SERVER_ANTICHEAT, "Armor hacking"); } } } PlayerInfo[playerid][pArmor] = armor; } } // Ammo hacks if(!PlayerInfo[playerid][pJoinedEvent] && !PlayerInfo[playerid][pPaintball] && PlayerInfo[playerid][pDueling] == INVALID_PLAYER_ID && !(PlayerInfo[playerid][pTazer] && GetPlayerWeapon(playerid) == 23)) { new weapon, ammo; GetPlayerWeaponData(playerid, 8, weapon, ammo); if((16 <= weapon <= 18) && ammo <= 0) { RemovePlayerWeapon(playerid, weapon); } } // Warping into vehicles while locked /*if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && GetVehicleParams(GetPlayerVehicleID(playerid), VEHICLE_DOORS) && (!IsVehicleOwner(playerid, GetPlayerVehicleID(playerid)) && PlayerInfo[playerid][pVehicleKeys] != GetPlayerVehicleID(playerid))) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x, y, z + 1.0); GameTextForPlayer(playerid, "~r~This vehicle is locked!", 3000, 3); }*/ } IsAnIP(ip[]) { new part[4]; if(!sscanf(ip, "p<.>iiii", part[0], part[1], part[2], part[3])) { return (0 <= part[0] <= 255) && (0 <= part[1] <= 255) && (0 <= part[2] <= 255) && (0 <= part[3] <= 255); } else if(!sscanf(ip, "p<.>iicc", part[0], part[1], part[2], part[3])) { return (0 <= part[0] <= 255) && (0 <= part[1] <= 255) && (part[2] == '*' && part[3] == '*'); } return 0; } IsValidName(name[]) { for(new i = 0, j = strlen(name); i < j; i ++) { if(!(3 <= j <= MAX_PLAYER_NAME)) return 0; switch(name[i]) { case 'A'..'Z', 'a'..'z', '0'..'9', '_', '.', '[', ']', '(', ')', '=', '@': { continue; } default: { return 0; } } } return 1; } IsValidModel(modelid) { static modeldat[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, -515899393, -134217729, -1, -1, 33554431, -1, -1, -1, -14337, -1, -33, 127, 0, 0, 0, 0, 0, -8388608, -1, -1, -1, -16385, -1, -1, -1, -1, -1, -1, -1, -33, -1, -771751937, -1, -9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33554431, -25, -1, -1, -1, -1, -1, -1, -1073676289, -2147483648, 34079999, 2113536, -4825600, -5, -1, -3145729, -1, -16777217, -63, -1, -1, -1, -1, -201326593, -1, -1, -1, -1, -1, -257, -1, 1073741823, -133122, -1, -1, -65, -1, -1, -1, -1, -1, -1, -2146435073, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1073741823, -64, -1, -1, -1, -1, -2635777, 134086663, 0, -64, -1, -1, -1, -1, -1, -1, -1, -536870927, -131069, -1, -1, -1, -1, -1, -1, -1, -1, -16384, -1, -33554433, -1, -1, -1, -1, -1, -1610612737, 524285, -128, -1, 2080309247, -1, -1, -1114113, -1, -1, -1, 66977343, -524288, -1, -1, -1, -1, -2031617, -1, 114687, -256, -1, -4097, -1, -4097, -1, -1, 1010827263, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32768, -1, -1, -1, -1, -1, 2147483647, -33554434, -1, -1, -49153, -1148191169, 2147483647, -100781080, -262145, -57, 134217727, -8388608, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1048577, -1, -449, -1017, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1835009, -2049, -1, -1, -1, -1, -1, -1, -8193, -1, -536870913, -1, -1, -1, -1, -1, -87041, -1, -1, -1, -1, -1, -1, -209860, -1023, -8388609, -2096897, -1, -1048577, -1, -1, -1, -1, -1, -1, -897, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1610612737, -3073, -28673, -1, -1, -1, -1537, -1, -1, -13, -1, -1, -1, -1, -1985, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1056964609, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -236716037, -1, -1, -1, -1, -1, -1, -1, -536870913, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2097153, -2109441, -1, 201326591, -4194304, -1, -1, -241, -1, -1, -1, -1, -1, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32768, -1, -1, -1, -2, -671096835, -1, -8388609, -66323585, -13, -1793, -32257, -247809, -1, -1, -513, 16252911, 0, 0, 0, -131072, 33554383, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8356095, 0, 0, 0, 0, 0, 0, -256, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -268435449, -1, -1, -2049, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 92274627, -65536, -2097153, -268435457, 591191935, 1, 0, -16777216, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 127 }; if((modelid >= 0) && ((modelid / 32) < sizeof (modeldat)) && (modeldat[modelid / 32] & (1 << (modelid % 32)))) { return 1; } if((18632 <= modelid <= 19999) || (11682 <= modelid <= 11753)) { return 1; } return 0; } IsPlayerOnline(const name[], &id = INVALID_PLAYER_ID) { foreach(new i : Player) { if(!strcmp(GetPlayerNameEx(i), name) && PlayerInfo[i][pLogged]) { id = i; return 1; } } id = INVALID_PLAYER_ID; return 0; } IsPlayerSpawned(playerid) { switch(GetPlayerState(playerid)) { case PLAYER_STATE_NONE, PLAYER_STATE_WASTED, PLAYER_STATE_SPECTATING: { return 0; } } return 1; } IsPlayerAiming(playerid) { new keys, ud, lr; GetPlayerKeys(playerid, keys, ud, lr); if((keys & KEY_HANDBRAKE) & KEY_HANDBRAKE && (22 <= GetPlayerWeapon(playerid) <= 38)) { switch(GetPlayerAnimationIndex(playerid)) { case 1160..1167, 360..363, 220, 640, 1189, 1331, 1365, 1453, 1449, 1643: { return 1; } } } return 0; } IsPointInRangeOfPoint(Float:x1, Float:y1, Float:z1, Float:radius, Float:x2, Float:y2, Float:z2) { x1 -= x2; y1 -= y2; z1 -= z2; return ((x1 * x1) + (y1 * y1) + (z1 * z1)) < (radius * radius); } IsVehicleInGarage(vehicleid, garageid) { new Float:x, Float:y, Float:z; GetVehiclePos(vehicleid, x, y, z); return IsPointInRangeOfPoint(x, y, z, 50.0, garageInteriors[GarageInfo[garageid][gType]][intVX], garageInteriors[GarageInfo[garageid][gType]][intVY], garageInteriors[GarageInfo[garageid][gType]][intVZ]) && GetVehicleVirtualWorld(vehicleid) == GarageInfo[garageid][gWorld]; } IsPlayerInMiningArea(playerid) { for(new i = 0; i < sizeof(minerPositions); i ++) { if(IsPlayerInRangeOfPoint(playerid, 4.0, minerPositions[i][0], minerPositions[i][1], minerPositions[i][2])) { return 1; } } return 0; } IsPlayerAtFuelStation(playerid) { if(IsPlayerInRangeOfPoint(playerid, 12.0, 1004.0070, -939.3102, 42.1797) || IsPlayerInRangeOfPoint(playerid, 12.0, 1944.3260, -1772.9254, 13.3906) || IsPlayerInRangeOfPoint(playerid, 12.0, -90.5515, -1169.4578, 2.4079) || IsPlayerInRangeOfPoint(playerid, 12.0, -1609.7958, -2718.2048, 48.5391)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 12.0, -2029.4968, 156.4366, 28.9498) || IsPlayerInRangeOfPoint(playerid, 12.0, -2408.7590, 976.0934, 45.4175) || IsPlayerInRangeOfPoint(playerid, 12.0, -2243.9629, -2560.6477, 31.8841) || IsPlayerInRangeOfPoint(playerid, 12.0, -1676.6323, 414.0262, 6.9484)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 12.0, 2202.2349, 2474.3494, 10.5258) || IsPlayerInRangeOfPoint(playerid, 12.0, 614.9333, 1689.7418, 6.6968) || IsPlayerInRangeOfPoint(playerid, 12.0, -1328.8250, 2677.2173, 49.7665) || IsPlayerInRangeOfPoint(playerid, 12.0, 70.3882, 1218.6783, 18.5165)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 12.0, 654.9641, -559.7485, 16.5015) || IsPlayerInRangeOfPoint(playerid, 12.0, 654.9617, -570.4176, 16.5015) || IsPlayerInRangeOfPoint(playerid, 12.0, 1382.9899, 461.9903, 20.1245) || IsPlayerInRangeOfPoint(playerid, 12.0, 1380.9395, 457.2494, 19.9260)) { return 1; } return 0; } IsPlayerAtFishingPlace(playerid) { if(IsPlayerInRangeOfPoint(playerid, 1.0, 403.8266, -2088.7598, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 398.7553, -2088.7490, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 396.2197, -2088.6692, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 391.1094, -2088.7976, 7.8359)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 1.0, 383.4157, -2088.7849, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 374.9598, -2088.7979, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 369.8107, -2088.7927, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 367.3637, -2088.7925, 7.8359)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 1.0, 362.2244, -2088.7981, 7.8359) || IsPlayerInRangeOfPoint(playerid, 1.0, 354.5382, -2088.7979, 7.8359)) { return 1; } return 0; } IsPlayerInRangeOfDynamicObject(playerid, objectid, Float:radius) { if(IsValidDynamicObject(objectid)) { new interiorid = Streamer_GetIntData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_INTERIOR_ID), worldid = Streamer_GetIntData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_WORLD_ID), Float:x, Float:y, Float:z; GetDynamicObjectPos(objectid, x, y, z); if(interiorid == -1) { interiorid = GetPlayerInterior(playerid); } if(worldid == -1) { worldid = GetPlayerVirtualWorld(playerid); } if(IsPlayerInRangeOfPoint(playerid, radius, x, y, z) && GetPlayerInterior(playerid) == interiorid && GetPlayerVirtualWorld(playerid) == worldid) { return 1; } } return 0; } IsPlayerInRangeOfPlayer(playerid, targetid, Float:radius) { new Float:x, Float:y, Float:z; GetPlayerPos(targetid, x, y, z); if(IsPlayerInRangeOfPoint(playerid, radius, x, y, z) && GetPlayerInterior(playerid) == GetPlayerInterior(targetid) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(targetid)) { return 1; } return 0; } SetMusicStream(type, extraid, url[]) { switch(type) { case MUSIC_MP3PLAYER: { if(isnull(url) && PlayerInfo[extraid][pStreamType] == type) { StopAudioStreamForPlayer(extraid); PlayerInfo[extraid][pStreamType] = MUSIC_NONE; } else { PlayAudioStreamForPlayer(extraid, url); PlayerInfo[extraid][pStreamType] = type; } } case MUSIC_BOOMBOX: { foreach(new i : Player) { if(PlayerInfo[i][pBoomboxListen] == extraid) { if(isnull(url) && PlayerInfo[i][pStreamType] == type) { StopAudioStreamForPlayer(i); PlayerInfo[i][pStreamType] = MUSIC_NONE; } else if(PlayerInfo[i][pStreamType] == MUSIC_NONE || PlayerInfo[i][pStreamType] == MUSIC_BOOMBOX) { PlayAudioStreamForPlayer(i, url); PlayerInfo[i][pStreamType] = type; } } } strcpy(PlayerInfo[extraid][pBoomboxURL], url, 128); } case MUSIC_VEHICLE: { foreach(new i : Player) { if(IsPlayerInVehicle(i, extraid)) { if(isnull(url) && PlayerInfo[i][pStreamType] == type) { StopAudioStreamForPlayer(i); PlayerInfo[i][pStreamType] = MUSIC_NONE; } else if(PlayerInfo[i][pStreamType] == MUSIC_NONE || PlayerInfo[i][pStreamType] == MUSIC_VEHICLE) { PlayAudioStreamForPlayer(i, url); PlayerInfo[i][pStreamType] = type; } } } strcpy(vehicleStream[extraid], url, 128); } } } DestroyWeedPlant(playerid) { if(PlayerInfo[playerid][pWeedPlanted]) { DestroyDynamicObject(PlayerInfo[playerid][pWeedObject]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weedplanted = 0, weedtime = 0, weedgrams = 0, weed_x = 0.0, weed_y = 0.0, weed_z = 0.0, weed_a = 0.0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[playerid][pWeedPlanted] = 0; PlayerInfo[playerid][pWeedTime] = 0; PlayerInfo[playerid][pWeedGrams] = 0; PlayerInfo[playerid][pWeedX] = 0.0; PlayerInfo[playerid][pWeedY] = 0.0; PlayerInfo[playerid][pWeedZ] = 0.0; PlayerInfo[playerid][pWeedA] = 0.0; } } DestroyBoombox(playerid) { if(PlayerInfo[playerid][pBoomboxPlaced]) { DestroyDynamicObject(PlayerInfo[playerid][pBoomboxObject]); DestroyDynamic3DTextLabel(PlayerInfo[playerid][pBoomboxText]); PlayerInfo[playerid][pBoomboxObject] = INVALID_OBJECT_ID; PlayerInfo[playerid][pBoomboxText] = Text3D:INVALID_3DTEXT_ID; PlayerInfo[playerid][pBoomboxPlaced] = 0; PlayerInfo[playerid][pBoomboxURL] = 0; } } GetNearbyBoombox(playerid) { foreach(new i : Player) { if(PlayerInfo[i][pBoomboxPlaced] && IsPlayerInRangeOfDynamicObject(playerid, PlayerInfo[i][pBoomboxObject], 30.0)) { return i; } } return INVALID_PLAYER_ID; } SendClientMessageEx(playerid, color, const text[], {Float,_}:...) { static args, str[192]; if((args = numargs()) <= 3) { SendClientMessage(playerid, color, text); } else { while(--args >= 3) { #emit LCTRL 5 #emit LOAD.alt args #emit SHL.C.alt 2 #emit ADD.C 12 #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S text #emit PUSH.C 192 #emit PUSH.C str #emit PUSH.S 8 #emit SYSREQ.C format #emit LCTRL 5 #emit SCTRL 4 SendClientMessage(playerid, color, str); #emit RETN } return 1; } SendClientMessageToAllEx(color, const text[], {Float,_}:...) { static args, str[192]; if((args = numargs()) <= 2) { foreach(new i : Player) { if(PlayerInfo[i][pLogged]) { SendClientMessage(i, color, text); } } } else { while(--args >= 2) { #emit LCTRL 5 #emit LOAD.alt args #emit SHL.C.alt 2 #emit ADD.C 12 #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S text #emit PUSH.C 192 #emit PUSH.C str #emit LOAD.S.pri 8 #emit ADD.C 4 #emit PUSH.pri #emit SYSREQ.C format #emit LCTRL 5 #emit SCTRL 4 foreach(new i : Player) { if(PlayerInfo[i][pLogged]) { SendClientMessage(i, color, str); } } #emit RETN } return 1; } Log_Write(table[], const text[], {Float,_}:...) { static args, str[1024]; if((args = numargs()) <= 2) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO %e VALUES(null, NOW(), '%e')", table, text); mysql_tquery(connectionID, queryBuffer); } else { while(--args >= 2) { #emit LCTRL 5 #emit LOAD.alt args #emit SHL.C.alt 2 #emit ADD.C 12 #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S text #emit PUSH.C 192 #emit PUSH.C str #emit LOAD.S.pri 8 #emit ADD.C 4 #emit PUSH.pri #emit SYSREQ.C format #emit LCTRL 5 #emit SCTRL 4 mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO %e VALUES(null, NOW(), '%e')", table, str); mysql_tquery(connectionID, queryBuffer); #emit RETN } return 1; } SendFactionMessage(factionid, color, const text[], {Float,_}:...) { static args, str[192]; if((args = numargs()) <= 3) { foreach(new i : Player) { if(PlayerInfo[i][pLogged] && PlayerInfo[i][pFaction] == factionid) { SendClientMessage(i, color, text); } } } else { while(--args >= 3) { #emit LCTRL 5 #emit LOAD.alt args #emit SHL.C.alt 2 #emit ADD.C 12 #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S text #emit PUSH.C 192 #emit PUSH.C str #emit PUSH.S 8 #emit SYSREQ.C format #emit LCTRL 5 #emit SCTRL 4 foreach(new i : Player) { if(PlayerInfo[i][pLogged] && PlayerInfo[i][pFaction] == factionid) { SendClientMessage(i, color, str); } } #emit RETN } return 1; } SendGangMessage(gangid, color, const text[], {Float,_}:...) { static args, str[192]; if((args = numargs()) <= 3) { foreach(new i : Player) { if(PlayerInfo[i][pLogged] && PlayerInfo[i][pGang] == gangid) { SendClientMessage(i, color, text); } } } else { while(--args >= 3) { #emit LCTRL 5 #emit LOAD.alt args #emit SHL.C.alt 2 #emit ADD.C 12 #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S text #emit PUSH.C 192 #emit PUSH.C str #emit PUSH.S 8 #emit SYSREQ.C format #emit LCTRL 5 #emit SCTRL 4 foreach(new i : Player) { if(PlayerInfo[i][pLogged] && PlayerInfo[i][pGang] == gangid) { SendClientMessage(i, color, str); } } #emit RETN } return 1; } SendAdminMessage(color, const text[], {Float,_}:...) { static args, str[192]; if((args = numargs()) <= 2) { foreach(new i : Player) { if(PlayerInfo[i][pLogged] && PlayerInfo[i][pAdmin] > 0) { SendClientMessage(i, color, text); } } print(text); } else { while(--args >= 2) { #emit LCTRL 5 #emit LOAD.alt args #emit SHL.C.alt 2 #emit ADD.C 12 #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S text #emit PUSH.C 192 #emit PUSH.C str #emit LOAD.S.pri 8 #emit ADD.C 4 #emit PUSH.pri #emit SYSREQ.C format #emit LCTRL 5 #emit SCTRL 4 foreach(new i : Player) { if(PlayerInfo[i][pLogged] && PlayerInfo[i][pAdmin] > 0) { SendClientMessage(i, color, str); } } print(str); #emit RETN } return 1; } SendHelperMessage(color, const text[], {Float,_}:...) { static args, str[192]; if((args = numargs()) <= 2) { foreach(new i : Player) { if(PlayerInfo[i][pLogged] && PlayerInfo[i][pHelper] > 0) { SendClientMessage(i, color, text); } } print(text); } else { while(--args >= 2) { #emit LCTRL 5 #emit LOAD.alt args #emit SHL.C.alt 2 #emit ADD.C 12 #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S text #emit PUSH.C 192 #emit PUSH.C str #emit LOAD.S.pri 8 #emit ADD.C 4 #emit PUSH.pri #emit SYSREQ.C format #emit LCTRL 5 #emit SCTRL 4 foreach(new i : Player) { if(PlayerInfo[i][pLogged] && PlayerInfo[i][pHelper] > 0) { SendClientMessage(i, color, str); } } print(str); #emit RETN } return 1; } SendTurfMessage(turfid, color, const text[], {Float,_}:...) { static args, str[192]; if((args = numargs()) <= 3) { foreach(new i : Player) { if(PlayerInfo[i][pLogged] && GetNearbyTurf(i) == turfid) { SendClientMessage(i, color, text); } } } else { while(--args >= 3) { #emit LCTRL 5 #emit LOAD.alt args #emit SHL.C.alt 2 #emit ADD.C 12 #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S text #emit PUSH.C 192 #emit PUSH.C str #emit PUSH.S 8 #emit SYSREQ.C format #emit LCTRL 5 #emit SCTRL 4 foreach(new i : Player) { if(PlayerInfo[i][pLogged] && GetNearbyTurf(i) == turfid) { SendClientMessage(i, color, str); } } #emit RETN } return 1; } SendStaffMessage(color, const text[], {Float,_}:...) { static args, str[192]; if((args = numargs()) <= 2) { foreach(new i : Player) { if(PlayerInfo[i][pLogged] && (PlayerInfo[i][pAdmin] > 0 || PlayerInfo[i][pHelper] > 0)) { SendClientMessage(i, color, text); } } print(text); } else { while(--args >= 2) { #emit LCTRL 5 #emit LOAD.alt args #emit SHL.C.alt 2 #emit ADD.C 12 #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S text #emit PUSH.C 192 #emit PUSH.C str #emit LOAD.S.pri 8 #emit ADD.C 4 #emit PUSH.pri #emit SYSREQ.C format #emit LCTRL 5 #emit SCTRL 4 foreach(new i : Player) { if(PlayerInfo[i][pLogged] && (PlayerInfo[i][pAdmin] > 0 || PlayerInfo[i][pHelper] > 0)) { SendClientMessage(i, color, str); } } print(str); #emit RETN } return 1; } SetPlayerBubbleText(playerid, Float:drawdistance, color, text[], {Float,_}:...) { static args, str[192]; if((args = numargs()) <= 4) { SetPlayerChatBubble(playerid, text, color, drawdistance, 8000); } else { while(--args >= 4) { #emit LCTRL 5 #emit LOAD.alt args #emit SHL.C.alt 2 #emit ADD.C 12 #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S text #emit PUSH.C 192 #emit PUSH.C str #emit LOAD.S.pri 8 #emit CONST.alt 4 #emit SUB #emit PUSH.pri #emit SYSREQ.C format #emit LCTRL 5 #emit SCTRL 4 SetPlayerChatBubble(playerid, str, color, drawdistance, 8000); #emit RETN } return 1; } SendProximityMessage(playerid, Float:radius, color, const text[], {Float,_}:...) { static args, str[192]; if((args = numargs()) <= 4) { foreach(new i : Player) { if(IsPlayerInRangeOfPlayer(i, playerid, radius) || PlayerInfo[i][pListen]) { SendClientMessage(i, color, text); } } } else { while(--args >= 4) { #emit LCTRL 5 #emit LOAD.alt args #emit SHL.C.alt 2 #emit ADD.C 12 #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S text #emit PUSH.C 192 #emit PUSH.C str #emit LOAD.S.pri 8 #emit CONST.alt 4 #emit SUB #emit PUSH.pri #emit SYSREQ.C format #emit LCTRL 5 #emit SCTRL 4 foreach(new i : Player) { if(IsPlayerInRangeOfPlayer(i, playerid, radius) || PlayerInfo[i][pListen]) { SendClientMessage(i, color, str); } } #emit RETN } return 1; } SendProximityFadeMessage(playerid, Float:radius, const text[], color1, color2, color3, color4, color5) { foreach(new i : Player) { if(IsPlayerInRangeOfPlayer(i, playerid, radius / 16)) { SendClientMessage(i, color1, text); } else if(IsPlayerInRangeOfPlayer(i, playerid, radius / 8)) { SendClientMessage(i, color2, text); } else if(IsPlayerInRangeOfPlayer(i, playerid, radius / 4)) { SendClientMessage(i, color3, text); } else if(IsPlayerInRangeOfPlayer(i, playerid, radius / 2)) { SendClientMessage(i, color4, text); } else if(IsPlayerInRangeOfPlayer(i, playerid, radius)) { SendClientMessage(i, color5, text); } else if(PlayerInfo[i][pListen]) { SendClientMessage(i, color5, text); } } } // --------------------------------------- forward TutorialTimer(playerid, stage); public TutorialTimer(playerid, stage) { if(PlayerInfo[playerid][pLogged] && PlayerInfo[playerid][pTutorial]) { switch(stage) { case 1: { ClearChat(playerid); SendClientMessage(playerid, COLOR_YELLOW, "** Limitless Roleplay - Introduction [1/8] **"); SendClientMessage(playerid, COLOR_WHITE, "Welcome to Limitless Roleplay! We're glad you've chosen us and we hope you have lots of fun playing here."); SendClientMessage(playerid, COLOR_WHITE, "This is a light-medium roleplay server where you can roleplay anything you want while having fun doing so!"); SendClientMessage(playerid, COLOR_WHITE, "Why play on a hardcore RP server and worry about which rule you'll break on accident when you can"); SendClientMessage(playerid, COLOR_WHITE, "play on our server with no limitations? Playing on an RP server shouldn't be a chore at all, and that's"); SendClientMessage(playerid, COLOR_WHITE, "the total opposite of what Limitless Roleplay is all about!"); PlayerInfo[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 12000, false, "ii", playerid, 2); } case 2: { ClearChat(playerid); SetPlayerPos(playerid, 1271.478149, -1835.931884, 7.318485); SetPlayerCameraPos(playerid, 1271.478149, -1835.931884, 27.318485); SetPlayerCameraLookAt(playerid, 1271.016601, -1835.826660, 27.184514); SendClientMessage(playerid, COLOR_YELLOW, "** Limitless Roleplay - First Steps [2/8] **"); SendClientMessage(playerid, COLOR_WHITE, "You are now looking at the department of motor vehicles. You'll need to come here to learn how to"); SendClientMessage(playerid, COLOR_WHITE, "drive or else you'll be arrested for driving without a license! Once that is out of the way then you can"); SendClientMessage(playerid, COLOR_WHITE, "work on getting a job and earning some money. In a moment you will see the trucking depot which is"); SendClientMessage(playerid, COLOR_WHITE, "one of the jobs featured on our server. This job will net you a decent amount of cash to get you started"); SendClientMessage(playerid, COLOR_WHITE, "so we recommend you take this one first."); PlayerInfo[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 10000, false, "ii", playerid, 3); } case 3: { //SetPlayerPos(playerid, 2416.180175, -2083.585449, 2.318195); //SetPlayerCameraPos(playerid, 2416.180175, -2083.585449, 22.318195); //SetPlayerCameraLookAt(playerid, 2416.684814, -2083.878417, 22.218750); SetPlayerPos(playerid, -97.808845, -1126.799194, -11.435275); SetPlayerCameraPos(playerid, -97.808845, -1126.799194, 8.564724); SetPlayerCameraLookAt(playerid, -94.058944, -1126.321289, 7.799147); PlayerInfo[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 7000, false, "ii", playerid, 4); } case 4: { ClearChat(playerid); SetPlayerPos(playerid, 800.194213, -1416.351196, 0.002136); SetPlayerCameraPos(playerid, 800.194213, -1416.351196, 85.002136); SetPlayerCameraLookAt(playerid, 800.201110, -1415.702880, 84.962158); /*SendClientMessage(playerid, COLOR_YELLOW, "** Limitless Roleplay - Levels & upgrades [3/8] **"); SendClientMessage(playerid, COLOR_WHITE, "As you start with level 1 you will begin with no upgrades. You will need to gain respect points in order"); SendClientMessage(playerid, COLOR_WHITE, "to level up and gain upgrade points. Respect points are earned by playing at least 30 minutes of one hour"); SendClientMessage(playerid, COLOR_WHITE, "until paycheck which occurs every hour at xx:00. Also as a level 1 your capacity for items is severly limited."); SendClientMessage(playerid, COLOR_WHITE, "You can increase your inventory's capacity by spending upgrade points on the inventory upgrade. Your limit on"); SendClientMessage(playerid, COLOR_WHITE, "how many properties & vehicles you can own is also limited unless you spend points on the assets upgrade."); SendClientMessage(playerid, COLOR_WHITE, "Not only is it realistic but it gives players like you the incentive to level up and gain rewards for doing so!");*/ SendClientMessage(playerid, COLOR_YELLOW, "** Limitless Roleplay - Levels & upgrades [3/8] **"); SendClientMessage(playerid, COLOR_WHITE, "As you start with level 1 you will begin with no upgrades. You will need to gain respect points in order"); SendClientMessage(playerid, COLOR_WHITE, "to level up and gain upgrade points. Respect points are earned by playing at least 30 minutes of one hour"); SendClientMessage(playerid, COLOR_WHITE, "until paycheck which occurs every hour at xx:00. Also as a level 1 your capacity for items is severly limited."); SendClientMessage(playerid, COLOR_WHITE, "You can increase your inventory's capacity by spending upgrade points on the inventory upgrade. There are"); SendClientMessage(playerid, COLOR_WHITE, "many perks which you can spend your upgrade points on which in return gives players like you the incentive"); SendClientMessage(playerid, COLOR_WHITE, "to level up and gain rewards for doing so!"); PlayerInfo[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 23000, false, "ii", playerid, 5); } case 5: { ClearChat(playerid); SetPlayerPos(playerid, 1535.237792, -1664.686401, 0.839702); SetPlayerCameraPos(playerid, 1535.237792, -1664.686401, 20.839702); SetPlayerCameraLookAt(playerid, 1535.668701, -1664.939941, 20.707275); SendClientMessage(playerid, COLOR_YELLOW, "** Limitless Roleplay - Factions [4/8] **"); SendClientMessage(playerid, COLOR_WHITE, "Factions are organized groups commited to certain tasks and are essentially the backbone of RP servers."); SendClientMessage(playerid, COLOR_WHITE, "Without them, who will keep crime out of the streets and save lives? You can join a faction by asking"); SendClientMessage(playerid, COLOR_WHITE, "the leader how to join. Many factions have an application process which requires you to fill out an"); SendClientMessage(playerid, COLOR_WHITE, "application on our website to join. Others may want you to roleplay with their members. Either way, being"); SendClientMessage(playerid, COLOR_WHITE, "apart of a faction means good money and opens up many new opportunities for your character!"); PlayerInfo[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 20000, false, "ii", playerid, 6); } case 6: { ClearChat(playerid); SetPlayerPos(playerid, 2048.199462, -1134.938110, -3.430667); SetPlayerCameraPos(playerid, 2048.199462, -1134.938110, 43.430667); SetPlayerCameraLookAt(playerid, 2047.699462, -1134.931030, 43.355709); SendClientMessage(playerid, COLOR_YELLOW, "** Limitless Roleplay - Gangs [5/8] **"); SendClientMessage(playerid, COLOR_WHITE, "Gangs consist of members who partake in illegal activities. They engage in turf & point wars and"); SendClientMessage(playerid, COLOR_WHITE, "control the illegal guns and drugs trade. You can join a gang or you can form your own if you have"); SendClientMessage(playerid, COLOR_WHITE, "enough members. Gangs can be harsh towards newcomers so don't be going down to Grove Street"); SendClientMessage(playerid, COLOR_WHITE, "and immediately asking them to join. Unlike factions, gangs do not require you to fill out any application."); SendClientMessage(playerid, COLOR_WHITE, "You can be invited to a gang by roleplaying with their members."); PlayerInfo[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 20000, false, "ii", playerid, 7); } case 7: { ClearChat(playerid); SetPlayerPos(playerid, 546.929565, -1250.883056, -3.580329); SetPlayerCameraPos(playerid, 546.929565, -1250.883056, 33.580329); SetPlayerCameraLookAt(playerid, 546.876342, -1251.727539, 33.327884); SendClientMessage(playerid, COLOR_YELLOW, "** Limitless Roleplay - Properties [6/8] **"); SendClientMessage(playerid, COLOR_WHITE, "Properties of all kinds can be purchased by you. After you've made enough money from working then you"); SendClientMessage(playerid, COLOR_WHITE, "can purchase a vehicle at the dealership shown here. Vehicles can be upgraded with all sorts of components."); SendClientMessage(playerid, COLOR_WHITE, "Houses can be purchased and upgraded up to five levels. Each level expands your furniture & stash capacity"); SendClientMessage(playerid, COLOR_WHITE, "to allow for the storage of more items! Houses are often accompanied by garages which are used as safe-keeping"); SendClientMessage(playerid, COLOR_WHITE, "for your owned vehicles. You can repair, refill & tune your vehicle in your own garage! As a level 1 you are"); SendClientMessage(playerid, COLOR_WHITE, "limited to how many properties you can own. By spending your upgrade points on the assets perk you can increase"); SendClientMessage(playerid, COLOR_WHITE, "this limit and own a whole lot more!"); PlayerInfo[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 10000, false, "ii", playerid, 8); } case 8: { SetPlayerPos(playerid, 1060.841064, -623.072998, 106.853836); SetPlayerCameraPos(playerid, 1060.841064, -623.072998, 126.853836); SetPlayerCameraLookAt(playerid, 1060.512207, -623.444213, 126.725433); PlayerInfo[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 17000, false, "ii", playerid, 9); } case 9: { ClearChat(playerid); SetPlayerPos(playerid, 2277.223876, -2168.220947, 0.894626); SetPlayerCameraPos(playerid, 2277.223876, -2168.220947, 58.894626); SetPlayerCameraLookAt(playerid, 2276.876464, -2167.857177, 58.883132); SendClientMessage(playerid, COLOR_YELLOW, "** Limitless Roleplay - Rules [7/8] **"); SendClientMessage(playerid, COLOR_WHITE, "As a roleplay server we have rules just as much as any other server. You're expected to follow them."); SendClientMessage(playerid, COLOR_WHITE, "1) No deathmatching, e.g. killing without a proper reason. Don't ruin it for everyone else."); SendClientMessage(playerid, COLOR_WHITE, "2) No metagaming. Metagaming is mixing OOC information in character."); SendClientMessage(playerid, COLOR_WHITE, "3) No powergaming. Powergaming is commiting unrealistic acts and forcing actions upon others."); SendClientMessage(playerid, COLOR_WHITE, "4) No hacking/cheating. We have zero tolerance for people who use cheats. Permanent ban."); SendClientMessage(playerid, COLOR_WHITE, "5) No exploiting. If you find a bug that gives you an unfair advantage, report it on the forums."); SendClientMessage(playerid, COLOR_LIGHTRED, "Breaking any of the following rules will result in Admin Jail or a Ban from the server."); PlayerInfo[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 18000, false, "ii", playerid, 10); } case 10: { ClearChat(playerid); SetPlayerPos(playerid, 668.145690, -1321.213256, 0.076896); SetPlayerCameraPos(playerid, 668.145690, -1321.213256, 69.076896); SetPlayerCameraLookAt(playerid, 668.645629, -1321.218750, 69.070854); SendClientMessage(playerid, COLOR_YELLOW, "** Limitless Roleplay - Conclusion [8/8] **"); SendClientMessage(playerid, COLOR_WHITE, "We're glad you've chosen to stick around and read this entire tutorial. Good for you!"); SendClientMessage(playerid, COLOR_WHITE, "You'll have tons of fun here at Limitless Roleplay. There are many things to do once you"); SendClientMessage(playerid, COLOR_WHITE, "set foot on our server's grounds. Meet new friends, join a faction, form a gang, and more!"); SendClientMessage(playerid, COLOR_WHITE, "The administration team wishes you good luck and have fun. You will spawn in just a second."); PlayerInfo[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 15000, false, "ii", playerid, 11); } case 11: { PlayerInfo[playerid][pTutorial] = 0; PlayerInfo[playerid][pSetup] = 0; SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); SetPlayerPos(playerid, 820.5590, -1342.6283, 13.5216); SetPlayerFacingAngle(playerid, 90.0000); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); StopAudioStreamForPlayer(playerid); TogglePlayerControllable(playerid, 1); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET setup = 0, gender = %i, age = %i, skin = %i WHERE uid = %i", PlayerInfo[playerid][pGender], PlayerInfo[playerid][pAge], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_AQUA, "Welcome to Limitless Roleplay. Make sure to visit limitlessrp.com for news and updates."); SendClientMessage(playerid, COLOR_AQUA, "Use the /locate command to point to locations of jobs, businesses, and common places."); //SendClientMessage(playerid, COLOR_AQUA, "The DMV has been marked on your map. Navigate to the marker to begin your drivers test."); //PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; //SetPlayerCheckpoint(playerid, 1219.2590, -1812.1093, 16.5938, 3.0); } } } } forward Countdown(playerid, count); public Countdown(playerid, count) { foreach(new i : Player) { if(PlayerInfo[i][pJoinedEvent]) { switch(count) { case 3: { GameTextForPlayer(i, "~g~3", 1500, 3); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); } case 2: { GameTextForPlayer(i, "~g~2", 1500, 3); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); } case 1: { GameTextForPlayer(i, "~g~1", 1500, 3); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); } case 0: { GameTextForPlayer(i, "~g~Go! Go! Go!", 2000, 3); PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0); } } } } count--; if(count >= 0) { SetTimerEx("Countdown", 1000, false, "ii", playerid, count); } } #if defined SERVER_INTRO forward ShowLoginScreenTextdraw(playerid, type); public ShowLoginScreenTextdraw(playerid, type) { if(type == 1) { TextDrawShowForPlayer(playerid, introTextdraws[3]); } else if(type == 2) { TextDrawShowForPlayer(playerid, introTextdraws[5]); } else if(type == 3) { TextDrawShowForPlayer(playerid, introTextdraws[19]); } else if(type == 4) { TextDrawShowForPlayer(playerid, introTextdraws[21]); } else if(type == 5) { TextDrawShowForPlayer(playerid, introTextdraws[24]); } else if(type == 6) { TextDrawShowForPlayer(playerid, introTextdraws[25]); } } forward StreamNextStep(playerid, type); public StreamNextStep(playerid, type) { if(!PlayerInfo[playerid][pWatchingIntro]) { return 0; } switch(type) { case 0: { InterpolateCameraPos(playerid, 187.600982, -1791.727050, 119.087432, 193.731567, -1789.235473, 118.845245, 5000); InterpolateCameraLookAt(playerid, 189.006942, -1790.279785, 114.512641, 195.057144, -1788.512817, 114.078620, 5000); SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 1); ClearChat(playerid); TextDrawHideForPlayer(playerid, introTextdraws[2]); TextDrawHideForPlayer(playerid, introTextdraws[3]); TextDrawShowForPlayer(playerid, introTextdraws[4]); SetTimerEx("ShowLoginScreenTextdraw", 2000, false, "ii", playerid, 2); } case 1: { InterpolateCameraPos(playerid, 300.803771, -1753.841796, 59.482250, 332.887237, -1753.466674, 60.534908, 4000); InterpolateCameraLookAt(playerid, 302.467315, -1749.504394, 57.633026, 334.005126, -1748.907470, 58.813385, 4000); SetTimerEx("StreamNextStep", 4000-600, false, "ii", playerid, 2); ClearChat(playerid); TextDrawHideForPlayer(playerid, introTextdraws[4]); TextDrawHideForPlayer(playerid, introTextdraws[5]); TextDrawShowForPlayer(playerid, introTextdraws[6]); TextDrawShowForPlayer(playerid, introTextdraws[7]); } case 2: { InterpolateCameraPos(playerid, 350.840972, -1794.716308, 13.146982, 346.193756, -1800.415649, 10.697548, 8000); InterpolateCameraLookAt(playerid, 348.053558, -1790.653564, 12.295993, 342.141357, -1797.657592, 9.712170, 8000); SetTimerEx("StreamNextStep", 8000-600, false, "ii", playerid, 3); ClearChat(playerid); TextDrawHideForPlayer(playerid, introTextdraws[6]); TextDrawHideForPlayer(playerid, introTextdraws[7]); TextDrawShowForPlayer(playerid, introTextdraws[8]); TextDrawShowForPlayer(playerid, introTextdraws[9]); TextDrawShowForPlayer(playerid, introTextdraws[10]); TextDrawShowForPlayer(playerid, introTextdraws[11]); } case 3: { InterpolateCameraPos(playerid, 169.602859, -1775.647705, 6.933395, 169.617141, -1776.156250, 12.790164, 5000); InterpolateCameraLookAt(playerid, 169.547332, -1770.651367, 7.117267, 169.588928, -1771.159301, 12.618641, 5000); SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 4); ClearChat(playerid); TextDrawHideForPlayer(playerid, introTextdraws[8]); TextDrawHideForPlayer(playerid, introTextdraws[9]); TextDrawHideForPlayer(playerid, introTextdraws[10]); TextDrawHideForPlayer(playerid, introTextdraws[11]); TextDrawShowForPlayer(playerid, introTextdraws[12]); TextDrawShowForPlayer(playerid, introTextdraws[13]); } case 4: { InterpolateCameraPos(playerid, 386.273284, -2030.129516, 59.993469, 395.822113, -2044.595703, 59.993469, 5000); InterpolateCameraLookAt(playerid, 386.591949, -2029.832275, 55.012496, 396.252319, -2044.526245, 55.012496, 5000); SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 5); ClearChat(playerid); TextDrawHideForPlayer(playerid, introTextdraws[12]); TextDrawHideForPlayer(playerid, introTextdraws[13]); TextDrawShowForPlayer(playerid, introTextdraws[14]); TextDrawShowForPlayer(playerid, introTextdraws[15]); } case 5: { InterpolateCameraPos(playerid, 341.018402, -2095.904052, 6.937077, 342.805603, -2096.498535, 6.648118, 5000); InterpolateCameraLookAt(playerid, 345.258972, -2093.501220, 5.821543, 347.304443, -2094.563964, 5.639461, 5000); SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 6); ClearChat(playerid); TextDrawHideForPlayer(playerid, introTextdraws[14]); TextDrawHideForPlayer(playerid, introTextdraws[15]); TextDrawShowForPlayer(playerid, introTextdraws[16]); TextDrawShowForPlayer(playerid, introTextdraws[17]); } case 6: { InterpolateCameraPos(playerid, 481.641052, -1804.006835, 6.803627, 484.250549, -1802.375244, 6.660738, 5000); InterpolateCameraLookAt(playerid, 485.734344, -1801.318481, 5.794973, 488.679290, -1800.236572, 5.759444, 5000); SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 7); ClearChat(playerid); TextDrawHideForPlayer(playerid, introTextdraws[16]); TextDrawHideForPlayer(playerid, introTextdraws[17]); TextDrawShowForPlayer(playerid, introTextdraws[18]); SetTimerEx("ShowLoginScreenTextdraw", 2000, false, "ii", playerid, 3); //TextDrawShowForPlayer(playerid, introTextdraws[19]); } case 7: { InterpolateCameraPos(playerid, 662.689147, -1868.981201, 6.513285, 665.048583, -1870.174438, 6.864079, 5000); InterpolateCameraLookAt(playerid, 658.142028, -1867.027709, 5.800874, 661.006286, -1867.294311, 6.260089, 5000); SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 8); ClearChat(playerid); TextDrawHideForPlayer(playerid, introTextdraws[18]); TextDrawHideForPlayer(playerid, introTextdraws[19]); TextDrawShowForPlayer(playerid, introTextdraws[20]); SetTimerEx("ShowLoginScreenTextdraw", 2000, false, "ii", playerid, 4); //TextDrawShowForPlayer(playerid, introTextdraws[21]); } case 8: { InterpolateCameraPos(playerid, 542.343933, -1901.457519, 2.008791, 544.523376, -1901.883666, 2.085470, 5000); InterpolateCameraLookAt(playerid, 544.995666, -1897.256958, 2.577868, 546.892395, -1897.521118, 2.681705, 5000); SetTimerEx("StreamNextStep", 4500, false, "ii", playerid, 9); ClearChat(playerid); TextDrawHideForPlayer(playerid, introTextdraws[20]); TextDrawHideForPlayer(playerid, introTextdraws[21]); TextDrawShowForPlayer(playerid, introTextdraws[22]); } case 9: { InterpolateCameraPos(playerid, 542.945800, -1863.699707, 4.435829, 539.996215, -1863.695556, 4.304386, 7000); InterpolateCameraLookAt(playerid, 537.950744, -1863.694213, 4.213245, 535.009887, -1863.990478, 4.081802, 7000); SetTimerEx("StreamNextStep", 6500, false, "ii", playerid, 10); ClearChat(playerid); TextDrawHideForPlayer(playerid, introTextdraws[22]); TextDrawShowForPlayer(playerid, introTextdraws[23]); SetTimerEx("ShowLoginScreenTextdraw", 1000, false, "ii", playerid, 5); SetTimerEx("ShowLoginScreenTextdraw", 3000, false, "ii", playerid, 6); } case 10: { for(new i = 0; i < 26; i ++) { TextDrawHideForPlayer(playerid, introTextdraws[i]); } SetPlayerVirtualWorld(playerid, 0); ShowMainMenuCamera(playerid, 0); ShowDialogToPlayer(playerid, DIALOG_REGISTER); } } return 1; } #endif forward GrandTheftAutoV(playerid, step, Float:x, Float:y, Float:z, Float:angle, Float:cx, Float:cy, Float:cz); public GrandTheftAutoV(playerid, step, Float:x, Float:y, Float:z, Float:angle, Float:cx, Float:cy, Float:cz) { if(PlayerInfo[playerid][pLogged]) { SetPlayerCameraLookAt(playerid, x, y, z); switch(step) { case 1: { SetPlayerCameraPos(playerid, x, y, z + 100.0); PlayerPlaySound(playerid, 16200, 0.0, 0.0, 0.0); SetTimerEx("GrandTheftAutoV", 1000, false, "iifffffff", playerid, 2, x, y, z, angle, cx, cy, cz); } case 2: { SetPlayerCameraPos(playerid, x, y, z + 50.0); PlayerPlaySound(playerid, 16200, 0.0, 0.0, 0.0); SetTimerEx("GrandTheftAutoV", 1000, false, "iifffffff", playerid, 3, x, y, z, angle, cx, cy, cz); } case 3: { SetPlayerCameraPos(playerid, x, y, z + 25.0); PlayerPlaySound(playerid, 16200, 0.0, 0.0, 0.0); SetTimerEx("GrandTheftAutoV", 1000, false, "iifffffff", playerid, 4, x, y, z, angle, cx, cy, cz); } case 4: { InterpolateCameraPos(playerid, cx, cy, cz + 25.0, cx, cy, cz, 1000); InterpolateCameraLookAt(playerid, x + 4.0 * floatsin(-angle, degrees), y + 4.0 * floatcos(-angle, degrees), z, x, y, z + 0.6, 1000); SetTimerEx("GrandTheftAutoV", 1500, false, "iifffffff", playerid, 5, x, y, z, angle, cx, cy, cz); } case 5: { SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, 1); PlayerInfo[playerid][pLoginCamera] = 0; } } } } forward SpectateUpdate(playerid, targetid); public SpectateUpdate(playerid, targetid) { if(PlayerInfo[playerid][pSpectating] == targetid) { SetPlayerInterior(playerid, GetPlayerInterior(targetid)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid)); if(IsPlayerInAnyVehicle(targetid)) { PlayerSpectateVehicle(playerid, GetPlayerVehicleID(targetid)); } else { PlayerSpectatePlayer(playerid, targetid); } } } forward UnfreezeNewbie(playerid); public UnfreezeNewbie(playerid) { TogglePlayerControllable(playerid, 1); } forward VehicleUnfreeze(playerid, vehicleid, Float:x, Float:y, Float:z, interior, world); public VehicleUnfreeze(playerid, vehicleid, Float:x, Float:y, Float:z, interior, world) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsPlayerInRangeOfPoint(playerid, 100.0, x, y, z) && GetPlayerInterior(playerid) == interior && GetPlayerVirtualWorld(playerid) == world) { SetVehiclePos(vehicleid, x, y, z); } TogglePlayerControllable(playerid, 1); } forward UnfreezePlayer(playerid, Float:x, Float:y, Float:z); public UnfreezePlayer(playerid, Float:x, Float:y, Float:z) { if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z)) { SetPlayerPos(playerid, x, y, z); TogglePlayerControllable(playerid, 1); } } forward DestroyWater(objectid); public DestroyWater(objectid) { DestroyDynamicObject(objectid); } forward SecondTimer(); public SecondTimer() { new hour, minute, boomboxid, string[128]; gettime(hour, minute); if((gGMX) && mysql_unprocessed_queries(connectionID) == 0) { SendRconCommand("gmx"); } foreach(new i : Player) { //SetPlayerTime(i, hour, minute); if(PlayerInfo[i][pLogged] && !PlayerInfo[i][pKicked]) { AFKCheck(i); /*if(!PlayerInfo[i][pJoinedEvent] && !PlayerInfo[i][pPaintball] && !PlayerInfo[i][pAwaitingGuns]) { for(new x = 0; x < 13; x ++) { new weapon, ammo; if(PlayerInfo[i][pWeapons][x] > 0) { GetPlayerWeaponData(i, x, weapon, ammo); if(ammo <= 0) { PlayerInfo[i][pWeapons][x] = 0; PlayerInfo[i][ ; } } } }*/ if(PlayerInfo[i][pLoopAnim] && !PlayerInfo[i][pToggleTextdraws]) { TextDrawShowForPlayer(i, AnimationTD); } else { TextDrawHideForPlayer(i, AnimationTD); } if(PlayerInfo[i][pShipment] >= 0) { if((GetPlayerState(i) == PLAYER_STATE_DRIVER) && (GetVehicleModel(GetPlayerVehicleID(i)) != 414 && GetVehicleModel(GetPlayerVehicleID(i)) != 498)) { PlayerInfo[i][pShipment] = -1; SendClientMessage(i, COLOR_GREY, "Shipment cancelled. You went into another vehicle."); } } if(PlayerInfo[i][pPizzas] > 0 && GetPlayerState(i) == PLAYER_STATE_DRIVER) { if(GetVehicleModel(GetPlayerVehicleID(i)) == 448) { if(PlayerInfo[i][pPizzaTime] < 90) { PlayerInfo[i][pPizzaTime]++; } } else { PlayerInfo[i][pPizzas] = 0; PlayerInfo[i][pCP] = 0; DisablePlayerCheckpoint(i); SendClientMessage(i, COLOR_GREY, "Pizza delivery cancelled. You went into another vehicle."); } } if(!PlayerInfo[i][pToggleTextdraws]) { if(PlayerInfo[i][pGPSOn]) { if(GetPlayerState(i) == PLAYER_STATE_SPECTATING) PlayerTextDrawHide(i, PlayerInfo[i][pText][0]); else PlayerTextDrawSetString(i, PlayerInfo[i][pText][0], GetPlayerZoneName(i)); } if(PlayerInfo[i][pWatchOn]) { if(GetPlayerState(i) == PLAYER_STATE_SPECTATING) TextDrawHideForPlayer(i, TimeTD); else TextDrawShowForPlayer(i, TimeTD); } if(!PlayerInfo[i][pToggleHUD]) { if(GetPlayerState(i) == PLAYER_STATE_SPECTATING) { PlayerTextDrawHide(i, PlayerInfo[i][pText][3]); PlayerTextDrawHide(i, PlayerInfo[i][pText][4]); } else { PlayerTextDrawShow(i, PlayerInfo[i][pText][3]); PlayerTextDrawShow(i, PlayerInfo[i][pText][4]); } } } /*if(NetStats_PacketLossPercent(i) > 20.0 && gettime() - PlayerInfo[i][pLastDesync] > 120) { GameTextForPlayer(i, "You are desynced. Please relog once you see this message.", 10000, 6); PlayerInfo[i][pLastDesync] = gettime(); }*/ if(PlayerInfo[i][pSpectating] != INVALID_PLAYER_ID) { if(GetPlayerInterior(i) != GetPlayerInterior(PlayerInfo[i][pSpectating])) SetPlayerInterior(i, GetPlayerInterior(PlayerInfo[i][pSpectating])); if(GetPlayerVirtualWorld(i) != GetPlayerVirtualWorld(PlayerInfo[i][pSpectating])) SetPlayerVirtualWorld(i, GetPlayerVirtualWorld(PlayerInfo[i][pSpectating])); } if(PlayerInfo[i][pTutorial]) { TogglePlayerControllable(i, 0); } if(PlayerInfo[i][pAwaitingClothing]) { SetPlayerClothing(i); } if(PlayerInfo[i][pDraggedBy] != INVALID_PLAYER_ID) { TeleportToPlayer(i, PlayerInfo[i][pDraggedBy]); } if(PlayerInfo[i][pVIPPackage] > 0 && gettime() > PlayerInfo[i][pVIPTime]) { PlayerInfo[i][pVIPPackage] = 0; PlayerInfo[i][pVIPTime] = 0; PlayerInfo[i][pSecondJob] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET vippackage = 0, viptime = 0, secondjob = -1 WHERE uid = %i", PlayerInfo[i][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(i, COLOR_LIGHTRED, "Your VIP subscription has expired. You are no longer a VIP."); } if(PlayerInfo[i][pVIPPackage] < 2 && PlayerInfo[i][pSecondJob] != JOB_NONE) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET secondjob = -1 WHERE uid = %i", PlayerInfo[i][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[i][pSecondJob] = JOB_NONE; SendClientMessage(i, COLOR_LIGHTRED, "Your second job has been removed as you aren't a Limitless+ VIP."); } if(PlayerInfo[i][pFirstAid]) { new Float:health; GetPlayerHealth(i, health); if((health + 1.0) > 100.0) { SetPlayerHealth(i, 100.0); PlayerInfo[i][pFirstAid] = 0; } else { SetPlayerHealth(i, health + 1.0); } } if(PlayerInfo[i][pTazedTime] > 0) { PlayerInfo[i][pTazedTime]--; if(!PlayerInfo[i][pTazedTime]) { ClearAnimations(i, 1); TogglePlayerControllable(i, 1); } } if(PlayerInfo[i][pFishTime] > 0) { PlayerInfo[i][pFishTime]--; if(!IsPlayerAtFishingPlace(i)) { ClearAnimations(i, 1); RemovePlayerAttachedObject(i, 9); PlayerInfo[i][pFishTime] = 0; } else if(PlayerInfo[i][pFishTime] <= 0 && IsPlayerAtFishingPlace(i)) { new rand = Random(1, 100); if(1 <= rand <= 20) { SendClientMessage(i, COLOR_GREY, "You reeled in your line and caught nothing..."); } else if(21 <= rand <= 30) { new amount = 50 + random(100); SendClientMessageEx(i, COLOR_AQUA, "You reeled in your line and caught a used wallet with {00AA00}$%i{33CCFF} inside.", amount); GivePlayerCash(i, amount); } else if(98 <= rand <= 99) { new amount = random(2000) + 1000; SendClientMessageEx(i, COLOR_AQUA, "You reeled in your line and caught a rare 18th century coin valued at {00AA00}$%i{33CCFF}!", amount); GivePlayerCash(i, amount); } else { new weight, level = GetJobLevel(i, JOB_FISHERMAN); if(PlayerInfo[i][pUsedBait]) { weight = random(40) + (level * 10); } else { weight = random(15) + (level * 10); } SendClientMessageEx(i, COLOR_AQUA, "You reeled in your line and caught a fish weighing %i kg!", weight); PlayerInfo[i][pFishWeight] += weight; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fishweight = %i WHERE uid = %i", PlayerInfo[i][pFishWeight], PlayerInfo[i][pID]); mysql_tquery(connectionID, queryBuffer); IncreaseJobSkill(i, JOB_FISHERMAN); if(PlayerInfo[i][pFishWeight] >= 1000) { SendClientMessage(i, COLOR_YELLOW, "You have too much fish. You can continue fishing once you sell your load."); } } ClearAnimations(i, 1); RemovePlayerAttachedObject(i, 9); } } if(PlayerInfo[i][pJailType] > 0) { PlayerInfo[i][pJailTime]--; if(PlayerInfo[i][pJailTime] <= 0) { ResetPlayerWeaponsEx(i); SendClientMessage(i, COLOR_GREY2, "Your jail sentence has expired."); SetPlayerPos(i, 1544.4407, -1675.5522, 13.5584); SetPlayerFacingAngle(i, 90.0000); SetPlayerInterior(i, 0); SetPlayerVirtualWorld(i, 0); SetCameraBehindPlayer(i); PlayerInfo[i][pJailType] = 0; PlayerInfo[i][pJailTime] = 0; } } if(PlayerInfo[i][pEditType] > 0 && IsValidDynamicObject(PlayerInfo[i][pEditObject]) && !IsPlayerInRangeOfDynamicObject(i, PlayerInfo[i][pEditObject], 50.0)) { if(PlayerInfo[i][pEditType] == EDIT_FURNITURE_PREVIEW) { SendClientMessage(i, COLOR_GREY2, "You left the editing area. Furniture previewing cancelled."); DestroyDynamicObject(PlayerInfo[i][pEditObject]); } else if(PlayerInfo[i][pEditType] == EDIT_FURNITURE) { ReloadFurniture(PlayerInfo[i][pEditObject], HouseInfo[PlayerInfo[i][pFurnitureHouse]][hLabels]); SendClientMessage(i, COLOR_GREY2, "You left the editing area. Editing mode has been disabled."); } else if(PlayerInfo[i][pEditType] == EDIT_LAND_OBJECT) { ReloadLandObject(PlayerInfo[i][pEditObject], LandInfo[PlayerInfo[i][pObjectLand]][lLabels]); SendClientMessage(i, COLOR_GREY2, "You left the editing area. Editing mode has been disabled."); } CancelEdit(i); PlayerInfo[i][pEditType] = 0; PlayerInfo[i][pEditObject] = INVALID_OBJECT_ID; } if(PlayerInfo[i][pHospital] && PlayerInfo[i][pHospitalTime]) { PlayerInfo[i][pHospitalTime]--; if(PlayerInfo[i][pHospitalTime] == 0) { SetPlayerPos(i, -10.4534, 149.3639, 999.0613); SetPlayerFacingAngle(i, 180.0000); SetPlayerInterior(i, 1); SetPlayerVirtualWorld(i, random(2) + 1); SetCameraBehindPlayer(i); GivePlayerCash(i, -1000); GameTextForPlayer(i, "~w~Discharged~n~~r~-$1000", 5000, 1); TogglePlayerControllable(i, 1); SetPlayerDrunkLevel(i, 0); if(PlayerInfo[i][pDelivered]) { SendClientMessage(i, COLOR_DOCTOR, "You have been billed $1000 for your stay. You also keep all of your weapons!"); PlayerInfo[i][pDelivered] = 0; } else { SendClientMessage(i, COLOR_DOCTOR, "You have been billed $1000 for your stay. Your weapons have been confiscated by staff."); SendClientMessage(i, COLOR_LIGHTRED, "(( You have lost 30 minutes of your memory. ))"); } SetPlayerHealth(i, PlayerInfo[i][pSpawnHealth]); SetScriptArmour(i, PlayerInfo[i][pSpawnArmor]); PlayerInfo[i][pHospital] = 0; PlayerInfo[i][pHospitalTime] = 0; } else { GameTextForPlayer(i, "~w~Recovering...", 1500, 3); SetPlayerDrunkLevel(i, 50000); } } if(PlayerInfo[i][pRefuel] != INVALID_VEHICLE_ID) { PlayerInfo[i][pRefuelAmount] += 2; vehicleFuel[PlayerInfo[i][pRefuel]]++; if(vehicleFuel[PlayerInfo[i][pRefuel]] >= 100 || PlayerInfo[i][pCash] < PlayerInfo[i][pRefuelAmount] || GetVehicleParams(PlayerInfo[i][pRefuel], VEHICLE_ENGINE)) { AddPointMoney(POINT_FUEL, PlayerInfo[i][pRefuelAmount]); GivePlayerCash(i, -PlayerInfo[i][pRefuelAmount]); SendClientMessageEx(i, COLOR_AQUA, "You've refilled your vehicle's gas tank for {FF6347}$%i{33CCFF}.", PlayerInfo[i][pRefuelAmount]); PlayerInfo[i][pRefuel] = INVALID_VEHICLE_ID; PlayerInfo[i][pRefuelAmount] = 0; } } if(PlayerInfo[i][pMiningTime] > 0) { PlayerInfo[i][pMiningTime]--; if(PlayerInfo[i][pMiningTime] <= 0) { if(IsPlayerInMiningArea(i) && GetPlayerState(i) == PLAYER_STATE_ONFOOT) { new number = random(10) + 1; PlayerInfo[i][pCP] = CHECKPOINT_MINING; SetPlayerAttachedObject(i, 9, 3929, 1, 0.242999, 0.324000, 0.012000, -17.200078, 20.699993, 9.800034, 0.579999, 0.617999, 0.676999); SetPlayerSpecialAction(i, SPECIAL_ACTION_CARRY); ApplyAnimation(i, "CARRY", "liftup", 4.1, 0, 0, 0, 0, 0, 1); SetPlayerCheckpoint(i, 1278.0778, -1267.9661, 12.5413, 2.0); if(1 <= number <= 7) { PlayerInfo[i][pMiningRock] = 1; SendClientMessage(i, COLOR_AQUA, "You have dug up an ordinary stone. Drop it off at the marker."); } else { PlayerInfo[i][pMiningRock] = 2; SendClientMessage(i, COLOR_AQUA, "You have dug up a quality stone. Drop it off at the marker."); } } else { RemovePlayerAttachedObject(i, 9); ClearAnimations(i, 1); } } } if(PlayerInfo[i][pSweeping] && GetVehicleModel(GetPlayerVehicleID(i)) == 574 && GetVehicleSpeed(GetPlayerVehicleID(i)) > 35.0) { PlayerInfo[i][pSweepTime]--; if(PlayerInfo[i][pSweepTime] <= 0) { new cost = 200 + random(50); AddToPaycheck(i, cost); format(string, sizeof(string), "~g~+$%i", cost); GameTextForPlayer(i, string, 5000, 1); PlayerInfo[i][pSweepEarnings] += cost; PlayerInfo[i][pSweepTime] = 30; } } if(PlayerInfo[i][pTaxiPassenger] != INVALID_PLAYER_ID) { if((GetVehicleModel(GetPlayerVehicleID(i)) != 420 && GetVehicleModel(GetPlayerVehicleID(i)) != 438) || !IsPlayerInVehicle(PlayerInfo[i][pTaxiPassenger], GetPlayerVehicleID(i)) || PlayerInfo[i][pTaxiFare] == 0 || PlayerInfo[PlayerInfo[i][pTaxiPassenger]][pCash] < PlayerInfo[i][pTaxiBill]) { CancelTaxiRide(i); } else { PlayerInfo[i][pTaxiTime]++; if(PlayerInfo[i][pTaxiTime] >= 15) { PlayerInfo[i][pTaxiTime] = 0; PlayerInfo[i][pTaxiBill] += PlayerInfo[i][pTaxiFare]; } format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~g~Taxi Meter:~w~ $%i", PlayerInfo[i][pTaxiBill]); GameTextForPlayer(i, string, 3000, 3); } } if(PlayerInfo[i][pMuted] > 0) { PlayerInfo[i][pMuted]--; if(PlayerInfo[i][pMuted] <= 0) { SendClientMessage(i, COLOR_GREY, "You are no longer muted."); } } if(PlayerInfo[i][pSpamTime] > 0) { PlayerInfo[i][pSpamTime]--; } if(PlayerInfo[i][pVehicleCount] > 0) { PlayerInfo[i][pVehicleCount]--; } if(PlayerInfo[i][pMechanicCall] > 0) { PlayerInfo[i][pMechanicCall]--; } if(PlayerInfo[i][pTaxiCall] > 0) { PlayerInfo[i][pTaxiCall]--; } if(PlayerInfo[i][pEmergencyCall] > 0) { PlayerInfo[i][pEmergencyCall]--; } if(PlayerInfo[i][pCourierCooldown] > 0) { PlayerInfo[i][pCourierCooldown]--; } if(PlayerInfo[i][pPizzaCooldown] > 0) { PlayerInfo[i][pPizzaCooldown]--; } if(PlayerInfo[i][pDetectiveCooldown] > 0) { PlayerInfo[i][pDetectiveCooldown]--; } if(PlayerInfo[i][pLootTime] > 0) { PlayerInfo[i][pLootTime]--; if(IsPlayerInBankRobbery(i) && PlayerInfo[i][pLootTime] <= 0) { new amount = random(500) + 500; ClearAnimations(i, 1); PlayerInfo[i][pRobCash] += amount; PlayerInfo[i][pCP] = CHECKPOINT_ROBBERY; PlayerInfo[i][pLastLoad] = gettime(); format(string, sizeof(string), "~g~+$%i", amount); GameTextForPlayer(i, string, 5000, 1); SendClientMessageEx(i, COLOR_AQUA, "You have looted {00AA00}$%i{33CCFF} and now have $%i. You can keep looting or deliver the cash to the {FF6347}marker{33CCFF}.", amount, PlayerInfo[i][pRobCash]); SetPlayerCheckpoint(i, 1429.9939, 1066.9581, 9.8938, 3.0); } } if(PlayerInfo[i][pFindTime] > 0) { PlayerInfo[i][pFindTime]--; if(PlayerInfo[i][pFindTime] == 0) { SetPlayerMarkerForPlayer(i, PlayerInfo[i][pFindPlayer], GetPlayerColor(PlayerInfo[i][pFindPlayer])); PlayerInfo[i][pFindPlayer] = INVALID_PLAYER_ID; } } if((PlayerInfo[i][pToggleMusic]) || (PlayerInfo[i][pBoomboxListen] != INVALID_PLAYER_ID && GetNearbyBoombox(i) != PlayerInfo[i][pBoomboxListen])) { PlayerInfo[i][pBoomboxListen] = INVALID_PLAYER_ID; if(PlayerInfo[i][pStreamType] == MUSIC_BOOMBOX) { StopAudioStreamForPlayer(i); PlayerInfo[i][pStreamType] = MUSIC_NONE; } } if((!PlayerInfo[i][pToggleMusic]) && ((boomboxid = GetNearbyBoombox(i)) != INVALID_PLAYER_ID && PlayerInfo[i][pBoomboxListen] != boomboxid)) { PlayerInfo[i][pBoomboxListen] = boomboxid; if(PlayerInfo[i][pStreamType] == MUSIC_NONE) { PlayAudioStreamForPlayer(i, PlayerInfo[boomboxid][pBoomboxURL]); PlayerInfo[i][pStreamType] = MUSIC_BOOMBOX; } } if(PlayerInfo[i][pPickPlant] != INVALID_PLAYER_ID) { PlayerInfo[i][pPickTime]--; if(PlayerInfo[i][pPickTime] <= 0) { new planterid = PlayerInfo[i][pPickPlant]; if(!IsPlayerConnected(planterid) || !PlayerInfo[planterid][pLogged] || !PlayerInfo[planterid][pWeedPlanted]) { SendClientMessage(i, COLOR_GREY, "This plant is no longer available to pick."); } else if(!IsPlayerInRangeOfPoint(i, 3.0, PlayerInfo[planterid][pWeedX], PlayerInfo[planterid][pWeedY], PlayerInfo[planterid][pWeedZ])) { SendClientMessage(i, COLOR_GREY, "Picking failed. You left the area of the plant."); } else if(GetPlayerSpecialAction(i) != SPECIAL_ACTION_DUCK) { SendClientMessage(i, COLOR_GREY, "Picking failed. You must stay crouched when picking a plant."); } else { PlayerInfo[i][pWeed] += PlayerInfo[planterid][pWeedGrams]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[i][pWeed], PlayerInfo[i][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(i, COLOR_AQUA, "You have harvested %i grams of weed from this plant.", PlayerInfo[planterid][pWeedGrams]); DestroyWeedPlant(planterid); } PlayerInfo[i][pPickPlant] = INVALID_PLAYER_ID; PlayerInfo[i][pPickTime] = 0; } } if(PlayerInfo[i][pCookMeth] > 0) { PlayerInfo[i][pCookTime]--; if(PlayerInfo[i][pCookTime] <= 0) { if(!IsPlayerInRangeOfPoint(i, 5.0, 1.2179, 2.8095, 999.4284)) { SendClientMessage(i, COLOR_GREY, "Cooking failed. You have left the cooking spot."); ResetCooking(i); } else if(PlayerInfo[i][pEphedrine] <= 0) { SendClientMessage(i, COLOR_GREY, "Cooking failed. You have ran out of ephedrine."); ResetCooking(i); } else if(PlayerInfo[i][pMeth] + 2 > GetPlayerCapacity(i, CAPACITY_METH)) { SendClientMessage(i, COLOR_GREY, "Cooking failed. You have ran out of inventory space for meth."); ResetCooking(i); } else { GameTextForPlayer(i, "~g~+2~w~ grams of meth", 3000, 3); PlayerInfo[i][pEphedrine] -= 1; PlayerInfo[i][pMeth] += 2; PlayerInfo[i][pCookGrams] += 2; if((PlayerInfo[i][pCookGrams] % 4) == 0) { PlayerInfo[i][pMuriaticAcid]--; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET ephedrine = %i, meth = %i, muriaticacid = %i WHERE uid = %i", PlayerInfo[i][pEphedrine], PlayerInfo[i][pMeth], PlayerInfo[i][pMuriaticAcid], PlayerInfo[i][pID]); mysql_tquery(connectionID, queryBuffer); if(!PlayerInfo[i][pEphedrine]) { SendClientMessageEx(i, COLOR_LIGHTRED, "You ran out of ephedrine therefore ending your cookoff. You made %i grams of meth from %i grams of ephedrine.", PlayerInfo[i][pCookGrams], PlayerInfo[i][pCookGrams] / 2); ResetCooking(i); } else if(!PlayerInfo[i][pMuriaticAcid]) { SendClientMessageEx(i, COLOR_LIGHTRED, "You ran out of muriatic acid therefore ending your cookoff. You made %i grams of meth from %i grams of ephedrine.", PlayerInfo[i][pCookGrams], PlayerInfo[i][pCookGrams] / 2); ResetCooking(i); } else if(PlayerInfo[i][pMeth] >= GetPlayerCapacity(i, CAPACITY_METH)) { SendClientMessageEx(i, COLOR_LIGHTRED, "You ran out of inventory space for meth therefore ending your cookoff. You made %i grams of meth from %i grams of ephedrine.", PlayerInfo[i][pCookGrams], PlayerInfo[i][pCookGrams] / 2); ResetCooking(i); } else { PlayerInfo[i][pCookTime] = 15; } } } } if(PlayerInfo[i][pDrugsUsed] >= 4) { PlayerInfo[i][pDrugsTime]--; if(PlayerInfo[i][pDrugsTime] <= 0) { SendClientMessage(i, COLOR_GREY, "You are no longer stoned."); SetPlayerWeather(i, gWeather); SetPlayerTime(i, gWorldTime, 0); SetPlayerDrunkLevel(i, 500); PlayerInfo[i][pDrugsUsed] = 0; PlayerInfo[i][pDrugsTime] = 0; } else { SetPlayerWeather(i, -66); SetPlayerTime(i, 12, 0); SetPlayerDrunkLevel(i, 40000); } } if(PlayerInfo[i][pCapturingPoint] >= 0) { PlayerInfo[i][pCaptureTime]--; if(PlayerInfo[i][pCaptureTime] <= 0) { new Float:x, Float:y, Float:z; GetPlayerPos(i, x, y, z); if(PointInfo[PlayerInfo[i][pCapturingPoint]][pTime] == 0 && PlayerInfo[i][pPointX] == x && PlayerInfo[i][pPointY] == y && PlayerInfo[i][pPointZ] == z) { SendClientMessageToAllEx(COLOR_YELLOW, "Point wars: %s attempted to capture %s for %s. It will be theirs in 15 minutes.", GetPlayerRPName(i), PointInfo[PlayerInfo[i][pCapturingPoint]][pName], GangInfo[PlayerInfo[i][pGang]][gName]); PointInfo[PlayerInfo[i][pCapturingPoint]][pCaptureTime] = 15; PointInfo[PlayerInfo[i][pCapturingPoint]][pCapturer] = i; } else { SendClientMessage(i, COLOR_GREY, "You moved from your position and therefore failed to capture."); } PlayerInfo[i][pCapturingPoint] = -1; PlayerInfo[i][pCaptureTime] = 0; } } if(PlayerInfo[i][pPoisonTime] > 0) { new Float:health; GetPlayerHealth(i, health); SetPlayerHealth(i, health - 3.0 < 1.0 ? 1.0 : health - 3.0); PlayerInfo[i][pPoisonTime]--; } AnticheatCheck(i); //GetPlayerHealth(i, PlayerInfo[i][pHealth]); if(!PlayerInfo[i][pBackup] && !IsPlayerBeingFound(i)) { // Yeah, this is indeed a mess. But it works. Cleaning this section is on my list. if(PlayerInfo[i][pJoinedEvent] && EventInfo[eType] == 2) { SetPlayerColor(i, (PlayerInfo[i][pEventTeam] == RED_TEAM) ? (0xFF000000) : (0x0000FF00)); } else if(PlayerInfo[i][pJailType] == 2) { SetPlayerColor(i, 0xF4A41900); } else if(PlayerInfo[i][pFaction] >= 0 && PlayerInfo[i][pDuty] && FactionInfo[PlayerInfo[i][pFaction]][fType] != FACTION_HITMAN) { SetPlayerColor(i, FactionInfo[PlayerInfo[i][pFaction]][fColor] & ~0xff); //} else if(PlayerInfo[i][pFaction] >= 0 && PlayerInfo[i][pDuty] == 0 && FactionInfo[PlayerInfo[i][pFaction]][fType] != FACTION_HITMAN && FactionInfo[PlayerInfo[i][pFaction]][fType] != FACTION_POLICE && FactionInfo[PlayerInfo[i][pFaction]][fType] != FACTION_MEDIC) { //SetPlayerColor(i, FactionInfo[PlayerInfo[i][pFaction]][fColor] & ~0xff); } else if(PlayerInfo[i][pGang] >= 0 && PlayerInfo[i][pBandana]) { SetPlayerColor(i, GangInfo[PlayerInfo[i][pGang]][gColor] & ~0xff); } else if(PlayerHasJob(i, JOB_TAXIDRIVER) && PlayerInfo[i][pTaxiFare] > 0) { SetPlayerColor(i, 0xFFD70000); } else if(PlayerInfo[i][pVIPPackage] > 0 && PlayerInfo[i][pVIPColor]) { SetPlayerColor(i, 0xA028AD00); //} else if(PlayerInfo[i][pAdmin] > 0 && PlayerInfo[i][pAdminDuty]) { //SetPlayerColor(i, 0xAA333300); // 0xFFD70000 } else { SetPlayerColor(i, 0xFFFFFF00); } } } } for(new i = 0; i < MAX_ACTORS; i ++) { if(IsValidActor(i)) { new Float:x, Float:y, Float:z; GetActorPos(i, x, y, z); SetActorPos(i, x, y, z); } } format(string, sizeof(string), "Raw ephedrine\nStock: %i\nPrice: $2000/gram\n/buydrug ephedrine [amount]", gEphedrineStock); UpdateDynamic3DTextLabelText(gEphedrineStockText, COLOR_YELLOW, string); format(string, sizeof(string), "Marijuana seeds\nStock: %i\nPrice: $750/seed\n/buydrug seeds [amount]", gSeedsStock); UpdateDynamic3DTextLabelText(gSeedsStockText, COLOR_YELLOW, string); format(string, sizeof(string), "Cocaine\nStock: %i\nPrice: $1000/gram\n/buydrug cocaine [amount]", gCocaineStock); UpdateDynamic3DTextLabelText(gCocaineText, COLOR_YELLOW, string); if(Iter_Count(Player) > gPlayerRecord) { gPlayerRecord = Iter_Count(Player); gRecordDate = GetDate(); SaveServerInfo(); } } forward MinuteTimer(); public MinuteTimer() { new hour; gettime(.hour = hour); RefreshTime(); if(gHour != hour) { SendClientMessageToAllEx(COLOR_WHITE, "Limitless Roleplay: The time is now {AFAFAF}%02d:00{FFFFFF}.", hour); foreach(new i : Player) { if(PlayerInfo[i][pLogged] && !PlayerInfo[i][pKicked]) { if(PlayerInfo[i][pAFK] && PlayerInfo[i][pAFKTime] > 900) { SendClientMessage(i, COLOR_LIGHTRED, "You didn't receive a paycheck this hour as you were AFK for more than 15 minutes."); } else if(PlayerInfo[i][pMinutes] < 25) { SendClientMessage(i, COLOR_LIGHTRED, "You are ineligible for a paycheck as you played less than 25 minutes this hour."); } else { SendPaycheck(i); } if(PlayerInfo[i][pReportMuted]) { PlayerInfo[i][pReportMuted]--; if(PlayerInfo[i][pReportMuted] <= 0) { PlayerInfo[i][pReportMuted] = 0; PlayerInfo[i][pReportWarns] = 0; SendClientMessage(i, COLOR_YELLOW, "Your report mute has automatically been lifted."); } } } } for(new i = 0; i < MAX_POINTS; i ++) { if(PointInfo[i][pExists]) { if(PointInfo[i][pTime] > 0) { PointInfo[i][pTime]--; ReloadPoint(i); } if(!PointInfo[i][pTime]) { SendClientMessageToAllEx(COLOR_YELLOW, "Point wars: %s is now available to capture.", PointInfo[i][pName]); PointInfo[i][pCapturedGang] = -1; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET time = %i, capturedgang = %i WHERE id = %i", PointInfo[i][pTime], PointInfo[i][pCapturedGang], i); mysql_tquery(connectionID, queryBuffer); } } for(new i = 0; i < MAX_TURFS; i ++) { if(TurfInfo[i][tExists]) { if(TurfInfo[i][tTime] > 0) { TurfInfo[i][tTime]--; ReloadTurf(i); } if(!TurfInfo[i][tTime] && TurfInfo[i][tType] != 8) { SendTurfMessage(i, COLOR_YELLOW, "Turf wars: %s is now available to capture.", TurfInfo[i][tName]); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET time = %i WHERE id = %i", TurfInfo[i][tTime], i); mysql_tquery(connectionID, queryBuffer); } } switch(hour) { case 0, 6, 12, 18: { for(new i = 0; i < MAX_GANGS; i ++) { if(GangInfo[i][gSetup] && GangInfo[i][gTurfTokens] < 10) { GangInfo[i][gTurfTokens]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET turftokens = turftokens + 1 WHERE id = %i", i); mysql_tquery(connectionID, queryBuffer); } } for(new i = 0; i < MAX_FACTIONS; i ++) { if(FactionInfo[i][fType] == FACTION_POLICE && FactionInfo[i][fTurfTokens] < 3) { FactionInfo[i][fTurfTokens]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET turftokens = turftokens + 1 WHERE id = %i", i); mysql_tquery(connectionID, queryBuffer); } } } } if(RobberyInfo[rTime] > 0) { RobberyInfo[rTime]--; } SetWorldTime(hour); gWorldTime = hour; gHour = hour; gCharityHealth = 0; gCharityArmor = 0; } else { foreach(new i : Player) { if(PlayerInfo[i][pWeedPlanted] && PlayerInfo[i][pWeedTime] > 0) { PlayerInfo[i][pWeedTime]--; if((PlayerInfo[i][pWeedTime] % 2) == 0) { PlayerInfo[i][pWeedGrams]++; } } if(PlayerInfo[i][pLogged] && PlayerInfo[i][pAFKTime] < 900) { //new amount = 35 * min(PlayerInfo[i][pLevel], 21); //AddToPaycheck(i, amount); PlayerInfo[i][pMinutes]++; } } for(new i = 0; i < MAX_POINTS; i ++) { if(PointInfo[i][pExists] && PointInfo[i][pCapturer] != INVALID_PLAYER_ID && PointInfo[i][pCaptureTime] > 0) { if(PlayerInfo[PointInfo[i][pCapturer]][pGang] == -1)// || PlayerInfo[PointInfo[i][pCapturer]][pGangRank] < 5) { PointInfo[i][pCapturer] = INVALID_PLAYER_ID; PointInfo[i][pCaptureTime] = 0; } else { PointInfo[i][pCaptureTime]--; if(PointInfo[i][pCaptureTime] <= 0) { GiveGangPoints(PlayerInfo[PointInfo[i][pCapturer]][pGang], 10); GetPlayerName(PointInfo[i][pCapturer], PointInfo[i][pCapturedBy], MAX_PLAYER_NAME); PointInfo[i][pCapturedGang] = PlayerInfo[PointInfo[i][pCapturer]][pGang]; GangInfo[PointInfo[i][pCapturedGang]][gCash] += PointInfo[i][pProfits]; SendClientMessageToAllEx(COLOR_YELLOW, "Point wars: %s has successfully captured %s for %s.", GetPlayerRPName(PointInfo[i][pCapturer]), PointInfo[i][pName], GangInfo[PointInfo[i][pCapturedGang]][gName]); SendGangMessage(PointInfo[i][pCapturedGang], COLOR_YELLOW, "Your gang has earned $%i and 10 GP for successfully capturing this point.", PointInfo[i][pProfits]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET cash = %i WHERE id = %i", GangInfo[PointInfo[i][pCapturedGang]][gCash], PointInfo[i][pCapturedGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET capturedby = '%s', capturedgang = %i, profits = 0, time = 20 WHERE id = %i", PointInfo[i][pCapturedBy], PointInfo[i][pCapturedGang], i); mysql_tquery(connectionID, queryBuffer); PointInfo[i][pCapturer] = INVALID_PLAYER_ID; PointInfo[i][pCaptureTime] = 0; PointInfo[i][pProfits] = 0; PointInfo[i][pTime] = 20; ReloadPoint(i); } } } } for(new i = 0; i < MAX_TURFS; i ++) { if(TurfInfo[i][tExists] && TurfInfo[i][tCapturer] != INVALID_PLAYER_ID && TurfInfo[i][tCaptureTime] > 0) { if((GetFactionType(TurfInfo[i][tCapturer]) != FACTION_POLICE) && (PlayerInfo[TurfInfo[i][tCapturer]][pGang] == -1))// || PlayerInfo[TurfInfo[i][tCapturer]][pGangRank] < 5)) { TurfInfo[i][tCapturer] = INVALID_PLAYER_ID; TurfInfo[i][tCaptureTime] = 0; ReloadTurf(i); } else { TurfInfo[i][tCaptureTime]--; if(TurfInfo[i][tCaptureTime] <= 0) { GetPlayerName(TurfInfo[i][tCapturer], TurfInfo[i][tCapturedBy], MAX_PLAYER_NAME); if(GetFactionType(TurfInfo[i][tCapturer]) == FACTION_POLICE) { TurfInfo[i][tCapturedGang] = -1; SendTurfMessage(i, COLOR_YELLOW, "Turf wars: %s has been successfully claimed back as a civilian turf by Officer %s.", TurfInfo[i][tName], GetPlayerRPName(TurfInfo[i][tCapturer])); } else { new gangid = PlayerInfo[TurfInfo[i][tCapturer]][pGang]; TurfInfo[i][tCapturedGang] = gangid; GiveGangPoints(gangid, 10); SendTurfMessage(i, COLOR_YELLOW, "Turf wars: %s has been successfully claimed by %s for %s.", TurfInfo[i][tName], GetPlayerRPName(TurfInfo[i][tCapturer]), GangInfo[gangid][gName]); switch(TurfInfo[i][tType]) { case 1: { GangInfo[gangid][gHPAmmo] = GangInfo[gangid][gHPAmmo] + 80 > GetGangStashCapacity(gangid, STASH_CAPACITY_HPAMMO) ? GetGangStashCapacity(gangid, STASH_CAPACITY_HPAMMO) : GangInfo[gangid][gHPAmmo] + 80; SendGangMessage(gangid, COLOR_YELLOW, "Your gang earned 80 rounds of hollow point ammo in its stash for capturing this turf!"); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET hpammo = %i WHERE id = %i", GangInfo[gangid][gHPAmmo], gangid); mysql_tquery(connectionID, queryBuffer); } case 2: { GangInfo[gangid][gPoisonAmmo] = GangInfo[gangid][gPoisonAmmo] + 60 > GetGangStashCapacity(gangid, STASH_CAPACITY_POISONAMMO) ? GetGangStashCapacity(gangid, STASH_CAPACITY_POISONAMMO) : GangInfo[gangid][gPoisonAmmo] + 60; SendGangMessage(gangid, COLOR_YELLOW, "Your gang earned 60 rounds of poison tip ammo in its stash for capturing this turf!"); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET poisonammo = %i WHERE id = %i", GangInfo[gangid][gPoisonAmmo], gangid); mysql_tquery(connectionID, queryBuffer); } case 3: { GangInfo[gangid][gFMJAmmo] = GangInfo[gangid][gFMJAmmo] + 30 > GetGangStashCapacity(gangid, STASH_CAPACITY_FMJAMMO) ? GetGangStashCapacity(gangid, STASH_CAPACITY_FMJAMMO) : GangInfo[gangid][gFMJAmmo] + 30; SendGangMessage(gangid, COLOR_YELLOW, "Your gang earned 30 rounds of full metal jacket ammo in its stash for capturing this turf!"); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET fmjammo = %i WHERE id = %i", GangInfo[gangid][gFMJAmmo], gangid); mysql_tquery(connectionID, queryBuffer); } case 4: { GangInfo[gangid][gWeapons][GANGWEAPON_M4] += 10; GangInfo[gangid][gWeapons][GANGWEAPON_SNIPER] += 10; GangInfo[gangid][gWeapons][GANGWEAPON_SPAS12] += 10; SendGangMessage(gangid, COLOR_YELLOW, "Your gang earned +10 of M4/Sniper/SPAS12 each in its stash for capturing this turf!"); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_m4 = %i, weapon_sniper = %i, weapon_spas12 = %i WHERE id = %i", GangInfo[gangid][gWeapons][GANGWEAPON_M4], GangInfo[gangid][gWeapons][GANGWEAPON_SNIPER], GangInfo[gangid][gWeapons][GANGWEAPON_SPAS12], gangid); mysql_tquery(connectionID, queryBuffer); } case 5: { GangInfo[gangid][gWeed] = GangInfo[gangid][gWeed] + 100 > GetGangStashCapacity(gangid, STASH_CAPACITY_WEED) ? GetGangStashCapacity(gangid, STASH_CAPACITY_WEED) : GangInfo[gangid][gWeed] + 100; GangInfo[gangid][gMeth] = GangInfo[gangid][gMeth] + 50 > GetGangStashCapacity(gangid, STASH_CAPACITY_METH) ? GetGangStashCapacity(gangid, STASH_CAPACITY_METH) : GangInfo[gangid][gMeth] + 50; SendGangMessage(gangid, COLOR_YELLOW, "Your gang earned 100 grams of weed & 50 grams of meth in the stash for capturing this turf!"); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weed = %i, meth = %i WHERE id = %i", GangInfo[gangid][gWeed], GangInfo[gangid][gMeth], gangid); mysql_tquery(connectionID, queryBuffer); } case 6: { GangInfo[gangid][gCocaine] = GangInfo[gangid][gCocaine] + 100 > GetGangStashCapacity(gangid, STASH_CAPACITY_COCAINE) ? GetGangStashCapacity(gangid, STASH_CAPACITY_COCAINE) : GangInfo[gangid][gCocaine] + 100; SendGangMessage(gangid, COLOR_YELLOW, "Your gang earned 100 grams of cocaine in the stash for capturing this turf!"); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET cocaine = %i WHERE id = %i", GangInfo[gangid][gCocaine], gangid); mysql_tquery(connectionID, queryBuffer); } case 7: { SendGangMessage(gangid, COLOR_YELLOW, "Your gang will now receive 10 percents of all sales in this turf."); } } } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET capturedby = '%s', capturedgang = %i, time = 12 WHERE id = %i", TurfInfo[i][tCapturedBy], TurfInfo[i][tCapturedGang], i); mysql_tquery(connectionID, queryBuffer); TurfInfo[i][tCapturer] = INVALID_PLAYER_ID; TurfInfo[i][tCaptureTime] = 0; TurfInfo[i][tTime] = 12; ReloadTurf(i); } } } } for(new i = 0; i < MAX_REPORTS; i ++) { if(ReportInfo[i][rExists] && ReportInfo[i][rTime] > 0) { ReportInfo[i][rTime]--; if(ReportInfo[i][rTime] <= 0) { SendClientMessage(ReportInfo[i][rReporter], COLOR_GREY, "Your report has expired. You can make an admin request on limitlessrp.com if you still need help."); ReportInfo[i][rExists] = 0; } } } } RefreshLoginScreen(); } forward FuelTimer(); public FuelTimer() { for(new i = 1; i < MAX_VEHICLES; i ++) { if(VehicleHasEngine(i) && GetVehicleParams(i, VEHICLE_ENGINE)) { if(vehicleFuel[i] > 0) { vehicleFuel[i]--; switch(vehicleFuel[i]) { case 15, 10, 5: { SendClientMessage(GetVehicleDriver(i), COLOR_LIGHTRED, "** This vehicle is running low on fuel. Visit the nearest gas station to fill up. (/refuel)"); } } } if(vehicleFuel[i] <= 0) { SetVehicleParams(i, VEHICLE_ENGINE, 0); } DestroyVehicle(i); } } } forward InjuredTimer(); public InjuredTimer() { foreach(new i : Player) { if(PlayerInfo[i][pLogged] && PlayerInfo[i][pInjured] && GetVehicleModel(GetPlayerVehicleID(i)) != 416) { new Float:health; GetPlayerHealth(i, health); SetPlayerHealth(i, health - 1.0); } } } forward RandomFire(check); public RandomFire(check) { new count, index, announced, rand = random(10); if(!IsFireActive()) { if(check) { foreach(new i : Player) { if(GetFactionType(i) == FACTION_MEDIC) { count++; } } } else { count = 3; } if(count >= 3) { for(new i = 0; i < sizeof(randomFireSpawns); i ++) { if(randomFireSpawns[i][fireIndex] == rand) { if(!announced) { foreach(new x : Player) { if(IsPlayerInRangeOfPoint(x, 30.0, randomFireSpawns[i][fireX], randomFireSpawns[i][fireY], randomFireSpawns[i][fireZ])) { SendClientMessage(x, COLOR_PURPLE, "** An explosion can be heard. Smoke is rising from a building nearby."); } if(GetFactionType(x) == FACTION_MEDIC) { PlayerInfo[x][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(x, randomFireSpawns[i][fireX], randomFireSpawns[i][fireY], randomFireSpawns[i][fireZ], 3.0); SendClientMessageEx(x, COLOR_DOCTOR, "** All units, a fire has been reported in %s. Please head to the beacon on your map. **", GetZoneName(randomFireSpawns[i][fireX], randomFireSpawns[i][fireY], randomFireSpawns[i][fireZ])); } } announced = 1; } gFireObjects[index] = CreateDynamicObject(18691, randomFireSpawns[i][fireX], randomFireSpawns[i][fireY], randomFireSpawns[i][fireZ], 0.0, 0.0, randomFireSpawns[i][fireA], .streamdistance = 50.0); gFireHealth[index++] = 50.0; } } gFires = index; } } } forward KickPlayer(playerid); public KickPlayer(playerid) { if(!PlayerInfo[playerid][pKicked]) { PlayerInfo[playerid][pKicked] = 1; SetTimerEx("KickPlayer", 200, false, "i", playerid); } else { PlayerInfo[playerid][pKicked] = 0; Kick(playerid); } } #if defined SERVER_INTRO forward ShowMainMenuCamera(playerid, query); public ShowMainMenuCamera(playerid, query) { if(!query) { for(new i = 0; i < 4; i ++) { TextDrawShowForPlayer(playerid, LoginScreen[i]); } //InterpolateCameraPos(playerid, 2090.500732, -1730.270385, 122.216575, 873.889953, -1519.312011, 123.752815, 60000); //InterpolateCameraLookAt(playerid, 2090.014404, -1730.264892, 122.177040, 873.899353, -1518.828613, 123.698936, 60000); InterpolateCameraPos(playerid, 2169.808105, -1659.838256, 103.374832, 2167.935058, -1136.155029, 106.361320, 30000); InterpolateCameraLookAt(playerid, 2169.811035, -1659.351928, 103.347076, 2167.435058, -1136.148559, 106.344200, 30000); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM bans WHERE username = '%s' OR ip = '%s' OR ip LIKE '%s'", GetPlayerNameEx(playerid), GetPlayerIP(playerid), GetPlayerIPRange(playerid)); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOOKUP_BANS, playerid); } } #else forward ShowMainMenuCamera(playerid); public ShowMainMenuCamera(playerid) { for(new i = 0; i < 4; i ++) { TextDrawShowForPlayer(playerid, LoginScreen[i]); } PlayAudioStreamForPlayer(playerid, "http://music.limitlessrp.com/blow.mp3"); // josh //InterpolateCameraPos(playerid, 2090.500732, -1730.270385, 122.216575, 873.889953, -1519.312011, 123.752815, 60000); //InterpolateCameraLookAt(playerid, 2090.014404, -1730.264892, 122.177040, 873.899353, -1518.828613, 123.698936, 60000); InterpolateCameraPos(playerid, 2169.808105, -1659.838256, 103.374832, 2167.935058, -1136.155029, 106.361320, 30000); InterpolateCameraLookAt(playerid, 2169.811035, -1659.351928, 103.347076, 2167.435058, -1136.148559, 106.344200, 30000); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM bans WHERE username = '%s' OR ip = '%s' OR ip LIKE '%s'", GetPlayerNameEx(playerid), GetPlayerIP(playerid), GetPlayerIPRange(playerid)); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOOKUP_BANS, playerid); } #endif forward DespawnTimer(vehicleid); public DespawnTimer(vehicleid) { if(VehicleInfo[vehicleid][vOwnerID] > 0 && !IsVehicleOccupied(vehicleid)) { DespawnVehicle(vehicleid); } else { // ANOTHER TEN MINUTES! VehicleInfo[vehicleid][vTimer] = SetTimerEx("DespawnTimer", 600000, false, "i", vehicleid); } } forward HTTP_OnMusicFetchResponse(index, response_code, data[]); public HTTP_OnMusicFetchResponse(index, response_code, data[]) { if(response_code == 200) { new buffer[2048], string[288], count, start, pos; strcpy(buffer, data); while((pos = strfind(buffer, "
")) != -1) { strdel(buffer, pos, pos + 5); if(++count == 8) { strmid(string, buffer, start, pos); SendClientMessage(index, COLOR_YELLOW, string); start = pos; count = 0; } else { if((strlen(buffer) - pos) < 6) { strmid(string, buffer, start, pos); SendClientMessage(index, COLOR_YELLOW, string); break; } strins(buffer, ", ", pos); } } } else { SendClientMessageEx(index, COLOR_RED, "The music database is currently not available. (error %i)", response_code); } } forward Radio_PlayStation(playerid); public Radio_PlayStation(playerid) { if(cache_get_row_count(radioConnectionID)) { new name[128], url[128]; cache_get_field_content(0, "name", name); cache_get_field_content(0, "url", url); switch(PlayerInfo[playerid][pMusicType]) { case MUSIC_MP3PLAYER: { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s changes the radio station on their MP3 player.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You are now tuned in to {00AA00}%s{33CCFF}.", name); SetMusicStream(MUSIC_MP3PLAYER, playerid, url); } case MUSIC_BOOMBOX: { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s changes the radio station on their boombox.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "Your boombox is now tuned in to {00AA00}%s{33CCFF}.", name); SetMusicStream(MUSIC_BOOMBOX, playerid, url); } case MUSIC_VEHICLE: { if(IsPlayerInAnyVehicle(playerid)) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s changes the radio station in their vehicle.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "Your radio is now tuned in to {00AA00}%s{33CCFF}.", name); SetMusicStream(MUSIC_VEHICLE, GetPlayerVehicleID(playerid), url); } } } } } forward Radio_ListStations(playerid); public Radio_ListStations(playerid) { new rows = cache_get_row_count(radioConnectionID); if((!rows) && PlayerInfo[playerid][pSearch] && PlayerInfo[playerid][pPage] == 1) { SendClientMessage(playerid, COLOR_GREY, "No results found."); ShowDialogToPlayer(playerid, DIALOG_MP3RADIOSEARCH); } else if(rows) { static string[MAX_LISTED_STATIONS * 64], name[128]; string[0] = 0; for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "name", name); format(string, sizeof(string), "%s\n%s", string, name); } if(PlayerInfo[playerid][pPage] > 1) { strcat(string, "\n{FF6347}<< Go back{FFFFFF}"); } if(rows == MAX_LISTED_STATIONS) { strcat(string, "\n{00AA00}>> Next page{FFFFFF}"); } ShowPlayerDialog(playerid, DIALOG_MP3RADIORESULTS, DIALOG_STYLE_LIST, "Results", string, "Play", "Back"); } } forward MDC_ListCharges(playerid); public MDC_ListCharges(playerid) { new rows = cache_get_row_count(connectionID); if(!rows) { SendClientMessage(playerid, COLOR_GREY, "This player has no active charges on them."); } else { new chargedby[MAX_PLAYER_NAME], date[24], reason[128], string[512]; string = "Charged by\tDate\tReason"; for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "chargedby", chargedby); cache_get_field_content(i, "date", date); cache_get_field_content(i, "reason", reason); format(string, sizeof(string), "%s\n%s\t%s\t%s", string, chargedby, date, reason); } ShowPlayerDialog(playerid, DIALOG_MDCCHARGES, DIALOG_STYLE_TABLIST_HEADERS, "Active charges:", string, "<<", ""); } return 1; } forward MDC_ClearCharges(playerid); public MDC_ClearCharges(playerid) { if(cache_get_row_count(connectionID)) { new username[MAX_PLAYER_NAME], id = PlayerInfo[playerid][pSelected]; cache_get_field_content(0, "username", username); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM charges WHERE uid = %i", id); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET wantedlevel = 0 WHERE uid = %i", id); mysql_tquery(connectionID, queryBuffer); foreach(new i : Player) { if(!strcmp(GetPlayerNameEx(i), username)) { SendClientMessageEx(i, COLOR_WHITE, "** Your crimes were cleared by %s.", GetPlayerRPName(playerid)); PlayerInfo[i][pWantedLevel] = 0; } } SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_ROYALBLUE, "** HQ: %s %s has cleared %s's charges and wanted level.", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), username); } } forward MDC_PlayerLookup(playerid, username[]); public MDC_PlayerLookup(playerid, username[]) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "That player doesn't exist and therefore has no information to view."); ShowPlayerDialog(playerid, DIALOG_PLAYERLOOKUP, DIALOG_STYLE_INPUT, "Player lookup", "Enter the full name of the player to lookup:", "Submit", "Cancel"); } else { new string[512]; PlayerInfo[playerid][pSelected] = cache_get_field_content_int(0, "uid"); format(string, sizeof(string), "Name: %s\nGender: %s\nAge: %i years old\nCrimes commited: %i\nTimes arrested: %i\nWanted level: %i/6\nDrivers license: %s", username, (cache_get_field_content_int(0, "gender") == 2) ? ("Female") : ("Male"), cache_get_field_content_int(0, "age"), cache_get_field_content_int(0, "crimes"), cache_get_field_content_int(0, "arrested"), cache_get_field_content_int(0, "wantedlevel"), cache_get_field_content_int(0, "carlicense") ? ("Yes") : ("No")); ShowPlayerDialog(playerid, DIALOG_MDCPLAYER1, DIALOG_STYLE_MSGBOX, "Player lookup", string, "Options", "Cancel"); } } forward OnPlayerAttemptResetUpgrades(playerid); public OnPlayerAttemptResetUpgrades(playerid) { if(PlayerInfo[playerid][pVIPPackage] == 0 && cache_get_row_int(0, 0) > 3) { SendClientMessageEx(playerid, COLOR_GREY, "You own %i/%i vehicle at the moment. Please sell %i of them before using this command.", cache_get_row_int(0, 0), GetPlayerAssetLimit(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_VEHICLES) - cache_get_row_int(0, 0)); } else { PlayerInfo[playerid][pUpgradePoints] = (PlayerInfo[playerid][pLevel] - 1) * 2; PlayerInfo[playerid][pInventoryUpgrade] = 0; PlayerInfo[playerid][pAddictUpgrade] = 0; PlayerInfo[playerid][pTraderUpgrade] = 0; PlayerInfo[playerid][pAssetUpgrade] = 0; PlayerInfo[playerid][pSpawnHealth] = 50.0; PlayerInfo[playerid][pSpawnArmor] = 0.0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET upgradepoints = %i, inventoryupgrade = 0, addictupgrade = 0, traderupgrade = 0, assetupgrade = 0, spawnhealth = '50.0', spawnarmor = '0.0' WHERE uid = %i", PlayerInfo[playerid][pUpgradePoints], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_GREEN, "You have reset your upgrade points. You now have %i upgrade points available.", PlayerInfo[playerid][pUpgradePoints]); } } forward OnBanAttempt(username[], ip[], from[], reason[], permanent); public OnBanAttempt(username[], ip[], from[], reason[], permanent) { if(cache_get_row_count(connectionID)) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE bans SET reason = '%e' WHERE id = %i", reason, cache_get_row_int(0, 0)); mysql_tquery(connectionID, queryBuffer); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO bans VALUES(null, '%s', '%s', '%s', NOW(), '%e', %i)", username, ip, from, reason, permanent); mysql_tquery(connectionID, queryBuffer); } } forward OnPlayerAttemptInviteGang(playerid, targetid); public OnPlayerAttemptInviteGang(playerid, targetid) { if(cache_get_row_int(0, 0) >= GetGangMemberLimit(PlayerInfo[playerid][pGang])) { SendClientMessageEx(playerid, COLOR_GREY, "Your gang can't have more than %i members at its level.", GetGangMemberLimit(PlayerInfo[playerid][pGang])); } else { PlayerInfo[targetid][pGangOffer] = playerid; PlayerInfo[targetid][pGangOffered] = PlayerInfo[playerid][pGang]; SendClientMessageEx(targetid, COLOR_AQUA, "%s has invited you to join {00AA00}%s{33CCFF} (/accept gang).", GetPlayerRPName(playerid), GangInfo[PlayerInfo[playerid][pGang]][gName]); SendClientMessageEx(playerid, COLOR_AQUA, "You have invited %s to join your gang.", GetPlayerRPName(targetid)); } } forward OnPlayerAttemptBuyVehicle(playerid, index); public OnPlayerAttemptBuyVehicle(playerid, index) { new count = cache_get_row_int(0, 0); if(count >= GetPlayerAssetLimit(playerid, LIMIT_VEHICLES)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i vehicles. You can't own anymore unless you upgrade your asset perk.", count, GetPlayerAssetLimit(playerid, LIMIT_VEHICLES)); } else { new string[20]; if(PlayerInfo[playerid][pCash] < vehicleArray[index][carPrice]) { SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this vehicle."); } else if(GetSpawnedVehicles(playerid) >= MAX_SPAWNED_VEHICLES) { SendClientMessageEx(playerid, COLOR_GREY, "You can't have more than %i vehicles spawned at a time.", MAX_SPAWNED_VEHICLES); } else { switch(random(3)) { case 0: { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO vehicles (ownerid, owner, modelid, price, pos_x, pos_y, pos_z, pos_a) VALUES(%i, '%s', %i, %i, '562.3970', '-1283.8485', '17.0007', '0.0000')", PlayerInfo[playerid][pID], GetPlayerNameEx(playerid), vehicleArray[index][carModel], vehicleArray[index][carPrice]); mysql_tquery(connectionID, queryBuffer); } case 1: { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO vehicles (ownerid, owner, modelid, price, pos_x, pos_y, pos_z, pos_a) VALUES(%i, '%s', %i, %i, '557.8670', '-1283.9822', '17.0007', '0.0000')", PlayerInfo[playerid][pID], GetPlayerNameEx(playerid), vehicleArray[index][carModel], vehicleArray[index][carPrice]); mysql_tquery(connectionID, queryBuffer); } case 2: { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO vehicles (ownerid, owner, modelid, price, pos_x, pos_y, pos_z, pos_a) VALUES(%i, '%s', %i, %i, '552.8177', '-1284.1307', '17.0007', '0.0000')", PlayerInfo[playerid][pID], GetPlayerNameEx(playerid), vehicleArray[index][carModel], vehicleArray[index][carPrice]); mysql_tquery(connectionID, queryBuffer); } } AddPointMoney(POINT_AUTOEXPORT, percent(vehicleArray[index][carPrice], 3)); GivePlayerCash(playerid, -vehicleArray[index][carPrice]); format(string, sizeof(string), "~r~-$%i", vehicleArray[index][carPrice]); GameTextForPlayer(playerid, string, 5000, 1); SendClientMessageEx(playerid, COLOR_GREEN, "%s purchased for $%i. /spawncar to spawn this vehicle.", vehicleNames[vehicleArray[index][carModel] - 400], vehicleArray[index][carPrice]); Log_Write("log_property", "%s (uid: %i) purchased a %s for $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], vehicleNames[vehicleArray[index][carModel] - 400], vehicleArray[index][carPrice]); } } } forward OnPlayerChangeNumber(playerid, number); public OnPlayerChangeNumber(playerid, number) { if(cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "That phone number is already taken."); ShowPlayerDialog(playerid, DIALOG_COOKIENUMBER, DIALOG_STYLE_INPUT, "Number change", "Enter your phone number of choice:", "Submit", "Cancel"); } else { PlayerInfo[playerid][pCookies] -= 5; PlayerInfo[playerid][pPhone] = number; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, phone = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pPhone], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have redeemed 5 cookies for a {00AA00}number change{33CCFF} to %i.", number); } } forward OnHitmanPassport(playerid, name[], level, skinid); public OnHitmanPassport(playerid, name[], level, skinid) { if(cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "That name is already taken, please choose another."); } else { strcpy(PlayerInfo[playerid][pNameChange], name, MAX_PLAYER_NAME); PlayerInfo[playerid][pFreeNamechange] = 2; PlayerInfo[playerid][pPassportLevel] = level; PlayerInfo[playerid][pPassportSkin] = skinid; SendClientMessageEx(playerid, COLOR_AQUA, "You have requested a namechange to {00AA00}%s{33CCFF} for free, please wait for admin approval.", name); SendClientMessageEx(playerid, COLOR_AQUA, "Once the namechange has been approved, you will receive your chosen name, level and skin."); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is requesting a namechange to %s. (/acceptname %i or /denyname %i)", GetPlayerRPName(playerid), playerid, name, playerid, playerid); } } forward OnPlayerAttemptNameChange(playerid, name[]); public OnPlayerAttemptNameChange(playerid, name[]) { if(cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "That name is already taken, please choose another."); if(PlayerInfo[playerid][pFreeNamechange]) { ShowPlayerDialog(playerid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel"); } } else { strcpy(PlayerInfo[playerid][pNameChange], name, MAX_PLAYER_NAME); if(PlayerInfo[playerid][pFreeNamechange]) { SendClientMessageEx(playerid, COLOR_AQUA, "You have requested a namechange to {00AA00}%s{33CCFF} for free, please wait for admin approval.", name); } else { SendClientMessageEx(playerid, COLOR_AQUA, "You have requested a namechange to {00AA00}%s{33CCFF} for $%i, please wait for admin approval.", name, PlayerInfo[playerid][pLevel] * 7500); } SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is requesting a namechange to %s. (/acceptname %i or /denyname %i)", GetPlayerRPName(playerid), playerid, name, playerid, playerid); } } forward OnPlayerLockFurnitureDoor(playerid, id); public OnPlayerLockFurnitureDoor(playerid, id) { new status = !cache_get_field_content_int(0, "door_locked"); if(status) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s locks the door.", GetPlayerRPName(playerid)); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s unlocks the door.", GetPlayerRPName(playerid)); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE furniture SET door_locked = %i WHERE id = %i", status, id); mysql_tquery(connectionID, queryBuffer); } forward OnPlayerUseFurnitureDoor(playerid, objectid, id); public OnPlayerUseFurnitureDoor(playerid, objectid, id) { if(cache_get_row_int(0, 1)) { SendClientMessage(playerid, COLOR_GREY, "This door is locked."); } else { new status = !cache_get_row_int(0, 0), Float:rx, Float:ry, Float:rz; GetDynamicObjectRot(objectid, rx, ry, rz); if(status) { rz -= 90.0; } else { rz += 90.0; } SetDynamicObjectRot(objectid, rx, ry, rz); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE furniture SET rot_z = '%f', door_opened = %i WHERE id = %i", rz, status, id); mysql_tquery(connectionID, queryBuffer); if(status) SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s opens the door.", GetPlayerRPName(playerid)); else SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s closes the door.", GetPlayerRPName(playerid)); } } forward OnPlayerLockLandDoor(playerid, id); public OnPlayerLockLandDoor(playerid, id) { new status = !cache_get_field_content_int(0, "door_locked"); if(status) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s locks the door.", GetPlayerRPName(playerid)); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s unlocks the door.", GetPlayerRPName(playerid)); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE landobjects SET door_locked = %i WHERE id = %i", status, id); mysql_tquery(connectionID, queryBuffer); } forward OnPlayerUseLandGate(playerid, objectid, id); public OnPlayerUseLandGate(playerid, objectid, id) { if(!Streamer_GetExtraInt(objectid, E_OBJECT_OPENED)) { MoveDynamicObject(objectid, cache_get_field_content_float(0, "move_x"), cache_get_field_content_float(0, "move_y"), cache_get_field_content_float(0, "move_z"), 3.0, cache_get_field_content_float(0, "move_rx"), cache_get_field_content_float(0, "move_ry"), cache_get_field_content_float(0, "move_rz")); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their remote to open the gate.", GetPlayerRPName(playerid)); Streamer_SetExtraInt(objectid, E_OBJECT_OPENED, 1); } else { MoveDynamicObject(objectid, cache_get_field_content_float(0, "pos_x"), cache_get_field_content_float(0, "pos_y"), cache_get_field_content_float(0, "pos_z"), 3.0, cache_get_field_content_float(0, "rot_x"), cache_get_field_content_float(0, "rot_y"), cache_get_field_content_float(0, "rot_z")); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their remote to close the gate.", GetPlayerRPName(playerid)); Streamer_SetExtraInt(objectid, E_OBJECT_OPENED, 0); } } forward OnPlayerUseLandDoor(playerid, objectid, id); public OnPlayerUseLandDoor(playerid, objectid, id) { if(cache_get_row_int(0, 1)) { SendClientMessage(playerid, COLOR_GREY, "This door is locked."); } else { new status = !cache_get_row_int(0, 0), Float:rx, Float:ry, Float:rz; GetDynamicObjectRot(objectid, rx, ry, rz); if(status) { rz -= 90.0; } else { rz += 90.0; } SetDynamicObjectRot(objectid, rx, ry, rz); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE landobjects SET rot_z = '%f', door_opened = %i WHERE id = %i", rz, status, id); mysql_tquery(connectionID, queryBuffer); if(status) SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s opens the door.", GetPlayerRPName(playerid)); else SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s closes the door.", GetPlayerRPName(playerid)); } } forward OnPlayerAddToPhonebook(playerid, number, name[]); public OnPlayerAddToPhonebook(playerid, number, name[]) { if(cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "That number is already in the phonebook."); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO phonebook VALUES('%e', %i)", name, number); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_GREEN, "You have added %s with number %i to the phonebook directory.", name, number); Log_Write("log_faction", "%s (uid: %i) added %s with number %i to the phonebook.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID], name, number); } return 1; } forward OnPlayerRemoveFromPhonebook(playerid, number); public OnPlayerRemoveFromPhonebook(playerid, number) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "That number is not in the phonebook."); } else { new name[MAX_PLAYER_NAME]; cache_get_row(0, 0, name); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM phonebook WHERE number = %i", number); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_GREEN, "You have removed %s with number %i from the phonebook directory.", name, number); Log_Write("log_faction", "%s (uid: %i) removed %s with number %i from the phonebook.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID], name, number); } return 1; } forward OnPlayerListInjuries(playerid, targetid); public OnPlayerListInjuries(playerid, targetid) { new rows = cache_get_row_count(connectionID); if(!rows) { SendClientMessage(playerid, COLOR_GREY, "That player doesn't have any injuries."); } else { SendClientMessageEx(playerid, COLOR_GREEN, "|_____ %s's Injuries _____|", GetPlayerRPName(targetid)); for(new i = 0; i < rows; i ++) { SendClientMessageEx(playerid, COLOR_YELLOW, "[%i seconds ago] %s was shot with a %s", gettime() - cache_get_row_int(i, 1), GetPlayerRPName(targetid), GetWeaponNameEx(cache_get_row_int(i, 0))); } } } forward OnPlayerOfflineKickFaction(playerid, username[]); public OnPlayerOfflineKickFaction(playerid, username[]) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist."); } else if(cache_get_row_int(0, 1) != PlayerInfo[playerid][pFaction]) { SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your faction."); } else if(cache_get_row_int(0, 2) > PlayerInfo[playerid][pFactionRank]) { SendClientMessage(playerid, COLOR_GREY, "That player has a higher rank than you."); } else { new uid = cache_get_row_int(0, 0), factionid = cache_get_row_int(0, 1), rankid = cache_get_row_int(0, 2); Log_Write("log_faction", "%s (uid: %i) offline kicked %s (uid: %i) from %s (id: %i) as rank %s (%i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], username, uid, FactionInfo[factionid][fName], factionid, FactionRanks[factionid][rankid], rankid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET faction = -1, factionrank = 0, division = -1 WHERE uid = %i", uid); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have offline kicked %s from your faction.", username); } } forward OnPlayerOfflineKickGang(playerid, username[]); public OnPlayerOfflineKickGang(playerid, username[]) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist."); } else if(cache_get_row_int(0, 1) != PlayerInfo[playerid][pGang]) { SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your gang."); } else if(cache_get_row_int(0, 2) > PlayerInfo[playerid][pGangRank]) { SendClientMessage(playerid, COLOR_GREY, "That player has a higher rank than you."); } else { new uid = cache_get_row_int(0, 0), gangid = cache_get_row_int(0, 1), rankid = cache_get_row_int(0, 2); Log_Write("log_gang", "%s (uid: %i) offline kicked %s (uid: %i) from %s (id: %i) as rank %s (%i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], username, uid, GangInfo[gangid][gName], gangid, GangRanks[gangid][rankid], rankid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gang = -1, gangrank = 0 WHERE uid = %i", uid); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have offline kicked %s from your gang.", username); } } forward OnPlayerListGangs(playerid, gangid); public OnPlayerListGangs(playerid, gangid) { new color, members = cache_get_row_int(0, 0); if(GangInfo[gangid][gColor] == -1 || GangInfo[gangid][gColor] == -256) { color = 0xC8C8C8FF; } else { color = GangInfo[gangid][gColor]; } SendClientMessageEx(playerid, COLOR_GREY2, "ID: %i | Name: {%06x}%s{C8C8C8} | Leader: %s | Members: %i/%i | Strikes: %i/3", gangid, color >>> 8, GangInfo[gangid][gName], GangInfo[gangid][gLeader], members, GetGangMemberLimit(gangid), GangInfo[gangid][gStrikes]); } forward OnPlayerListFactions(playerid, factionid); public OnPlayerListFactions(playerid, factionid) { new color, members = cache_get_row_int(0, 0); if(FactionInfo[factionid][fColor] == -1 || FactionInfo[factionid][fColor] == -256) { color = 0xC8C8C8FF; } else { color = FactionInfo[factionid][fColor]; } if(FactionInfo[factionid][fType] == FACTION_HITMAN && PlayerInfo[playerid][pAdmin] < 7) { SendClientMessageEx(playerid, COLOR_GREY2, "ID: %i | Name: {%06x}%s{C8C8C8} | Leader: Classified | Members: 0", factionid, color >>> 8, FactionInfo[factionid][fName]); } else { SendClientMessageEx(playerid, COLOR_GREY2, "ID: %i | Name: {%06x}%s{C8C8C8} | Leader: %s | Members: %i", factionid, color >>> 8, FactionInfo[factionid][fName], FactionInfo[factionid][fLeader], members); } } forward OnPlayerBuyPhoneNumber(playerid, number); public OnPlayerBuyPhoneNumber(playerid, number) { if(cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The specified phone number is already taken."); } else { PlayerInfo[playerid][pPhone] = number; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET phone = %i WHERE uid = %i", number, PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, -10000); GameTextForPlayer(playerid, "~r~-$10000", 5000, 1); SendClientMessageEx(playerid, COLOR_WHITE, "** You paid $10000 to change your phone number to %i.", number); Log_Write("log_vip", "%s VIP %s (uid: %i) has purchased phone number: %i for $20000.", GetVIPRank(PlayerInfo[playerid][pVIPPackage]), GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], number); } } forward OnPlayerSpawnVehicle(playerid, parked); public OnPlayerSpawnVehicle(playerid, parked) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The slot specified contains no valid vehicle which you can spawn."); } else { for(new i = 0; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && VehicleInfo[i][vID] == cache_get_field_content_int(0, "id")) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle is spawned already. /findcar to track it."); } } if(GetSpawnedVehicles(playerid) >= MAX_SPAWNED_VEHICLES) { return SendClientMessageEx(playerid, COLOR_GREY, "You can't have more than %i vehicles spawned at a time.", MAX_SPAWNED_VEHICLES); } new modelid = cache_get_field_content_int(0, "modelid"), Float:x = cache_get_field_content_float(0, "pos_x"), Float:y = cache_get_field_content_float(0, "pos_y"), Float:z = cache_get_field_content_float(0, "pos_z"), Float:a = cache_get_field_content_float(0, "pos_a"), color1 = cache_get_field_content_int(0, "color1"), color2 = cache_get_field_content_int(0, "color2"), vehicleid; vehicleid = CreateVehicle(modelid, x, y, z, a, color1, color2, -1); if(vehicleid != INVALID_VEHICLE_ID) { ResetVehicle(vehicleid); cache_get_field_content(0, "owner", VehicleInfo[vehicleid][vOwner], connectionID, MAX_PLAYER_NAME); cache_get_field_content(0, "plate", VehicleInfo[vehicleid][vPlate], connectionID, 32); VehicleInfo[vehicleid][vID] = cache_get_field_content_int(0, "id"); VehicleInfo[vehicleid][vOwnerID] = cache_get_field_content_int(0, "ownerid"); VehicleInfo[vehicleid][vPrice] = cache_get_field_content_int(0, "price"); VehicleInfo[vehicleid][vTickets] = cache_get_field_content_int(0, "tickets"); VehicleInfo[vehicleid][vLocked] = cache_get_field_content_int(0, "locked"); VehicleInfo[vehicleid][vHealth] = cache_get_field_content_float(0, "health"); VehicleInfo[vehicleid][vPaintjob] = cache_get_field_content_int(0, "paintjob"); VehicleInfo[vehicleid][vInterior] = cache_get_field_content_int(0, "interior"); VehicleInfo[vehicleid][vWorld] = cache_get_field_content_int(0, "world"); VehicleInfo[vehicleid][vNeon] = cache_get_field_content_int(0, "neon"); VehicleInfo[vehicleid][vNeonEnabled] = cache_get_field_content_int(0, "neonenabled"); VehicleInfo[vehicleid][vTrunk] = cache_get_field_content_int(0, "trunk"); VehicleInfo[vehicleid][vMods][0] = cache_get_field_content_int(0, "mod_1"); VehicleInfo[vehicleid][vMods][1] = cache_get_field_content_int(0, "mod_2"); VehicleInfo[vehicleid][vMods][2] = cache_get_field_content_int(0, "mod_3"); VehicleInfo[vehicleid][vMods][3] = cache_get_field_content_int(0, "mod_4"); VehicleInfo[vehicleid][vMods][4] = cache_get_field_content_int(0, "mod_5"); VehicleInfo[vehicleid][vMods][5] = cache_get_field_content_int(0, "mod_6"); VehicleInfo[vehicleid][vMods][6] = cache_get_field_content_int(0, "mod_7"); VehicleInfo[vehicleid][vMods][7] = cache_get_field_content_int(0, "mod_8"); VehicleInfo[vehicleid][vMods][8] = cache_get_field_content_int(0, "mod_9"); VehicleInfo[vehicleid][vMods][9] = cache_get_field_content_int(0, "mod_10"); VehicleInfo[vehicleid][vMods][10] = cache_get_field_content_int(0, "mod_11"); VehicleInfo[vehicleid][vMods][11] = cache_get_field_content_int(0, "mod_12"); VehicleInfo[vehicleid][vMods][12] = cache_get_field_content_int(0, "mod_13"); VehicleInfo[vehicleid][vMods][13] = cache_get_field_content_int(0, "mod_14"); VehicleInfo[vehicleid][vCash] = cache_get_field_content_int(0, "cash"); VehicleInfo[vehicleid][vMaterials] = cache_get_field_content_int(0, "materials"); VehicleInfo[vehicleid][vWeed] = cache_get_field_content_int(0, "weed"); VehicleInfo[vehicleid][vCocaine] = cache_get_field_content_int(0, "cocaine"); VehicleInfo[vehicleid][vMeth] = cache_get_field_content_int(0, "meth"); VehicleInfo[vehicleid][vPainkillers] = cache_get_field_content_int(0, "painkillers"); VehicleInfo[vehicleid][vWeapons][0] = cache_get_field_content_int(0, "weapon_1"); VehicleInfo[vehicleid][vWeapons][1] = cache_get_field_content_int(0, "weapon_2"); VehicleInfo[vehicleid][vWeapons][2] = cache_get_field_content_int(0, "weapon_3"); VehicleInfo[vehicleid][vHPAmmo] = cache_get_field_content_int(0, "hpammo"); VehicleInfo[vehicleid][vPoisonAmmo] = cache_get_field_content_int(0, "poisonammo"); VehicleInfo[vehicleid][vFMJAmmo] = cache_get_field_content_int(0, "fmjammo"); VehicleInfo[vehicleid][vGang] = -1; VehicleInfo[vehicleid][vFactionType] = FACTION_NONE; VehicleInfo[vehicleid][vJob] = JOB_NONE; VehicleInfo[vehicleid][vRespawnDelay] = -1; VehicleInfo[vehicleid][vModel] = modelid; VehicleInfo[vehicleid][vPosX] = x; VehicleInfo[vehicleid][vPosY] = y; VehicleInfo[vehicleid][vPosZ] = z; VehicleInfo[vehicleid][vPosA] = a; VehicleInfo[vehicleid][vColor1] = color1; VehicleInfo[vehicleid][vColor2] = color2; VehicleInfo[vehicleid][vObjects][0] = INVALID_OBJECT_ID; VehicleInfo[vehicleid][vObjects][1] = INVALID_OBJECT_ID; VehicleInfo[vehicleid][vTimer] = -1; vehicleFuel[vehicleid] = cache_get_field_content_int(0, "fuel"); adminVehicle{vehicleid} = false; ReloadVehicle(vehicleid); if(!parked) { SendClientMessageEx(playerid, COLOR_AQUA, "You have spawned your {FF6347}%s{33CCFF} which is located in {F7A763}%s{33CCFF}. /findcar to track it.", GetVehicleName(vehicleid), GetVehicleZoneName(vehicleid)); } } } return 1; } forward OnPlayerBuyClothingItem(playerid, name[], price, businessid, clothingid); public OnPlayerBuyClothingItem(playerid, name[], price, businessid, clothingid) { new string[16]; if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } strcpy(ClothingInfo[playerid][clothingid][cName], name, 32); ClothingInfo[playerid][clothingid][cID] = cache_insert_id(connectionID); ClothingInfo[playerid][clothingid][cExists] = 1; ClothingInfo[playerid][clothingid][cAttached] = 0; ClothingInfo[playerid][clothingid][cAttachedIndex] = -1; BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, -price); SendClientMessageEx(playerid, COLOR_AQUA, "%s purchased for {00AA00}$%i{33CCFF}. /clothing to find your new item.", name, price); format(string, sizeof(string), "~r~-$%i", price); GameTextForPlayer(playerid, string, 5000, 1); } forward OnPlayerSendTextMessage(playerid, number, msg[]); public OnPlayerSendTextMessage(playerid, number, msg[]) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The number you're trying to reach does not belong to any particular person."); } else if(cache_get_row_int(0, 1)) { SendClientMessage(playerid, COLOR_GREY, "That player is currently imprisoned and cannot use their phone."); } else if(cache_get_row_int(0, 2)) { SendClientMessage(playerid, COLOR_GREY, "That player has their mobile phone switched off."); } else { new username[MAX_PLAYER_NAME]; cache_get_row(0, 0, username); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO texts VALUES(null, %i, %i, '%s', NOW(), '%e')", PlayerInfo[playerid][pPhone], number, GetPlayerNameEx(playerid), msg); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes out a cellphone and sends a message.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_YELLOW, "** SMS to %s (%i): %s **", username, number, msg); SendClientMessage(playerid, COLOR_WHITE, "** The player who owns the number is offline, but will receive your text when they log in."); GivePlayerCash(playerid, -1); GameTextForPlayer(playerid, "~w~Text sent!~n~~r~-$1", 5000, 1); } } forward OnPlayerRentHouse(playerid, houseid); public OnPlayerRentHouse(playerid, houseid) { if(cache_get_row_int(0, 0) >= GetHouseTenantCapacity(houseid)) { SendClientMessageEx(playerid, COLOR_GREY, "This house has reached its limit of %i tenants.", GetHouseTenantCapacity(houseid)); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET rentinghouse = %i WHERE uid = %i", HouseInfo[houseid][hID], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[playerid][pRentingHouse] = HouseInfo[houseid][hID]; SendClientMessageEx(playerid, COLOR_GREEN, "You are now renting at %s's house. You will pay $%i every paycheck.", HouseInfo[houseid][hOwner], HouseInfo[houseid][hRentPrice]); } } forward OnPlayerEvict(playerid, username[]); public OnPlayerEvict(playerid, username[]) { if(!cache_get_row_count(connectionID)) { return SendClientMessage(playerid, COLOR_GREY, "That player doesn't exist, or is not renting at your home."); } else { foreach(new i : Player) { if(!strcmp(GetPlayerNameEx(i), username) && PlayerInfo[i][pLogged]) { PlayerInfo[i][pRentingHouse] = 0; SendClientMessage(i, COLOR_RED, "You have been evicted from your home by the owner."); } } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET rentinghouse = 0 WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_WHITE, "** You have evicted %s from your property.", username); } return 1; } forward OnListPlayerFlags(playerid, targetid); public OnListPlayerFlags(playerid, targetid) { new rows = cache_get_row_count(connectionID); if(!rows) { SendClientMessage(playerid, COLOR_GREY, "This player has no flags listed under their account."); } else { new flaggedby[24], date[24], desc[128]; SendClientMessageEx(playerid, COLOR_GREEN, "|________ %s's Flags ________|", GetPlayerRPName(targetid)); for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "flaggedby", flaggedby); cache_get_field_content(i, "date", date); cache_get_field_content(i, "description", desc); SendClientMessageEx(playerid, COLOR_GREY2, "[%i][%s] %s (from: %s)", i + 1, date, desc, flaggedby); } } } forward OnVerifyRemoveFlag(playerid, targetid, slot); public OnVerifyRemoveFlag(playerid, targetid, slot) { if(cache_get_row_count(connectionID)) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM flags WHERE id = %i", cache_get_row_int(0, 0)); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_YELLOW, "** %s's flag in slot %i was removed.", GetPlayerRPName(targetid), slot); } else { SendClientMessage(playerid, COLOR_GREY, "That player has no outstanding flag in that slot."); } } forward OnAdminOfflineCheck(playerid, username[]); public OnAdminOfflineCheck(playerid, username[]) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist."); } else { // At first I didn't know how I was going to do this. But then I came up with a plan. // Load everything into an unused player slot, use DisplayStats as normal, then destroy the data. // This ensures that whenever I add a new thing to /stats for instance, I don't have to maintain // two stats functions, I can just call DisplayStats and let the work do itself. PlayerInfo[MAX_PLAYERS][pID] = cache_get_field_content_int(0, "uid"); PlayerInfo[MAX_PLAYERS][pSetup] = cache_get_field_content_int(0, "setup"); PlayerInfo[MAX_PLAYERS][pGender] = cache_get_field_content_int(0, "gender"); PlayerInfo[MAX_PLAYERS][pAge] = cache_get_field_content_int(0, "age"); PlayerInfo[MAX_PLAYERS][pSkin] = cache_get_field_content_int(0, "skin"); PlayerInfo[MAX_PLAYERS][pCameraX] = cache_get_field_content_float(0, "camera_x"); PlayerInfo[MAX_PLAYERS][pCameraY] = cache_get_field_content_float(0, "camera_y"); PlayerInfo[MAX_PLAYERS][pCameraZ] = cache_get_field_content_float(0, "camera_z"); PlayerInfo[MAX_PLAYERS][pPosX] = cache_get_field_content_float(0, "pos_x"); PlayerInfo[MAX_PLAYERS][pPosY] = cache_get_field_content_float(0, "pos_y"); PlayerInfo[MAX_PLAYERS][pPosZ] = cache_get_field_content_float(0, "pos_z"); PlayerInfo[MAX_PLAYERS][pPosA] = cache_get_field_content_float(0, "pos_a"); PlayerInfo[MAX_PLAYERS][pInterior] = cache_get_field_content_int(0, "interior"); PlayerInfo[MAX_PLAYERS][pWorld] = cache_get_field_content_int(0, "world"); PlayerInfo[MAX_PLAYERS][pCash] = cache_get_field_content_int(0, "cash"); PlayerInfo[MAX_PLAYERS][pBank] = cache_get_field_content_int(0, "bank"); PlayerInfo[MAX_PLAYERS][pPaycheck] = cache_get_field_content_int(0, "paycheck"); PlayerInfo[MAX_PLAYERS][pLevel] = cache_get_field_content_int(0, "level"); PlayerInfo[MAX_PLAYERS][pEXP] = cache_get_field_content_int(0, "exp"); PlayerInfo[MAX_PLAYERS][pMinutes] = cache_get_field_content_int(0, "minutes"); PlayerInfo[MAX_PLAYERS][pHours] = cache_get_field_content_int(0, "hours"); PlayerInfo[MAX_PLAYERS][pAdmin] = cache_get_field_content_int(0, "adminlevel"); PlayerInfo[MAX_PLAYERS][pHelper] = cache_get_field_content_int(0, "helperlevel"); PlayerInfo[MAX_PLAYERS][pHealth] = cache_get_field_content_float(0, "health"); PlayerInfo[MAX_PLAYERS][pArmor] = cache_get_field_content_float(0, "armor"); PlayerInfo[MAX_PLAYERS][pUpgradePoints] = cache_get_field_content_int(0, "upgradepoints"); PlayerInfo[MAX_PLAYERS][pWarnings] = cache_get_field_content_int(0, "warnings"); PlayerInfo[MAX_PLAYERS][pInjured] = cache_get_field_content_int(0, "injured"); PlayerInfo[MAX_PLAYERS][pHospital] = cache_get_field_content_int(0, "hospital"); PlayerInfo[MAX_PLAYERS][pSpawnHealth] = cache_get_field_content_float(0, "spawnhealth"); PlayerInfo[MAX_PLAYERS][pSpawnArmor] = cache_get_field_content_float(0, "spawnarmor"); PlayerInfo[MAX_PLAYERS][pJailType] = cache_get_field_content_int(0, "jailtype"); PlayerInfo[MAX_PLAYERS][pJailTime] = cache_get_field_content_int(0, "jailtime"); PlayerInfo[MAX_PLAYERS][pNewbieMuted] = cache_get_field_content_int(0, "newbiemuted"); PlayerInfo[MAX_PLAYERS][pHelpMuted] = cache_get_field_content_int(0, "helpmuted"); PlayerInfo[MAX_PLAYERS][pAdMuted] = cache_get_field_content_int(0, "admuted"); PlayerInfo[MAX_PLAYERS][pLiveMuted] = cache_get_field_content_int(0, "livemuted"); PlayerInfo[MAX_PLAYERS][pGlobalMuted] = cache_get_field_content_int(0, "globalmuted"); PlayerInfo[MAX_PLAYERS][pReportMuted] = cache_get_field_content_int(0, "reportmuted"); PlayerInfo[MAX_PLAYERS][pReportWarns] = cache_get_field_content_int(0, "reportwarns"); PlayerInfo[MAX_PLAYERS][pFightStyle] = cache_get_field_content_int(0, "fightstyle"); PlayerInfo[MAX_PLAYERS][pCookies] = cache_get_field_content_int(0, "cookies"); PlayerInfo[MAX_PLAYERS][pPhone] = cache_get_field_content_int(0, "phone"); PlayerInfo[MAX_PLAYERS][pJob] = cache_get_field_content_int(0, "job"); PlayerInfo[MAX_PLAYERS][pSecondJob] = cache_get_field_content_int(0, "secondjob"); PlayerInfo[MAX_PLAYERS][pCrimes] = cache_get_field_content_int(0, "crimes"); PlayerInfo[MAX_PLAYERS][pArrested] = cache_get_field_content_int(0, "arrested"); PlayerInfo[MAX_PLAYERS][pWantedLevel] = cache_get_field_content_int(0, "wantedlevel"); PlayerInfo[MAX_PLAYERS][pMaterials] = cache_get_field_content_int(0, "materials"); PlayerInfo[MAX_PLAYERS][pWeed] = cache_get_field_content_int(0, "weed"); PlayerInfo[MAX_PLAYERS][pCocaine] = cache_get_field_content_int(0, "cocaine"); PlayerInfo[MAX_PLAYERS][pMeth] = cache_get_field_content_int(0, "meth"); PlayerInfo[MAX_PLAYERS][pPainkillers] = cache_get_field_content_int(0, "painkillers"); PlayerInfo[MAX_PLAYERS][pSeeds] = cache_get_field_content_int(0, "seeds"); PlayerInfo[MAX_PLAYERS][pEphedrine] = cache_get_field_content_int(0, "ephedrine"); PlayerInfo[MAX_PLAYERS][pMuriaticAcid] = cache_get_field_content_int(0, "muriaticacid"); PlayerInfo[MAX_PLAYERS][pBakingSoda] = cache_get_field_content_int(0, "bakingsoda"); PlayerInfo[MAX_PLAYERS][pCigars] = cache_get_field_content_int(0, "cigars"); PlayerInfo[MAX_PLAYERS][pWalkieTalkie] = cache_get_field_content_int(0, "walkietalkie"); PlayerInfo[MAX_PLAYERS][pChannel] = cache_get_field_content_int(0, "channel"); PlayerInfo[MAX_PLAYERS][pRentingHouse] = cache_get_field_content_int(0, "rentinghouse"); PlayerInfo[MAX_PLAYERS][pSpraycans] = cache_get_field_content_int(0, "spraycans"); PlayerInfo[MAX_PLAYERS][pBoombox] = cache_get_field_content_int(0, "boombox"); PlayerInfo[MAX_PLAYERS][pMP3Player] = cache_get_field_content_int(0, "mp3player"); PlayerInfo[MAX_PLAYERS][pPhonebook] = cache_get_field_content_int(0, "phonebook"); PlayerInfo[MAX_PLAYERS][pFishingRod] = cache_get_field_content_int(0, "fishingrod"); PlayerInfo[MAX_PLAYERS][pFishingBait] = cache_get_field_content_int(0, "fishingbait"); PlayerInfo[MAX_PLAYERS][pFishWeight] = cache_get_field_content_int(0, "fishweight"); PlayerInfo[MAX_PLAYERS][pComponents] = cache_get_field_content_int(0, "components"); PlayerInfo[MAX_PLAYERS][pCourierSkill] = cache_get_field_content_int(0, "courierskill"); PlayerInfo[MAX_PLAYERS][pFishingSkill] = cache_get_field_content_int(0, "fishingskill"); PlayerInfo[MAX_PLAYERS][pGuardSkill] = cache_get_field_content_int(0, "guardskill"); PlayerInfo[MAX_PLAYERS][pWeaponSkill] = cache_get_field_content_int(0, "weaponskill"); PlayerInfo[MAX_PLAYERS][pMechanicSkill] = cache_get_field_content_int(0, "mechanicskill"); PlayerInfo[MAX_PLAYERS][pLawyerSkill] = cache_get_field_content_int(0, "lawyerskill"); PlayerInfo[MAX_PLAYERS][pSmugglerSkill] = cache_get_field_content_int(0, "smugglerskill"); PlayerInfo[MAX_PLAYERS][pToggleTextdraws] = cache_get_field_content_int(0, "toggletextdraws"); PlayerInfo[MAX_PLAYERS][pToggleOOC] = cache_get_field_content_int(0, "toggleooc"); PlayerInfo[MAX_PLAYERS][pTogglePhone] = cache_get_field_content_int(0, "togglephone"); PlayerInfo[MAX_PLAYERS][pToggleAdmin] = cache_get_field_content_int(0, "toggleadmin"); PlayerInfo[MAX_PLAYERS][pToggleHelper] = cache_get_field_content_int(0, "togglehelper"); PlayerInfo[MAX_PLAYERS][pToggleNewbie] = cache_get_field_content_int(0, "togglenewbie"); PlayerInfo[MAX_PLAYERS][pToggleWT] = cache_get_field_content_int(0, "togglewt"); PlayerInfo[MAX_PLAYERS][pToggleRadio] = cache_get_field_content_int(0, "toggleradio"); PlayerInfo[MAX_PLAYERS][pToggleVIP] = cache_get_field_content_int(0, "togglevip"); PlayerInfo[MAX_PLAYERS][pToggleMusic] = cache_get_field_content_int(0, "togglemusic"); PlayerInfo[MAX_PLAYERS][pToggleFaction] = cache_get_field_content_int(0, "togglefaction"); PlayerInfo[MAX_PLAYERS][pToggleNews] = cache_get_field_content_int(0, "togglenews"); PlayerInfo[MAX_PLAYERS][pToggleGlobal] = cache_get_field_content_int(0, "toggleglobal"); PlayerInfo[MAX_PLAYERS][pToggleCam] = cache_get_field_content_int(0, "togglecam"); PlayerInfo[MAX_PLAYERS][pToggleHUD] = cache_get_field_content_int(0, "togglehud"); PlayerInfo[MAX_PLAYERS][pCarLicense] = cache_get_field_content_int(0, "carlicense"); PlayerInfo[MAX_PLAYERS][pVIPPackage] = cache_get_field_content_int(0, "vippackage"); PlayerInfo[MAX_PLAYERS][pVIPTime] = cache_get_field_content_int(0, "viptime"); PlayerInfo[MAX_PLAYERS][pVIPCooldown] = cache_get_field_content_int(0, "vipcooldown"); PlayerInfo[MAX_PLAYERS][pWeapons][0] = cache_get_field_content_int(0, "weapon_0"); PlayerInfo[MAX_PLAYERS][pWeapons][1] = cache_get_field_content_int(0, "weapon_1"); PlayerInfo[MAX_PLAYERS][pWeapons][2] = cache_get_field_content_int(0, "weapon_2"); PlayerInfo[MAX_PLAYERS][pWeapons][3] = cache_get_field_content_int(0, "weapon_3"); PlayerInfo[MAX_PLAYERS][pWeapons][4] = cache_get_field_content_int(0, "weapon_4"); PlayerInfo[MAX_PLAYERS][pWeapons][5] = cache_get_field_content_int(0, "weapon_5"); PlayerInfo[MAX_PLAYERS][pWeapons][6] = cache_get_field_content_int(0, "weapon_6"); PlayerInfo[MAX_PLAYERS][pWeapons][7] = cache_get_field_content_int(0, "weapon_7"); PlayerInfo[MAX_PLAYERS][pWeapons][8] = cache_get_field_content_int(0, "weapon_8"); PlayerInfo[MAX_PLAYERS][pWeapons][9] = cache_get_field_content_int(0, "weapon_9"); PlayerInfo[MAX_PLAYERS][pWeapons][10] = cache_get_field_content_int(0, "weapon_10"); PlayerInfo[MAX_PLAYERS][pWeapons][11] = cache_get_field_content_int(0, "weapon_11"); PlayerInfo[MAX_PLAYERS][pWeapons][12] = cache_get_field_content_int(0, "weapon_12"); PlayerInfo[MAX_PLAYERS][pFaction] = cache_get_field_content_int(0, "faction"); PlayerInfo[MAX_PLAYERS][pFactionRank] = cache_get_field_content_int(0, "factionrank"); PlayerInfo[MAX_PLAYERS][pGang] = cache_get_field_content_int(0, "gang"); PlayerInfo[MAX_PLAYERS][pGangRank] = cache_get_field_content_int(0, "gangrank"); PlayerInfo[MAX_PLAYERS][pDivision] = cache_get_field_content_int(0, "division"); PlayerInfo[MAX_PLAYERS][pContracted] = cache_get_field_content_int(0, "contracted"); PlayerInfo[MAX_PLAYERS][pBombs] = cache_get_field_content_int(0, "bombs"); PlayerInfo[MAX_PLAYERS][pCompletedHits] = cache_get_field_content_int(0, "completedhits"); PlayerInfo[MAX_PLAYERS][pFailedHits] = cache_get_field_content_int(0, "failedhits"); PlayerInfo[MAX_PLAYERS][pReports] = cache_get_field_content_int(0, "reports"); PlayerInfo[MAX_PLAYERS][pHelpRequests] = cache_get_field_content_int(0, "helprequests"); PlayerInfo[MAX_PLAYERS][pSpeedometer] = cache_get_field_content_int(0, "speedometer"); PlayerInfo[MAX_PLAYERS][pFactionMod] = cache_get_field_content_int(0, "factionmod"); PlayerInfo[MAX_PLAYERS][pGangMod] = cache_get_field_content_int(0, "gangmod"); PlayerInfo[MAX_PLAYERS][pBanAppealer] = cache_get_field_content_int(0, "banappealer"); PlayerInfo[MAX_PLAYERS][pWeedPlanted] = cache_get_field_content_int(0, "weedplanted"); PlayerInfo[MAX_PLAYERS][pWeedTime] = cache_get_field_content_int(0, "weedtime"); PlayerInfo[MAX_PLAYERS][pWeedGrams] = cache_get_field_content_int(0, "weedgrams"); PlayerInfo[MAX_PLAYERS][pWeedX] = cache_get_field_content_float(0, "weed_x"); PlayerInfo[MAX_PLAYERS][pWeedY] = cache_get_field_content_float(0, "weed_y"); PlayerInfo[MAX_PLAYERS][pWeedZ] = cache_get_field_content_float(0, "weed_z"); PlayerInfo[MAX_PLAYERS][pWeedA] = cache_get_field_content_float(0, "weed_a"); PlayerInfo[MAX_PLAYERS][pInventoryUpgrade] = cache_get_field_content_int(0, "inventoryupgrade"); PlayerInfo[MAX_PLAYERS][pAddictUpgrade] = cache_get_field_content_int(0, "addictupgrade"); PlayerInfo[MAX_PLAYERS][pTraderUpgrade] = cache_get_field_content_int(0, "traderupgrade"); PlayerInfo[MAX_PLAYERS][pAssetUpgrade] = cache_get_field_content_int(0, "assetupgrade"); PlayerInfo[MAX_PLAYERS][pHPAmmo] = cache_get_field_content_int(0, "hpammo"); PlayerInfo[MAX_PLAYERS][pPoisonAmmo] = cache_get_field_content_int(0, "poisonammo"); PlayerInfo[MAX_PLAYERS][pFMJAmmo] = cache_get_field_content_int(0, "fmjammo"); PlayerInfo[MAX_PLAYERS][pAmmoType] = cache_get_field_content_int(0, "ammotype"); PlayerInfo[MAX_PLAYERS][pAmmoWeapon] = cache_get_field_content_int(0, "ammoweapon"); PlayerInfo[MAX_PLAYERS][pDMWarnings] = cache_get_field_content_int(0, "dmwarnings"); PlayerInfo[MAX_PLAYERS][pWeaponRestricted] = cache_get_field_content_int(0, "weaponrestricted"); PlayerInfo[MAX_PLAYERS][pReferralUID] = cache_get_field_content_int(0, "referral_uid"); PlayerInfo[MAX_PLAYERS][pWatch] = cache_get_field_content_int(0, "watch"); PlayerInfo[MAX_PLAYERS][pGPS] = cache_get_field_content_int(0, "gps"); strcpy(PlayerInfo[MAX_PLAYERS][pUsername], username, MAX_PLAYER_NAME); DisplayStats(MAX_PLAYERS, playerid); } } forward OnAdminOfflineFlag(playerid, username[], desc[]); public OnAdminOfflineFlag(playerid, username[], desc[]) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist."); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, '%s', NOW(), '%e')", cache_get_field_content_int(0, "uid"), GetPlayerNameEx(playerid), desc); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s offline flagged %s's account for '%s'.", GetPlayerRPName(playerid), username, desc); } } forward OnAdminCheckBanHistory(playerid, username[]); public OnAdminCheckBanHistory(playerid, username[]) { new rows = cache_get_row_count(connectionID); if(!rows) { SendClientMessage(playerid, COLOR_GREY, "This player has no ban history recorded."); } else { new date[24], description[255]; for(new i = 0; i < rows; i ++) { cache_get_row(i, 0, date); cache_get_row(i, 1, description); SendClientMessageEx(playerid, COLOR_LIGHTRED, "[%s] %s", date, description); } } } forward OnAdminCheckLastActive(playerid, username[]); public OnAdminCheckLastActive(playerid, username[]) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist."); } else { new date[40]; cache_get_row(0, 0, date); SendClientMessageEx(playerid, COLOR_GREEN, "%s last logged in on the %s (server time).", username, date); } } forward OnAdminSetHelperLevel(playerid, username[], level); public OnAdminSetHelperLevel(playerid, username[], level) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist."); } else if((PlayerInfo[playerid][pAdmin] < 6) && cache_get_row_int(0, 0) > PlayerInfo[playerid][pHelper] && level < cache_get_row_int(0, 0)) { SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher helper level than you. They cannot be demoted."); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET helperlevel = %i WHERE username = '%e'", level, username); mysql_tquery(connectionID, queryBuffer); SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s has offline set %s's helper level to %i.", GetPlayerRPName(playerid), username, level); Log_Write("log_admin", "%s (uid: %i) has offline set %s's helper level to %i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], username, level); } } forward OnAdminSetAdminLevel(playerid, username[], level); public OnAdminSetAdminLevel(playerid, username[], level) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist."); } else if(cache_get_row_int(0, 0) > PlayerInfo[playerid][pAdmin] && level < cache_get_row_int(0, 0)) { SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be demoted."); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET adminlevel = %i WHERE username = '%e'", level, username); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has offline set %s's admin level to %i.", GetPlayerRPName(playerid), username, level); Log_Write("log_admin", "%s (uid: %i) has offline set %s's admin level to %i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], username, level); } } forward OnAdminCreateTurf(playerid, turfid, name[], type, Float:minx, Float:miny, Float:maxx, Float:maxy, Float:height); public OnAdminCreateTurf(playerid, turfid, name[], type, Float:minx, Float:miny, Float:maxx, Float:maxy, Float:height) { strcpy(TurfInfo[turfid][tName], name, 32); strcpy(TurfInfo[turfid][tCapturedBy], "No-one", MAX_PLAYER_NAME); TurfInfo[turfid][tExists] = 1; TurfInfo[turfid][tCapturedGang] = -1; TurfInfo[turfid][tTime] = 12; TurfInfo[turfid][tType] = type; TurfInfo[turfid][tMinX] = minx; TurfInfo[turfid][tMinY] = miny; TurfInfo[turfid][tMaxX] = maxx; TurfInfo[turfid][tMaxY] = maxy; TurfInfo[turfid][tHeight] = height; TurfInfo[turfid][tGangZone] = -1; TurfInfo[turfid][tArea] = -1; TurfInfo[turfid][tCaptureTime] = 0; TurfInfo[turfid][tCapturer] = INVALID_PLAYER_ID; ReloadTurf(turfid); SendClientMessageEx(playerid, COLOR_GREEN, "** Turf %i created successfully.", turfid); } forward OnAdminCreateLand(playerid, landid, price, Float:minx, Float:miny, Float:maxx, Float:maxy, Float:height); public OnAdminCreateLand(playerid, landid, price, Float:minx, Float:miny, Float:maxx, Float:maxy, Float:height) { strcpy(LandInfo[landid][lOwner], "Nobody", MAX_PLAYER_NAME); LandInfo[landid][lExists] = 1; LandInfo[landid][lID] = cache_insert_id(connectionID); LandInfo[landid][lOwnerID] = 0; LandInfo[landid][lPrice] = price; LandInfo[landid][lMinX] = minx; LandInfo[landid][lMinY] = miny; LandInfo[landid][lMaxX] = maxx; LandInfo[landid][lMaxY] = maxy; LandInfo[landid][lHeight] = height; LandInfo[landid][lGangZone] = -1; LandInfo[landid][lArea] = -1; ReloadLand(landid); SendClientMessageEx(playerid, COLOR_GREEN, "** Land %i created successfully.", landid); } forward OnAdminCreateEntrance(playerid, entranceid, name[], Float:x, Float:y, Float:z, Float:angle); public OnAdminCreateEntrance(playerid, entranceid, name[], Float:x, Float:y, Float:z, Float:angle) { strcpy(EntranceInfo[entranceid][eOwner], "Nobody", MAX_PLAYER_NAME); strcpy(EntranceInfo[entranceid][eName], name, 40); strcpy(EntranceInfo[entranceid][ePassword], "None", 64); EntranceInfo[entranceid][eExists] = 1; EntranceInfo[entranceid][eID] = cache_insert_id(connectionID); EntranceInfo[entranceid][eOwnerID] = 0; EntranceInfo[entranceid][eIcon] = 1239; EntranceInfo[entranceid][eLocked] = 0; EntranceInfo[entranceid][eRadius] = 3.0; EntranceInfo[entranceid][ePosX] = x; EntranceInfo[entranceid][ePosY] = y; EntranceInfo[entranceid][ePosZ] = z; EntranceInfo[entranceid][ePosA] = angle; EntranceInfo[entranceid][eIntX] = 0.0; EntranceInfo[entranceid][eIntY] = 0.0; EntranceInfo[entranceid][eIntZ] = 0.0; EntranceInfo[entranceid][eIntA] = 0.0; EntranceInfo[entranceid][eInterior] = 0; EntranceInfo[entranceid][eWorld] = EntranceInfo[entranceid][eID] + 4000000; EntranceInfo[entranceid][eOutsideInt] = GetPlayerInterior(playerid); EntranceInfo[entranceid][eOutsideVW] = GetPlayerVirtualWorld(playerid); EntranceInfo[entranceid][eAdminLevel] = 0; EntranceInfo[entranceid][eFactionType] = FACTION_NONE; EntranceInfo[entranceid][eVIP] = 0; EntranceInfo[entranceid][eVehicles] = 0; EntranceInfo[entranceid][eFreeze] = 0; EntranceInfo[entranceid][eLabel] = 1; EntranceInfo[entranceid][eText] = Text3D:INVALID_3DTEXT_ID; EntranceInfo[entranceid][ePickup] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET world = %i WHERE id = %i", EntranceInfo[entranceid][eWorld], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); SendClientMessageEx(playerid, COLOR_GREEN, "** Entrance %i created successfully.", entranceid); } forward OnAdminCreateBusiness(playerid, businessid, type, Float:x, Float:y, Float:z, Float:angle); public OnAdminCreateBusiness(playerid, businessid, type, Float:x, Float:y, Float:z, Float:angle) { strcpy(BusinessInfo[businessid][bOwner], "Nobody", MAX_PLAYER_NAME); BusinessInfo[businessid][bExists] = 1; BusinessInfo[businessid][bID] = cache_insert_id(connectionID); BusinessInfo[businessid][bOwnerID] = 0; BusinessInfo[businessid][bType] = type; BusinessInfo[businessid][bPrice] = bizInteriors[type][intPrice]; BusinessInfo[businessid][bEntryFee] = 0; BusinessInfo[businessid][bLocked] = 0; BusinessInfo[businessid][bPosX] = x; BusinessInfo[businessid][bPosY] = y; BusinessInfo[businessid][bPosZ] = z; BusinessInfo[businessid][bPosA] = angle; BusinessInfo[businessid][bIntX] = bizInteriors[type][intX]; BusinessInfo[businessid][bIntY] = bizInteriors[type][intY]; BusinessInfo[businessid][bIntZ] = bizInteriors[type][intZ]; BusinessInfo[businessid][bIntA] = bizInteriors[type][intA]; BusinessInfo[businessid][bInterior] = bizInteriors[type][intID]; BusinessInfo[businessid][bWorld] = BusinessInfo[businessid][bID] + 3000000; BusinessInfo[businessid][bOutsideInt] = GetPlayerInterior(playerid); BusinessInfo[businessid][bOutsideVW] = GetPlayerVirtualWorld(playerid); BusinessInfo[businessid][bCash] = 0; BusinessInfo[businessid][bProducts] = 500; BusinessInfo[businessid][bText] = Text3D:INVALID_3DTEXT_ID; BusinessInfo[businessid][bPickup] = -1; BusinessInfo[businessid][bMapIcon] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET world = %i WHERE id = %i", BusinessInfo[businessid][bWorld], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); ReloadBusiness(businessid); SendClientMessageEx(playerid, COLOR_GREEN, "** Business %i created successfully.", businessid); } forward OnAdminCreateGarage(playerid, garageid, type, Float:x, Float:y, Float:z, Float:angle); public OnAdminCreateGarage(playerid, garageid, type, Float:x, Float:y, Float:z, Float:angle) { strcpy(GarageInfo[garageid][gOwner], "Nobody", MAX_PLAYER_NAME); GarageInfo[garageid][gExists] = 1; GarageInfo[garageid][gID] = cache_insert_id(connectionID); GarageInfo[garageid][gOwnerID] = 0; GarageInfo[garageid][gType] = type; GarageInfo[garageid][gPrice] = garageInteriors[type][intPrice]; GarageInfo[garageid][gLocked] = 0; GarageInfo[garageid][gPosX] = x; GarageInfo[garageid][gPosY] = y; GarageInfo[garageid][gPosZ] = z; GarageInfo[garageid][gPosA] = angle; GarageInfo[garageid][gExitX] = x - 3.0 * floatsin(-angle, degrees); GarageInfo[garageid][gExitY] = y - 3.0 * floatsin(-angle, degrees); GarageInfo[garageid][gExitZ] = z; GarageInfo[garageid][gExitA] = angle - 180.0; GarageInfo[garageid][gWorld] = GarageInfo[garageid][gID] + 2000000; GarageInfo[garageid][gText] = Text3D:INVALID_3DTEXT_ID; GarageInfo[garageid][gPickup] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET world = %i WHERE id = %i", GarageInfo[garageid][gWorld], GarageInfo[garageid][gID]); mysql_tquery(connectionID, queryBuffer); ReloadGarage(garageid); SendClientMessageEx(playerid, COLOR_GREEN, "** Garage %i created successfully.", garageid); } forward OnAdminCreateHouse(playerid, houseid, type, Float:x, Float:y, Float:z, Float:angle); public OnAdminCreateHouse(playerid, houseid, type, Float:x, Float:y, Float:z, Float:angle) { strcpy(HouseInfo[houseid][hOwner], "Nobody", MAX_PLAYER_NAME); HouseInfo[houseid][hExists] = 1; HouseInfo[houseid][hID] = cache_insert_id(connectionID); HouseInfo[houseid][hOwnerID] = 0; HouseInfo[houseid][hType] = type; HouseInfo[houseid][hPrice] = houseInteriors[type][intPrice]; HouseInfo[houseid][hRentPrice] = 0; HouseInfo[houseid][hLevel] = 1; HouseInfo[houseid][hLocked] = 0; HouseInfo[houseid][hPosX] = x; HouseInfo[houseid][hPosY] = y; HouseInfo[houseid][hPosZ] = z; HouseInfo[houseid][hPosA] = angle; HouseInfo[houseid][hIntX] = houseInteriors[type][intX]; HouseInfo[houseid][hIntY] = houseInteriors[type][intY]; HouseInfo[houseid][hIntZ] = houseInteriors[type][intZ]; HouseInfo[houseid][hIntA] = houseInteriors[type][intA]; HouseInfo[houseid][hInterior] = houseInteriors[type][intID]; HouseInfo[houseid][hWorld] = HouseInfo[houseid][hID] + 1000000; HouseInfo[houseid][hOutsideInt] = GetPlayerInterior(playerid); HouseInfo[houseid][hOutsideVW] = GetPlayerVirtualWorld(playerid); HouseInfo[houseid][hCash] = 0; HouseInfo[houseid][hMaterials] = 0; HouseInfo[houseid][hWeed] = 0; HouseInfo[houseid][hCocaine] = 0; HouseInfo[houseid][hMeth] = 0; HouseInfo[houseid][hPainkillers] = 0; HouseInfo[houseid][hHPAmmo] = 0; HouseInfo[houseid][hPoisonAmmo] = 0; HouseInfo[houseid][hFMJAmmo] = 0; HouseInfo[houseid][hLabels] = 0; HouseInfo[houseid][hText] = Text3D:INVALID_3DTEXT_ID; HouseInfo[houseid][hPickup] = -1; for(new i = 0; i < 10; i ++) { HouseInfo[houseid][hWeapons][i] = 0; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET world = %i WHERE id = %i", HouseInfo[houseid][hWorld], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); ReloadHouse(houseid); SendClientMessageEx(playerid, COLOR_GREEN, "** House %i created successfully.", houseid); } forward OnAdminDeleteAccount(playerid, username[]); public OnAdminDeleteAccount(playerid, username[]) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist."); } else if(cache_get_row_int(0, 0) > PlayerInfo[playerid][pAdmin]) { SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. You cannot delete them."); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM users WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has deleted %s's account.", GetPlayerNameEx(playerid), username); } } forward OnAdminListKills(playerid, targetid); public OnAdminListKills(playerid, targetid) { new rows = cache_get_row_count(connectionID); if(!rows) { SendClientMessage(playerid, COLOR_GREY, "That player hasn't killed, or has been killed, by anyone since they registered."); } else { new date[24], killer[24], target[24], reason[24]; SendClientMessage(playerid, COLOR_GREEN, "|_______ Kills & Deaths _______|"); for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "date", date); cache_get_field_content(i, "killer", killer); cache_get_field_content(i, "target", target); cache_get_field_content(i, "reason", reason); if(cache_get_field_content_int(i, "killer_uid") == PlayerInfo[targetid][pID]) { SendClientMessageEx(playerid, COLOR_YELLOW, "[%s] %s killed %s (%s)", date, killer, target, reason); } else if(cache_get_field_content_int(i, "target_uid") == PlayerInfo[targetid][pID]) { SendClientMessageEx(playerid, COLOR_YELLOW, "[%s] %s was killed by %s (%s)", date, target, killer, reason); } } } } forward OnAdminListDamages(playerid, targetid); public OnAdminListDamages(playerid, targetid) { new rows = cache_get_row_count(connectionID); if(!rows) { SendClientMessage(playerid, COLOR_GREY, "That player hasn't been damaged by anyone since they connected."); } else { SendClientMessage(playerid, COLOR_GREEN, "|__________ Damage Received __________|"); for(new i = 0; i < rows; i ++) { SendClientMessageEx(playerid, COLOR_YELLOW, "[%i seconds ago] %s was shot by %s with a %s", gettime() - cache_get_row_int(i, 2), GetPlayerRPName(targetid), GetPlayerRPName(cache_get_row_int(1, 1)), GetWeaponNameEx(cache_get_row_int(i, 0))); //SendClientMessageEx(playerid, COLOR_GREY2, "(Weapon: %s) - (From: %s) - (Time: %i seconds ago)", GetWeaponNameEx(cache_get_row_int(i, 0)), GetPlayerRPName(cache_get_row_int(i, 1)), gettime() - cache_get_row_int(i, 2)); } } } forward OnAdminListShots(playerid, targetid); public OnAdminListShots(playerid, targetid) { new rows = cache_get_row_count(connectionID); if(!rows) { SendClientMessage(playerid, COLOR_GREY, "That player hasn't registered any shots since they connected."); } else { new weaponid, hittype, timestamp, hit[48]; SendClientMessageEx(playerid, COLOR_GREEN, "|__________ %i Last Shots __________|", rows); for(new i = 0; i < rows; i ++) { weaponid = cache_get_field_content_int(i, "weaponid"); hittype = cache_get_field_content_int(i, "hittype"); timestamp = cache_get_field_content_int(i, "timestamp"); switch(hittype) { case BULLET_HIT_TYPE_PLAYER: cache_get_field_content(i, "hitplayer", hit); case BULLET_HIT_TYPE_VEHICLE: format(hit, sizeof(hit), "Vehicle (ID %i)", cache_get_field_content_int(i, "hitid")); default: hit = "Missed"; } SendClientMessageEx(playerid, COLOR_YELLOW, "[%i seconds ago] %s shot a %s and hit: %s", gettime() - timestamp, GetPlayerRPName(targetid), GetWeaponNameEx(weaponid), hit); } } } forward OnAdminBanIP(playerid, ip[], reason[]); public OnAdminBanIP(playerid, ip[], reason[]) { if(cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "This IP address is already banned."); } else { foreach(new i : Player) { if(!strcmp(GetPlayerIP(i), ip)) { SendClientMessageEx(i, COLOR_YELLOW, "** Your IP address has been banned by %s, reason: %s", GetPlayerRPName(playerid), reason); KickPlayer(i); } } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO bans VALUES(null, 'n/a', '%s', '%s', NOW(), '%s', 0)", ip, GetPlayerNameEx(playerid), reason); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has banned IP '%s', reason: %s", GetPlayerRPName(playerid), ip, reason); Log_Write("log_punishments", "%s (uid: %i) has banned IP: %s, reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], ip, reason); } } forward OnAdminCheckBan(playerid, string[]); public OnAdminCheckBan(playerid, string[]) { new bannedby[MAX_PLAYER_NAME], username[MAX_PLAYER_NAME], ip[16], date[24], reason[128]; if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "There are no bans that match your criteria."); } else { cache_get_field_content(0, "bannedby", bannedby); cache_get_field_content(0, "username", username); cache_get_field_content(0, "ip", ip); cache_get_field_content(0, "date", date); cache_get_field_content(0, "reason", reason); if(!strcmp(username, "n/a", true)) { if(strfind(ip, "*", true) != -1) { SendClientMessageEx(playerid, COLOR_LIGHTRED, "[%s] IP address '%s' was rangebanned by %s, reason: %s", date, ip, bannedby, reason); } else { SendClientMessageEx(playerid, COLOR_LIGHTRED, "[%s] IP address '%s' was banned by %s, reason: %s", date, ip, bannedby, reason); } } else { if(strfind(ip, "*", true) != -1) { SendClientMessageEx(playerid, COLOR_LIGHTRED, "[%s] %s (IP: %s) was rangebanned by %s, reason: %s", date, username, ip, bannedby, reason); } else if(cache_get_field_content_int(0, "permanent")) { SendClientMessageEx(playerid, COLOR_LIGHTRED, "[%s] %s (IP: %s) was permanently banned by %s, reason: %s", date, username, ip, bannedby, reason); } else { SendClientMessageEx(playerid, COLOR_LIGHTRED, "[%s] %s (IP: %s) was banned by %s, reason: %s", date, username, ip, bannedby, reason); } } } } forward OnAdminUnbanUser(playerid, username[]); public OnAdminUnbanUser(playerid, username[]) { if(cache_get_row_count(connectionID)) { if(cache_get_row_int(0, 1) && PlayerInfo[playerid][pAdmin] < 7) { return SendClientMessage(playerid, COLOR_GREY, "This player is permanently banned. Permabans may only be lifted by management."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM bans WHERE id = %i", cache_get_row_int(0, 0)); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has unbanned %s.", GetPlayerRPName(playerid), username); Log_Write("log_punishments", "%s (uid: %i) has unbanned %s.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], username); } else { SendClientMessage(playerid, COLOR_GREY, "There is no banned player known by that name."); } return 1; } forward OnAdminLockAccount(playerid, username[]); public OnAdminLockAccount(playerid, username[]) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist."); } else if(cache_get_row_int(0, 0)) { SendClientMessage(playerid, COLOR_GREY, "This player's account is already locked. /unlockaccount to unlock it."); } else if(cache_get_row_int(0, 1) > PlayerInfo[playerid][pAdmin]) { SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be locked."); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET locked = 1 WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has locked %s's account.", GetPlayerRPName(playerid), username); Log_Write("log_admin", "%s (uid: %i) locked %s's account.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], username); } } forward OnAdminUnlockAccount(playerid, username[]); public OnAdminUnlockAccount(playerid, username[]) { if(!cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The player specified doesn't exist, or their account is not locked."); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET locked = 0 WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has unlocked %s's account.", GetPlayerRPName(playerid), username); Log_Write("log_admin", "%s (uid: %i) unlocked %s's account.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], username); } } forward OnAdminChangeName(playerid, targetid, name[]); public OnAdminChangeName(playerid, targetid, name[]) { if(cache_get_row_count(connectionID)) { SendClientMessage(playerid, COLOR_GREY, "The name specified is taken already."); } else { Log_Write("log_admin", "%s (uid: %i) changed %s's (uid: %i) name to %s.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], name); Log_Write("log_namechanges", "%s (uid: %i) changed %s's (uid: %i) name to %s.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], name); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has changed %s's name to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), name); SendClientMessageEx(targetid, COLOR_WHITE, "** %s changed your name from %s to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), name); Namechange(targetid, GetPlayerNameEx(targetid), name); } } forward OnAdminOfflineBan(playerid, username[], reason[]); public OnAdminOfflineBan(playerid, username[], reason[]) { if(cache_get_row_count(connectionID)) { if(cache_get_row_int(0, 0) > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be banned."); } new ip[16]; cache_get_row(0, 1, ip); AddBan(username, ip, GetPlayerNameEx(playerid), reason); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO log_bans VALUES(null, %i, NOW(), '%s (IP: %s) was banned by %s, reason: %e')", cache_get_field_content_int(0, "uid"), username, ip, GetPlayerNameEx(playerid), reason); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was offline banned by %s, reason: %s", username, GetPlayerNameEx(playerid), reason); Log_Write("log_punishments", "%s (uid: %i) offline banned %s, reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], username, reason); } return 1; } forward OnAdminOfflinePrison(playerid, username[], minutes, reason[]); public OnAdminOfflinePrison(playerid, username[], minutes, reason[]) { if(cache_get_row_count(connectionID)) { if(cache_get_row_int(0, 0) > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be prisoned."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET jailtype = 2, jailtime = %i, prisonedby = '%e', prisonreason = '%e' WHERE username = '%e'", minutes * 60, GetPlayerNameEx(playerid), reason, username); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was offline prisoned for %i minutes by %s, reason: %s", username, minutes, GetPlayerRPName(playerid), reason); Log_Write("log_punishments", "%s (uid: %i) offline prisoned %s for %i minutes, reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], username, minutes, reason); } else { SendClientMessage(playerid, COLOR_GREY, "That player is not registered."); } return 1; } forward OnAdminOfflineFine(playerid, username[], amount, reason[]); public OnAdminOfflineFine(playerid, username[], amount, reason[]) { if(cache_get_row_count(connectionID)) { if(cache_get_row_int(0, 0) > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be fined."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cash = cash - %i WHERE username = '%e'", amount, username); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was offline fined for $%i by %s, reason: %s", username, amount, GetPlayerRPName(playerid), reason); Log_Write("log_admin", "%s (uid: %i) offline fined %s for $%i, reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], username, amount, reason); } else { SendClientMessage(playerid, COLOR_GREY, "That player is not registered."); } return 1; } public OnQueryError(errorid, error[], callback[], query[], connectionHandle) { new File:file = fopen("mysql_error.txt", io_append); if(file) { new string[2048]; format(string, sizeof(string), "[%s]\r\nError ID: %i\r\nCallback: %s\r\nQuery: %s\r\nError: %s\r\n\r\n", GetDate(), errorid, callback, query, error); fwrite(file, string); fclose(file); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: A MySQL error occurred (error %i). Details written to mysql_error.txt.", errorid); return 1; } forward OnQueryFinished(threadid, extraid); public OnQueryFinished(threadid, extraid) { new rows = cache_get_row_count(connectionID); switch(threadid) { case THREAD_LOOKUP_BANS: { if(rows) { new bannedby[24], date[24], reason[128]; cache_get_field_content(0, "bannedby", bannedby); cache_get_field_content(0, "date", date); cache_get_field_content(0, "reason", reason); GameTextForPlayer(extraid, "~r~You are banned!", 999999, 3); if(cache_get_field_content_int(0, "permanent")) SendClientMessageEx(extraid, COLOR_YELLOW, "You are permanently banned from this server."); else SendClientMessageEx(extraid, COLOR_YELLOW, "You are banned from this server. You can appeal your ban at www.limitlessrp.com."); SendClientMessageEx(extraid, COLOR_LIGHTRED, "Admin: %s", bannedby); SendClientMessageEx(extraid, COLOR_LIGHTRED, "Date: %s", date); SendClientMessageEx(extraid, COLOR_LIGHTRED, "Reason: %s", reason); KickPlayer(extraid); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM users WHERE username = '%s'", GetPlayerNameEx(extraid)); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOOKUP_ACCOUNT, extraid); } } case THREAD_LOOKUP_ACCOUNT: { if(rows) { #if defined SERVER_INTRO PlayAudioStreamForPlayer(extraid, "http://limitlessrp.com/music/blow.mp3"); // josh SetTimerEx("ShowMainMenuCamera", 400, false, "ii", extraid, 0); #endif ShowDialogToPlayer(extraid, DIALOG_LOGIN); } else { if(strfind(GetPlayerNameEx(extraid), "_") == -1) { SendClientMessage(extraid, COLOR_LIGHTRED, "Please reconnect with a proper roleplay name in the Firstname_Lastname format."); KickPlayer(extraid); } else { #if defined SERVER_INTRO ShowServerIntro(extraid); #else ShowDialogToPlayer(extraid, DIALOG_REGISTER); #endif } } } case THREAD_ACCOUNT_REGISTER: { new id = cache_insert_id(connectionID); if(id) { /*mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM users WHERE uid = %i", id); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_PROCESS_LOGIN, extraid);*/ mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM users WHERE uid = %i", id); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_PROCESS_LOGIN, extraid); } } case THREAD_PROCESS_LOGIN: { if(!rows) { PlayerInfo[extraid][pLoginTries]++; if(PlayerInfo[extraid][pLoginTries] < 3) { ShowDialogToPlayer(extraid, DIALOG_LOGIN); SendClientMessageEx(extraid, COLOR_LIGHTRED, "Incorrect password. You have %i more attempts before you are kicked.", 3 - PlayerInfo[extraid][pLoginTries]); } else { Kick(extraid); } } else if(cache_get_field_content_int(0, "locked")) { SendClientMessage(extraid, COLOR_LIGHTRED, "** This account is currently locked. Contact an administrator to unlock your account."); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s tried to login with a locked account.", GetPlayerRPName(extraid)); KickPlayer(extraid); } else { new date[64], string[64]; cache_get_field_content(0, "login_date", date); cache_get_field_content(0, "accent", PlayerInfo[extraid][pAccent], connectionID, 16); cache_get_field_content(0, "adminname", PlayerInfo[extraid][pAdminName], connectionID, MAX_PLAYER_NAME); cache_get_field_content(0, "contractby", PlayerInfo[extraid][pContractBy], connectionID, MAX_PLAYER_NAME); cache_get_field_content(0, "prisonedby", PlayerInfo[extraid][pPrisonedBy], connectionID, MAX_PLAYER_NAME); cache_get_field_content(0, "prisonreason", PlayerInfo[extraid][pPrisonReason], connectionID, 128); PlayerInfo[extraid][pID] = cache_get_field_content_int(0, "uid"); PlayerInfo[extraid][pSetup] = cache_get_field_content_int(0, "setup"); PlayerInfo[extraid][pGender] = cache_get_field_content_int(0, "gender"); PlayerInfo[extraid][pAge] = cache_get_field_content_int(0, "age"); PlayerInfo[extraid][pSkin] = cache_get_field_content_int(0, "skin"); PlayerInfo[extraid][pCameraX] = cache_get_field_content_float(0, "camera_x"); PlayerInfo[extraid][pCameraY] = cache_get_field_content_float(0, "camera_y"); PlayerInfo[extraid][pCameraZ] = cache_get_field_content_float(0, "camera_z"); PlayerInfo[extraid][pPosX] = cache_get_field_content_float(0, "pos_x"); PlayerInfo[extraid][pPosY] = cache_get_field_content_float(0, "pos_y"); PlayerInfo[extraid][pPosZ] = cache_get_field_content_float(0, "pos_z"); PlayerInfo[extraid][pPosA] = cache_get_field_content_float(0, "pos_a"); PlayerInfo[extraid][pInterior] = cache_get_field_content_int(0, "interior"); PlayerInfo[extraid][pWorld] = cache_get_field_content_int(0, "world"); PlayerInfo[extraid][pCash] = cache_get_field_content_int(0, "cash"); PlayerInfo[extraid][pBank] = cache_get_field_content_int(0, "bank"); PlayerInfo[extraid][pPaycheck] = cache_get_field_content_int(0, "paycheck"); PlayerInfo[extraid][pLevel] = cache_get_field_content_int(0, "level"); PlayerInfo[extraid][pEXP] = cache_get_field_content_int(0, "exp"); PlayerInfo[extraid][pMinutes] = cache_get_field_content_int(0, "minutes"); PlayerInfo[extraid][pHours] = cache_get_field_content_int(0, "hours"); PlayerInfo[extraid][pAdmin] = cache_get_field_content_int(0, "adminlevel"); PlayerInfo[extraid][pHelper] = cache_get_field_content_int(0, "helperlevel"); PlayerInfo[extraid][pHealth] = cache_get_field_content_float(0, "health"); PlayerInfo[extraid][pArmor] = cache_get_field_content_float(0, "armor"); PlayerInfo[extraid][pUpgradePoints] = cache_get_field_content_int(0, "upgradepoints"); PlayerInfo[extraid][pWarnings] = cache_get_field_content_int(0, "warnings"); PlayerInfo[extraid][pInjured] = cache_get_field_content_int(0, "injured"); PlayerInfo[extraid][pHospital] = cache_get_field_content_int(0, "hospital"); PlayerInfo[extraid][pSpawnHealth] = cache_get_field_content_float(0, "spawnhealth"); PlayerInfo[extraid][pSpawnArmor] = cache_get_field_content_float(0, "spawnarmor"); PlayerInfo[extraid][pJailType] = cache_get_field_content_int(0, "jailtype"); PlayerInfo[extraid][pJailTime] = cache_get_field_content_int(0, "jailtime"); PlayerInfo[extraid][pNewbieMuted] = cache_get_field_content_int(0, "newbiemuted"); PlayerInfo[extraid][pHelpMuted] = cache_get_field_content_int(0, "helpmuted"); PlayerInfo[extraid][pAdMuted] = cache_get_field_content_int(0, "admuted"); PlayerInfo[extraid][pLiveMuted] = cache_get_field_content_int(0, "livemuted"); PlayerInfo[extraid][pGlobalMuted] = cache_get_field_content_int(0, "globalmuted"); PlayerInfo[extraid][pReportMuted] = cache_get_field_content_int(0, "reportmuted"); PlayerInfo[extraid][pReportWarns] = cache_get_field_content_int(0, "reportwarns"); PlayerInfo[extraid][pFightStyle] = cache_get_field_content_int(0, "fightstyle"); PlayerInfo[extraid][pCookies] = cache_get_field_content_int(0, "cookies"); PlayerInfo[extraid][pPhone] = cache_get_field_content_int(0, "phone"); PlayerInfo[extraid][pJob] = cache_get_field_content_int(0, "job"); PlayerInfo[extraid][pSecondJob] = cache_get_field_content_int(0, "secondjob"); PlayerInfo[extraid][pCrimes] = cache_get_field_content_int(0, "crimes"); PlayerInfo[extraid][pArrested] = cache_get_field_content_int(0, "arrested"); PlayerInfo[extraid][pWantedLevel] = cache_get_field_content_int(0, "wantedlevel"); PlayerInfo[extraid][pMaterials] = cache_get_field_content_int(0, "materials"); PlayerInfo[extraid][pWeed] = cache_get_field_content_int(0, "weed"); PlayerInfo[extraid][pCocaine] = cache_get_field_content_int(0, "cocaine"); PlayerInfo[extraid][pMeth] = cache_get_field_content_int(0, "meth"); PlayerInfo[extraid][pPainkillers] = cache_get_field_content_int(0, "painkillers"); PlayerInfo[extraid][pSeeds] = cache_get_field_content_int(0, "seeds"); PlayerInfo[extraid][pEphedrine] = cache_get_field_content_int(0, "ephedrine"); PlayerInfo[extraid][pMuriaticAcid] = cache_get_field_content_int(0, "muriaticacid"); PlayerInfo[extraid][pBakingSoda] = cache_get_field_content_int(0, "bakingsoda"); PlayerInfo[extraid][pCigars] = cache_get_field_content_int(0, "cigars"); PlayerInfo[extraid][pWalkieTalkie] = cache_get_field_content_int(0, "walkietalkie"); PlayerInfo[extraid][pChannel] = cache_get_field_content_int(0, "channel"); PlayerInfo[extraid][pRentingHouse] = cache_get_field_content_int(0, "rentinghouse"); PlayerInfo[extraid][pSpraycans] = cache_get_field_content_int(0, "spraycans"); PlayerInfo[extraid][pBoombox] = cache_get_field_content_int(0, "boombox"); PlayerInfo[extraid][pMP3Player] = cache_get_field_content_int(0, "mp3player"); PlayerInfo[extraid][pPhonebook] = cache_get_field_content_int(0, "phonebook"); PlayerInfo[extraid][pFishingRod] = cache_get_field_content_int(0, "fishingrod"); PlayerInfo[extraid][pFishingBait] = cache_get_field_content_int(0, "fishingbait"); PlayerInfo[extraid][pFishWeight] = cache_get_field_content_int(0, "fishweight"); PlayerInfo[extraid][pComponents] = cache_get_field_content_int(0, "components"); PlayerInfo[extraid][pCourierSkill] = cache_get_field_content_int(0, "courierskill"); PlayerInfo[extraid][pFishingSkill] = cache_get_field_content_int(0, "fishingskill"); PlayerInfo[extraid][pGuardSkill] = cache_get_field_content_int(0, "guardskill"); PlayerInfo[extraid][pWeaponSkill] = cache_get_field_content_int(0, "weaponskill"); PlayerInfo[extraid][pMechanicSkill] = cache_get_field_content_int(0, "mechanicskill"); PlayerInfo[extraid][pLawyerSkill] = cache_get_field_content_int(0, "lawyerskill"); PlayerInfo[extraid][pSmugglerSkill] = cache_get_field_content_int(0, "smugglerskill"); PlayerInfo[extraid][pDetectiveSkill] = cache_get_field_content_int(0, "detectiveskill"); PlayerInfo[extraid][pToggleTextdraws] = cache_get_field_content_int(0, "toggletextdraws"); PlayerInfo[extraid][pToggleOOC] = cache_get_field_content_int(0, "toggleooc"); PlayerInfo[extraid][pTogglePhone] = cache_get_field_content_int(0, "togglephone"); PlayerInfo[extraid][pToggleAdmin] = cache_get_field_content_int(0, "toggleadmin"); PlayerInfo[extraid][pToggleHelper] = cache_get_field_content_int(0, "togglehelper"); PlayerInfo[extraid][pToggleNewbie] = cache_get_field_content_int(0, "togglenewbie"); PlayerInfo[extraid][pToggleWT] = cache_get_field_content_int(0, "togglewt"); PlayerInfo[extraid][pToggleRadio] = cache_get_field_content_int(0, "toggleradio"); PlayerInfo[extraid][pToggleVIP] = cache_get_field_content_int(0, "togglevip"); PlayerInfo[extraid][pToggleMusic] = cache_get_field_content_int(0, "togglemusic"); PlayerInfo[extraid][pToggleFaction] = cache_get_field_content_int(0, "togglefaction"); PlayerInfo[extraid][pToggleNews] = cache_get_field_content_int(0, "togglenews"); PlayerInfo[extraid][pToggleGlobal] = cache_get_field_content_int(0, "toggleglobal"); PlayerInfo[extraid][pToggleCam] = cache_get_field_content_int(0, "togglecam"); PlayerInfo[extraid][pToggleHUD] = cache_get_field_content_int(0, "togglehud"); PlayerInfo[extraid][pCarLicense] = cache_get_field_content_int(0, "carlicense"); PlayerInfo[extraid][pVIPPackage] = cache_get_field_content_int(0, "vippackage"); PlayerInfo[extraid][pVIPTime] = cache_get_field_content_int(0, "viptime"); PlayerInfo[extraid][pVIPCooldown] = cache_get_field_content_int(0, "vipcooldown"); PlayerInfo[extraid][pWeapons][0] = cache_get_field_content_int(0, "weapon_0"); PlayerInfo[extraid][pWeapons][1] = cache_get_field_content_int(0, "weapon_1"); PlayerInfo[extraid][pWeapons][2] = cache_get_field_content_int(0, "weapon_2"); PlayerInfo[extraid][pWeapons][3] = cache_get_field_content_int(0, "weapon_3"); PlayerInfo[extraid][pWeapons][4] = cache_get_field_content_int(0, "weapon_4"); PlayerInfo[extraid][pWeapons][5] = cache_get_field_content_int(0, "weapon_5"); PlayerInfo[extraid][pWeapons][6] = cache_get_field_content_int(0, "weapon_6"); PlayerInfo[extraid][pWeapons][7] = cache_get_field_content_int(0, "weapon_7"); PlayerInfo[extraid][pWeapons][8] = cache_get_field_content_int(0, "weapon_8"); PlayerInfo[extraid][pWeapons][9] = cache_get_field_content_int(0, "weapon_9"); PlayerInfo[extraid][pWeapons][10] = cache_get_field_content_int(0, "weapon_10"); PlayerInfo[extraid][pWeapons][11] = cache_get_field_content_int(0, "weapon_11"); PlayerInfo[extraid][pWeapons][12] = cache_get_field_content_int(0, "weapon_12"); PlayerInfo[extraid][pFaction] = cache_get_field_content_int(0, "faction"); PlayerInfo[extraid][pFactionRank] = cache_get_field_content_int(0, "factionrank"); PlayerInfo[extraid][pGang] = cache_get_field_content_int(0, "gang"); PlayerInfo[extraid][pGangRank] = cache_get_field_content_int(0, "gangrank"); PlayerInfo[extraid][pDivision] = cache_get_field_content_int(0, "division"); PlayerInfo[extraid][pContracted] = cache_get_field_content_int(0, "contracted"); PlayerInfo[extraid][pBombs] = cache_get_field_content_int(0, "bombs"); PlayerInfo[extraid][pCompletedHits] = cache_get_field_content_int(0, "completedhits"); PlayerInfo[extraid][pFailedHits] = cache_get_field_content_int(0, "failedhits"); PlayerInfo[extraid][pReports] = cache_get_field_content_int(0, "reports"); PlayerInfo[extraid][pHelpRequests] = cache_get_field_content_int(0, "helprequests"); PlayerInfo[extraid][pSpeedometer] = cache_get_field_content_int(0, "speedometer"); PlayerInfo[extraid][pFactionMod] = cache_get_field_content_int(0, "factionmod"); PlayerInfo[extraid][pGangMod] = cache_get_field_content_int(0, "gangmod"); PlayerInfo[extraid][pBanAppealer] = cache_get_field_content_int(0, "banappealer"); PlayerInfo[extraid][pWeedPlanted] = cache_get_field_content_int(0, "weedplanted"); PlayerInfo[extraid][pWeedTime] = cache_get_field_content_int(0, "weedtime"); PlayerInfo[extraid][pWeedGrams] = cache_get_field_content_int(0, "weedgrams"); PlayerInfo[extraid][pWeedX] = cache_get_field_content_float(0, "weed_x"); PlayerInfo[extraid][pWeedY] = cache_get_field_content_float(0, "weed_y"); PlayerInfo[extraid][pWeedZ] = cache_get_field_content_float(0, "weed_z"); PlayerInfo[extraid][pWeedA] = cache_get_field_content_float(0, "weed_a"); PlayerInfo[extraid][pInventoryUpgrade] = cache_get_field_content_int(0, "inventoryupgrade"); PlayerInfo[extraid][pAddictUpgrade] = cache_get_field_content_int(0, "addictupgrade"); PlayerInfo[extraid][pTraderUpgrade] = cache_get_field_content_int(0, "traderupgrade"); PlayerInfo[extraid][pAssetUpgrade] = cache_get_field_content_int(0, "assetupgrade"); PlayerInfo[extraid][pHPAmmo] = cache_get_field_content_int(0, "hpammo"); PlayerInfo[extraid][pPoisonAmmo] = cache_get_field_content_int(0, "poisonammo"); PlayerInfo[extraid][pFMJAmmo] = cache_get_field_content_int(0, "fmjammo"); PlayerInfo[extraid][pAmmoType] = cache_get_field_content_int(0, "ammotype"); PlayerInfo[extraid][pAmmoWeapon] = cache_get_field_content_int(0, "ammoweapon"); PlayerInfo[extraid][pDMWarnings] = cache_get_field_content_int(0, "dmwarnings"); PlayerInfo[extraid][pWeaponRestricted] = cache_get_field_content_int(0, "weaponrestricted"); PlayerInfo[extraid][pReferralUID] = cache_get_field_content_int(0, "referral_uid"); PlayerInfo[extraid][pWatch] = cache_get_field_content_int(0, "watch"); PlayerInfo[extraid][pGPS] = cache_get_field_content_int(0, "gps"); PlayerInfo[extraid][pClothes] = cache_get_field_content_int(0, "clothes"); PlayerInfo[extraid][pShowLands] = cache_get_field_content_int(0, "showlands"); PlayerInfo[extraid][pShowTurfs] = cache_get_field_content_int(0, "showturfs"); PlayerInfo[extraid][pWatchOn] = cache_get_field_content_int(0, "watchon"); PlayerInfo[extraid][pGPSOn] = cache_get_field_content_int(0, "gpson"); PlayerInfo[extraid][pDoubleXP] = cache_get_field_content_int(0, "doublexp"); PlayerInfo[extraid][pCourierCooldown] = cache_get_field_content_int(0, "couriercooldown"); PlayerInfo[extraid][pPizzaCooldown] = cache_get_field_content_int(0, "pizzacooldown"); PlayerInfo[extraid][pDetectiveCooldown] = cache_get_field_content_int(0, "detectivecooldown"); PlayerInfo[extraid][pGasCan] = cache_get_field_content_int(0, "gascan"); PlayerInfo[extraid][pDuty] = cache_get_field_content_int(0, "duty"); PlayerInfo[extraid][pBandana] = cache_get_field_content_int(0, "bandana"); PlayerInfo[extraid][pLogged] = 1; PlayerInfo[extraid][pACTime] = gettime() + 5; if(!PlayerInfo[extraid][pAdminDuty]) { ClearChat(extraid); } for(new i = 0; i < 4; i ++) { TextDrawHideForPlayer(extraid, LoginScreen[i]); } if(!PlayerInfo[extraid][pToggleTextdraws]) { TextDrawShowForPlayer(extraid, WebsiteTD); if(!PlayerInfo[extraid][pToggleHUD]) { PlayerTextDrawShow(extraid, PlayerInfo[extraid][pText][3]); PlayerTextDrawShow(extraid, PlayerInfo[extraid][pText][4]); } if(PlayerInfo[extraid][pWatchOn]) { TextDrawShowForPlayer(extraid, TimeTD); } if(PlayerInfo[extraid][pGPSOn]) { PlayerTextDrawShow(extraid, PlayerInfo[extraid][pText][0]); } } if(!isnull(gServerMOTD)) { SendClientMessageEx(extraid, COLOR_YELLOW, "** MOTD: %s", gServerMOTD); } if(PlayerInfo[extraid][pGang] >= 0 && strcmp(GangInfo[PlayerInfo[extraid][pGang]][gMOTD], "None", true) != 0) { SendClientMessageEx(extraid, COLOR_YELLOW, "** Gang MOTD: %s", GangInfo[PlayerInfo[extraid][pGang]][gMOTD]); } if(cache_get_field_content_int(extraid, "refercount") > 0) { new count = cache_get_field_content_int(0, "refercount"); SendClientMessageEx(extraid, COLOR_GREEN, "%i players who you've referred reached level 3. Therefore you received %i cookies!", count, count * 3); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET refercount = 0 WHERE uid = %i", PlayerInfo[extraid][pID]); mysql_tquery(connectionID, queryBuffer); } if(!PlayerInfo[extraid][pSetup]) { if(!PlayerInfo[extraid][pAdminDuty] && !PlayerInfo[extraid][pToggleCam]) { PlayerInfo[extraid][pLoginCamera] = 1; } if(PlayerInfo[extraid][pWeedPlanted] && PlayerInfo[extraid][pWeedObject] == INVALID_OBJECT_ID) { PlayerInfo[extraid][pWeedObject] = CreateDynamicObject(3409, PlayerInfo[extraid][pWeedX], PlayerInfo[extraid][pWeedY], PlayerInfo[extraid][pWeedZ] - 1.8, 0.0, 0.0, PlayerInfo[extraid][pWeedA]); } if(PlayerInfo[extraid][pShowTurfs]) { ShowTurfsOnMap(extraid, true); } if(PlayerInfo[extraid][pShowLands]) { ShowLandsOnMap(extraid, true); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET lastlogin = NOW(), ip = '%s' WHERE uid = %i", GetPlayerIP(extraid), PlayerInfo[extraid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id FROM flags WHERE uid = %i", PlayerInfo[extraid][pID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_COUNT_FLAGS, extraid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM clothing WHERE uid = %i", PlayerInfo[extraid][pID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_CLOTHING, extraid); if(!PlayerInfo[extraid][pTogglePhone]) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM texts WHERE recipient_number = %i", PlayerInfo[extraid][pPhone]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_COUNT_TEXTS, extraid); } for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && IsVehicleOwner(extraid, i) && VehicleInfo[i][vTimer] >= 0) { KillTimer(VehicleInfo[i][vTimer]); VehicleInfo[i][vTimer] = -1; } } // Just in case. SetPlayerSpecialTag(extraid, TAG_NONE); if(PlayerInfo[extraid][pAdminDuty]) { PlayerInfo[extraid][pAdminDuty] = 0; SetPlayerName(extraid, PlayerInfo[extraid][pUsername]); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s is no longer on admin duty.", GetPlayerRPName(extraid)); SendClientMessage(extraid, COLOR_WHITE, "** You are no longer on admin duty. Your account's statistics have been preserved."); } else { if(PlayerInfo[extraid][pAdmin]) { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s %s has logged in.", GetAdminRank(extraid), GetPlayerRPName(extraid)); } if(PlayerInfo[extraid][pGang] >= 0) { SendGangMessage(PlayerInfo[extraid][pGang], COLOR_AQUA, "(( %s %s has logged in. ))", GangRanks[PlayerInfo[extraid][pGang]][PlayerInfo[extraid][pGangRank]], GetPlayerRPName(extraid)); } if(PlayerInfo[extraid][pFaction] >= 0) { SendFactionMessage(PlayerInfo[extraid][pFaction], COLOR_FACTIONCHAT, "(( %s %s has logged in. ))", FactionRanks[PlayerInfo[extraid][pFaction]][PlayerInfo[extraid][pFactionRank]], GetPlayerRPName(extraid)); } format(string, sizeof(string), "~w~Welcome ~n~~y~ %s", GetPlayerRPName(extraid)); GameTextForPlayer(extraid, string, 5000, 1); if(PlayerInfo[extraid][pAdmin] > 0) { SendClientMessageEx(extraid, COLOR_WHITE, "Limitless Roleplay: You have logged in as a {FF6347}level %i %s{FFFFFF}.", PlayerInfo[extraid][pAdmin], GetAdminRank(extraid)); } else if(PlayerInfo[extraid][pHelper] > 0) { SendClientMessageEx(extraid, COLOR_WHITE, "Limitless Roleplay: You have logged in as a {33CCFF}%s{FFFFFF}.", GetHelperRank(extraid)); } else if(PlayerInfo[extraid][pVIPPackage] > 0) { SendClientMessageEx(extraid, COLOR_WHITE, "Limitless Roleplay: You have logged in as a {A028AD}%s VIP{FFFFFF}.", GetVIPRank(PlayerInfo[extraid][pVIPPackage])); } else if(PlayerInfo[extraid][pLevel] >= 2) { SendClientMessageEx(extraid, COLOR_WHITE, "Limitless Roleplay: You have logged in as a {AFAFAF}level %i player{FFFFFF}.", PlayerInfo[extraid][pLevel]); } else { SendClientMessage(extraid, COLOR_WHITE, "Limitless Roleplay: You have logged in as a {AFAFAF}level 1 newbie{FFFFFF}."); } SendClientMessageEx(extraid, COLOR_GREEN, "Your last login was on the %s (server time).", date); StopAudioStreamForPlayer(extraid); } if(PlayerInfo[extraid][pFaction] >= 0 && FactionInfo[PlayerInfo[extraid][pFaction]][fType] == FACTION_NONE) { ResetPlayerWeaponsEx(extraid); SendClientMessageEx(extraid, COLOR_LIGHTRED, "You were either kicked from the faction while offline or it was deleted."); SetPlayerSkin(extraid, 230); PlayerInfo[extraid][pFaction] = -1; PlayerInfo[extraid][pFactionRank] = 0; PlayerInfo[extraid][pDivision] = -1; PlayerInfo[extraid][pDuty] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET faction = -1, factionrank = 0, division = -1 WHERE uid = %i", PlayerInfo[extraid][pID]); mysql_tquery(connectionID, queryBuffer); } if(PlayerInfo[extraid][pGang] >= 0 && !GangInfo[PlayerInfo[extraid][pGang]][gSetup]) { SendClientMessage(extraid, COLOR_LIGHTRED, "You have either been kicked from the gang while offline or it was deleted."); PlayerInfo[extraid][pGang] = -1; PlayerInfo[extraid][pGangRank] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gang = -1, gangrank = 0 WHERE uid = %i", PlayerInfo[extraid][pID]); mysql_tquery(connectionID, queryBuffer); } } SetPlayerToSpawn(extraid); } } case THREAD_COUNT_FLAGS: { if(rows) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has %i pending flags. (/listflags %i)", GetPlayerRPName(extraid), extraid, rows, extraid); } } case THREAD_TRACE_IP: { if(rows) { new username[24], date[24]; SendClientMessageEx(extraid, COLOR_GREEN, "|__________ %i Results Found __________|", rows); for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "username", username); cache_get_field_content(i, "lastlogin", date); SendClientMessageEx(extraid, COLOR_GREY2, "Name: %s - Last Seen: %s", username, date); } } else { SendClientMessage(extraid, COLOR_GREY, "This IP address is not associated with any accounts."); } } case THREAD_LOGIN_UPDATE: { new string[1024]; if(extraid == 1) // Changes { new text[128]; string = "~y~Recent changes:~w~"; if(!rows) { strcat(string, "~n~- n/a"); } else { for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "text", text); format(string, sizeof(string), "%s~n~- %s", string, text); } } TextDrawSetString(LoginScreen[0], string); } else if(extraid == 2) // Top ten players { new username[MAX_PLAYER_NAME]; string = "~y~Top ten players:~w~"; if(!rows) { strcat(string, "~n~- n/a"); } else { for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "username", username); format(string, sizeof(string), "%s~n~- %s (%i hrs)", string, username, cache_get_field_content_int(i, "hours")); } } TextDrawSetString(LoginScreen[2], string); } } case THREAD_LIST_CHANGES: { new text[128]; SendClientMessage(extraid, COLOR_GREEN, "|_______ Changes List _______|"); for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "text", text); SendClientMessageEx(extraid, COLOR_GREY1, "Slot %i -> %s", cache_get_field_content_int(i, "slot"), text); } } case THREAD_LIST_HELPERS: { new username[MAX_PLAYER_NAME], lastlogin[24]; SendClientMessage(extraid, COLOR_GREEN, "|______ Helper Roster ______|"); for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "username", username); cache_get_field_content(i, "lastlogin", lastlogin); switch(cache_get_field_content_int(i, "helperlevel")) { case 1: SendClientMessageEx(extraid, COLOR_GREY2, "Junior Helper %s - Last Seen: %s", username, lastlogin); case 2: SendClientMessageEx(extraid, COLOR_GREY2, "Senior Helper %s - Last Seen: %s", username, lastlogin); case 3: SendClientMessageEx(extraid, COLOR_GREY2, "Asst. Head Helper %s - Last Seen: %s", username, lastlogin); case 4: SendClientMessageEx(extraid, COLOR_GREY2, "Head Helper %s - Last Seen: %s", username, lastlogin); } } } case THREAD_LOAD_HOUSES: { for(new i = 0; i < rows && i < MAX_HOUSES; i ++) { cache_get_field_content(i, "owner", HouseInfo[i][hOwner], connectionID, MAX_PLAYER_NAME); HouseInfo[i][hID] = cache_get_field_content_int(i, "id"); HouseInfo[i][hOwnerID] = cache_get_field_content_int(i, "ownerid"); HouseInfo[i][hType] = cache_get_field_content_int(i, "type"); HouseInfo[i][hPrice] = cache_get_field_content_int(i, "price"); HouseInfo[i][hRentPrice] = cache_get_field_content_int(i, "rentprice"); HouseInfo[i][hLevel] = cache_get_field_content_int(i, "level"); HouseInfo[i][hLocked] = cache_get_field_content_int(i, "locked"); HouseInfo[i][hTimestamp] = cache_get_field_content_int(i, "timestamp"); HouseInfo[i][hPosX] = cache_get_field_content_float(i, "pos_x"); HouseInfo[i][hPosY] = cache_get_field_content_float(i, "pos_y"); HouseInfo[i][hPosZ] = cache_get_field_content_float(i, "pos_z"); HouseInfo[i][hPosA] = cache_get_field_content_float(i, "pos_a"); HouseInfo[i][hIntX] = cache_get_field_content_float(i, "int_x"); HouseInfo[i][hIntY] = cache_get_field_content_float(i, "int_y"); HouseInfo[i][hIntZ] = cache_get_field_content_float(i, "int_z"); HouseInfo[i][hIntA] = cache_get_field_content_float(i, "int_a"); HouseInfo[i][hInterior] = cache_get_field_content_int(i, "interior"); HouseInfo[i][hWorld] = cache_get_field_content_int(i, "world"); HouseInfo[i][hOutsideInt] = cache_get_field_content_int(i, "outsideint"); HouseInfo[i][hOutsideVW] = cache_get_field_content_int(i, "outsidevw"); HouseInfo[i][hCash] = cache_get_field_content_int(i, "cash"); HouseInfo[i][hMaterials] = cache_get_field_content_int(i, "materials"); HouseInfo[i][hWeed] = cache_get_field_content_int(i, "weed"); HouseInfo[i][hCocaine] = cache_get_field_content_int(i, "cocaine"); HouseInfo[i][hMeth] = cache_get_field_content_int(i, "meth"); HouseInfo[i][hPainkillers] = cache_get_field_content_int(i, "painkillers"); HouseInfo[i][hWeapons][0] = cache_get_field_content_int(i, "weapon_1"); HouseInfo[i][hWeapons][1] = cache_get_field_content_int(i, "weapon_2"); HouseInfo[i][hWeapons][2] = cache_get_field_content_int(i, "weapon_3"); HouseInfo[i][hWeapons][3] = cache_get_field_content_int(i, "weapon_4"); HouseInfo[i][hWeapons][4] = cache_get_field_content_int(i, "weapon_5"); HouseInfo[i][hWeapons][5] = cache_get_field_content_int(i, "weapon_6"); HouseInfo[i][hWeapons][6] = cache_get_field_content_int(i, "weapon_7"); HouseInfo[i][hWeapons][7] = cache_get_field_content_int(i, "weapon_8"); HouseInfo[i][hWeapons][8] = cache_get_field_content_int(i, "weapon_9"); HouseInfo[i][hWeapons][9] = cache_get_field_content_int(i, "weapon_10"); HouseInfo[i][hHPAmmo] = cache_get_field_content_int(i, "hpammo"); HouseInfo[i][hPoisonAmmo] = cache_get_field_content_int(i, "poisonammo"); HouseInfo[i][hFMJAmmo] = cache_get_field_content_int(i, "fmjammo"); HouseInfo[i][hText] = Text3D:INVALID_3DTEXT_ID; HouseInfo[i][hPickup] = -1; HouseInfo[i][hLabels] = 0; HouseInfo[i][hExists] = 1; ReloadHouse(i); } printf("[Script] %i houses loaded.", rows); } case THREAD_LIST_TENANTS: { if(!rows) { SendClientMessage(extraid, COLOR_GREY, "There is nobody currently renting at your home."); } else { new username[MAX_PLAYER_NAME], date[24]; SendClientMessage(extraid, COLOR_GREEN, "|______ List of Tenants ______|"); for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "username", username); cache_get_field_content(i, "lastlogin", date); SendClientMessageEx(extraid, COLOR_GREY2, "Name: %s - Last Seen: %s", username, date); } } } case THREAD_LOAD_FURNITURE: { for(new i = 0; i < rows; i ++) { new objectid = CreateDynamicObject(cache_get_field_content_int(i, "modelid"), cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z"), cache_get_field_content_float(i, "rot_x"), cache_get_field_content_float(i, "rot_y"), cache_get_field_content_float(i, "rot_z"), cache_get_field_content_int(i, "world"), cache_get_field_content_int(i, "interior")); Streamer_SetExtraInt(objectid, E_OBJECT_TYPE, E_OBJECT_FURNITURE); Streamer_SetExtraInt(objectid, E_OBJECT_INDEX_ID, cache_get_field_content_int(i, "id")); Streamer_SetExtraInt(objectid, E_OBJECT_EXTRA_ID, cache_get_field_content_int(i, "houseid")); if(extraid) { new string[48]; cache_get_field_content(i, "name", string); format(string, sizeof(string), "[%i] - %s", objectid, string); Streamer_SetExtraInt(objectid, E_OBJECT_3DTEXT_ID, _:CreateDynamic3DTextLabel(string, COLOR_GREY2, cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z"), 10.0, .worldid = cache_get_field_content_int(i, "world"), .interiorid = cache_get_field_content_int(i, "interior"))); } } } case THREAD_LOAD_GARAGES: { for(new i = 0; i < rows && i < MAX_GARAGES; i ++) { cache_get_field_content(i, "owner", GarageInfo[i][gOwner], connectionID, MAX_PLAYER_NAME); GarageInfo[i][gID] = cache_get_field_content_int(i, "id"); GarageInfo[i][gOwnerID] = cache_get_field_content_int(i, "ownerid"); GarageInfo[i][gType] = cache_get_field_content_int(i, "type"); GarageInfo[i][gPrice] = cache_get_field_content_int(i, "price"); GarageInfo[i][gLocked] = cache_get_field_content_int(i, "locked"); GarageInfo[i][gTimestamp] = cache_get_field_content_int(i, "timestamp"); GarageInfo[i][gPosX] = cache_get_field_content_float(i, "pos_x"); GarageInfo[i][gPosY] = cache_get_field_content_float(i, "pos_y"); GarageInfo[i][gPosZ] = cache_get_field_content_float(i, "pos_z"); GarageInfo[i][gPosA] = cache_get_field_content_float(i, "pos_a"); GarageInfo[i][gExitX] = cache_get_field_content_float(i, "exit_x"); GarageInfo[i][gExitY] = cache_get_field_content_float(i, "exit_y"); GarageInfo[i][gExitZ] = cache_get_field_content_float(i, "exit_z"); GarageInfo[i][gExitA] = cache_get_field_content_float(i, "exit_a"); GarageInfo[i][gWorld] = cache_get_field_content_int(i, "world"); GarageInfo[i][gText] = Text3D:INVALID_3DTEXT_ID; GarageInfo[i][gPickup] = -1; GarageInfo[i][gExists] = 1; ReloadGarage(i); } printf("[Script] %i garages loaded.", rows); } case THREAD_LOAD_BUSINESSES: { for(new i = 0; i < rows && i < MAX_BUSINESSES; i ++) { cache_get_field_content(i, "owner", BusinessInfo[i][bOwner], connectionID, MAX_PLAYER_NAME); BusinessInfo[i][bID] = cache_get_field_content_int(i, "id"); BusinessInfo[i][bOwnerID] = cache_get_field_content_int(i, "ownerid"); BusinessInfo[i][bType] = cache_get_field_content_int(i, "type"); BusinessInfo[i][bPrice] = cache_get_field_content_int(i, "price"); BusinessInfo[i][bEntryFee] = cache_get_field_content_int(i, "entryfee"); BusinessInfo[i][bLocked] = cache_get_field_content_int(i, "locked"); BusinessInfo[i][bTimestamp] = cache_get_field_content_int(i, "timestamp"); BusinessInfo[i][bPosX] = cache_get_field_content_float(i, "pos_x"); BusinessInfo[i][bPosY] = cache_get_field_content_float(i, "pos_y"); BusinessInfo[i][bPosZ] = cache_get_field_content_float(i, "pos_z"); BusinessInfo[i][bPosA] = cache_get_field_content_float(i, "pos_a"); BusinessInfo[i][bIntX] = cache_get_field_content_float(i, "int_x"); BusinessInfo[i][bIntY] = cache_get_field_content_float(i, "int_y"); BusinessInfo[i][bIntZ] = cache_get_field_content_float(i, "int_z"); BusinessInfo[i][bIntA] = cache_get_field_content_float(i, "int_a"); BusinessInfo[i][bInterior] = cache_get_field_content_int(i, "interior"); BusinessInfo[i][bWorld] = cache_get_field_content_int(i, "world"); BusinessInfo[i][bOutsideInt] = cache_get_field_content_int(i, "outsideint"); BusinessInfo[i][bOutsideVW] = cache_get_field_content_int(i, "outsidevw"); BusinessInfo[i][bCash] = cache_get_field_content_int(i, "cash"); BusinessInfo[i][bProducts] = cache_get_field_content_int(i, "products"); BusinessInfo[i][bText] = Text3D:INVALID_3DTEXT_ID; BusinessInfo[i][bPickup] = -1; BusinessInfo[i][bMapIcon] = -1; BusinessInfo[i][bExists] = 1; ReloadBusiness(i); } printf("[Script] %i businesses loaded.", rows); } case THREAD_LOAD_ENTRANCES: { for(new i = 0; i < rows && i < MAX_ENTRANCES; i ++) { cache_get_field_content(i, "owner", EntranceInfo[i][eOwner], connectionID, MAX_PLAYER_NAME); cache_get_field_content(i, "name", EntranceInfo[i][eName], connectionID, 40); cache_get_field_content(i, "password", EntranceInfo[i][ePassword], connectionID, 64); EntranceInfo[i][eID] = cache_get_field_content_int(i, "id"); EntranceInfo[i][eOwnerID] = cache_get_field_content_int(i, "ownerid"); EntranceInfo[i][eIcon] = cache_get_field_content_int(i, "iconid"); EntranceInfo[i][eLocked] = cache_get_field_content_int(i, "locked"); EntranceInfo[i][eRadius] = cache_get_field_content_float(i, "radius"); EntranceInfo[i][ePosX] = cache_get_field_content_float(i, "pos_x"); EntranceInfo[i][ePosY] = cache_get_field_content_float(i, "pos_y"); EntranceInfo[i][ePosZ] = cache_get_field_content_float(i, "pos_z"); EntranceInfo[i][ePosA] = cache_get_field_content_float(i, "pos_a"); EntranceInfo[i][eIntX] = cache_get_field_content_float(i, "int_x"); EntranceInfo[i][eIntY] = cache_get_field_content_float(i, "int_y"); EntranceInfo[i][eIntZ] = cache_get_field_content_float(i, "int_z"); EntranceInfo[i][eIntA] = cache_get_field_content_float(i, "int_a"); EntranceInfo[i][eInterior] = cache_get_field_content_int(i, "interior"); EntranceInfo[i][eWorld] = cache_get_field_content_int(i, "world"); EntranceInfo[i][eOutsideInt] = cache_get_field_content_int(i, "outsideint"); EntranceInfo[i][eOutsideVW] = cache_get_field_content_int(i, "outsidevw"); EntranceInfo[i][eAdminLevel] = cache_get_field_content_int(i, "adminlevel"); EntranceInfo[i][eFactionType] = cache_get_field_content_int(i, "factiontype"); EntranceInfo[i][eVIP] = cache_get_field_content_int(i, "vip"); EntranceInfo[i][eVehicles] = cache_get_field_content_int(i, "vehicles"); EntranceInfo[i][eFreeze] = cache_get_field_content_int(i, "freeze"); EntranceInfo[i][eLabel] = cache_get_field_content_int(i, "label"); EntranceInfo[i][eText] = Text3D:INVALID_3DTEXT_ID; EntranceInfo[i][ePickup] = -1; EntranceInfo[i][eExists] = 1; ReloadEntrance(i); } printf("[Script] %i entrances loaded.", rows); } case THREAD_LOAD_FACTIONS: { for(new i = 0; i < rows && i < MAX_FACTIONS; i ++) { new factionid = cache_get_field_content_int(i, "id"); cache_get_field_content(i, "name", FactionInfo[factionid][fName], connectionID, 48); cache_get_field_content(i, "leader", FactionInfo[factionid][fLeader], connectionID, MAX_PLAYER_NAME); FactionInfo[factionid][fType] = cache_get_field_content_int(i, "type"); FactionInfo[factionid][fColor] = cache_get_field_content_int(i, "color"); FactionInfo[factionid][fRankCount] = cache_get_field_content_int(i, "rankcount"); FactionInfo[factionid][fLockerX] = cache_get_field_content_float(i, "lockerx"); FactionInfo[factionid][fLockerY] = cache_get_field_content_float(i, "lockery"); FactionInfo[factionid][fLockerZ] = cache_get_field_content_float(i, "lockerz"); FactionInfo[factionid][fLockerInterior] = cache_get_field_content_int(i, "lockerinterior"); FactionInfo[factionid][fLockerWorld] = cache_get_field_content_int(i, "lockerworld"); FactionInfo[factionid][fTurfTokens] = cache_get_field_content_int(i, "turftokens"); FactionInfo[factionid][fText] = Text3D:INVALID_3DTEXT_ID; FactionInfo[factionid][fPickup] = -1; ReloadFaction(factionid); } printf("[Script] %i factions loaded.", rows); } case THREAD_LOAD_FACTIONRANKS: { for(new i = 0; i < MAX_FACTIONS; i ++) { for(new r = 0; r < MAX_FACTION_RANKS; r ++) { strcpy(FactionRanks[i][r], "Unspecified", 32); } } for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "name", FactionRanks[cache_get_field_content_int(i, "id")][cache_get_field_content_int(i, "rank")], connectionID, 32); } } case THREAD_LOAD_FACTIONSKINS: { for(new i = 0; i < rows; i ++) { FactionInfo[cache_get_field_content_int(i, "id")][fSkins][cache_get_field_content_int(i, "slot")] = cache_get_field_content_int(i, "skinid"); } } case THREAD_LOAD_FACTIONPAY: { for(new i = 0; i < rows; i ++) { FactionInfo[cache_get_field_content_int(i, "id")][fPaycheck][cache_get_field_content_int(i, "rank")] = cache_get_field_content_int(i, "amount"); } } case THREAD_LOAD_DIVISIONS: { for(new i = 0; i < MAX_FACTIONS; i ++) { for(new r = 0; r < MAX_FACTION_DIVISIONS; r ++) { FactionDivisions[i][r][0] = 0; } } for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "name", FactionDivisions[cache_get_field_content_int(i, "id")][cache_get_field_content_int(i, "divisionid")], connectionID, 32); } } case THREAD_LOAD_LANDS: { for(new i = 0; i < rows && i < MAX_LANDS; i ++) { cache_get_field_content(i, "owner", LandInfo[i][lOwner], connectionID, MAX_PLAYER_NAME); LandInfo[i][lID] = cache_get_field_content_int(i, "id"); LandInfo[i][lOwnerID] = cache_get_field_content_int(i, "ownerid"); LandInfo[i][lPrice] = cache_get_field_content_int(i, "price"); LandInfo[i][lMinX] = cache_get_field_content_float(i, "min_x"); LandInfo[i][lMinY] = cache_get_field_content_float(i, "min_y"); LandInfo[i][lMaxX] = cache_get_field_content_float(i, "max_x"); LandInfo[i][lMaxY] = cache_get_field_content_float(i, "max_y"); LandInfo[i][lHeight] = cache_get_field_content_float(i, "height"); LandInfo[i][lGangZone] = -1; LandInfo[i][lArea] = -1; LandInfo[i][lLabels] = 0; LandInfo[i][lExists] = 1; ReloadLand(i); } printf("[Script] %i lands loaded.", rows); } case THREAD_LOAD_LANDOBJECTS: { for(new i = 0; i < rows; i ++) { new objectid = CreateDynamicObject(cache_get_field_content_int(i, "modelid"), cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z"), cache_get_field_content_float(i, "rot_x"), cache_get_field_content_float(i, "rot_y"), cache_get_field_content_float(i, "rot_z")); Streamer_SetExtraInt(objectid, E_OBJECT_TYPE, E_OBJECT_LAND); Streamer_SetExtraInt(objectid, E_OBJECT_INDEX_ID, cache_get_field_content_int(i, "id")); Streamer_SetExtraInt(objectid, E_OBJECT_EXTRA_ID, cache_get_field_content_int(i, "landid")); Streamer_SetExtraFloat(objectid, E_OBJECT_X, cache_get_field_content_float(i, "pos_x")); Streamer_SetExtraFloat(objectid, E_OBJECT_Y, cache_get_field_content_float(i, "pos_y")); Streamer_SetExtraFloat(objectid, E_OBJECT_Z, cache_get_field_content_float(i, "pos_z")); if(extraid) { new string[48]; cache_get_field_content(i, "name", string); format(string, sizeof(string), "[%i] - %s", objectid, string); Streamer_SetExtraInt(objectid, E_OBJECT_3DTEXT_ID, _:CreateDynamic3DTextLabel(string, COLOR_GREY2, cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z"), 10.0)); } } } case THREAD_LOAD_GANGS: { for(new i = 0; i < rows && i < MAX_GANGS; i ++) { new gangid = cache_get_field_content_int(i, "id"); cache_get_field_content(i, "name", GangInfo[gangid][gName], connectionID, 32); cache_get_field_content(i, "motd", GangInfo[gangid][gMOTD], connectionID, 128); cache_get_field_content(i, "leader", GangInfo[gangid][gLeader], connectionID, MAX_PLAYER_NAME); GangInfo[gangid][gColor] = cache_get_field_content_int(i, "color"); GangInfo[gangid][gStrikes] = cache_get_field_content_int(i, "strikes"); GangInfo[gangid][gLevel] = cache_get_field_content_int(i, "level"); GangInfo[gangid][gPoints] = cache_get_field_content_int(i, "points"); GangInfo[gangid][gTurfTokens] = cache_get_field_content_int(i, "turftokens"); GangInfo[gangid][gStashX] = cache_get_field_content_float(i, "stash_x"); GangInfo[gangid][gStashY] = cache_get_field_content_float(i, "stash_y"); GangInfo[gangid][gStashZ] = cache_get_field_content_float(i, "stash_z"); GangInfo[gangid][gStashInterior] = cache_get_field_content_int(i, "stashinterior"); GangInfo[gangid][gStashWorld] = cache_get_field_content_int(i, "stashworld"); GangInfo[gangid][gCash] = cache_get_field_content_int(i, "cash"); GangInfo[gangid][gMaterials] = cache_get_field_content_int(i, "materials"); GangInfo[gangid][gWeed] = cache_get_field_content_int(i, "weed"); GangInfo[gangid][gCocaine] = cache_get_field_content_int(i, "cocaine"); GangInfo[gangid][gMeth] = cache_get_field_content_int(i, "meth"); GangInfo[gangid][gPainkillers] = cache_get_field_content_int(i, "painkillers"); GangInfo[gangid][gHPAmmo] = cache_get_field_content_int(i, "hpammo"); GangInfo[gangid][gPoisonAmmo] = cache_get_field_content_int(i, "poisonammo"); GangInfo[gangid][gFMJAmmo] = cache_get_field_content_int(i, "fmjammo"); // Gang stash weapons GangInfo[gangid][gWeapons][GANGWEAPON_9MM] = cache_get_field_content_int(i, "weapon_9mm"); GangInfo[gangid][gWeapons][GANGWEAPON_SDPISTOL] = cache_get_field_content_int(i, "weapon_sdpistol"); GangInfo[gangid][gWeapons][GANGWEAPON_DEAGLE] = cache_get_field_content_int(i, "weapon_deagle"); GangInfo[gangid][gWeapons][GANGWEAPON_SHOTGUN] = cache_get_field_content_int(i, "weapon_shotgun"); GangInfo[gangid][gWeapons][GANGWEAPON_SPAS12] = cache_get_field_content_int(i, "weapon_spas12"); GangInfo[gangid][gWeapons][GANGWEAPON_SAWNOFF] = cache_get_field_content_int(i, "weapon_sawnoff"); GangInfo[gangid][gWeapons][GANGWEAPON_TEC9] = cache_get_field_content_int(i, "weapon_tec9"); GangInfo[gangid][gWeapons][GANGWEAPON_UZI] = cache_get_field_content_int(i, "weapon_uzi"); GangInfo[gangid][gWeapons][GANGWEAPON_MP5] = cache_get_field_content_int(i, "weapon_mp5"); GangInfo[gangid][gWeapons][GANGWEAPON_AK47] = cache_get_field_content_int(i, "weapon_ak47"); GangInfo[gangid][gWeapons][GANGWEAPON_M4] = cache_get_field_content_int(i, "weapon_m4"); GangInfo[gangid][gWeapons][GANGWEAPON_RIFLE] = cache_get_field_content_int(i, "weapon_rifle"); GangInfo[gangid][gWeapons][GANGWEAPON_SNIPER] = cache_get_field_content_int(i, "weapon_sniper"); GangInfo[gangid][gWeapons][GANGWEAPON_MOLOTOV] = cache_get_field_content_int(i, "weapon_molotov"); // Gang arms & drug dealer GangInfo[gangid][gArmsDealer] = cache_get_field_content_int(i, "armsdealer"); GangInfo[gangid][gDrugDealer] = cache_get_field_content_int(i, "drugdealer"); GangInfo[gangid][gArmsX] = cache_get_field_content_float(i, "arms_x"); GangInfo[gangid][gArmsY] = cache_get_field_content_float(i, "arms_y"); GangInfo[gangid][gArmsZ] = cache_get_field_content_float(i, "arms_z"); GangInfo[gangid][gArmsA] = cache_get_field_content_float(i, "arms_a"); GangInfo[gangid][gDrugX] = cache_get_field_content_float(i, "drug_x"); GangInfo[gangid][gDrugY] = cache_get_field_content_float(i, "drug_y"); GangInfo[gangid][gDrugZ] = cache_get_field_content_float(i, "drug_z"); GangInfo[gangid][gDrugA] = cache_get_field_content_float(i, "drug_a"); GangInfo[gangid][gArmsWorld] = cache_get_field_content_int(i, "armsworld"); GangInfo[gangid][gDrugWorld] = cache_get_field_content_int(i, "drugworld"); GangInfo[gangid][gDrugWeed] = cache_get_field_content_int(i, "drugweed"); GangInfo[gangid][gDrugCocaine] = cache_get_field_content_int(i, "drugcocaine"); GangInfo[gangid][gDrugMeth] = cache_get_field_content_int(i, "drugmeth"); GangInfo[gangid][gArmsMaterials] = cache_get_field_content_int(i, "armsmaterials"); GangInfo[gangid][gArmsPrices][0] = cache_get_field_content_int(i, "armsprice_1"); GangInfo[gangid][gArmsPrices][1] = cache_get_field_content_int(i, "armsprice_2"); GangInfo[gangid][gArmsPrices][2] = cache_get_field_content_int(i, "armsprice_3"); GangInfo[gangid][gArmsPrices][3] = cache_get_field_content_int(i, "armsprice_4"); GangInfo[gangid][gArmsPrices][4] = cache_get_field_content_int(i, "armsprice_5"); GangInfo[gangid][gArmsPrices][5] = cache_get_field_content_int(i, "armsprice_6"); GangInfo[gangid][gArmsPrices][6] = cache_get_field_content_int(i, "armsprice_7"); GangInfo[gangid][gArmsPrices][7] = cache_get_field_content_int(i, "armsprice_8"); GangInfo[gangid][gArmsPrices][8] = cache_get_field_content_int(i, "armsprice_9"); GangInfo[gangid][gArmsPrices][9] = cache_get_field_content_int(i, "armsprice_10"); GangInfo[gangid][gArmsPrices][10] = cache_get_field_content_int(i, "armsprice_11"); GangInfo[gangid][gArmsPrices][11] = cache_get_field_content_int(i, "armsprice_12"); GangInfo[gangid][gDrugPrices][0] = cache_get_field_content_int(i, "weed_price"); GangInfo[gangid][gDrugPrices][1] = cache_get_field_content_int(i, "cocaine_price"); GangInfo[gangid][gDrugPrices][2] = cache_get_field_content_int(i, "meth_price"); GangInfo[gangid][gArmsHPAmmo] = cache_get_field_content_int(i, "armshpammo"); GangInfo[gangid][gArmsPoisonAmmo] = cache_get_field_content_int(i, "armspoisonammo"); GangInfo[gangid][gArmsFMJAmmo] = cache_get_field_content_int(i, "armsfmjammo"); GangInfo[gangid][gText][0] = Text3D:INVALID_3DTEXT_ID; GangInfo[gangid][gText][1] = Text3D:INVALID_3DTEXT_ID; GangInfo[gangid][gText][2] = Text3D:INVALID_3DTEXT_ID; GangInfo[gangid][gActors][0] = INVALID_ACTOR_ID; GangInfo[gangid][gActors][1] = INVALID_ACTOR_ID; GangInfo[gangid][gPickup] = -1; GangInfo[gangid][gSetup] = 1; ReloadGang(gangid); } printf("[Script] %i gangs loaded.", rows); } case THREAD_LOAD_GANGRANKS: { for(new i = 0; i < MAX_GANGS; i ++) { for(new r = 0; r < 7; r ++) { strcpy(GangRanks[i][r], "Unspecified", 32); } } for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "name", GangRanks[cache_get_field_content_int(i, "id")][cache_get_field_content_int(i, "rank")], connectionID, 32); } } case THREAD_LOAD_GANGSKINS: { for(new i = 0; i < rows; i ++) { GangInfo[cache_get_field_content_int(i, "id")][gSkins][cache_get_field_content_int(i, "slot")] = cache_get_field_content_int(i, "skinid"); } } case THREAD_LOAD_POINTS: { for(new i = 0; i < rows && i < MAX_POINTS; i ++) { new pointid = cache_get_field_content_int(i, "id"); cache_get_field_content(i, "name", PointInfo[pointid][pName], connectionID, 32); cache_get_field_content(i, "capturedby", PointInfo[pointid][pCapturedBy], connectionID, MAX_PLAYER_NAME); PointInfo[pointid][pCapturedGang] = cache_get_field_content_int(i, "capturedgang"); PointInfo[pointid][pType] = cache_get_field_content_int(i, "type"); PointInfo[pointid][pProfits] = cache_get_field_content_int(i, "profits"); PointInfo[pointid][pTime] = cache_get_field_content_int(i, "time"); PointInfo[pointid][pPointX] = cache_get_field_content_float(i, "point_x"); PointInfo[pointid][pPointY] = cache_get_field_content_float(i, "point_y"); PointInfo[pointid][pPointZ] = cache_get_field_content_float(i, "point_z"); PointInfo[pointid][pPointInterior] = cache_get_field_content_int(i, "pointinterior"); PointInfo[pointid][pPointWorld] = cache_get_field_content_int(i, "pointworld"); PointInfo[pointid][pCaptureTime] = 0; PointInfo[pointid][pCapturer] = INVALID_PLAYER_ID; PointInfo[pointid][pText] = Text3D:INVALID_3DTEXT_ID; PointInfo[pointid][pPickup] = -1; PointInfo[pointid][pExists] = 1; if(PointInfo[pointid][pCapturedGang] >= 0 && !GangInfo[PointInfo[pointid][pCapturedGang]][gSetup]) { PointInfo[pointid][pCapturedGang] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET capturedgang = -1 WHERE id = %i", pointid); mysql_tquery(connectionID, queryBuffer); } ReloadPoint(pointid); } printf("[Script] %i points loaded.", rows); } case THREAD_LOAD_TURFS: { for(new i = 0; i < rows && i < MAX_TURFS; i ++) { new turfid = cache_get_field_content_int(i, "id"); cache_get_field_content(i, "name", TurfInfo[turfid][tName], connectionID, 32); cache_get_field_content(i, "capturedby", TurfInfo[turfid][tCapturedBy], connectionID, MAX_PLAYER_NAME); TurfInfo[turfid][tCapturedGang] = cache_get_field_content_int(i, "capturedgang"); TurfInfo[turfid][tType] = cache_get_field_content_int(i, "type"); TurfInfo[turfid][tTime] = cache_get_field_content_int(i, "time"); TurfInfo[turfid][tMinX] = cache_get_field_content_float(i, "min_x"); TurfInfo[turfid][tMinY] = cache_get_field_content_float(i, "min_y"); TurfInfo[turfid][tMaxX] = cache_get_field_content_float(i, "max_x"); TurfInfo[turfid][tMaxY] = cache_get_field_content_float(i, "max_y"); TurfInfo[turfid][tHeight] = cache_get_field_content_float(i, "height"); TurfInfo[turfid][tGangZone] = -1; TurfInfo[turfid][tArea] = -1; TurfInfo[turfid][tCaptureTime] = 0; TurfInfo[turfid][tCapturer] = INVALID_PLAYER_ID; TurfInfo[turfid][tExists] = 1; ReloadTurf(turfid); } printf("[Script] %i turfs loaded.", rows); } case THREAD_LOAD_CLOTHING: { for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "name", ClothingInfo[extraid][i][cName], connectionID, 32); ClothingInfo[extraid][i][cID] = cache_get_field_content_int(i, "id"); ClothingInfo[extraid][i][cModel] = cache_get_field_content_int(i, "modelid"); ClothingInfo[extraid][i][cBone] = cache_get_field_content_int(i, "boneid"); ClothingInfo[extraid][i][cAttached] = cache_get_field_content_int(i, "attached"); ClothingInfo[extraid][i][cPosX] = cache_get_field_content_float(i, "pos_x"); ClothingInfo[extraid][i][cPosY] = cache_get_field_content_float(i, "pos_y"); ClothingInfo[extraid][i][cPosZ] = cache_get_field_content_float(i, "pos_z"); ClothingInfo[extraid][i][cRotX] = cache_get_field_content_float(i, "rot_x"); ClothingInfo[extraid][i][cRotY] = cache_get_field_content_float(i, "rot_y"); ClothingInfo[extraid][i][cRotZ] = cache_get_field_content_float(i, "rot_z"); ClothingInfo[extraid][i][cScaleX] = cache_get_field_content_float(i, "scale_x"); ClothingInfo[extraid][i][cScaleY] = cache_get_field_content_float(i, "scale_y"); ClothingInfo[extraid][i][cScaleZ] = cache_get_field_content_float(i, "scale_z"); ClothingInfo[extraid][i][cExists] = 1; ClothingInfo[extraid][i][cAttachedIndex] = -1; } PlayerInfo[extraid][pAwaitingClothing] = 1; } case THREAD_HOUSE_INFORMATION: { new type[16], houseid = GetNearbyHouseEx(extraid); if(HouseInfo[houseid][hType] == -1) { type = "Other"; } else { strcpy(type, houseInteriors[HouseInfo[houseid][hType]][intClass]); } SendClientMessageEx(extraid, COLOR_GREEN, "|______ House ID %i ______|", houseid); SendClientMessageEx(extraid, COLOR_GREY2, "(Value: $%i) - (Rent Price: $%i) - (Level: %i/5) - (Active: %s) - (Locked: %s)", HouseInfo[houseid][hPrice], HouseInfo[houseid][hRentPrice], HouseInfo[houseid][hLevel], (gettime() - HouseInfo[houseid][hTimestamp] > 1209600) ? ("{FF6347}No{C8C8C8}") : ("Yes"), (HouseInfo[houseid][hLocked]) ? ("Yes") : ("No")); SendClientMessageEx(extraid, COLOR_GREY2, "(Class: %s) - (Location: %s) - (Furniture: %i/%i) - (Tenants: %i/%i)", type, GetZoneName(HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]), cache_get_row_int(0, 0), GetHouseFurnitureCapacity(houseid), cache_get_row_int(0, 1), GetHouseTenantCapacity(houseid)); } case THREAD_COUNT_FURNITURE: { new houseid = GetInsideHouse(extraid); if(cache_get_row_int(0, 0) >= GetHouseFurnitureCapacity(houseid)) { SendClientMessageEx(extraid, COLOR_GREY, "Your house is only allowed up to %i furniture at its current level.", GetHouseFurnitureCapacity(houseid)); } else { ShowDialogToPlayer(extraid, DIALOG_BUYFURNITURE1); } } case THREAD_SELL_FURNITURE: { if(cache_get_row_count(connectionID)) { new name[32], price = percent(cache_get_field_content_int(0, "price"), 75); cache_get_field_content(0, "name", name); GivePlayerCash(extraid, price); SendClientMessageEx(extraid, COLOR_AQUA, "You have sold {FF6347}%s{33CCFF} and received a 75 percent refund of {00AA00}$%i{33CCFF}.", name, price); RemoveFurniture(PlayerInfo[extraid][pSelected]); } } case THREAD_CLEAR_FURNITURE: { if(!rows) { SendClientMessage(extraid, COLOR_GREY, "Your home contains no furniture which can be sold."); } else { new price, houseid = GetInsideHouse(extraid); for(new i = 0; i < rows; i ++) { price += percent(cache_get_field_content_int(i, "price"), 75); } RemoveAllFurniture(houseid); GivePlayerCash(extraid, price); SendClientMessageEx(extraid, COLOR_AQUA, "You have sold a total of %i items and received {00AA00}$%i{33CCFF} back.", rows, price); } } case THREAD_COUNT_TEXTS: { rows = cache_get_row_int(0, 0); if(rows) { SendClientMessageEx(extraid, COLOR_YELLOW, "** You have %i unread text messages. (/texts)", rows); } } case THREAD_VIEW_TEXTS: { if(!rows) { SendClientMessage(extraid, COLOR_GREY, "You have no more unread text messages to read."); } else { static listString[4096], sender[MAX_PLAYER_NAME], date[24], message[128]; listString = "Texts sent to you while offline (recent first):\n"; for(new i = 0; i < min(rows, 25); i ++) { cache_get_field_content(i, "sender", sender); cache_get_field_content(i, "date", date); cache_get_field_content(i, "message", message); format(listString, sizeof(listString), "%s\n[%s] SMS from %s (%i): %s", listString, date, sender, cache_get_field_content_int(i, "sender_number"), message); } if(rows > 25) { ShowPlayerDialog(extraid, DIALOG_UNREADTEXTS, DIALOG_STYLE_MSGBOX, "Unread Texts", listString, "Next", "OK"); } else { ShowPlayerDialog(extraid, DIALOG_UNREADTEXTS, DIALOG_STYLE_MSGBOX, "Unread Texts", listString, "OK", ""); } } } case THREAD_LIST_VEHICLES: { if(!rows) { SendClientMessage(extraid, COLOR_GREY, "You own no vehicles which you can spawn."); } else { new string[1024]; string = "#\tModel\tLocation"; for(new i = 0; i < rows; i ++) { format(string, sizeof(string), "%s\n%i\t%s\t%s", string, i + 1, vehicleNames[cache_get_field_content_int(i, "modelid") - 400], (cache_get_field_content_int(i, "world")) ? ("Garage") : (GetZoneName(cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z")))); } ShowPlayerDialog(extraid, DIALOG_SPAWNCAR, DIALOG_STYLE_TABLIST_HEADERS, "Choose a vehicle to spawn.", string, "Select", "Cancel"); } } case THREAD_FACTION_ROSTER: { new username[MAX_PLAYER_NAME], date[24]; SendClientMessage(extraid, COLOR_GREEN, "|____ Faction Roster ____|"); for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "username", username); cache_get_field_content(i, "lastlogin", date); SendClientMessageEx(extraid, COLOR_GREY2, "%s %s - Last Seen: %s", FactionRanks[PlayerInfo[extraid][pFaction]][cache_get_field_content_int(i, "factionrank")], username, date); } } case THREAD_GANG_ROSTER: { new username[MAX_PLAYER_NAME], date[24]; SendClientMessage(extraid, COLOR_GREEN, "|____ Gang Roster ____|"); for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "username", username); cache_get_field_content(i, "lastlogin", date); SendClientMessageEx(extraid, COLOR_GREY2, "[%i] %s %s - Last Seen: %s", cache_get_field_content_int(i, "gangrank"), GangRanks[PlayerInfo[extraid][pGang]][cache_get_field_content_int(i, "gangrank")], username, date); } } case THREAD_VIEW_PHONEBOOK: { if((!rows) && PlayerInfo[extraid][pPage] == 1) { SendClientMessage(extraid, COLOR_GREY, "The phonebook directory is currently empty."); } else { static string[MAX_LISTED_NUMBERS * 32], name[MAX_PLAYER_NAME]; string = "#\tName\tNumber"; for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "name", name); format(string, sizeof(string), "%s\n%i\t%s\t%i", string, ((PlayerInfo[extraid][pPage] - 1) * MAX_LISTED_NUMBERS) + (i + 1), name, cache_get_field_content_int(i, "number")); } if(PlayerInfo[extraid][pPage] > 1) { strcat(string, "\n{FF6347}<< Go back{FFFFFF}"); } if(rows == MAX_LISTED_NUMBERS) { strcat(string, "\n{00AA00}>> Next page{FFFFFF}"); } ShowPlayerDialog(extraid, DIALOG_PHONEBOOK, DIALOG_STYLE_TABLIST_HEADERS, "Phonebook directory", string, "Select", "Close"); } } case THREAD_COUNT_LANDOBJECTS: { if(cache_get_row_int(0, 0) >= GetLandObjectCapacity(extraid)) { SendClientMessageEx(extraid, COLOR_GREY, "You are only only allowed up to %i objects for your land.", GetLandObjectCapacity(extraid)); } else { ShowDialogToPlayer(extraid, DIALOG_LANDBUILD1); } } case THREAD_SELL_LANDOBJECT: { if(cache_get_row_count(connectionID)) { new name[32], price = percent(cache_get_field_content_int(0, "price"), 75); cache_get_field_content(0, "name", name); GivePlayerCash(extraid, price); SendClientMessageEx(extraid, COLOR_AQUA, "You have sold {FF6347}%s{33CCFF} and received a 75 percent refund of {00AA00}$%i{33CCFF}.", name, price); RemoveLandObject(PlayerInfo[extraid][pSelected]); } } case THREAD_DUPLICATE_LANDOBJECT: { //name, modelid, price, pos_x, pos_y, pos_z, rot_x, rot_y, rot_z if(cache_get_row_count(connectionID)) { new string[20], name[32], landid = GetNearbyLand(extraid); new modelid = cache_get_field_content_int(0, "modelid"); new price = cache_get_field_content_int(0, "price"); new Float:x = cache_get_field_content_float(0, "pos_x"); new Float:y = cache_get_field_content_float(0, "pos_y"); new Float:z = cache_get_field_content_float(0, "pos_z"); new Float:rx = cache_get_field_content_float(0, "rot_x"); new Float:ry = cache_get_field_content_float(0, "rot_y"); new Float:rz = cache_get_field_content_float(0, "rot_z"); if(PlayerInfo[extraid][pCash] < price) { SendClientMessage(extraid, COLOR_GREY, "You can't afford to duplicate this object."); } else { PlayerInfo[extraid][pObjectLand] = landid; cache_get_field_content(0, "name", name); GivePlayerCash(extraid, -price); SendClientMessageEx(extraid, COLOR_GREEN, "%s duplicated for $%i. You will now edit this object.", name, price); format(string, sizeof(string), "~r~-$%i", price); GameTextForPlayer(extraid, string, 5000, 1); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO landobjects VALUES(null, %i, %i, '%e', %i, '%f', '%f', '%f', '%f', '%f', '%f', 0, 0, '%f', '%f', '%f', '-1000.0', '-1000.0', '-1000.0')", LandInfo[landid][lID], modelid, name, price, x, y, z, rx, ry, rz, x, y, z - 10.0); mysql_tquery(connectionID, queryBuffer); mysql_tquery(connectionID, "SELECT * FROM landobjects WHERE id = LAST_INSERT_ID()", "OnQueryFinished", "ii", THREAD_LOAD_LANDOBJECTS, LandInfo[landid][lLabels]); mysql_tquery(connectionID, "SELECT LAST_INSERT_ID() FROM landobjects LIMIT 1", "OnQueryFinished", "ii", THREAD_DUPLICATED_OBJECT, extraid); } } } case THREAD_DUPLICATED_OBJECT: { if(cache_get_row_count(connectionID)) { new id = cache_get_row_int(0, 0); for(new i = 0; i <= Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i ++) { if(IsValidDynamicObject(i) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID) == id) { PlayerInfo[extraid][pEditType] = EDIT_LAND_OBJECT; PlayerInfo[extraid][pEditObject] = i; EditDynamicObject(extraid, i); GameTextForPlayer(extraid, "~w~Editing Mode~n~~g~Click disk to save~n~~r~Press ESC to cancel", 5000, 1); //PlayerInfo[extraid][pSelected] = i; //ShowDialogToPlayer(extraid, DIALOG_LANDOBJECTMENU); break; } } } } case THREAD_CLEAR_LANDOBJECTS: { if(!rows) { SendClientMessage(extraid, COLOR_GREY, "Your land contains no furniture which can be sold."); } else { new price, landid = GetNearbyLand(extraid); for(new i = 0; i < rows; i ++) { price += percent(cache_get_field_content_int(i, "price"), 75); } RemoveAllLandObjects(landid); GivePlayerCash(extraid, price); SendClientMessageEx(extraid, COLOR_AQUA, "You have sold a total of %i items and received {00AA00}$%i{33CCFF} back.", rows, price); } } case THREAD_LIST_LANDOBJECTS: { if((!rows) && PlayerInfo[extraid][pPage] == 1) { SendClientMessage(extraid, COLOR_GREY, "Your land contains no objects which can be listed."); } else { static string[MAX_LISTED_OBJECTS * 48], name[32]; string = "#\tName\tCost\tDistance"; for(new i = 0; i < rows; i ++) { cache_get_field_content(i, "name", name); format(string, sizeof(string), "%s\n%i\t%s\t{00AA00}$%i{FFFFFF}\t%.1fm", string, GetLandObjectID(cache_get_field_content_int(i, "id")), name, cache_get_field_content_int(i, "price"), GetPlayerDistanceFromPoint(extraid, cache_get_field_content_float(i, "pos_x"), cache_get_field_content_float(i, "pos_y"), cache_get_field_content_float(i, "pos_z"))); } if(PlayerInfo[extraid][pPage] > 1) { strcat(string, "\n{FF6347}<< Go back{FFFFFF}"); } if(rows == MAX_LISTED_OBJECTS) { strcat(string, "\n{00AA00}>> Next page{FFFFFF}"); } ShowPlayerDialog(extraid, DIALOG_LANDOBJECTS, DIALOG_STYLE_TABLIST_HEADERS, "List of objects", string, "Select", "Back"); } } case THREAD_LAND_INFORMATION: { new landid = GetNearbyLand(extraid); SendClientMessage(extraid, COLOR_GREEN, "|______ My Land ______|"); SendClientMessageEx(extraid, COLOR_GREY2, "(ID: %i) - (Value: $%i) - (Objects: %i/%i) - (Location: %s)", landid, LandInfo[landid][lPrice], cache_get_row_int(0, 0), GetLandObjectCapacity(landid), GetZoneName(LandInfo[landid][lMinX], LandInfo[landid][lMinY], LandInfo[landid][lHeight])); } case THREAD_LOAD_VEHICLES: { new modelid, Float:pos_x, Float:pos_y, Float:pos_z, Float:pos_a, color1, color2, respawndelay, vehicleid; for(new i = 0; i < rows; i ++) { modelid = cache_get_field_content_int(i, "modelid"), pos_x = cache_get_field_content_float(i, "pos_x"), pos_y = cache_get_field_content_float(i, "pos_y"), pos_z = cache_get_field_content_float(i, "pos_z"), pos_a = cache_get_field_content_float(i, "pos_a"), color1 = cache_get_field_content_int(i, "color1"), color2 = cache_get_field_content_int(i, "color2"), respawndelay = cache_get_field_content_int(i, "respawndelay"); vehicleid = CreateVehicle(modelid, pos_x, pos_y, pos_z, pos_a, color1, color2, respawndelay); if(vehicleid != INVALID_VEHICLE_ID) { VehicleInfo[vehicleid][vID] = cache_get_field_content_int(i, "id"); VehicleInfo[vehicleid][vGang] = cache_get_field_content_int(i, "gangid"); VehicleInfo[vehicleid][vFactionType] = cache_get_field_content_int(i, "factiontype"); VehicleInfo[vehicleid][vJob] = cache_get_field_content_int(i, "job"); VehicleInfo[vehicleid][vHealth] = cache_get_field_content_int(i, "health"); if(VehicleInfo[vehicleid][vGang] >= 0) { VehicleInfo[vehicleid][vPrice] = cache_get_field_content_int(i, "price"); VehicleInfo[vehicleid][vLocked] = cache_get_field_content_int(i, "locked"); VehicleInfo[vehicleid][vPaintjob] = cache_get_field_content_int(i, "paintjob"); VehicleInfo[vehicleid][vInterior] = cache_get_field_content_int(i, "interior"); VehicleInfo[vehicleid][vWorld] = cache_get_field_content_int(i, "world"); VehicleInfo[vehicleid][vMods][0] = cache_get_field_content_int(i, "mod_1"); VehicleInfo[vehicleid][vMods][1] = cache_get_field_content_int(i, "mod_2"); VehicleInfo[vehicleid][vMods][2] = cache_get_field_content_int(i, "mod_3"); VehicleInfo[vehicleid][vMods][3] = cache_get_field_content_int(i, "mod_4"); VehicleInfo[vehicleid][vMods][4] = cache_get_field_content_int(i, "mod_5"); VehicleInfo[vehicleid][vMods][5] = cache_get_field_content_int(i, "mod_6"); VehicleInfo[vehicleid][vMods][6] = cache_get_field_content_int(i, "mod_7"); VehicleInfo[vehicleid][vMods][7] = cache_get_field_content_int(i, "mod_8"); VehicleInfo[vehicleid][vMods][8] = cache_get_field_content_int(i, "mod_9"); VehicleInfo[vehicleid][vMods][9] = cache_get_field_content_int(i, "mod_10"); VehicleInfo[vehicleid][vMods][10] = cache_get_field_content_int(i, "mod_11"); VehicleInfo[vehicleid][vMods][11] = cache_get_field_content_int(i, "mod_12"); VehicleInfo[vehicleid][vMods][12] = cache_get_field_content_int(i, "mod_13"); VehicleInfo[vehicleid][vMods][13] = cache_get_field_content_int(i, "mod_14"); ReloadVehicle(vehicleid); } VehicleInfo[vehicleid][vModel] = modelid; VehicleInfo[vehicleid][vPosX] = pos_x; VehicleInfo[vehicleid][vPosY] = pos_y; VehicleInfo[vehicleid][vPosZ] = pos_z; VehicleInfo[vehicleid][vPosA] = pos_a; VehicleInfo[vehicleid][vColor1] = color1; VehicleInfo[vehicleid][vColor2] = color2; VehicleInfo[vehicleid][vRespawnDelay] = respawndelay; VehicleInfo[vehicleid][vObjects][0] = INVALID_OBJECT_ID; VehicleInfo[vehicleid][vObjects][1] = INVALID_OBJECT_ID; VehicleInfo[vehicleid][vTimer] = -1; vehicleFuel[vehicleid] = 100; SetVehicleHealth(vehicleid, VehicleInfo[vehicleid][vHealth]); } } } case THREAD_GANG_INFORMATION: { if(rows) { new count, total; for(new i = 0; i < MAX_TURFS; i ++) { if(TurfInfo[i][tExists]) { if(TurfInfo[i][tCapturedGang] == PlayerInfo[extraid][pGang]) count++; else if(TurfInfo[i][tType] != 8) total++; } } SendClientMessageEx(extraid, COLOR_GREEN, "|_____ %s _____|", GangInfo[PlayerInfo[extraid][pGang]][gName]); SendClientMessageEx(extraid, COLOR_GREY2, "Leader: %s - Level: %i/3 - Strikes: %i/3 - Members: %i/%i - Vehicles: %i/%i", GangInfo[PlayerInfo[extraid][pGang]][gLeader], GangInfo[PlayerInfo[extraid][pGang]][gLevel], GangInfo[PlayerInfo[extraid][pGang]][gStrikes], cache_get_row_int(0, 0), GetGangMemberLimit(PlayerInfo[extraid][pGang]), GetGangVehicles(PlayerInfo[extraid][pGang]), GetGangVehicleLimit(PlayerInfo[extraid][pGang])); SendClientMessageEx(extraid, COLOR_GREY2, "Gang Points: %i GP - Turf Tokens: %i - Cash: $%i/$%i - Materials: %i/%i", GangInfo[PlayerInfo[extraid][pGang]][gPoints], GangInfo[PlayerInfo[extraid][pGang]][gTurfTokens], GangInfo[PlayerInfo[extraid][pGang]][gCash], GetGangStashCapacity(PlayerInfo[extraid][pGang], STASH_CAPACITY_CASH), GangInfo[PlayerInfo[extraid][pGang]][gMaterials], GetGangStashCapacity(PlayerInfo[extraid][pGang], STASH_CAPACITY_MATERIALS)); SendClientMessageEx(extraid, COLOR_GREY2, "Turfs: %i/%i - Weed: %i/%ig - Cocaine: %i/%ig - Meth: %i/%ig - Painkillers: %i/%i", count, total, GangInfo[PlayerInfo[extraid][pGang]][gWeed], GetGangStashCapacity(PlayerInfo[extraid][pGang], STASH_CAPACITY_WEED), GangInfo[PlayerInfo[extraid][pGang]][gCocaine], GetGangStashCapacity(PlayerInfo[extraid][pGang], STASH_CAPACITY_COCAINE), GangInfo[PlayerInfo[extraid][pGang]][gMeth], GetGangStashCapacity(PlayerInfo[extraid][pGang], STASH_CAPACITY_METH), GangInfo[PlayerInfo[extraid][pGang]][gPainkillers], GetGangStashCapacity(PlayerInfo[extraid][pGang], STASH_CAPACITY_PAINKILLERS)); SendClientMessageEx(extraid, COLOR_GREY2, "Hollow point: %i/%i - Poison tip: %i/%i - Full metal jacket: %i/%i", GangInfo[PlayerInfo[extraid][pGang]][gHPAmmo], GetGangStashCapacity(PlayerInfo[extraid][pGang], STASH_CAPACITY_HPAMMO), GangInfo[PlayerInfo[extraid][pGang]][gPoisonAmmo], GetGangStashCapacity(PlayerInfo[extraid][pGang], STASH_CAPACITY_POISONAMMO), GangInfo[PlayerInfo[extraid][pGang]][gFMJAmmo], GetGangStashCapacity(PlayerInfo[extraid][pGang], STASH_CAPACITY_FMJAMMO)); } } case THREAD_OFFLINE_IP: { if(!rows) { SendClientMessage(extraid, COLOR_GREY, "The username specified is not registered."); } else { new username[MAX_PLAYER_NAME], ip[16]; cache_get_field_content(0, "username", username); cache_get_field_content(0, "ip", ip); SendClientMessageEx(extraid, COLOR_WHITE, "** %s's IP: %s **", username, ip); } } case THREAD_CHECK_REFERRAL: { if(!rows) { SendClientMessage(extraid, COLOR_GREY, "The player specified doesn't exist."); ShowDialogToPlayer(extraid, DIALOG_REFERRAL); } else { new username[MAX_PLAYER_NAME], ip[16]; cache_get_field_content(0, "username", username); cache_get_field_content(0, "ip", ip); if(!strcmp(GetPlayerIP(extraid), ip)) { SendClientMessage(extraid, COLOR_GREY, "This account is listed under your own IP address. You can't refer yourself."); ShowDialogToPlayer(extraid, DIALOG_REFERRAL); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET referral_uid = %i WHERE uid = %i", cache_get_field_content_int(0, "uid"), PlayerInfo[extraid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[extraid][pTutorial] = 1; PlayerInfo[extraid][pTutorialTimer] = SetTimerEx("TutorialTimer", 3000, false, "ii", extraid, 1); PlayerInfo[extraid][pReferralUID] = cache_get_field_content_int(0, "uid"); SendClientMessageEx(extraid, COLOR_GREEN, "** You have chosen %s as your referrer. They will be rewarded once you reach level 3.", username); SendClientMessage(extraid, COLOR_GREEN, "** Good stuff! That's all we need right now. The tutorial will start in a moment."); } } } case THREAD_REWARD_REFERRER: { if(rows) { new username[MAX_PLAYER_NAME], ip[16], referralid = INVALID_PLAYER_ID; cache_get_field_content(0, "username", username); cache_get_field_content(0, "ip", ip); // Add a log entry for this referral. Log_Write("log_referrals", "%s (uid: %i) (IP: %s) has received 3 cookies for referring %s (uid: %i) (IP: %s).", username, PlayerInfo[extraid][pReferralUID], ip, GetPlayerNameEx(extraid), PlayerInfo[extraid][pID], GetPlayerIP(extraid)); // Check to see if any of the players online match the player's referral UID. foreach(new i : Player) { if(i != extraid && PlayerInfo[i][pLogged] && PlayerInfo[i][pID] == PlayerInfo[extraid][pReferralUID]) { referralid = i; break; } } // Referrer is online. if(referralid != INVALID_PLAYER_ID && strcmp(GetPlayerIP(referralid), GetPlayerIP(extraid)) != 0) { PlayerInfo[referralid][pCookies] += 3; SendClientMessage(referralid, COLOR_GREEN, "A player who you've referred reached level 3. Therefore you received 3 cookies!"); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s (IP: %s) earned 3 cookies for referring %s (IP: %s).", GetPlayerRPName(referralid), GetPlayerIP(referralid), GetPlayerRPName(extraid), GetPlayerIP(extraid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = cookies + 3 WHERE uid = %i AND ip != '%s'", PlayerInfo[extraid][pReferralUID], GetPlayerIP(extraid)); mysql_tquery(connectionID, queryBuffer); } else { // Referrer is offline. Let's give them their cookies and increment refercount which sends them an alert on login! mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = cookies + 3, refercount = refercount + 1 WHERE uid = %i AND ip != '%s'", PlayerInfo[extraid][pReferralUID], GetPlayerIP(extraid)); mysql_tquery(connectionID, queryBuffer); } // Finally, remove the player's link to the referrer as the prize has been given. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET referral_uid = 0 WHERE uid = %i", PlayerInfo[extraid][pID]); mysql_tquery(connectionID, queryBuffer); } } case THREAD_LIST_FLAGGED: { new flags[MAX_PLAYERS], username[MAX_PLAYER_NAME], targetid; SendClientMessage(extraid, COLOR_GREEN, "|____ Flagged Players ____|"); for(new i = 0; i < rows; i ++) { cache_get_row(i, 0, username); if(IsPlayerOnline(username, targetid)) { flags[targetid]++; } } foreach(new i : Player) { if(flags[i] > 0) { SendClientMessageEx(extraid, COLOR_GREY3, "** %s[%i] has %i active flags.", GetPlayerRPName(i), i, flags[i]); } } } } } // --------------------------------------- public OnGameModeInit() { new string[128]; connectionID = mysql_connect(MYSQL_HOSTNAME, MYSQL_USERNAME, MYSQL_DATABASE, MYSQL_PASSWORD); if(mysql_errno(connectionID)) { print("[ERROR] - Unable to establish a connection with the MySQL server..."); SendRconCommand("exit"); return 0; } radioConnectionID = mysql_connect(MYSQL_HOSTNAME, MYSQL_USERNAME, "shoutcast", MYSQL_PASSWORD); if(mysql_errno(radioConnectionID)) { print("[WARNING] - Couldn't connect to radio station database... server will continue to operate normally."); radioConnectionID = 0; } for(new i = 0; i < MAX_VEHICLES; i ++) { ResetVehicle(i); } mysql_tquery(connectionID, "TRUNCATE TABLE shots"); mysql_tquery(connectionID, "SELECT * FROM houses", "OnQueryFinished", "ii", THREAD_LOAD_HOUSES, 0); mysql_tquery(connectionID, "SELECT * FROM furniture", "OnQueryFinished", "ii", THREAD_LOAD_FURNITURE, 0); mysql_tquery(connectionID, "SELECT * FROM garages", "OnQueryFinished", "ii", THREAD_LOAD_GARAGES, 0); mysql_tquery(connectionID, "SELECT * FROM businesses", "OnQueryFinished", "ii", THREAD_LOAD_BUSINESSES, 0); mysql_tquery(connectionID, "SELECT * FROM entrances", "OnQueryFinished", "ii", THREAD_LOAD_ENTRANCES, 0); mysql_tquery(connectionID, "SELECT * FROM factions", "OnQueryFinished", "ii", THREAD_LOAD_FACTIONS, 0); mysql_tquery(connectionID, "SELECT * FROM factionranks", "OnQueryFinished", "ii", THREAD_LOAD_FACTIONRANKS, 0); mysql_tquery(connectionID, "SELECT * FROM factionskins", "OnQueryFinished", "ii", THREAD_LOAD_FACTIONSKINS, 0); mysql_tquery(connectionID, "SELECT * FROM factionpay", "OnQueryFinished", "ii", THREAD_LOAD_FACTIONPAY, 0); mysql_tquery(connectionID, "SELECT * FROM divisions", "OnQueryFinished", "ii", THREAD_LOAD_DIVISIONS, 0); mysql_tquery(connectionID, "SELECT * FROM lands", "OnQueryFinished", "ii", THREAD_LOAD_LANDS, 0); mysql_tquery(connectionID, "SELECT * FROM landobjects", "OnQueryFinished", "ii", THREAD_LOAD_LANDOBJECTS, 0); mysql_tquery(connectionID, "SELECT * FROM vehicles WHERE ownerid = 0", "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, 0); mysql_tquery(connectionID, "SELECT * FROM gangs", "OnQueryFinished", "ii", THREAD_LOAD_GANGS, 0); mysql_tquery(connectionID, "SELECT * FROM gangranks", "OnQueryFinished", "ii", THREAD_LOAD_GANGRANKS, 0); mysql_tquery(connectionID, "SELECT * FROM gangskins", "OnQueryFinished", "ii", THREAD_LOAD_GANGSKINS, 0); mysql_tquery(connectionID, "SELECT * FROM points", "OnQueryFinished", "ii", THREAD_LOAD_POINTS, 0); mysql_tquery(connectionID, "SELECT * FROM turfs", "OnQueryFinished", "ii", THREAD_LOAD_TURFS, 0); SetGameModeText("LL:RP "SERVER_REVISION); SetWeather(gWeather); SetNameTagDrawDistance(30.0); //ShowPlayerMarkers(0); EnableStuntBonusForAll(0); UsePlayerPedAnims(); DisableInteriorEnterExits(); ManualVehicleEngineAndLights(); SetDoubleXP(0); Streamer_SetVisibleItems(STREAMER_TYPE_OBJECT, 1000); Streamer_TickRate(20); // Materials pickup 1 CreateDynamic3DTextLabel("Materials pickup 1\nCost: $150\n/smugglemats to begin.", COLOR_YELLOW, 1421.6913, -1318.4719, 13.5547, 10.0); CreateDynamicPickup(1318, 1, 1421.6913, -1318.4719, 13.5547); // Materials pickup 2 CreateDynamic3DTextLabel("Materials pickup 2\nCost: $150\n/smugglemats to begin.", COLOR_YELLOW, 2393.4885, -2008.5726, 13.3467, 10.0); CreateDynamicPickup(1318, 1, 2393.4885, -2008.5726, 13.3467); // Hospital exit CreateDynamic3DTextLabel("(( /exit ))", COLOR_GREY2, -45.3173, 157.9171, 999.0613, 20.0); CreateDynamic3DTextLabel("Loading dock\n/load and pick a load\nto begin delivery.", COLOR_YELLOW, -63.4372, -1121.4932, 1.1103, 10.0); CreateDynamicPickup(1239, 1, -63.4372, -1121.4932, 1.1103); CreateDynamic3DTextLabel("Mechanic components\n/buycomps to purchase.", COLOR_YELLOW, 2330.0369, -2315.4553, 13.5469, 10.0); CreateDynamicPickup(1239, 1, 2330.0369, -2315.4553, 13.5469); CreateDynamic3DTextLabel("Drivers test\nCost: $500\n/taketest to begin.", COLOR_YELLOW, -2033.2953, -117.4508, 1035.1719, 10.0); CreateDynamicPickup(1239, 1, -2033.2953, -117.4508, 1035.1719); CreateDynamic3DTextLabel("Grotti dealership\n/buyvehicle to view catalog.\n/upgradevehicle for upgrades.", COLOR_YELLOW, 542.0433, -1293.5909, 17.2422, 10.0); CreateDynamicPickup(1274, 1, 542.0433, -1293.5909, 17.2422); CreateDynamic3DTextLabel("Paintball arena\n/enter to play paintball!", COLOR_YELLOW, 1738.7400, -1269.8062, 13.5433, 10.0); CreateDynamicPickup(1254, 1, 1738.7400, -1269.8062, 13.5433); CreateDynamic3DTextLabel("Name changes\nCost: $7500/level\n/changename to request one.", COLOR_YELLOW, 362.0502, 173.6520, 1008.3828, 10.0); CreateDynamicPickup(1239, 1, 362.0502, 173.6520, 1008.3828); CreateDynamic3DTextLabel("Drug smuggling\nCost: $500\n/smuggledrugs to begin smuggling.", COLOR_YELLOW, 52.0937, -292.2513, 1.7001, 10.0); CreateDynamicPickup(1279, 1, 52.0937, -292.2513, 1.7001); CreateDynamic3DTextLabel("Meth cookoff\nRequires ephedrine\n/cookmeth to begin cooking.", COLOR_YELLOW, 1.2179, 2.8095, 999.4284, 10.0, .interiorid = 2, .worldid = 10); CreateDynamicPickup(1577, 1, 1.2179, 2.8095, 999.4284, .interiorid = 2, .worldid = 10); CreateDynamic3DTextLabel("Banking commands\n/bankhelp for more help.", COLOR_YELLOW, 1667.4260, -972.6691, 683.6873, 10.0); CreateDynamicPickup(1239, 1, 1667.4260, -972.6691, 683.6873); gEphedrineStockText = CreateDynamic3DTextLabel("Raw ephedrine\nStock: 100\n/buydrug ephedrine [amount]", COLOR_YELLOW, 323.7289, 1117.4187, 1083.8828, 10.0); CreateDynamicPickup(1577, 1, 323.7289, 1117.1797, 1083.8828); gSeedsStockText = CreateDynamic3DTextLabel("Marijuana seeds\nStock: 100\n/buydrug seeds [amount]", COLOR_YELLOW, 321.8347, 1117.1797, 1083.8828, 10.0); CreateDynamicPickup(1578, 1, 321.8347, 1117.1797, 1083.8828); gCocaineText = CreateDynamic3DTextLabel("Cocaine\nStock: 100\n/buydrug cocaine [amount]", COLOR_YELLOW, 2342.7766, -1187.0839, 1027.9766, 10.0); CreateDynamicPickup(1575, 1, 2342.7766, -1187.0839, 1027.9766); gVIPHealth = CreateDynamicPickup(1240, 1, -2653.8220, 1407.3859, 906.2734, .worldid = 7, .interiorid = 3); gVIPArmor = CreateDynamicPickup(1242, 1, -2653.8613, 1413.2609, 906.2734, .worldid = 7, .interiorid = 3); gParachutes[0] = CreateDynamicPickup(371, 1, 1542.9038, -1353.0352, 329.4744); // Star tower gParachutes[1] = CreateDynamicPickup(371, 1, 315.9415, 1010.6052, 1953.0031); // Andromada interior for(new i = 0; i < sizeof(staticEntrances); i ++) { format(string, sizeof(string), "%s\n/enter to go inside.", staticEntrances[i][eName]); CreateDynamicPickup(1239, 1, staticEntrances[i][ePosX], staticEntrances[i][ePosY], staticEntrances[i][ePosZ]); CreateDynamic3DTextLabel(string, COLOR_GREY1, staticEntrances[i][ePosX], staticEntrances[i][ePosY], staticEntrances[i][ePosZ], 10.0); } for(new i = 0; i < sizeof(jobLocations); i ++) { format(string, sizeof(string), "%s\n{E6E6E6}/join to get job.", jobLocations[i][jobName]); CreateDynamicPickup(1239, 1, jobLocations[i][jobX], jobLocations[i][jobY], jobLocations[i][jobZ]); CreateDynamic3DTextLabel(string, COLOR_YELLOW, jobLocations[i][jobX], jobLocations[i][jobY], jobLocations[i][jobZ], 10.0); } for(new i = 0; i < sizeof(atmMachines); i ++) { CreateDynamicObject(19324, atmMachines[i][atmX], atmMachines[i][atmY], atmMachines[i][atmZ], 0.0, 0.0, atmMachines[i][atmA]); CreateDynamic3DTextLabel("ATM machine\n/atm to withdraw cash.", COLOR_YELLOW, atmMachines[i][atmX], atmMachines[i][atmY], atmMachines[i][atmZ] + 0.4, 10.0); } for(new i = 0; i < sizeof(minerPositions); i ++) { CreateDynamic3DTextLabel("/mine\nto begin mining.", COLOR_YELLOW, minerPositions[i][0], minerPositions[i][1], minerPositions[i][2], 25.0); } for(new i = 0; i < sizeof(arrestPoints); i ++) { CreateDynamic3DTextLabel("/arrest\nto arrest a suspect.", COLOR_YELLOW, arrestPoints[i][0], arrestPoints[i][1], arrestPoints[i][2], 7.0); CreateDynamicPickup(1247, 1, arrestPoints[i][0], arrestPoints[i][1], arrestPoints[i][2]); } // Login screen LoginScreen[0] = TextDrawCreate(19.000000, 191.000000, "~y~Recent updates:~n~~w~- n/a."); TextDrawBackgroundColor(LoginScreen[0], 255); TextDrawFont(LoginScreen[0], 1); TextDrawLetterSize(LoginScreen[0], 0.189999, 1.100000); TextDrawColor(LoginScreen[0], -1); TextDrawSetOutline(LoginScreen[0], 1); TextDrawSetProportional(LoginScreen[0], 1); LoginScreen[1] = TextDrawCreate(321.000000, 427.000000, "The player record count is ~y~0~w~, achieved on n/a."); TextDrawAlignment(LoginScreen[1], 2); TextDrawBackgroundColor(LoginScreen[1], 255); TextDrawFont(LoginScreen[1], 1); TextDrawLetterSize(LoginScreen[1], 0.210000, 1.000000); TextDrawColor(LoginScreen[1], -1); TextDrawSetOutline(LoginScreen[1], 1); TextDrawSetProportional(LoginScreen[1], 1); LoginScreen[2] = TextDrawCreate(527.000000, 191.000000, "~y~Top ten players:~n~~w~- n/a"); TextDrawBackgroundColor(LoginScreen[2], 255); TextDrawFont(LoginScreen[2], 1); TextDrawLetterSize(LoginScreen[2], 0.189999, 1.100000); TextDrawColor(LoginScreen[2], -1); TextDrawSetOutline(LoginScreen[2], 1); TextDrawSetProportional(LoginScreen[2], 1); LoginScreen[3] = TextDrawCreate(314.000000, 9.000000, "Limitless Roleplay~n~~b~Revision "SERVER_REVISION); TextDrawAlignment(LoginScreen[3], 2); TextDrawBackgroundColor(LoginScreen[3], 255); TextDrawFont(LoginScreen[3], 0); TextDrawLetterSize(LoginScreen[3], 0.430000, 1.799999); TextDrawColor(LoginScreen[3], -1); TextDrawSetOutline(LoginScreen[3], 1); TextDrawSetProportional(LoginScreen[3], 1); // Website textdraw WebsiteTD = TextDrawCreate(501.000000, 6.000000, "www.limitlessrp.com"); TextDrawBackgroundColor(WebsiteTD, 255); TextDrawFont(WebsiteTD, 1); TextDrawLetterSize(WebsiteTD, 0.250000, 1.000000); TextDrawColor(WebsiteTD, -1); TextDrawSetOutline(WebsiteTD, 1); TextDrawSetProportional(WebsiteTD, 1); // Time textdraw TimeTD = TextDrawCreate(575.000000, 20.000000, "12:34"); TextDrawAlignment(TimeTD, 2); TextDrawBackgroundColor(TimeTD, 255); TextDrawFont(TimeTD, 3); TextDrawLetterSize(TimeTD, 0.430000, 1.790000); TextDrawColor(TimeTD, -1); TextDrawSetOutline(TimeTD, 1); TextDrawSetProportional(TimeTD, 1); // Animation textdraw AnimationTD = TextDrawCreate(435.000000, 426.000000, "Press ~r~~k~~PED_SPRINT~~w~ to stop animation"); TextDrawBackgroundColor(AnimationTD, 255); TextDrawFont(AnimationTD, 2); TextDrawLetterSize(AnimationTD, 0.260000, 1.299999); TextDrawColor(AnimationTD, -1); TextDrawSetOutline(AnimationTD, 1); TextDrawSetProportional(AnimationTD, 1); #if defined SERVER_INTRO // Server intro by Josh & Emmet introTextdraws[0] = TextDrawCreate(660.000000, -59.000000, "_"); TextDrawBackgroundColor(introTextdraws[0], 255); TextDrawFont(introTextdraws[0], 1); TextDrawLetterSize(introTextdraws[0], 0.500000, 19.000000); TextDrawColor(introTextdraws[0], -1); TextDrawSetOutline(introTextdraws[0], 0); TextDrawSetProportional(introTextdraws[0], 1); TextDrawSetShadow(introTextdraws[0], 1); TextDrawUseBox(introTextdraws[0], 1); TextDrawBoxColor(introTextdraws[0], 255); TextDrawTextSize(introTextdraws[0], -50.000000, 0.000000); introTextdraws[1] = TextDrawCreate(651.000000, 338.000000, "_"); TextDrawBackgroundColor(introTextdraws[1], 255); TextDrawFont(introTextdraws[1], 1); TextDrawLetterSize(introTextdraws[1], 0.500000, 19.000000); TextDrawColor(introTextdraws[1], -1); TextDrawSetOutline(introTextdraws[1], 0); TextDrawSetProportional(introTextdraws[1], 1); TextDrawSetShadow(introTextdraws[1], 1); TextDrawUseBox(introTextdraws[1], 1); TextDrawBoxColor(introTextdraws[1], 255); TextDrawTextSize(introTextdraws[1], -50.000000, 0.000000); introTextdraws[2] = TextDrawCreate(249.000000, 144.000000, "Limitless Gaming"); TextDrawBackgroundColor(introTextdraws[2], 255); TextDrawFont(introTextdraws[2], 2); TextDrawLetterSize(introTextdraws[2], 0.400000, 2.099999); TextDrawColor(introTextdraws[2], 144559871); TextDrawSetOutline(introTextdraws[2], 1); TextDrawSetProportional(introTextdraws[2], 1); introTextdraws[3] = TextDrawCreate(331.000000, 161.000000, "Presents..."); TextDrawBackgroundColor(introTextdraws[3], 255); TextDrawFont(introTextdraws[3], 2); TextDrawLetterSize(introTextdraws[3], 0.300000, 1.799999); TextDrawColor(introTextdraws[3], -1); TextDrawSetOutline(introTextdraws[3], 1); TextDrawSetProportional(introTextdraws[3], 1); introTextdraws[4] = TextDrawCreate(288.000000, 156.000000, "Grand~n~ Theft~n~Auto"); TextDrawBackgroundColor(introTextdraws[4], 255); TextDrawFont(introTextdraws[4], 3); TextDrawLetterSize(introTextdraws[4], 0.750000, 2.999999); TextDrawColor(introTextdraws[4], -1); TextDrawSetOutline(introTextdraws[4], 1); TextDrawSetProportional(introTextdraws[4], 1); introTextdraws[5] = TextDrawCreate(261.000000, 233.000000, "Limitless Roleplay"); TextDrawBackgroundColor(introTextdraws[5], 255); TextDrawFont(introTextdraws[5], 0); TextDrawLetterSize(introTextdraws[5], 0.599999, 2.699999); TextDrawColor(introTextdraws[5], 144559871); TextDrawSetOutline(introTextdraws[5], 1); TextDrawSetProportional(introTextdraws[5], 1); introTextdraws[6] = TextDrawCreate(513.000000, 176.000000, "Management"); TextDrawBackgroundColor(introTextdraws[6], 255); TextDrawFont(introTextdraws[6], 0); TextDrawLetterSize(introTextdraws[6], 0.579999, 2.399997); TextDrawColor(introTextdraws[6], 144559871); TextDrawSetOutline(introTextdraws[6], 1); TextDrawSetProportional(introTextdraws[6], 1); introTextdraws[7] = TextDrawCreate(555.000000, 201.000000, "JEinstein~n~Unlimited"); TextDrawAlignment(introTextdraws[7], 2); TextDrawBackgroundColor(introTextdraws[7], 255); TextDrawFont(introTextdraws[7], 2); TextDrawLetterSize(introTextdraws[7], 0.189999, 1.399997); TextDrawColor(introTextdraws[7], -1); TextDrawSetOutline(introTextdraws[7], 1); TextDrawSetProportional(introTextdraws[7], 1); introTextdraws[8] = TextDrawCreate(26.000000, 153.000000, "Development"); TextDrawBackgroundColor(introTextdraws[8], 255); TextDrawFont(introTextdraws[8], 0); TextDrawLetterSize(introTextdraws[8], 0.579999, 2.399997); TextDrawColor(introTextdraws[8], 144559871); TextDrawSetOutline(introTextdraws[8], 1); TextDrawSetProportional(introTextdraws[8], 1); introTextdraws[9] = TextDrawCreate(44.000000, 178.000000, "Unlimited~n~JEinstein"); TextDrawBackgroundColor(introTextdraws[9], 255); TextDrawFont(introTextdraws[9], 2); TextDrawLetterSize(introTextdraws[9], 0.189999, 1.399997); TextDrawColor(introTextdraws[9], -1); TextDrawSetOutline(introTextdraws[9], 1); TextDrawSetProportional(introTextdraws[9], 1); introTextdraws[10] = TextDrawCreate(33.000000, 219.000000, "Mapping"); TextDrawBackgroundColor(introTextdraws[10], 255); TextDrawFont(introTextdraws[10], 0); TextDrawLetterSize(introTextdraws[10], 0.579999, 2.399997); TextDrawColor(introTextdraws[10], 144559871); TextDrawSetOutline(introTextdraws[10], 1); TextDrawSetProportional(introTextdraws[10], 1); introTextdraws[11] = TextDrawCreate(65.000000, 246.000000, "Unlimited~n~Lance Lanvins"); TextDrawAlignment(introTextdraws[11], 2); TextDrawBackgroundColor(introTextdraws[11], 255); TextDrawFont(introTextdraws[11], 2); TextDrawLetterSize(introTextdraws[11], 0.189999, 1.399997); TextDrawColor(introTextdraws[11], -1); TextDrawSetOutline(introTextdraws[11], 1); TextDrawSetProportional(introTextdraws[11], 1); introTextdraws[12] = TextDrawCreate(145.000000, 144.000000, "Beta Testing"); TextDrawBackgroundColor(introTextdraws[12], 255); TextDrawFont(introTextdraws[12], 0); TextDrawLetterSize(introTextdraws[12], 0.579999, 2.399997); TextDrawColor(introTextdraws[12], 144559871); TextDrawSetOutline(introTextdraws[12], 1); TextDrawSetProportional(introTextdraws[12], 1); introTextdraws[13] = TextDrawCreate(192.000000, 168.000000, "Franklyn V Menace~n~Lui Drayton~n~Chris Shocker~n~Max Mabbitt~n~Lazlow V Rocks~n~Lance Lanvins"); TextDrawAlignment(introTextdraws[13], 2); TextDrawBackgroundColor(introTextdraws[13], 255); TextDrawFont(introTextdraws[13], 2); TextDrawLetterSize(introTextdraws[13], 0.189999, 1.399997); TextDrawColor(introTextdraws[13], -1); TextDrawSetOutline(introTextdraws[13], 1); TextDrawSetProportional(introTextdraws[13], 1); introTextdraws[14] = TextDrawCreate(428.000000, 208.000000, "Suggestions"); TextDrawBackgroundColor(introTextdraws[14], 255); TextDrawFont(introTextdraws[14], 0); TextDrawLetterSize(introTextdraws[14], 0.579999, 2.399997); TextDrawColor(introTextdraws[14], 144559871); TextDrawSetOutline(introTextdraws[14], 1); TextDrawSetProportional(introTextdraws[14], 1); introTextdraws[15] = TextDrawCreate(469.000000, 233.000000, "Lazlow_V_Rocks~n~Unlimited~n~JEinstein"); TextDrawAlignment(introTextdraws[15], 2); TextDrawBackgroundColor(introTextdraws[15], 255); TextDrawFont(introTextdraws[15], 2); TextDrawLetterSize(introTextdraws[15], 0.189999, 1.399997); TextDrawColor(introTextdraws[15], -1); TextDrawSetOutline(introTextdraws[15], 1); TextDrawSetProportional(introTextdraws[15], 1); introTextdraws[16] = TextDrawCreate(293.000000, 140.000000, "Credits"); TextDrawBackgroundColor(introTextdraws[16], 255); TextDrawFont(introTextdraws[16], 0); TextDrawLetterSize(introTextdraws[16], 0.639998, 2.599997); TextDrawColor(introTextdraws[16], 144559871); TextDrawSetOutline(introTextdraws[16], 1); TextDrawSetProportional(introTextdraws[16], 1); introTextdraws[17] = TextDrawCreate(321.000000, 165.000000, "Incognito~n~BlueG~n~Y_Less~n~Unlimited~n~JEinstein~n~Admin team~n~Helper team~n~Beta testers~n~Our players!"); TextDrawAlignment(introTextdraws[17], 2); TextDrawBackgroundColor(introTextdraws[17], 255); TextDrawFont(introTextdraws[17], 2); TextDrawLetterSize(introTextdraws[17], 0.189999, 1.399997); TextDrawColor(introTextdraws[17], -1); TextDrawSetOutline(introTextdraws[17], 1); TextDrawSetProportional(introTextdraws[17], 1); introTextdraws[18] = TextDrawCreate(391.000000, 161.000000, "Several months of development..."); TextDrawBackgroundColor(introTextdraws[18], 255); TextDrawFont(introTextdraws[18], 2); TextDrawLetterSize(introTextdraws[18], 0.240000, 1.599999); TextDrawColor(introTextdraws[18], 144559871); TextDrawSetOutline(introTextdraws[18], 1); TextDrawSetProportional(introTextdraws[18], 1); introTextdraws[19] = TextDrawCreate(421.000000, 175.000000, "To make this script possible"); TextDrawBackgroundColor(introTextdraws[19], 255); TextDrawFont(introTextdraws[19], 2); TextDrawLetterSize(introTextdraws[19], 0.240000, 1.599999); TextDrawColor(introTextdraws[19], -1); TextDrawSetOutline(introTextdraws[19], 1); TextDrawSetProportional(introTextdraws[19], 1); introTextdraws[20] = TextDrawCreate(29.000000, 161.000000, "Providing you with limitless opportunities"); TextDrawBackgroundColor(introTextdraws[20], 255); TextDrawFont(introTextdraws[20], 2); TextDrawLetterSize(introTextdraws[20], 0.240000, 1.599999); TextDrawColor(introTextdraws[20], 144559871); TextDrawSetOutline(introTextdraws[20], 1); TextDrawSetProportional(introTextdraws[20], 1); introTextdraws[21] = TextDrawCreate(29.000000, 175.000000, "One update at a time."); TextDrawBackgroundColor(introTextdraws[21], 255); TextDrawFont(introTextdraws[21], 2); TextDrawLetterSize(introTextdraws[21], 0.240000, 1.599999); TextDrawColor(introTextdraws[21], -1); TextDrawSetOutline(introTextdraws[21], 1); TextDrawSetProportional(introTextdraws[21], 1); introTextdraws[22] = TextDrawCreate(204.000000, 152.000000, "Where your options are truely limitless"); TextDrawBackgroundColor(introTextdraws[22], 255); TextDrawFont(introTextdraws[22], 2); TextDrawLetterSize(introTextdraws[22], 0.240000, 1.599999); TextDrawColor(introTextdraws[22], 144559871); TextDrawSetOutline(introTextdraws[22], 1); TextDrawSetProportional(introTextdraws[22], 1); introTextdraws[23] = TextDrawCreate(281.000000, 125.000000, "~w~Welcome to..."); // 258.00 TextDrawBackgroundColor(introTextdraws[23], 255); TextDrawFont(introTextdraws[23], 0); TextDrawLetterSize(introTextdraws[23], 0.649998, 2.699997); TextDrawColor(introTextdraws[23], 144559871); TextDrawSetOutline(introTextdraws[23], 1); TextDrawSetProportional(introTextdraws[23], 1); introTextdraws[24] = TextDrawCreate(258.000000, 146.000000, "Limitless Roleplay"); TextDrawBackgroundColor(introTextdraws[24], 255); TextDrawFont(introTextdraws[24], 0); TextDrawLetterSize(introTextdraws[24], 0.649998, 2.699997); TextDrawColor(introTextdraws[24], 144559871); TextDrawSetOutline(introTextdraws[24], 1); TextDrawSetProportional(introTextdraws[24], 1); introTextdraws[25] = TextDrawCreate(202.000000, 342.000000, "Thank you for watching this quick introduction.~n~Let's wrap this up, then you can register."); TextDrawBackgroundColor(introTextdraws[25], 255); TextDrawFont(introTextdraws[25], 2); TextDrawLetterSize(introTextdraws[25], 0.240000, 1.599999); TextDrawColor(introTextdraws[25], -1); TextDrawSetOutline(introTextdraws[25], 1); TextDrawSetProportional(introTextdraws[25], 1); #endif // Added temporarily to test engine system. CreateVehicle(446, 728.1595, -1495.2687, -0.4906, 179.7909, 1, 5, 600); CreateVehicle(454, 720.7040, -1633.3224, 0.1487, 177.6009, 26, 26, 600); CreateVehicle(454, 720.5267, -1699.9827, 0.1866, 358.9251, 26, 26, 600); CreateVehicle(466, 594.6932, -1519.6713, 14.8586, 178.9838, 68, 76, 600); CreateVehicle(458, 601.2115, -1519.8091, 14.8971, 359.8546, 101, 1, 600); CreateVehicle(518, 258.0661, -1591.6113, 33.1217, 275.3944, 36, 36, 600); CreateVehicle(409, 867.4957, -1285.9368, 13.8859, 357.4155, 1, 1, 600); CreateVehicle(457, 844.4999, -1197.9865, 16.6038, 0.3980, 2, 1, 600); CreateVehicle(457, 880.8410, -1199.7491, 16.6031, 357.7022, 21, 108, 600); CreateVehicle(457, 914.7440, -1199.8364, 16.6032, 359.8655, 106, 56, 600); CreateVehicle(463, 920.4453, -1290.5063, 13.3508, 118.6505, 121, 14, 600); CreateVehicle(542, 863.2733, -1375.0151, 13.3187, 85.7265, 32, 92, 600); //CreateVehicle(561, 903.8953, -1454.9287, 12.8651, 270.7864, 8, 17, 600); CreateVehicle(507, 809.9615, -1448.9109, 12.9680, 87.2106, 35, 54, 600); CreateVehicle(589, 810.5452, -1464.3678, 12.7191, 85.7123, 134, 97, 600); CreateVehicle(496, 821.6033, -1473.7249, 12.5756, 357.5008, 54, 120, 600); CreateVehicle(461, 1031.1113, -1446.3105, 13.1411, 59.0580, 67, 86, 600); CreateVehicle(418, 1005.0084, -1461.3424, 13.6427, 183.0261, 119, 119, 600); CreateVehicle(463, 990.1287, -1354.9878, 12.9125, 285.7227, 65, 6, 600); CreateVehicle(479, 991.3929, -1345.2102, 13.1759, 271.1148, 123, 108, 600); CreateVehicle(489, 990.5985, -1306.8129, 13.5204, 179.0488, 24, 6, 600); CreateVehicle(475, 1002.5063, -1306.5654, 13.1866, 359.6424, 37, 0, 600); CreateVehicle(518, 981.5054, -1306.6899, 13.1630, 181.0135, 71, 18, 600); CreateVehicle(414, 979.2278, -1258.1351, 16.8071, 182.5786, 24, 1, 600); CreateVehicle(549, 955.8333, -1190.2795, 16.6425, 270.2728, 75, 39, 600); CreateVehicle(482, 956.0022, -1199.3633, 17.1270, 268.5538, 20, 20, 600); CreateVehicle(468, 956.3898, -1193.4253, 16.6297, 89.6432, 46, 46, 600); CreateVehicle(567, 1085.8342, -1199.3883, 17.7945, 90.5839, 93, 64, 600); CreateVehicle(542, 1097.0354, -1218.1705, 17.5471, 356.6483, 45, 92, 600); CreateVehicle(461, 1084.2866, -1232.2461, 15.3945, 243.6654, 61, 1, 600); CreateVehicle(461, 1083.9337, -1235.0449, 15.4088, 243.8919, 75, 1, 600); CreateVehicle(461, 1083.7941, -1238.1573, 15.4110, 243.1097, 79, 1, 600); CreateVehicle(405, 1109.0310, -1225.8809, 15.6987, 181.5343, 75, 1, 600); CreateVehicle(458, 1000.3081, -1084.5488, 23.7069, 179.6207, 30, 1, 600); CreateVehicle(542, 1015.8254, -1083.9113, 23.5711, 0.6381, 119, 113, 600); CreateVehicle(461, 1032.2993, -1082.4255, 23.4136, 166.6669, 35, 27, 600); CreateVehicle(560, 1070.9109, -1102.3247, 24.4439, 270.7971, 41, 81, 600); CreateVehicle(581, 1205.2384, -977.0176, 43.0742, 179.7537, 58, 1, 600); CreateVehicle(536, 1227.2596, -974.1713, 43.2139, 180.2966, 30, 96, 600); CreateVehicle(581, 989.3703, -1589.3812, 13.0903, 21.5606, 66, 1, 600); CreateVehicle(542, 1061.2451, -1665.2649, 13.4966, 91.9120, 32, 92, 600); CreateVehicle(405, 1136.5767, -1695.5199, 13.6956, 88.9354, 75, 1, 600); CreateVehicle(463, 1137.1466, -1700.1902, 13.3869, 87.9396, 132, 112, 600); CreateVehicle(400, 1423.8417, -1845.0616, 13.4772, 270.4685, 109, 109, 600); CreateVehicle(546, 1536.6632, -1846.7765, 13.2712, 0.8185, 3, 87, 600); CreateVehicle(475, 1614.0917, -1893.9027, 13.3521, 357.9483, 102, 80, 600); CreateVehicle(546, 1796.2775, -1933.2837, 13.1180, 180.4499, 113, 78, 600); CreateVehicle(545, 1776.1965, -1917.6884, 13.1976, 90.7850, 39, 1, 600); CreateVehicle(400, 1776.1498, -1907.3949, 13.4788, 271.3831, 101, 1, 600); CreateVehicle(400, 1804.1429, -1909.4020, 13.3328, 269.6684, 10, 10, 600); CreateVehicle(474, 1804.4889, -1919.3353, 13.1556, 269.8831, 110, 1, 600); CreateVehicle(496, 1785.9353, -1933.2903, 13.1750, 0.8605, 52, 69, 600); CreateVehicle(496, 1776.2777, -1894.0770, 12.9741, 272.6132, 15, 15, 600); CreateVehicle(482, 1776.5122, -1899.9752, 13.5071, 87.3522, 10, 10, 600); CreateVehicle(482, 1791.3899, -1933.2008, 13.5101, 180.1195, 118, 118, 600); CreateVehicle(461, 1775.7963, -1912.6582, 12.9720, 269.4815, 61, 1, 600); CreateVehicle(461, 1775.7340, -1914.1243, 12.9716, 262.3925, 75, 1, 600); CreateVehicle(536, 1834.7808, -1871.9734, 13.0925, 179.2434, 30, 96, 600); CreateVehicle(496, 1836.6301, -1853.6381, 13.1059, 179.9886, 20, 20, 600); CreateVehicle(414, 1858.8854, -1875.5944, 13.5724, 180.1933, 95, 1, 600); CreateVehicle(468, 1900.5659, -1849.8379, 13.2277, 44.6102, 94, 63, 600); //CreateVehicle(589, 1251.2297, -2042.1305, 59.4474, 180.0659, 40, 1, 600); //CreateVehicle(521, 1244.8016, -2023.3499, 59.4330, 292.8341, 92, 3, 600); //CreateVehicle(522, 1277.8240, -2011.9354, 58.4634, 268.7320, 7, 79, 600); CreateVehicle(463, 1097.5217, -1763.8896, 12.8933, 267.4286, 36, 36, 600); CreateVehicle(475, 892.6356, -1668.8604, 13.3544, 179.2466, 37, 0, 600); CreateVehicle(521, 870.1176, -1676.6573, 13.1183, 186.2732, 115, 118, 600); CreateVehicle(496, 888.5651, -1679.1317, 13.2628, 357.5185, 102, 135, 600); CreateVehicle(496, 1671.9685, -1704.4779, 20.2006, 270.8929, 66, 72, 600); CreateVehicle(461, 1673.9683, -1713.0564, 20.0617, 67.1318, 43, 1, 600); CreateVehicle(413, 327.8443, -1809.2729, 4.5733, 359.3342, 91, 1, 600); CreateVehicle(439, 311.7234, -1809.8577, 4.3552, 179.9755, 54, 38, 600); CreateVehicle(496, 334.3875, -1788.6018, 4.7803, 358.1175, 41, 41, 600); CreateVehicle(414, 383.4589, -1740.6958, 8.8571, 358.6929, 28, 1, 600); CreateVehicle(467, 740.4370, -1793.5476, 12.9180, 349.2087, 58, 8, 600); CreateVehicle(473, 823.7594, -2066.2686, -0.1017, 112.6381, 56, 53, 600); CreateVehicle(467, 892.0507, -1797.3351, 13.4070, 175.4098, 60, 1, 600); CreateVehicle(467, 944.9136, -1813.5590, 13.0146, 350.0614, 68, 8, 600); CreateVehicle(491, 1096.8945, -1878.8030, 13.3031, 178.1535, 71, 72, 600); CreateVehicle(496, 1206.2454, -1879.0792, 13.3341, 88.5190, 77, 26, 600); CreateVehicle(589, 1024.2820, -777.6995, 102.7277, 142.3072, 128, 91, 600); //CreateVehicle(522, 1099.2415, -818.4706, 86.5177, 153.5570, 135, 31, 600); CreateVehicle(535, 912.4982, -665.0076, 116.7563, 234.0564, 136, 91, 600); CreateVehicle(405, 211.8928, -1419.0681, 13.1531, 135.6236, 24, 1, 600); CreateVehicle(461, 203.5655, -1441.0552, 12.6881, 319.3540, 43, 1, 600); CreateVehicle(482, 216.6308, -1431.9065, 13.3691, 313.9951, 48, 48, 600); CreateVehicle(462, 338.6057, -1340.7114, 14.1075, 116.4867, 53, 61, 600); CreateVehicle(439, 343.3987, -1353.3427, 14.4033, 299.2459, 43, 21, 600); CreateVehicle(542, 412.7446, -1318.5144, 14.6645, 210.7711, 112, 131, 600); CreateVehicle(521, 411.1232, -1311.2087, 14.5024, 140.9818, 36, 0, 600); CreateVehicle(463, 892.2068, -944.0689, 41.3930, 346.6371, 46, 55, 600); CreateVehicle(496, 1039.0024, -925.8621, 42.0801, 3.8901, 95, 87, 600); CreateVehicle(496, 1028.1858, -887.8458, 41.8743, 18.1745, 76, 26, 600); CreateVehicle(534, 1091.6672, -934.4342, 42.7434, 181.8923, 53, 53, 600); CreateVehicle(496, 1196.4460, -887.2950, 42.7778, 4.9401, 13, 118, 600); CreateVehicle(461, 1184.3699, -898.7025, 42.8468, 50.8006, 26, 5, 600); CreateVehicle(479, 1307.0081, -871.5775, 39.3723, 88.4695, 20, 119, 600); CreateVehicle(482, 1307.4617, -865.4689, 39.6982, 269.2831, 52, 52, 600); CreateVehicle(543, 1307.4490, -856.3735, 39.3962, 86.8428, 32, 8, 600); CreateVehicle(463, 1305.3447, -860.6293, 39.1185, 240.4489, 102, 77, 600); CreateVehicle(567, 1327.1772, -856.8694, 39.4427, 355.0141, 96, 74, 600); CreateVehicle(576, 929.9745, -996.4139, 37.8311, 274.6470, 68, 96, 600); CreateVehicle(404, 863.1107, -1056.6387, 24.8362, 216.7097, 119, 50, 600); CreateVehicle(463, 868.9804, -1068.5559, 24.6418, 26.0884, 90, 87, 600); CreateVehicle(549, 1948.6121, -2114.0183, 13.2416, 90.8657, 79, 39, 600); CreateVehicle(496, 1948.0044, -2126.9031, 13.2611, 269.0660, 37, 19, 600); CreateVehicle(463, 1941.4159, -2139.8730, 13.0970, 153.7429, 53, 53, 600); CreateVehicle(414, 1924.2328, -2123.9316, 13.6772, 359.7333, 95, 1, 600); CreateVehicle(576, 1938.4186, -2089.9116, 13.1725, 87.9823, 74, 8, 600); CreateVehicle(518, 1979.0964, -2065.5842, 13.1683, 1.5510, 95, 1, 600); CreateVehicle(482, 1998.8810, -2095.2688, 13.6603, 182.4098, 110, 110, 600); CreateVehicle(482, 2079.6143, -2007.4128, 13.6618, 267.6052, 66, 66, 600); CreateVehicle(543, 2070.6382, -1995.7777, 13.3738, 177.5505, 32, 8, 600); CreateVehicle(463, 2064.7144, -1998.2357, 13.0870, 323.5498, 19, 19, 600); CreateVehicle(475, 1981.1689, -1985.4224, 13.3487, 0.0153, 33, 0, 600); CreateVehicle(443, 2002.9520, -1940.1552, 13.9832, 90.4363, 20, 1, 600); CreateVehicle(413, 2062.2634, -1904.0969, 13.6286, 358.4263, 91, 1, 600); CreateVehicle(426, 2065.5415, -1920.3318, 13.2901, 179.3121, 53, 53, 600); CreateVehicle(489, 2121.7656, -1783.0730, 13.5319, 181.4553, 112, 120, 600); CreateVehicle(600, 2106.7954, -1782.8602, 13.0983, 178.3882, 32, 8, 600); CreateVehicle(400, 2114.6040, -1783.4563, 13.4944, 359.1006, 28, 119, 600); //CreateVehicle(546, 2095.9749, -1800.3145, 13.1088, 268.3826, 78, 38, 600); //CreateVehicle(400, 2096.2324, -1819.9232, 13.4752, 269.6763, 75, 1, 600); CreateVehicle(554, 1928.4520, -1795.0306, 13.4708, 269.1664, 15, 32, 600); CreateVehicle(534, 2284.0630, -1681.7241, 13.8912, 0.3629, 53, 53, 600); CreateVehicle(463, 2289.7493, -1685.7275, 13.2727, 338.6942, 36, 36, 600); CreateVehicle(474, 2328.1565, -1677.1449, 14.1746, 268.4948, 74, 1, 600); CreateVehicle(545, 2319.2271, -1712.0625, 13.3579, 179.0224, 44, 96, 600); CreateVehicle(475, 2416.0103, -1707.7166, 13.5772, 180.6127, 17, 1, 600); CreateVehicle(426, 2500.2908, -1755.7277, 13.1737, 179.5942, 53, 53, 600); CreateVehicle(414, 2445.8567, -1762.6874, 13.6820, 179.0055, 9, 1, 600); CreateVehicle(479, 2452.3486, -1784.1185, 13.3435, 358.6820, 60, 35, 600); CreateVehicle(475, 2498.7920, -1953.6908, 13.2268, 180.0759, 33, 0, 600); CreateVehicle(482, 2482.8601, -1953.4886, 13.5429, 359.9536, 32, 32, 600); CreateVehicle(547, 2787.8420, -1876.2371, 9.5681, 179.4587, 123, 1, 600); CreateVehicle(426, 2757.7773, -1847.0181, 9.4532, 21.0801, 37, 37, 600); CreateVehicle(479, 2732.6860, -1875.2740, 9.3877, 359.7763, 45, 32, 600); CreateVehicle(567, 2706.5757, -1843.5668, 9.3669, 339.9568, 97, 96, 600); CreateVehicle(458, 2679.1792, -1826.0692, 9.2646, 129.6775, 113, 1, 600); CreateVehicle(439, 2657.7949, -1812.8765, 9.1989, 98.6444, 67, 8, 600); CreateVehicle(461, 2697.0117, -1836.8411, 9.0454, 131.7257, 61, 1, 600); CreateVehicle(463, 2757.8318, -1878.8939, 9.2421, 331.1535, 7, 122, 600); CreateVehicle(521, 2813.1143, -1822.5189, 9.5068, 56.5744, 87, 118, 600); CreateVehicle(521, 2808.0325, -1669.0962, 9.5088, 168.8724, 92, 3, 600); CreateVehicle(466, 2829.7585, -1699.7444, 9.7443, 256.3983, 16, 76, 600); CreateVehicle(545, 2825.0059, -1718.6702, 9.8159, 77.5273, 30, 1, 600); CreateVehicle(588, 2686.6833, -1672.3564, 9.3456, 1.2872, 1, 1, 600); CreateVehicle(546, 2657.6079, -1701.7725, 9.0416, 92.9747, 113, 78, 600); CreateVehicle(521, 2654.6636, -1692.5939, 8.8779, 251.8571, 36, 0, 600); CreateVehicle(463, 2696.4189, -1669.2604, 9.0249, 152.7104, 11, 11, 600); CreateVehicle(474, 2813.8862, -1429.2637, 16.0126, 357.9624, 83, 1, 600); CreateVehicle(546, 2792.6982, -1432.1294, 19.9428, 95.9562, 119, 62, 600); CreateVehicle(521, 2819.5498, -1427.8861, 27.7283, 97.0200, 75, 13, 600); CreateVehicle(400, 2794.7859, -1464.7653, 40.1536, 180.1253, 75, 84, 600); CreateVehicle(418, 2816.5820, -1431.5497, 40.1556, 268.4159, 114, 114, 600); CreateVehicle(521, 2794.0625, -1576.2109, 10.4993, 252.9832, 118, 118, 600); CreateVehicle(600, 2796.4966, -1562.6956, 10.6452, 89.5535, 83, 13, 600); CreateVehicle(426, 2822.3193, -1553.4038, 10.6672, 89.8755, 42, 42, 600); CreateVehicle(533, 2807.4377, -1540.4016, 10.6310, 180.0459, 73, 1, 600); CreateVehicle(414, 2772.3438, -1614.6322, 11.0090, 270.6050, 43, 1, 600); CreateVehicle(521, 2686.6938, -1102.2723, 68.9335, 36.2440, 25, 118, 600); CreateVehicle(521, 2359.4319, -648.6396, 127.7032, 321.5916, 36, 0, 600); CreateVehicle(478, 2368.4819, -651.1127, 127.6424, 221.5063, 59, 1, 600); CreateVehicle(549, 2161.8665, -1148.1637, 24.0918, 268.7138, 84, 36, 600); CreateVehicle(576, 2162.5032, -1162.9884, 23.4278, 270.5314, 67, 1, 600); CreateVehicle(540, 2147.6460, -1180.4316, 23.6805, 271.2742, 53, 53, 600); CreateVehicle(554, 2161.5271, -1192.5657, 23.9013, 270.6950, 14, 32, 600); CreateVehicle(521, 2164.0178, -1178.0918, 23.3890, 68.9158, 74, 74, 600); CreateVehicle(463, 2145.5957, -1162.0776, 23.3554, 273.2266, 57, 55, 600); CreateVehicle(529, 2229.7317, -1367.4005, 23.6257, 273.8516, 62, 62, 600); CreateVehicle(405, 2229.4822, -1348.8889, 23.8603, 87.4558, 75, 1, 600); CreateVehicle(600, 2230.1382, -1359.4955, 23.7003, 269.3415, 104, 72, 600); CreateVehicle(479, 2426.9795, -1241.6071, 24.0514, 176.5720, 40, 29, 600); CreateVehicle(475, 2431.3196, -1241.5726, 24.1538, 177.5767, 2, 39, 600); CreateVehicle(463, 2430.6926, -1220.7517, 24.9012, 142.6704, 19, 19, 600); CreateVehicle(475, 2390.2915, -1487.7120, 23.6330, 90.8244, 41, 29, 600); CreateVehicle(400, 2390.6387, -1503.7330, 23.9272, 270.7136, 62, 1, 600); CreateVehicle(463, 2389.4578, -1497.8422, 23.3752, 243.2236, 79, 79, 600); CreateVehicle(545, 2396.8088, -1536.9807, 23.8111, 0.1546, 50, 1, 600); CreateVehicle(479, 2407.3284, -1538.0587, 23.7968, 0.6749, 59, 36, 600); CreateVehicle(466, 2412.8625, -1537.3831, 23.7432, 357.6566, 78, 76, 600); CreateVehicle(475, 2449.7637, -1556.8450, 23.8046, 1.3418, 17, 1, 600); CreateVehicle(529, 2454.6299, -1557.0045, 23.6327, 180.1560, 16, 40, 600); CreateVehicle(496, 2477.5659, -1557.4111, 23.7818, 358.5618, 41, 29, 600); CreateVehicle(463, 2491.4055, -1535.6182, 23.5519, 59.4337, 11, 11, 600); CreateVehicle(461, 2491.1179, -1529.3501, 23.5688, 56.2088, 75, 1, 600); CreateVehicle(521, 2491.4360, -1532.5398, 23.5717, 55.7102, 25, 118, 600); CreateVehicle(496, 2489.5791, -1518.4509, 23.7588, 269.8171, 2, 39, 600); CreateVehicle(468, 2499.0034, -1538.0708, 23.6439, 335.4962, 3, 3, 600); CreateVehicle(536, 2520.1445, -1480.9065, 23.7363, 1.3232, 37, 1, 600); CreateVehicle(533, 2573.5979, -1489.6091, 23.7162, 87.7542, 77, 1, 600); CreateVehicle(521, 2554.3159, -1367.9281, 31.7872, 241.1393, 36, 0, 600); CreateVehicle(536, 2411.6626, -1390.6456, 24.0787, 268.8195, 26, 96, 600); CreateVehicle(533, 1819.8600, -1403.5051, 13.1363, 89.9457, 73, 1, 600); CreateVehicle(496, 1809.4696, -1432.1268, 13.0139, 274.7705, 42, 42, 600); CreateVehicle(542, 1676.1560, -1106.9868, 23.6493, 268.6964, 113, 92, 600); CreateVehicle(589, 1649.5083, -1102.5532, 23.5644, 270.0267, 31, 31, 600); CreateVehicle(589, 1658.4116, -1088.9274, 23.6777, 89.2744, 75, 1, 600); CreateVehicle(482, 1620.9778, -1089.5054, 24.0216, 89.9049, 48, 48, 600); CreateVehicle(518, 1629.4741, -1103.3231, 23.5760, 268.5257, 9, 39, 600); CreateVehicle(518, 1640.7035, -1046.7117, 23.5692, 359.8533, 17, 1, 600); CreateVehicle(482, 1660.7136, -1016.1744, 23.9634, 11.4114, 20, 117, 600); CreateVehicle(496, 1689.9340, -1035.6692, 23.6231, 178.1297, 20, 20, 600); CreateVehicle(542, 1731.1282, -1009.0837, 23.6852, 348.1700, 119, 113, 600); CreateVehicle(496, 1757.4509, -1037.7462, 23.8359, 180.9093, 39, 39, 600); CreateVehicle(475, 1770.8777, -1061.7106, 23.7646, 179.4640, 26, 104, 600); CreateVehicle(496, 1780.0526, -1069.8851, 23.6770, 359.9332, 9, 14, 600); CreateVehicle(536, 1762.5533, -1085.8549, 23.6983, 180.7030, 57, 96, 600); CreateVehicle(518, 1740.1122, -1085.8320, 23.6318, 181.0830, 74, 59, 600); CreateVehicle(542, 1726.2168, -1085.2207, 23.6669, 182.7872, 122, 113, 600); CreateVehicle(549, 1699.9979, -1068.8979, 23.6031, 357.9710, 75, 39, 600); CreateVehicle(400, 1713.3634, -1061.1498, 23.9985, 181.1158, 36, 1, 600); CreateVehicle(496, 1640.7484, -1038.1542, 23.6150, 358.3014, 0, 0, 600); CreateVehicle(542, 1594.9391, -1009.9454, 23.6493, 185.8625, 13, 118, 600); CreateVehicle(482, 1577.2344, -1040.1863, 24.0271, 141.0052, 52, 52, 600); CreateVehicle(536, 1562.9835, -1011.3809, 23.6439, 359.5882, 12, 1, 600); CreateVehicle(496, 1546.6223, -1026.6492, 23.6228, 162.1279, 74, 72, 600); CreateVehicle(463, 1577.0701, -1008.9494, 23.4464, 165.1993, 7, 7, 600); CreateVehicle(521, 1592.5432, -1057.9313, 23.4784, 297.7319, 118, 118, 600); CreateVehicle(461, 1651.4000, -1015.1333, 23.4877, 216.5875, 88, 1, 600); CreateVehicle(463, 1694.4098, -1003.8555, 23.4463, 216.3939, 11, 11, 600); CreateVehicle(521, 1748.7355, -1039.5499, 23.5323, 15.0375, 134, 95, 600); CreateVehicle(542, 1657.5460, -1137.0397, 23.6497, 178.3330, 24, 118, 600); CreateVehicle(589, 1616.6453, -1128.1941, 23.5644, 92.6623, 23, 23, 600); CreateVehicle(484, 2947.8057, -2052.6362, 0.4738, 359.4145, 50, 32, 600); CreateVehicle(456, 2313.5281, -2310.5837, 13.7196, 133.0174, 91, 63, 600); CreateVehicle(455, 2264.7073, -2335.1189, 13.9838, 314.5604, 84, 58, 600); CreateVehicle(455, 2612.2107, -2198.1665, 13.9835, 180.4830, 84, 31, 600); CreateVehicle(525, 2572.6416, -2240.2261, 13.4192, 93.6711, 17, 20, 600); CreateVehicle(453, 2505.7712, -2269.1885, -0.3120, 268.6544, 56, 56, 600); CreateVehicle(453, 2307.9446, -2414.1733, -0.2071, 314.9561, 56, 56, 600); CreateVehicle(455, 2189.0393, -2649.3572, 13.9833, 266.7652, 1, 31, 600); CreateVehicle(525, 2226.0032, -2677.0149, 13.4329, 4.2993, 18, 20, 600); CreateVehicle(552, 2200.3921, -2638.4026, 13.2521, 357.1788, 56, 56, 600); CreateVehicle(422, 2203.6013, -2595.3611, 13.5221, 87.9727, 83, 57, 600); CreateVehicle(422, 2206.7747, -2527.8098, 13.5299, 94.0067, 67, 59, 600); CreateVehicle(525, 2510.2681, -2629.5205, 13.5251, 88.6646, 22, 30, 600); CreateVehicle(456, 2491.5276, -2671.4338, 13.8094, 180.9983, 110, 93, 600); CreateVehicle(455, 2498.7861, -2572.7219, 14.0866, 357.5439, 84, 15, 600); CreateVehicle(422, 2516.4746, -2452.8889, 13.6216, 44.3283, 96, 25, 600); CreateVehicle(470, 2764.3169, -2383.4829, 13.6235, 181.4826, 43, 0, 600); CreateVehicle(470, 2779.5730, -2440.3181, 13.6296, 267.8545, 43, 0, 600); CreateVehicle(470, 2737.3740, -2485.6760, 13.6431, 87.2884, 43, 0, 600); CreateVehicle(400, 2744.2754, -2447.5588, 13.7433, 179.2557, 40, 84, 600); CreateVehicle(400, 2765.2122, -2531.8735, 13.7407, 359.5258, 40, 84, 600); CreateVehicle(400, 2784.2922, -2387.0547, 13.7279, 89.7828, 40, 84, 600); CreateVehicle(400, 2753.1467, -2387.5439, 13.7358, 1.3794, 40, 84, 600); CreateVehicle(552, 2656.9172, -2451.1821, 13.3204, 93.4499, 49, 49, 600); CreateVehicle(422, 2428.1499, -2492.5559, 13.6317, 45.6813, 111, 31, 600); CreateVehicle(530, 2435.3372, -2434.5278, 13.3911, 41.7356, 112, 1, 600); CreateVehicle(530, 2418.4021, -2506.5557, 13.4131, 273.4680, 114, 1, 600); CreateVehicle(530, 2205.8362, -2571.1787, 13.3094, 85.7644, 119, 1, 600); CreateVehicle(455, 2152.5361, -2148.2825, 13.9860, 310.8004, 1, 31, 600); CreateVehicle(439, 1373.6738, -1634.1741, 13.2790, 271.5004, 8, 17, 600); CreateVehicle(542, 1362.9803, -1659.5125, 13.1263, 270.4668, 32, 92, 600); CreateVehicle(475, 1359.6680, -1749.6177, 13.1843, 0.0962, 21, 1, 600); CreateVehicle(439, 1401.3602, -1507.1211, 13.4834, 163.4146, 67, 8, 600); CreateVehicle(475, 1500.1357, -1487.4355, 13.3556, 91.3002, 2, 39, 600); CreateVehicle(542, 1797.1293, -1701.1102, 13.2757, 179.5340, 31, 93, 600); CreateVehicle(521, 1807.9387, -1688.3774, 13.1068, 105.3693, 75, 13, 600); CreateVehicle(414, 1781.8600, -1701.3483, 13.5957, 3.8341, 25, 1, 600); CreateVehicle(475, 306.7730, -1438.4087, 27.7341, 120.6372, 33, 0, 600); CreateVehicle(475, 1277.5547, -1610.1168, 13.3511, 90.3928, 2, 39, 600); CreateVehicle(439, 1670.6208, -1886.9011, 13.4429, 2.8833, 65, 79, 600); CreateVehicle(414, 1653.4976, -1837.6439, 13.6400, 1.1054, 72, 1, 600); //CreateVehicle(475, 1145.1482, -1366.7389, 13.5456, 184.4175, 2, 39, 600); CreateVehicle(554, 2224.8198, -2211.0693, 13.6286, 314.5282, 45, 32, 600); CreateVehicle(403, 2201.2490, -2241.3311, 14.1532, 135.1536, 30, 1, 600); CreateVehicle(403, 2196.7461, -2236.3652, 14.1486, 134.2909, 28, 1, 600); CreateVehicle(403, 2208.1824, -2296.9404, 15.3708, 136.0373, 25, 1, 600); CreateVehicle(439, 2393.2522, -1927.3457, 13.2782, 179.4218, 65, 79, 600); CreateVehicle(475, 2383.3689, -1928.1165, 13.1844, 179.4976, 56, 29, 600); CreateVehicle(521, 2376.8760, -1929.3613, 12.9563, 341.1395, 87, 118, 600); CreateVehicle(439, 2349.1824, -2000.2684, 13.2666, 267.0585, 25, 78, 600); CreateVehicle(542, 1512.3342, -2211.7639, 13.2940, 359.3842, 45, 92, 600); CreateVehicle(518, 1546.2539, -2211.5557, 13.2254, 178.7042, 37, 0, 600); CreateVehicle(521, 1560.0939, -2243.5127, 13.1179, 94.0584, 118, 118, 600); CreateVehicle(518, 1454.6436, -2224.9185, 13.2177, 0.2168, 41, 29, 600); CreateVehicle(496, 1408.1469, -2242.1521, 13.2630, 359.3946, 9, 14, 600); CreateVehicle(439, 1398.1570, -2225.4885, 13.4427, 179.6260, 37, 78, 600); CreateVehicle(475, 1391.6555, -2241.8704, 13.3495, 180.5889, 33, 0, 600); CreateVehicle(542, 1364.5348, -2242.7036, 13.2899, 270.7713, 119, 113, 600); CreateVehicle(542, 1404.6641, -2314.1211, 13.2898, 180.5298, 122, 113, 600); CreateVehicle(518, 1411.2491, -2347.3430, 13.2101, 180.0483, 9, 39, 600); CreateVehicle(496, 1391.5173, -2364.2131, 13.2633, 179.7053, 0, 0, 600); CreateVehicle(521, 1365.7269, -2351.5515, 13.1069, 87.0619, 92, 3, 600); // House objects CreateObject(14707, 911.334106, -484.425170, 847.481384, 0.000000, 0.000000, 90.000000); CreateObject(14711, 1312.136840, -175.075073, 1088.675659, 0.000000, 0.000000, 0.000000); CreateObject(1506, 1321.403198, -166.876174, 1087.131591, 0.000000, 0.000000, 270.000000); CreateObject(14700, 1437.169189, -1832.845703, 1314.057250, 0.000000, 0.000000, 270.000000); CreateObject(1506, 1433.098266, -1833.567993, 1312.596801, 0.000000, 0.000000, 90.000000); CreateObject(14748, 1365.361694, -2141.651611, 1051.588623, 0.000000, 0.000000, 270.000000); CreateObject(1506, 1364.546875, -2146.731689, 1049.618652, 0.000000, 0.000000, 180.000000); CreateObject(14718, 2005.202270, -1701.831054, 1164.692260, 0.000000, 0.000000, 90.000000); CreateObject(1506, 2010.115234, -1698.054321, 1164.701660, 0.000000, 0.000000, -90.000000); CreateObject(14754, 1284.700317, -1132.096679, 982.990844, 0.000000, 0.000000, 0.000000); CreateObject(1506, 1282.763061, -1141.286621, 979.051940, 0.000000, 0.000000, 180.000000); CreateObject(14713, 1183.433837, -422.981140, 1235.509155, 0.000000, 0.000000, 180.000000); CreateObject(1506, 1177.512084, -418.100250, 1233.734375, 0.000000, 0.000000, 0.000000); CreateObject(14750, 1752.987548, -1814.000000, 1005.840515, 0.000000, 0.000000, 0.000000); CreateObject(1506, 1750.443969, -1823.364013, 999.340454, 0.000000, 0.000000, 180.000000); CreateObject(14712, 2190.703125, -1127.359619, 1129.335815, 0.000000, 0.000000, 270.000000); CreateObject(1506, 2183.202392, -1131.089599, 1127.785400, 0.000000, 0.000000, 90.000000); CreateObject(14701, 2654.076171, -1032.999389, 930.996948, 0.000000, 0.000000, 180.000000); CreateObject(1506, 2653.683593, -1022.535644, 928.926269, 0.000000, 0.000000, 0.000000); CreateObject(14710, 836.976257, -1017.067077, 800.481994, 0.000000, 0.000000, 180.000000); CreateObject(1506, 827.483337, -1014.606506, 798.996154, 0.000000, 0.000000, 90.000000); CreateObject(14706, 1834.514404, -1290.143066, 834.363037, 0.000000, 0.000000, 180.000000); CreateObject(19359, 2262.502929, -1143.025146, 1051.293334, 0.000000, 0.000000, 90.000000); // Prison objects CreateDynamicObject(971, -1143.599365, 864.143859, 5.630311, 0.000000, 0.000000, 36.000000); CreateDynamicObject(971, -1137.191284, 868.799377, 5.630311, 0.000000, 0.000000, 36.000000); CreateDynamicObject(971, -1127.083251, 841.410888, 5.630311, 0.000000, 0.000000, -144.000000); CreateDynamicObject(971, -1120.464721, 846.219299, 5.630311, 0.000000, 0.000000, -144.000000); // Small garage new objectid = CreateObject(19377, 1517.224853, -1643.668823, 1123.418579, 0.000000, 90.000000, 90.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19451, 1512.922851, -1643.237792, 1125.234863, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); objectid = CreateObject(19451, 1512.932983, -1652.857666, 1125.234863, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); objectid = CreateObject(19377, 1517.224853, -1654.129028, 1123.418579, 0.000000, 90.000000, 90.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1517.224853, -1643.668823, 1127.009277, 0.000000, 90.000000, 90.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19451, 1517.271484, -1638.827636, 1125.234863, 0.000000, 0.000000, 90.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); CreateObject(9093, 1516.615600, -1638.889160, 1125.194335, 0.000000, 0.000000, 90.000000); CreateObject(1498, 1520.439941, -1638.885986, 1123.454101, 0.000000, 0.000000, 0.000000); objectid = CreateObject(19451, 1522.032226, -1643.237792, 1125.234863, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); objectid = CreateObject(19451, 1522.032958, -1652.857666, 1125.234863, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); objectid = CreateObject(19377, 1517.224853, -1654.149291, 1127.009277, 0.000000, 90.000000, 90.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19451, 1517.161743, -1649.707275, 1125.234863, 0.000000, 0.000000, 90.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); CreateObject(19815, 1521.958862, -1644.184448, 1125.385009, 0.000000, 0.000000, 270.000000); CreateObject(19929, 1521.474243, -1642.943847, 1123.494262, 0.000000, 0.000000, 0.000000); CreateObject(19929, 1521.474243, -1645.803222, 1123.494262, 0.000000, 0.000000, 0.000000); CreateObject(1328, 1521.372802, -1647.677978, 1123.984008, 0.000000, 0.000000, 270.000000); CreateObject(19899, 1518.888671, -1649.152709, 1123.504028, 0.000000, 0.000000, 90.000000); CreateObject(19921, 1521.317626, -1644.767700, 1124.524536, 0.000000, 0.000000, -78.023918); CreateObject(19903, 1517.034545, -1649.131347, 1123.533813, 0.000000, 0.000000, 90.000000); CreateObject(19917, 1521.330322, -1646.477294, 1124.424438, 0.000000, 0.000000, 174.000000); CreateObject(1348, 1515.315185, -1649.160888, 1124.144897, 0.000000, 0.000000, 180.000000); CreateObject(1098, 1521.330200, -1643.426879, 1124.914916, 0.000000, 0.000000, -17.151069); CreateObject(19627, 1521.519287, -1644.724609, 1124.624633, 0.000000, 0.000000, 272.669464); CreateObject(18634, 1521.386962, -1642.228393, 1124.434448, 0.000000, 90.000000, 155.093902); CreateObject(16779, 1517.025878, -1644.597290, 1127.035156, 0.000000, 0.000000, 180.631195); CreateObject(1738, 1513.752319, -1649.391357, 1124.094116, 0.000000, 0.000000, 180.000000); CreateObject(1428, 1521.027343, -1649.170898, 1125.004516, 0.000000, 0.000000, 180.000000); CreateObject(1098, 1513.130737, -1647.329101, 1125.744506, 0.000000, 0.000000, 0.000000); CreateObject(1098, 1513.130737, -1646.249023, 1125.744506, 0.000000, 0.000000, 0.000000); CreateObject(1098, 1513.130981, -1647.329101, 1124.714355, 0.000000, 0.000000, 0.000000); CreateObject(1098, 1513.130371, -1646.268554, 1124.714355, 0.000000, 0.000000, 0.000000); CreateObject(1185, 1513.152221, -1642.557250, 1125.574951, 0.000000, 0.000000, 90.000000); CreateObject(1010, 1513.028320, -1640.495727, 1124.564086, 0.000000, 90.000000, 0.000000); CreateObject(2063, 1513.311157, -1643.594726, 1124.384521, 0.000000, 0.000000, 90.000000); CreateObject(1193, 1513.027954, -1639.594482, 1125.194580, 0.000000, 0.000000, 91.062004); // Medium garage objectid = CreateObject(19377, 1517.224853, -1643.668823, 1373.418579, 0.000000, 90.000000, 90.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19451, 1511.712158, -1643.237792, 1375.234863, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); objectid = CreateObject(19451, 1511.712280, -1652.857666, 1375.234863, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); objectid = CreateObject(19377, 1517.224853, -1654.129028, 1373.418579, 0.000000, 90.000000, 90.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1517.224853, -1643.668823, 1377.009277, 0.000000, 90.000000, 90.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19451, 1517.271484, -1638.827636, 1375.234863, 0.000000, 0.000000, 90.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); CreateObject(9093, 1515.464721, -1638.889160, 1375.194335, 0.000000, 0.000000, 90.000000); CreateObject(1498, 1519.789550, -1638.885986, 1373.454101, 0.000000, 0.000000, 0.000000); objectid = CreateObject(19451, 1522.032226, -1643.237792, 1375.234863, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); objectid = CreateObject(19451, 1522.032958, -1652.857666, 1375.234863, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); objectid = CreateObject(19377, 1517.224853, -1654.149291, 1377.009277, 0.000000, 90.000000, 90.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19451, 1517.161743, -1651.258422, 1375.234863, 0.000000, 0.000000, 90.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); CreateObject(19815, 1521.958862, -1644.184448, 1375.385009, 0.000000, 0.000000, 270.000000); CreateObject(19929, 1521.474243, -1642.943847, 1373.494262, 0.000000, 0.000000, 0.000000); CreateObject(19929, 1521.474243, -1645.803222, 1373.494262, 0.000000, 0.000000, 0.000000); CreateObject(1328, 1521.372802, -1647.677978, 1373.984008, 0.000000, 0.000000, 270.000000); CreateObject(19899, 1518.668579, -1650.662597, 1373.504028, 0.000000, 0.000000, 90.000000); CreateObject(19921, 1521.317626, -1644.767700, 1374.524536, 0.000000, 0.000000, -78.023918); CreateObject(19903, 1516.784301, -1650.541381, 1373.533813, 0.000000, 0.000000, 90.000000); CreateObject(19917, 1521.330322, -1646.477294, 1374.424438, 0.000000, 0.000000, 174.000000); CreateObject(1348, 1514.635620, -1650.671386, 1374.144897, 0.000000, 0.000000, 180.000000); CreateObject(1098, 1521.330200, -1643.426879, 1374.914916, 0.000000, 0.000000, -17.151069); CreateObject(19627, 1521.519287, -1644.724609, 1374.624633, 0.000000, 0.000000, 272.669464); CreateObject(18634, 1521.386962, -1642.228393, 1374.434448, 0.000000, 90.000000, 155.093902); CreateObject(16779, 1517.025878, -1644.597290, 1377.035156, 0.000000, 0.000000, 180.631195); CreateObject(1738, 1512.762207, -1651.041992, 1374.094116, 0.000000, 0.000000, 180.000000); CreateObject(1428, 1521.027343, -1650.722290, 1375.004516, 0.000000, 0.000000, 180.000000); CreateObject(1098, 1511.920654, -1648.459716, 1375.744506, 0.000000, 0.000000, 0.000000); CreateObject(1098, 1511.920654, -1647.409667, 1375.744506, 0.000000, 0.000000, 0.000000); CreateObject(1098, 1511.920654, -1648.459716, 1374.724487, 0.000000, 0.000000, 0.000000); CreateObject(1098, 1511.920654, -1647.409667, 1374.724487, 0.000000, 0.000000, 0.000000); CreateObject(1185, 1512.062988, -1643.247314, 1375.574951, 0.000000, 0.000000, 90.000000); CreateObject(1010, 1511.827880, -1640.815917, 1374.564086, 0.000000, 90.000000, 0.000000); CreateObject(2063, 1512.140991, -1644.314697, 1374.384521, 0.000000, 0.000000, 90.000000); CreateObject(1193, 1511.774658, -1639.957275, 1375.194580, 0.000000, 0.000000, 91.062004); objectid = CreateObject(19377, 1507.614990, -1643.668823, 1373.418579, 0.000000, 90.000000, 90.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1507.614990, -1654.158447, 1373.418579, 0.000000, 90.000000, 90.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1507.604125, -1643.668823, 1377.009277, 0.000000, 90.000000, 90.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19377, 1507.604125, -1654.168457, 1377.009277, 0.000000, 90.000000, 90.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19451, 1507.531738, -1651.258422, 1375.234863, 0.000000, 0.000000, 90.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); objectid = CreateObject(19451, 1507.661621, -1638.827636, 1375.234863, 0.000000, 0.000000, 90.000000); SetObjectMaterial(objectid, 0, 14798, "int_kbsgarage3", "ab_wall_flake", 0); // Large garage CreateObject(11389, 1665.187500, -2352.026367, 1537.641723, 0.000000, 0.000000, 0.000000); objectid = CreateObject(19377, 1668.767822, -2340.866943, 1534.396972, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1658.277832, -2340.866943, 1534.396972, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1668.767822, -2350.427001, 1534.396972, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1668.767822, -2360.037597, 1534.396972, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1668.767822, -2369.637939, 1534.396972, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1658.277832, -2350.467041, 1534.396972, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1658.277832, -2360.087646, 1534.396972, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1658.277832, -2369.697265, 1534.396972, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1661.437255, -2363.377929, 1540.185913, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19377, 1671.937988, -2363.377929, 1540.185913, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19377, 1671.937988, -2353.787353, 1540.185913, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19377, 1671.937988, -2344.167480, 1540.185913, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19377, 1671.937988, -2334.539306, 1540.185913, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19377, 1661.437988, -2353.787353, 1540.185913, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19377, 1661.527465, -2344.167480, 1540.185913, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); objectid = CreateObject(19377, 1661.509521, -2334.539306, 1540.185913, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_peeling_ceiling1_BIG", 0); CreateObject(2885, 1674.234375, -2340.028320, 1541.174072, 0.000000, 0.000000, 270.000000); CreateObject(2885, 1674.234375, -2348.668212, 1541.174072, 0.000000, 0.000000, 270.000000); objectid = CreateObject(19377, 1679.248168, -2340.866943, 1534.396972, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); objectid = CreateObject(19377, 1679.248168, -2350.476562, 1534.396972, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 11389, "hubint1_sfse", "ws_sub_pen_conc2", 0); CreateObject(2885, 1660.494262, -2368.226806, 1541.143798, 0.000000, 0.000000, 180.000000); CreateObject(11390, 1665.046875, -2351.977050, 1538.903198, 0.000000, 0.000000, 0.000000); CreateObject(11391, 1657.228515, -2360.088378, 1535.773193, 0.000000, 0.000000, 0.000000); CreateObject(11393, 1669.819946, -2357.343994, 1536.022583, 0.000000, 0.000000, 0.000000); CreateObject(19817, 1662.070068, -2340.035888, 1533.891967, 0.000000, 0.000000, 90.000000); CreateObject(19872, 1659.912719, -2348.421630, 1533.882324, 0.000000, 0.000000, 90.000000); CreateObject(19903, 1658.435546, -2345.552978, 1534.542480, 0.000000, 0.000000, -47.000000); CreateObject(19377, 1656.129028, -2362.886718, 1539.213256, 90.000000, 0.000000, 0.000000); CreateObject(19377, 1656.129028, -2352.425048, 1539.213256, 90.000000, 0.000000, 0.000000); CreateObject(19377, 1656.129028, -2341.955322, 1539.213256, 90.000000, 0.000000, 0.000000); CreateObject(19377, 1656.129028, -2331.505126, 1539.213256, 90.000000, 0.000000, 0.000000); CreateObject(19377, 1661.448364, -2335.926269, 1539.213256, 90.000000, 0.000000, 90.000000); CreateObject(19377, 1671.927612, -2335.926269, 1539.213256, 90.000000, 0.000000, 90.000000); CreateObject(19377, 1671.157470, -2368.107421, 1539.213256, 90.000000, 0.000000, 90.000000); CreateObject(19377, 1674.139404, -2363.225585, 1539.213256, 90.000000, 0.000000, 0.000000); CreateObject(19377, 1674.149414, -2359.344726, 1539.213256, 90.000000, 0.000000, 0.000000); CreateObject(19437, 1666.590942, -2361.146240, 1535.482910, 0.000000, 0.000000, 0.000000); CreateObject(19437, 1666.300659, -2361.146240, 1535.482910, 0.000000, 0.000000, 0.000000); CreateObject(19437, 1666.350463, -2363.697021, 1534.622070, 90.000000, 0.000000, 0.000000); CreateObject(19437, 1666.350463, -2367.177734, 1534.622070, 90.000000, 0.000000, 0.000000); CreateObject(19437, 1667.490478, -2367.398193, 1535.482910, 0.000000, 0.000000, 90.000000); CreateObject(19437, 1669.050048, -2367.398193, 1535.482910, 0.000000, 0.000000, 90.000000); CreateObject(19437, 1670.640380, -2367.398193, 1535.482910, 0.000000, 0.000000, 90.000000); CreateObject(19437, 1672.190063, -2367.398193, 1535.482910, 0.000000, 0.000000, 90.000000); CreateObject(19437, 1674.090454, -2367.398193, 1535.482910, 0.000000, 0.000000, 90.000000); CreateObject(19377, 1674.367797, -2348.886474, 1539.123413, 90.000000, 0.000000, 0.000000); CreateObject(19377, 1674.367797, -2338.387207, 1539.123413, 90.000000, 0.000000, 0.000000); CreateObject(19377, 1660.698242, -2368.378906, 1539.123413, 90.000000, 0.000000, 90.000000); CreateObject(19377, 1660.257812, -2368.418945, 1539.123413, 90.000000, 0.000000, 90.000000); objectid = CreateObject(19369, 1666.348266, -2366.564208, 1537.142822, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680); objectid = CreateObject(19369, 1666.348266, -2363.353759, 1537.142822, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680); objectid = CreateObject(19369, 1666.348266, -2362.022460, 1537.142822, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680); objectid = CreateObject(19369, 1667.818969, -2357.771972, 1537.142822, 0.000000, 0.000000, 90.000000); SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680); objectid = CreateObject(19369, 1670.998901, -2357.771972, 1537.142822, 0.000000, 0.000000, 90.000000); SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680); objectid = CreateObject(19369, 1673.869873, -2357.771972, 1537.142822, 0.000000, 0.000000, 90.000000); SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680); objectid = CreateObject(19369, 1673.898559, -2359.502197, 1537.142822, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680); objectid = CreateObject(19369, 1673.878540, -2362.103515, 1537.142822, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680); objectid = CreateObject(19369, 1673.878540, -2365.273437, 1537.142822, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680); objectid = CreateObject(19369, 1673.878540, -2368.443115, 1537.142822, 0.000000, 0.000000, 0.000000); SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680); objectid = CreateObject(19377, 1671.468505, -2363.267089, 1537.988037, 0.000000, 90.000000, 0.000000); SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680); objectid = CreateObject(9131, 1666.443969, -2358.310058, 1535.482910, 0.000000, 0.000000, 270.520568); SetObjectMaterial(objectid, 0, 19389, "all_walls", "concretenewb256", 16711680); // Hospital map (credits: CoachCarter) objectid = CreateObject(14595, -30.670, 153.639, 1002.010, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 2, 14665, "genintint711_1", "mp_gun_mat", 0); SetObjectMaterial(objectid, 3, 4828, "airport3_las", "gnhotelwall02_128", 0); SetObjectMaterial(objectid, 5, 4828, "airport3_las", "gnhotelwall02_128", 0); SetObjectMaterial(objectid, 6, 14563, "triad_main", "sign_maintenance", 0); SetObjectMaterial(objectid, 7, 14577, "casinovault01", "ab_mottleSteps", 0); SetObjectMaterial(objectid, 8, 18031, "cj_exp", "mp_cloth_wall", 0); SetObjectMaterial(objectid, 9, 8488, "flamingo1", "flmngo06_128", 0); SetObjectMaterial(objectid, 10, 4828, "airport3_las", "gnhotelwall02_128", 0); SetObjectMaterial(objectid, 11, 9524, "blokmodb", "lombard_build5_3", 0); SetObjectMaterial(objectid, 12, 14488, "dogsgym", "AH_stolewindow", 0); SetObjectMaterial(objectid, 13, 14674, "civic02cj", "hotcarp01_LA", 0); SetObjectMaterial(objectid, 14, 14577, "casinovault01", "ab_mottleSteps", 0); SetObjectMaterial(objectid, 15, 14581, "ab_mafiasuitea", "barbersmir1", 0); objectid = CreateObject(14593, -13.630, 148.850, 1000.380, 0.000, 0.000, -90.000); SetObjectMaterial(objectid, 0, 8396, "sphinx01", "luxorceiling02_128", 0); SetObjectMaterial(objectid, 1, 9903, "pier69", "rooftop_gz4", 0); SetObjectMaterial(objectid, 2, 14865, "gf2", "mp_bobbie_carpwhite", 0); SetObjectMaterial(objectid, 3, 8396, "sphinx01", "luxorceiling02_128", 0); SetObjectMaterial(objectid, 4, 4568, "skyscrap2_lan2", "sl_marblewall2", 0); objectid = CreateObject(11455, -21.370, 155.339, 1000.809, 0.000, 0.000, 90.000); SetObjectMaterial(objectid, 1, 3899, "hospital2", "ind_hospital1_128", 0); objectid = CreateObject(19325, -27.459, 160.660, 999.440, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 18065, "ab_sfammumain", "shelf_glas", 0); objectid = CreateObject(19325, -27.399, 152.100, 1001.650, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 18065, "ab_sfammumain", "shelf_glas", 0); objectid = CreateObject(19325, -27.399, 158.740, 1003.450, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 18065, "ab_sfammumain", "shelf_glas", 0); objectid = CreateObject(2146, -33.020, 138.779, 998.549, 0.000, 0.000, 15.119); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(19379, -27.379, 150.479, 994.049, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 18029, "genintintsmallrest", "GB_restaursmll15", 0); objectid = CreateObject(1789, -36.560, 149.259, 998.609, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(19379, -27.579, 139.750, 1006.400, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 16640, "a51", "airvent_gz", 0); objectid = CreateObject(2146, -45.830, 142.130, 998.549, 0.000, 0.000, -89.580); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(2146, -45.840, 144.070, 998.549, 0.000, 0.000, -89.580); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(2146, -43.549, 147.619, 998.549, 0.000, 0.000, -89.580); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(2146, -39.540, 140.360, 998.549, 0.000, 0.000, -91.199); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(16444, -37.330, 143.440, 999.229, 0.000, 0.000, 264.119); SetObjectMaterial(objectid, 0, 14526, "sweetsmain", "gb_binbag01", 0); objectid = CreateObject(14532, -17.940, 150.619, 999.039, 0.000, 0.000, -90.000); SetObjectMaterial(objectid, 2, 14392, "dr_gsstudio", "monitors_128", 0); objectid = CreateObject(14532, -17.909, 148.520, 999.039, 0.000, 0.000, -90.000); SetObjectMaterial(objectid, 2, 14392, "dr_gsstudio", "monitors_128", 0); objectid = CreateObject(14532, -17.969, 146.490, 999.039, 0.000, 0.000, -90.000); SetObjectMaterial(objectid, 2, 14392, "dr_gsstudio", "monitors_128", 0); objectid = CreateObject(14532, -17.989, 144.429, 999.039, 0.000, 0.000, -90.000); SetObjectMaterial(objectid, 2, 14392, "dr_gsstudio", "monitors_128", 0); objectid = CreateObject(11455, -21.369, 151.246, 1000.807, 0.000, 0.000, 90.000); SetObjectMaterial(objectid, 1, 3899, "hospital2", "ind_hospital2_128", 0); objectid = CreateObject(11455, -28.379, 152.083, 997.857, 89.899, 0.000, 90.000); SetObjectMaterial(objectid, 1, 14525, "imy_motel2", "mp_motel_reception", 0); objectid = CreateObject(11455, -57.074, 158.723, 999.757, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 1, 14599, "paperchasebits", "sign_firstaid", 0); objectid = CreateObject(11455, -43.736, 139.632, 999.877, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 1, 2670, "proc_rub", "CJ_CERT_3", 0); objectid = CreateObject(14532, -7.050, 151.389, 999.039, 0.000, 0.000, -33.000); SetObjectMaterial(objectid, 2, 14392, "dr_gsstudio", "monitors_128", 0); objectid = CreateObject(2146, -22.579, 144.259, 998.549, 0.000, 0.000, 87.599); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(2146, -3.650, 149.270, 998.549, 0.000, 0.000, 177.360); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(2146, -4.860, 148.559, 998.549, 0.000, 0.000, 188.759); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(14532, -13.859, 154.889, 999.039, 0.000, 0.000, -180.000); SetObjectMaterial(objectid, 2, 14392, "dr_gsstudio", "monitors_128", 0); objectid = CreateObject(14532, -12.020, 154.889, 999.039, 0.000, 0.000, -180.000); SetObjectMaterial(objectid, 2, 14392, "dr_gsstudio", "monitors_128", 0); objectid = CreateObject(2207, -43.580, 172.429, 998.039, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 18065, "ab_sfammumain", "gun_floor1", 0); objectid = CreateObject(2208, -43.740, 173.589, 997.950, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 18065, "ab_sfammumain", "gun_floor1", 0); objectid = CreateObject(2207, -41.709, 174.880, 998.039, 0.000, 0.000, -180.000); SetObjectMaterial(objectid, 0, 18065, "ab_sfammumain", "gun_floor1", 0); objectid = CreateObject(2208, -42.060, 172.610, 997.929, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 18065, "ab_sfammumain", "gun_floor1", 0); objectid = CreateObject(2208, -42.090, 174.490, 997.929, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 18065, "ab_sfammumain", "gun_floor1", 0); objectid = CreateObject(2207, -38.360, 172.660, 998.010, 0.000, 0.000, -270.000); SetObjectMaterial(objectid, 0, 18065, "ab_sfammumain", "gun_floor1", 0); objectid = CreateObject(1789, -48.630, 153.649, 998.609, 0.000, 0.000, 89.279); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(1789, -60.130, 158.449, 998.609, 0.000, 0.000, 1.559); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(2146, -47.000, 149.350, 998.549, 0.000, 0.000, 88.260); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(2146, -61.330, 149.250, 998.549, 0.000, 0.000, 89.220); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(2146, -62.389, 158.250, 998.549, 0.000, 0.000, 89.220); SetObjectMaterial(objectid, 0, 14600, "paperchase_bits2", "ab_medbag", 0); objectid = CreateObject(3578, -39.950, 151.830, 997.280, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 14853, "gen_pol_vegas", "blue_carpet_256", 0); objectid = CreateObject(3578, -45.259, 156.720, 997.280, 0.000, 0.000, 90.000); SetObjectMaterial(objectid, 0, 14853, "gen_pol_vegas", "blue_carpet_256", 0); objectid = CreateObject(3578, -34.930, 151.820, 997.290, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 14853, "gen_pol_vegas", "blue_carpet_256", 0); objectid = CreateObject(3578, -30.020, 146.910, 997.280, 0.000, 0.000, 90.000); SetObjectMaterial(objectid, 0, 14853, "gen_pol_vegas", "blue_carpet_256", 0); objectid = CreateObject(3578, -24.639, 142.020, 997.280, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 14853, "gen_pol_vegas", "blue_carpet_256", 0); objectid = CreateObject(3578, -15.140, 142.009, 997.280, 0.000, 0.000, 0.000); SetObjectMaterial(objectid, 0, 14853, "gen_pol_vegas", "blue_carpet_256", 0); objectid = CreateObject(3578, -10.239, 147.410, 997.280, 0.000, 0.000, 90.000); SetObjectMaterial(objectid, 0, 14853, "gen_pol_vegas", "blue_carpet_256", 0); CreateObject(1523, -42.049, 148.570, 998.049, 0.000, 0.000, 0.000); // CreateObject(2611, -27.750, 146.080, 999.500, 0.000, 0.000, -89.940); CreateObject(2000, -22.069, 149.029, 998.059, 0.000, 0.000, -90.000); CreateObject(18074, -27.409, 150.410, 999.200, 0.000, 0.000, 0.000); CreateObject(18001, -27.000, 7680.000, 151.000, 0.000, 0.000, 0.000); CreateObject(2007, -22.069, 149.779, 998.049, 0.000, 0.000, -90.000); CreateObject(19325, -27.000, 2976.000, 158.000, 0.000, 0.000, 0.000); CreateObject(2373, -27.290, 150.039, 996.909, 0.000, 0.000, -90.000); CreateObject(2373, -27.280, 151.559, 996.909, 0.000, 0.000, -90.000); CreateObject(2373, -27.270, 153.080, 996.909, 0.000, 0.000, -90.000); CreateObject(2373, -27.290, 154.610, 996.909, 0.000, 0.000, -90.000); CreateObject(1999, -26.770, 149.470, 998.059, 0.000, 0.000, 90.000); CreateObject(1999, -26.780, 151.470, 998.059, 0.000, 0.000, 90.000); CreateObject(1999, -26.770, 153.449, 998.059, 0.000, 0.000, 90.000); CreateObject(2002, -22.999, 158.160, 998.059, 0.000, 0.000, 0.000); CreateObject(2894, -26.750, 151.500, 998.869, 0.000, 0.000, 99.180); CreateObject(2894, -26.670, 149.570, 998.869, 0.000, 0.000, 86.819); CreateObject(2001, -21.969, 150.589, 998.059, 0.000, 0.000, -41.159); CreateObject(1811, -25.920, 150.440, 998.650, 0.000, 0.000, 3.299); CreateObject(1811, -26.040, 152.380, 998.650, 0.000, 0.000, -1.500); CreateObject(1811, -26.049, 154.330, 998.650, 0.000, 0.000, -1.500); CreateObject(937, -38.889, 144.710, 998.530, 0.000, 0.000, 90.000); CreateObject(937, -38.880, 142.820, 998.530, 0.000, 0.000, 90.000); CreateObject(18074, -27.409, 150.410, 999.450, 0.000, 0.000, 0.000); CreateObject(1778, -37.310, 149.399, 998.280, 0.000, 0.000, 89.819); CreateObject(19379, -27.579, 139.750, 992.809, 0.000, 0.000, 0.000); CreateObject(2001, -27.989, 166.229, 998.059, 0.000, 0.000, -42.180); CreateObject(2002, -28.000, 8249.000, 137.000, 0.000, 0.000, 0.000); CreateObject(2002, -27.950, 137.199, 998.049, 0.000, 0.000, 180.000); CreateObject(1997, -17.430, 145.479, 998.039, 0.000, 0.000, 90.000); CreateObject(2004, -47.200, 146.429, 998.869, 0.000, 0.000, 90.000); CreateObject(2004, -47.180, 144.570, 998.869, 0.000, 0.000, 90.000); CreateObject(2004, -47.180, 142.679, 998.869, 0.000, 0.000, 90.000); CreateObject(2004, -47.220, 140.770, 998.869, 0.000, 0.000, 90.000); CreateObject(2004, -47.180, 144.570, 999.929, 0.000, 0.000, 90.000); CreateObject(2004, -47.200, 146.429, 999.909, 0.000, 0.000, 90.000); CreateObject(2004, -47.180, 142.679, 999.929, 0.000, 0.000, 90.000); CreateObject(2004, -47.220, 140.770, 999.950, 0.000, 0.000, 90.000); CreateObject(2905, -45.409, 144.190, 999.140, 0.000, 90.000, -88.559); CreateObject(2907, -46.189, 144.110, 999.099, 0.000, 0.000, -90.000); CreateObject(2905, -45.430, 143.970, 999.140, 0.000, 90.000, -92.160); CreateObject(2908, -46.750, 144.059, 999.109, 14.000, 90.000, -83.000); CreateObject(2906, -46.279, 143.820, 999.039, 0.000, 0.000, -120.900); CreateObject(2906, -46.240, 144.289, 999.099, 0.000, 180.000, -76.139); CreateObject(1997, -17.350, 147.520, 998.039, 0.000, 0.000, 90.000); CreateObject(1997, -17.409, 149.529, 998.039, 0.000, 0.000, 90.000); CreateObject(1997, -17.420, 151.649, 998.039, 0.000, 0.000, 90.000); CreateObject(14693, -16.260, 151.690, 998.479, 0.000, 0.000, 17.760); CreateObject(14693, -16.250, 149.500, 998.479, 0.000, 0.000, 17.760); CreateObject(14693, -16.190, 147.509, 998.479, 0.000, 0.000, 17.760); CreateObject(14693, -16.250, 145.440, 998.479, 0.000, 0.000, 17.760); CreateObject(18084, -17.090, 142.850, 999.739, 0.000, 0.000, 180.000); CreateObject(18084, -17.090, 142.850, 997.309, 0.000, 0.000, 180.000); CreateObject(18084, -14.479, 142.850, 999.739, 0.000, 0.000, 180.000); CreateObject(18084, -14.479, 142.850, 997.299, 0.000, 0.000, 180.000); CreateObject(18084, -12.770, 142.860, 997.299, 0.000, 0.000, 180.000); CreateObject(18084, -12.770, 142.850, 999.739, 0.000, 0.000, 180.000); CreateObject(18084, -7.690, 142.860, 997.299, 0.000, 0.000, 180.000); CreateObject(18084, -7.690, 142.880, 999.739, 0.000, 0.000, 180.000); CreateObject(18084, -5.079, 142.860, 997.299, 0.000, 0.000, 180.000); CreateObject(18084, -5.079, 142.869, 999.739, 0.000, 0.000, 180.000); CreateObject(18084, -4.190, 142.869, 997.299, 0.000, 0.000, 180.000); CreateObject(18084, -4.110, 142.880, 999.739, 0.000, 0.000, 180.000); CreateObject(18084, -1.950, 147.649, 999.739, 0.000, 0.000, 270.000); CreateObject(18084, -1.960, 147.639, 997.299, 0.000, 0.000, 270.000); CreateObject(18084, -1.950, 150.229, 999.739, 0.000, 0.000, 270.000); CreateObject(18084, -1.960, 150.229, 997.299, 0.000, 0.000, 270.000); CreateObject(18084, -1.960, 152.839, 999.739, 0.000, 0.000, 270.000); CreateObject(18084, -1.960, 152.839, 997.299, 0.000, 0.000, 270.000); CreateObject(18084, -1.970, 154.110, 997.299, 0.000, 0.000, 270.000); CreateObject(18084, -1.960, 154.130, 999.739, 0.000, 0.000, 270.000); CreateObject(18084, -4.280, 156.309, 999.739, 0.000, 0.000, 0.000); CreateObject(18084, -4.289, 156.320, 997.299, 0.000, 0.000, 0.000); CreateObject(18084, -6.880, 156.309, 999.739, 0.000, 0.000, 0.000); CreateObject(18084, -7.800, 156.309, 999.739, 0.000, 0.000, 0.000); CreateObject(18084, -6.880, 156.320, 997.299, 0.000, 0.000, 0.000); CreateObject(18084, -7.739, 156.320, 997.299, 0.000, 0.000, 0.000); CreateObject(18084, -13.020, 156.320, 997.299, 0.000, 0.000, 0.000); CreateObject(18084, -13.000, 156.320, 999.739, 0.000, 0.000, 0.000); CreateObject(18084, -15.600, 156.309, 997.299, 0.000, 0.000, 0.000); CreateObject(18084, -15.600, 156.330, 999.739, 0.000, 0.000, 0.000); CreateObject(18084, -17.129, 156.320, 999.739, 0.000, 0.000, 0.000); CreateObject(18084, -17.209, 156.309, 997.299, 0.000, 0.000, 0.000); CreateObject(18084, -19.420, 151.250, 999.739, 0.000, 0.000, 90.000); CreateObject(18084, -19.420, 148.669, 999.739, 0.000, 0.000, 90.000); CreateObject(18084, -19.420, 146.089, 999.739, 0.000, 0.000, 90.000); CreateObject(18084, -19.409, 145.009, 999.739, 0.000, 0.000, 90.000); CreateObject(18084, -19.430, 151.330, 997.299, 0.000, 0.000, 90.000); CreateObject(18084, -19.440, 148.740, 997.299, 0.000, 0.000, 90.000); CreateObject(18084, -19.430, 146.160, 997.299, 0.000, 0.000, 90.000); CreateObject(18084, -19.430, 145.059, 997.299, 0.000, 0.000, 90.000); CreateObject(3383, -5.960, 153.479, 997.869, 0.000, 0.000, 0.000); CreateObject(3394, -3.589, 153.419, 998.049, 0.000, 0.000, 0.000); CreateObject(2690, -10.300, 139.940, 999.409, 0.000, 0.000, 180.000); CreateObject(2690, -38.560, 158.669, 999.409, 0.000, 0.000, 0.000); CreateObject(2792, -44.970, 158.809, 1001.320, 0.000, 0.000, 0.000); CreateObject(2986, -39.840, 139.779, 1000.760, 90.000, 90.000, 90.000); CreateObject(2994, -42.790, 140.250, 998.549, 0.000, 0.000, -90.120); CreateObject(14834, -43.169, 158.350, 998.349, 0.000, 0.000, -34.319); CreateObject(14834, -52.945, 158.367, 998.349, 0.000, 0.000, -71.519); CreateObject(14782, -23.980, 158.429, 999.030, 0.000, 0.000, 0.000); CreateObject(1997, -12.890, 154.320, 998.039, 0.000, 0.000, 0.000); CreateObject(1997, -14.729, 154.339, 998.039, 0.000, 0.000, 0.000); CreateObject(14455, -41.970, 167.389, 999.659, 0.000, 0.000, 0.000); CreateObject(14779, -39.020, 182.009, 1000.260, 0.000, 0.000, 90.059); CreateObject(1714, -44.750, 173.940, 998.049, 0.000, 0.000, 64.080); CreateObject(1715, -41.409, 175.669, 998.059, 0.000, 0.000, -13.560); CreateObject(1715, -40.049, 175.750, 998.059, 0.000, 0.000, -13.560); CreateObject(1715, -39.849, 171.649, 998.059, 0.000, 0.000, -153.119); CreateObject(1715, -41.099, 171.520, 998.059, 0.000, 0.000, -161.399); CreateObject(1723, -31.969, 178.610, 998.049, 0.000, 0.000, -48.299); CreateObject(1724, -30.469, 175.550, 998.059, 0.000, 0.000, -90.000); CreateObject(1724, -34.439, 178.759, 998.059, 0.000, 0.000, 0.000); CreateObject(1737, -32.900, 177.059, 997.820, 0.000, 0.000, -48.479); CreateObject(1808, -28.540, 173.619, 998.049, 0.000, 0.000, -89.220); CreateObject(1846, -30.979, 176.690, 999.960, 90.000, 90.000, 0.000); CreateObject(2001, -21.729, 140.179, 998.049, 0.000, 0.000, -31.920); CreateObject(2010, -30.389, 176.089, 998.049, 0.000, 0.000, -61.619); CreateObject(2010, -32.939, 178.949, 998.049, 0.000, 0.000, -136.679); CreateObject(2162, -44.270, 167.279, 999.140, 0.000, 0.000, 180.000); CreateObject(2162, -33.860, 167.240, 999.179, 0.000, 0.000, 180.000); CreateObject(2164, -46.779, 176.789, 998.049, 0.000, 0.000, 90.000); CreateObject(2167, -46.810, 169.979, 998.049, 0.000, 0.000, 90.000); CreateObject(2167, -46.830, 169.080, 998.049, 0.000, 0.000, 90.000); CreateObject(2186, -37.330, 178.720, 998.059, 0.000, 0.000, 0.000); CreateObject(2191, -28.889, 171.770, 998.049, 0.000, 0.000, -90.000); CreateObject(2191, -28.879, 170.300, 998.049, 0.000, 0.000, -90.000); CreateObject(2191, -28.879, 168.830, 998.049, 0.000, 0.000, -90.000); CreateObject(2190, -43.680, 173.160, 998.650, 0.000, 0.000, -127.080); CreateObject(2194, -43.430, 173.020, 999.109, 0.000, 0.000, 0.000); CreateObject(2197, -23.020, 152.300, 998.059, 0.000, 0.000, -90.000); CreateObject(2197, -23.010, 155.009, 998.059, 0.000, 0.000, -90.000); CreateObject(2197, -23.010, 154.350, 998.059, 0.000, 0.000, -90.000); CreateObject(2197, -23.000, 153.669, 998.059, 0.000, 0.000, -90.000); CreateObject(2197, -23.020, 152.979, 998.059, 0.000, 0.000, -90.000); CreateObject(1778, -48.459, 153.320, 998.280, 0.000, 0.000, -6.900); CreateObject(1778, -60.479, 158.270, 998.280, 0.000, 0.000, -91.080); CreateObject(1569, -54.259, 148.619, 998.049, 0.000, 0.000, 180.000); CreateObject(1502, -21.219, 142.910, 998.049, 0.000, 0.000, -90.000); CreateObject(1502, -31.469, 166.899, 998.049, 0.000, 0.000, 0.000); CreateObject(2001, -33.520, 166.220, 998.059, 0.000, 0.000, -42.180); CreateObject(956, -33.380, 144.539, 998.460, 0.000, 0.000, 90.000); CreateObject(955, -33.330, 143.330, 998.469, 0.000, 0.000, 90.000); CreateObject(1209, -33.529, 142.259, 998.059, 0.000, 0.000, 90.000); CreateObject(1428, -46.709, 145.960, 999.539, 0.000, 0.000, 90.419); // PD exterior CreateDynamicObject(995, 1544.594238, -1618.678466, 13.262805, 90.000000, 0.000000, 270.324615); CreateDynamicObject(995, 1545.128662, -1633.476684, 13.292809, 90.000000, 0.000000, 270.324615); CreateDynamicObject(19121, 1544.701660, -1623.436523, 12.962804, 0.000000, 0.000000, 270.178314); gPDGates[0] = CreateDynamicObject(968, 1544.639892, -1631.008666, 13.252797, 0.000000, 90.000000, 90.000000); gPDGates[1] = CreateDynamicObject(980, 1588.042602, -1638.079956, 14.602818, 0.000000, 0.000000, 0.000000); // FBI exterior gFBIGates[0] = CreateDynamicObject(985, 321.255279, -1488.601318, 25.281988, 0.000000, 0.000000, -35.299957); gFBIGates[1] = CreateDynamicObject(985, 283.590423, -1542.835083, 25.281988, 0.000000, 0.000000, -34.899955); // Prison & PD (credits: Wennicke) CreateDynamicObject(8419,1219.29980469,-1342.50000000,784.02398682,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.89941406,-1331.29980469,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1205.69995117,-1328.09997559,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.89941406,-1326.50000000,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1200.90002441,-1329.69995117,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19385,1205.69995117,-1331.30004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.90002441,-1332.90002441,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(8419,1219.39941406,-1342.50000000,814.40002441,179.99450684,0.00000000,0.00000000); CreateDynamicObject(19377,1200.59997559,-1331.40002441,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(3280,1206.59997559,-1327.40002441,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1206.59997559,-1329.00000000,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1206.59997559,-1330.59997559,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1206.59997559,-1332.19995117,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1206.59997559,-1333.80004883,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.90002441,-1332.90002441,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19385,1205.69995117,-1331.30004883,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1205.69995117,-1328.09997559,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.90002441,-1329.69995117,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1200.90002441,-1326.50000000,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1200.90002441,-1331.30004883,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1220.09960938,-1326.50000000,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.09997559,-1326.50000000,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19377,1220.40002441,-1331.40002441,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(3280,1214.40002441,-1327.40002441,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1215.30004883,-1328.09997559,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1215.29980469,-1328.09960938,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1215.30004883,-1331.30004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1215.30004883,-1331.30004883,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1220.09997559,-1329.69995117,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.09997559,-1329.69995117,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.19921875,-1331.29980469,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1215.30004883,-1334.50000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1215.30004883,-1337.69995117,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1215.30004883,-1340.90002441,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1220.39941406,-1341.00000000,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19385,1215.30004883,-1334.50000000,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1215.30004883,-1337.69995117,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1215.30004883,-1340.90002441,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1220.09997559,-1332.90002441,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.09997559,-1336.09997559,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.09997559,-1339.19995117,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.09997559,-1342.50000000,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.09997559,-1342.50000000,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.09997559,-1339.19995117,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.09997559,-1336.09997559,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.09997559,-1332.90002441,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.19921875,-1340.89941406,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1220.19921875,-1340.89941406,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1205.69995117,-1334.50000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.90002441,-1336.09997559,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19385,1205.69921875,-1337.69921875,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.90002441,-1339.30004883,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19385,1205.69995117,-1340.90002441,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.90002441,-1342.50000000,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19377,1200.59960938,-1341.00000000,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19447,1200.89941406,-1340.89941406,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.90002441,-1340.90002441,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1205.69995117,-1334.50000000,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1205.69995117,-1337.69995117,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1205.69995117,-1340.90002441,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.90002441,-1342.50000000,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1200.90002441,-1339.30004883,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1200.90002441,-1336.09997559,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(3280,1206.59997559,-1335.40002441,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1206.59997559,-1337.00000000,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1206.59997559,-1338.59997559,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1206.59997559,-1340.19995117,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1206.59997559,-1341.80004883,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1214.40002441,-1329.00000000,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1214.40002441,-1330.59997559,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1214.40002441,-1332.19995117,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1214.40002441,-1333.80004883,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1214.40002441,-1335.40002441,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1214.40002441,-1337.00000000,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1214.40002441,-1338.59997559,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1214.40002441,-1340.19995117,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1214.40002441,-1341.80004883,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1212.80004883,-1327.40002441,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1211.19995117,-1327.40002441,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1209.59997559,-1327.40002441,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1208.09997559,-1327.40002441,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1210.50000000,-1326.50000000,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.19995117,-1331.30004883,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1209.89941406,-1321.89941406,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1210.50000000,-1326.59997559,807.70001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19377,1215.19995117,-1331.40002441,807.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1215.19995117,-1341.00000000,807.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1205.80004883,-1331.40002441,807.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1205.79980469,-1341.00000000,807.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1214.40002441,-1343.40002441,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1214.40002441,-1345.00000000,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1206.59997559,-1343.40002441,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3280,1206.59997559,-1345.00000000,799.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1215.30004883,-1344.09997559,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1220.09960938,-1345.69921875,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1220.09960938,-1345.69921875,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19385,1215.29980469,-1344.09960938,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1205.69995117,-1344.09997559,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.89941406,-1345.69921875,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19377,1210.50000000,-1326.59997559,790.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19377,1205.80004883,-1331.40002441,790.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1205.79980469,-1341.00000000,790.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1215.19995117,-1331.40002441,790.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1215.19995117,-1341.00000000,790.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.89941406,-1345.69921875,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19385,1205.69995117,-1344.09997559,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(8572,1204.50000000,-1346.69995117,798.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1199.19921875,-1350.50000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1200.19921875,-1350.50000000,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1195.09960938,-1350.59960938,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(16645,1198.09997559,-1328.40002441,799.09997559,0.00000000,0.00000000,180.00000000); CreateDynamicObject(16645,1198.09997559,-1331.69995117,799.09997559,0.00000000,0.00000000,179.99450684); CreateDynamicObject(16645,1198.09997559,-1334.90002441,799.09997559,0.00000000,0.00000000,179.99450684); CreateDynamicObject(16645,1198.09997559,-1338.09997559,799.09997559,0.00000000,0.00000000,179.99450684); CreateDynamicObject(16645,1198.09997559,-1341.30004883,799.09997559,0.00000000,0.00000000,179.99450684); CreateDynamicObject(16645,1198.09997559,-1344.50000000,799.09997559,0.00000000,0.00000000,179.99450684); CreateDynamicObject(16645,1198.09997559,-1344.50000000,802.70001221,0.00000000,0.00000000,179.99450684); CreateDynamicObject(16645,1198.09960938,-1341.29980469,802.70001221,0.00000000,0.00000000,179.99450684); CreateDynamicObject(16645,1198.09997559,-1338.09997559,802.70001221,0.00000000,0.00000000,179.99450684); CreateDynamicObject(16645,1198.09997559,-1334.90002441,802.70001221,0.00000000,0.00000000,179.99450684); CreateDynamicObject(16645,1198.09997559,-1331.69995117,802.70001221,0.00000000,0.00000000,179.99450684); CreateDynamicObject(16645,1198.09960938,-1328.50000000,802.70001221,0.00000000,0.00000000,179.99450684); CreateDynamicObject(16645,1222.90002441,-1343.80004883,802.67999268,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16645,1222.90002441,-1340.50000000,799.09997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16645,1222.90002441,-1337.30004883,799.09997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16645,1222.90002441,-1334.19995117,802.67999268,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16645,1222.90002441,-1331.00000000,799.09997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16645,1222.90002441,-1327.80004883,799.09997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16645,1222.89941406,-1331.00000000,799.09997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16645,1222.90002441,-1327.80004883,802.67999268,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16645,1222.90002441,-1331.00000000,802.67999268,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16645,1222.89941406,-1334.19921875,799.09997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16645,1222.90002441,-1337.30004883,802.67999268,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16645,1222.90002441,-1340.50000000,802.67999268,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16645,1222.89941406,-1343.79980469,799.09997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1205.69995117,-1321.59997559,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1215.30004883,-1321.80004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1215.19921875,-1316.00000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1209.89941406,-1312.29980469,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19447,1205.00000000,-1355.30004883,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1214.59960938,-1355.29980469,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19355,1219.39941406,-1353.69921875,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1219.39941406,-1350.50000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19355,1219.40002441,-1347.30004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1218.40002441,-1350.50000000,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1195.39941406,-1355.29980469,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19377,1205.59960938,-1359.09960938,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1216.09997559,-1359.09997559,799.20300293,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1223.50000000,-1350.59960938,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19355,1221.00000000,-1355.30004883,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19385,1224.19921875,-1355.29980469,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19355,1227.39941406,-1355.29980469,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19447,1229.00000000,-1350.50000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1229.09960938,-1350.50000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1230.89941406,-1341.00000000,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1230.89941406,-1331.39941406,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19447,1224.89941406,-1340.89941406,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19388,1215.19921875,-1310.00000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19388,1230.59960938,-1355.19921875,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19385,1230.56250000,-1355.29980469,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19355,1233.69995117,-1355.30004883,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19447,1235.19995117,-1360.09997559,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1227.59997559,-1360.09997559,795.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1227.59960938,-1360.09960938,799.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1226.59960938,-1360.19921875,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19385,1227.50000000,-1345.69995117,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19355,1224.30004883,-1345.70104980,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19388,1232.19921875,-1344.09960938,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1237.09960938,-1350.39941406,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1241.89941406,-1345.59960938,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1237.59997559,-1347.30004883,799.09997559,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1237.59960938,-1337.69921875,799.09997559,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19450,1232.19995117,-1337.69995117,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1229.09997559,-1340.90002441,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19388,1230.59997559,-1345.40002441,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19358,1216.79980469,-1312.91210938,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19388,1220.00000000,-1312.91210938,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19358,1223.20104980,-1312.91296387,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19447,1229.00000000,-1340.90002441,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1229.00000000,-1331.30004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19358,1215.40002441,-1314.59997559,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19358,1215.40002441,-1317.80004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19358,1224.79980469,-1314.50000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19358,1224.79980469,-1317.69921875,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1229.00000000,-1321.69995117,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1227.39941406,-1326.50000000,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19355,1224.19995117,-1326.50097656,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19355,1224.90002441,-1318.50000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1227.40002441,-1316.90002441,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19428,1225.59997559,-1316.90100098,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19401,1216.89941406,-1319.59960938,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19401,1220.09960938,-1319.59960938,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19401,1223.30004883,-1319.59997559,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19404,1216.90100098,-1319.40100098,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19404,1220.10095215,-1319.40100098,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19404,1223.30102539,-1319.40100098,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19388,1227.43652344,-1316.80078125,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19431,1225.59997559,-1316.80004883,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1229.09960938,-1331.29980469,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1229.09997559,-1321.69995117,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19388,1232.19995117,-1331.30004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1232.19921875,-1324.89941406,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1232.19921875,-1312.09960938,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19388,1232.19995117,-1318.50000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16101,1229.09960938,-1316.79980469,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1220.09960938,-1308.00000000,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1229.69921875,-1308.00000000,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19388,1230.59960938,-1326.79980469,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19355,1224.90002441,-1321.69995117,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19385,1224.90002441,-1324.90002441,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1230.90002441,-1321.80004883,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1230.89941406,-1312.19921875,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1220.40002441,-1321.80004883,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1220.40002441,-1312.19995117,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1237.09997559,-1360.09997559,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19447,1220.89941406,-1364.89941406,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1211.30004883,-1364.90002441,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1201.69921875,-1364.89941406,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19447,1204.59997559,-1360.09997559,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1195.09997559,-1360.19995117,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1205.59997559,-1368.69995117,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1216.09960938,-1368.69921875,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19447,1210.40002441,-1326.50000000,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1210.50000000,-1320.79980469,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19358,1233.90002441,-1355.19995117,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19358,1232.19995117,-1350.50000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1237.00000000,-1355.19995117,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1237.00000000,-1352.09997559,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19377,1227.09997559,-1350.59997559,799.20098877,0.00000000,90.00000000,0.00000000); CreateDynamicObject(14877,1236.30004883,-1353.59997559,797.09997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1242.40002441,-1356.90002441,799.20098877,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19450,1237.00000000,-1352.09997559,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19358,1232.19921875,-1347.29980469,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19358,1237.09997559,-1355.19995117,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19388,1240.30004883,-1355.19995117,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1241.80004883,-1356.90002441,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1237.00000000,-1361.69921875,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1227.40002441,-1361.69995117,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1232.30004883,-1350.40002441,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19388,1230.69995117,-1355.19995117,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1229.09997559,-1360.00000000,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19358,1227.50000000,-1355.19995117,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19388,1224.30004883,-1355.19995117,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1227.40002441,-1352.09997559,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1222.69995117,-1349.59997559,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19401,1208.09997559,-1354.40100098,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19401,1213.09997559,-1354.40100098,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19401,1210.59997559,-1354.40002441,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19355,1216.30004883,-1354.40002441,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19355,1219.50000000,-1354.40002441,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19447,1201.69995117,-1354.40002441,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19358,1221.09997559,-1357.59997559,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19358,1217.90002441,-1357.59997559,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19358,1216.30004883,-1356.00000000,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19358,1222.69995117,-1356.00000000,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1217.80004883,-1361.69995117,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1208.19995117,-1361.69995117,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1198.59960938,-1361.69921875,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1225.90002441,-1360.00000000,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1200.30004883,-1359.19995117,801.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19404,1213.09960938,-1354.60058594,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19404,1210.59960938,-1354.59960938,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19404,1208.09997559,-1354.60095215,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19358,1216.30004883,-1354.59997559,801.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19450,1201.69995117,-1354.59997559,801.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19428,1205.69995117,-1346.80004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19428,1207.29980469,-1346.79980469,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19428,1206.50000000,-1345.69995117,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19428,1206.50000000,-1347.59997559,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19428,1205.70104980,-1346.50000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19428,1207.30102539,-1346.50000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1234.39941406,-1350.39941406,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1234.40002441,-1340.80004883,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1234.39941406,-1331.19921875,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1234.40002441,-1321.59997559,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1244.90002441,-1350.40002441,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1244.90002441,-1340.80004883,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1244.90002441,-1331.19995117,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1244.89941406,-1321.59960938,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1244.90002441,-1312.00000000,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1234.40002441,-1312.00000000,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1223.90002441,-1312.00000000,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1213.40002441,-1312.00000000,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1202.89941406,-1312.00000000,795.70001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1219.59997559,-1314.50000000,795.70098877,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1210.00000000,-1316.00000000,795.70202637,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19450,1239.29980469,-1308.00000000,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1241.90002441,-1336.00000000,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1241.90002441,-1326.40002441,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1241.89941406,-1316.79980469,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1241.90002441,-1307.19995117,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1237.59997559,-1328.09997559,799.09997559,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1237.59997559,-1318.50000000,799.09997559,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19377,1237.59997559,-1308.90002441,799.09997559,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1242.40100098,-1357.00000000,799.29998779,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1227.09997559,-1357.00000000,799.29998779,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1223.59997559,-1357.00000000,799.30102539,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1213.09960938,-1359.50000000,799.29998779,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1202.59960938,-1359.50000000,799.29998779,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19379,1235.40002441,-1360.09997559,799.30200195,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19450,1205.79980469,-1315.89941406,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19450,1210.50000000,-1308.00000000,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1205.79980469,-1306.29980469,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19466,1210.69995117,-1354.59997559,801.40002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19466,1213.09960938,-1354.59960938,801.40002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19466,1208.09997559,-1354.59997559,801.40002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(16644,1207.69921875,-1354.50000000,809.79998779,0.00000000,90.00000000,90.00000000); CreateDynamicObject(16644,1210.19995117,-1354.50000000,809.79998779,0.00000000,90.00000000,90.00000000); CreateDynamicObject(1892,1212.59997559,-1310.50000000,795.76000977,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1569,1205.83996582,-1315.80004883,795.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1569,1205.83996582,-1312.80004883,795.79998779,0.00000000,0.00000000,269.79992676); CreateDynamicObject(19379,1210.30004883,-1308.09997559,804.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19379,1210.30004883,-1309.90002441,804.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19379,1210.30004883,-1311.50000000,804.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19379,1210.30004883,-1313.30004883,804.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19379,1210.30004883,-1314.80004883,804.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19379,1210.30004883,-1316.30004883,804.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19379,1210.30004883,-1317.80004883,804.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19379,1210.30004883,-1319.30004883,804.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19379,1210.30004883,-1320.69995117,804.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19379,1205.80395508,-1315.90002441,804.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1205.80297852,-1306.30004883,804.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1215.09997559,-1315.80004883,804.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1215.09997559,-1306.19995117,804.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1210.30004883,-1308.02001953,790.65002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19379,1205.80297852,-1308.00000000,790.65002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1205.80297852,-1316.00000000,790.65002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1210.30004883,-1320.79003906,790.65002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19379,1215.18994141,-1315.90002441,790.65100098,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1215.19201660,-1315.54199219,790.65002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1215.18994141,-1304.42004395,790.65002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2310,1209.59997559,-1308.69995117,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(3657,1228.50000000,-1330.19995117,796.20001221,0.00000000,0.00000000,270.00000000); CreateDynamicObject(3657,1228.50000000,-1335.80004883,796.20001221,0.00000000,0.00000000,270.00000000); CreateDynamicObject(3657,1228.50000000,-1341.39941406,796.20001221,0.00000000,0.00000000,270.00000000); CreateDynamicObject(3055,1212.09997559,-1316.90002441,794.00097656,0.00000000,0.00000000,90.00000000); CreateDynamicObject(3055,1212.10058594,-1314.89941406,794.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(3055,1212.09997559,-1305.09997559,794.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2117,1212.59997559,-1312.50000000,796.04998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2117,1212.59997559,-1314.50000000,796.04998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2117,1212.59960938,-1316.50000000,796.04998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2117,1212.59997559,-1318.50000000,796.04998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2117,1212.59997559,-1320.50000000,796.04998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(3055,1213.00000000,-1314.90002441,794.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(3055,1213.00097656,-1317.00000000,794.00097656,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2117,1212.59997559,-1308.50000000,796.04998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(3055,1213.00000000,-1305.09997559,794.00000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2117,1212.59997559,-1308.18005371,795.40002441,0.00000000,270.00000000,90.00000000); CreateDynamicObject(2117,1212.59997559,-1311.77502441,796.40002441,0.00000000,90.00000000,90.00000000); CreateDynamicObject(19388,1215.19995117,-1306.80004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1212.17004395,-1315.90002441,790.65002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1212.17199707,-1315.79003906,790.65002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1212.17004395,-1304.16894531,790.65002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1212.59997559,-1313.79003906,796.40002441,0.00000000,90.00000000,90.00000000); CreateDynamicObject(2117,1212.59997559,-1315.79003906,796.40002441,0.00000000,90.00000000,90.00000000); CreateDynamicObject(2117,1212.59960938,-1317.79003906,796.40002441,0.00000000,90.00000000,90.00000000); CreateDynamicObject(2117,1212.59960938,-1319.79003906,796.40002441,0.00000000,90.00000000,90.00000000); CreateDynamicObject(2165,1212.61914062,-1314.59960938,796.05999756,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2165,1212.59997559,-1318.50000000,796.05999756,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1208.90002441,-1308.69995117,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1208.19995117,-1308.69995117,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1206.40002441,-1318.19995117,796.29998779,0.00000000,0.00000000,180.00000000); CreateDynamicObject(2111,1206.80004883,-1319.69995117,796.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2310,1206.40002441,-1317.50000000,796.29998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2310,1206.40002441,-1316.80004883,796.29998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2310,1208.69995117,-1320.30004883,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1209.39941406,-1320.29980469,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1210.09997559,-1320.30004883,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2186,1214.69995117,-1319.30004883,795.79998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2197,1214.00000000,-1315.69995117,795.79998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2197,1214.00000000,-1314.30004883,795.79998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2197,1214.00000000,-1315.00000000,795.79998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(948,1206.19995117,-1316.09997559,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(948,1206.19921875,-1312.50000000,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2852,1207.00000000,-1319.59997559,796.59997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19379,1201.09997559,-1315.80004883,793.09997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19379,1201.09997559,-1312.80004883,793.09997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(18613,1204.19995117,-1315.09997559,798.29998779,0.00000000,90.00000000,0.00000000); CreateDynamicObject(18613,1204.19995117,-1313.50000000,798.29998779,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19466,1223.50000000,-1319.50000000,797.90002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19466,1220.19995117,-1319.50000000,797.90002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19466,1217.00000000,-1319.50000000,797.90002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2117,1223.40002441,-1319.90002441,795.70098877,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1221.50000000,-1319.90002441,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1219.59997559,-1319.90002441,795.70098877,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1217.69995117,-1319.90002441,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3055,1219.20104980,-1320.30004883,793.64001465,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1215.80004883,-1319.90002441,795.70098877,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3055,1220.90002441,-1320.30102539,793.64001465,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2310,1216.80004883,-1321.00000000,796.20001221,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1220.09997559,-1321.00000000,796.20001221,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1223.40002441,-1321.00000000,796.20001221,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19428,1218.50000000,-1320.19995117,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19428,1221.69921875,-1320.19921875,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1215.80004883,-1319.00000000,795.70098877,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1217.69995117,-1319.00000000,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1219.59997559,-1319.00000000,795.70098877,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1221.50000000,-1319.00000000,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1223.40002441,-1319.00000000,795.70098877,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3055,1220.90002441,-1318.50097656,793.64001465,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3055,1219.30004883,-1318.50000000,793.64001465,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19431,1221.69995117,-1318.80004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19431,1218.50000000,-1318.80004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2310,1223.40002441,-1317.90002441,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1220.09997559,-1317.90002441,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1216.90002441,-1317.90002441,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1269,1220.09997559,-1318.90002441,796.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1269,1220.09997559,-1320.00000000,796.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1269,1223.30004883,-1318.90002441,796.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1269,1216.90002441,-1318.90002441,796.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1269,1216.90002441,-1320.00000000,796.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1269,1223.30004883,-1320.00000000,796.00000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2230,1220.95996094,-1318.40002441,796.02001953,270.00000000,0.00000000,90.00000000); CreateDynamicObject(2230,1217.76000977,-1318.40002441,796.02001953,270.00000000,0.00000000,90.00000000); CreateDynamicObject(2230,1224.16003418,-1318.40002441,796.02001953,270.00000000,0.00000000,90.00000000); CreateDynamicObject(2230,1224.15917969,-1319.90002441,796.02001953,270.00000000,0.00000000,90.00000000); CreateDynamicObject(2230,1220.95996094,-1319.90002441,796.02001953,270.00000000,0.00000000,90.00000000); CreateDynamicObject(2230,1217.75976562,-1319.90002441,796.02001953,270.00000000,0.00000000,90.00000000); CreateDynamicObject(1216,1225.30004883,-1319.69995117,796.40002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1216,1225.30004883,-1322.19995117,796.40002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1216.40002441,-1313.40002441,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1217.09997559,-1313.40002441,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1217.80004883,-1313.40002441,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1222.90002441,-1313.40002441,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1222.19995117,-1313.40002441,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1223.59997559,-1313.40002441,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(948,1218.59997559,-1313.40002441,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(948,1221.30004883,-1313.40002441,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2007,1231.59997559,-1308.59997559,795.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3055,1228.19995117,-1310.19995117,793.84997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2007,1230.59997559,-1308.59997559,795.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2007,1229.59997559,-1308.59997559,795.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2007,1228.59997559,-1308.59997559,795.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1224.80004883,-1310.69995117,795.90002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1226.80004883,-1310.69995117,795.90002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1228.80004883,-1310.69995117,795.90002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1230.69995117,-1310.69995117,795.90002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3055,1228.19995117,-1311.09997559,793.84997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2117,1225.09997559,-1310.69995117,795.29998779,0.00000000,270.00000000,0.00000000); CreateDynamicObject(2007,1228.59960938,-1308.59960938,797.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2007,1229.59997559,-1308.59997559,797.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2007,1230.59997559,-1308.59997559,797.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2007,1231.59997559,-1308.59997559,797.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2186,1225.00000000,-1308.59960938,795.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2165,1231.59997559,-1310.69995117,795.90002441,0.00000000,0.00000000,180.00000000); CreateDynamicObject(2165,1227.79980469,-1310.69921875,795.90002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2117,1227.09960938,-1310.69921875,795.29998779,0.00000000,270.00000000,0.00000000); CreateDynamicObject(2117,1229.09997559,-1310.69995117,795.29998779,0.00000000,270.00000000,0.00000000); CreateDynamicObject(2117,1231.09997559,-1310.69995117,795.29998779,0.00000000,270.00000000,0.00000000); CreateDynamicObject(16101,1224.80004883,-1312.90002441,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16101,1215.19921875,-1345.79980469,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16101,1215.19995117,-1345.80004883,800.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16101,1207.29980469,-1347.59960938,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16101,1207.30004883,-1347.59997559,800.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16101,1207.29980469,-1345.69921875,795.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16101,1207.30004883,-1345.69995117,800.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(16101,1207.40002441,-1328.09997559,799.20001221,0.00000000,180.00000000,0.00000000); CreateDynamicObject(16101,1213.59997559,-1328.09997559,799.20001221,0.00000000,179.99450684,0.00000000); CreateDynamicObject(16101,1213.69995117,-1345.59997559,799.20001221,0.00000000,179.99450684,0.00000000); CreateDynamicObject(16101,1205.79980469,-1345.79980469,797.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2310,1221.09960938,-1309.09960938,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2310,1219.00000000,-1309.30004883,796.29998779,0.00000000,0.00000000,180.00000000); CreateDynamicObject(2165,1220.09997559,-1309.69995117,795.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2137,1233.69995117,-1340.19995117,795.79998779,0.00000000,0.00000000,180.00000000); CreateDynamicObject(2138,1239.52929688,-1340.19921875,795.79998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2140,1232.80004883,-1338.30004883,795.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2303,1229.50000000,-1323.09997559,795.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2305,1234.69995117,-1355.80004883,795.80102539,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2135,1238.56933594,-1340.20605469,795.79998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2136,1234.60803223,-1362.31396484,795.79998779,0.00000000,0.00000000,269.98901367); CreateDynamicObject(2137,1232.79980469,-1339.29980469,795.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2137,1234.67968750,-1340.19921875,795.79998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2139,1236.03198242,-1337.30004883,795.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2140,1232.80004883,-1337.32995605,795.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2138,1240.50000000,-1340.19995117,795.79998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2139,1237.02197266,-1337.30004883,795.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2139,1238.00000000,-1337.30004883,795.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2139,1238.02734375,-1336.27636719,795.79998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2139,1237.05004883,-1336.27636719,795.79998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2139,1236.05859375,-1336.27539062,795.79998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(3383,1236.69995117,-1335.30004883,800.40002441,320.00000000,179.99450684,0.00000000); CreateDynamicObject(3383,1237.30004883,-1338.40002441,800.40002441,319.99877930,179.99450684,180.00000000); CreateDynamicObject(1723,1241.19995117,-1324.09997559,795.79998779,0.00000000,0.00000000,180.00000000); CreateDynamicObject(1724,1237.80004883,-1323.09997559,795.79998779,0.00000000,0.00000000,89.99572754); CreateDynamicObject(2357,1237.90002441,-1332.30004883,796.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2357,1237.90002441,-1328.69995117,796.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2310,1239.30004883,-1333.50000000,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1238.59997559,-1333.50000000,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1237.19995117,-1333.50000000,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1236.50000000,-1333.50000000,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1237.90002441,-1333.50000000,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1239.30004883,-1329.80004883,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1238.59997559,-1329.80004883,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1237.90002441,-1329.80004883,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1237.19995117,-1329.80004883,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1236.50000000,-1329.80004883,796.29998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2310,1236.50000000,-1331.19995117,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1237.19995117,-1331.19995117,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1237.90002441,-1331.19995117,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1238.59997559,-1331.19995117,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1239.30004883,-1331.19995117,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1239.30004883,-1327.59997559,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1238.59997559,-1327.59997559,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1237.90002441,-1327.59997559,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1237.19995117,-1327.59997559,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2310,1236.50000000,-1327.59997559,796.29998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19358,1233.80004883,-1324.80004883,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19358,1240.19995117,-1324.80004883,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19358,1243.40002441,-1324.80004883,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2964,1236.79980469,-1311.59960938,795.79998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(1723,1239.19995117,-1320.90002441,795.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1737,1239.69995117,-1322.59997559,795.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2297,1241.50000000,-1315.50000000,795.79998779,0.00000000,0.00000000,225.00000000); CreateDynamicObject(1723,1237.90002441,-1317.30004883,795.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1737,1239.59997559,-1316.80004883,795.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2303,1229.50000000,-1324.09997559,795.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2303,1229.50000000,-1322.09997559,795.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2303,1229.50000000,-1322.09997559,796.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2303,1229.50000000,-1323.09997559,796.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2303,1229.50000000,-1324.09997559,796.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2303,1229.50000000,-1325.09997559,795.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(19450,1237.09997559,-1340.80004883,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2138,1237.59960938,-1340.19921875,795.79998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(1502,1229.81494141,-1345.43005371,795.73999023,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1502,1229.81640625,-1326.81933594,795.73999023,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2007,1227.59997559,-1308.59997559,797.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2007,1227.59997559,-1308.59997559,795.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1502,1226.65002441,-1316.88000488,795.73999023,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2165,1232.80004883,-1346.00000000,795.79998779,0.00000000,0.00000000,359.99450684); CreateDynamicObject(2165,1236.69995117,-1346.00000000,795.79998779,0.00000000,0.00000000,359.99450684); CreateDynamicObject(2165,1240.30004883,-1346.00000000,795.79998779,0.00000000,0.00000000,359.98901367); CreateDynamicObject(2165,1236.69995117,-1348.69995117,795.79998779,0.00000000,0.00000000,359.98901367); CreateDynamicObject(2165,1232.80004883,-1348.69995117,795.79998779,0.00000000,0.00000000,359.98901367); CreateDynamicObject(2165,1240.30004883,-1348.69995117,795.79998779,0.00000000,0.00000000,359.98901367); CreateDynamicObject(2166,1241.30004883,-1341.90002441,795.79998779,0.00000000,0.00000000,180.00000000); CreateDynamicObject(2165,1239.30004883,-1342.90002441,795.79998779,0.00000000,0.00000000,180.00000000); CreateDynamicObject(2186,1234.90002441,-1341.50000000,795.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1671,1233.30004883,-1349.69995117,796.20001221,0.00000000,0.00000000,180.00000000); CreateDynamicObject(1671,1237.30004883,-1349.69995117,796.20001221,0.00000000,0.00000000,179.99450684); CreateDynamicObject(1671,1240.80004883,-1349.80004883,796.20001221,0.00000000,0.00000000,179.99450684); CreateDynamicObject(1671,1240.80004883,-1346.90002441,796.20001221,0.00000000,0.00000000,179.99450684); CreateDynamicObject(1671,1237.30004883,-1346.90002441,796.20001221,0.00000000,0.00000000,179.99450684); CreateDynamicObject(1671,1233.30004883,-1346.90002441,796.20001221,0.00000000,0.00000000,179.99450684); CreateDynamicObject(1671,1238.80004883,-1341.80004883,796.20001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2612,1237.30004883,-1341.00000000,797.79998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2611,1241.69995117,-1344.50000000,797.70001221,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2616,1235.09997559,-1350.19995117,797.70001221,0.00000000,0.00000000,180.00000000); CreateDynamicObject(2400,1232.30004883,-1355.30004883,799.59997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2400,1236.00000000,-1355.30004883,799.59997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(14401,1240.09997559,-1373.19995117,799.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(14401,1247.50000000,-1373.19921875,799.70001221,0.00000000,0.00000000,0.00000000); CreateDynamicObject(14782,1232.29980469,-1361.19921875,800.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(14782,1238.50000000,-1361.19995117,800.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2689,1238.90002441,-1355.69995117,800.09997559,0.00000000,0.00000000,180.00000000); CreateDynamicObject(2704,1238.26000977,-1355.59997559,800.92999268,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2843,1236.50000000,-1360.69995117,799.40002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2846,1233.00000000,-1360.50000000,799.40002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2705,1236.50000000,-1355.80004883,800.09997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2706,1237.09997559,-1355.80004883,800.09997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2844,1235.59997559,-1355.30004883,799.40002441,0.00000000,0.00000000,250.00000000); CreateDynamicObject(2165,1220.19995117,-1358.30004883,799.40002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2166,1215.69995117,-1356.19995117,799.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(1671,1202.50000000,-1360.09997559,799.79998779,0.00000000,0.00000000,359.99450684); CreateDynamicObject(2166,1210.30004883,-1356.19995117,799.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2165,1208.30004883,-1357.19995117,799.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2166,1205.00000000,-1356.19995117,799.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2165,1203.00000000,-1357.19995117,799.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2166,1215.69995117,-1360.09997559,799.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2165,1213.69995117,-1361.09997559,799.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2166,1210.30004883,-1360.09997559,799.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2166,1205.00000000,-1360.09997559,799.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2165,1203.00000000,-1361.09997559,799.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(1671,1202.50000000,-1356.19995117,799.79998779,0.00000000,0.00000000,359.98901367); CreateDynamicObject(1671,1207.69995117,-1356.19995117,799.79998779,0.00000000,0.00000000,359.98901367); CreateDynamicObject(1671,1213.09997559,-1356.19995117,799.79998779,0.00000000,0.00000000,359.98901367); CreateDynamicObject(1671,1213.09997559,-1360.19995117,799.79998779,0.00000000,0.00000000,359.98901367); CreateDynamicObject(2165,1208.30004883,-1361.09997559,799.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(1671,1207.80004883,-1360.19995117,799.79998779,0.00000000,0.00000000,359.98901367); CreateDynamicObject(2186,1217.40002441,-1358.19995117,799.40002441,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2165,1213.69921875,-1357.19921875,799.40002441,0.00000000,0.00000000,179.99450684); CreateDynamicObject(1969,1220.80004883,-1364.30004883,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1968,1220.80004883,-1358.59997559,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1968,1220.80004883,-1361.59997559,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1969,1220.80004883,-1355.90002441,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1968,1217.00000000,-1358.59997559,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1968,1209.69995117,-1358.59997559,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1968,1205.90002441,-1358.59997559,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1968,1217.00000000,-1361.59997559,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1968,1213.40002441,-1361.59997559,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1968,1209.69995117,-1361.59997559,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1968,1205.90002441,-1361.59997559,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1969,1217.00000000,-1364.30004883,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1969,1213.40002441,-1364.30004883,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1969,1209.69995117,-1364.30004883,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1969,1205.90002441,-1364.30004883,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1969,1217.00000000,-1355.90002441,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1969,1213.30004883,-1355.90002441,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1969,1209.69995117,-1355.90002441,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1969,1205.90002441,-1355.90002441,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2441,1228.00000000,-1355.90002441,795.70001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2441,1228.00000000,-1356.90002441,795.70001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2441,1228.00000000,-1357.90002441,795.70001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2441,1228.00000000,-1358.90002441,795.70001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2441,1228.00000000,-1359.90002441,795.70001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2441,1228.00000000,-1360.90002441,795.70001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2441,1228.00000000,-1361.90002441,795.70001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2441,1228.00000000,-1362.90002441,795.70001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2441,1228.00000000,-1363.90002441,795.70001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2441,1228.00000000,-1364.90002441,795.70001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(16644,1212.69921875,-1354.50000000,809.79998779,0.00000000,90.00000000,90.00000000); CreateDynamicObject(16644,1227.59997559,-1365.30004883,798.79998779,90.00000000,0.00000000,90.00000000); CreateDynamicObject(2136,1236.63964844,-1340.20703125,795.79998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(2135,1234.60900879,-1358.35705566,795.79998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2137,1234.59997559,-1364.30004883,795.79998779,0.00000000,0.00000000,269.98901367); CreateDynamicObject(2137,1234.59997559,-1361.32702637,795.79998779,0.00000000,0.00000000,269.98901367); CreateDynamicObject(2137,1234.59997559,-1360.33801270,795.79998779,0.00000000,0.00000000,269.98901367); CreateDynamicObject(2137,1234.59997559,-1359.33801270,795.79998779,0.00000000,0.00000000,269.98901367); CreateDynamicObject(2135,1234.60900879,-1357.36999512,795.79998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2137,1234.59997559,-1356.40002441,795.79998779,0.00000000,0.00000000,269.98901367); CreateDynamicObject(2305,1232.79980469,-1340.19921875,795.79998779,0.00000000,0.00000000,179.99450684); CreateDynamicObject(19447,1227.59997559,-1369.69995117,797.59997559,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19355,1227.30004883,-1364.90002441,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19385,1230.50000000,-1364.90002441,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19355,1233.69995117,-1364.90002441,797.50000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(19447,1228.40002441,-1369.80004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19447,1232.90002441,-1369.80004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(19377,1227.90002441,-1369.69995117,799.20001221,0.00000000,90.00000000,0.00000000); CreateDynamicObject(19447,1230.09997559,-1372.09997559,797.50000000,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1847,1228.80004883,-1367.50000000,795.79998779,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1983,1229.00000000,-1370.50000000,795.90002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1983,1229.00000000,-1371.50000000,795.90002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(2012,1232.19995117,-1366.50000000,795.79998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2012,1232.19995117,-1369.50000000,795.79998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(1983,1232.30004883,-1371.50000000,795.79998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(1983,1229.00000000,-1370.50000000,797.40002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1983,1229.00000000,-1371.50000000,797.40002441,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1523,1229.73999023,-1364.93005371,795.72998047,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2139,1232.02404785,-1361.62902832,795.79998779,0.00000000,0.00000000,89.99450684); CreateDynamicObject(2139,1232.02404785,-1360.66003418,795.80102539,0.00000000,0.00000000,89.99450684); CreateDynamicObject(2139,1232.02404785,-1359.68505859,795.79998779,0.00000000,0.00000000,89.99450684); CreateDynamicObject(2139,1232.02404785,-1358.72998047,795.80102539,0.00000000,0.00000000,89.99450684); CreateDynamicObject(2139,1231.00000000,-1361.59997559,795.79998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2139,1231.00000000,-1360.64001465,795.80102539,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2139,1231.00000000,-1359.67004395,795.79998779,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2139,1231.00000000,-1358.69995117,795.80102539,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2149,1231.19995117,-1361.80004883,797.00000000,0.00000000,0.00000000,270.00000000); CreateDynamicObject(2149,1231.09997559,-1361.19995117,797.00000000,0.00000000,0.00000000,287.00000000); CreateDynamicObject(2866,1231.40002441,-1359.80004883,796.85998535,0.00000000,0.00000000,0.00000000); CreateDynamicObject(2867,1234.69995117,-1362.19995117,796.84997559,0.00000000,0.00000000,60.00000000); CreateDynamicObject(19447,1224.90002441,-1331.30004883,797.50000000,0.00000000,0.00000000,0.00000000); CreateDynamicObject(1968,1213.39941406,-1358.59960938,796.29998779,0.00000000,0.00000000,0.00000000); CreateDynamicObject(3657,1210.09997559,-1343.00000000,796.20001221,0.00000000,0.00000000,270.00000000); CreateDynamicObject(3657,1210.90002441,-1343.00000000,796.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(3657,1210.09997559,-1331.90002441,796.20001221,0.00000000,0.00000000,270.00000000); CreateDynamicObject(3657,1210.90002441,-1331.90002441,796.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1204.59997559,-1345.09997559,795.59997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1204.59997559,-1341.90002441,795.59997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1204.59997559,-1338.69995117,795.59997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1204.59997559,-1335.50000000,795.59997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1204.59997559,-1332.30004883,795.59997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1204.59997559,-1329.09997559,795.59997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1204.59997559,-1329.09997559,799.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1204.59997559,-1345.09997559,799.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1204.59997559,-1341.90002441,799.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1204.59997559,-1338.69995117,799.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1204.59997559,-1335.50000000,799.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1204.59997559,-1332.30004883,799.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1221.19995117,-1327.40002441,799.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1221.19995117,-1330.59997559,799.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1221.19995117,-1333.80004883,799.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1221.19995117,-1337.00000000,799.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1221.19995117,-1340.09997559,799.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1221.19995117,-1343.40002441,799.20001221,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1221.19995117,-1343.40002441,795.59997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1221.19995117,-1340.09997559,795.59997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1221.19995117,-1337.00000000,795.59997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1221.19995117,-1333.80004883,795.59997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1221.19995117,-1330.59997559,795.59997559,0.00000000,0.00000000,90.00000000); CreateDynamicObject(1800,1221.19995117,-1327.40002441,795.59997559,0.00000000,0.00000000,90.00000000); objectid = CreateDynamicObject(19304,1213.59997559,-1329.90002441,799.79998779,0.00000000,0.00000000,90.00000000); SetDynamicObjectMaterial(objectid, 0, 19304, "pd_jail_door_top01", "pd_jail_door_top01", 0xFF000000); objectid = CreateDynamicObject(19304,1213.59997559,-1333.40002441,799.79998779,0.00000000,0.00000000,90.00000000); SetDynamicObjectMaterial(objectid, 0, 19304, "pd_jail_door_top01", "pd_jail_door_top01", 0xFF000000); objectid = CreateDynamicObject(19304,1213.59997559,-1336.90002441,799.79998779,0.00000000,0.00000000,90.00000000); SetDynamicObjectMaterial(objectid, 0, 19304, "pd_jail_door_top01", "pd_jail_door_top01", 0xFF000000); objectid = CreateDynamicObject(19304,1213.59997559,-1340.40002441,799.79998779,0.00000000,0.00000000,90.00000000); SetDynamicObjectMaterial(objectid, 0, 19304, "pd_jail_door_top01", "pd_jail_door_top01", 0xFF000000); objectid = CreateDynamicObject(19304,1213.59997559,-1343.90002441,799.79998779,0.00000000,0.00000000,90.00000000); SetDynamicObjectMaterial(objectid, 0, 19304, "pd_jail_door_top01", "pd_jail_door_top01", 0xFF000000); objectid = CreateDynamicObject(19304,1211.90002441,-1328.09997559,799.79998779,0.00000000,0.00000000,0.00000000); SetDynamicObjectMaterial(objectid, 0, 19304, "pd_jail_door_top01", "pd_jail_door_top01", 0xFF000000); objectid = CreateDynamicObject(19304,1209.09997559,-1328.09997559,799.79998779,0.00000000,0.00000000,0.00000000); SetDynamicObjectMaterial(objectid, 0, 19304, "pd_jail_door_top01", "pd_jail_door_top01", 0xFF000000); objectid = CreateDynamicObject(19304,1207.40002441,-1329.90002441,799.79998779,0.00000000,0.00000000,90.00000000); SetDynamicObjectMaterial(objectid, 0, 19304, "pd_jail_door_top01", "pd_jail_door_top01", 0xFF000000); objectid = CreateDynamicObject(19304,1207.40002441,-1333.40002441,799.79998779,0.00000000,0.00000000,90.00000000); SetDynamicObjectMaterial(objectid, 0, 19304, "pd_jail_door_top01", "pd_jail_door_top01", 0xFF000000); objectid = CreateDynamicObject(19304,1207.40002441,-1336.90002441,799.79998779,0.00000000,0.00000000,90.00000000); SetDynamicObjectMaterial(objectid, 0, 19304, "pd_jail_door_top01", "pd_jail_door_top01", 0xFF000000); objectid = CreateDynamicObject(19304,1207.40002441,-1340.40002441,799.79998779,0.00000000,0.00000000,90.00000000); SetDynamicObjectMaterial(objectid, 0, 19304, "pd_jail_door_top01", "pd_jail_door_top01", 0xFF000000); objectid = CreateDynamicObject(19304,1207.40002441,-1343.90002441,799.79998779,0.00000000,0.00000000,90.00000000); SetDynamicObjectMaterial(objectid, 0, 19304, "pd_jail_door_top01", "pd_jail_door_top01", 0xFF000000); objectid = CreateDynamicObject(19304,1215.30004883,-1345.69995117,799.79998779,0.00000000,0.00000000,0.00000000); gPDDoors[0] = CreateDynamicObject(1495,1226.66210938,-1326.52929688,795.75000000,0.00000000,0.00000000,0.00000000); //DOOR gPDDoors[1] = CreateDynamicObject(1495,1215.21997070,-1310.73999023,795.75000000,0.00000000,0.00000000,90.00000000); //DOOR gPDDoors[2] = CreateDynamicObject(1495,1226.76501465,-1345.71997070,795.73999023,0.00000000,0.00000000,0.00000000); //DOOR gPrisonCells[0] = CreateDynamicObject(19302,1205.69995117,-1328.09997559,797.00000000,0.00000000,0.00000000,90.00000000); gPrisonCells[1] = CreateDynamicObject(19302,1205.69995117,-1331.30004883,797.00000000,0.00000000,0.00000000,90.00000000); gPrisonCells[2] = CreateDynamicObject(19302,1205.69995117,-1331.30004883,800.50000000,0.00000000,0.00000000,90.00000000); gPrisonCells[3] = CreateDynamicObject(19302,1205.69995117,-1328.09997559,800.50000000,0.00000000,0.00000000,90.00000000); gPrisonCells[4] = CreateDynamicObject(19302,1215.30004883,-1328.09997559,797.00000000,0.00000000,0.00000000,90.00000000); gPrisonCells[5] = CreateDynamicObject(19302,1215.30004883,-1331.30004883,797.00000000,0.00000000,0.00000000,90.00000000); gPrisonCells[6] = CreateDynamicObject(19302,1215.30004883,-1331.30004883,800.50000000,0.00000000,0.00000000,90.00000000); gPrisonCells[7] = CreateDynamicObject(19302,1215.30004883,-1328.09997559,800.50000000,0.00000000,0.00000000,90.00000000); gPrisonCells[8] = CreateDynamicObject(19302,1215.30004883,-1334.50000000,797.00000000,0.00000000,0.00000000,90.00000000); gPrisonCells[9] = CreateDynamicObject(19302,1215.29980469,-1337.69921875,797.00000000,0.00000000,0.00000000,90.00000000); gPrisonCells[10] = CreateDynamicObject(19302,1215.30004883,-1340.90002441,797.00000000,0.00000000,0.00000000,90.00000000); gPrisonCells[11] = CreateDynamicObject(19302,1215.30004883,-1340.90002441,800.50000000,0.00000000,0.00000000,90.00000000); gPrisonCells[12] = CreateDynamicObject(19302,1215.30004883,-1337.69995117,800.50000000,0.00000000,0.00000000,90.00000000); gPrisonCells[13] = CreateDynamicObject(19302,1215.30004883,-1334.50000000,800.50000000,0.00000000,0.00000000,90.00000000); gPrisonCells[14] = CreateDynamicObject(19302,1205.69995117,-1334.50000000,800.50000000,0.00000000,0.00000000,90.00000000); gPrisonCells[15] = CreateDynamicObject(19302,1205.69995117,-1337.69995117,800.50000000,0.00000000,0.00000000,90.00000000); gPrisonCells[16] = CreateDynamicObject(19302,1205.69995117,-1340.90002441,800.50000000,0.00000000,0.00000000,90.00000000); gPrisonCells[17] = CreateDynamicObject(19302,1205.69995117,-1334.50000000,797.00000000,0.00000000,0.00000000,90.00000000); gPrisonCells[18] = CreateDynamicObject(19302,1205.69995117,-1337.69995117,797.00000000,0.00000000,0.00000000,90.00000000); gPrisonCells[19] = CreateDynamicObject(19302,1205.69995117,-1340.90002441,797.00000000,0.00000000,0.00000000,90.00000000); gPrisonCells[20] = CreateDynamicObject(19302,1215.30004883,-1344.09997559,800.50000000,0.00000000,0.00000000,90.00000000); gPrisonCells[21] = CreateDynamicObject(19302,1215.30004883,-1344.09997559,797.00000000,0.00000000,0.00000000,90.00000000); gPrisonCells[22] = CreateDynamicObject(19302,1205.69995117,-1344.09997559,800.50000000,0.00000000,0.00000000,90.00000000); gPrisonCells[23] = CreateDynamicObject(19302,1205.69995117,-1344.09997559,797.00000000,0.00000000,0.00000000,90.00000000); for(new i = 0; i < 24; i ++) { SetDynamicObjectMaterial(gPrisonCells[i], 0, 19302, "pd_jail_door02", "pd_jail_door02", 0xFF000000); } // FMD exterior by Lance CreateDynamicObject(3268,1571.1287800,-2174.7282700,12.5186000,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(9949,1517.5681200,-2168.8305700,24.5000000,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(10763,1474.2979700,-2156.9782700,38.0000000,0.0000000,0.0000000,45.0000000); // CreateDynamicObject(18850,1478.9538600,-2166.8579100,22.0000000,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(18850,1540.6938500,-2166.8579100,22.0000000,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(1569,1509.3479000,-2179.6994600,31.0200000,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19799,1452.2346200,-2164.4707000,14.1000000,0.0000000,0.0000000,74.8200300); // CreateDynamicObject(3268,1600.9808300,-2174.7097200,12.5186000,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(4838,1587.2423100,-2049.6191400,12.5278000,0.0000000,0.0000000,-155.8799700); // CreateDynamicObject(3578,1574.3737800,-2159.6210900,11.8025000,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(3578,1562.5632300,-2159.6289100,11.8025000,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(3578,1590.2486600,-2159.5524900,11.8025000,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(3578,1607.1795700,-2159.5551800,11.8025000,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(3578,1601.7481700,-2154.6731000,11.8025000,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(3578,1595.1035200,-2154.6853000,11.8100000,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(3578,1579.2691700,-2154.6359900,11.8100000,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(3578,1589.2910200,-2154.6516100,11.8100000,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(3578,1568.9565400,-2154.5939900,11.8100000,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(3578,1567.4160200,-2154.5903300,11.8200000,0.0000000,0.0000000,0.0000000); // // FMD interior by Lance CreateDynamicObject(19377,303.0083300,1734.1710200,2041.6202400,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,303.0080000,1724.5380900,2041.6202400,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,292.5455600,1724.5650600,2041.6202400,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,313.4708300,1724.5512700,2041.6202400,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,292.5817000,1715.0184300,2041.6202400,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,303.0470000,1715.0092800,2041.6202400,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,313.4521500,1714.9982900,2041.6202400,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,297.3785100,1729.4550800,2041.6130400,0.0000000,90.0000000,43.5000000); // CreateDynamicObject(19377,308.5267000,1728.9681400,2041.6130400,0.0000000,90.0000000,43.5000000); // CreateDynamicObject(19377,303.4111000,1705.4381100,2041.6202400,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,309.0299700,1710.0831300,2041.6130400,0.0000000,90.0000000,43.5000000); // CreateDynamicObject(19377,298.6503300,1710.3720700,2041.6130400,0.0000000,90.0000000,43.5000000); // CreateDynamicObject(19377,318.1890900,1718.8968500,2041.6130400,0.0000000,90.0000000,43.5000000); // CreateDynamicObject(19450,319.7799400,1713.8325200,2043.4499500,0.0000000,0.0000000,-47.1600000); // CreateDynamicObject(19450,316.9845300,1715.6378200,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,320.0360100,1724.4752200,2043.4499500,0.0000000,0.0000000,43.8000100); // CreateDynamicObject(19450,312.7421900,1707.2959000,2043.4499500,0.0000000,0.0000000,-47.1600000); // CreateDynamicObject(19450,303.8535200,1700.6272000,2043.4499500,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(19450,294.3555900,1700.6307400,2043.4499500,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(19450,308.5528300,1698.6328100,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,312.0556300,1706.6635700,2043.4499500,0.0000000,0.0000000,-47.1600000); // CreateDynamicObject(19450,313.6304900,1731.1495400,2043.4499500,0.0000000,0.0000000,43.8000100); // CreateDynamicObject(19377,305.1874400,1738.8909900,2041.6130400,0.0000000,90.0000000,43.5000000); // CreateDynamicObject(19450,311.5968900,1733.2728300,2043.4499500,0.0000000,0.0000000,43.8000100); // CreateDynamicObject(19450,308.2782600,1741.4941400,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,302.6104100,1739.0069600,2043.4499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,298.0647900,1741.1154800,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,312.0326500,1739.0101300,2043.4499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,298.0677800,1705.3768300,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,298.0751600,1732.9126000,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,298.0678100,1720.1391600,2041.1999500,0.0000000,180.0000000,0.0000000); // CreateDynamicObject(19450,297.9874900,1720.1200000,2045.9899900,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19388,298.0652800,1713.7240000,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,298.0574600,1707.6444100,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19388,298.0677200,1726.5491900,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,294.5946700,1733.3363000,2043.4499500,0.0000000,0.0000000,-46.5000100); // CreateDynamicObject(19450,287.7799100,1726.8686500,2043.4499500,0.0000000,0.0000000,-46.5000100); // CreateDynamicObject(19450,294.7457600,1706.9888900,2043.4499500,0.0000000,0.0000000,-136.3800000); // CreateDynamicObject(19450,288.1676300,1713.8525400,2043.4499500,0.0000000,0.0000000,-136.3800000); // CreateDynamicObject(19377,282.1066300,1721.7541500,2041.6202400,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,282.0834000,1712.1453900,2041.6202400,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19388,284.8420100,1720.6792000,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,284.8418300,1714.3811000,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,284.8419200,1726.8408200,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(14407,281.7731900,1720.7354700,2042.0200200,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(19377,279.6451400,1714.6911600,2045.1200000,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,279.6397700,1726.6131600,2045.1200000,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19450,280.0779100,1719.4262700,2043.4499500,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(19450,280.0210600,1721.8717000,2043.4499500,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(1523,284.8919100,1719.9190700,2041.6678500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,284.8293500,1714.7106900,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,284.8281600,1723.9847400,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,277.3952000,1721.4533700,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,277.3851600,1712.4227300,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,277.3986800,1730.7562300,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,284.8342900,1733.5362500,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,281.2565600,1731.1449000,2046.9499500,0.0000000,0.0000000,-90.0800000); // CreateDynamicObject(19450,282.0049100,1709.9862100,2046.9499500,0.0000000,0.0000000,-90.0800000); // CreateDynamicObject(14407,275.6328100,1720.4567900,2042.0200200,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(14782,280.9892000,1710.3958700,2046.1999500,0.0000000,0.0000000,180.0000000); // CreateDynamicObject(7666,280.9354900,1712.4360400,2045.2199700,30.0000000,90.0000000,0.0000000); // CreateDynamicObject(7666,280.9292900,1716.9151600,2045.2199700,30.0000000,90.0000000,0.0000000); // CreateDynamicObject(7666,280.9714100,1724.3070100,2045.2199700,30.0000000,90.0000000,0.0000000); // CreateDynamicObject(7666,280.9681100,1728.7729500,2045.2199700,30.0000000,90.0000000,0.0000000); // CreateDynamicObject(11713,277.5637800,1714.7343800,2047.0437000,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(11713,277.5276200,1716.6062000,2047.0437000,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(11713,284.6994600,1714.3702400,2047.0437000,0.0000000,0.0000000,180.0000000); // CreateDynamicObject(14657,278.1170300,1726.4295700,2046.0000000,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(2125,279.1882600,1726.5440700,2045.5206300,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(14657,272.9628000,1729.6212200,2046.0000000,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19377,279.6451100,1714.6911600,2048.6298800,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,279.6086400,1724.2756300,2048.6298800,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,279.9444600,1733.7408400,2048.6298800,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(1523,298.1099900,1712.9699700,2041.6678500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(1523,298.1211900,1725.7973600,2041.6678500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(10009,303.2358100,1705.9794900,2041.9799800,0.0000000,0.0000000,-540.0000000); // CreateDynamicObject(10009,303.5607000,1732.9459200,2041.9799800,0.0000000,0.0000000,360.0000000); // CreateDynamicObject(19450,312.0556300,1706.6635700,2043.4499500,0.0000000,0.0000000,-47.1600000); // CreateDynamicObject(19450,311.0549900,1710.1577100,2039.9599600,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(19450,302.8494600,1710.1633300,2039.9599600,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(19450,310.5050400,1729.3501000,2039.9599600,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(19450,302.7391700,1729.3544900,2039.9599600,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(19450,316.9876100,1725.2434100,2043.4499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,303.6236900,1716.8908700,2039.9599600,0.0000000,0.0000000,-130.0000000); // CreateDynamicObject(19450,310.9368000,1716.9149200,2039.9599600,0.0000000,0.0000000,130.0000000); // CreateDynamicObject(19450,303.6769100,1723.0781300,2039.9599600,0.0000000,0.0000000,130.0000000); // CreateDynamicObject(19450,310.9479100,1723.0629900,2039.9599600,0.0000000,0.0000000,-130.0000000); // CreateDynamicObject(19450,307.3017900,1709.1022900,2039.9599600,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,307.3015400,1700.4470200,2039.9599600,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,307.2967200,1730.8836700,2039.9599600,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,307.2979700,1740.0156300,2039.9599600,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19353,307.7066000,1719.7481700,2039.9599600,0.0000000,180.0000000,0.0000000); // CreateDynamicObject(19353,306.9244100,1719.7481700,2039.9599600,0.0000000,180.0000000,0.0000000); // CreateDynamicObject(19353,307.3072500,1720.2406000,2039.9599600,0.0000000,180.0000000,90.0000000); // CreateDynamicObject(19450,318.1711400,1723.0136700,2039.9599600,0.0000000,0.0000000,130.0000000); // CreateDynamicObject(19450,318.1921100,1716.9775400,2039.9599600,0.0000000,0.0000000,-130.0000000); // CreateDynamicObject(19450,296.3361500,1723.0107400,2039.9599600,0.0000000,0.0000000,-130.0000000); // CreateDynamicObject(19450,296.2648000,1716.8167700,2039.9599600,0.0000000,0.0000000,130.0000000); // CreateDynamicObject(19450,292.6272000,1709.0062300,2039.9599600,0.0000000,0.0000000,180.0000000); // CreateDynamicObject(19450,292.7041300,1730.8332500,2039.9599600,0.0000000,0.0000000,180.0000000); // CreateDynamicObject(1723,308.6773100,1730.8216600,2041.7044700,0.0000000,0.0000000,41.9999900); // CreateDynamicObject(1723,313.7042200,1728.3630400,2041.7044700,0.0000000,0.0000000,220.7999600); // CreateDynamicObject(2311,310.7790200,1729.1409900,2041.6988500,0.0000000,0.0000000,41.5200000); // CreateDynamicObject(1723,313.0018900,1712.7968800,2041.7044700,0.0000000,0.0000000,309.6599700); // CreateDynamicObject(2311,311.1241500,1710.7445100,2041.6988500,0.0000000,0.0000000,-49.3800000); // CreateDynamicObject(1723,310.4335300,1708.0306400,2041.7044700,0.0000000,0.0000000,132.7200000); // CreateDynamicObject(640,298.4453400,1706.9301800,2042.3800000,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(640,298.4982900,1736.0760500,2042.3800000,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(640,303.3941700,1738.7117900,2042.3800000,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(640,312.7133500,1731.4224900,2042.3800000,0.0000000,0.0000000,43.3800000); // CreateDynamicObject(640,312.7117900,1707.9856000,2042.3800000,0.0000000,0.0000000,132.0000200); // CreateDynamicObject(640,303.1869800,1701.0753200,2042.3800000,0.0000000,0.0000000,89.9399900); // CreateDynamicObject(644,314.9457100,1726.9716800,2041.9847400,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(644,315.3387800,1712.7454800,2041.9847400,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(644,299.3248300,1702.6160900,2041.9847400,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(644,299.7919000,1737.4272500,2041.5446800,0.0000000,0.0000000,-5.2800000); // CreateDynamicObject(1569,316.9355500,1718.5216100,2041.6999500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(1569,316.9151300,1721.5231900,2041.6999500,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(19377,303.2263500,1712.0775100,2045.1200000,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,313.6807900,1708.2077600,2045.1219500,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,311.0804400,1699.3798800,2045.1200000,0.0000000,90.0000000,-36.2400000); // CreateDynamicObject(19377,308.4107100,1697.4563000,2045.1230500,0.0000000,90.0000000,-59.1000000); // CreateDynamicObject(19377,302.8421000,1695.6449000,2045.1209700,0.0000000,90.0000000,-79.2600000); // CreateDynamicObject(19377,297.8151900,1697.5302700,2045.1212200,0.0000000,90.0000000,-114.2400000); // CreateDynamicObject(19377,296.8037100,1698.1572300,2045.1200000,0.0000000,90.0000000,-143.3999900); // CreateDynamicObject(19377,292.9220900,1708.3493700,2045.1209700,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,292.7083100,1698.5462600,2045.1230500,0.0000000,90.0000000,-87.4800000); // CreateDynamicObject(19377,313.6958300,1717.8597400,2045.1200000,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,313.6943700,1727.4685100,2045.1200000,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,313.6927800,1737.0770300,2045.1200000,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,303.2968100,1721.6835900,2045.1200000,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,303.3432000,1727.2338900,2045.1209700,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,302.0692100,1728.4289600,2045.1219500,0.0000000,90.0000000,28.8600000); // CreateDynamicObject(19377,295.0835000,1737.5714100,2045.1200000,0.0000000,90.0000000,-13.7400100); // CreateDynamicObject(19377,298.4128100,1741.1560100,2045.1221900,0.0000000,90.0000000,-50.2200000); // CreateDynamicObject(19377,305.4567900,1743.0904500,2045.1203600,0.0000000,90.0000000,-89.7000000); // CreateDynamicObject(19377,309.9078100,1740.4078400,2045.1219500,0.0000000,90.0000000,-129.6601000); // CreateDynamicObject(19377,292.9037500,1717.9871800,2045.1209700,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,292.8598000,1727.5999800,2045.1209700,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,292.6563100,1737.2166700,2045.1209700,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,289.8685900,1712.4522700,2045.1219500,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,289.9446100,1722.0578600,2045.1219500,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19450,305.4538900,1728.1084000,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,313.4736900,1726.3780500,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,313.1796300,1734.2570800,2046.9499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,313.4704300,1721.9592300,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,313.4807400,1710.5251500,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,305.4460800,1721.4744900,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,308.7316000,1707.4411600,2046.9499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,302.7797900,1707.4355500,2046.9499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,293.8255900,1704.6713900,2046.9499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,293.9139400,1709.3995400,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,300.7136200,1714.1364700,2046.9499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,291.1931500,1714.1359900,2046.9499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,318.2765200,1728.1485600,2046.9499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,318.2850300,1713.7363300,2046.9499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,318.1975100,1719.3842800,2046.9499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,318.9658500,1716.0202600,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,318.9632000,1732.6717500,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,322.5897500,1734.2519500,2046.9499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19388,305.4509900,1715.6485600,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19450,300.6244200,1723.7197300,2046.9499500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19450,299.9090000,1718.9587400,2046.9499500,0.0000000,0.0000000,180.0000000); // CreateDynamicObject(19388,313.4637800,1716.2133800,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19388,313.4800100,1732.7696500,2046.9499500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(941,318.2278100,1716.5438200,2045.5439500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(1369,316.9319800,1718.6926300,2045.7873500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(2792,313.4563000,1715.7637900,2048.0700700,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(2794,313.4670100,1732.3862300,2048.0700700,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(11709,316.3952300,1714.0858200,2045.8800000,0.0000000,0.0000000,-180.0000000); // CreateDynamicObject(11707,314.9844100,1713.8917200,2046.0000000,0.0000000,0.0000000,-180.0000000); // CreateDynamicObject(11738,318.2623300,1717.4075900,2046.0575000,0.0000000,0.0000000,-71.7600000); // CreateDynamicObject(11738,318.4575500,1716.3659700,2046.0575000,0.0000000,0.0000000,-88.3800000); // CreateDynamicObject(11738,318.1898200,1715.9495800,2046.0575000,0.0000000,0.0000000,-174.7199700); // CreateDynamicObject(11736,318.1078500,1716.9252900,2046.0178200,0.0000000,0.0000000,-129.8399800); // CreateDynamicObject(19339,318.3839100,1731.3282500,2046.3800000,0.0000000,0.0000000,89.2200000); // CreateDynamicObject(941,318.3655700,1731.0390600,2045.5439500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(941,316.1153000,1728.7944300,2045.5439500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(303,316.7699900,1728.6137700,2046.0169700,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(2905,316.9830300,1728.8640100,2046.0177000,0.0000000,0.0000000,-30.1800000); // CreateDynamicObject(2906,316.5119600,1729.0598100,2046.0777600,0.0000000,84.0000000,-85.0000000); // CreateDynamicObject(2906,316.1318400,1728.6934800,2046.0777600,0.0000000,84.0000000,-48.6399900); // CreateDynamicObject(2907,315.5983900,1728.8242200,2046.0577400,0.0000000,0.0000000,-30.1800000); // CreateDynamicObject(2908,316.3945000,1728.5428500,2046.1176800,-76.0000000,48.0000000,-30.0000000); // CreateDynamicObject(2905,317.2831100,1728.6457500,2046.0777600,-11.0000000,178.0000000,-46.8000000); // CreateDynamicObject(1523,313.5266100,1732.0133100,2045.1800500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(1523,313.4849900,1715.4639900,2045.1800500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(1491,305.4775100,1714.9050300,2045.1800500,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(2184,301.6876200,1720.8125000,2045.1866500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(1714,302.7992600,1722.6538100,2045.1678500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(1736,302.8185100,1723.3610800,2048.0793500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(2025,300.4746400,1723.1483200,2045.2092300,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(2025,303.9538300,1723.0762900,2045.2092300,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(11712,302.8305700,1723.6319600,2047.4000200,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(19893,302.2153000,1721.3055400,2045.9595900,0.0000000,0.0000000,136.9200000); // CreateDynamicObject(19810,305.5448600,1716.7041000,2047.2331500,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(19810,305.5567300,1714.5617700,2047.2331500,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(19806,302.4137900,1718.9931600,2048.0346700,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(19172,300.0974100,1718.6551500,2047.3912400,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(1828,302.7713600,1718.1806600,2045.1829800,0.0000000,0.0000000,90.0000000); // CreateDynamicObject(2131,301.5134300,1714.6702900,2045.2066700,0.0000000,0.0000000,180.0000000); // CreateDynamicObject(2131,303.4942300,1714.6665000,2045.2066700,0.0000000,0.0000000,180.0000000); // CreateDynamicObject(19431,307.9731400,1734.8695100,2046.9499500,0.0000000,0.0000000,34.6199700); // CreateDynamicObject(19431,306.9825400,1736.1022900,2046.9499500,0.0000000,0.0000000,43.5599700); // CreateDynamicObject(19431,305.7912600,1737.1112100,2046.9499500,0.0000000,0.0000000,55.6799800); // CreateDynamicObject(19431,304.3605300,1737.7225300,2046.9499500,0.0000000,0.0000000,79.0800000); // CreateDynamicObject(19431,303.0155300,1737.8642600,2046.9499500,0.0000000,0.0000000,90.0000200); // CreateDynamicObject(19431,302.0553900,1737.3988000,2046.9499500,0.0000000,0.0000000,131.5800000); // CreateDynamicObject(19431,300.8975200,1736.3724400,2046.9499500,0.0000000,0.0000000,131.5800000); // CreateDynamicObject(19431,299.9442100,1735.1096200,2046.9499500,0.0000000,0.0000000,157.5600000); // CreateDynamicObject(19431,299.4621300,1733.7148400,2046.9499500,0.0000000,0.0000000,163.9799300); // CreateDynamicObject(19431,299.2149400,1732.7229000,2046.9499500,0.0000000,0.0000000,171.5999500); // CreateDynamicObject(19450,298.9913900,1732.2845500,2046.9499500,0.0000000,0.0000000,117.5400200); // CreateDynamicObject(19431,303.9959700,1734.3811000,2046.9499500,0.0000000,0.0000000,261.0598400); // CreateDynamicObject(19431,305.0911300,1733.5955800,2046.9499500,0.0000000,0.0000000,207.4798700); // CreateDynamicObject(19431,298.9092100,1703.9245600,2046.9499500,0.0000000,0.0000000,28.9800300); // CreateDynamicObject(19431,299.7147800,1702.8237300,2046.9499500,0.0000000,0.0000000,41.9400300); // CreateDynamicObject(19431,300.8793300,1701.8411900,2046.9499500,0.0000000,0.0000000,58.3200300); // CreateDynamicObject(19431,302.2331800,1701.2249800,2046.9499500,0.0000000,0.0000000,73.3800300); // CreateDynamicObject(19431,303.7749300,1701.1378200,2046.9499500,0.0000000,0.0000000,99.3600500); // CreateDynamicObject(19431,305.2196000,1701.6594200,2046.9499500,0.0000000,0.0000000,120.8400300); // CreateDynamicObject(19431,306.5421100,1702.4554400,2046.9499500,0.0000000,0.0000000,120.8400300); // CreateDynamicObject(19431,307.6550300,1703.4969500,2046.9499500,0.0000000,0.0000000,145.3200700); // CreateDynamicObject(19431,308.4859900,1704.8344700,2046.9499500,0.0000000,0.0000000,150.6601100); // CreateDynamicObject(19431,308.4835500,1705.3800000,2046.9499500,0.0000000,0.0000000,178.1400500); // CreateDynamicObject(19431,308.4970400,1706.6167000,2046.9499500,0.0000000,0.0000000,181.7400700); // CreateDynamicObject(19353,307.5458100,1719.7481700,2039.9599600,0.0000000,180.0000000,0.0000000); // CreateDynamicObject(19353,307.4046000,1719.7481700,2039.9599600,0.0000000,180.0000000,0.0000000); // CreateDynamicObject(19353,307.2399000,1719.7481700,2039.9599600,0.0000000,180.0000000,0.0000000); // CreateDynamicObject(19353,307.0947900,1719.7481700,2039.9599600,0.0000000,180.0000000,0.0000000); // CreateDynamicObject(19353,307.3073100,1719.4580100,2039.9599600,0.0000000,180.0000000,90.0000000); // CreateDynamicObject(19353,307.3073100,1719.6187700,2039.9599600,0.0000000,180.0000000,90.0000000); // CreateDynamicObject(19353,307.3073100,1719.7796600,2039.9599600,0.0000000,180.0000000,90.0000000); // CreateDynamicObject(19353,307.3073100,1719.9500700,2039.9599600,0.0000000,180.0000000,90.0000000); // CreateDynamicObject(19353,307.3073100,1720.1167000,2039.9599600,0.0000000,180.0000000,90.0000000); // CreateDynamicObject(19353,307.3073100,1719.3175000,2039.9599600,0.0000000,180.0000000,90.0000000); // CreateDynamicObject(2008,297.5231900,1724.2286400,2041.7071500,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(2008,297.5220300,1716.8732900,2041.7071500,0.0000000,0.0000000,-90.0000000); // CreateDynamicObject(3397,297.4426000,1719.0638400,2041.7071500,0.0000000,0.0000000,0.0000000); // CreateDynamicObject(1937,270.6657700,1727.5871600,2048.6298800,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,303.2018100,1702.7998000,2048.6298800,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,292.8327900,1709.2722200,2048.6298800,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,303.3310500,1712.3391100,2048.6298800,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,313.6891800,1711.8839100,2048.6298800,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,313.7886700,1721.4311500,2048.6298800,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,303.3681900,1721.8647500,2048.6298800,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,314.2639500,1730.9770500,2048.6298800,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,303.9994500,1730.9475100,2048.6298800,0.0000000,90.0000000,0.0000000); // CreateDynamicObject(19377,303.1025400,1740.3638900,2048.6298800,0.0000000,90.0000000,0.0000000); // // Idlewood gas station objects CreateDynamicObject(970, 1942.256469, -1767.598266, 13.092811, 0.000000, 0.000000, 90.000000); CreateDynamicObject(970, 1942.256469, -1771.718627, 13.092811, 0.000000, 0.000000, 90.000000); CreateDynamicObject(970, 1942.256469, -1775.848876, 13.092811, 0.000000, 0.000000, 90.000000); CreateDynamicObject(970, 1942.256469, -1777.948974, 13.092811, 0.000000, 0.000000, 90.000000); CreateDynamicObject(970, 1941.095825, -1777.948974, 13.092811, 0.000000, 0.000000, 90.000000); CreateDynamicObject(970, 1941.096191, -1775.848876, 13.092811, 0.000000, 0.000000, 90.000000); CreateDynamicObject(970, 1941.096679, -1771.718627, 13.092811, 0.000000, 0.000000, 90.000000); CreateDynamicObject(970, 1941.095703, -1767.598266, 13.092811, 0.000000, 0.000000, 90.000000); CreateDynamicObject(1215, 1941.625610, -1780.841918, 13.160593, 0.000000, 0.000000, 95.991020); CreateDynamicObject(1215, 1941.636230, -1765.047241, 13.160593, 0.000000, 0.000000, 95.991020); CreateDynamicObject(1291, 1928.692382, -1767.511352, 13.032809, 0.000000, 0.000000, 90.000000); CreateDynamicObject(1287, 1928.503662, -1768.784423, 13.076869, 0.000000, 0.000000, -90.000000); CreateDynamicObject(1289, 1928.507202, -1769.368896, 13.092813, 0.000000, 0.000000, -90.228660); CreateDynamicObject(1250, 1908.817138, -1782.609863, 13.582806, 0.000000, 0.000000, 90.000000); // Pizza stacks objects CreateDynamicObject(19121, 2124.371093, -1765.267456, 13.145559, 0.000000, 0.000000, 267.547332); CreateDynamicObject(19121, 2124.381347, -1769.873168, 13.145559, 0.000000, 0.000000, 267.547332); CreateDynamicObject(19121, 2124.396484, -1774.649047, 13.145559, 0.000000, 0.000000, 267.547332); CreateDynamicObject(19121, 2124.419677, -1779.435668, 13.145559, 0.000000, 0.000000, 267.547332); CreateDynamicObject(19121, 2124.382568, -1784.029174, 13.145559, 0.000000, 0.000000, 267.547332); CreateDynamicObject(1346, 2122.608886, -1790.332153, 13.887385, 0.000000, 0.000000, 180.000000); CreateDynamicObject(1256, 2119.659667, -1790.556152, 13.200844, 0.000000, 0.000000, -90.000000); CreateDynamicObject(1285, 2106.148193, -1790.754638, 13.098064, 0.000000, 0.000000, 0.000000); CreateDynamicObject(1287, 2106.840820, -1790.747070, 13.090840, 0.000000, 0.000000, 359.374725); CreateDynamicObject(970, 2098.605224, -1784.011840, 13.037828, 0.000000, 0.000000, 80.976753); CreateDynamicObject(970, 2099.258789, -1779.893310, 13.037828, 0.000000, 0.000000, 80.976753); CreateDynamicObject(970, 2099.906738, -1775.825195, 13.037828, 0.000000, 0.000000, 80.976753); CreateDynamicObject(970, 2100.548583, -1771.775146, 13.037828, 0.000000, 0.000000, 80.976753); CreateDynamicObject(970, 2101.199462, -1767.676147, 13.037828, 0.000000, 0.000000, 80.976753); CreateDynamicObject(970, 2100.351318, -1786.065185, 13.037828, 0.000000, 0.000000, 180.000000); CreateDynamicObject(970, 2104.491455, -1786.065185, 13.037828, 0.000000, 0.000000, 180.000000); CreateDynamicObject(970, 2108.612792, -1786.065185, 13.037828, 0.000000, 0.000000, 180.000000); CreateDynamicObject(970, 2112.732666, -1786.065185, 13.037828, 0.000000, 0.000000, 180.000000); CreateDynamicObject(970, 2116.863769, -1786.065185, 13.037828, 0.000000, 0.000000, 180.000000); CreateDynamicObject(970, 2120.975830, -1786.065185, 13.037828, 0.000000, 0.000000, 180.000000); // Fixed trailer CreateDynamicObject(11015, 4.2412109375, -0.25, 1002.3616333008, 0, 90, 179.99450683594, .interiorid = 2); CreateDynamicObject(11015, -3.7464447021484, -0.46751827001572, 1002.3616333008, 0, 90, 0, .interiorid = 2); CreateDynamicObject(11015, -2.0341796875, -0.2255859375, 996.58734130859, 0, 0, 0, .interiorid = 2); CreateDynamicObject(11015, -1.7412109375, -8.029296875, 1002.3616333008, 0, 90, 89.994506835938, .interiorid = 2); CreateDynamicObject(11015, 2.349609375, 9.3095703125, 1002.3616333008, 0, 90, 270, .interiorid = 2); CreateDynamicObject(976, -8.3762712478638, 5.4238820075989, 998.02801513672, 0, 0, 0, .interiorid = 2); CreateDynamicObject(976, 10.326154708862, 5.4526047706604, 998.02801513672, 0, 0, 180, .interiorid = 2); CreateDynamicObject(976, -0.78860986232758, 4.5294494628906, 998.02801513672, 0, 0, 90, .interiorid = 2); CreateDynamicObject(976, -9.4923362731934, 2.8067343235016, 998.30328369141, 0, 0, 0, .interiorid = 2); CreateDynamicObject(968, -0.78987210988998, 3.085230588913, 996.65313720703, 0, 0, 88.375030517578, .interiorid = 2); CreateDynamicObject(2424, -1.1989899873734, 2.1414895057678, 998.20440673828, 0, 0, 270, .interiorid = 2); CreateDynamicObject(2424, -1.4444495439529, 1.2195072174072, 998.20440673828, 0, 0, 269.99450683594, .interiorid = 2); CreateDynamicObject(2424, -1.2420085668564, 0.15943863987923, 998.20440673828, 0, 0, 269.99450683594, .interiorid = 2); CreateDynamicObject(2424, -1.2046113014221, -0.27639570832253, 998.20440673828, 0, 0, 269.99450683594, .interiorid = 2); CreateDynamicObject(2424, -1.6594306230545, -1.5798351764679, 998.40460205078, 0, 0, 269.99450683594, .interiorid = 2); CreateDynamicObject(2424, -1.6048280000687, -3.7030065059662, 998.50469970703, 0, 0, 269.99450683594, .interiorid = 2); CreateDynamicObject(2424, -1.3431304693222, -4.7396554946899, 997.82904052734, 0, 0, 269.99450683594, .interiorid = 2); CreateDynamicObject(2424, -1.3272333145142, -5.6384997367859, 997.85406494141, 0, 0, 269.99450683594, .interiorid = 2); CreateDynamicObject(2424, -0.82665449380875, -5.819974899292, 997.82904052734, 0, 0, 0.07452392578125, .interiorid = 2); CreateDynamicObject(2424, 0.90103495121002, -5.7934393882751, 997.82904052734, 0, 0, 0.0714111328125, .interiorid = 2); CreateDynamicObject(2424, 1.8007507324219, -5.7772388458252, 997.82904052734, 0, 0, 0.0714111328125, .interiorid = 2); CreateDynamicObject(2424, 2.0067005157471, -4.656822681427, 997.82904052734, 0, 0, 90, .interiorid = 2); CreateDynamicObject(2424, 2.0016891956329, -5.5176014900208, 997.82904052734, 0, 0, 90, .interiorid = 2); CreateDynamicObject(2424, 0.095220312476158, -5.8064684867859, 997.85406494141, 0, 0, 0.0714111328125, .interiorid = 2); CreateDynamicObject(2424, 1.9964281320572, -1.4732304811478, 997.82904052734, 0, 0, 90, .interiorid = 2); CreateDynamicObject(2424, 2.0242736339569, -0.59229171276093, 997.82904052734, 0, 0, 90, .interiorid = 2); CreateDynamicObject(2424, 1.105211853981, -0.25799462199211, 997.82904052734, 0, 0, 180, .interiorid = 2); CreateDynamicObject(2424, 0.85449481010437, -0.25893545150757, 997.82904052734, 0, 0, 179.99450683594, .interiorid = 2); CreateDynamicObject(2424, 0.94933843612671, 0.93138349056244, 998.40460205078, 0, 0, 0, .interiorid = 2); CreateDynamicObject(2424, 1.9278947114944, 1.8640511035919, 998.40386962891, 0, 0, 90, .interiorid = 2); CreateDynamicObject(2424, 1.912776350975, 2.7815411090851, 998.40386962891, 0, 0, 90, .interiorid = 2); CreateDynamicObject(2424, 1.9282813072205, 3.7311086654663, 998.40386962891, 0, 0, 90, .interiorid = 2); CreateDynamicObject(2424, 0.94268548488617, 0.38233369588852, 998.40460205078, 0, 0, 0, .interiorid = 2); CreateDynamicObject(2424, 1.8336682319641, 0.42996874451637, 998.40460205078, 0, 0, 0, .interiorid = 2); CreateDynamicObject(1814, -0.070350080728531, -4.9489212036133, 998.45343017578, 0, 0, 0, .interiorid = 2); CreateDynamicObject(2108, 0.87250107526779, -1.5103777647018, 997.35357666016, 0, 0, 0, .interiorid = 2); CreateDynamicObject(2738, -1.3212617635727, 5.0136914253235, 998.98120117188, 0, 0, 0, .interiorid = 2); CreateDynamicObject(2558, -0.45861941576004, 3.3949182033539, 999.67913818359, 0, 0, 90, .interiorid = 2); CreateDynamicObject(2558, -1.1560896635056, 4.4181189537048, 999.70416259766, 0, 0, 270, .interiorid = 2); CreateDynamicObject(1745, 2.4512000083923, 6.3230948448181, 998.07806396484, 0, 0, 90, .interiorid = 2); // Casino interior (Credits: Lance) CreateObject(14777, 1095.62341, 19.60990, 999.67188, 360.00000, 0.00000, 0.00000); CreateObject(19461, 1088.61060, 28.64991, 1001.41998, 0.00000, 0.00000, 0.00000); CreateObject(19461, 1088.60901, 19.09576, 1001.41998, 0.00000, 0.00000, 0.00000); CreateObject(19461, 1088.60901, 19.09580, 1004.90997, 180.00000, 0.00000, 0.00000); CreateObject(19461, 1088.61060, 28.64990, 1004.90997, 180.00000, 0.00000, 0.00000); CreateObject(19450, 1086.98096, 25.14653, 1000.74048, 0.00000, 90.00000, 0.00000); CreateObject(19450, 1086.97839, 19.32791, 1000.74048, 0.00000, 90.00000, 0.00000); CreateObject(19450, 1086.97839, 19.32790, 1002.45001, 0.00000, 90.00000, 0.00000); CreateObject(19450, 1086.98096, 25.14650, 1002.45001, 0.00000, 90.00000, 0.00000); CreateObject(1838, 1088.67651, 27.62889, 1001.08667, 0.00000, 0.00000, 90.00000); CreateObject(1838, 1088.67065, 26.70870, 1001.08667, 0.00000, 0.00000, 90.00000); CreateObject(1838, 1088.64441, 25.78710, 1001.08667, 0.00000, 0.00000, 90.00000); CreateObject(1838, 1088.64148, 19.15041, 1001.08667, 0.00000, 0.00000, 90.00000); CreateObject(1838, 1088.64099, 18.17435, 1001.08667, 0.00000, 0.00000, 90.00000); CreateObject(1838, 1088.64563, 17.25409, 1001.08667, 0.00000, 0.00000, 90.00000); CreateObject(19825, 1093.04260, 29.57410, 1002.50000, 0.00000, 0.00000, 0.00000); CreateObject(2755, 1097.24146, 31.52200, 1001.20001, 0.00000, 0.00000, -90.00000); CreateObject(2008, 1097.78552, 31.04761, 999.68158, 0.00000, 0.00000, 90.00000); CreateObject(2700, 1099.47974, 30.33538, 1002.00000, 0.00000, 0.00000, 132.17999); CreateObject(2921, 1092.42932, 30.16140, 1002.29999, 0.00000, 0.00000, 612.05939); CreateObject(1892, 1095.71838, 29.82068, 999.68146, 0.00000, 0.00000, 0.00000); CreateObject(1892, 1094.51782, 29.82010, 999.68146, 0.00000, 0.00000, 0.00000); CreateObject(2879, 1091.57410, 32.46852, 1000.71722, 0.00000, 0.00000, 90.00000); CreateObject(19810, 1091.66467, 33.19600, 1000.76001, 0.00000, 0.00000, -90.00000); CreateObject(19810, 1091.67126, 32.83610, 1000.76001, 0.00000, 0.00000, 90.00000); CreateObject(19810, 1091.67126, 32.83610, 1001.00000, 0.00000, 0.00000, 90.00000); CreateObject(19810, 1091.67126, 33.19610, 1001.00000, 0.00000, 0.00000, 90.00000); CreateObject(19810, 1091.67126, 33.55610, 1001.00000, 0.00000, 0.00000, 90.00000); CreateObject(19810, 1091.67126, 33.55610, 1000.76001, 0.00000, 0.00000, 90.00000); CreateObject(19810, 1091.67126, 33.55610, 1000.52002, 0.00000, 0.00000, 90.00000); CreateObject(19810, 1091.67126, 33.19610, 1000.52002, 0.00000, 0.00000, 90.00000); CreateObject(19810, 1091.67126, 32.83610, 1000.52002, 0.00000, 0.00000, 90.00000); CreateObject(6978, 1141.61914, -15.83100, 1020.14001, 0.00000, 0.00000, -180.00000); CreateObject(19474, 1087.33521, 8.58034, 1000.25000, 0.00000, 0.00000, 0.00000); CreateObject(1671, 1089.11536, 9.18831, 1000.08002, 0.00000, 0.00000, -90.00004); CreateObject(1671, 1089.07861, 7.91157, 1000.08002, 0.00000, 0.00000, -90.00004); CreateObject(1671, 1087.31970, 6.12466, 1000.08002, 0.00000, 0.00000, -180.00011); CreateObject(1671, 1085.70862, 7.95822, 1000.08002, 0.00000, 0.00000, 90.00000); CreateObject(1671, 1085.70557, 9.18081, 1000.08002, 0.00000, 0.00000, 90.00000); CreateObject(1671, 1087.30371, 10.43131, 1000.08002, 0.00000, 0.00000, 1.00000); CreateObject(2783, 1111.32788, 19.55914, 1000.29999, 0.00000, 0.00000, -90.00000); CreateObject(19461, 1094.83496, 8.58782, 1002.53998, 0.00000, 0.00000, 90.00000); CreateObject(19461, 1104.05823, 8.58278, 1002.53998, 0.00000, 0.00000, 90.00000); CreateObject(19461, 1113.63513, 8.58510, 1002.53998, 0.00000, 0.00000, 90.00000); CreateObject(19461, 1113.66333, 8.58510, 1006.03998, 180.00000, 0.00000, 90.00000); CreateObject(19461, 1104.03882, 8.58509, 1006.03998, 180.00000, 0.00000, 90.00000); CreateObject(19461, 1094.83496, 8.58780, 1006.03998, 180.00000, 0.00000, 90.00000); CreateObject(19461, 1094.43994, 8.58700, 1002.53998, 0.00000, 0.00000, 90.00000); CreateObject(19461, 1094.44873, 8.60245, 1006.03998, 180.00000, 0.00000, 90.00000); CreateObject(19461, 1089.72144, 3.84820, 1002.53998, 0.00000, 0.00000, 0.00000); CreateObject(11686, 1098.77649, 13.99268, 999.65082, 0.00000, 0.00000, 0.00000); CreateObject(11686, 1094.01965, 13.99680, 999.65082, 0.00000, 0.00000, 0.00000); CreateObject(2188, 1101.82739, 19.62250, 1000.64941, 0.00000, 0.00000, -90.00000); CreateObject(2188, 1095.25427, 19.58691, 1000.64941, 0.00000, 0.00000, 90.00000); CreateObject(2188, 1103.63574, 17.92224, 1000.64941, 0.00000, 0.00000, 0.00000); CreateObject(2188, 1103.63086, 21.27263, 1000.64941, 0.00000, 0.00000, 180.00000); CreateObject(19953, 1088.69238, 20.53487, 999.00177, 0.00000, 0.00000, 90.00000); CreateObject(19953, 1088.69287, 20.53490, 1004.64001, 180.00000, 0.00000, 90.00000); CreateObject(19954, 1088.68958, 23.84310, 999.00177, 0.00000, 0.00000, 90.00000); CreateObject(19953, 1088.70349, 23.83603, 1004.64001, 180.00000, 0.00000, 90.00000); CreateObject(19954, 1088.68250, 15.49803, 999.00177, 0.00000, 0.00000, 90.00000); CreateObject(19953, 1088.70032, 15.50823, 1004.64001, 180.00000, 0.00000, 90.00000); CreateObject(19953, 1088.70654, 28.84904, 999.00177, 0.00000, 0.00000, 90.00000); CreateObject(19953, 1088.69055, 28.85040, 1004.64001, 180.00000, 0.00000, 90.00000); // FBI map (Credits: CoachCarter again) objectid = CreateDynamicObject(19377,-501.250,300.000,2000.000,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-511.745,299.998,2000.000,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19461,-505.165,306.329,1999.339,324.000,0.000,180.000); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19397,-495.646,309.271,2001.836,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19377,-490.750,300.000,2000.000,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19461,-489.238,309.261,2001.836,0.000,0.000,89.994); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19377,-501.250,314.014,2003.411,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-490.750,314.013,2003.499,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-490.750,290.365,2000.000,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-501.250,290.366,2000.000,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-511.746,290.365,2000.000,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19380,-511.746,314.016,2008.671,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(18762,-496.893,309.690,2006.087,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-505.575,309.691,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(19377,-511.745,309.628,2000.000,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19461,-497.308,306.327,1999.340,323.992,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-505.167,314.022,2001.836,0.000,0.000,359.989); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19397,-506.836,309.271,2001.836,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19377,-501.250,314.011,2003.500,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-511.745,314.014,2003.499,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-490.750,309.628,2000.000,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-501.250,309.628,2000.000,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19461,-513.241,309.271,2001.836,0.000,0.000,89.994); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(18762,-521.362,309.688,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-485.183,309.696,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(19461,-513.241,309.281,2010.333,0.000,179.994,89.994); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19380,-501.244,314.016,2008.671,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19461,-503.610,309.284,2010.332,0.000,179.994,89.994); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-493.979,309.285,2010.332,0.000,179.994,89.994); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-484.352,309.285,2010.332,0.000,179.994,89.994); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19380,-511.745,299.998,2012.168,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-511.746,290.365,2012.168,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-511.745,309.628,2012.168,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-501.250,290.365,2012.168,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-501.250,299.998,2012.168,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-501.250,309.628,2012.168,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-490.750,299.998,2012.168,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-490.750,290.365,2012.168,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-490.750,309.628,2012.168,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19379,-516.906,290.367,2015.834,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-516.906,299.998,2015.834,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-516.906,309.628,2015.834,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-485.587,300.000,2015.834,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-485.587,290.368,2015.834,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-485.587,309.628,2015.834,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-512.177,285.639,2005.337,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-502.547,285.638,2005.337,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-492.917,285.637,2005.337,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-483.285,285.636,2005.337,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-512.177,285.639,2015.834,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-502.547,285.638,2015.834,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-492.917,285.637,2015.834,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19379,-483.285,285.636,2015.834,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19465,-501.250,331.913,2006.139,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(18762,-521.362,313.771,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-505.575,313.771,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-505.575,313.771,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-496.894,313.771,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-485.183,313.771,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(19464,-505.205,317.205,2006.136,0.000,0.000,180.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-497.265,317.200,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-513.122,331.913,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-495.324,331.917,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-515.969,314.357,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19377,-501.244,323.640,2003.500,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-511.745,323.640,2003.500,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-490.750,323.640,2003.500,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19465,-497.265,323.135,2006.139,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19465,-505.205,323.138,2006.139,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-497.265,329.071,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-505.204,329.062,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19377,-490.750,327.220,2003.498,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-501.244,327.220,2003.498,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-511.745,327.220,2003.498,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19465,-501.250,314.357,2006.139,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-495.313,314.357,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-507.186,314.358,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-492.471,334.757,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-510.026,334.755,2001.041,0.000,180.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-492.470,340.690,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-510.026,334.755,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-507.186,331.913,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19380,-490.750,314.016,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-490.750,323.640,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-501.244,323.640,2008.671,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-511.745,323.640,2008.671,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-490.750,333.265,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-501.244,333.265,2008.671,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-511.745,333.265,2008.671,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-511.745,342.893,2008.671,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-501.244,342.893,2008.671,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-490.750,342.893,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19461,-516.892,314.175,2001.836,0.000,0.000,359.994); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19377,-511.745,319.259,2000.000,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-501.250,319.260,2000.000,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-490.750,319.260,2000.000,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19461,-512.164,318.903,2001.836,0.000,0.000,89.994); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-502.536,318.903,2001.836,0.000,0.000,89.994); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-492.907,318.902,2001.836,0.000,0.000,89.994); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-483.278,318.903,2001.836,0.000,0.000,89.994); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-497.298,314.188,2001.836,0.000,0.000,359.989); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-485.596,314.180,2001.836,0.000,0.000,359.989); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19380,-510.503,314.175,2003.411,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-520.994,314.024,2003.411,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-491.967,314.178,2003.411,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-481.475,314.173,2003.411,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19464,-489.377,331.913,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-515.969,329.071,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-486.535,329.070,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-486.535,323.135,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-486.535,317.200,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-515.969,317.200,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-489.376,314.357,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-515.969,323.135,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-513.122,314.358,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19446,-496.398,333.779,2003.498,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-506.028,333.778,2003.498,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-498.790,338.506,1999.418,325.500,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-503.687,338.506,1999.418,325.497,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-496.397,336.329,2002.829,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-506.028,336.329,2002.829,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-498.790,341.059,1998.749,325.497,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-503.690,341.059,1998.750,325.497,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-496.398,338.877,2002.162,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-506.028,338.876,2002.162,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-503.690,343.605,1998.082,325.497,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-498.789,343.605,1998.082,325.497,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-496.398,341.429,2001.498,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-506.028,341.429,2001.498,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-498.789,346.162,1997.425,325.497,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-503.690,346.162,1997.425,325.497,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-496.398,344.040,2000.836,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-506.028,344.039,2000.836,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-496.400,347.537,2000.836,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-506.033,347.538,2000.836,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-493.884,335.441,2001.837,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-508.586,335.442,2001.837,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-508.592,337.993,2001.167,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-493.888,337.991,2001.167,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-493.891,340.540,2000.500,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-508.596,340.541,2000.500,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-493.885,343.092,1999.836,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-508.591,343.092,1999.836,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-501.235,349.196,1999.836,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-506.036,351.035,2000.836,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-496.401,351.034,2000.836,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-501.235,350.863,2001.498,0.000,90.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-509.028,349.196,1997.425,325.497,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19446,-493.437,349.196,1997.425,325.491,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 14710, "vgshm3int2", "HSV_3carpet2", -1); objectid = CreateDynamicObject(19464,-510.026,340.690,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-492.470,340.689,2001.041,0.000,179.994,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-510.025,340.689,2001.041,0.000,179.994,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-492.470,334.755,2001.041,0.000,179.994,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-492.470,346.622,2001.041,0.000,179.994,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-510.023,346.626,2001.041,0.000,179.994,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-510.023,352.559,2001.041,0.000,179.994,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-492.468,352.557,2001.041,0.000,179.994,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-492.470,346.622,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-492.470,352.557,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-510.023,352.556,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-510.023,346.622,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-495.313,352.738,2001.041,0.000,179.994,269.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-501.250,352.737,2001.041,0.000,179.994,269.989); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-507.186,352.737,2001.041,0.000,179.994,269.989); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-507.186,352.737,2006.136,0.000,0.000,89.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-501.250,352.737,2006.136,0.000,0.000,89.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-495.313,352.737,2006.136,0.000,0.000,89.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19380,-490.748,352.529,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-501.244,352.529,2008.671,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-511.745,352.529,2008.671,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(18762,-510.929,299.998,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-510.929,299.998,2001.087,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-510.929,299.998,2011.078,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-510.929,290.367,2001.087,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-510.929,290.367,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-510.929,290.367,2011.078,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-491.435,299.998,2001.087,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-491.435,299.998,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-491.435,299.998,2011.078,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-491.435,290.367,2001.087,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-491.436,290.367,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-491.435,290.367,2011.078,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(19359,-488.410,285.642,2002.609,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-488.409,285.642,2006.104,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-488.408,285.643,2009.598,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-494.394,285.643,2009.598,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-494.393,285.642,2002.609,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-494.393,285.643,2006.104,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-513.984,285.643,2009.598,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-513.983,285.643,2002.609,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-513.983,285.643,2006.104,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-507.854,285.643,2009.598,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-507.853,285.643,2002.609,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-507.852,285.643,2006.104,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-501.251,285.643,2006.104,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-501.250,285.642,2009.598,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(18762,-504.367,295.658,2011.078,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-497.747,295.658,2001.087,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-504.366,295.658,2001.087,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-497.747,295.658,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-497.747,295.658,2011.078,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-504.366,295.658,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(970,-508.135,309.213,2004.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-512.234,309.216,2004.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-515.630,309.231,2004.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-494.348,309.209,2004.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-490.190,309.212,2004.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-487.759,309.209,2004.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(19461,-485.595,300.000,2001.836,0.000,0.000,359.983); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-485.595,290.368,2001.836,0.000,0.000,359.983); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-485.595,309.628,2010.332,0.000,179.994,359.983); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-485.595,290.368,2010.332,0.000,179.994,359.983); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-485.595,300.000,2010.332,0.000,179.994,359.978); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-485.595,309.628,2001.836,0.000,0.000,359.983); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-516.888,309.628,2001.836,0.000,0.000,359.983); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-516.888,300.000,2001.836,0.000,0.000,359.989); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-516.888,290.368,2001.836,0.000,0.000,359.989); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-516.888,290.368,2010.332,0.000,179.994,359.983); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-516.888,300.000,2010.332,0.000,179.994,359.983); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19461,-516.888,309.628,2010.332,0.000,179.994,359.983); SetDynamicObjectMaterial(objectid, 0, 7420, "vgnglfcrse1", "hotel2base2_256", -1); objectid = CreateDynamicObject(19377,-480.429,309.628,2003.499,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-480.429,300.000,2003.499,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-480.429,290.368,2003.499,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19464,-483.450,314.358,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(18762,-485.183,299.998,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-485.182,290.367,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-480.985,313.734,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-480.985,309.695,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-480.985,299.998,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-480.985,290.367,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(19464,-521.981,301.203,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19465,-521.981,295.270,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-521.980,289.337,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-521.981,283.406,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19380,-480.429,309.628,2008.667,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-480.429,300.000,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-480.429,290.368,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19377,-469.927,290.367,2003.499,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19464,-521.981,307.136,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-521.981,313.062,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19377,-469.927,300.000,2003.499,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19464,-468.744,295.270,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-468.744,289.337,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-471.581,286.497,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-477.519,286.497,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19380,-469.927,290.368,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-469.927,300.000,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(970,-516.818,307.128,2004.136,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-516.818,302.960,2004.136,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-516.818,298.783,2004.136,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-516.818,294.606,2004.136,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-516.818,290.430,2004.136,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-516.818,286.253,2004.136,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(19359,-471.091,286.545,2006.104,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-478.390,286.542,2006.104,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-474.742,286.538,2006.104,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19377,-522.054,309.628,2003.503,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-522.054,300.000,2003.499,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-522.054,290.368,2003.499,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19379,-521.804,285.638,2005.337,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19380,-522.054,309.628,2008.667,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-522.054,300.000,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-522.054,290.368,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(18762,-521.362,299.998,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-521.362,290.367,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(19464,-521.903,314.358,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(18762,-517.299,313.771,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-517.299,309.688,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-517.299,299.998,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-517.299,290.367,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(19464,-480.611,313.062,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-480.611,307.136,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-480.611,301.202,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19465,-480.610,295.270,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-480.610,289.337,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-480.610,283.405,2006.136,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19377,-532.554,300.000,2003.499,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19377,-532.554,290.368,2003.499,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 16640, "a51", "ws_stationfloor", -1); objectid = CreateDynamicObject(19464,-525.072,286.497,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-531.002,297.161,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-533.844,289.337,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-533.844,295.270,2006.136,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-525.072,297.161,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19464,-531.002,286.496,2006.136,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ab_kitchunit2", -1); objectid = CreateDynamicObject(19380,-532.554,300.000,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19380,-532.554,290.368,2008.668,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14526, "sweetsmain", "ah_whitpanelceil", -1); objectid = CreateDynamicObject(19359,-524.174,286.545,2006.104,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-531.679,286.537,2006.104,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19359,-527.971,286.536,2006.104,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 10041, "archybuild10", "bank_sfe2", -1); objectid = CreateDynamicObject(19395,-506.837,309.284,2001.836,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(19459,-513.254,309.284,2001.836,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(19459,-513.545,314.021,2001.836,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(19459,-505.176,314.189,2001.836,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(19459,-510.075,318.891,2001.836,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(970,-485.663,307.128,2004.136,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-485.665,302.960,2004.136,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-485.665,298.783,2004.136,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-485.665,294.606,2004.136,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-485.664,290.430,2004.136,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(970,-485.664,286.253,2004.136,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 3820, "boxhses_sfsx", "ws_ irongate_white", 0); objectid = CreateDynamicObject(1502,-521.905,294.505,2003.579,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0); objectid = CreateDynamicObject(1502,-480.641,294.502,2003.578,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0); objectid = CreateDynamicObject(1502,-500.484,314.325,2003.583,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0); objectid = CreateDynamicObject(1502,-506.050,309.289,2000.079,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0); objectid = CreateDynamicObject(1502,-494.860,309.286,2000.079,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0); objectid = CreateDynamicObject(19172,-513.949,314.229,2005.329,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 2266, "picture_frame", "CJ_PAINTING14", -1); objectid = CreateDynamicObject(19172,-508.878,314.239,2005.329,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 2266, "picture_frame", "CJ_PAINTING11", -1); objectid = CreateDynamicObject(19172,-493.697,314.230,2005.329,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 2266, "picture_frame", "CJ_PAINTING28", -1); objectid = CreateDynamicObject(19172,-488.295,314.232,2005.329,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 2266, "picture_frame", "CJ_PAINTING30", -1); objectid = CreateDynamicObject(19459,-506.851,318.292,2001.836,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(1492,-506.777,313.790,2000.162,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0); objectid = CreateDynamicObject(1492,-508.450,313.790,2000.162,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0); objectid = CreateDynamicObject(19459,-508.526,318.292,2001.836,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(1492,-510.123,313.790,2000.162,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0); objectid = CreateDynamicObject(19459,-510.199,318.292,2001.836,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(1492,-511.795,313.790,2000.162,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0); objectid = CreateDynamicObject(19459,-511.869,318.292,2001.836,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(1492,-513.469,313.790,2000.162,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0); objectid = CreateDynamicObject(19452,-501.222,290.527,2000.009,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14534, "ab_wooziea", "ab_tileDiamond", -1); objectid = CreateDynamicObject(19452,-501.222,300.160,2000.009,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14534, "ab_wooziea", "ab_tileDiamond", -1); objectid = CreateDynamicObject(19452,-501.190,314.020,2003.505,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14534, "ab_wooziea", "ab_tileDiamond", -1); objectid = CreateDynamicObject(19452,-501.190,323.650,2003.505,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14534, "ab_wooziea", "ab_tileDiamond", -1); objectid = CreateDynamicObject(19452,-501.184,327.217,2003.501,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14534, "ab_wooziea", "ab_tileDiamond", -1); objectid = CreateDynamicObject(1492,-495.692,313.790,2000.162,0.000,0.000,180.000); SetDynamicObjectMaterial(objectid, 0, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0); objectid = CreateDynamicObject(19459,-497.287,314.184,2001.836,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(19459,-492.385,318.899,2001.836,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(19459,-495.619,318.292,2001.836,0.000,0.000,180.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(1492,-494.018,313.790,2000.162,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0); objectid = CreateDynamicObject(19459,-493.944,318.292,2001.836,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(1492,-492.346,313.790,2000.162,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0); objectid = CreateDynamicObject(19459,-492.270,318.292,2001.836,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(1492,-490.671,313.790,2000.162,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0); objectid = CreateDynamicObject(19459,-490.596,318.292,2001.836,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(1492,-488.997,313.790,2000.162,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 1, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 2, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 3, 14789, "ab_sfgymmain", "ab_panelWall1", 0); SetDynamicObjectMaterial(objectid, 4, 14789, "ab_sfgymmain", "ab_panelWall1", 0); objectid = CreateDynamicObject(19459,-488.929,314.179,2001.836,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(19459,-489.222,309.282,2001.836,0.000,0.000,89.994); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(19395,-495.645,309.282,2001.836,0.000,0.000,270.000); SetDynamicObjectMaterial(objectid, 0, 8486, "ballys02", "walltiles_128", -1); objectid = CreateDynamicObject(18762,-505.825,319.372,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-513.284,326.922,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-505.833,326.923,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(18762,-513.284,319.434,2006.084,0.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 15048, "labigsave", "AH_fancyceil", -1); objectid = CreateDynamicObject(1502,-505.127,322.368,2003.578,0.000,0.000,89.994); SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0); objectid = CreateDynamicObject(19353,-491.762,331.872,2006.168,90.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 12853, "cunte_gas01", "starspangban1_256", -1); objectid = CreateDynamicObject(1502,-497.295,322.369,2003.578,0.000,0.000,89.994); SetDynamicObjectMaterial(objectid, 0, 3603, "bevmans01_la", "lasbevcit7", 0); SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0); objectid = CreateDynamicObject(1502,-500.485,331.878,2003.583,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 1, 3603, "bevmans01_la", "lasbevcit7", 0); objectid = CreateDynamicObject(19445,-475.669,297.016,2002.682,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0); objectid = CreateDynamicObject(19445,-466.037,297.016,2002.682,0.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0); objectid = CreateDynamicObject(19445,-475.669,297.016,2009.530,0.000,180.000,90.000); SetDynamicObjectMaterial(objectid, 0, 14581, "ab_mafiasuitea", "ab_wood01", 0); objectid = CreateDynamicObject(19445,-466.044,297.016,2009.530,0.000,179.994,90.000); SetDynamicObjectMaterial(objectid, 0, 14581, "ab_mafiasuitea", "ab_wood01", 0); objectid = CreateDynamicObject(19445,-480.397,301.742,2005.334,0.000,0.000,180.000); SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0); objectid = CreateDynamicObject(19445,-480.399,301.740,2006.837,0.000,180.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14581, "ab_mafiasuitea", "ab_wood01", 0); objectid = CreateDynamicObject(19445,-468.960,301.743,2005.334,0.000,0.000,179.994); SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0); objectid = CreateDynamicObject(19445,-468.957,301.743,2006.837,0.000,179.994,179.994); SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0); objectid = CreateDynamicObject(19445,-475.697,301.890,2005.334,0.000,0.000,269.994); SetDynamicObjectMaterial(objectid, 0, 3925, "weemap", "skyclouds", 0); objectid = CreateDynamicObject(19445,-466.069,301.889,2005.334,0.000,0.000,269.989); SetDynamicObjectMaterial(objectid, 0, 14581, "ab_mafiasuitea", "ab_wood01", 0); objectid = CreateDynamicObject(19445,-475.490,301.894,2006.837,0.000,179.994,269.994); SetDynamicObjectMaterial(objectid, 0, 3925, "weemap", "skyclouds", 0); objectid = CreateDynamicObject(19445,-465.865,301.894,2006.837,0.000,179.994,269.989); SetDynamicObjectMaterial(objectid, 0, 3925, "weemap", "skyclouds", 0); objectid = CreateDynamicObject(19375,-475.283,301.747,2004.340,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0); objectid = CreateDynamicObject(19375,-464.786,301.917,2004.340,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0); objectid = CreateDynamicObject(19375,-464.785,301.917,2007.869,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0); objectid = CreateDynamicObject(19375,-475.283,301.746,2007.869,0.000,90.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0); objectid = CreateDynamicObject(953,-474.304,300.665,2005.326,8.000,0.000,0.000); SetDynamicObjectMaterial(objectid, 0, 14788, "ab_sfgymbits01", "lockers", 0); objectid = CreateDynamicObject(19353,-531.632,297.121,2005.936,90.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 12853, "cunte_gas01", "starspangban1_256", -1); objectid = CreateDynamicObject(19353,-524.247,297.117,2005.936,90.000,0.000,90.000); SetDynamicObjectMaterial(objectid, 0, 12853, "cunte_gas01", "starspangban1_256", -1); objectid = CreateDynamicObject(19360,-501.199,285.668,2001.835,0.000,0.000,-90.199); SetDynamicObjectMaterial(objectid, 0, 9524, "blokmodb", "lombard_build5_3", -1); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// CreateDynamicObject(14394,-501.250,305.927,2000.889,0.000,0.000,90.000); CreateDynamicObject(14394,-501.250,308.159,2002.509,0.000,0.000,90.000); CreateDynamicObject(14387,-501.235,336.647,2002.593,0.000,0.000,90.000); CreateDynamicObject(14387,-501.235,339.197,2001.926,0.000,0.000,90.000); CreateDynamicObject(14387,-501.235,341.742,2001.256,0.000,0.000,90.000); CreateDynamicObject(14387,-501.235,344.316,2000.593,0.000,0.000,90.000); CreateDynamicObject(14387,-507.170,351.622,2000.587,0.000,0.000,180.000); CreateDynamicObject(14387,-495.300,351.640,2000.587,0.000,0.000,359.994); CreateDynamicObject(2173,-496.055,342.658,2001.583,0.000,0.000,0.000); CreateDynamicObject(2173,-509.424,342.660,2001.583,0.000,0.000,0.000); CreateDynamicObject(2173,-494.095,342.658,2001.583,0.000,0.000,0.000); CreateDynamicObject(2173,-509.424,334.957,2003.583,0.000,0.000,0.000); CreateDynamicObject(2173,-498.019,340.078,2002.249,0.000,0.000,0.000); CreateDynamicObject(2173,-498.019,337.529,2002.916,0.000,0.000,0.000); CreateDynamicObject(2173,-496.055,340.078,2002.249,0.000,0.000,0.000); CreateDynamicObject(2173,-496.055,337.529,2002.916,0.000,0.000,0.000); CreateDynamicObject(2173,-496.055,334.956,2003.583,0.000,0.000,0.000); CreateDynamicObject(2173,-494.095,340.078,2002.249,0.000,0.000,0.000); CreateDynamicObject(2173,-494.095,334.956,2003.583,0.000,0.000,0.000); CreateDynamicObject(2173,-498.018,342.657,2001.583,0.000,0.000,0.000); CreateDynamicObject(2173,-507.460,342.658,2001.583,0.000,0.000,0.000); CreateDynamicObject(2173,-505.497,342.658,2001.583,0.000,0.000,0.000); CreateDynamicObject(2173,-505.497,340.078,2002.249,0.000,0.000,0.000); CreateDynamicObject(2173,-505.497,337.529,2002.916,0.000,0.000,0.000); CreateDynamicObject(2173,-498.018,334.956,2003.583,0.000,0.000,0.000); CreateDynamicObject(2173,-507.460,340.078,2002.249,0.000,0.000,0.000); CreateDynamicObject(2173,-507.460,337.529,2002.916,0.000,0.000,0.000); CreateDynamicObject(2173,-505.496,334.956,2003.583,0.000,0.000,0.000); CreateDynamicObject(2173,-509.424,340.078,2002.249,0.000,0.000,0.000); CreateDynamicObject(2173,-509.424,337.529,2002.916,0.000,0.000,0.000); CreateDynamicObject(2173,-507.460,334.956,2003.583,0.000,0.000,0.000); CreateDynamicObject(2173,-502.898,349.690,2001.583,0.000,0.000,180.000); CreateDynamicObject(1722,-497.350,340.934,2001.583,0.000,0.000,0.000); CreateDynamicObject(2205,-500.601,349.696,2001.583,0.000,0.000,179.994); CreateDynamicObject(2173,-498.647,349.679,2001.583,0.000,0.000,179.994); CreateDynamicObject(11245,-505.993,351.096,2006.917,0.000,0.000,270.000); CreateDynamicObject(11245,-502.833,351.096,2006.917,0.000,0.000,270.000); CreateDynamicObject(11245,-500.005,351.096,2006.917,0.000,0.000,270.000); CreateDynamicObject(11245,-496.872,351.096,2006.917,0.000,0.000,270.000); CreateDynamicObject(1722,-495.657,340.899,2001.583,0.000,0.000,0.000); CreateDynamicObject(1722,-493.691,338.308,2002.249,0.000,0.000,0.000); CreateDynamicObject(1722,-493.663,341.013,2001.583,0.000,0.000,0.000); CreateDynamicObject(2173,-494.094,337.529,2002.916,0.000,0.000,0.000); CreateDynamicObject(1722,-495.647,338.295,2002.249,0.000,0.000,0.000); CreateDynamicObject(1722,-497.572,338.325,2002.249,0.000,0.000,0.000); CreateDynamicObject(1722,-505.158,338.226,2002.249,0.000,0.000,0.000); CreateDynamicObject(1722,-506.966,338.216,2002.249,0.000,0.000,0.000); CreateDynamicObject(1722,-508.876,338.238,2002.249,0.000,0.000,0.000); CreateDynamicObject(1722,-508.858,335.632,2002.916,0.000,0.000,0.000); CreateDynamicObject(1722,-507.046,335.575,2002.916,0.000,0.000,0.000); CreateDynamicObject(1722,-505.011,335.623,2002.916,0.000,0.000,0.000); CreateDynamicObject(1722,-504.949,332.985,2003.583,0.000,0.000,0.000); CreateDynamicObject(1722,-507.118,332.958,2003.583,0.000,0.000,0.000); CreateDynamicObject(1722,-497.503,332.859,2003.583,0.000,0.000,0.000); CreateDynamicObject(1722,-509.057,332.876,2003.583,0.000,0.000,0.000); CreateDynamicObject(1722,-497.505,335.625,2002.916,0.000,0.000,0.000); CreateDynamicObject(1722,-495.518,332.871,2003.583,0.000,0.000,0.000); CreateDynamicObject(1722,-493.611,332.895,2003.583,0.000,0.000,0.000); CreateDynamicObject(1722,-495.479,335.597,2002.916,0.000,0.000,0.000); CreateDynamicObject(1722,-493.690,335.589,2002.916,0.000,0.000,0.000); CreateDynamicObject(1722,-507.079,340.735,2001.583,0.000,0.000,0.000); CreateDynamicObject(1722,-505.014,340.826,2001.583,0.000,0.000,0.000); CreateDynamicObject(1722,-508.930,340.778,2001.583,0.000,0.000,0.000); CreateDynamicObject(1715,-503.514,351.144,2001.583,0.000,0.000,0.000); CreateDynamicObject(1714,-501.346,351.187,2001.583,0.000,0.000,0.000); CreateDynamicObject(1722,-501.292,296.928,2000.094,0.000,0.000,189.997); CreateDynamicObject(2008,-505.821,325.097,2003.587,0.000,0.000,179.994); CreateDynamicObject(2207,-502.128,295.188,2000.086,0.000,0.000,0.000); CreateDynamicObject(1239,-501.190,295.062,2000.477,0.000,0.000,0.000); CreateDynamicObject(1726,-509.894,291.384,2000.086,0.000,0.000,180.000); CreateDynamicObject(1726,-511.944,298.979,2000.086,0.000,0.000,0.000); CreateDynamicObject(1726,-509.924,301.009,2000.086,0.000,0.000,179.994); CreateDynamicObject(1726,-511.902,289.332,2000.086,0.000,0.000,0.000); CreateDynamicObject(1726,-492.449,289.346,2000.086,0.000,0.000,0.000); CreateDynamicObject(1726,-492.454,298.984,2000.086,0.000,0.000,0.000); CreateDynamicObject(1726,-490.440,301.019,2000.086,0.000,0.000,179.994); CreateDynamicObject(1726,-490.416,291.381,2000.086,0.000,0.000,179.994); CreateDynamicObject(1808,-510.232,299.927,2000.086,0.000,0.000,90.000); CreateDynamicObject(1808,-510.252,290.338,2000.086,0.000,0.000,90.000); CreateDynamicObject(1808,-490.769,290.341,2000.086,0.000,0.000,90.000); CreateDynamicObject(1808,-490.752,299.972,2000.086,0.000,0.000,90.000); CreateDynamicObject(1808,-511.598,300.029,2000.086,0.000,0.000,270.000); CreateDynamicObject(1808,-511.592,290.369,2000.086,0.000,0.000,270.000); CreateDynamicObject(1808,-492.049,290.372,2000.086,0.000,0.000,270.000); CreateDynamicObject(1808,-492.131,300.027,2000.086,0.000,0.000,270.000); CreateDynamicObject(11245,-505.480,308.692,2010.516,0.000,0.000,270.000); CreateDynamicObject(11245,-502.476,308.692,2010.516,0.000,0.000,270.000); CreateDynamicObject(11245,-499.639,308.692,2010.516,0.000,0.000,270.000); CreateDynamicObject(11245,-496.802,308.692,2010.516,0.000,0.000,270.000); CreateDynamicObject(2206,-475.517,288.815,2003.584,0.000,0.000,359.989); CreateDynamicObject(1714,-474.475,287.171,2003.584,0.000,0.000,200.000); CreateDynamicObject(14455,-469.067,287.296,2005.256,0.000,0.000,90.000); CreateDynamicObject(14455,-533.556,291.635,2005.256,0.000,0.000,270.000); CreateDynamicObject(1763,-472.888,291.811,2003.584,0.000,0.000,270.000); CreateDynamicObject(1763,-475.950,290.536,2003.584,0.000,0.000,90.000); CreateDynamicObject(1763,-475.067,293.049,2003.584,0.000,0.000,0.000); CreateDynamicObject(2614,-468.920,289.483,2007.767,0.000,0.000,270.000); CreateDynamicObject(2614,-480.441,289.441,2007.767,0.000,0.000,90.000); CreateDynamicObject(2206,-528.786,288.816,2003.584,0.000,0.000,359.989); CreateDynamicObject(2828,-475.322,288.976,2004.519,0.000,0.000,209.998); CreateDynamicObject(2357,-527.883,291.408,2003.979,0.000,0.000,90.000); CreateDynamicObject(1714,-527.895,287.085,2003.584,0.000,0.000,199.995); CreateDynamicObject(14455,-480.341,291.641,2005.256,0.000,0.000,270.000); CreateDynamicObject(14455,-522.257,287.295,2005.256,0.000,0.000,90.000); CreateDynamicObject(1715,-498.954,351.036,2001.583,0.000,0.000,0.000); CreateDynamicObject(1715,-526.072,289.988,2003.584,0.000,0.000,270.000); CreateDynamicObject(1715,-525.940,291.398,2003.584,0.000,0.000,270.000); CreateDynamicObject(1715,-526.010,292.669,2003.584,0.000,0.000,270.000); CreateDynamicObject(1715,-529.577,292.638,2003.584,0.000,0.000,90.000); CreateDynamicObject(1715,-529.580,291.351,2003.584,0.000,0.000,90.000); CreateDynamicObject(1715,-529.591,289.975,2003.584,0.000,0.000,90.000); CreateDynamicObject(1715,-527.818,294.717,2003.584,0.000,0.000,0.000); CreateDynamicObject(14662,-510.126,311.131,2001.984,0.000,0.000,0.000); CreateDynamicObject(14662,-514.033,311.130,2001.985,0.000,0.000,0.000); CreateDynamicObject(14629,-509.615,302.830,2011.079,0.000,0.000,90.000); CreateDynamicObject(1999,-506.763,314.989,2003.584,0.000,0.000,180.000); CreateDynamicObject(2009,-507.825,317.864,2003.584,0.000,0.000,0.000); CreateDynamicObject(2183,-510.899,328.456,2003.587,0.000,0.000,0.000); CreateDynamicObject(2207,-492.803,326.635,2003.587,0.000,0.000,0.000); CreateDynamicObject(2207,-490.949,328.561,2003.587,0.000,0.000,180.000); CreateDynamicObject(2608,-505.558,317.914,2004.296,0.000,0.000,270.000); CreateDynamicObject(2161,-515.356,331.790,2003.587,0.000,0.000,0.000); CreateDynamicObject(2162,-512.247,331.799,2003.587,0.000,0.000,0.000); CreateDynamicObject(2163,-510.473,331.782,2003.587,0.000,0.000,0.000); CreateDynamicObject(2164,-514.021,331.776,2003.587,0.000,0.000,0.000); CreateDynamicObject(2167,-513.372,314.407,2003.584,0.000,0.000,180.000); CreateDynamicObject(2197,-514.127,315.799,2003.584,0.000,0.000,180.000); CreateDynamicObject(1715,-493.541,325.932,2003.587,0.000,0.000,132.000); CreateDynamicObject(2008,-506.838,321.281,2003.587,0.000,0.000,359.994); CreateDynamicObject(3857,-509.070,319.359,2006.499,0.000,0.000,45.000); CreateDynamicObject(3857,-509.069,319.358,2006.499,0.000,0.000,44.994); CreateDynamicObject(3857,-516.778,319.446,2008.837,0.000,0.000,44.989); CreateDynamicObject(3857,-516.778,319.446,2008.837,0.000,0.000,44.989); CreateDynamicObject(3857,-509.069,319.358,2006.499,0.000,0.000,224.994); CreateDynamicObject(3857,-509.069,319.358,2006.499,0.000,0.000,224.989); CreateDynamicObject(1722,-506.522,317.743,2003.584,0.000,0.000,50.000); CreateDynamicObject(1722,-507.459,315.569,2003.586,0.000,0.000,159.998); CreateDynamicObject(2009,-510.092,317.863,2003.584,0.000,0.000,0.000); CreateDynamicObject(2009,-512.293,317.863,2003.584,0.000,0.000,0.000); CreateDynamicObject(1999,-509.031,314.998,2003.584,0.000,0.000,179.994); CreateDynamicObject(1999,-511.317,314.997,2003.584,0.000,0.000,179.994); CreateDynamicObject(1722,-509.278,318.411,2003.584,0.000,0.000,359.998); CreateDynamicObject(1722,-511.592,317.627,2003.584,0.000,0.000,349.994); CreateDynamicObject(2608,-505.559,316.032,2004.296,0.000,0.000,270.000); CreateDynamicObject(3857,-509.222,326.920,2006.499,0.000,0.000,44.994); CreateDynamicObject(3857,-509.222,326.919,2006.499,0.000,0.000,44.994); CreateDynamicObject(3857,-509.222,326.919,2006.499,0.000,0.000,44.994); CreateDynamicObject(3857,-509.222,326.919,2006.499,0.000,0.000,224.994); CreateDynamicObject(3857,-509.222,326.919,2006.499,0.000,0.000,224.989); CreateDynamicObject(3857,-517.054,326.933,2008.837,0.000,0.000,44.994); CreateDynamicObject(3857,-517.054,326.932,2008.837,0.000,0.000,44.989); CreateDynamicObject(2197,-514.815,315.803,2003.584,0.000,0.000,179.994); CreateDynamicObject(2197,-515.495,315.803,2003.584,0.000,0.000,179.994); CreateDynamicObject(1722,-510.372,327.773,2003.584,0.000,0.000,349.991); CreateDynamicObject(1722,-508.373,327.274,2003.584,0.000,0.000,19.991); CreateDynamicObject(1722,-508.255,330.319,2003.584,0.000,0.000,149.989); CreateDynamicObject(1722,-510.285,330.260,2003.584,0.000,0.000,189.985); CreateDynamicObject(2162,-508.696,331.799,2003.587,0.000,0.000,0.000); CreateDynamicObject(2167,-506.924,331.783,2003.584,0.000,0.000,359.994); CreateDynamicObject(2167,-506.005,331.782,2003.584,0.000,0.000,359.989); CreateDynamicObject(2737,-505.368,328.770,2004.922,0.000,0.000,270.000); CreateDynamicObject(2008,-508.200,325.098,2003.587,0.000,0.000,179.994); CreateDynamicObject(2008,-510.575,325.101,2003.587,0.000,0.000,179.994); CreateDynamicObject(1722,-506.582,326.195,2003.584,0.000,0.000,169.989); CreateDynamicObject(1722,-508.925,326.795,2003.584,0.000,0.000,179.985); CreateDynamicObject(1722,-510.858,325.773,2003.584,0.000,0.000,199.983); CreateDynamicObject(2008,-509.216,321.290,2003.587,0.000,0.000,359.989); CreateDynamicObject(2008,-511.651,321.295,2003.587,0.000,0.000,359.989); CreateDynamicObject(1722,-511.217,320.765,2003.584,0.000,0.000,349.978); CreateDynamicObject(1722,-508.540,320.782,2003.584,0.000,0.000,9.974); CreateDynamicObject(1722,-505.908,319.966,2003.584,0.000,0.000,9.970); CreateDynamicObject(1715,-491.830,325.175,2003.587,0.000,0.000,183.997); CreateDynamicObject(1715,-489.360,327.700,2003.587,0.000,0.000,273.990); CreateDynamicObject(1715,-490.335,329.455,2003.587,0.000,0.000,321.988); CreateDynamicObject(1715,-491.915,329.925,2003.587,0.000,0.000,1.987); CreateDynamicObject(1715,-493.561,329.118,2003.587,0.000,0.000,49.983); CreateDynamicObject(1715,-494.268,327.569,2003.587,0.000,0.000,91.982); CreateDynamicObject(14455,-486.839,326.770,2005.256,0.000,0.000,90.000); CreateDynamicObject(14455,-497.005,331.117,2005.256,0.000,0.000,270.000); CreateDynamicObject(2332,-468.703,287.350,2004.047,0.000,0.000,270.000); CreateDynamicObject(2518,-507.915,309.865,2000.086,0.000,0.000,180.000); CreateDynamicObject(2518,-509.937,309.868,2000.086,0.000,0.000,179.994); CreateDynamicObject(2518,-511.819,309.868,2000.086,0.000,0.000,179.994); CreateDynamicObject(14662,-493.548,311.131,2001.985,0.000,0.000,0.000); CreateDynamicObject(14662,-489.589,311.131,2001.985,0.000,0.000,0.000); CreateDynamicObject(2518,-493.351,309.868,2000.086,0.000,0.000,179.994); CreateDynamicObject(2518,-491.321,309.867,2000.086,0.000,0.000,179.994); CreateDynamicObject(2518,-489.342,309.868,2000.086,0.000,0.000,179.994); CreateDynamicObject(2528,-512.723,318.299,2000.086,0.000,0.000,0.000); CreateDynamicObject(2528,-511.057,318.303,2000.086,0.000,0.000,0.000); CreateDynamicObject(2528,-509.382,318.315,2000.086,0.000,0.000,0.000); CreateDynamicObject(2528,-507.736,318.329,2000.086,0.000,0.000,0.000); CreateDynamicObject(2528,-506.044,318.338,2000.086,0.000,0.000,0.000); CreateDynamicObject(2528,-496.430,318.316,2000.086,0.000,0.000,0.000); CreateDynamicObject(2528,-494.751,318.324,2000.086,0.000,0.000,0.000); CreateDynamicObject(2528,-493.079,318.320,2000.086,0.000,0.000,0.000); CreateDynamicObject(2528,-491.421,318.313,2000.086,0.000,0.000,0.000); CreateDynamicObject(2528,-489.777,318.307,2000.086,0.000,0.000,0.000); CreateDynamicObject(18075,-501.157,323.420,2008.584,0.000,0.000,0.000); CreateDynamicObject(18075,-497.575,341.566,2008.584,0.000,0.000,0.000); CreateDynamicObject(18075,-504.621,341.554,2008.584,0.000,0.000,0.000); CreateDynamicObject(18075,-492.025,323.225,2008.584,0.000,0.000,0.000); CreateDynamicObject(18075,-512.109,323.089,2008.584,0.000,0.000,90.000); CreateDynamicObject(19171,-527.179,297.050,2005.137,90.000,0.000,0.000); CreateDynamicObject(19170,-528.677,297.050,2005.136,90.000,0.000,0.000); CreateDynamicObject(19169,-527.179,297.050,2006.635,90.000,0.000,0.000); CreateDynamicObject(19168,-528.677,297.050,2006.635,90.000,0.000,0.000); CreateDynamicObject(3858,-473.204,296.937,2007.251,0.000,0.000,225.000); CreateDynamicObject(3858,-473.204,296.936,2007.251,0.000,0.000,225.000); CreateDynamicObject(7616,-410.319,364.022,2003.693,0.000,0.000,0.000); CreateDynamicObject(758,-477.954,300.295,2004.840,0.000,0.000,260.000); CreateDynamicObject(746,-470.444,300.428,2004.855,346.000,0.000,210.000); CreateDynamicObject(953,-472.639,300.774,2005.411,8.998,0.000,340.000); CreateDynamicObject(1600,-478.188,299.345,2006.069,0.000,0.000,270.000); CreateDynamicObject(1600,-470.191,298.837,2005.401,0.000,0.000,110.000); CreateDynamicObject(1599,-475.460,300.450,2005.854,0.000,0.000,280.000); CreateDynamicObject(1599,-471.358,301.214,2006.522,0.000,0.000,109.997); CreateDynamicObject(1601,-474.458,298.011,2005.208,0.000,0.000,270.000); CreateDynamicObject(1601,-477.457,299.380,2005.208,0.000,0.000,110.000); CreateDynamicObject(1605,-474.368,300.782,2006.095,0.000,0.000,270.000); CreateDynamicObject(1606,-475.851,298.334,2006.951,0.000,0.000,90.000); CreateDynamicObject(10444,-473.067,301.691,2005.250,90.000,90.000,271.500); CreateDynamicObject(3858,-473.204,296.936,2007.251,0.000,0.000,225.000); CreateDynamicObject(19166,-468.877,294.637,2005.412,0.000,270.000,0.000); CreateDynamicObject(2894,-474.508,288.769,2004.521,0.000,0.000,209.998); CreateDynamicObject(14455,-533.559,296.354,2005.256,0.000,0.000,270.000); CreateDynamicObject(14455,-496.961,320.560,2005.256,0.000,0.000,270.000); CreateDynamicObject(14455,-494.109,314.687,2005.256,0.000,0.000,0.000); CreateDynamicObject(14455,-486.799,316.217,2005.256,0.000,0.000,90.000); CreateDynamicObject(19166,-486.665,323.611,2005.256,0.000,270.000,0.000); CreateDynamicObject(1704,-487.421,314.985,2003.584,0.000,0.000,180.000); CreateDynamicObject(1723,-492.858,317.161,2003.584,0.000,0.000,0.000); CreateDynamicObject(1704,-495.410,314.950,2003.584,0.000,0.000,179.994); CreateDynamicObject(1723,-490.826,318.122,2003.584,0.000,0.000,90.000); CreateDynamicObject(1723,-492.871,320.134,2003.584,0.000,0.000,270.000); CreateDynamicObject(2001,-491.850,320.303,2003.587,0.000,0.000,0.000); CreateDynamicObject(2001,-522.320,293.429,2003.587,0.000,0.000,0.000); CreateDynamicObject(2010,-476.157,292.867,2003.578,0.000,0.000,0.000); CreateDynamicObject(2001,-479.968,293.325,2003.587,0.000,0.000,0.000); CreateDynamicObject(2010,-472.820,292.955,2003.578,0.000,0.000,0.000); CreateDynamicObject(1726,-504.550,317.268,2003.592,0.000,0.000,90.000); CreateDynamicObject(1726,-504.566,326.921,2003.592,0.000,0.000,90.000); CreateDynamicObject(1726,-497.916,328.834,2003.592,0.000,0.000,270.000); CreateDynamicObject(1726,-497.910,319.334,2003.592,0.000,0.000,270.000); // Bank interior CreateDynamicObject(19380, 1662.48743, -971.75378, 706.51898, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19454, 1656.65344, -971.62341, 701.63678, 90.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1658.31506, -973.28998, 701.63879, 90.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1656.65259, -974.96600, 701.63678, 90.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1666.42468, -973.18341, 701.63678, 90.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1668.09167, -971.52069, 701.63879, 90.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1668.08789, -974.84570, 701.63879, 90.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1667.57214, -974.94922, 701.63678, 90.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1657.16797, -974.99103, 701.63678, 90.00000, 0.00000, 0.00000); CreateDynamicObject(1278, 1663.16296, -976.64099, 700.80029, 0.00000, 90.00000, 0.00000); CreateDynamicObject(1278, 1663.16296, -976.64099, 703.67731, 0.00000, 90.00000, 0.00000); CreateDynamicObject(1278, 1663.16296, -976.64099, 706.39130, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19454, 1662.84253, -976.63281, 699.00177, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1660.28625, -976.63782, 699.00378, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1278, 1664.43274, -976.71887, 706.34930, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1649, 1666.65210, -976.65454, 702.11121, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1649, 1662.18835, -976.64697, 702.11121, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1649, 1657.94739, -976.62915, 702.11121, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1278, 1660.03259, -976.68048, 706.34930, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1649, 1662.18835, -976.64697, 705.37720, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1649, 1666.59045, -976.64697, 705.37720, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1649, 1657.94824, -976.64899, 705.37720, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1667.55725, -969.82300, 701.63678, 90.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1657.22937, -969.77875, 701.63678, 90.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1656.33521, -968.05743, 701.63678, 90.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1668.52039, -968.11981, 701.63678, 90.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1665.40320, -967.14172, 701.63678, 90.00000, 0.00000, 55.00000); CreateDynamicObject(19454, 1659.46021, -967.08081, 701.63678, 90.00000, 0.00000, -55.00000); CreateDynamicObject(19380, 1662.42456, -962.27173, 706.51703, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19391, 1662.37244, -966.14618, 701.82550, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1662.29138, -966.14740, 707.60278, 90.00000, 0.00000, 90.00000); CreateDynamicObject(19375, 1662.37500, -971.72113, 700.00342, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19375, 1662.43970, -963.05243, 700.00140, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19454, 1665.55212, -966.13098, 701.63678, 90.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1667.22107, -964.33282, 701.63678, 90.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1667.22095, -960.95282, 701.63678, 90.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1660.89551, -964.39307, 701.63678, 90.00000, 0.00000, 0.00000); CreateDynamicObject(19380, 1663.72046, -961.21100, 703.62903, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19454, 1659.23047, -962.72852, 701.63678, 90.00000, 0.00000, 90.00000); CreateDynamicObject(19370, 1664.28015, -971.68073, 707.10889, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19370, 1662.76160, -973.19739, 707.10687, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19370, 1661.23926, -971.67780, 707.10889, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19370, 1662.76013, -970.15582, 707.10687, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19443, 1663.48096, -971.70142, 706.37988, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19443, 1662.75806, -972.42108, 706.38190, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19443, 1662.04016, -971.69843, 706.37988, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19443, 1662.76147, -970.98419, 706.38190, 0.00000, 0.00000, 90.00000); CreateDynamicObject(18075, 1662.37048, -970.06836, 706.46777, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2207, 1663.03015, -971.79346, 700.09070, 0.00000, 0.00000, 180.00000); CreateDynamicObject(1727, 1663.31348, -970.20789, 699.95898, 0.00000, 0.00000, -40.00000); CreateDynamicObject(1727, 1659.96106, -970.93146, 699.95898, 0.00000, 0.00000, 40.00000); CreateDynamicObject(1727, 1661.50989, -969.53607, 699.95898, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1714, 1662.10669, -973.59125, 700.05157, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2811, 1661.05359, -973.11829, 699.97162, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1663.09033, -973.12018, 699.97162, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2200, 1657.44141, -970.53723, 700.08978, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19375, 1653.66931, -972.24451, 701.72339, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19375, 1653.64197, -974.36877, 701.72339, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19375, 1653.65918, -973.32990, 701.72339, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19375, 1671.06738, -972.08447, 701.72339, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19375, 1671.04700, -973.17102, 701.72339, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19375, 1671.07214, -974.26880, 701.72339, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2230, 1661.15503, -966.06073, 705.13647, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2230, 1664.17798, -966.06073, 705.12848, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19370, 1662.27222, -964.76300, 705.05292, 0.00000, 90.00000, 90.00000); CreateDynamicObject(19370, 1662.46216, -964.76501, 705.05090, 0.00000, 90.00000, 90.00000); CreateDynamicObject(19370, 1662.46216, -964.76501, 706.45093, 0.00000, 90.00000, 90.00000); CreateDynamicObject(1649, 1662.36194, -966.43878, 707.24719, 0.00000, 90.00000, 0.00000); CreateDynamicObject(2614, 1662.38245, -966.27612, 703.86688, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2200, 1667.24573, -969.26605, 700.08978, 0.00000, 0.00000, -90.00000); CreateDynamicObject(2811, 1663.83496, -966.64502, 699.97162, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1660.88159, -966.68427, 699.97162, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1502, 1661.58777, -966.17401, 700.06921, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1649, 1662.35779, -966.45477, 707.24719, 0.00000, 90.00000, 0.00000); CreateDynamicObject(1649, 1662.35779, -966.48077, 707.24719, 0.00000, 90.00000, 0.00000); CreateDynamicObject(1734, 1662.79236, -971.69281, 706.42902, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1667.21094, -957.63080, 701.63678, 90.00000, 0.00000, 0.00000); CreateDynamicObject(19375, 1662.45776, -953.80481, 700.00342, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19391, 1658.35205, -961.25458, 701.81750, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1502, 1658.35767, -962.00018, 700.06921, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1659.23047, -959.72552, 701.63678, 90.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1660.90051, -958.06427, 701.63678, 90.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1662.50964, -956.62701, 701.63678, 90.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1665.89014, -956.62653, 701.63678, 90.00000, 0.00000, 90.00000); CreateDynamicObject(1726, 1666.37830, -962.08569, 700.08868, 0.00000, 0.00000, -90.00000); CreateDynamicObject(1726, 1666.34082, -958.71960, 700.08868, 0.00000, 0.00000, -90.00000); CreateDynamicObject(1727, 1664.09412, -957.83966, 700.08765, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1727, 1664.97131, -964.99353, 700.08759, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2811, 1666.50635, -965.32239, 699.97162, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1666.49377, -957.60059, 699.97162, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2126, 1665.15479, -960.55115, 700.08881, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2126, 1665.19629, -963.32709, 700.08881, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2614, 1667.07581, -961.43964, 702.49182, 0.00000, 0.00000, -90.00000); CreateDynamicObject(19375, 1671.89587, -965.46210, 701.72339, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19375, 1671.90527, -964.59674, 701.72339, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19375, 1671.89502, -958.07025, 701.72339, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19375, 1671.90881, -957.41803, 701.72339, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19375, 1671.90002, -961.44330, 704.69342, 0.00000, 90.00000, 90.00000); CreateDynamicObject(19375, 1671.90002, -961.44330, 705.48541, 0.00000, 90.00000, 90.00000); CreateDynamicObject(2200, 1661.01624, -959.01569, 700.08978, 0.00000, 0.00000, 90.00000); CreateDynamicObject(14596, 1652.60913, -957.46368, 693.38580, 0.00000, 0.00000, 180.00000); CreateDynamicObject(19375, 1662.70935, -963.04932, 688.40442, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19454, 1658.96338, -967.07098, 690.17383, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19375, 1662.71594, -970.60370, 688.41443, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19454, 1658.95447, -955.35168, 690.21381, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1663.30591, -958.41248, 690.21381, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1665.79163, -962.90070, 690.17383, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1661.68274, -971.20868, 690.17383, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1665.79285, -967.26093, 690.17578, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2206, 1663.32397, -960.97894, 688.45349, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2206, 1661.45435, -961.97198, 688.45148, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2206, 1661.45630, -962.95599, 688.45349, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2206, 1661.45630, -963.92999, 688.45148, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2206, 1661.45630, -964.90399, 688.45349, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2206, 1661.45630, -965.87799, 688.45148, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1714, 1664.47815, -964.20013, 688.49377, 0.00000, 0.00000, -90.00000); CreateDynamicObject(1714, 1664.46436, -962.77960, 688.49377, 0.00000, 0.00000, -90.00000); CreateDynamicObject(1714, 1664.43201, -961.27374, 688.49377, 0.00000, 0.00000, -90.00000); CreateDynamicObject(1714, 1664.47046, -965.76575, 688.49377, 0.00000, 0.00000, -90.00000); CreateDynamicObject(1714, 1660.37378, -961.13538, 688.49377, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1714, 1660.36292, -962.68683, 688.49377, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1714, 1660.31726, -964.14752, 688.49377, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1714, 1660.34314, -965.74756, 688.49377, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1714, 1662.39783, -959.87054, 688.49377, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19448, 1662.91016, -956.80499, 689.27472, -0.05300, 90.00000, 90.00000); CreateDynamicObject(19448, 1662.68140, -956.75812, 690.17572, -0.05300, 90.00000, 90.00000); CreateDynamicObject(19448, 1667.42212, -963.23273, 690.17572, -0.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1667.40771, -963.19348, 689.27472, -0.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1667.42908, -971.07928, 690.17572, -0.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1667.40833, -968.83728, 689.27472, -0.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1661.87451, -972.81970, 689.27472, -0.05300, 90.00000, 90.00000); CreateDynamicObject(19448, 1657.31396, -969.12482, 690.17572, -0.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1657.32751, -969.12482, 689.27472, -0.05300, 90.00000, 0.00000); CreateDynamicObject(2230, 1663.76355, -971.30103, 688.35822, 0.00000, 0.00000, 180.00000); CreateDynamicObject(19448, 1659.08435, -975.93622, 690.17572, -0.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1665.84216, -975.93213, 690.17572, -0.05300, 90.00000, 0.00000); CreateDynamicObject(2230, 1660.47583, -971.26636, 688.35822, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2811, 1661.30225, -970.88525, 688.45660, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1663.53259, -970.78687, 688.45660, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19448, 1664.15002, -975.86359, 690.17572, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1660.68494, -975.89722, 690.17572, -0.05300, 0.00000, 0.00000); CreateDynamicObject(1828, 1662.12476, -968.67163, 688.49323, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1734, 1662.24158, -967.92981, 691.94348, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1734, 1662.28015, -962.10773, 691.98151, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1502, 1657.56604, -961.96283, 688.48071, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19448, 1657.30774, -969.11176, 691.09570, -0.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1659.04810, -975.93469, 691.09570, -0.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1665.78918, -975.92078, 691.09570, -0.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1662.42566, -975.91620, 691.89569, -0.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1667.43506, -966.83893, 691.09570, -0.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1667.44019, -957.22589, 691.09570, -0.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1662.97778, -956.75787, 691.09570, -0.05300, 90.00000, 90.00000); CreateDynamicObject(19380, 1663.13403, -961.99518, 691.84302, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19380, 1663.08032, -967.48743, 691.84497, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19174, 1659.05225, -967.67047, 690.17877, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19175, 1665.68555, -968.27643, 690.17792, 0.00000, 0.00000, -90.00000); CreateDynamicObject(19172, 1665.68494, -961.49689, 690.19287, 0.00000, 0.00000, -90.00000); CreateDynamicObject(2491, 1663.91870, -968.71417, 687.72620, 0.00000, 0.00000, -47.00000); CreateDynamicObject(1952, 1663.73193, -968.88348, 689.70990, 55.00000, 91.00000, -149.00000); CreateDynamicObject(3077, 1662.46704, -971.14868, 692.41919, 0.00000, 180.00000, 0.00000); CreateDynamicObject(2227, 1662.71179, -966.43073, 688.49408, 0.00000, 0.00000, 0.00000); CreateDynamicObject(3077, 1662.48022, -958.49329, 692.41919, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19448, 1660.61646, -956.79962, 694.01569, -90.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1664.19775, -956.79871, 694.01569, -90.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1659.23938, -965.45404, 699.93073, -90.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1659.23938, -964.85797, 699.93073, -90.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1659.23938, -964.26202, 699.93073, -90.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1659.23938, -963.66602, 699.93073, -90.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1659.23938, -963.07001, 699.93073, -90.05300, 90.00000, 0.00000); CreateDynamicObject(19448, 1657.34546, -964.39307, 691.09570, -90.05300, 90.00000, 0.00000); CreateDynamicObject(1536, 1658.40564, -962.00049, 694.28979, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19391, 1658.35205, -961.25458, 696.00647, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1653.07410, -963.40411, 684.22479, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1650.81616, -964.45227, 684.22479, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1656.31763, -956.78729, 684.22479, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1661.04724, -961.51617, 684.22479, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19454, 1662.65161, -961.14771, 684.22479, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19375, 1657.63232, -961.26575, 682.60437, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19454, 1655.57104, -969.17828, 684.22479, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1655.57104, -965.98853, 684.23877, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19391, 1661.24683, -965.98999, 684.43079, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19172, 1658.17444, -965.90759, 684.55719, 0.00000, 0.00000, 180.00000); CreateDynamicObject(1726, 1660.10291, -965.30756, 682.63391, 0.00000, 0.00000, 180.00000); CreateDynamicObject(1727, 1656.93030, -965.29083, 682.63568, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2811, 1657.45129, -965.35327, 682.69244, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2126, 1657.67688, -964.35883, 682.58270, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2614, 1653.20264, -961.37762, 684.42200, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19174, 1659.57642, -961.59302, 684.41058, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19454, 1667.40674, -965.99768, 684.43280, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19391, 1673.69470, -966.00177, 684.43481, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19379, 1660.32056, -970.69043, 682.59747, -0.00400, 90.00000, 0.00000); CreateDynamicObject(19379, 1670.82617, -970.70868, 682.59949, -0.00400, 90.00000, 0.06000); CreateDynamicObject(19454, 1679.53491, -966.00079, 684.31482, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19450, 1655.57483, -970.78229, 684.20892, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19450, 1662.68152, -967.01599, 681.80890, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19450, 1667.44470, -971.74622, 681.80890, 0.00000, 180.00000, 90.00000); CreateDynamicObject(19450, 1679.07483, -970.76233, 684.20892, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19450, 1667.44470, -971.24622, 681.80890, 0.00000, 180.00000, 90.00000); CreateDynamicObject(19450, 1667.44250, -971.36652, 681.81091, 0.00000, 180.00000, 90.00000); CreateDynamicObject(19450, 1667.41479, -971.46899, 681.80890, 0.00000, 180.00000, 90.00000); CreateDynamicObject(19450, 1667.44470, -971.45221, 681.80688, 0.00000, 180.00000, 90.00000); CreateDynamicObject(19450, 1667.41272, -971.63385, 681.80688, 0.00000, 180.00000, 90.00000); CreateDynamicObject(19450, 1662.78552, -966.65765, 681.81091, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19450, 1662.87305, -966.41022, 681.80890, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19450, 1663.04565, -966.99860, 681.81091, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19450, 1663.04565, -966.99860, 681.81091, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19450, 1663.14392, -966.97192, 681.81293, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19450, 1657.16846, -976.89392, 684.20892, 0.00000, 0.00000, 48.00000); CreateDynamicObject(19450, 1677.52844, -976.71588, 684.20892, 0.00000, 0.00000, -48.00000); CreateDynamicObject(19450, 1660.71936, -984.86407, 684.20892, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19450, 1673.97595, -984.69043, 684.20892, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19379, 1678.49524, -970.70831, 682.60150, -0.00400, 90.00000, 0.00000); CreateDynamicObject(19379, 1673.69922, -978.93152, 682.59747, -0.00400, 90.00000, 0.00000); CreateDynamicObject(19379, 1663.19775, -978.88202, 682.59747, -0.00400, 90.00000, 0.00000); CreateDynamicObject(19379, 1659.90479, -978.85461, 682.59351, -0.00400, 90.00000, 0.00000); CreateDynamicObject(19379, 1672.02271, -987.53003, 682.60748, -0.00400, 90.00000, 0.00000); CreateDynamicObject(19379, 1662.30005, -987.55170, 682.60553, -0.00400, 90.00000, 0.00000); CreateDynamicObject(14413, 1660.40491, -980.61688, 680.50598, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19450, 1655.99084, -989.59222, 684.20892, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19450, 1678.70947, -989.42102, 684.20490, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19450, 1672.42834, -996.52631, 684.20490, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19450, 1665.20630, -996.52954, 684.20490, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19450, 1679.14075, -996.31305, 684.20490, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19450, 1680.95544, -992.56982, 684.20490, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19450, 1655.19873, -996.27271, 684.20490, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19450, 1653.71216, -993.49536, 684.20490, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19379, 1655.92603, -992.17084, 682.60150, -0.00400, 90.00000, 0.00000); CreateDynamicObject(19379, 1678.53967, -993.41864, 682.60150, -0.00400, 90.00000, 0.00000); CreateDynamicObject(19379, 1670.27588, -991.98706, 682.59949, -0.00400, 90.00000, 0.00000); CreateDynamicObject(19379, 1663.10400, -991.85168, 682.60352, -0.00400, 90.00000, 0.00000); CreateDynamicObject(19358, 1672.17358, -970.22870, 681.80890, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19358, 1672.03430, -970.23053, 681.81091, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19358, 1671.94434, -970.22852, 681.80688, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19358, 1671.86829, -970.22650, 681.80890, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19358, 1671.74036, -970.23053, 681.80292, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19358, 1672.17566, -967.54669, 681.80890, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19358, 1671.92444, -967.54138, 681.80688, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19358, 1672.03430, -967.54150, 681.81091, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19358, 1671.74036, -967.58447, 681.80292, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19358, 1671.86829, -967.54248, 681.80890, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19358, 1671.57642, -970.21252, 681.80090, 0.00000, 180.00000, 0.00000); CreateDynamicObject(19358, 1671.57642, -967.54248, 681.80090, 0.00000, 180.00000, 0.00000); CreateDynamicObject(1536, 1670.57324, -964.19226, 682.51721, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1536, 1666.59705, -966.03491, 682.51721, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19176, 1667.35913, -996.42566, 683.93018, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19448, 1665.52271, -1001.17371, 683.64270, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1669.21240, -1001.15674, 683.65869, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1668.90662, -998.10468, 685.32269, -0.05300, 90.00000, 90.00000); CreateDynamicObject(19448, 1665.97058, -998.10272, 685.33069, -0.05300, 90.00000, 90.00000); CreateDynamicObject(19448, 1673.25439, -998.16711, 682.72272, 33.00000, 90.00000, 90.00000); CreateDynamicObject(19448, 1661.49133, -998.13934, 682.72272, -33.00000, 90.00000, 90.00000); CreateDynamicObject(19448, 1669.65576, -1001.24042, 683.33868, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1670.11609, -1001.24353, 683.02368, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1670.57666, -1001.25226, 682.69373, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1671.03662, -1001.24109, 682.36371, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1671.45862, -1001.24512, 682.18372, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1671.90051, -1001.25153, 681.89868, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1672.30273, -1001.25348, 681.62872, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1672.72717, -1001.24298, 681.35870, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1665.09607, -1001.22498, 683.33868, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1664.65222, -1001.23010, 683.06873, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1664.20837, -1001.23523, 682.76868, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1663.80115, -1001.22870, 682.51367, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1663.37744, -1001.22302, 682.24969, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1662.99268, -1001.23077, 681.99768, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1662.61279, -1001.22302, 681.75171, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19448, 1662.18933, -1001.24329, 681.47968, -0.05300, 0.00000, 0.00000); CreateDynamicObject(19435, 1670.59705, -975.74170, 684.39459, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19435, 1670.84668, -976.46210, 684.39661, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19435, 1670.84668, -975.02710, 684.39661, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19435, 1671.22705, -975.74170, 684.39459, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19435, 1663.99280, -976.46210, 684.39661, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19435, 1664.24304, -975.74170, 684.39459, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19435, 1663.64502, -975.74170, 684.39459, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19435, 1663.99268, -975.02710, 684.39661, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1216, 1664.60999, -975.73181, 683.34930, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1216, 1670.24316, -975.72345, 683.34930, 0.00000, 0.00000, -90.00000); CreateDynamicObject(19435, 1663.99280, -990.46210, 684.39661, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19435, 1663.99268, -989.02710, 684.39661, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19435, 1664.24304, -989.74170, 684.39459, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19435, 1663.64502, -989.74170, 684.39459, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19435, 1670.84668, -990.46210, 684.39661, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19435, 1670.84668, -989.02710, 684.39661, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19435, 1670.59705, -989.74170, 684.39459, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19435, 1671.22705, -989.74170, 684.39459, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1662.80054, -971.60742, 683.55664, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1662.80249, -971.60938, 685.22662, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1671.95862, -971.66241, 683.55664, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1671.96082, -971.66351, 685.22662, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1668.88403, -971.64197, 683.55664, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1665.77905, -971.68475, 683.55664, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1668.88599, -971.64398, 685.42963, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1665.78113, -971.68683, 685.40161, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1671.99792, -966.36957, 683.55664, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1671.99988, -966.36761, 685.56262, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1662.74365, -966.35168, 683.55664, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1662.74573, -966.34967, 685.32458, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19381, 1667.31580, -982.70880, 682.61493, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1677.32422, -992.69708, 682.60938, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1673.82422, -992.69708, 682.60938, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1670.32422, -992.69708, 682.60938, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1666.82422, -992.69708, 682.60938, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1663.32422, -992.69708, 682.60742, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1659.82422, -992.69708, 682.60742, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1657.32422, -992.69708, 682.60938, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1667.32007, -989.64728, 682.61139, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1667.31274, -987.56097, 682.61340, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1667.44006, -976.51031, 682.59943, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1667.43689, -974.11902, 682.60138, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1675.15894, -968.47070, 682.60541, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1675.15552, -971.62988, 682.60339, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1675.14941, -974.82123, 682.60541, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1659.02771, -968.61041, 682.59943, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1659.02771, -971.61041, 682.60138, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1659.02771, -974.61041, 682.59943, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1667.31506, -994.88812, 682.60541, 0.00000, 90.00000, 0.00000); CreateDynamicObject(1216, 1664.62183, -989.77948, 683.34930, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1216, 1670.23364, -989.68671, 683.34930, 0.00000, 0.00000, -90.00000); CreateDynamicObject(19372, 1665.55750, -984.24152, 682.61731, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19372, 1669.06519, -981.03992, 682.61731, 0.00000, 90.00000, 0.00000); CreateDynamicObject(1502, 1672.91052, -965.99878, 682.66650, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1502, 1660.46240, -966.02490, 682.66650, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19373, 1660.72278, -973.38147, 700.00690, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19373, 1664.19324, -970.30255, 700.00690, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19372, 1660.73840, -970.30151, 700.00629, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19372, 1664.19141, -973.38068, 700.00629, 0.00000, 90.00000, 0.00000); CreateDynamicObject(1726, 1654.57568, -993.88953, 682.60760, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1726, 1656.18237, -990.42102, 682.60760, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1726, 1658.12073, -995.30109, 682.60760, 0.00000, 0.00000, -180.00000); CreateDynamicObject(2126, 1656.79932, -993.20648, 682.59167, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1654.74890, -990.55658, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1654.64624, -995.29932, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1660.18701, -991.68616, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1660.21997, -993.80585, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19174, 1653.83386, -992.88977, 684.66608, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2126, 1676.75720, -993.20923, 682.59167, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1726, 1678.39221, -995.32458, 682.60760, 0.00000, 0.00000, -180.00000); CreateDynamicObject(1726, 1676.31909, -990.28052, 682.60760, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1726, 1680.03442, -991.83075, 682.60760, 0.00000, 0.00000, -90.00000); CreateDynamicObject(2811, 1679.71533, -995.15234, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1679.85291, -990.56287, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1674.32520, -991.69720, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1674.31262, -993.74756, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19175, 1680.88062, -992.88879, 684.73419, 0.00000, 0.00000, -90.00000); CreateDynamicObject(1727, 1659.82190, -992.22430, 682.69482, 0.00000, 0.00000, -90.00000); CreateDynamicObject(1727, 1674.90588, -993.20551, 682.69482, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2811, 1669.43213, -990.82062, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1665.22046, -990.83411, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1669.40662, -994.72894, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1665.17786, -994.67572, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1649, 1664.38135, -971.64264, 686.28632, 0.00000, 90.00000, 0.00000); CreateDynamicObject(1649, 1667.46509, -971.67499, 686.28632, 0.00000, 90.00000, 0.00000); CreateDynamicObject(1649, 1670.43530, -971.72980, 686.28632, 0.00000, 90.00000, 0.00000); CreateDynamicObject(9131, 1671.99182, -968.97778, 683.55664, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1671.99268, -968.98340, 685.22662, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1649, 1672.07544, -970.30029, 686.36530, 0.00000, 90.00000, 90.00000); CreateDynamicObject(9131, 1671.99268, -968.98340, 685.22662, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1649, 1672.16272, -967.69873, 686.36530, 0.00000, 90.00000, 90.00000); CreateDynamicObject(1649, 1662.68506, -970.26831, 686.28632, 0.00000, 90.00000, -90.00000); CreateDynamicObject(9131, 1662.74438, -968.89624, 683.55664, 0.00000, 0.00000, 0.00000); CreateDynamicObject(9131, 1662.74194, -968.89771, 685.22662, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1649, 1662.74121, -967.32971, 686.28632, 0.00000, 90.00000, -90.00000); CreateDynamicObject(2200, 1669.07825, -966.22864, 682.68683, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2200, 1664.39514, -966.23621, 682.68683, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1828, 1667.77917, -968.79425, 682.66248, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1714, 1670.26538, -970.00128, 682.68542, 0.00000, 0.00000, 62.00000); CreateDynamicObject(1714, 1664.33838, -970.21857, 682.68542, 0.00000, 0.00000, -62.00000); CreateDynamicObject(1714, 1667.39148, -970.04071, 682.68542, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1714, 1670.32922, -967.69934, 682.68542, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1714, 1664.26782, -967.65887, 682.68542, 0.00000, 0.00000, -90.00000); CreateDynamicObject(2811, 1669.55005, -977.65448, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1665.26160, -977.63495, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1808, 1670.90918, -988.73779, 682.69318, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2606, 1669.72595, -966.20422, 685.30310, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2606, 1669.72595, -966.20422, 684.84308, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19380, 1677.75940, -993.34680, 685.94501, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19380, 1667.43481, -993.30182, 685.96503, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19380, 1657.26416, -993.34833, 685.94501, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19380, 1664.09070, -983.83752, 685.97498, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19380, 1672.86572, -983.84723, 685.97900, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19380, 1674.54370, -974.38708, 685.94501, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19380, 1674.64111, -970.71228, 685.96503, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19380, 1664.31567, -974.47052, 685.98499, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19380, 1657.26782, -974.66217, 685.96503, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19380, 1657.41858, -965.23651, 686.00500, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19380, 1665.27612, -968.87659, 686.02502, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19380, 1654.17944, -961.91632, 685.98499, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19443, 1654.88867, -958.56860, 686.58557, 90.00000, 0.00000, 90.00000); CreateDynamicObject(4595, 1812.95972, -1071.76428, 686.49622, 0.00000, 0.00000, 0.00000); CreateDynamicObject(4702, 1825.28564, -990.24133, 686.35730, 0.00000, 0.00000, 0.00000); CreateDynamicObject(4650, 1662.22815, -976.74054, 710.07861, 0.00000, -90.00000, 90.00000); CreateDynamicObject(14576, 1677.25659, -980.76630, 678.18488, 0.00000, 0.00000, 180.00000); //CreateDynamicObject(2634, 1677.76440, -987.50836, 671.68329, 0.00000, 0.00000, -55.00000); CreateDynamicObject(1726, 1668.31262, -981.95514, 682.60760, 0.00000, 0.00000, -180.00000); CreateDynamicObject(1726, 1666.28406, -983.28662, 682.60760, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1665.64502, -982.69666, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1668.86804, -982.63745, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19443, 1665.71082, -987.56238, 686.06207, 90.00000, 90.00000, 90.00000); CreateDynamicObject(19443, 1665.71082, -981.06238, 686.06207, 90.00000, 90.00000, 90.00000); CreateDynamicObject(19443, 1665.71277, -984.27441, 686.06012, 90.00000, 90.00000, 90.00000); CreateDynamicObject(19443, 1667.36914, -989.22498, 686.06012, 90.00000, 90.00000, 0.00000); CreateDynamicObject(19443, 1665.71277, -977.56238, 686.06409, 90.00000, 90.00000, 90.00000); CreateDynamicObject(19443, 1669.03259, -987.56348, 686.06207, 90.00000, 90.00000, 90.00000); CreateDynamicObject(19443, 1669.03223, -984.16211, 686.06012, 90.00000, 90.00000, 90.00000); CreateDynamicObject(19443, 1669.03125, -980.87512, 686.05811, 90.00000, 90.00000, 90.00000); CreateDynamicObject(19443, 1669.03784, -977.56500, 686.05609, 90.00000, 90.00000, 90.00000); CreateDynamicObject(19443, 1667.37561, -975.89868, 686.06012, 90.00000, 90.00000, 0.00000); CreateDynamicObject(2434, 1677.79968, -999.17450, 669.99207, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2434, 1676.67566, -999.00781, 669.99408, 0.00000, 0.00000, -90.00000); CreateDynamicObject(2435, 1677.96814, -998.04462, 669.99261, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2435, 1676.67773, -998.07520, 669.99261, 0.00000, 0.00000, -90.00000); CreateDynamicObject(2434, 1677.97009, -997.13013, 669.99408, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2434, 1676.84619, -996.95288, 669.99213, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1674.19604, -989.16309, 669.99103, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2000, 1674.69397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2000, 1675.19397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2000, 1675.69397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2000, 1678.69397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2000, 1679.19397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2000, 1679.69397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2000, 1680.19397, -989.16107, 669.99103, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2000, 1680.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1679.82227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1679.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1678.82227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1678.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1677.82227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1677.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1676.82227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1676.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1675.82227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1675.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1674.82227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(2000, 1674.32227, -1003.89697, 669.99237, 0.00000, 0.00000, 180.00000); CreateDynamicObject(1550, 1674.38489, -1003.73480, 670.24860, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1550, 1674.75854, -1003.40149, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1674.24988, -1003.33649, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1674.41284, -1002.94733, 670.12360, 69.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1674.23401, -1002.45795, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1675.05933, -1002.70532, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1678.09033, -999.48700, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1678.35583, -999.07501, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1678.58569, -999.58228, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1674.20776, -989.49445, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1674.75024, -989.43054, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1674.48401, -989.88702, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1674.98157, -989.83002, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1674.27588, -990.34778, 670.05060, -105.00000, 0.00000, 287.00000); CreateDynamicObject(1550, 1675.00476, -1001.74683, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1676.12549, -998.38446, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1675.97021, -997.99341, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1675.61206, -998.46313, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1678.05933, -996.55249, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1677.51147, -996.45801, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1677.94556, -996.01849, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1677.39294, -995.96844, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1676.98633, -996.65375, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1680.32813, -992.60712, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1680.28064, -993.05798, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1679.88989, -992.82013, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1679.92578, -993.28516, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(1550, 1680.38379, -993.54877, 670.24860, 0.00000, 0.00000, 33.00000); CreateDynamicObject(19358, 1671.52832, -964.88507, 680.12793, 0.00000, 180.00000, -0.10000); CreateDynamicObject(19358, 1672.83105, -966.02869, 680.12793, 0.00000, 180.00000, -90.10000); CreateDynamicObject(18757, 1662.66113, -986.51813, 684.55219, 0.00000, 0.00000, 0.00000); CreateDynamicObject(18757, 1662.66309, -984.56311, 684.55219, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1661.19666, -982.16919, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1661.23230, -987.33252, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(18757, 1675.89514, -984.62836, 684.55219, 0.00000, 0.00000, 0.00000); CreateDynamicObject(18757, 1675.89709, -986.50043, 684.55219, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1673.35864, -981.99762, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2811, 1673.48254, -987.14429, 682.68890, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1557, 1655.64185, -972.38470, 682.58893, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1557, 1679.05115, -972.45654, 682.58893, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19464, 1685.72986, -987.53156, 672.48907, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19464, 1685.71204, -981.58417, 672.48907, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19464, 1685.73914, -976.21100, 672.48907, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19464, 1685.75281, -970.91187, 672.48907, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19464, 1670.69458, -971.08954, 672.48907, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19464, 1670.62061, -976.40570, 672.48907, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19464, 1670.48389, -981.24969, 672.48907, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19464, 1670.47412, -986.92102, 672.48907, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1734, 1684.81921, -973.82593, 675.49249, 0.00000, 30.00000, 30.00000); CreateDynamicObject(1734, 1684.89453, -978.63745, 675.49249, 0.00000, 30.00000, 30.00000); CreateDynamicObject(1734, 1684.82043, -983.63324, 675.49249, 0.00000, 30.00000, 30.00000); CreateDynamicObject(1734, 1671.46765, -974.24066, 675.49249, 0.00000, -30.00000, 30.00000); CreateDynamicObject(1734, 1671.31140, -978.95215, 675.49249, 0.00000, -30.00000, 30.00000); CreateDynamicObject(1734, 1671.28943, -984.09473, 675.49249, 0.00000, -30.00000, 30.00000); CreateDynamicObject(1808, 1663.93970, -988.78314, 682.69318, 0.00000, 0.00000, 180.00000); CreateDynamicObject(1734, 1667.30676, -977.16321, 686.48077, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1734, 1667.30676, -980.16321, 686.48077, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1734, 1667.30676, -982.66321, 686.48077, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1734, 1667.30676, -984.66321, 686.48077, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1734, 1667.30676, -987.16321, 686.48077, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2108, 1670.81714, -976.99768, 682.66882, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2108, 1663.92041, -976.95392, 682.66882, 0.00000, 0.00000, 0.00000); CreateDynamicObject(18075, 1667.43665, -982.60559, 685.90179, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2773, 1664.73279, -976.47131, 683.17090, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2773, 1664.72839, -975.08966, 683.17090, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2773, 1670.14978, -975.04382, 683.17090, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2773, 1670.14978, -976.44196, 683.17090, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2773, 1670.02148, -989.06970, 683.17090, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2773, 1670.00928, -990.43817, 683.17090, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2773, 1664.61499, -990.44031, 683.17090, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2773, 1664.63940, -989.05945, 683.17090, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2773, 1660.72534, -992.72321, 683.17090, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2773, 1673.82996, -992.72601, 683.17090, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1734, 1677.05408, -992.97064, 686.48077, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1734, 1656.62134, -992.63593, 686.48077, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19458, 1676.31287, -958.97858, 680.32001, 0.00000, 90.00000, 90.00000); CreateDynamicObject(19458, 1676.38159, -964.48083, 682.59680, 0.00000, 90.00000, 90.00000); CreateDynamicObject(19458, 1676.21570, -964.50897, 678.32642, 0.00000, 90.00000, 90.00000); CreateDynamicObject(19458, 1674.84692, -958.82312, 676.11920, 0.00000, 90.00000, 90.00000); CreateDynamicObject(19458, 1676.46021, -964.52179, 674.11139, 0.00000, 90.00000, 90.00000); CreateDynamicObject(19458, 1675.06433, -958.81409, 671.91522, 0.00000, 90.00000, 90.00000); CreateDynamicObject(1886, 1662.88867, -972.32507, 685.98969, 0.00000, 0.00000, 40.00000); CreateDynamicObject(1886, 1671.76123, -972.41028, 685.98969, 0.00000, 0.00000, -33.00000); // SAN interior CreateDynamicObject(19376, 247.74, 1783.13, 700.00, 0.00, 90.00, 0.00); CreateDynamicObject(19376, 258.24, 1783.14, 700.00, 0.00, 90.00, 0.00); CreateDynamicObject(19376, 247.74, 1773.55, 700.00, 0.00, 90.00, 0.00); CreateDynamicObject(19376, 258.23, 1773.55, 700.00, 0.00, 90.00, 0.00); CreateDynamicObject(19450, 250.44, 1784.44, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19450, 245.63, 1779.94, 701.65, 0.00, 0.00, 0.00); CreateDynamicObject(19450, 253.91, 1780.12, 701.65, 0.00, 0.00, 0.00); CreateDynamicObject(19450, 253.03, 1775.84, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19404, 252.33, 1778.41, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19388, 249.65, 1777.30, 701.65, 0.00, 0.00, -45.00); CreateDynamicObject(19388, 246.66, 1775.84, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19466, 252.38, 1778.39, 702.43, 0.00, 0.00, 90.00); CreateDynamicObject(1502, 249.13, 1776.76, 699.95, 0.00, 0.00, 45.00); CreateDynamicObject(2165, 251.81, 1777.85, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(19358, 248.54, 1774.62, 701.65, 0.00, 0.00, 0.00); CreateDynamicObject(1714, 252.63, 1777.00, 700.09, 0.00, 0.00, 230.00); CreateDynamicObject(2007, 253.70, 1776.70, 700.01, 0.00, 0.00, -90.00); CreateDynamicObject(1961, 250.82, 1775.97, 701.86, 0.00, 0.00, 0.00); CreateDynamicObject(1962, 251.55, 1775.97, 701.86, 0.00, 0.00, 0.00); CreateDynamicObject(1960, 252.27, 1775.97, 701.86, 0.00, 0.00, 0.00); CreateDynamicObject(1569, 247.05, 1784.39, 700.02, 0.00, 0.00, 0.00); CreateDynamicObject(1569, 250.03, 1784.39, 700.02, 0.00, 0.00, 180.00); CreateDynamicObject(1703, 251.10, 1783.84, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(1703, 246.23, 1779.16, 700.09, 0.00, 0.00, 90.00); CreateDynamicObject(2315, 247.52, 1779.46, 700.09, 0.00, 0.00, 90.00); CreateDynamicObject(2315, 251.39, 1782.50, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(2250, 251.42, 1782.51, 701.03, 0.00, 0.00, 0.00); CreateDynamicObject(2250, 247.52, 1780.31, 701.03, 0.00, 0.00, 90.00); CreateDynamicObject(2852, 252.61, 1782.49, 700.58, 0.00, 0.00, 90.00); CreateDynamicObject(2894, 247.42, 1779.67, 700.58, 0.00, 0.00, 39.00); CreateDynamicObject(2011, 246.21, 1783.97, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(2011, 253.24, 1779.07, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(1502, 245.88, 1775.81, 699.95, 0.00, 0.00, 0.00); CreateDynamicObject(19450, 245.63, 1770.30, 701.65, 0.00, 0.00, 0.00); CreateDynamicObject(19358, 250.13, 1773.12, 701.65, 0.00, 0.00, 90.40); CreateDynamicObject(19388, 252.80, 1774.23, 701.65, 0.00, 0.00, -45.00); CreateDynamicObject(1502, 252.29, 1773.69, 699.95, 0.00, 0.00, 45.00); CreateDynamicObject(1265, 250.63, 1775.49, 700.16, 0.00, 0.00, 0.00); CreateDynamicObject(1265, 250.35, 1774.87, 700.16, 0.00, 0.00, 0.00); CreateDynamicObject(1778, 253.53, 1775.81, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(2712, 253.57, 1775.32, 700.68, 0.00, 0.00, 0.00); CreateDynamicObject(1221, 249.31, 1773.68, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(1221, 250.27, 1773.94, 700.38, 0.00, 0.00, 0.00); CreateDynamicObject(1221, 249.56, 1775.12, 700.38, 0.00, 0.00, 0.00); CreateDynamicObject(1265, 249.18, 1774.36, 700.16, 0.00, 0.00, 0.00); CreateDynamicObject(19450, 249.18, 1768.98, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(1705, 246.30, 1770.17, 700.09, 0.00, 0.00, 90.00); CreateDynamicObject(1705, 247.85, 1769.63, 700.09, 0.00, 0.00, 180.00); CreateDynamicObject(1705, 251.83, 1769.63, 700.09, 0.00, 0.00, 180.00); CreateDynamicObject(2315, 248.60, 1769.55, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(2855, 248.78, 1769.55, 700.58, 0.00, 0.00, 0.00); CreateDynamicObject(2251, 249.67, 1769.36, 701.41, 0.00, 0.00, 0.00); CreateDynamicObject(1667, 249.91, 1769.75, 700.69, 0.00, 0.00, 0.00); CreateDynamicObject(1667, 250.08, 1769.65, 700.69, 0.00, 0.00, 0.00); CreateDynamicObject(2817, 248.02, 1783.18, 700.08, 0.00, 0.00, 0.00); CreateDynamicObject(19450, 254.81, 1780.65, 701.65, 0.00, 0.00, 0.00); CreateDynamicObject(14393, 255.23, 1759.95, 702.32, 0.00, 0.00, 90.00); CreateDynamicObject(19450, 261.73, 1768.98, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19450, 249.19, 1768.83, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19388, 255.31, 1768.98, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19388, 255.31, 1768.83, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19450, 261.73, 1768.83, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(14391, 256.13, 1760.86, 701.05, 0.00, 0.00, 90.00); CreateDynamicObject(1705, 257.11, 1767.64, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(1705, 258.68, 1767.02, 700.09, 0.00, 0.00, -90.00); CreateDynamicObject(2332, 259.63, 1764.36, 700.38, 0.00, 0.00, -90.00); CreateDynamicObject(638, 254.72, 1765.20, 701.43, 0.00, 0.00, 90.00); CreateDynamicObject(638, 258.07, 1765.20, 701.43, 0.00, 0.00, 90.00); CreateDynamicObject(2894, 256.40, 1765.18, 701.10, 0.00, 0.00, 80.00); CreateDynamicObject(1714, 257.11, 1762.81, 700.10, 0.00, 0.00, -45.00); CreateDynamicObject(1714, 254.18, 1762.77, 700.10, 0.00, 0.00, 0.00); CreateDynamicObject(1502, 251.40, 1759.68, 699.95, 0.00, 0.00, 0.00); CreateDynamicObject(2395, 250.95, 1759.82, 700.10, 0.00, 0.00, 180.00); CreateDynamicObject(2395, 252.48, 1759.82, 702.46, 0.00, 0.00, 180.00); CreateDynamicObject(2395, 249.79, 1759.59, 702.46, 0.00, 0.00, 0.00); CreateDynamicObject(2395, 248.19, 1759.58, 700.10, 0.00, 0.00, 0.00); CreateDynamicObject(1704, 254.31, 1753.90, 700.09, 0.00, 0.00, 135.00); CreateDynamicObject(1704, 256.22, 1754.49, 700.09, 0.00, 0.00, -135.00); CreateDynamicObject(1815, 254.42, 1754.73, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(2247, 254.89, 1755.32, 700.99, 0.00, 0.00, 0.00); CreateDynamicObject(2010, 253.33, 1754.95, 700.10, 0.00, 0.00, 0.00); CreateDynamicObject(2010, 256.59, 1754.91, 700.10, 0.00, 0.00, 0.00); CreateDynamicObject(19466, 253.95, 1759.95, 701.92, 0.00, 0.00, 90.00); CreateDynamicObject(19466, 256.17, 1759.95, 701.92, 0.00, 0.00, 90.00); CreateDynamicObject(19466, 258.40, 1759.95, 701.92, 0.00, 0.00, 90.00); CreateDynamicObject(19376, 259.00, 1763.90, 699.99, 0.00, 90.00, 0.00); CreateDynamicObject(1502, 254.53, 1768.96, 699.95, 0.00, 0.00, 0.00); CreateDynamicObject(19450, 262.61, 1772.18, 701.65, 0.00, 0.00, -45.00); CreateDynamicObject(19450, 263.67, 1770.76, 701.65, 0.00, 0.00, 0.00); CreateDynamicObject(19450, 257.75, 1783.82, 701.65, 0.00, 0.00, 0.00); CreateDynamicObject(19388, 257.75, 1777.43, 701.65, 0.00, 0.00, 0.00); CreateDynamicObject(19388, 259.37, 1782.08, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19388, 265.76, 1782.08, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19450, 268.40, 1775.63, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19358, 256.17, 1781.31, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(2606, 256.21, 1781.15, 702.56, 13.50, 0.00, 0.00); CreateDynamicObject(2165, 255.78, 1780.60, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(1806, 256.45, 1779.59, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(2078, 255.16, 1777.82, 700.11, 0.00, 0.00, 90.00); CreateDynamicObject(2462, 257.00, 1776.04, 700.26, 0.00, 0.00, 180.00); CreateDynamicObject(19418, 257.25, 1776.20, 701.06, 90.00, 90.00, 90.00); CreateDynamicObject(19418, 256.93, 1776.10, 701.06, 90.00, 90.00, 324233.00); CreateDynamicObject(19418, 257.04, 1776.30, 701.06, 90.00, 90.00, 342.00); CreateDynamicObject(334, 257.00, 1776.08, 701.41, 90.00, 0.00, 90.00); CreateDynamicObject(2037, 257.28, 1776.14, 701.81, 0.00, 0.00, 180.00); CreateDynamicObject(348, 256.86, 1776.16, 701.77, 90.00, 0.00, 45.00); CreateDynamicObject(19376, 268.68, 1783.12, 700.00, 0.00, 90.00, 0.00); CreateDynamicObject(19376, 268.71, 1773.53, 700.00, 0.00, 90.00, 0.00); CreateDynamicObject(19450, 262.09, 1787.45, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19450, 269.72, 1784.41, 701.65, 0.00, 0.00, 45.00); CreateDynamicObject(19450, 269.61, 1780.36, 701.65, 0.00, 0.00, 0.00); CreateDynamicObject(19450, 272.15, 1782.08, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19358, 262.57, 1782.08, 701.65, 0.00, 0.00, 90.00); CreateDynamicObject(19450, 262.68, 1786.88, 701.65, 0.00, 0.00, 0.00); CreateDynamicObject(1702, 261.93, 1772.37, 700.08, 0.00, 0.00, 225.00); CreateDynamicObject(2315, 259.75, 1772.14, 700.09, 0.00, 0.00, 45.00); CreateDynamicObject(2315, 266.10, 1777.95, 700.09, 0.00, 0.00, 45.00); CreateDynamicObject(1702, 268.89, 1779.58, 700.08, 0.00, 0.00, 270.00); CreateDynamicObject(1702, 267.63, 1776.33, 700.08, 0.00, 0.00, 180.00); CreateDynamicObject(2251, 260.10, 1772.71, 701.41, 0.00, 0.00, 0.00); CreateDynamicObject(2251, 266.94, 1779.01, 701.41, 0.00, 0.00, 0.00); CreateDynamicObject(1667, 260.76, 1772.73, 700.69, 0.00, 0.00, 0.00); CreateDynamicObject(1667, 266.26, 1777.77, 700.69, 0.00, 0.00, 0.00); CreateDynamicObject(1667, 266.34, 1777.86, 700.69, 0.00, 0.00, 0.00); CreateDynamicObject(1667, 266.20, 1777.88, 700.69, 0.00, 0.00, 0.00); CreateDynamicObject(1502, 258.59, 1782.06, 699.95, 0.00, 0.00, 0.00); CreateDynamicObject(1502, 264.98, 1782.06, 699.95, 0.00, 0.00, 0.00); CreateDynamicObject(2207, 265.49, 1785.14, 700.09, 0.00, 0.00, -45.00); CreateDynamicObject(1714, 267.29, 1785.67, 700.10, 0.00, 0.00, -45.00); CreateDynamicObject(330, 266.98, 1784.24, 700.86, 90.00, 0.00, 90.00); CreateDynamicObject(2894, 265.87, 1785.33, 700.86, 0.00, 0.00, 0.00); CreateDynamicObject(2608, 263.00, 1785.07, 701.21, 0.00, 0.00, 90.00); CreateDynamicObject(1962, 267.85, 1786.13, 701.86, 0.00, 0.00, -45.00); CreateDynamicObject(2185, 258.67, 1785.35, 700.09, 0.00, 0.00, 0.00); CreateDynamicObject(1714, 260.03, 1786.60, 700.10, 0.00, 0.00, -45.00); CreateDynamicObject(1704, 260.02, 1783.92, 700.09, 0.00, 0.00, 180.00); CreateDynamicObject(2078, 262.38, 1784.88, 700.11, 0.00, 0.00, -90.00); CreateDynamicObject(2007, 257.95, 1786.74, 700.01, 0.00, 0.00, 90.00); CreateDynamicObject(1569, 257.81, 1776.73, 700.02, 0.00, 0.00, 45.00); CreateDynamicObject(2886, 257.82, 1778.48, 701.44, 0.00, 0.00, 90.00); CreateDynamicObject(2886, 257.82, 1778.51, 701.44, 0.00, 0.00, -90.00); CreateDynamicObject(2886, 257.71, 1778.48, 701.44, 0.00, 0.00, -90.00); CreateDynamicObject(19378, 247.74, 1783.13, 703.43, 0.00, 90.00, 0.00); CreateDynamicObject(19378, 247.74, 1773.55, 703.43, 0.00, 90.00, 0.00); CreateDynamicObject(19378, 258.23, 1773.55, 703.43, 0.00, 90.00, 0.00); CreateDynamicObject(19378, 268.68, 1783.12, 703.43, 0.00, 90.00, 0.00); CreateDynamicObject(19378, 268.71, 1773.53, 703.43, 0.00, 90.00, 0.00); CreateDynamicObject(19378, 258.24, 1783.14, 703.43, 0.00, 90.00, 0.00); // Church interior (Credits: Lance Lanvins) CreateDynamicObject(4585, 2240.62451, -1363.48401, 1400.06104, 0.00000, 0.00000, 22.85999); CreateDynamicObject(19460, 2253.52002, -1367.50244, 1499.90222, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19460, 2242.11890, -1381.53967, 1499.90222, 0.00000, 0.00000, 45.00000); CreateDynamicObject(19460, 2235.60010, -1375.02026, 1499.90222, 0.00000, 0.00000, 45.00000); CreateDynamicObject(19460, 2249.11133, -1383.25745, 1499.90222, 0.00000, 0.00000, 112.50000); CreateDynamicObject(19460, 2253.52002, -1377.12195, 1499.90222, 0.00000, 0.00000, 0.00000); CreateDynamicObject(3935, 2236.75195, -1361.27576, 1499.90222, 0.00000, 0.00000, -178.07994); CreateDynamicObject(1569, 2248.18481, -1383.60034, 1499.85596, 0.00000, 0.00000, 22.50000); CreateDynamicObject(1569, 2250.90259, -1382.47168, 1499.85596, 0.00000, 0.00000, 202.50000); CreateDynamicObject(5426, 2242.53516, -1363.76294, 1480.00000, 0.00000, -38.00000, 0.28000); CreateDynamicObject(2808, 2235.74292, -1372.80530, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(948, 2251.08618, -1382.05518, 1499.90491, 0.00000, 0.00000, 22.50000); CreateDynamicObject(948, 2247.75195, -1383.41882, 1499.90491, 0.00000, 0.00000, 22.50000); CreateDynamicObject(5426, 2244.95605, -1373.11267, 1480.00000, 0.00000, -38.00000, -67.52000); CreateDynamicObject(5426, 2245.03931, -1369.02258, 1480.00000, 0.00000, -38.00000, -135.25996); CreateDynamicObject(19460, 2228.87573, -1368.22131, 1499.90222, 0.00000, 0.00000, 44.39999); CreateDynamicObject(19460, 2222.13696, -1361.43860, 1499.90222, 0.00000, 0.00000, 45.42000); CreateDynamicObject(19460, 2253.47510, -1358.03223, 1499.90222, 0.00000, 0.00000, 0.54000); CreateDynamicObject(19460, 2253.43726, -1348.77722, 1499.90222, 0.00000, 0.00000, 0.42000); CreateDynamicObject(5426, 2237.21387, -1367.78601, 1480.00000, 0.00000, -38.00000, -247.15994); CreateDynamicObject(19452, 2227.26855, -1361.54492, 1501.56897, 0.00000, 90.00000, -67.32000); CreateDynamicObject(19452, 2236.11206, -1357.86218, 1501.56897, 0.00000, 90.00000, -67.32000); CreateDynamicObject(19452, 2244.96045, -1354.17004, 1501.56897, 0.00000, 90.00000, -67.32000); CreateDynamicObject(19452, 2253.79395, -1350.46899, 1501.56897, 0.00000, 90.00000, -67.32000); CreateDynamicObject(19452, 2228.11426, -1362.99976, 1499.90002, 0.00000, 0.00000, -67.32000); CreateDynamicObject(19452, 2236.75806, -1359.40930, 1499.90002, 0.00000, 0.00000, -67.32000); CreateDynamicObject(19452, 2245.59302, -1355.73303, 1499.90002, 0.00000, 0.00000, -67.32000); CreateDynamicObject(19452, 2254.45288, -1352.02722, 1499.90002, 0.00000, 0.00000, -67.32000); CreateDynamicObject(9351, 2242.21802, -1353.90649, 1500.94861, 0.00000, 90.00000, -66.78003); CreateDynamicObject(9351, 2236.64771, -1356.29761, 1500.94861, 180.00000, 90.00000, -66.78000); CreateDynamicObject(11472, 2245.89063, -1354.67908, 1498.64001, 0.00000, 0.00000, 112.32000); CreateDynamicObject(19452, 2250.13403, -1351.80078, 1499.90002, 0.00000, 0.00000, 21.96000); CreateDynamicObject(19452, 2251.59302, -1351.17688, 1499.90002, 0.00000, 0.00000, 21.96000); CreateDynamicObject(19452, 2257.34033, -1352.73401, 1501.56897, 0.00000, 90.00000, -67.32000); CreateDynamicObject(11472, 2221.39795, -1364.98010, 1498.64001, 0.00000, 0.00000, 112.32000); CreateDynamicObject(19452, 2227.06665, -1361.50549, 1499.90002, 0.00000, 0.00000, 21.96000); CreateDynamicObject(19452, 2225.61060, -1362.09961, 1499.90002, 0.00000, 0.00000, 21.96000); CreateDynamicObject(19452, 2222.57227, -1367.25330, 1501.56897, 0.00000, 90.00000, -68.09998); CreateDynamicObject(8131, 2237.31934, -1355.89258, 1492.68005, 0.00000, 0.00000, 22.08001); CreateDynamicObject(8131, 2241.51440, -1354.10242, 1492.68005, 0.00000, 0.00000, 22.08001); CreateDynamicObject(8131, 2249.90723, -1353.56299, 1492.68005, 0.00000, 0.00000, 22.08001); CreateDynamicObject(8131, 2229.26147, -1362.20703, 1492.68005, 0.00000, 0.00000, 22.08001); CreateDynamicObject(970, 2229.82983, -1362.39954, 1502.20996, 0.00000, 0.00000, 23.16000); CreateDynamicObject(970, 2233.68555, -1360.80554, 1502.20996, 0.00000, 0.00000, 23.16000); CreateDynamicObject(970, 2248.96045, -1354.37988, 1502.20996, 0.00000, 0.00000, 23.16000); CreateDynamicObject(970, 2245.16064, -1356.00208, 1502.20996, 0.00000, 0.00000, 23.16000); CreateDynamicObject(970, 2241.36377, -1357.60522, 1502.20996, 0.00000, 0.00000, 22.74000); CreateDynamicObject(970, 2237.52588, -1359.20679, 1502.20996, 0.00000, 0.00000, 22.74000); CreateDynamicObject(3935, 2245.68799, -1357.58484, 1499.90222, 0.00000, 0.00000, -128.16000); CreateDynamicObject(2842, 2248.95898, -1381.66467, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2248.12402, -1382.00439, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2247.43896, -1380.31458, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2248.28223, -1379.97864, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2247.60449, -1378.30359, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2246.75293, -1378.62317, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2246.92163, -1376.61414, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2246.05811, -1376.92920, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2246.23999, -1374.94177, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2245.37524, -1375.24854, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2245.57520, -1373.29968, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2244.72363, -1373.63428, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2244.88794, -1371.60791, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2244.04004, -1371.96033, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2243.36011, -1370.28503, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2842, 2244.21143, -1369.93677, 1499.88232, 0.00000, 0.00000, -67.92000); CreateDynamicObject(2808, 2237.56909, -1372.04126, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2239.45557, -1371.26233, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2241.80200, -1370.28113, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2252.06860, -1366.06030, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2250.12207, -1366.85339, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2248.19629, -1367.63843, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2246.37036, -1368.40479, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2252.16455, -1369.29358, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2249.59790, -1370.36292, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2247.66528, -1371.16992, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2251.00879, -1369.77905, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2242.85938, -1373.10352, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2240.43188, -1370.85461, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2240.95459, -1373.89478, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2239.03369, -1374.68872, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2237.58594, -1375.27600, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2241.97974, -1376.69189, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2243.94189, -1375.89001, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2248.75513, -1373.90222, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(2808, 2250.44604, -1373.19568, 1500.51379, 0.00000, 0.00000, 22.50000); CreateDynamicObject(19452, 2234.89453, -1373.62744, 1504.40002, 0.00000, 90.00000, -135.00000); CreateDynamicObject(3399, 2241.83862, -1379.98010, 1502.21997, 0.00000, 0.00000, -225.60004); CreateDynamicObject(19452, 2242.55542, -1378.90796, 1499.90002, 0.00000, 0.00000, 44.21997); CreateDynamicObject(19452, 2242.55542, -1378.89465, 1502.73999, 0.00000, 0.00000, 44.22000); CreateDynamicObject(19452, 2237.99463, -1376.76721, 1499.66003, 90.00000, 90.00000, -135.00000); CreateDynamicObject(19452, 2253.24731, -1365.51624, 1504.40002, 0.00000, 90.00000, 181.37996); CreateDynamicObject(3399, 2252.66992, -1375.15027, 1502.21997, 0.00000, 0.00000, -268.49979); CreateDynamicObject(19452, 2251.78418, -1375.13330, 1501.50000, 0.00000, 0.00000, 181.38000); CreateDynamicObject(19452, 2251.78320, -1375.13330, 1502.77002, 0.00000, 0.00000, 181.38000); CreateDynamicObject(19452, 2253.34131, -1370.35596, 1499.66003, 90.00000, 90.00000, 181.38000); CreateDynamicObject(970, 2253.48120, -1360.72473, 1505.00000, 0.00000, 0.00000, 1.08000); CreateDynamicObject(970, 2251.44385, -1362.86182, 1505.00000, 0.00000, 0.00000, -88.80000); CreateDynamicObject(970, 2251.52954, -1367.00073, 1505.00000, 0.00000, 0.00000, -88.80000); CreateDynamicObject(970, 2251.61084, -1371.12036, 1505.00000, 0.00000, 0.00000, -88.80000); CreateDynamicObject(970, 2231.25781, -1370.47766, 1505.00000, 0.00000, 0.00000, -135.06001); CreateDynamicObject(970, 2234.19800, -1370.48486, 1505.00000, 0.00000, 0.00000, -44.94001); CreateDynamicObject(970, 2237.08936, -1373.38696, 1505.00000, 0.00000, 0.00000, -44.94001); CreateDynamicObject(970, 2240.00391, -1376.29932, 1505.00000, 0.00000, 0.00000, -44.94001); CreateDynamicObject(11489, 2239.12427, -1354.35425, 1499.89697, 0.00000, 0.00000, 23.27999); CreateDynamicObject(19943, 2252.55371, -1362.74561, 1497.30005, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19943, 2233.29980, -1371.56006, 1497.30005, 0.00000, 0.00000, 0.00000); CreateDynamicObject(950, 2245.36230, -1381.10144, 1500.42590, 0.00000, 0.00000, -42.84000); CreateDynamicObject(950, 2243.95264, -1379.80945, 1500.42590, 0.00000, 0.00000, -42.84000); CreateDynamicObject(950, 2242.73999, -1378.60559, 1500.42590, 0.00000, 0.00000, -42.84000); CreateDynamicObject(950, 2251.32275, -1374.83643, 1500.42590, 0.00000, 0.00000, -89.88000); CreateDynamicObject(950, 2251.29028, -1376.61890, 1500.42590, 0.00000, 0.00000, -89.88000); CreateDynamicObject(950, 2251.34570, -1378.65515, 1500.42590, 0.00000, 0.00000, -89.88000); CreateDynamicObject(4585, 2241.85571, -1367.30566, 1607.52002, 180.00000, 0.00000, 22.86000); // Crack lab fixes CreateDynamicObject(7191,2338.39135742,-1182.56323242,1032.95129395,90.00000000,0.00000000,90.00000000, -1, 5); //object(vegasnnewfence2b)(1) CreateDynamicObject(13656,2292.93872070,-1132.04724121,1017.29772949,0.00000000,0.00000000,0.00000000, -1, 5); //object(fuckknows)(1) CreateDynamicObject(7191,2337.95458984,-1182.54309082,1032.95129395,90.00000000,0.00000000,90.00000000, -1, 5); //object(vegasnnewfence2b)(2) CreateDynamicObject(7191,2338.43408203,-1182.39440918,1032.95129395,90.00000000,180.00000000,90.24850464, -1, 5); //object(vegasnnewfence2b)(3) CreateDynamicObject(7191,2337.97314453,-1182.39111328,1032.95129395,90.00000000,179.99450684,90.24719238, -1, 5); //object(vegasnnewfence2b)(4) CreateDynamicObject(7191,2328.80346680,-1180.43066406,1034.70544434,0.00000000,270.00000000,88.50006104, -1, 5); //object(vegasnnewfence2b)(5) CreateDynamicObject(3055,2319.78198242,-1184.82641602,1032.36450195,63.75003052,269.99996948,178.5001220, -1, 5); //object(kmb_shutter)(1) CreateDynamicObject(7191,2328.83715820,-1186.81262207,1030.70446777,0.00000000,90.74990845,359.99481201, -1, 5); //object(vegasnnewfence2b)(6) CreateDynamicObject(7191,2326.84863281,-1187.03125000,1030.70446777,0.00000000,90.74707031,359.99450684, -1, 5); //object(vegasnnewfence2b)(8) CreateDynamicObject(7191,2337.31689453,-1186.55639648,1030.70446777,0.00000000,90.74707031,359.99450684, -1, 5); //object(vegasnnewfence2b)(9) CreateDynamicObject(7191,2339.06689453,-1186.13159180,1030.70446777,0.00000000,91.24694824,359.99453735, -1, 5); //object(vegasnnewfence2b)(10) CreateDynamicObject(7191,2338.39062500,-1182.56250000,1032.95129395,90.00000000,0.00000000,90.00000000, -1, 5); //object(vegasnnewfence2b)(11) CreateDynamicObject(7191,2337.95947266,-1179.38879395,1032.95129395,90.00000000,180.00000000,270.00000000, -1, 5); //object(vegasnnewfence2b)(12) CreateDynamicObject(7191,2338.38476562,-1179.43066406,1032.95129395,90.00000000,0.00000000,90.00000000, -1, 5); //object(vegasnnewfence2b)(13) CreateDynamicObject(7191,2337.96630859,-1179.23559570,1032.95129395,90.00000000,179.99450684,90.24719238, -1, 5); //object(vegasnnewfence2b)(14) // Lance's PD precinct CreateDynamicObject(19375, 1176.07593, 2967.45361, 1005.00000, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19375, 1176.10046, 2977.08643, 1005.00000, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19375, 1165.60327, 2977.08789, 1005.00000, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19375, 1165.65308, 2967.45776, 1005.00000, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19459, 1181.26221, 2977.08496, 1006.84003, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19459, 1181.26465, 2967.54541, 1006.84003, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19459, 1177.46033, 2962.68115, 1006.84003, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19459, 1163.31531, 2962.71460, 1006.84003, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19459, 1160.42664, 2967.42578, 1006.84003, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19459, 1160.41748, 2976.96411, 1006.84003, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19459, 1165.15625, 2981.73145, 1006.84003, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19459, 1174.67639, 2981.72485, 1006.84003, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19459, 1184.17712, 2981.71606, 1006.84003, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19375, 1170.48901, 2957.86401, 1005.00000, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19459, 1172.72400, 2957.93140, 1006.84003, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19459, 1168.03784, 2957.91675, 1006.84003, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19459, 1170.08887, 2953.24390, 1006.84003, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1569, 1169.56274, 2953.29077, 1005.08002, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19459, 1165.23718, 2970.07520, 1004.70001, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19459, 1165.23718, 2970.07520, 1009.70001, 180.00000, 0.00000, 90.00000); CreateDynamicObject(19367, 1171.64258, 2970.08008, 1006.84003, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19395, 1174.82263, 2970.07056, 1006.84003, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19459, 1181.13208, 2970.08228, 1006.84003, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19466, 1161.35913, 2970.04126, 1007.34003, 0.00000, 0.00000, -90.00000); CreateDynamicObject(19466, 1163.59998, 2970.04126, 1007.34003, 0.00000, 0.00000, -90.00000); CreateDynamicObject(19466, 1165.83850, 2970.04126, 1007.34003, 0.00000, 0.00000, -90.00000); CreateDynamicObject(19466, 1168.07800, 2970.04126, 1007.34003, 0.00000, 0.00000, -90.00000); CreateDynamicObject(19466, 1170.31750, 2970.04126, 1007.34003, 0.00000, 0.00000, -90.00000); CreateDynamicObject(14782, 1180.85974, 2978.05103, 1006.09998, 0.00000, 0.00000, -90.00000); CreateDynamicObject(19459, 1171.98706, 2981.23315, 1006.84003, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19395, 1171.98779, 2974.85229, 1006.84003, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19367, 1171.98804, 2971.72559, 1006.84003, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1491, 1172.02026, 2974.10376, 1005.08759, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2308, 1171.50635, 2971.66748, 1005.05219, 0.00000, 0.00000, -180.00000); CreateDynamicObject(2165, 1169.56494, 2970.62231, 1005.05219, 0.00000, 0.00000, -180.00000); CreateDynamicObject(2173, 1167.65430, 2970.61377, 1005.05219, 0.00000, 0.00000, -180.00000); CreateDynamicObject(2165, 1165.70471, 2970.62915, 1005.05219, 0.00000, 0.00000, -180.00000); CreateDynamicObject(2605, 1163.28162, 2970.60107, 1005.45221, 0.00000, 0.00000, -180.00000); CreateDynamicObject(2605, 1161.33521, 2970.59888, 1005.45221, 0.00000, 0.00000, -180.00000); CreateDynamicObject(19459, 1160.87830, 2977.27051, 1006.84003, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19367, 1170.47473, 2977.27441, 1006.84003, 0.00000, 0.00000, 90.00000); CreateDynamicObject(19395, 1167.28467, 2977.26294, 1006.84003, 0.00000, 0.00000, 90.00000); CreateDynamicObject(1491, 1166.49780, 2977.22241, 1005.08759, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19927, 1160.92114, 2978.28662, 1005.06909, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19929, 1160.91284, 2980.65259, 1005.06909, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2047, 1174.76099, 2969.98535, 1008.12482, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1721, 1178.59448, 2963.02026, 1005.08643, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1721, 1177.79883, 2962.97876, 1005.08643, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1721, 1176.90430, 2962.95288, 1005.08643, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1721, 1175.99622, 2962.96875, 1005.08643, 0.00000, 0.00000, 0.00000); CreateDynamicObject(15038, 1168.38647, 2962.97925, 1005.72479, 0.00000, 0.00000, 0.00000); CreateDynamicObject(15038, 1172.41187, 2962.98267, 1005.72479, 0.00000, 0.00000, 0.00000); CreateDynamicObject(15038, 1171.82385, 2953.85596, 1005.72479, 0.00000, 0.00000, 0.00000); CreateDynamicObject(15038, 1168.83313, 2953.89648, 1005.72479, 0.00000, 0.00000, 0.00000); CreateDynamicObject(949, 1180.60376, 2969.46118, 1005.70477, 0.00000, 0.00000, 0.00000); CreateDynamicObject(949, 1180.57983, 2963.21875, 1005.70477, 0.00000, 0.00000, 0.00000); CreateDynamicObject(949, 1174.97852, 2963.19727, 1005.70477, 0.00000, 0.00000, 0.00000); CreateDynamicObject(1368, 1166.18311, 2963.29126, 1005.72583, 0.00000, 0.00000, 180.00000); CreateDynamicObject(1368, 1163.67834, 2963.29004, 1005.72583, 0.00000, 0.00000, 180.00000); CreateDynamicObject(1368, 1161.15735, 2963.29614, 1005.72583, 0.00000, 0.00000, 180.00000); CreateDynamicObject(19375, 1170.48901, 2957.86401, 1008.56000, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19375, 1164.67249, 2967.45386, 1008.56000, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19375, 1175.16931, 2967.48071, 1008.56000, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19375, 1185.52429, 2967.10181, 1008.56000, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19375, 1177.09534, 2976.88574, 1008.56097, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19375, 1183.30237, 2967.30371, 1008.56097, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19375, 1167.99890, 2977.00098, 1008.56000, 0.00000, 90.00000, 0.00000); CreateDynamicObject(19375, 1160.65125, 2976.96875, 1008.56097, 0.00000, 90.00000, 0.00000); CreateDynamicObject(3383, 1171.03064, 2979.52710, 1005.00751, 0.00000, 0.00000, 90.00000); CreateDynamicObject(2111, 1164.27051, 2980.22656, 1005.42810, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2310, 1163.45593, 2981.12622, 1005.52777, 0.00000, 0.00000, 95.28001); CreateDynamicObject(2310, 1165.69580, 2981.12256, 1005.52777, 0.00000, 0.00000, 33.60000); CreateDynamicObject(2310, 1165.66040, 2979.60254, 1005.52777, 0.00000, 0.00000, -30.60000); CreateDynamicObject(2310, 1162.94324, 2979.87158, 1005.52777, 0.00000, 0.00000, -169.73999); CreateDynamicObject(2858, 1164.16418, 2980.44897, 1005.84161, 0.00000, 0.00000, 0.00000); CreateDynamicObject(11722, 1164.06812, 2979.98315, 1005.96167, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2684, 1170.73547, 2980.51831, 1006.06183, 90.00000, 90.00000, 25.62000); CreateDynamicObject(2684, 1171.07263, 2979.43823, 1006.06183, 90.00000, 90.00000, 3.24000); CreateDynamicObject(2684, 1170.87488, 2978.35693, 1006.06183, 90.00000, 90.00000, -49.44001); CreateDynamicObject(2612, 1176.34570, 2981.56006, 1006.88849, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2611, 1174.42090, 2981.58496, 1006.88849, 0.00000, 0.00000, 0.00000); CreateDynamicObject(2615, 1178.58582, 2981.57178, 1006.88849, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19273, 1173.49268, 2970.00049, 1006.60028, 0.00000, 0.00000, 0.00000); CreateDynamicObject(19273, 1176.24414, 2970.13599, 1006.60028, 0.00000, 0.00000, -180.00000); // Christmas 2016 (Credits: JEinstein) CreateDynamicObject(19076, 1310.1173, -1378.4599, 12.5845, 0.0000, 0.0000, 0.0000); //XmasTree1 CreateDynamicObject(1704, 1309.6292, -1382.0592, 12.7400, 0.0000, 0.0000, 0.0000); //kb_chair03 CreateDynamicObject(19054, 1311.2885, -1381.9519, 13.2936, 0.0000, 0.0000, 0.0000); //XmasBox1 CreateDynamicObject(19058, 1308.8927, -1381.9248, 13.3039, 0.0000, 0.0000, 0.0000); //XmasBox5 CreateDynamicObject(19057, 1310.0550, -1379.6777, 13.3721, 0.0000, 0.0000, 0.0000); //XmasBox4 CreateDynamicObject(19056, 1309.1733, -1378.3001, 13.2964, 0.0000, 0.0000, 0.0000); //XmasBox3 CreateDynamicObject(19055, 1310.0877, -1377.0694, 13.3091, 0.0000, 0.0000, 0.0000); //XmasBox2 CreateDynamicObject(19054, 1311.0332, -1378.4566, 13.2958, 0.0000, 0.0000, 0.0000); //XmasBox1 CreateDynamicObject(18863, 1315.2963, -1332.8082, 21.5617, 0.0000, 0.0000, 84.0000); //SnowArc1 objectid = CreateDynamicObject(19479, 1310.1361, -1367.5251, 28.8414, 0.0000, 0.0000, -89.7999); //Plane005 SetDynamicObjectMaterial(objectid, 0, 10765, "airportgnd_sfse", "white", 0xFFFFFFFF); objectid = CreateDynamicObject(19479, 1310.1361, -1367.5551, 26.2013, 0.0000, 0.0000, -89.7999); //Plane005 SetDynamicObjectMaterialText(objectid, 0, "Ho Ho Ho!", 90, "Arial", 24, 1, 0xFF840410, 0x0, 1); CreateDynamicObject(3915, 1310.1085, -1351.5260, 12.7958, 0.0000, 0.6000, 89.7000); //snowover03 objectid = CreateDynamicObject(19479, 1310.1361, -1367.5551, 31.2814, 0.0000, 0.0000, -89.7999); //Plane005 SetDynamicObjectMaterialText(objectid, 0, "Merry Christmas", 90, "Arial", 24, 1, 0xFF840410, 0x0, 1); objectid = CreateDynamicObject(19479, 1310.1361, -1367.5551, 29.9614, 0.0000, 0.0000, -89.7999); //Plane005 SetDynamicObjectMaterialText(objectid, 0, "From the Admin Team", 90, "Arial", 24, 1, 0xFF177517, 0x0, 1); objectid = CreateDynamicObject(19479, 1310.1361, -1367.5551, 28.7113, 0.0000, 0.0000, -89.7999); //Plane005 SetDynamicObjectMaterialText(objectid, 0, "Limitless Roleplay", 90, "Arial", 24, 1, 0xFF2A77A1, 0x0, 1); objectid = CreateDynamicObject(19479, 1310.1361, -1367.5551, 27.5013, 0.0000, 0.0000, -89.7999); //Plane005 SetDynamicObjectMaterialText(objectid, 0, "Where fun is Limitless!", 90, "Arial", 24, 1, 0xFF177517, 0x0, 1); // Christmas 2016 (Credits: Emmet) CreateDynamicObject(19076, 1516.174438, -1659.545532, 12.549164, 0.000000, 0.000000, 88.621032); CreateDynamicObject(19054, 1515.487060, -1660.620117, 13.189172, 0.000000, 0.000000, 81.514411); CreateDynamicObject(19057, 1517.011108, -1660.514526, 13.159166, 0.000000, 0.000000, 105.449455); CreateDynamicObject(19056, 1517.115356, -1658.661743, 13.199166, 0.000000, 0.000000, 73.178741); CreateDynamicObject(19055, 1515.605957, -1658.291381, 13.179170, 0.000000, 0.000000, -167.021270); CreateDynamicObject(19058, 1514.269531, -1659.196166, 13.136867, 0.000000, 0.000000, -95.766990); CreateDynamicObject(2599, 1516.554565, -1656.150634, 13.009170, 0.000000, 0.000000, 92.047149); // Hospital garage doors CreateDynamicObject(10149, 1150.004394, -1345.316284, 14.201147, 0.000000, 0.000000, 270.000000); CreateDynamicObject(10149, 2007.520874, -1408.116088, 16.992187, 0.000000, 0.000000, 0.000000); CreateDynamic3DTextLabel("/deliverpatient\nto drop off a patient.", COLOR_DOCTOR, 1147.3577, -1345.3729, 13.6328, 10.0); CreateDynamicPickup(1240, 1, 1147.3577, -1345.3729, 13.6328); CreateDynamic3DTextLabel("/deliverpatient\nto drop off a patient.", COLOR_DOCTOR, 2007.6256, -1410.2455, 16.9922, 10.0); CreateDynamicPickup(1240, 1, 2007.6256, -1410.2455, 16.9922); // Job vehicles pizzaVehicles[0] = AddStaticVehicleEx(448, 2097.8396, -1792.2556, 12.9978, 90.0000, 3, 6, 300); // bike 1 pizzaVehicles[1] = AddStaticVehicleEx(448, 2097.8396, -1794.0065, 12.9978, 90.0000, 3, 6, 300); // bike 2 pizzaVehicles[2] = AddStaticVehicleEx(448, 2097.8396, -1795.7574, 12.9978, 90.0000, 3, 6, 300); // bike 3 pizzaVehicles[3] = AddStaticVehicleEx(448, 2097.8396, -1797.5083, 12.9978, 90.0000, 3, 6, 300); // bike 4 pizzaVehicles[4] = AddStaticVehicleEx(448, 2097.8396, -1799.2592, 12.9978, 90.0000, 3, 6, 300); // bike 5 pizzaVehicles[5] = AddStaticVehicleEx(448, 2097.8396, -1801.0101, 12.9978, 90.0000, 3, 6, 300); // bike 6 courierVehicles[0] = AddStaticVehicleEx(414, -63.1216, -1111.3860, 1.1820, 71.4600, 11, 11, 300); // mule courierVehicles[1] = AddStaticVehicleEx(414, -33.9888, -1132.0592, 1.2169, 250.7116, 11, 11, 300); // mule courierVehicles[2] = AddStaticVehicleEx(414, -30.7757, -1123.1583, 1.2201, 249.1730, 11, 11, 300); // mule courierVehicles[3] = AddStaticVehicleEx(498, -63.9965, -1145.2638, 1.1647, 332.5071, 11, 11, 300); // boxville courierVehicles[4] = AddStaticVehicleEx(498, -59.0494, -1147.4155, 1.1611, 332.2965, 11, 11, 300); // boxville courierVehicles[5] = AddStaticVehicleEx(498, -54.2330, -1149.6230, 1.1608, 333.8691, 11, 11, 300); // boxville courierVehicles[6] = AddStaticVehicleEx(498, -49.4566, -1151.9999, 1.1635, 332.1059, 11, 11, 300); // boxville sweeperVehicles[0] = AddStaticVehicleEx(574, 2187.6636, -1975.8738, 13.3012, 180.0000, 26, 26, 300); // sweeper 1 sweeperVehicles[1] = AddStaticVehicleEx(574, 2184.9255, -1975.8738, 13.3029, 180.0000, 26, 26, 300); // sweeper 2 sweeperVehicles[2] = AddStaticVehicleEx(574, 2181.8672, -1975.8738, 13.3005, 180.0000, 26, 26, 300); // sweeper 3 sweeperVehicles[3] = AddStaticVehicleEx(574, 2179.0005, -1975.8738, 13.2679, 180.0000, 26, 26, 300); // sweeper 4 taxiVehicles[0] = AddStaticVehicleEx(420, 1775.6141, -1860.0100, 13.2745, 269.2006, 6, 1, 300); // taxi 1 taxiVehicles[1] = AddStaticVehicleEx(420, 1763.0121, -1860.0037, 13.2723, 271.2998, 6, 1, 300); // taxi 2 taxiVehicles[2] = AddStaticVehicleEx(420, 1748.9358, -1859.9502, 13.2721, 270.3943, 6, 1, 300); // taxi 3 taxiVehicles[3] = AddStaticVehicleEx(420, 1734.6754, -1859.9305, 13.2740, 270.5646, 6, 1, 300); // taxi 4 // Driving test vehicles testVehicles[0] = AddStaticVehicleEx(445, 1280.5974, -1795.9840, 13.2733, 180.0000, 1, 1, 10); // test car 1 testVehicles[1] = AddStaticVehicleEx(445, 1276.2882, -1796.0579, 13.2776,181.8796, 1, 1, 10); // test car 2 testVehicles[2] = AddStaticVehicleEx(445, 1271.8486, -1796.2174, 13.2694,182.5803, 1, 1, 10); // test car 3 testVehicles[3] = AddStaticVehicleEx(445, 1267.1357, -1796.2031, 13.2980,181.5889, 1, 1, 10); // test car 4 testVehicles[4] = AddStaticVehicleEx(445, 1262.5736, -1796.3016, 13.3016,180.8420, 1, 1, 10); // test car 5 gettime(.hour = gHour); gettime(.hour = gWorldTime); SetWorldTime(gWorldTime); // Timers SetTimer("MinuteTimer", 60000, true); SetTimer("SecondTimer", 1000, true); SetTimer("FuelTimer", 75000, true); SetTimer("InjuredTimer", 5000, true); SetTimerEx("RandomFire", 5400000, true, "i", 1); // Misc LoadServerInfo(); RefreshLoginScreen(); RefreshTime(); ResetEvent(); ResetRobbery(); print("----------------------------------------------"); print("Limitless Roleplay by Emmet and Josh Einstein"); print("Loaded successfully."); print("----------------------------------------------"); new count; for(new i = 0; i < MAX_OBJECTS; i ++) { if(IsValidObject(i)) count++; } printf("%i objects loaded.", count); return 1; } public OnGameModeExit() { mysql_close(connectionID); if(gDoubleXP) { SetDoubleXP(false); } return 1; } public OnPlayerConnect(playerid) { if(IsPlayerNPC(playerid)) return 1; // Default values are handled via MySQL. Don't assign default values here. PlayerInfo[playerid][pID] = 0; PlayerInfo[playerid][pLogged] = 0; PlayerInfo[playerid][pKicked] = 0; PlayerInfo[playerid][pLoginTries] = 0; PlayerInfo[playerid][pSetup] = 0; PlayerInfo[playerid][pGender] = 0; PlayerInfo[playerid][pAge] = 0; PlayerInfo[playerid][pSkin] = 0; PlayerInfo[playerid][pCameraX] = 0; PlayerInfo[playerid][pCameraY] = 0; PlayerInfo[playerid][pCameraZ] = 0; PlayerInfo[playerid][pPosX] = 0; PlayerInfo[playerid][pPosY] = 0; PlayerInfo[playerid][pPosZ] = 0; PlayerInfo[playerid][pPosA] = 0; PlayerInfo[playerid][pInterior] = 0; PlayerInfo[playerid][pWorld] = 0; PlayerInfo[playerid][pCash] = 5000; PlayerInfo[playerid][pBank] = 0; PlayerInfo[playerid][pPaycheck] = 0; PlayerInfo[playerid][pLevel] = 1; PlayerInfo[playerid][pEXP] = 0; PlayerInfo[playerid][pMinutes] = 0; PlayerInfo[playerid][pHours] = 0; PlayerInfo[playerid][pAdmin] = 0; PlayerInfo[playerid][pAdminName] = 0; PlayerInfo[playerid][pHelper] = 0; PlayerInfo[playerid][pHealth] = 100.0; PlayerInfo[playerid][pArmor] = 0.0; PlayerInfo[playerid][pUpgradePoints] = 0; PlayerInfo[playerid][pWarnings] = 0; PlayerInfo[playerid][pInjured] = 0; PlayerInfo[playerid][pHospital] = 0; PlayerInfo[playerid][pSpawnHealth] = 50.0; PlayerInfo[playerid][pSpawnArmor] = 0; PlayerInfo[playerid][pJailType] = 0; PlayerInfo[playerid][pJailTime] = 0; PlayerInfo[playerid][pNewbieMuted] = 0; PlayerInfo[playerid][pHelpMuted] = 0; PlayerInfo[playerid][pAdMuted] = 0; PlayerInfo[playerid][pLiveMuted] = 0; PlayerInfo[playerid][pGlobalMuted] = 0; PlayerInfo[playerid][pReportMuted] = 0; PlayerInfo[playerid][pReportWarns] = 0; PlayerInfo[playerid][pFightStyle] = 0; PlayerInfo[playerid][pAccent] = 0; PlayerInfo[playerid][pCookies] = 0; PlayerInfo[playerid][pPhone] = 0; PlayerInfo[playerid][pJob] = JOB_NONE; PlayerInfo[playerid][pSecondJob] = JOB_NONE; PlayerInfo[playerid][pCrimes] = 0; PlayerInfo[playerid][pArrested] = 0; PlayerInfo[playerid][pWantedLevel] = 0; PlayerInfo[playerid][pMaterials] = 0; PlayerInfo[playerid][pWeed] = 0; PlayerInfo[playerid][pCocaine] = 0; PlayerInfo[playerid][pMeth] = 0; PlayerInfo[playerid][pPainkillers] = 0; PlayerInfo[playerid][pSeeds] = 0; PlayerInfo[playerid][pEphedrine] = 0; PlayerInfo[playerid][pMuriaticAcid] = 0; PlayerInfo[playerid][pBakingSoda] = 0; PlayerInfo[playerid][pCigars] = 0; PlayerInfo[playerid][pWalkieTalkie] = 0; PlayerInfo[playerid][pChannel] = 0; PlayerInfo[playerid][pRentingHouse] = 0; PlayerInfo[playerid][pSpraycans] = 0; PlayerInfo[playerid][pBoombox] = 0; PlayerInfo[playerid][pMP3Player] = 0; PlayerInfo[playerid][pPhonebook] = 0; PlayerInfo[playerid][pFishingRod] = 0; PlayerInfo[playerid][pFishingBait] = 0; PlayerInfo[playerid][pFishWeight] = 0; PlayerInfo[playerid][pComponents] = 0; PlayerInfo[playerid][pCourierSkill] = 0; PlayerInfo[playerid][pFishingSkill] = 0; PlayerInfo[playerid][pGuardSkill] = 0; PlayerInfo[playerid][pWeaponSkill] = 0; PlayerInfo[playerid][pMechanicSkill] = 0; PlayerInfo[playerid][pLawyerSkill] = 0; PlayerInfo[playerid][pSmugglerSkill] = 0; PlayerInfo[playerid][pToggleTextdraws] = 0; PlayerInfo[playerid][pToggleOOC] = 0; PlayerInfo[playerid][pTogglePhone] = 0; PlayerInfo[playerid][pToggleAdmin] = 0; PlayerInfo[playerid][pToggleHelper] = 0; PlayerInfo[playerid][pToggleNewbie] = 0; PlayerInfo[playerid][pToggleWT] = 0; PlayerInfo[playerid][pToggleRadio] = 0; PlayerInfo[playerid][pToggleVIP] = 0; PlayerInfo[playerid][pToggleMusic] = 0; PlayerInfo[playerid][pToggleFaction] = 0; PlayerInfo[playerid][pToggleGang] = 0; PlayerInfo[playerid][pToggleNews] = 0; PlayerInfo[playerid][pToggleGlobal] = 1; PlayerInfo[playerid][pToggleCam] = 0; PlayerInfo[playerid][pCarLicense] = 0; PlayerInfo[playerid][pVIPPackage] = 0; PlayerInfo[playerid][pVIPTime] = 0; PlayerInfo[playerid][pVIPCooldown] = 0; PlayerInfo[playerid][pWeapons] = 0; PlayerInfo[playerid][pAmmo] = 0; PlayerInfo[playerid][pFaction] = 0; PlayerInfo[playerid][pFactionRank] = 0; PlayerInfo[playerid][pGang] = 0; PlayerInfo[playerid][pGangRank] = 0; PlayerInfo[playerid][pDivision] = 0; PlayerInfo[playerid][pContracted] = 0; PlayerInfo[playerid][pContractBy] = 0; PlayerInfo[playerid][pBombs] = 0; PlayerInfo[playerid][pCompletedHits] = 0; PlayerInfo[playerid][pFailedHits] = 0; PlayerInfo[playerid][pReports] = 0; PlayerInfo[playerid][pHelpRequests] = 0; PlayerInfo[playerid][pSpeedometer] = 0; PlayerInfo[playerid][pFactionMod] = 0; PlayerInfo[playerid][pGangMod] = 0; PlayerInfo[playerid][pBanAppealer] = 0; PlayerInfo[playerid][pWeedPlanted] = 0; PlayerInfo[playerid][pWeedTime] = 0; PlayerInfo[playerid][pWeedGrams] = 0; PlayerInfo[playerid][pWeedX] = 0; PlayerInfo[playerid][pWeedY] = 0; PlayerInfo[playerid][pWeedZ] = 0; PlayerInfo[playerid][pWeedA] = 0; PlayerInfo[playerid][pInventoryUpgrade] = 0; PlayerInfo[playerid][pAddictUpgrade] = 0; PlayerInfo[playerid][pTraderUpgrade] = 0; PlayerInfo[playerid][pAssetUpgrade] = 0; PlayerInfo[playerid][pHPAmmo] = 0; PlayerInfo[playerid][pPoisonAmmo] = 0; PlayerInfo[playerid][pFMJAmmo] = 0; PlayerInfo[playerid][pAmmoType] = 0; PlayerInfo[playerid][pAmmoWeapon] = 0; PlayerInfo[playerid][pLastReport] = 0; PlayerInfo[playerid][pLastNewbie] = 0; PlayerInfo[playerid][pLastRequest] = 0; PlayerInfo[playerid][pLastPay] = 0; PlayerInfo[playerid][pLastRepair] = 0; PlayerInfo[playerid][pLastRefuel] = 0; PlayerInfo[playerid][pLastDrug] = 0; PlayerInfo[playerid][pLastSell] = 0; PlayerInfo[playerid][pLastEnter] = 0; PlayerInfo[playerid][pLastPress] = 0; PlayerInfo[playerid][pLastDeath] = 0; PlayerInfo[playerid][pLastDesync] = 0; PlayerInfo[playerid][pLastGlobal] = 0; PlayerInfo[playerid][pFPS] = 0; PlayerInfo[playerid][pDrunkLevel] = 0; PlayerInfo[playerid][pSpectating] = INVALID_PLAYER_ID; PlayerInfo[playerid][pAdminDuty] = 0; PlayerInfo[playerid][pActiveReport] = -1; PlayerInfo[playerid][pHospitalTime] = 0; PlayerInfo[playerid][pListen] = 0; PlayerInfo[playerid][pJoinedEvent] = 0; PlayerInfo[playerid][pPaintball] = 0; PlayerInfo[playerid][pDueling] = INVALID_PLAYER_ID; PlayerInfo[playerid][pEventTeam] = 0; PlayerInfo[playerid][pAwaitingClothing] = 0; PlayerInfo[playerid][pTutorial] = 0; PlayerInfo[playerid][pFreezeTimer] = -1; PlayerInfo[playerid][pNameChange][0] = 0; PlayerInfo[playerid][pHelpRequest][0] = 0; PlayerInfo[playerid][pAcceptedHelp] = 0; PlayerInfo[playerid][pHouseOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pGarageOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pBizOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pVestOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pCarOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pFactionOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pGangOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pFriskOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pTicketOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pLiveOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pLiveBroadcast] = INVALID_PLAYER_ID; PlayerInfo[playerid][pShakeOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pLandOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pSellOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pDefendOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pDiceOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pInviteOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pRobberyOffer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pEditType] = 0; PlayerInfo[playerid][pEditObject] = INVALID_OBJECT_ID; PlayerInfo[playerid][pFurniturePerms] = -1; PlayerInfo[playerid][pLandPerms] = -1; PlayerInfo[playerid][pPizzas] = 0; PlayerInfo[playerid][pLastPizza] = 0; PlayerInfo[playerid][pLastStuck] = 0; PlayerInfo[playerid][pLastUpdate] = 0; PlayerInfo[playerid][pLastLoad] = 0; PlayerInfo[playerid][pLastBet] = 0; PlayerInfo[playerid][pCP] = CHECKPOINT_NONE; PlayerInfo[playerid][pShipment] = -1; PlayerInfo[playerid][pFishTime] = 0; PlayerInfo[playerid][pUsedBait] = 0; PlayerInfo[playerid][pSmuggleMats] = 0; PlayerInfo[playerid][pSmuggleTime] = 0; PlayerInfo[playerid][pSmuggleDrugs] = 0; PlayerInfo[playerid][pRefuel] = INVALID_VEHICLE_ID; PlayerInfo[playerid][pCallLine] = INVALID_PLAYER_ID; PlayerInfo[playerid][pAFK] = 0; PlayerInfo[playerid][pAFKTime] = 0; PlayerInfo[playerid][pLoopAnim] = 0; PlayerInfo[playerid][pMiningTime] = 0; PlayerInfo[playerid][pMiningRock] = 0; PlayerInfo[playerid][pDrivingTest] = 0; PlayerInfo[playerid][pSweeping] = 0; PlayerInfo[playerid][pSpecialTag] = Text3D:INVALID_3DTEXT_ID; PlayerInfo[playerid][pTagType] = TAG_NONE; PlayerInfo[playerid][pVIPColor] = 0; PlayerInfo[playerid][pTaxiFare] = 0; PlayerInfo[playerid][pTaxiPassenger] = INVALID_PLAYER_ID; PlayerInfo[playerid][pTaxiBill] = 0; PlayerInfo[playerid][pTaxiTime] = 0; PlayerInfo[playerid][pFaction] = -1; PlayerInfo[playerid][pFactionRank] = 0; PlayerInfo[playerid][pGang] = -1; PlayerInfo[playerid][pGangRank] = 0; PlayerInfo[playerid][pDuty] = 0; PlayerInfo[playerid][pBackup] = 0; PlayerInfo[playerid][pTazer] = 0; PlayerInfo[playerid][pTazedTime] = 0; PlayerInfo[playerid][pCuffed] = 0; PlayerInfo[playerid][pDraggedBy] = INVALID_PLAYER_ID; PlayerInfo[playerid][pSkinSelected] = -1; PlayerInfo[playerid][pFirstAid] = 0; PlayerInfo[playerid][pDelivered] = 0; PlayerInfo[playerid][pPlantedBomb] = 0; PlayerInfo[playerid][pBombObject] = INVALID_OBJECT_ID; PlayerInfo[playerid][pContractTaken] = INVALID_PLAYER_ID; PlayerInfo[playerid][pSpamTime] = 0; PlayerInfo[playerid][pMuted] = 0; PlayerInfo[playerid][pBoomboxPlaced] = 0; PlayerInfo[playerid][pBoomboxObject] = INVALID_OBJECT_ID; PlayerInfo[playerid][pBoomboxListen] = INVALID_PLAYER_ID; PlayerInfo[playerid][pZonePickups][0] = -1; PlayerInfo[playerid][pZonePickups][1] = -1; PlayerInfo[playerid][pZonePickups][2] = -1; PlayerInfo[playerid][pZonePickups][3] = -1; PlayerInfo[playerid][pZoneID] = -1; PlayerInfo[playerid][pZoneCreation] = 0; PlayerInfo[playerid][pShowLands] = 0; PlayerInfo[playerid][pShowTurfs] = 0; PlayerInfo[playerid][pStreamType] = MUSIC_NONE; PlayerInfo[playerid][pFreeNamechange] = 0; PlayerInfo[playerid][pVehicleKeys] = INVALID_VEHICLE_ID; PlayerInfo[playerid][pCurrentWeapon] = 0; PlayerInfo[playerid][pCurrentAmmo] = 0; PlayerInfo[playerid][pCurrentVehicle] = 0; PlayerInfo[playerid][pVehicleCount] = 0; PlayerInfo[playerid][pACWarns] = 0; PlayerInfo[playerid][pACTime] = 0; PlayerInfo[playerid][pArmorTime] = 0; PlayerInfo[playerid][pACFired] = 0; PlayerInfo[playerid][pWeedObject] = INVALID_OBJECT_ID; PlayerInfo[playerid][pPickPlant] = INVALID_PLAYER_ID; PlayerInfo[playerid][pPickTime] = 0; PlayerInfo[playerid][pCookMeth] = 0; PlayerInfo[playerid][pCookTime] = 0; PlayerInfo[playerid][pCookGrams] = 0; PlayerInfo[playerid][pDrugsUsed] = 0; PlayerInfo[playerid][pDrugsTime] = 0; PlayerInfo[playerid][pBandana] = 0; PlayerInfo[playerid][pCapturingPoint] = -1; PlayerInfo[playerid][pCaptureTime] = 0; PlayerInfo[playerid][pWatchingIntro] = 0; PlayerInfo[playerid][pLoginCamera] = 0; PlayerInfo[playerid][pPoisonTime] = 0; PlayerInfo[playerid][pJetpack] = 0; PlayerInfo[playerid][pWatchOn] = 0; PlayerInfo[playerid][pGPSOn] = 0; PlayerInfo[playerid][pTextFrom] = INVALID_PLAYER_ID; PlayerInfo[playerid][pWhisperFrom] = INVALID_PLAYER_ID; PlayerInfo[playerid][pMechanicCall] = 0; PlayerInfo[playerid][pTaxiCall] = 0; PlayerInfo[playerid][pEmergencyCall] = 0; PlayerInfo[playerid][pClip] = 0; PlayerInfo[playerid][pReloading] = 0; PlayerInfo[playerid][pFindTime] = 0; PlayerInfo[playerid][pFindPlayer] = INVALID_PLAYER_ID; PlayerInfo[playerid][pRobCash] = 0; PlayerInfo[playerid][pLootTime] = 0; for(new i = 0; i < MAX_PLAYERS; i ++) { chattingWith[playerid]{i} = false; } for(new i = 0; i < 13; i ++) { PlayerInfo[playerid][pWeapons][i] = 0; PlayerInfo[playerid][pTempWeapons][i] = 0; } for(new i = 0; i < 3; i ++) { MarkedPositions[playerid][i][mPosX] = 0.0; MarkedPositions[playerid][i][mPosY] = 0.0; MarkedPositions[playerid][i][mPosZ] = 0.0; } for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++) { ClothingInfo[playerid][i][cExists] = 0; ClothingInfo[playerid][i][cID] = 0; ClothingInfo[playerid][i][cName] = 0; ClothingInfo[playerid][i][cModel] = 0; ClothingInfo[playerid][i][cBone] = 0; ClothingInfo[playerid][i][cAttached] = 0; ClothingInfo[playerid][i][cAttachedIndex] = -1; } // Reset the player's client attributes. for(new i = 0; i < MAX_PLAYER_ATTACHED_OBJECTS; i ++) { if(IsPlayerAttachedObjectSlotUsed(playerid, i)) { RemovePlayerAttachedObject(playerid, i); } } ResetPlayerWeapons(playerid); StopAudioStreamForPlayer(playerid); SetPlayerColor(playerid, 0xFFFFFF00); // House objects RemoveBuildingForPlayer(playerid, 14862, 245.5547, 300.8594, 998.8359, 0.25); // int 1 RemoveBuildingForPlayer(playerid, 1740, 243.8828, 301.9766, 998.2344, 0.25); RemoveBuildingForPlayer(playerid, 14861, 245.7578, 302.2344, 998.5469, 0.25); RemoveBuildingForPlayer(playerid, 14860, 246.5156, 301.5859, 1000.0000, 0.25); RemoveBuildingForPlayer(playerid, 14864, 246.1875, 303.1094, 998.2656, 0.25); RemoveBuildingForPlayer(playerid, 1734, 246.7109, 303.8750, 1002.1172, 0.25); RemoveBuildingForPlayer(playerid, 14863, 246.9844, 303.5781, 998.7500, 0.25); RemoveBuildingForPlayer(playerid, 2103, 248.4063, 300.5625, 999.3047, 0.25); RemoveBuildingForPlayer(playerid, 2088, 248.4922, 304.3516, 998.2266, 0.25); RemoveBuildingForPlayer(playerid, 1741, 248.4844, 306.1250, 998.1406, 0.25); RemoveBuildingForPlayer(playerid, 1741, 248.8672, 301.9609, 998.1406, 0.25); RemoveBuildingForPlayer(playerid, 1744, 250.1016, 301.9609, 999.4531, 0.25); RemoveBuildingForPlayer(playerid, 1744, 250.1016, 301.9609, 1000.1563, 0.25); /*RemoveBuildingForPlayer(playerid, 2251, 266.4531, 303.3672, 998.9844, 0.25); // int 2 RemoveBuildingForPlayer(playerid, 14867, 270.2813, 302.5547, 999.6797, 0.25); RemoveBuildingForPlayer(playerid, 1720, 272.9063, 304.7891, 998.1641, 0.25); RemoveBuildingForPlayer(playerid, 14870, 273.1641, 303.1719, 1000.9141, 0.25); RemoveBuildingForPlayer(playerid, 2251, 273.9922, 303.3672, 998.9844, 0.25); RemoveBuildingForPlayer(playerid, 14868, 274.1328, 304.5078, 1001.1953, 0.25); RemoveBuildingForPlayer(playerid, 948, 266.5703, 306.4453, 998.1406, 0.25); RemoveBuildingForPlayer(playerid, 14866, 270.1172, 307.6094, 998.7578, 0.25); RemoveBuildingForPlayer(playerid, 14869, 273.8125, 305.0156, 998.9531, 0.25);*/ RemoveBuildingForPlayer(playerid, 15039, 2232.3438, -1106.7422, 1049.7500, 0.25); // RemoveBuildingForPlayer(playerid, 15038, 2235.2891, -1108.1328, 1051.2656, 0.25); RemoveBuildingForPlayer(playerid, 15035, 2205.9375, -1073.9922, 1049.4844, 0.25); RemoveBuildingForPlayer(playerid, 15028, 2263.1250, -1138.2422, 1049.8438, 0.25); RemoveBuildingForPlayer(playerid, 15026, 2264.9063, -1137.7656, 1051.3594, 0.25); RemoveBuildingForPlayer(playerid, 2123, 2312.9609, -1145.0703, 1050.3203, 0.25); RemoveBuildingForPlayer(playerid, 2123, 2314.2969, -1146.3125, 1050.3203, 0.25); RemoveBuildingForPlayer(playerid, 2123, 2315.4219, -1145.0703, 1050.3203, 0.25); RemoveBuildingForPlayer(playerid, 2086, 2314.2734, -1144.8984, 1050.0859, 0.25); RemoveBuildingForPlayer(playerid, 2123, 2314.2969, -1143.6250, 1050.3203, 0.25); RemoveBuildingForPlayer(playerid, 2281, 2318.7813, -1145.4609, 1054.5938, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1144.0859, 1049.6953, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2335.3594, -1144.0703, 1049.6719, 0.25); RemoveBuildingForPlayer(playerid, 2135, 2336.3516, -1144.0781, 1049.6719, 0.25); RemoveBuildingForPlayer(playerid, 2305, 2337.3203, -1144.0781, 1049.6719, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1143.1016, 1049.6953, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2337.3203, -1143.0938, 1049.6719, 0.25); RemoveBuildingForPlayer(playerid, 1703, 2322.2266, -1142.4766, 1049.4766, 0.25); RemoveBuildingForPlayer(playerid, 1822, 2323.9297, -1142.2578, 1049.4844, 0.25); RemoveBuildingForPlayer(playerid, 1741, 2312.6484, -1140.7891, 1053.3750, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1142.1094, 1049.6953, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1141.1172, 1049.6953, 0.25); RemoveBuildingForPlayer(playerid, 2079, 2334.4219, -1140.9688, 1050.3359, 0.25); RemoveBuildingForPlayer(playerid, 1703, 2326.5234, -1140.5703, 1049.4766, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2337.3203, -1142.1094, 1049.6719, 0.25); RemoveBuildingForPlayer(playerid, 2139, 2337.3125, -1141.1094, 1049.6641, 0.25); RemoveBuildingForPlayer(playerid, 2088, 2338.4531, -1141.3672, 1053.2734, 0.25); RemoveBuildingForPlayer(playerid, 2270, 2340.2734, -1141.7109, 1054.5391, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1140.1328, 1049.6953, 0.25); RemoveBuildingForPlayer(playerid, 1703, 2323.4375, -1139.5469, 1049.4766, 0.25); RemoveBuildingForPlayer(playerid, 2079, 2333.3281, -1139.8672, 1050.3359, 0.25); RemoveBuildingForPlayer(playerid, 2115, 2334.4297, -1139.6250, 1049.7109, 0.25); RemoveBuildingForPlayer(playerid, 2079, 2335.3672, -1139.8750, 1050.3359, 0.25); RemoveBuildingForPlayer(playerid, 2303, 2337.3281, -1140.1172, 1049.6719, 0.25); RemoveBuildingForPlayer(playerid, 2090, 2309.5156, -1139.3438, 1053.4219, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1139.1406, 1049.6953, 0.25); RemoveBuildingForPlayer(playerid, 2079, 2333.3281, -1138.8281, 1050.3359, 0.25); RemoveBuildingForPlayer(playerid, 2079, 2335.3672, -1138.8359, 1050.3359, 0.25); RemoveBuildingForPlayer(playerid, 2298, 2336.5391, -1138.7891, 1053.2813, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1138.1563, 1049.6953, 0.25); RemoveBuildingForPlayer(playerid, 2136, 2337.3281, -1138.1328, 1049.6719, 0.25); RemoveBuildingForPlayer(playerid, 2240, 2319.2500, -1137.8750, 1050.0156, 0.25); RemoveBuildingForPlayer(playerid, 2240, 2329.5000, -1137.8750, 1050.0156, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1137.1641, 1049.6953, 0.25); RemoveBuildingForPlayer(playerid, 2079, 2334.4219, -1137.5859, 1050.3359, 0.25); RemoveBuildingForPlayer(playerid, 2139, 2337.3125, -1137.1484, 1049.6641, 0.25); RemoveBuildingForPlayer(playerid, 2088, 2310.6641, -1136.3047, 1053.3672, 0.25); RemoveBuildingForPlayer(playerid, 2257, 2320.4141, -1134.6328, 1053.8281, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1136.1719, 1049.6953, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2331.3359, -1135.1875, 1049.6953, 0.25); RemoveBuildingForPlayer(playerid, 2254, 2328.1484, -1134.6172, 1054.0625, 0.25); RemoveBuildingForPlayer(playerid, 2281, 2335.2656, -1136.4063, 1054.7266, 0.25); RemoveBuildingForPlayer(playerid, 2106, 2336.5156, -1135.0156, 1053.8047, 0.25); RemoveBuildingForPlayer(playerid, 2271, 2337.8047, -1135.3516, 1054.7031, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2337.3203, -1136.1641, 1049.6719, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2337.3203, -1135.1797, 1049.6719, 0.25); RemoveBuildingForPlayer(playerid, 2106, 2339.2031, -1135.0156, 1053.8047, 0.25); RemoveBuildingForPlayer(playerid, 1741, 2261.6953, -1223.0781, 1048.0156, 0.25); RemoveBuildingForPlayer(playerid, 2088, 2258.1406, -1220.5859, 1048.0078, 0.25); RemoveBuildingForPlayer(playerid, 2090, 2258.5938, -1221.5469, 1048.0625, 0.25); RemoveBuildingForPlayer(playerid, 2528, 2254.4063, -1218.2734, 1048.0234, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2247.5547, -1213.9219, 1048.0156, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2247.5547, -1212.9375, 1048.0156, 0.25); RemoveBuildingForPlayer(playerid, 2121, 2250.3047, -1213.9375, 1048.5234, 0.25); RemoveBuildingForPlayer(playerid, 2526, 2252.4297, -1215.4531, 1048.0391, 0.25); RemoveBuildingForPlayer(playerid, 2523, 2254.1953, -1215.4531, 1048.0156, 0.25); RemoveBuildingForPlayer(playerid, 2297, 2255.4219, -1213.5313, 1048.0156, 0.25); RemoveBuildingForPlayer(playerid, 2248, 2262.3906, -1215.5469, 1048.6094, 0.25); RemoveBuildingForPlayer(playerid, 1816, 2261.4141, -1213.4531, 1048.0078, 0.25); RemoveBuildingForPlayer(playerid, 2249, 2247.2969, -1212.1641, 1049.6250, 0.25); RemoveBuildingForPlayer(playerid, 2249, 2247.2969, -1208.8594, 1049.6250, 0.25); RemoveBuildingForPlayer(playerid, 2139, 2247.5625, -1211.9531, 1048.0078, 0.25); RemoveBuildingForPlayer(playerid, 2136, 2247.5469, -1210.9688, 1048.0156, 0.25); RemoveBuildingForPlayer(playerid, 2303, 2247.5469, -1208.9844, 1048.0156, 0.25); RemoveBuildingForPlayer(playerid, 2138, 2247.5547, -1207.9766, 1048.0156, 0.25); RemoveBuildingForPlayer(playerid, 2305, 2247.5547, -1206.9922, 1048.0156, 0.25); RemoveBuildingForPlayer(playerid, 2109, 2250.2813, -1212.2500, 1048.4141, 0.25); RemoveBuildingForPlayer(playerid, 2121, 2249.2344, -1211.4531, 1048.5234, 0.25); RemoveBuildingForPlayer(playerid, 2121, 2250.3047, -1210.8984, 1048.5234, 0.25); RemoveBuildingForPlayer(playerid, 2135, 2248.5234, -1206.9922, 1048.0156, 0.25); RemoveBuildingForPlayer(playerid, 2319, 2250.3438, -1206.9609, 1048.0078, 0.25); RemoveBuildingForPlayer(playerid, 1760, 2261.4609, -1212.0625, 1048.0078, 0.25); RemoveBuildingForPlayer(playerid, 2126, 2258.1094, -1210.3750, 1048.0156, 0.25); RemoveBuildingForPlayer(playerid, 15044, 2255.0938, -1209.7813, 1048.0313, 0.25); RemoveBuildingForPlayer(playerid, 2247, 2258.4766, -1209.7891, 1048.9922, 0.25); RemoveBuildingForPlayer(playerid, 2099, 2262.8047, -1208.4922, 1048.0156, 0.25); RemoveBuildingForPlayer(playerid, 2254, 2254.1172, -1206.5000, 1050.7578, 0.25); RemoveBuildingForPlayer(playerid, 2240, 2254.6328, -1207.2734, 1048.5625, 0.25); RemoveBuildingForPlayer(playerid, 2252, 2256.2109, -1206.1016, 1048.8281, 0.25); RemoveBuildingForPlayer(playerid, 2235, 2256.2188, -1206.8594, 1048.0078, 0.25); RemoveBuildingForPlayer(playerid, 1760, 2257.6172, -1207.7266, 1048.0078, 0.25); RemoveBuildingForPlayer(playerid, 2235, 2261.4297, -1206.2031, 1048.0078, 0.25); RemoveBuildingForPlayer(playerid, 2252, 2262.1172, -1206.1016, 1048.8281, 0.25); /*RemoveBuildingForPlayer(playerid, 1734, 2452.0313, -1702.0234, 1015.9688, 0.25); RemoveBuildingForPlayer(playerid, 14742, 2451.9063, -1701.1875, 1014.8594, 0.25); RemoveBuildingForPlayer(playerid, 14741, 2447.4219, -1693.4531, 1012.4766, 0.25); RemoveBuildingForPlayer(playerid, 14761, 2449.9609, -1690.8438, 1014.0547, 0.25); RemoveBuildingForPlayer(playerid, 2241, 2459.3828, -1691.4766, 1013.0078, 0.25); RemoveBuildingForPlayer(playerid, 14745, 2460.2422, -1695.1016, 1012.9453, 0.25);*/ RemoveBuildingForPlayer(playerid, 2249, 2251.3594, -1218.1797, 1048.6953, 0.25); RemoveBuildingForPlayer(playerid, 15049, 2334.3281, -1139.5859, 1051.1953, 0.25); RemoveBuildingForPlayer(playerid, 15045, 2324.4297, -1143.3125, 1049.6016, 0.25); // Miner objects RemoveBuildingForPlayer(playerid, 5967, 1259.4375, -1246.8125, 17.1094, 0.25); RemoveBuildingForPlayer(playerid, 5857, 1259.4375, -1246.8125, 17.1094, 0.25); // GPS PlayerInfo[playerid][pText][0] = CreatePlayerTextDraw(playerid, 88.000000, 323.000000, "Loading..."); PlayerTextDrawAlignment(playerid, PlayerInfo[playerid][pText][0], 2); PlayerTextDrawBackgroundColor(playerid, PlayerInfo[playerid][pText][0], 255); PlayerTextDrawFont(playerid, PlayerInfo[playerid][pText][0], 1); PlayerTextDrawLetterSize(playerid, PlayerInfo[playerid][pText][0], 0.260000, 1.300000); PlayerTextDrawColor(playerid, PlayerInfo[playerid][pText][0], -1); PlayerTextDrawSetOutline(playerid, PlayerInfo[playerid][pText][0], 1); PlayerTextDrawSetProportional(playerid, PlayerInfo[playerid][pText][0], 1); // Speedometer PlayerInfo[playerid][pText][1] = CreatePlayerTextDraw(playerid, 552.000000, 382.000000, "_"); PlayerTextDrawBackgroundColor(playerid, PlayerInfo[playerid][pText][1], 255); PlayerTextDrawFont(playerid, PlayerInfo[playerid][pText][1], 1); PlayerTextDrawLetterSize(playerid, PlayerInfo[playerid][pText][1], 0.519999, 5.500000); PlayerTextDrawColor(playerid, PlayerInfo[playerid][pText][1], -1); PlayerTextDrawSetOutline(playerid, PlayerInfo[playerid][pText][1], 0); PlayerTextDrawSetProportional(playerid, PlayerInfo[playerid][pText][1], 1); PlayerTextDrawSetShadow(playerid, PlayerInfo[playerid][pText][1], 1); PlayerTextDrawUseBox(playerid, PlayerInfo[playerid][pText][1], 1); PlayerTextDrawBoxColor(playerid, PlayerInfo[playerid][pText][1], 85); PlayerTextDrawTextSize(playerid, PlayerInfo[playerid][pText][1], 628.000000, 0.000000); PlayerInfo[playerid][pText][2] = CreatePlayerTextDraw(playerid, 554.000000, 384.000000, "~b~~h~Speed:~w~ 100 km/h~n~~b~~h~Fuel:~w~ 100%~n~~b~~h~Damage:~w~ 50%~n~~b~~h~Doors:~w~ Locked"); PlayerTextDrawBackgroundColor(playerid, PlayerInfo[playerid][pText][2], 255); PlayerTextDrawFont(playerid, PlayerInfo[playerid][pText][2], 2); PlayerTextDrawLetterSize(playerid, PlayerInfo[playerid][pText][2], 0.169999, 1.200000); PlayerTextDrawColor(playerid, PlayerInfo[playerid][pText][2], -1); PlayerTextDrawSetOutline(playerid, PlayerInfo[playerid][pText][2], 1); PlayerTextDrawSetProportional(playerid, PlayerInfo[playerid][pText][2], 1); // HP & armor PlayerInfo[playerid][pText][3] = CreatePlayerTextDraw(playerid, 577.000000, 43.500000, "100"); PlayerTextDrawAlignment(playerid, PlayerInfo[playerid][pText][3], 2); PlayerTextDrawBackgroundColor(playerid, PlayerInfo[playerid][pText][3], 255); PlayerTextDrawFont(playerid, PlayerInfo[playerid][pText][3], 2); PlayerTextDrawLetterSize(playerid, PlayerInfo[playerid][pText][3], 0.220000, 1.100000); PlayerTextDrawColor(playerid, PlayerInfo[playerid][pText][3], -1); PlayerTextDrawSetOutline(playerid, PlayerInfo[playerid][pText][3], 1); PlayerTextDrawSetProportional(playerid, PlayerInfo[playerid][pText][3], 1); PlayerInfo[playerid][pText][4] = CreatePlayerTextDraw(playerid, 577.000000, 65.500000, "100"); PlayerTextDrawAlignment(playerid, PlayerInfo[playerid][pText][4], 2); PlayerTextDrawBackgroundColor(playerid, PlayerInfo[playerid][pText][4], 255); PlayerTextDrawFont(playerid, PlayerInfo[playerid][pText][4], 2); PlayerTextDrawLetterSize(playerid, PlayerInfo[playerid][pText][4], 0.220000, 1.100000); PlayerTextDrawColor(playerid, PlayerInfo[playerid][pText][4], -1); PlayerTextDrawSetOutline(playerid, PlayerInfo[playerid][pText][4], 1); PlayerTextDrawSetProportional(playerid, PlayerInfo[playerid][pText][4], 1); // Ammo notification PlayerInfo[playerid][pText][5] = CreatePlayerTextDraw(playerid, 521.000000, 63.000000, "30"); PlayerTextDrawAlignment(playerid, PlayerInfo[playerid][pText][5], 2); PlayerTextDrawBackgroundColor(playerid, PlayerInfo[playerid][pText][5], 255); PlayerTextDrawFont(playerid, PlayerInfo[playerid][pText][5], 1); PlayerTextDrawLetterSize(playerid, PlayerInfo[playerid][pText][5], 0.270000, 1.300000); PlayerTextDrawColor(playerid, PlayerInfo[playerid][pText][5], -1446714113); PlayerTextDrawSetOutline(playerid, PlayerInfo[playerid][pText][5], 1); PlayerTextDrawSetProportional(playerid, PlayerInfo[playerid][pText][5], 1); Streamer_ToggleIdleUpdate(playerid, true); GetPlayerName(playerid, PlayerInfo[playerid][pUsername], MAX_PLAYER_NAME); gConnections++; SaveServerInfo(); return 1; } public OnPlayerDisconnect(playerid, reason) { if(IsPlayerNPC(playerid)) return 1; foreach(new i : Player) { if(PlayerInfo[i][pSpectating] == playerid) { SendClientMessageEx(i, COLOR_ORANGE, "You are no longer spectating %s (ID %i).", GetPlayerRPName(PlayerInfo[i][pSpectating]), PlayerInfo[i][pSpectating]); PlayerInfo[i][pSpectating] = INVALID_PLAYER_ID; SetPlayerToSpawn(i); } if(PlayerInfo[i][pHouseOffer] == playerid) { PlayerInfo[i][pHouseOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pGarageOffer] == playerid) { PlayerInfo[i][pGarageOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pBizOffer] == playerid) { PlayerInfo[i][pBizOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pVestOffer] == playerid) { PlayerInfo[i][pVestOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pCarOffer] == playerid) { PlayerInfo[i][pCarOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pFactionOffer] == playerid) { PlayerInfo[i][pFactionOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pGangOffer] == playerid) { PlayerInfo[i][pGangOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pFriskOffer] == playerid) { PlayerInfo[i][pFriskOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pTicketOffer] == playerid) { PlayerInfo[i][pTicketOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pLiveOffer] == playerid) { PlayerInfo[i][pLiveOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pLiveBroadcast] == playerid) { PlayerInfo[i][pLiveBroadcast] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pShakeOffer] == playerid) { PlayerInfo[i][pShakeOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pLandOffer] == playerid) { PlayerInfo[i][pLandOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pSellOffer] == playerid) { PlayerInfo[i][pSellOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pDefendOffer] == playerid) { PlayerInfo[i][pDefendOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pDiceOffer] == playerid) { PlayerInfo[i][pDiceOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pInviteOffer] == playerid) { PlayerInfo[i][pInviteOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pRobberyOffer] == playerid) { PlayerInfo[i][pRobberyOffer] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pTextFrom] == playerid) { PlayerInfo[i][pTextFrom] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pWhisperFrom] == playerid) { PlayerInfo[i][pWhisperFrom] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pFindPlayer] == playerid) { PlayerInfo[i][pFindPlayer] = INVALID_PLAYER_ID; } if(chattingWith[i]{playerid}) { SendClientMessageEx(i, COLOR_YELLOW, "Your chat with %s (ID %i) has ended as they left the server.", GetPlayerRPName(playerid), playerid); chattingWith[i]{playerid} = false; } if(PlayerInfo[i][pActiveReport] >= 0 && (ReportInfo[PlayerInfo[i][pActiveReport]][rHandledBy] == playerid || ReportInfo[PlayerInfo[i][pActiveReport]][rReporter] == playerid)) { if(ReportInfo[PlayerInfo[i][pActiveReport]][rHandledBy] == playerid) SendClientMessage(i, COLOR_GREEN, "The player who made the report has left the server."); else SendClientMessage(i, COLOR_GREEN, "The admin who accepted the report has left the server."); ReportInfo[PlayerInfo[i][pActiveReport]][rExists] = 0; PlayerInfo[i][pActiveReport] = -1; } if(PlayerInfo[i][pDueling] == playerid) { SendClientMessage(i, COLOR_WHITE, "Your duel target has left the server."); PlayerInfo[i][pDueling] = INVALID_PLAYER_ID; SetPlayerToSpawn(i); } if(PlayerInfo[i][pContractTaken] == playerid) { SendClientMessage(i, COLOR_YELLOW, "Your contract target has disconnected from the server."); PlayerInfo[i][pContractTaken] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pDraggedBy] == playerid) { SendClientMessage(i, COLOR_AQUA, "The person dragging you has disconnected. You are free!"); PlayerInfo[i][pDraggedBy] = INVALID_PLAYER_ID; } if(PlayerInfo[i][pTaxiPassenger] == playerid) { CancelTaxiRide(i); } if(PlayerInfo[i][pCallLine] == playerid) { HangupCall(PlayerInfo[i][pCallLine], HANGUP_DROPPED); } } if(PlayerInfo[playerid][pLogged]) { SavePlayerVariables(playerid); } if(PlayerInfo[playerid][pActiveReport] >= 0) { cmd_cr(playerid, "\1"); } if(PlayerInfo[playerid][pTutorial]) { KillTimer(PlayerInfo[playerid][pTutorialTimer]); } if(IsValidDynamicObject(PlayerInfo[playerid][pEditObject])) { DestroyDynamicObject(PlayerInfo[playerid][pEditObject]); } if(IsValidDynamic3DTextLabel(PlayerInfo[playerid][pSpecialTag])) { DestroyDynamic3DTextLabel(PlayerInfo[playerid][pSpecialTag]); } if(IsValidDynamicObject(PlayerInfo[playerid][pBombObject])) { DestroyDynamicObject(PlayerInfo[playerid][pBombObject]); } if(IsValidDynamicObject(PlayerInfo[playerid][pWeedObject])) { DestroyDynamicObject(PlayerInfo[playerid][pWeedObject]); } if(PlayerInfo[playerid][pAdminDuty]) { SetPlayerName(playerid, PlayerInfo[playerid][pUsername]); } if(PlayerInfo[playerid][pBoomboxPlaced]) { DestroyBoombox(playerid); } if(PlayerInfo[playerid][pZoneID] >= 0) { GangZoneDestroy(PlayerInfo[playerid][pZoneID]); } if(RobberyInfo[rPlanning] || RobberyInfo[rStarted]) { RemoveFromBankRobbery(playerid); } for(new i = 0; i < 4; i ++) { if(IsValidDynamicPickup(PlayerInfo[playerid][pZonePickups][i])) { DestroyDynamicPickup(PlayerInfo[playerid][pZonePickups][i]); } } if(PlayerInfo[playerid][pLogged]) { for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && IsVehicleOwner(playerid, i) && VehicleInfo[i][vTimer] == -1) { VehicleInfo[i][vTimer] = SetTimerEx("DespawnTimer", 600000, false, "i", i); } } } for(new i = 0; i < MAX_REPORTS; i ++) { if(ReportInfo[i][rExists] && ReportInfo[i][rReporter] == playerid) { ReportInfo[i][rExists] = 0; } } for(new i = 0; i < MAX_POINTS; i ++) { if(PointInfo[i][pExists] && PointInfo[i][pCaptureTime] > 0 && PointInfo[i][pCapturer] == playerid) { SendProximityMessage(i, 20.0, COLOR_RED, "(( %s disconnected and therefore failed to capture the point. ))", GetPlayerRPName(playerid)); PointInfo[i][pCapturer] = INVALID_PLAYER_ID; PointInfo[i][pCaptureTime] = 0; } } for(new i = 0; i < MAX_TURFS; i ++) { if(TurfInfo[i][tExists] && TurfInfo[i][tCaptureTime] > 0 && TurfInfo[i][tCapturer] == playerid) { if(reason == 0) { if(PlayerInfo[playerid][pGang] >= 0) { GangInfo[PlayerInfo[playerid][pGang]][gTurfTokens]++; SendGangMessage(PlayerInfo[playerid][pGang], COLOR_YELLOW, "%s crashed while attempting to capture a turf. 1 turf token was refunded to your gang.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET turftokens = turftokens + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); } else if(PlayerInfo[playerid][pFaction] >= 0) { FactionInfo[PlayerInfo[playerid][pFaction]][fTurfTokens]++; SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_YELLOW, "%s crashed while attempting to capture a turf. 1 turf token was refunded to your faction.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET turftokens = turftokens + 1 WHERE id = %i", PlayerInfo[playerid][pFaction]); mysql_tquery(connectionID, queryBuffer); } } SendTurfMessage(i, COLOR_RED, "(( %s disconnected and therefore failed to capture the turf. ))", GetPlayerRPName(playerid)); TurfInfo[i][tCapturer] = INVALID_PLAYER_ID; TurfInfo[i][tCaptureTime] = 0; ReloadTurf(i); } } switch(reason) { case 0: SendProximityMessage(playerid, 20.0, COLOR_GREY3, "** %s has left the server. (Timeout)", GetPlayerRPName(playerid)); case 1: SendProximityMessage(playerid, 20.0, COLOR_GREY3, "** %s has left the server. (Leaving)", GetPlayerRPName(playerid)); case 2: SendProximityMessage(playerid, 20.0, COLOR_GREY3, "** %s has left the server. (Kicked)", GetPlayerRPName(playerid)); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM shots WHERE (playerid = %i) OR (hitid = %i AND hittype = 1)", playerid, playerid); mysql_tquery(connectionID, queryBuffer); return 1; } public OnPlayerRequestClass(playerid, classid) { if(PlayerInfo[playerid][pKicked]) return 0; if(IsPlayerNPC(playerid)) return 1; if(!PlayerInfo[playerid][pLogged]) { ClearChat(playerid); SendClientMessage(playerid, COLOR_LIGHTRED, "[NOTICE] {AFAFAF}This server contains themes suitable for mature audiences only."); TogglePlayerSpectating(playerid, 1); SetPlayerColor(playerid, 0xFFFFFF00); // Due to a SA-MP bug, you can't apply camera coordinates directly after enabling spectator mode (to hide HUD). // In this case we'll use a timer to defer this action. #if defined SERVER_INTRO ShowMainMenuCamera(playerid, 1); #else SetTimerEx("ShowMainMenuCamera", 400, false, "i", playerid); #endif } return 1; } public OnPlayerSpawn(playerid) { if(PlayerInfo[playerid][pKicked]) return 0; if(PlayerInfo[playerid][pSetup]) { if(PlayerInfo[playerid][pTutorial]) { KillTimer(PlayerInfo[playerid][pTutorialTimer]); PlayerInfo[playerid][pTutorial] = 0; } SetPlayerPos(playerid, 1456.410888, -1721.856567, -24.590217); SetPlayerCameraPos(playerid, 1456.410888, -1721.856567, 34.590217); SetPlayerCameraLookAt(playerid, 1456.691162, -1722.251342, 34.429306); TogglePlayerControllable(playerid, false); ShowDialogToPlayer(playerid, DIALOG_GENDER); StopAudioStreamForPlayer(playerid); SendClientMessage(playerid, COLOR_WHITE, "** Your account has been registered. Before you can play on our server, you must setup your character."); SendClientMessage(playerid, COLOR_WHITE, "** After character setup you'll watch a quick tutorial. Please choose your character's gender now:"); } else if(PlayerInfo[playerid][pJailTime] > 0) { SetPlayerInJail(playerid); if(PlayerInfo[playerid][pJailType] == 2) { SendClientMessageEx(playerid, COLOR_LIGHTRED, "** You were placed in admin prison by %s, reason: %s", PlayerInfo[playerid][pPrisonedBy], PlayerInfo[playerid][pPrisonReason]); } else { SendClientMessage(playerid, COLOR_LIGHTRED, "** You haven't completed your jail sentence yet."); } } else if(PlayerInfo[playerid][pPaintball]) { SetPlayerInPaintball(playerid); } else { PlayerInfo[playerid][pJoinedEvent] = 0; if(PlayerInfo[playerid][pInjured]) { SetPlayerHealth(playerid, 100.0); SetPlayerArmour(playerid, 0.0); ApplyAnimation(playerid, "PED", "KO_skid_front", 4.1, 0, 0, 0, 1, 0, 1); GameTextForPlayer(playerid, "~r~Injured~n~~w~/call 911 or~n~/accept death", 5000, 3); SendClientMessage(playerid, COLOR_DOCTOR, "You are injured and losing blood. /call 911 for medical attention."); SendClientMessage(playerid, COLOR_DOCTOR, "If you wish to accept your death and go to hospital use /accept death."); } else if(PlayerInfo[playerid][pHospital]) { SetPlayerInHospital(playerid); ResetPlayerWeaponsEx(playerid); } else { SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]); SetScriptArmour(playerid, PlayerInfo[playerid][pArmor]); } if(!PlayerInfo[playerid][pHospital]) { if(PlayerInfo[playerid][pDueling] != INVALID_PLAYER_ID) { PlayerInfo[PlayerInfo[playerid][pDueling]][pDueling] = INVALID_PLAYER_ID; PlayerInfo[playerid][pDueling] = INVALID_PLAYER_ID; } SetPlayerPos(playerid, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]); SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPosA]); SetPlayerInterior(playerid, PlayerInfo[playerid][pInterior]); SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pWorld]); SetPlayerWeapons(playerid); if(!PlayerInfo[playerid][pInterior] && PlayerInfo[playerid][pLoginCamera] && !PlayerInfo[playerid][pToggleCam]) { SetPlayerCameraLookAt(playerid, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]); SetPlayerCameraPos(playerid, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ] + 100.0); TogglePlayerControllable(playerid, 0); SetTimerEx("GrandTheftAutoV", 2000, false, "iifffffff", playerid, 1, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ], PlayerInfo[playerid][pPosA], PlayerInfo[playerid][pCameraX], PlayerInfo[playerid][pCameraY], PlayerInfo[playerid][pCameraZ]); } else { SetCameraBehindPlayer(playerid); } } } SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightStyle]); SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 998); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 998); SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 998); SetPlayerClothing(playerid); PreloadPlayerAnims(playerid); return 1; } public OnPlayerDeath(playerid, killerid, reason) { if(gettime() - PlayerInfo[playerid][pLastDeath] < 2) { return 1; } if(PlayerInfo[playerid][pLogged]) { if(PlayerInfo[playerid][pJoinedEvent]) { foreach(new i : Player) { if(PlayerInfo[i][pJoinedEvent]) { if(killerid == INVALID_PLAYER_ID) SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s died. ))", GetPlayerRPName(playerid)); else SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s was killed by %s. ))", GetPlayerRPName(playerid), GetPlayerRPName(killerid)); } } } else if(PlayerInfo[playerid][pPaintball]) { foreach(new i : Player) { if(PlayerInfo[i][pPaintball]) { if(killerid == INVALID_PLAYER_ID) SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s died. ))", GetPlayerRPName(playerid)); else SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s was killed by %s. ))", GetPlayerRPName(playerid), GetPlayerRPName(killerid)); } } } else if(PlayerInfo[playerid][pDueling] != INVALID_PLAYER_ID) { SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "(( You lost your duel against %s! ))", GetPlayerRPName(PlayerInfo[playerid][pDueling])); if(killerid != INVALID_PLAYER_ID) { SendClientMessageEx(killerid, COLOR_LIGHTORANGE, "(( You won the duel against %s! ))", GetPlayerRPName(playerid)); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has won their duel against %s.", GetPlayerRPName(killerid), GetPlayerRPName(playerid)); SetPlayerToSpawn(killerid); } } else { if(killerid != INVALID_PLAYER_ID) { HandleContract(playerid, killerid); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pJailType] == 0) { if(PlayerInfo[playerid][pInjured] == 0) { ResetPlayer(playerid); PlayerInfo[playerid][pInjured] = 1; } else { PlayerInfo[playerid][pInjured] = 0; PlayerInfo[playerid][pHospital] = 1; } } else { PlayerInfo[playerid][pHealth] = 32767.0; } if(killerid != INVALID_PLAYER_ID) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO kills VALUES(null, %i, %i, '%s', '%s', '%s', NOW())", PlayerInfo[killerid][pID], PlayerInfo[playerid][pID], GetPlayerNameEx(killerid), GetPlayerNameEx(playerid), GetDeathReason(reason)); mysql_tquery(connectionID, queryBuffer); } GetPlayerPos(playerid, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]); GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPosA]); PlayerInfo[playerid][pInterior] = GetPlayerInterior(playerid); PlayerInfo[playerid][pWorld] = GetPlayerVirtualWorld(playerid); } } if(PlayerInfo[playerid][pCallLine] != INVALID_PLAYER_ID) { HangupCall(PlayerInfo[playerid][pCallLine], HANGUP_DROPPED); } if(reason == 50 && killerid != INVALID_PLAYER_ID) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] was helibladed by %s[%i].", GetPlayerRPName(playerid), playerid, GetPlayerRPName(killerid), killerid); } if(killerid != INVALID_PLAYER_ID) { gTotalKills++; } gTotalDeaths++; SaveServerInfo(); PlayerInfo[playerid][pLastDeath] = gettime(); return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x, y, z + 0.5); ClearAnimations(playerid); } if((!ispassenger) && (PlayerInfo[playerid][pCuffed] || PlayerInfo[playerid][pInjured])) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x, y, z + 0.5); ClearAnimations(playerid); } if(!ispassenger) { if((pizzaVehicles[0] <= vehicleid <= pizzaVehicles[5]) && !PlayerHasJob(playerid, JOB_PIZZAMAN)) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Pizzaman."); ClearAnimations(playerid); } if((courierVehicles[0] <= vehicleid <= courierVehicles[6]) && !PlayerHasJob(playerid, JOB_COURIER)) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Courier."); ClearAnimations(playerid); } if((sweeperVehicles[0] <= vehicleid <= sweeperVehicles[3]) && !PlayerHasJob(playerid, JOB_SWEEPER)) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Street Sweeper."); ClearAnimations(playerid); } if((taxiVehicles[0] <= vehicleid <= taxiVehicles[3]) && !PlayerHasJob(playerid, JOB_TAXIDRIVER)) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Taxi Driver."); ClearAnimations(playerid); } if((testVehicles[0] <= vehicleid <= testVehicles[4]) && !PlayerInfo[playerid][pDrivingTest]) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not taking your drivers test."); ClearAnimations(playerid); } if(VehicleInfo[vehicleid][vFactionType] != FACTION_NONE && GetFactionType(playerid) != VehicleInfo[vehicleid][vFactionType]) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as it doesn't belong to your faction."); ClearAnimations(playerid); } if(VehicleInfo[vehicleid][vGang] >= 0 && PlayerInfo[playerid][pGang] != VehicleInfo[vehicleid][vGang]) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as it doesn't belong to your gang."); ClearAnimations(playerid); } if(VehicleInfo[vehicleid][vJob] >= 0 && PlayerInfo[playerid][pJob] != VehicleInfo[vehicleid][vJob]) { SendClientMessageEx(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a %s.", GetJobName(VehicleInfo[vehicleid][vJob])); ClearAnimations(playerid); } } return 1; } public OnPlayerEnterCheckpoint(playerid) { switch(PlayerInfo[playerid][pCP]) { case CHECKPOINT_PIZZA: { new string[32], amount = ((90 - PlayerInfo[playerid][pPizzaTime]) * 10) + random(200), tip = percent(amount, 5); if(gettime() - PlayerInfo[playerid][pLastPizza] < 15 && PlayerInfo[playerid][pAdmin] < 2 && !PlayerInfo[playerid][pKicked]) { PlayerInfo[playerid][pACWarns]++; if(PlayerInfo[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly teleport pizza delivering (time: %i).", GetPlayerRPName(playerid), playerid, gettime() - PlayerInfo[playerid][pLastPizza]); } else { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Teleport pizza runs", GetPlayerRPName(playerid), SERVER_ANTICHEAT); BanPlayer(playerid, SERVER_ANTICHEAT, "Teleport pizza runs"); } } format(string, sizeof(string), "~g~+$%i", amount); GameTextForPlayer(playerid, string, 5000, 1); AddToPaycheck(playerid, amount); GivePlayerCash(playerid, tip); PlayerInfo[playerid][pPizzas] = 0; PlayerInfo[playerid][pPizzaTime] = 0; PlayerInfo[playerid][pCP] = CHECKPOINT_NONE; SendClientMessageEx(playerid, COLOR_AQUA, "You received {00AA00}$%i{33CCFF} on your paycheck for this delivery. You also received a {00AA00}$%i{33CCFF} tip.", amount, tip); DisablePlayerCheckpoint(playerid); } case CHECKPOINT_TEST: { PlayerInfo[playerid][pTestCP]++; if(PlayerInfo[playerid][pTestCP] < sizeof(drivingTestCPs)) { if(!(testVehicles[0] <= GetPlayerVehicleID(playerid) <= testVehicles[4])) { SendClientMessage(playerid, COLOR_LIGHTRED, "** You failed the test as you exited your vehicle."); DisablePlayerCheckpoint(playerid); SetVehicleToRespawn(PlayerInfo[playerid][pTestVehicle]); PlayerInfo[playerid][pCP] = CHECKPOINT_NONE; PlayerInfo[playerid][pDrivingTest] = 0; } else { SetPlayerCheckpoint(playerid, drivingTestCPs[PlayerInfo[playerid][pTestCP]][0], drivingTestCPs[PlayerInfo[playerid][pTestCP]][1], drivingTestCPs[PlayerInfo[playerid][pTestCP]][2], 3.0); } } else { new Float:health; GetVehicleHealth(PlayerInfo[playerid][pTestVehicle], health); if(health < 900.0) { GameTextForPlayer(playerid, "~r~Failed", 5000, 1); SendClientMessage(playerid, COLOR_LIGHTRED, "** You brought back the vehicle damaged and therefore failed your test."); } else { GameTextForPlayer(playerid, "~w~Passed!~n~~r~-$500", 5000, 1); SendClientMessage(playerid, COLOR_AQUA, "You successfully passed your drivers test and received your license!"); GivePlayerCash(playerid, -500); PlayerInfo[playerid][pCarLicense] = 1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET carlicense = 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } DisablePlayerCheckpoint(playerid); SetVehicleToRespawn(PlayerInfo[playerid][pTestVehicle]); PlayerInfo[playerid][pCP] = CHECKPOINT_NONE; PlayerInfo[playerid][pDrivingTest] = 0; } } case CHECKPOINT_MINING: { new cost, string[20]; if(PlayerInfo[playerid][pMiningRock] == 1) { cost = 100 + random(50); } else if(PlayerInfo[playerid][pMiningRock] == 2) { cost = 150 + random(50); } AddToPaycheck(playerid, cost); SendClientMessageEx(playerid, COLOR_AQUA, "You have earned {00AA00}$%i{33CCFF} on your paycheck for your mined rock.", cost); ApplyAnimation(playerid, "CARRY", "putdwn", 4.1, 0, 0, 0, 0, 0, 1); format(string, sizeof(string), "~g~+$%i", cost); GameTextForPlayer(playerid, string, 5000, 1); PlayerInfo[playerid][pMiningRock] = 0; PlayerInfo[playerid][pCP] = CHECKPOINT_NONE; SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE); RemovePlayerAttachedObject(playerid, 9); DisablePlayerCheckpoint(playerid); } case CHECKPOINT_MATS: { if((PlayerInfo[playerid][pSmuggleMats] == 1 && IsPlayerInRangeOfPoint(playerid, 3.0, 2173.2129, -2264.1548, 13.3467)) || (PlayerInfo[playerid][pSmuggleMats] == 2 && IsPlayerInRangeOfPoint(playerid, 3.0, 2288.0918, -1105.6555, 37.9766))) { if(gettime() - PlayerInfo[playerid][pSmuggleTime] < 20 && PlayerInfo[playerid][pAdmin] < 2 && !PlayerInfo[playerid][pKicked]) { PlayerInfo[playerid][pACWarns]++; if(PlayerInfo[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly teleport matrunning (time: %i).", GetPlayerRPName(playerid), playerid, gettime() - PlayerInfo[playerid][pSmuggleTime]); } else { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Teleport matrun", GetPlayerRPName(playerid), SERVER_ANTICHEAT); BanPlayer(playerid, SERVER_ANTICHEAT, "Teleport matrun"); } } if(PlayerInfo[playerid][pMaterials] + 250 > GetPlayerCapacity(playerid, CAPACITY_MATERIALS)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS)); } if(PlayerInfo[playerid][pSmuggleMats] == 1) { AddPointMoney(POINT_MATFACTORY1, 75); } else { AddPointMoney(POINT_MATFACTORY2, 75); } if(PlayerInfo[playerid][pGang] >= 0) { GiveGangPoints(PlayerInfo[playerid][pGang], 1); } PlayerInfo[playerid][pMaterials] += 250; PlayerInfo[playerid][pSmuggleMats] = 0; PlayerInfo[playerid][pCP] = CHECKPOINT_NONE; SendClientMessage(playerid, COLOR_AQUA, "You have dropped off your load and collected 250 materials from the depot."); DisablePlayerCheckpoint(playerid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } } case CHECKPOINT_DRUGS: { new amount = 500 + (GetJobLevel(playerid, JOB_DRUGDEALER) * 250); switch(PlayerInfo[playerid][pSmuggleDrugs]) { case 1: { if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2167.7371, -1670.6298, 15.0804)) { return SendClientMessage(playerid, COLOR_GREY, "You aren't at the correct dropoff spot."); } if(gSeedsStock >= 1000) { return SendClientMessage(playerid, COLOR_GREY, "The drug den does not need anymore seeds."); } gSeedsStock += 10; GivePlayerCash(playerid, amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have earned {00AA00}$%i{33CCFF} for your delivery of marijuana seeds.", amount); } case 2: { if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2349.7727, -1169.6304, 28.0243)) { return SendClientMessage(playerid, COLOR_GREY, "You aren't at the correct dropoff spot."); } if(gCocaineStock >= 500) { return SendClientMessage(playerid, COLOR_GREY, "The crack house does not need anymore cocaine."); } gCocaineStock += 10; GivePlayerCash(playerid, amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have earned {00AA00}$%i{33CCFF} for your delivery of cocaine.", amount); } case 3: { if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2167.7371, -1670.6298, 15.0804)) { return SendClientMessage(playerid, COLOR_GREY, "You aren't at the correct dropoff spot."); } if(gEphedrineStock >= 250) { return SendClientMessage(playerid, COLOR_GREY, "The drug den does not need anymore ephedrine."); } gEphedrineStock += 10; GivePlayerCash(playerid, amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have earned {00AA00}$%i{33CCFF} for your delivery of raw ephedrine.", amount); } } if(gettime() - PlayerInfo[playerid][pSmuggleTime] < 60 && PlayerInfo[playerid][pAdmin] < 2) { PlayerInfo[playerid][pACWarns]++; if(PlayerInfo[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly teleport drug smuggling (time: %i).", GetPlayerRPName(playerid), playerid, gettime() - PlayerInfo[playerid][pSmuggleTime]); } else if(!PlayerInfo[playerid][pKicked]) { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Teleport drug smuggling", GetPlayerRPName(playerid), SERVER_ANTICHEAT); BanPlayer(playerid, SERVER_ANTICHEAT, "Teleport drug smuggling"); } } else { if(PlayerInfo[playerid][pGang] >= 0) { GiveGangPoints(PlayerInfo[playerid][pGang], 1); } } PlayerInfo[playerid][pSmuggleDrugs] = 0; PlayerInfo[playerid][pCP] = CHECKPOINT_NONE; DisablePlayerCheckpoint(playerid); IncreaseJobSkill(playerid, JOB_DRUGDEALER); } case CHECKPOINT_HOUSE: { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has entered the house.", GetPlayerRPName(playerid)); SetPlayerPos(playerid, HouseInfo[PlayerInfo[playerid][pInviteHouse]][hIntX], HouseInfo[PlayerInfo[playerid][pInviteHouse]][hIntY], HouseInfo[PlayerInfo[playerid][pInviteHouse]][hIntZ]); SetPlayerFacingAngle(playerid, HouseInfo[PlayerInfo[playerid][pInviteHouse]][hIntA]); SetPlayerInterior(playerid, HouseInfo[PlayerInfo[playerid][pInviteHouse]][hInterior]); SetPlayerVirtualWorld(playerid, HouseInfo[PlayerInfo[playerid][pInviteHouse]][hWorld]); SetCameraBehindPlayer(playerid); PlayerInfo[playerid][pCP] = CHECKPOINT_NONE; DisablePlayerCheckpoint(playerid); } case CHECKPOINT_ROBBERY: { if(IsPlayerInBankRobbery(playerid) && PlayerInfo[playerid][pRobCash] > 0) { if(gettime() - PlayerInfo[playerid][pLastLoad] < 60 && PlayerInfo[playerid][pAdmin] < 2) { SendClientMessage(playerid, COLOR_GREY, "Robbery failed. You arrived at the checkpoint too fast."); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] arrived to the bank robbery checkpoint too fast.", GetPlayerRPName(playerid), playerid); } else { if(PlayerInfo[playerid][pGang] >= 0) { GiveGangPoints(PlayerInfo[playerid][pGang], 50); } RobberyInfo[rStolen] += PlayerInfo[playerid][pRobCash]; GivePlayerCash(playerid, PlayerInfo[playerid][pRobCash]); SendClientMessageEx(playerid, COLOR_AQUA, "You have earned {00AA00}$%i{33CCFF} for successfully completing the bank robbery.", PlayerInfo[playerid][pRobCash]); } RemoveFromBankRobbery(playerid); } PlayerInfo[playerid][pCP] = CHECKPOINT_NONE; DisablePlayerCheckpoint(playerid); } default: { PlayerInfo[playerid][pCP] = CHECKPOINT_NONE; DisablePlayerCheckpoint(playerid); } } return 1; } public OnPlayerPickUpDynamicPickup(playerid, pickupid) { if(PlayerInfo[playerid][pVIPPackage] > 0) { if(pickupid == gVIPHealth) { SetPlayerHealth(playerid, 100.0); } else if(pickupid == gVIPArmor) { SetScriptArmour(playerid, 100.0); } } if(gParachutes[0] <= pickupid <= gParachutes[1]) { GivePlayerWeaponEx(playerid, 46); } return 1; } public OnPlayerStreamIn(playerid, forplayerid) { if(IsValidDynamic3DTextLabel(PlayerInfo[playerid][pSpecialTag])) { ShowPlayerNameTagForPlayer(forplayerid, playerid, 0); } else { ShowPlayerNameTagForPlayer(forplayerid, playerid, 1); } return 1; } ProcessDamage(playerid, issuerid, weaponid, Float:amount, bool:fmj = false) { new Float:health, Float:armour; GetPlayerHealth(playerid, health); GetPlayerArmour(playerid, armour); if(armour > 0.0) { if(armour >= amount) { armour -= amount; } else { health -= amount - armour; armour = 0; } } else if(health > 0.0) { if(health >= amount) { health -= amount; } else { health = 0; } } if((fmj) && health >= amount / 2) { health -= amount / 2; } SetPlayerHealth(playerid, health < 0.0 ? 0.0 : health); SetPlayerArmour(playerid, armour < 0.0 ? 0.0 : armour); if(health <= 0.0) { CallLocalFunction("OnPlayerDeath", "iii", playerid, issuerid, weaponid); } } public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid) { if((damagedid != INVALID_PLAYER_ID && weaponid == 23) && ((IsLawEnforcement(playerid) || GetFactionType(playerid) == FACTION_GOVERNMENT) && PlayerInfo[playerid][pTazer] && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) && amount > 5.0) { if(PlayerInfo[damagedid][pAdminDuty]) { return SendClientMessage(playerid, COLOR_GREY, "You can't taze an administrator currently on duty."); } if(PlayerInfo[damagedid][pTazedTime]) { return SendClientMessage(playerid, COLOR_GREY, "This player has already been tazed."); } if(!IsPlayerInRangeOfPlayer(playerid, damagedid, 10.0)) { return SendClientMessage(playerid, COLOR_GREY, "You can't taze that player. They are too far from you."); } if((22 <= GetPlayerWeapon(damagedid) <= 38) && IsPlayerAiming(damagedid)) { return SendClientMessage(playerid, COLOR_GREY, "Rush-tazing is forbidden. This means tazing a player who is aiming a gun at you."); } if(IsPlayerInAnyVehicle(damagedid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't taze a player who is in a vehicle."); } PlayerInfo[damagedid][pTazedTime] = 10; TogglePlayerControllable(damagedid, 0); ApplyAnimation(damagedid, "PED", "KO_skid_front", 4.1, 0, 0, 0, 1, 0); GameTextForPlayer(damagedid, "~r~Tazed", 5000, 3); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s aims their tazer full of electricity at %s and stuns them.", GetPlayerRPName(playerid), GetPlayerRPName(damagedid)); SendClientMessageEx(damagedid, COLOR_AQUA, "You've been {FF6347}stunned{33CCFF} with electricity by %s's tazer.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have stunned %s with electricity. They are disabled for 10 seconds.", GetPlayerRPName(damagedid)); } return 1; } public OnPlayerShootDynamicObject(playerid, weaponid, objectid, Float:x, Float:y, Float:z) { if(RobberyInfo[rPlanning] && objectid == RobberyInfo[rObjects][1]) { for(new i = 0; i < MAX_BANK_ROBBERS; i ++) { if(RobberyInfo[rRobbers][i] != INVALID_PLAYER_ID) { PlayerPlaySound(RobberyInfo[rRobbers][i], 3401, 0.0, 0.0, 0.0); GameTextForPlayer(RobberyInfo[rRobbers][i], "~w~Heist started", 5000, 1); SetPlayerAttachedObject(RobberyInfo[rRobbers][i], 8, 19801, 2, 0.091000, 0.012000, -0.000000, 0.099999, 87.799957, 179.500015, 1.345999, 1.523000, 1.270001, 0, 0); SetPlayerAttachedObject(RobberyInfo[rRobbers][i], 9, 1550, 1, 0.116999, -0.170999, -0.016000, -3.099997, 87.800018, -179.400009, 0.602000, 0.640000, 0.625000, 0, 0); ApplyAnimation(RobberyInfo[rRobbers][i], "GOGGLES", "goggles_put_on", 4.1, 0, 0, 0, 0, 0, 1); PlayerInfo[RobberyInfo[rRobbers][i]][pWantedLevel] = 6; PlayerInfo[RobberyInfo[rRobbers][i]][pCrimes]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO charges VALUES(null, %i, 'The State', NOW(), 'Bank Robbery')", PlayerInfo[RobberyInfo[rRobbers][i]][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET wantedlevel = 6, crimes = crimes + 1 WHERE uid = %i", PlayerInfo[RobberyInfo[rRobbers][i]][pID]); mysql_tquery(connectionID, queryBuffer); } } foreach(new i : Player) { if(IsLawEnforcement(i)) { SendClientMessageEx(i, COLOR_ROYALBLUE, "** HQ: A robbery is occurring at the Mulholland Bank. There are %i confirmed robbers.", GetBankRobbers()); } } GetDynamicObjectPos(RobberyInfo[rObjects][1], x, y, z); MoveDynamicObject(RobberyInfo[rObjects][0], 1678.248901, -988.181152, 670.224853, 5.0, 90.000000, 0.000000, 0.000000); DestroyDynamicObject(RobberyInfo[rObjects][1]); CreateExplosion(x, y, z, 12, 6.0); SendClientMessageToAll(COLOR_AQUA, "Breaking News: A bank robbery is currently taking place at the Mulholland Bank!"); RobberyInfo[rText][0] = CreateDynamic3DTextLabel("/lootbox\nto loot deposit box.", COLOR_YELLOW, 1680.2344, -994.6146, 671.0032, 10.0); RobberyInfo[rText][1] = CreateDynamic3DTextLabel("/lootbox\nto loot deposit box.", COLOR_YELLOW, 1680.2335, -998.6115, 671.0032, 10.0); RobberyInfo[rText][2] = CreateDynamic3DTextLabel("/lootbox\nto loot deposit box.", COLOR_YELLOW, 1680.2344, -1002.5356, 671.0032, 10.0); RobberyInfo[rText][3] = CreateDynamic3DTextLabel("/lootbox\nto loot deposit box.", COLOR_YELLOW, 1674.2708, -998.4954, 671.0032, 10.0); RobberyInfo[rText][4] = CreateDynamic3DTextLabel("/lootbox\nto loot deposit box.", COLOR_YELLOW, 1674.2708, -994.5173, 671.0032, 10.0); RobberyInfo[rStarted] = 1; RobberyInfo[rStolen] = 0; RobberyInfo[rPlanning] = 0; } return 1; } public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { if((PlayerInfo[playerid][pPaintball]) && (GetPlayerInterior(playerid) != 18 || GetPlayerVirtualWorld(playerid) != 1000)) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is using paintball weapons outside of paintball.", GetPlayerRPName(playerid), playerid); return 0; } if((PlayerInfo[playerid][pJoinedEvent]) && (GetPlayerInterior(playerid) != EventInfo[eInterior] || GetPlayerVirtualWorld(playerid) != EventInfo[eWorld])) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is using event weapons outside of the event.", GetPlayerRPName(playerid), playerid); return 0; } if(weaponid != 22 && weaponid != 26 && weaponid != 28 && weaponid != 32) { if(PlayerInfo[playerid][pClip] > 0) { new string[12]; PlayerInfo[playerid][pCurrentAmmo] = GetPlayerAmmo(playerid); PlayerInfo[playerid][pClip]--; format(string, sizeof(string), "%i", PlayerInfo[playerid][pClip]); PlayerTextDrawSetString(playerid, PlayerInfo[playerid][pText][5], string); } } if(hittype == BULLET_HIT_TYPE_PLAYER) { if((1 <= EventInfo[eType] <= 2) && PlayerInfo[playerid][pJoinedEvent]) { if(!EventInfo[eStarted]) { GameTextForPlayer(playerid, "~r~Don't shoot until the event starts!", 2000, 3); return 0; } else if(EventInfo[eType] == 2 && PlayerInfo[hitid][pEventTeam] == PlayerInfo[playerid][pEventTeam]) { GameTextForPlayer(playerid, "~r~Do not teamkill!", 2000, 3); return 0; } } if(PlayerInfo[playerid][pAcceptedHelp]) { GameTextForPlayer(playerid, "~r~Don't shoot at newbies!", 2000, 3); return 0; } if(!PlayerInfo[hitid][pAdminDuty] && PlayerInfo[playerid][pAmmoType] != AMMOTYPE_NORMAL && PlayerInfo[playerid][pAmmoWeapon] == weaponid && !PlayerInfo[playerid][pJoinedEvent] && !PlayerInfo[playerid][pPaintball] && PlayerInfo[playerid][pDueling] == INVALID_PLAYER_ID) { new Float:amount; switch(weaponid) { case 22: amount = 8.25; case 23: amount = 13.2; case 24: amount = 46.2; case 25: amount = 3.3; case 26: amount = 3.3; case 27: amount = 4.95; case 28: amount = 6.6; case 29: amount = 8.25; case 30: amount = 9.9; case 31: amount = 9.9; case 32: amount = 6.6; case 33: amount = 24.75; case 34: amount = 41.25; case 35: amount = 82.5; case 36: amount = 82.5; case 37: amount = 1.0; case 38: amount = 46.2; } if(PlayerInfo[playerid][pAmmoType] == AMMOTYPE_HP && PlayerInfo[playerid][pHPAmmo] > 0) { ProcessDamage(hitid, playerid, weaponid, amount + ((amount / 100) * 10)); return 0; } else if(PlayerInfo[playerid][pAmmoType] == AMMOTYPE_POISON && PlayerInfo[playerid][pPoisonAmmo] > 0) { PlayerInfo[hitid][pPoisonTime] = 10; ProcessDamage(hitid, playerid, weaponid, amount); return 0; } else if(PlayerInfo[playerid][pAmmoType] == AMMOTYPE_FMJ && PlayerInfo[playerid][pFMJAmmo] > 0) { ProcessDamage(hitid, playerid, weaponid, amount, true); return 0; } else { ProcessDamage(hitid, playerid, weaponid, amount); return 0; } } } if(hittype == BULLET_HIT_TYPE_PLAYER)// || hittype == BULLET_HIT_TYPE_VEHICLE) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO shots VALUES(null, %i, %i, %i, %i, '%s', '%f', '%f', '%f', %i)", playerid, weaponid, hittype, hitid, GetPlayerNameEx(hitid), fX, fY, fZ, gettime()); mysql_tquery(connectionID, queryBuffer); } if(!PlayerHasWeapon(playerid, weaponid) && PlayerInfo[playerid][pAdmin] < 2 && !PlayerInfo[playerid][pKicked]) { new string[48]; format(string, sizeof(string), "Weapon hacks (%s)", GetWeaponNameEx(weaponid)); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: %s", GetPlayerRPName(playerid), SERVER_ANTICHEAT, string); BanPlayer(playerid, SERVER_ANTICHEAT, string); return 0; } if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { new ammo = 0; switch(weaponid) { case 22: ammo = 50; case 23: ammo = 25; case 26: ammo = 10; case 24, 27: ammo = 15; case 28, 32: ammo = 130; case 29, 30: ammo = 50; case 31: ammo = 80; } PlayerInfo[playerid][pACFired]++; if((!PlayerInfo[playerid][pReloading]) && (ammo > 0 && PlayerInfo[playerid][pACFired] >= ammo) || (PlayerInfo[playerid][pACFired] >= 10 && PlayerInfo[playerid][pACAmmo] == GetPlayerAmmo(playerid))) { if((gAnticheat) && PlayerInfo[playerid][pAdmin] < 2 && !PlayerInfo[playerid][pKicked]) { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Infinite ammo", GetPlayerRPName(playerid), SERVER_ANTICHEAT); BanPlayer(playerid, SERVER_ANTICHEAT, "Infinite ammo"); } PlayerInfo[playerid][pACFired] = 0; } } /*else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO shots VALUES(null, %i, %i, %i, %i, null, '%f', '%f', '%f', %i)", playerid, weaponid, hittype, hitid, fX, fY, fZ, gettime()); }*/ return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { // Finally... an end to that ANNOYING spectate bug! foreach(new i : Player) { if(PlayerInfo[i][pSpectating] == playerid) { SetTimerEx("SpectateUpdate", 500, false, "ii", i, playerid); } } if((newinteriorid == 0) && IsPlayerInBankRobbery(playerid)) { PlayerPlaySound(playerid, 3402, 0.0, 0.0, 0.0); } return 1; } public OnPlayerUpdate(playerid) { if(PlayerInfo[playerid][pKicked]) return 0; if(!PlayerInfo[playerid][pLogged]) return 1; new drunkLevel = GetPlayerDrunkLevel(playerid), keys, ud, lr, string[128]; GetPlayerKeys(playerid, keys, ud, lr); if(GetPlayerMoney(playerid) != PlayerInfo[playerid][pCash]) { ResetPlayerMoney(playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); } if(GetPlayerScore(playerid) != PlayerInfo[playerid][pLevel]) { SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]); } if(GetPlayerWantedLevel(playerid) != PlayerInfo[playerid][pWantedLevel]) { SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]); } if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { new vehicleid = GetPlayerVehicleID(playerid); if(VehicleHasEngine(vehicleid)) { new Float:health, Float:damage; GetVehicleHealth(vehicleid, health); if(health < 300.0) { SetVehicleHealth(vehicleid, 300.0); SetVehicleParams(vehicleid, VEHICLE_ENGINE, 0); //SendClientMessage(playerid, COLOR_RED, "The engine has shut down for being totalled and needs repairing."); GameTextForPlayer(playerid, "~r~Engine totalled", 3000, 3); } damage = (1000.0 - health) / 7.0; if(damage > 100.0) damage = 100.0; if(PlayerInfo[playerid][pSpeedometer] == 1) { format(string, sizeof(string), "~b~~h~Speed:~w~ %.0f KM/H~n~~b~~h~Fuel:~w~ %i%c~n~~b~~h~Damage:~w~ %.0f%c~n~~b~~h~Doors:~w~ %s", GetVehicleSpeed(vehicleid), vehicleFuel[vehicleid], '%', damage, '%', (GetVehicleParams(vehicleid, VEHICLE_DOORS)) ? ("Locked") : ("Unlocked")); } else if(PlayerInfo[playerid][pSpeedometer] == 2) { format(string, sizeof(string), "~b~~h~Speed:~w~ %.0f MPH~n~~b~~h~Fuel:~w~ %i%c~n~~b~~h~Damage:~w~ %.0f%c~n~~b~~h~Doors:~w~ %s", GetVehicleSpeedMPH(vehicleid), vehicleFuel[vehicleid], '%', damage, '%', (GetVehicleParams(vehicleid, VEHICLE_DOORS)) ? ("Locked") : ("Unlocked")); } PlayerTextDrawSetString(playerid, PlayerInfo[playerid][pText][2], string); for(new i = 0; i < MAX_DEPLOYABLES; i ++) { if(DeployInfo[i][dExists] && DeployInfo[i][dType] == DEPLOY_SPIKESTRIP && IsPlayerInRangeOfPoint(playerid, 3.0, DeployInfo[i][dPosX], DeployInfo[i][dPosY], DeployInfo[i][dPosZ])) { new panels, doors, lights, tires; GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires); if(tires != 15) { UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, 15); GameTextForPlayer(playerid, "~r~Spiked", 3000, 3); } } } } } if((GetPlayerAnimationIndex(playerid) != 1209) && ((PlayerInfo[playerid][pInjured] && GetVehicleModel(GetPlayerVehicleID(playerid)) != 416) || (PlayerInfo[playerid][pTazedTime] > 0 && PlayerInfo[playerid][pDraggedBy] == INVALID_PLAYER_ID))) { ApplyAnimation(playerid, "PED", "KO_skid_front", 4.1, 0, 0, 0, 1, 0, 1); } if(GetPlayerWeapon(playerid) > 1 && PlayerInfo[playerid][pInjured]) { SetPlayerArmedWeapon(playerid, 0); } if(!drunkLevel) { SetPlayerDrunkLevel(playerid, 1000); } if(PlayerInfo[playerid][pDrunkLevel] != drunkLevel) { new value = PlayerInfo[playerid][pDrunkLevel] - drunkLevel; if(0 <= value <= 250) { PlayerInfo[playerid][pFPS] = value; } PlayerInfo[playerid][pDrunkLevel] = drunkLevel; } if(!GetPlayerInterior(playerid)) { SetPlayerTime(playerid, gWorldTime, 0); } else { new garageid; if((garageid = GetInsideGarage(playerid)) >= 0 && GarageInfo[garageid][gType] == 2) SetPlayerTime(playerid, 0, 0); else SetPlayerTime(playerid, 12, 0); } if((keys & KEY_FIRE) && IsFireActive() && GetFactionType(playerid) == FACTION_MEDIC) { new Float:x, Float:y, Float:z, Float:vx, Float:vy, Float:vz, Float:cx, Float:cy, Float:cz; if(GetPlayerWeapon(playerid) == 42 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { for(new i = 0; i < MAX_FIRES; i ++) { if(IsPlayerInRangeOfDynamicObject(playerid, gFireObjects[i], 4.0)) { gFireHealth[i] = gFireHealth[i] - 1.0; if(gFireHealth[i] <= 0.0) { GetDynamicObjectPos(gFireObjects[i], x, y, z); GameTextForPlayer(playerid, "~r~Fire extinguished", 2000, 3); SetTimerEx("DestroyWater", 2000, false, "i", CreateDynamicObject(18744, x, y, z - 0.2, 0.0, 0.0, 0.0)); DestroyDynamicObject(gFireObjects[i]); gFireObjects[i] = INVALID_OBJECT_ID; gFireHealth[i] = 0.0; } } } } else if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && (GetVehicleModel(GetPlayerVehicleID(playerid)) == 407 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 544)) { GetPlayerCameraFrontVector(playerid, vx, vy, vz); GetPlayerCameraPos(playerid, cx, cy, cz); for(new i = 0; i < MAX_FIRES; i ++) { if(IsPlayerInRangeOfDynamicObject(playerid, gFireObjects[i], 12.0)) { GetDynamicObjectPos(gFireObjects[i], x, y, z); if(DistanceCameraTargetToLocation(cx, cy, cz, x, y, z + 2.5, vx, vy, vz) < 12.0) { gFireHealth[i] = gFireHealth[i] - 0.5; if(gFireHealth[i] <= 0.0) { GetDynamicObjectPos(gFireObjects[i], x, y, z); GameTextForPlayer(playerid, "~r~Fire extinguished", 2000, 3); SetTimerEx("DestroyWater", 2000, false, "i", CreateDynamicObject(18744, x, y, z - 0.2, 0.0, 0.0, 0.0)); DestroyDynamicObject(gFireObjects[i]); gFireObjects[i] = INVALID_OBJECT_ID; gFireHealth[i] = 0.0; } } } } } if(!IsFireActive()) { new amount = gFires * 150; foreach(new i : Player) { if(GetFactionType(i) == FACTION_MEDIC && IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z)) { SendClientMessageEx(i, COLOR_AQUA, "Well done! You helped put out the fire and received {00AA00}$%i{33CCFF} on your paycheck.", amount); AddToPaycheck(i, amount); } } gFires = 0; } } if(PlayerInfo[playerid][pCurrentWeapon] != GetPlayerWeapon(playerid)) { PlayerInfo[playerid][pCurrentWeapon] = GetPlayerWeapon(playerid); PlayerInfo[playerid][pCurrentAmmo] = GetPlayerAmmo(playerid); PlayerInfo[playerid][pACAmmo] = PlayerInfo[playerid][pCurrentAmmo]; PlayerInfo[playerid][pACFired] = 0; PlayerInfo[playerid][pClip] = GetWeaponClipSize(PlayerInfo[playerid][pCurrentWeapon]); // Weapon hacks if((gAnticheat) && PlayerInfo[playerid][pAdmin] < 2) { if(PlayerInfo[playerid][pCurrentWeapon] > 1 && !PlayerHasWeapon(playerid, PlayerInfo[playerid][pCurrentWeapon]) && !PlayerInfo[playerid][pKicked]) { PlayerInfo[playerid][pACWarns]++; if(PlayerInfo[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has a desynced %s.", GetPlayerRPName(playerid), playerid, GetWeaponNameEx(PlayerInfo[playerid][pCurrentWeapon])); Log_Write("log_cheat", "%s (uid: %i) had a desynced %s with %i ammunition.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetWeaponNameEx(PlayerInfo[playerid][pCurrentWeapon]), GetPlayerAmmo(playerid)); } else { format(string, sizeof(string), "Weapon hacks (%s)", GetWeaponNameEx(PlayerInfo[playerid][pCurrentWeapon])); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: %s", GetPlayerRPName(playerid), SERVER_ANTICHEAT, string); BanPlayer(playerid, SERVER_ANTICHEAT, string); } } } } if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && PlayerInfo[playerid][pCurrentWeapon] > 0 && GetWeaponClipSize(PlayerInfo[playerid][pCurrentWeapon]) > 0 && !PlayerInfo[playerid][pToggleHUD] && !PlayerInfo[playerid][pToggleTextdraws] && PlayerInfo[playerid][pAmmoWeapon] != PlayerInfo[playerid][pCurrentWeapon]) { PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][5]); } else { PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][5]); } if(PlayerInfo[playerid][pCurrentAmmo] != GetPlayerAmmo(playerid)) { if(PlayerInfo[playerid][pCurrentAmmo] > GetPlayerAmmo(playerid)) { switch(GetPlayerWeapon(playerid)) { case 22, 26, 28, 32: { PlayerInfo[playerid][pClip] -= PlayerInfo[playerid][pCurrentAmmo] - GetPlayerAmmo(playerid); } } if(PlayerInfo[playerid][pClip] < 0) { PlayerInfo[playerid][pClip] = 0; } } PlayerInfo[playerid][pCurrentAmmo] = GetPlayerAmmo(playerid); if(!PlayerInfo[playerid][pJoinedEvent] && !PlayerInfo[playerid][pPaintball] && PlayerInfo[playerid][pDueling] == INVALID_PLAYER_ID && !(PlayerInfo[playerid][pTazer] && GetPlayerWeapon(playerid) == 23)) { if((22 <= PlayerInfo[playerid][pCurrentWeapon] <= 34) && PlayerInfo[playerid][pAmmoType] != AMMOTYPE_NORMAL && PlayerInfo[playerid][pAmmoWeapon] == PlayerInfo[playerid][pCurrentWeapon] && 0 <= PlayerInfo[playerid][pCurrentAmmo] <= 9999) { // Ammo hack detection. if(PlayerInfo[playerid][pAmmoType] != AMMOTYPE_NORMAL && PlayerHasWeapon(playerid, PlayerInfo[playerid][pAmmoWeapon])) { new weapon, ammo; GetPlayerWeaponData(playerid, weaponSlotIDs[PlayerInfo[playerid][pAmmoWeapon]], weapon, ammo); if((ammo > 0) && (PlayerInfo[playerid][pAmmoType] == AMMOTYPE_HP && ammo > PlayerInfo[playerid][pHPAmmo]) || (PlayerInfo[playerid][pAmmoType] == AMMOTYPE_POISON && ammo > PlayerInfo[playerid][pPoisonAmmo]) || (PlayerInfo[playerid][pAmmoType] == AMMOTYPE_FMJ && ammo > PlayerInfo[playerid][pFMJAmmo])) { new oldammo; if(PlayerInfo[playerid][pAmmoType] == AMMOTYPE_HP) { oldammo = PlayerInfo[playerid][pHPAmmo]; } else if(PlayerInfo[playerid][pAmmoType] == AMMOTYPE_POISON) { oldammo = PlayerInfo[playerid][pPoisonAmmo]; } else if(PlayerInfo[playerid][pAmmoType] == AMMOTYPE_FMJ) { oldammo = PlayerInfo[playerid][pFMJAmmo]; } if(gAnticheat && !PlayerInfo[playerid][pKicked]) { PlayerInfo[playerid][pACWarns]++; if(PlayerInfo[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] may be hacking ammo. (old: %i, new: %i)", GetPlayerRPName(playerid), playerid, oldammo, ammo); Log_Write("log_cheat", "%s (uid: %i) possibly hacked ammo. (old: %i, new: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], oldammo, ammo); } else { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Ammo hacking", GetPlayerRPName(playerid), SERVER_ANTICHEAT); BanPlayer(playerid, SERVER_ANTICHEAT, "Ammo hacking"); } PlayerInfo[playerid][pCurrentAmmo] = oldammo; SetPlayerAmmo(playerid, PlayerInfo[playerid][pAmmoWeapon], oldammo); } } } if(PlayerInfo[playerid][pAmmoType] != AMMOTYPE_NORMAL) { if(IsPlayerInAnyVehicle(playerid)) { new weaponid; GetPlayerWeaponData(playerid, weaponSlotIDs[PlayerInfo[playerid][pCurrentWeapon]], weaponid, PlayerInfo[playerid][pCurrentAmmo]); } switch(PlayerInfo[playerid][pAmmoType]) { case AMMOTYPE_HP: PlayerInfo[playerid][pHPAmmo] = PlayerInfo[playerid][pCurrentAmmo]; case AMMOTYPE_POISON: PlayerInfo[playerid][pPoisonAmmo] = PlayerInfo[playerid][pCurrentAmmo]; case AMMOTYPE_FMJ: PlayerInfo[playerid][pFMJAmmo] = PlayerInfo[playerid][pCurrentAmmo]; } } if(PlayerInfo[playerid][pCurrentAmmo] == 0 && PlayerInfo[playerid][pAmmoType] != AMMOTYPE_NORMAL) { PlayerInfo[playerid][pAmmoType] = AMMOTYPE_NORMAL; PlayerInfo[playerid][pAmmoWeapon] = 0; SendClientMessageEx(playerid, COLOR_WHITE, "** Your %s is now using normal ammunition again as you ran out of special ammo.", GetWeaponNameEx(PlayerInfo[playerid][pCurrentWeapon])); SetPlayerWeapons(playerid); } } } } if(GetPlayerWeaponState(playerid) == WEAPONSTATE_RELOADING) { if(GetPlayerWeapon(playerid) != 25 && GetPlayerWeapon(playerid) != 33 && GetPlayerWeapon(playerid) != 34) { PlayerInfo[playerid][pReloading] = 1; } PlayerInfo[playerid][pACFired] = 0; } if(PlayerInfo[playerid][pReloading] && GetPlayerWeaponState(playerid) != WEAPONSTATE_RELOADING) { PlayerInfo[playerid][pClip] = GetWeaponClipSize(GetPlayerWeapon(playerid)); PlayerInfo[playerid][pReloading] = 0; } new vehicleid = GetPlayerVehicleID(playerid); if(PlayerInfo[playerid][pCurrentVehicle] != vehicleid) { PlayerInfo[playerid][pCurrentVehicle] = vehicleid; PlayerInfo[playerid][pVehicleCount]++; if((!IsABoat(vehicleid) && GetVehicleModel(vehicleid) != 539) && PlayerInfo[playerid][pVehicleCount] >= 4 && PlayerInfo[playerid][pAdmin] < 2 && !PlayerInfo[playerid][pKicked]) { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Car warping", GetPlayerRPName(playerid), SERVER_ANTICHEAT); BanPlayer(playerid, SERVER_ANTICHEAT, "Car warping"); return 0; } } if((44 <= GetPlayerWeapon(playerid) <= 45) && keys & KEY_FIRE) { return 0; } // Armor hacking if(!PlayerInfo[playerid][pJoinedEvent] && !PlayerInfo[playerid][pPaintball] && PlayerInfo[playerid][pDueling] == INVALID_PLAYER_ID) { // TODO: rewrite. } if(!PlayerInfo[playerid][pToggleHUD] && !PlayerInfo[playerid][pToggleTextdraws] && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) { new Float:health, Float:armour; GetPlayerHealth(playerid, health); GetPlayerArmour(playerid, armour); if(floatround(armour) > 0) { format(string, sizeof(string), "%.0f", armour); PlayerTextDrawSetString(playerid, PlayerInfo[playerid][pText][3], string); PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][3]); } else { PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][3]); } format(string, sizeof(string), "%.0f", health); PlayerTextDrawSetString(playerid, PlayerInfo[playerid][pText][4], string); if(PlayerInfo[playerid][pReloading]) { string = "0"; } else { format(string, sizeof(string), "%i", PlayerInfo[playerid][pClip]); } PlayerTextDrawSetString(playerid, PlayerInfo[playerid][pText][5], string); } PlayerInfo[playerid][pLastUpdate] = gettime(); return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0) { VehicleInfo[vehicleid][vColor1] = color1; VehicleInfo[vehicleid][vColor2] = color2; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET color1 = %i, color2 = %i WHERE id = %i", color1, color2, VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); } return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0) { VehicleInfo[vehicleid][vPaintjob] = paintjobid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET paintjob = %i WHERE id = %i", paintjobid, VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); } return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { if(!GetPlayerInterior(playerid) && PlayerInfo[playerid][pAdmin] < 2 && !PlayerInfo[playerid][pKicked]) { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Illegal modding", GetPlayerRPName(playerid), SERVER_ANTICHEAT); BanPlayer(playerid, SERVER_ANTICHEAT, "Illegal modding"); return 0; } if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0) { new slotid = GetVehicleComponentType(componentid); VehicleInfo[vehicleid][vMods][slotid] = componentid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET mod_%i = %i WHERE id = %i", slotid + 1, componentid, VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); } return 1; } public OnVehicleSpawn(vehicleid) { if(adminVehicle{vehicleid}) { DestroyVehicle(vehicleid); adminVehicle{vehicleid} = false; } if(IsValidDynamicObject(vehicleSiren[vehicleid])) { DestroyDynamicObject(vehicleSiren[vehicleid]); vehicleSiren[vehicleid] = INVALID_OBJECT_ID; } if((VehicleInfo[vehicleid][vID] > 0 && VehicleInfo[vehicleid][vOwnerID] > 0) || (VehicleInfo[vehicleid][vGang] >= 0)) { ReloadVehicle(vehicleid); if(VehicleInfo[vehicleid][vGang] >= 0) { vehicleFuel[vehicleid] = 100; } } else { if(VehicleInfo[vehicleid][vID] > 0 && VehicleInfo[vehicleid][vHealth] > 300.0) { SetVehicleHealth(vehicleid, VehicleInfo[vehicleid][vHealth]); } vehicleFuel[vehicleid] = 100; } vehicleStream[vehicleid][0] = 0; return 1; } public OnPlayerText(playerid, text[]) { if(PlayerInfo[playerid][pLogged] && !PlayerInfo[playerid][pKicked]) { if(PlayerInfo[playerid][pTutorial]) { SendClientMessage(playerid, COLOR_LIGHTRED, "** You are currently in the tutorial. Chatting is disabled."); return 0; } if(PlayerInfo[playerid][pHospital]) { SendClientMessage(playerid, COLOR_LIGHTRED, "** You are currently in the hospital. Chatting is disabled."); return 0; } if(PlayerInfo[playerid][pMuted]) { SendClientMessage(playerid, COLOR_LIGHTRED, "** You are currently muted. Chatting is disabled."); return 0; } if(++PlayerInfo[playerid][pSpamTime] >= 4 && PlayerInfo[playerid][pAdmin] < 2) { PlayerInfo[playerid][pMuted] = 10; SendClientMessage(playerid, COLOR_YELLOW, "** You've been temporarily muted for ten seconds due to suspected spamming."); return 0; } if(PlayerInfo[playerid][pJoinedEvent]) { foreach(new i : Player) { if(PlayerInfo[i][pJoinedEvent]) { if(EventInfo[eType] == 2) { SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( {%06x}%s:{F7A763} %s ))", GetPlayerColor(playerid) >>> 8, GetPlayerRPName(playerid), text); } else { SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s: %s ))", GetPlayerRPName(playerid), text); } } } } else { new string[144]; if(PlayerInfo[playerid][pCallLine] != INVALID_PLAYER_ID) { if(PlayerInfo[playerid][pCallLine] != playerid && PlayerInfo[playerid][pCallStage] == 2) { if(!strcmp(PlayerInfo[playerid][pAccent], "None", true)) { SendClientMessageEx(PlayerInfo[playerid][pCallLine], COLOR_YELLOW, "%s says (cellphone): %s", GetPlayerRPName(playerid), text); } else { SendClientMessageEx(PlayerInfo[playerid][pCallLine], COLOR_YELLOW, "(%s) %s says (cellphone): %s", PlayerInfo[playerid][pAccent], GetPlayerRPName(playerid), text); } } if(!strcmp(PlayerInfo[playerid][pAccent], "None", true)) { format(string, sizeof(string), "%s says (cellphone): %s", GetPlayerRPName(playerid), text); } else { format(string, sizeof(string), "(%s) %s says (cellphone): %s", PlayerInfo[playerid][pAccent], GetPlayerRPName(playerid), text); } SendProximityFadeMessage(playerid, 20.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5); if(PlayerInfo[playerid][pCallLine] == playerid) { switch(PlayerInfo[playerid][pCallStage]) { case 911: { if(!strcmp(text, "police", true)) { SendClientMessage(playerid, COLOR_ROYALBLUE, "Dispatch: This is the Los Santos Police Department. What is your emergency?"); PlayerInfo[playerid][pCallStage] = 912; } else if(!strcmp(text, "medic", true)) { SendClientMessage(playerid, COLOR_DOCTOR, "Dispatch: This is the Los Santos Fire & Medical Department. What is your emergency?"); PlayerInfo[playerid][pCallStage] = 913; } else { SendClientMessage(playerid, COLOR_YELLOW, "Dispatch: Sorry? I don't know what you mean... Enter 'police' or 'medic'."); } } case 912: { foreach(new i : Player) { if(IsLawEnforcement(i)) { SendClientMessageEx(i, COLOR_ROYALBLUE, "|_____ Emergency Hotline _____|"); SendClientMessageEx(i, COLOR_GREY2, "Caller: %s, Number: %i", GetPlayerRPName(playerid), PlayerInfo[playerid][pPhone]); SendClientMessageEx(i, COLOR_GREY2, "Location: %s", GetPlayerZoneName(playerid)); SendClientMessageEx(i, COLOR_GREY2, "Emergency: %s", text); SendClientMessageEx(i, COLOR_WHITE, "** Use '/trackcall %i' to track the caller's location.", playerid); } } strcpy(PlayerInfo[playerid][pEmergency], text, 128); PlayerInfo[playerid][pEmergencyCall] = 120; PlayerInfo[playerid][pEmergencyType] = FACTION_POLICE; SendClientMessage(playerid, COLOR_ROYALBLUE, "Dispatch: All units in the area have been notified. Thank you for your time."); HangupCall(playerid, HANGUP_USER); } case 913: { foreach(new i : Player) { if(GetFactionType(i) == FACTION_MEDIC) { SendClientMessageEx(i, COLOR_DOCTOR, "|_____ Emergency Hotline _____|"); SendClientMessageEx(i, COLOR_GREY2, "Caller: %s, Number: %i", GetPlayerRPName(playerid), PlayerInfo[playerid][pPhone]); SendClientMessageEx(i, COLOR_GREY2, "Location: %s", GetPlayerZoneName(playerid)); SendClientMessageEx(i, COLOR_GREY2, "Emergency: %s", text); SendClientMessageEx(i, COLOR_WHITE, "** Use '/trackcall %i' to track the caller's location.", playerid); } } strcpy(PlayerInfo[playerid][pEmergency], text, 128); PlayerInfo[playerid][pEmergencyCall] = 120; PlayerInfo[playerid][pEmergencyType] = FACTION_MEDIC; SendClientMessage(playerid, COLOR_DOCTOR, "Dispatch: All units in the area have been notified. Thank you for your time."); HangupCall(playerid, HANGUP_USER); } case 6397: { foreach(new i : Player) { if(GetFactionType(i) == FACTION_NEWS) { SendClientMessageEx(i, COLOR_LIMITLESSBLUE, "|_____ News Hotline _____|"); SendClientMessageEx(i, COLOR_GREY2, "Caller: %s, Number: %i", GetPlayerRPName(playerid), PlayerInfo[playerid][pPhone]); SendClientMessageEx(i, COLOR_GREY2, "Message: %s", text); } } SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "News Team: Thank you. We will get back to you shortly!"); HangupCall(playerid, HANGUP_USER); } case 6324: { foreach(new i : Player) { if(PlayerHasJob(i, JOB_MECHANIC)) { SendClientMessageEx(i, COLOR_GREEN, "|_____ Mechanic Hotline _____|"); SendClientMessageEx(i, COLOR_GREY2, "Caller: %s, Number: %i", GetPlayerRPName(playerid), PlayerInfo[playerid][pPhone]); SendClientMessageEx(i, COLOR_GREY2, "Situation: %s", text); SendClientMessageEx(i, COLOR_WHITE, "** Use '/takecall %i' in order to take this call.", playerid); } } PlayerInfo[playerid][pMechanicCall] = 60; SendClientMessage(playerid, COLOR_LIGHTORANGE, "Dispatch: Thank you. We will alert all mechanics on duty."); HangupCall(playerid, HANGUP_USER); } case 8294: { foreach(new i : Player) { if(PlayerHasJob(i, JOB_TAXIDRIVER)) { SendClientMessageEx(i, COLOR_GREEN, "|_____ Taxi Hotline _____|"); SendClientMessageEx(i, COLOR_GREY2, "Caller: %s, Number: %i", GetPlayerRPName(playerid), PlayerInfo[playerid][pPhone]); SendClientMessageEx(i, COLOR_GREY2, "Location: %s", text); SendClientMessageEx(i, COLOR_WHITE, "** Use '/takecall %i' in order to take this call.", playerid); } } PlayerInfo[playerid][pTaxiCall] = 60; SendClientMessage(playerid, COLOR_YELLOW, "Dispatch: Thank you. We will alert all taxi drivers on duty."); HangupCall(playerid, HANGUP_USER); } } } } else if(PlayerInfo[playerid][pLiveBroadcast] != INVALID_PLAYER_ID) { foreach(new i : Player) { if(!PlayerInfo[i][pToggleNews]) { if(GetFactionType(playerid) == FACTION_NEWS) { SendClientMessageEx(i, COLOR_LIGHTGREEN, "Live Reporter %s: %s", GetPlayerRPName(playerid), text); } else { SendClientMessageEx(i, COLOR_LIGHTGREEN, "Live Guest %s: %s", GetPlayerRPName(playerid), text); } } } SendProximityFadeMessage(playerid, 20.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5); } else { if(PlayerInfo[playerid][pHelper] > 0 && PlayerInfo[playerid][pAcceptedHelp]) { cmd_b(playerid, text); } else { if(!strcmp(PlayerInfo[playerid][pAccent], "None", true)) { format(string, sizeof(string), "%s says: %s", GetPlayerRPName(playerid), text); } else { format(string, sizeof(string), "(%s) %s says: %s", PlayerInfo[playerid][pAccent], GetPlayerRPName(playerid), text); } SendProximityFadeMessage(playerid, 20.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5); SetPlayerBubbleText(playerid, 20.0, COLOR_WHITE, "says: %s", text); } } } } PlayerInfo[playerid][pAFKPos][0] = 0.0; PlayerInfo[playerid][pAFKPos][1] = 0.0; PlayerInfo[playerid][pAFKPos][2] = 0.0; return 0; } public OnPlayerCommandReceived(playerid, cmdtext[]) { if(PlayerInfo[playerid][pKicked]) return 0; if(!PlayerInfo[playerid][pLogged]) { SendClientMessage(playerid, COLOR_RED, "You cannot use commands if you're not logged in."); return 0; } if(PlayerInfo[playerid][pTutorial])// && strcmp(cmdtext, "/report", true, 6)) { SendClientMessage(playerid, COLOR_LIGHTRED, "** You are currently in the tutorial. Commands are disabled."); return 0; } if(GetPlayerState(playerid) == PLAYER_STATE_WASTED) { SendClientMessage(playerid, COLOR_LIGHTRED, "** You are currently dead. Commands are disabled."); return 0; } if(PlayerInfo[playerid][pMuted]) { SendClientMessage(playerid, COLOR_LIGHTRED, "** You are currently muted. Commands are disabled."); return 0; } if(++PlayerInfo[playerid][pSpamTime] >= 4 && PlayerInfo[playerid][pAdmin] < 2) { PlayerInfo[playerid][pMuted] = 10; SendClientMessage(playerid, COLOR_YELLOW, "** You've been temporarily muted for ten seconds due to suspected flooding."); return 0; } /*if((PlayerInfo[playerid][pAdmin] < 6) && (!strcmp(cmdtext, "/ban", true, 3) || !strcmp(cmdtext, "/kick", true, 4) || !strcmp(cmdtext, "/sban", true, 4) || !strcmp(cmdtext, "/skick", true, 5) || !strcmp(cmdtext, "/permaban", true, 8) || !strcmp(cmdtext, "/rangeban", true, 8) || !strcmp(cmdtext, "/getip", true, 5) || !strcmp(cmdtext, "/traceip", true, 7))) { SendClientMessage(playerid, COLOR_LIGHTRED, "** These commands cannot be used during beta testing."); return 0; } if((PlayerInfo[playerid][pAdmin] < 5) && (!strcmp(cmdtext, "/adminname"))) { SendClientMessage(playerid, COLOR_LIGHTRED, "** These commands cannot be used during beta testing."); return 0; }*/ if(strcmp(cmdtext, "/whostheman", true, 10)) { printf("[cmd][%s]: %s", GetPlayerNameEx(playerid), cmdtext); } PlayerInfo[playerid][pAFKPos][0] = 0.0; PlayerInfo[playerid][pAFKPos][1] = 0.0; PlayerInfo[playerid][pAFKPos][2] = 0.0; return 1; } public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(!success) { //SendClientMessage(playerid, COLOR_LIGHTRED, "That command doesn't exist! Use /help for a list of commands."); SendClientMessage(playerid, 0x089DCEFF, "[LL:RP] {AAAAAA}Sorry, that command doesn't exist! Use /help for a list of commands."); } return 1; } public OnRconLoginAttempt(ip[], password[], success) { if(success) { foreach(new i : Player) { if(!strcmp(GetPlayerIP(i), ip) && PlayerInfo[i][pAdmin] < 7) { BanPlayer(i, "Server", "Unauthorized RCON login"); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s was banned for an unauthorized RCON login.", GetPlayerRPName(i)); } } } return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_SPRINT) { if(PlayerInfo[playerid][pLoopAnim]) { PlayerInfo[playerid][pLoopAnim] = 0; ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1); TextDrawHideForPlayer(playerid, AnimationTD); } } if((gettime() - PlayerInfo[playerid][pLastPress]) >= 1) { if(newkeys & KEY_YES) { if(!EnterCheck(playerid)) ExitCheck(playerid); DoorCheck(playerid); GateCheck(playerid); PlayerInfo[playerid][pLastPress] = gettime(); // Prevents spamming. Sometimes keys get messed up and register twice. } else if(newkeys & KEY_NO && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { cmd_engine(playerid, "\1"); PlayerInfo[playerid][pLastPress] = gettime(); // Prevents spamming. Sometimes keys get messed up and register twice. } } return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { if(PlayerInfo[playerid][pKicked]) return 0; if(newstate == PLAYER_STATE_DRIVER) { new vehicleid = GetPlayerVehicleID(playerid); if((pizzaVehicles[0] <= vehicleid <= pizzaVehicles[5]) && !PlayerHasJob(playerid, JOB_PIZZAMAN)) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Pizzaman."); RemovePlayerFromVehicle(playerid); return 1; } if((courierVehicles[0] <= vehicleid <= courierVehicles[6]) && !PlayerHasJob(playerid, JOB_COURIER)) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Courier."); RemovePlayerFromVehicle(playerid); return 1; } if((sweeperVehicles[0] <= vehicleid <= sweeperVehicles[3]) && !PlayerHasJob(playerid, JOB_SWEEPER)) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Street Sweeper."); RemovePlayerFromVehicle(playerid); return 1; } if((taxiVehicles[0] <= vehicleid <= taxiVehicles[3]) && !PlayerHasJob(playerid, JOB_TAXIDRIVER)) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Taxi Driver."); RemovePlayerFromVehicle(playerid); return 1; } if((testVehicles[0] <= vehicleid <= testVehicles[4]) && !PlayerInfo[playerid][pDrivingTest]) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not taking your drivers test."); RemovePlayerFromVehicle(playerid); return 1; } if(VehicleInfo[vehicleid][vFactionType] != FACTION_NONE && GetFactionType(playerid) != VehicleInfo[vehicleid][vFactionType]) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as it doesn't belong to your faction."); RemovePlayerFromVehicle(playerid); return 1; } if(VehicleInfo[vehicleid][vGang] >= 0 && PlayerInfo[playerid][pGang] != VehicleInfo[vehicleid][vGang]) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as it doesn't belong to your gang."); RemovePlayerFromVehicle(playerid); return 1; } if(VehicleInfo[vehicleid][vJob] >= 0 && PlayerInfo[playerid][pJob] != VehicleInfo[vehicleid][vJob]) { SendClientMessageEx(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a %s.", GetJobName(VehicleInfo[vehicleid][vJob])); RemovePlayerFromVehicle(playerid); return 1; } if(!VehicleHasEngine(vehicleid)) { SetVehicleParams(vehicleid, VEHICLE_ENGINE, true); } else if(!GetVehicleParams(vehicleid, VEHICLE_ENGINE)) { if(testVehicles[0] <= vehicleid <= testVehicles[4]) { PlayerInfo[playerid][pCP] = CHECKPOINT_TEST; PlayerInfo[playerid][pTestVehicle] = vehicleid; PlayerInfo[playerid][pTestCP] = 0; SetVehicleParams(vehicleid, VEHICLE_ENGINE, 1); SetPlayerCheckpoint(playerid, drivingTestCPs[PlayerInfo[playerid][pTestCP]][0], drivingTestCPs[PlayerInfo[playerid][pTestCP]][1], drivingTestCPs[PlayerInfo[playerid][pTestCP]][2], 3.0); SendClientMessage(playerid, COLOR_AQUA, "Drive through the checkpoints to proceed with the test. Try not to damage your vehicle."); } else { GameTextForPlayer(playerid, "~r~Engine Off~n~~w~/engine", 3000, 3); } } if(!PlayerInfo[playerid][pCarLicense] && !PlayerInfo[playerid][pDrivingTest]) { SendClientMessage(playerid, COLOR_LIGHTRED, "** You're driving without a license which is illegal. You can be pulled over or arrested."); } if(IsVehicleOwner(playerid, vehicleid) && VehicleInfo[vehicleid][vTickets] > 0) { SendClientMessageEx(playerid, COLOR_AQUA, "This vehicle has $%i in unpaid tickets. You can pay your tickets using /paytickets.", VehicleInfo[vehicleid][vTickets]); } if(!PlayerInfo[playerid][pToggleTextdraws]) { PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][1]); PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][2]); } SetPlayerArmedWeapon(playerid, 0); /*if(isnull(vehicleStream[vehicleid])) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "Radio: Use {FFD700}/setradio{F7A763} to listen to a radio station."); }*/ /*if(isnull(vehicleStream[vehicleid])) { SendClientMessage(playerid, COLOR_WHITE, "** Use {C8C8C8}/setradio{FFFFFF} to change the radio station in this vehicle."); }*/ } else if(oldstate == PLAYER_STATE_DRIVER) { if(PlayerInfo[playerid][pDrivingTest]) { PlayerInfo[playerid][pDrivingTest] = 0; SetVehicleToRespawn(PlayerInfo[playerid][pTestVehicle]); SendClientMessage(playerid, COLOR_LIGHTRED, "** You have exited the vehicle and therefore failed the test."); } PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][1]); PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][2]); } else if(newstate == PLAYER_STATE_PASSENGER) { new driverid = GetVehicleDriver(GetPlayerVehicleID(playerid)); if((driverid != INVALID_VEHICLE_ID && PlayerInfo[driverid][pTaxiFare] > 0 && PlayerInfo[driverid][pTaxiPassenger] == INVALID_PLAYER_ID) && (GetVehicleModel(GetPlayerVehicleID(playerid)) == 420 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 438)) { if(PlayerInfo[playerid][pCash] < PlayerInfo[driverid][pTaxiFare]) { SendClientMessage(playerid, COLOR_GREY, "You can't afford to pay the fare. Therefore you can't ride this taxi."); RemovePlayerFromVehicle(playerid); return 1; } PlayerInfo[driverid][pTaxiPassenger] = playerid; PlayerInfo[driverid][pTaxiBill] = PlayerInfo[driverid][pTaxiFare]; PlayerInfo[driverid][pTaxiTime] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s enters %s's taxi cab.", GetPlayerRPName(playerid), GetPlayerRPName(driverid)); SendClientMessageEx(playerid, COLOR_YELLOW, "You will be charged the fare price of {FF6347}$%i{33CCFF} every 15 seconds during your ride.", PlayerInfo[driverid][pTaxiFare]); SendClientMessageEx(driverid, COLOR_AQUA, "*%s has entered your taxi. You will earn {00AA00}$%i{33CCFF} every 15 seconds during the ride.", GetPlayerRPName(playerid), PlayerInfo[driverid][pTaxiFare]); } switch(GetPlayerWeapon(playerid)) { case 22, 23, 25, 28..34: SetPlayerArmedWeapon(playerid, GetScriptWeapon(playerid)); default: SetPlayerArmedWeapon(playerid, 0); } } if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) { new vehicleid = GetPlayerVehicleID(playerid); foreach(new i : Player) { if(GetPlayerState(i) == PLAYER_STATE_SPECTATING && PlayerInfo[i][pSpectating] == playerid) { PlayerSpectateVehicle(i, vehicleid); } } if(!isnull(vehicleStream[vehicleid]) && PlayerInfo[playerid][pStreamType] == MUSIC_NONE && !PlayerInfo[playerid][pToggleMusic]) { PlayerInfo[playerid][pStreamType] = MUSIC_VEHICLE; PlayAudioStreamForPlayer(playerid, vehicleStream[vehicleid]); SendClientMessage(playerid, COLOR_WHITE, "** You are now tuned in to this vehicle's radio. /stopmusic to stop listening."); } } else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER) { foreach(new i : Player) { if(GetPlayerState(i) == PLAYER_STATE_SPECTATING && PlayerInfo[i][pSpectating] == playerid) { PlayerSpectatePlayer(i, playerid); } } if(PlayerInfo[playerid][pStreamType] == MUSIC_VEHICLE) { StopAudioStreamForPlayer(playerid); PlayerInfo[playerid][pStreamType] = MUSIC_NONE; } } return 1; } public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ) { if(!(-3.0 <= fScaleX <= 3.0)) fScaleX = fScaleX < -3.0 ? 0.0 : 3.0; if(!(-3.0 <= fScaleY <= 3.0)) fScaleY = fScaleY < -3.0 ? 0.0 : 3.0; if(!(-3.0 <= fScaleZ <= 3.0)) fScaleZ = fScaleZ < -3.0 ? 0.0 : 3.0; switch(PlayerInfo[playerid][pEditType]) { case EDIT_CLOTHING_PREVIEW: { RemovePlayerAttachedObject(playerid, 9); if(response) { new businessid = GetInsideBusiness(playerid); if(businessid >= 0 && BusinessInfo[businessid][bType] == BUSINESS_CLOTHES) { if(BusinessInfo[businessid][bProducts] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "This business is out of stock now."); } if(PlayerInfo[playerid][pCash] < clothingArray[PlayerInfo[playerid][pSelected]][clothingPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You couldn't afford to purchase this item."); } for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++) { if(!ClothingInfo[playerid][i][cExists]) { ClothingInfo[playerid][i][cModel] = modelid; ClothingInfo[playerid][i][cBone] = boneid; ClothingInfo[playerid][i][cPosX] = fOffsetX; ClothingInfo[playerid][i][cPosY] = fOffsetY; ClothingInfo[playerid][i][cPosZ] = fOffsetZ; ClothingInfo[playerid][i][cRotX] = fRotX; ClothingInfo[playerid][i][cRotY] = fRotY; ClothingInfo[playerid][i][cRotZ] = fRotZ; ClothingInfo[playerid][i][cScaleX] = fScaleX; ClothingInfo[playerid][i][cScaleY] = fScaleY; ClothingInfo[playerid][i][cScaleZ] = fScaleZ; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO clothing VALUES(null, %i, '%e', %i, %i, 0, '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f')", PlayerInfo[playerid][pID], clothingArray[PlayerInfo[playerid][pSelected]][clothingName], modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ); mysql_tquery(connectionID, queryBuffer, "OnPlayerBuyClothingItem", "isiii", playerid, clothingArray[PlayerInfo[playerid][pSelected]][clothingName], clothingArray[PlayerInfo[playerid][pSelected]][clothingPrice], businessid, i); return 1; } } SendClientMessage(playerid, COLOR_GREY, "You have no more clothing slots available. Therefore you can't buy this."); } } else { ShowDialogToPlayer(playerid, DIALOG_BUYCLOTHING); } } case EDIT_CLOTHING: { new clothingid = PlayerInfo[playerid][pSelected]; if(response) { ClothingInfo[playerid][clothingid][cPosX] = fOffsetX; ClothingInfo[playerid][clothingid][cPosY] = fOffsetY; ClothingInfo[playerid][clothingid][cPosZ] = fOffsetZ; ClothingInfo[playerid][clothingid][cRotX] = fRotX; ClothingInfo[playerid][clothingid][cRotY] = fRotY; ClothingInfo[playerid][clothingid][cRotZ] = fRotZ; ClothingInfo[playerid][clothingid][cScaleX] = fScaleX; ClothingInfo[playerid][clothingid][cScaleY] = fScaleY; ClothingInfo[playerid][clothingid][cScaleZ] = fScaleZ; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE clothing SET pos_x = '%f', pos_y = '%f', pos_z = '%f', rot_x = '%f', rot_y = '%f', rot_z = '%f', scale_x = '%f', scale_y = '%f', scale_z = '%f' WHERE id = %i", fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ, ClothingInfo[playerid][clothingid][cID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_GREY, "Changes saved."); } if(!ClothingInfo[playerid][clothingid][cAttached]) { RemovePlayerAttachedObject(playerid, 9); } else { RemovePlayerAttachedObject(playerid, ClothingInfo[playerid][clothingid][cAttachedIndex]); SetPlayerAttachedObject(playerid, ClothingInfo[playerid][clothingid][cAttachedIndex], ClothingInfo[playerid][clothingid][cModel], ClothingInfo[playerid][clothingid][cBone], ClothingInfo[playerid][clothingid][cPosX], ClothingInfo[playerid][clothingid][cPosY], ClothingInfo[playerid][clothingid][cPosZ], ClothingInfo[playerid][clothingid][cRotX], ClothingInfo[playerid][clothingid][cRotY], ClothingInfo[playerid][clothingid][cRotZ], ClothingInfo[playerid][clothingid][cScaleX], ClothingInfo[playerid][clothingid][cScaleY], ClothingInfo[playerid][clothingid][cScaleZ]); } } } return 1; } public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz) { switch(PlayerInfo[playerid][pEditType]) { case EDIT_FURNITURE_PREVIEW: { if(response != EDIT_RESPONSE_UPDATE) { DestroyDynamicObject(PlayerInfo[playerid][pEditObject]); PlayerInfo[playerid][pEditObject] = INVALID_OBJECT_ID; if(response == EDIT_RESPONSE_FINAL) { new houseid = GetInsideHouse(playerid); if(houseid >= 0 && HasFurniturePerms(playerid, houseid)) { if(PlayerInfo[playerid][pCash] < furnitureArray[PlayerInfo[playerid][pSelected]][fPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You couldn't afford to purchase this item."); } new string[16]; GivePlayerCash(playerid, -furnitureArray[PlayerInfo[playerid][pSelected]][fPrice]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO furniture VALUES(null, %i, %i, '%e', %i, '%f', '%f', '%f', '%f', '%f', '%f', %i, %i, 0, 0)", HouseInfo[houseid][hID], furnitureArray[PlayerInfo[playerid][pSelected]][fModel], furnitureArray[PlayerInfo[playerid][pSelected]][fName], furnitureArray[PlayerInfo[playerid][pSelected]][fPrice], x, y, z, rx, ry, rz, HouseInfo[houseid][hInterior], HouseInfo[houseid][hWorld]); mysql_tquery(connectionID, queryBuffer); mysql_tquery(connectionID, "SELECT * FROM furniture WHERE id = LAST_INSERT_ID()", "OnQueryFinished", "ii", THREAD_LOAD_FURNITURE, HouseInfo[houseid][hLabels]); format(string, sizeof(string), "~r~-$%i", furnitureArray[PlayerInfo[playerid][pSelected]][fPrice]); GameTextForPlayer(playerid, string, 5000, 1); if(!strcmp(furnitureArray[PlayerInfo[playerid][pSelected]][fCategory], "Doors & gates")) { SendClientMessage(playerid, COLOR_WHITE, "** You can use /door to control your door and /lock to unlock or lock it."); } } } else if(response == EDIT_RESPONSE_CANCEL) { ShowDialogToPlayer(playerid, DIALOG_BUYFURNITURE2); } } } case EDIT_FURNITURE: { if(response != EDIT_RESPONSE_UPDATE) { if(response == EDIT_RESPONSE_FINAL) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE furniture SET pos_x = '%f', pos_y = '%f', pos_z = '%f', rot_x = '%f', rot_y = '%f', rot_z = '%f' WHERE id = %i", x, y, z, rx, ry, rz, Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID)); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_GREY, "Changes saved."); } ReloadFurniture(objectid, HouseInfo[PlayerInfo[playerid][pFurnitureHouse]][hLabels]); } } case EDIT_LAND_OBJECT_PREVIEW: { if(response != EDIT_RESPONSE_UPDATE) { DestroyDynamicObject(PlayerInfo[playerid][pEditObject]); PlayerInfo[playerid][pEditObject] = INVALID_OBJECT_ID; if(response == EDIT_RESPONSE_FINAL) { new landid = PlayerInfo[playerid][pObjectLand]; if(landid >= 0 && HasLandPerms(playerid, landid)) { if(PlayerInfo[playerid][pCash] < furnitureArray[PlayerInfo[playerid][pSelected]][fPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You couldn't afford to purchase this item."); } if(!IsPointInLand(landid, x, y)) { return SendClientMessage(playerid, COLOR_GREY, "The object has exceeded the boundaries for your land."); } new string[16]; GivePlayerCash(playerid, -furnitureArray[PlayerInfo[playerid][pSelected]][fPrice]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO landobjects VALUES(null, %i, %i, '%e', %i, '%f', '%f', '%f', '%f', '%f', '%f', 0, 0, '%f', '%f', '%f', '-1000.0', '-1000.0', '-1000.0')", LandInfo[landid][lID], furnitureArray[PlayerInfo[playerid][pSelected]][fModel], furnitureArray[PlayerInfo[playerid][pSelected]][fName], furnitureArray[PlayerInfo[playerid][pSelected]][fPrice], x, y, z, rx, ry, rz, x, y, z - 10.0); mysql_tquery(connectionID, queryBuffer); mysql_tquery(connectionID, "SELECT * FROM landobjects WHERE id = LAST_INSERT_ID()", "OnQueryFinished", "ii", THREAD_LOAD_LANDOBJECTS, LandInfo[landid][lLabels]); format(string, sizeof(string), "~r~-$%i", furnitureArray[PlayerInfo[playerid][pSelected]][fPrice]); GameTextForPlayer(playerid, string, 5000, 1); if(!strcmp(furnitureArray[PlayerInfo[playerid][pSelected]][fCategory], "Doors & gates")) { if(IsGateModel(furnitureArray[PlayerInfo[playerid][pSelected]][fModel])) { SendClientMessage(playerid, COLOR_WHITE, "** You can use /gate to open and close your gate. To change the destination coordinates, use /land and choose 'Edit object'."); } else { SendClientMessage(playerid, COLOR_WHITE, "** You can use /door to control your door and /lock to unlock or lock it."); } } } } else if(response == EDIT_RESPONSE_CANCEL) { ShowDialogToPlayer(playerid, DIALOG_LANDBUILD2); } } } case EDIT_LAND_OBJECT: { if(response != EDIT_RESPONSE_UPDATE) { if(response == EDIT_RESPONSE_FINAL) { if(!IsPointInLand(PlayerInfo[playerid][pObjectLand], x, y)) { SendClientMessage(playerid, COLOR_GREY, "The object has exceeded the boundaries for your land."); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE landobjects SET pos_x = '%f', pos_y = '%f', pos_z = '%f', rot_x = '%f', rot_y = '%f', rot_z = '%f' WHERE id = %i", x, y, z, rx, ry, rz, Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID)); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_GREY, "Changes saved."); } } ReloadLandObject(objectid, LandInfo[PlayerInfo[playerid][pObjectLand]][lLabels]); } } case EDIT_LAND_GATE_MOVE: { if(response != EDIT_RESPONSE_UPDATE) { if(response == EDIT_RESPONSE_FINAL) { if(!IsPointInLand(PlayerInfo[playerid][pObjectLand], x, y)) { SendClientMessage(playerid, COLOR_GREY, "The object has exceeded the boundaries for your land."); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE landobjects SET move_x = '%f', move_y = '%f', move_z = '%f', move_rx = '%f', move_ry = '%f', move_rz = '%f' WHERE id = %i", x, y, z, rx, ry, rz, Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID)); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_GREY, "Changes saved."); } } ReloadLandObject(objectid, LandInfo[PlayerInfo[playerid][pObjectLand]][lLabels]); } } } return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(PlayerInfo[playerid][pKicked]) return 0; // This is a fix to a known exploit where inserting '%' in the dialog box would crash the server. for(new i = 0, l = strlen(inputtext); i < l; i ++) { if(inputtext[i] == '%') inputtext[i] = '#'; } switch(dialogid) { case DIALOG_REGISTER: { if(response) { if(isnull(inputtext)) { ShowDialogToPlayer(playerid, DIALOG_REGISTER); return 1; } if(strlen(inputtext) < 4) { SendClientMessage(playerid, COLOR_LIGHTRED, "** Please choose a password containing at least 4 characters."); ShowDialogToPlayer(playerid, DIALOG_REGISTER); return 1; } WP_Hash(PlayerInfo[playerid][pPassword], 129, inputtext); ShowPlayerDialog(playerid, DIALOG_CONFIRMPASS, DIALOG_STYLE_PASSWORD, "Limitless Roleplay - Confirm Pass", "Please repeat your account password for verification:", "Submit", "Back"); } else { KickPlayer(playerid); } } case DIALOG_CONFIRMPASS: { if(response) { new password[129]; if(isnull(inputtext)) { return ShowPlayerDialog(playerid, DIALOG_CONFIRMPASS, DIALOG_STYLE_PASSWORD, "Limitless Roleplay - Confirm Pass", "Please repeat your account password for verification:", "Submit", "Back"); } WP_Hash(password, sizeof(password), inputtext); if(!strcmp(PlayerInfo[playerid][pPassword], password)) { gTotalRegistered++; SaveServerInfo(); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO users (username, password, regdate, lastlogin, ip) VALUES('%s', '%s', NOW(), NOW(), '%s')", GetPlayerNameEx(playerid), password, GetPlayerIP(playerid)); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_ACCOUNT_REGISTER, playerid); } else { ShowDialogToPlayer(playerid, DIALOG_REGISTER); SendClientMessage(playerid, COLOR_LIGHTRED, "** Your repeated password does not match your chosen password. Please try again."); } } else { ShowDialogToPlayer(playerid, DIALOG_REGISTER); } } case DIALOG_LOGIN: { if(response) { new specifiers[] = "%D of %M, %Y @ %k:%i", password[129]; if(isnull(inputtext)) { ShowDialogToPlayer(playerid, DIALOG_LOGIN); return 1; } WP_Hash(password, sizeof(password), inputtext); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT *, DATE_FORMAT(lastlogin, '%s') AS login_date FROM users WHERE username = '%s' AND password = '%s'", specifiers, GetPlayerNameEx(playerid), password); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_PROCESS_LOGIN, playerid); } else { KickPlayer(playerid); } } case DIALOG_GENDER: { if(response) { if(listitem == 0) { PlayerInfo[playerid][pGender] = 1; PlayerInfo[playerid][pSkin] = 230; SendClientMessage(playerid, COLOR_GREEN, "** Alright, so you're a Male. Please enter the approximate age of your character."); } else if(listitem == 1) { PlayerInfo[playerid][pGender] = 2; PlayerInfo[playerid][pSkin] = 77; SendClientMessage(playerid, COLOR_GREEN, "** Alright, so you're a Female. Please enter the approximate age of your character."); } ShowDialogToPlayer(playerid, DIALOG_AGE); } else { ShowDialogToPlayer(playerid, DIALOG_GENDER); } } case DIALOG_AGE: { if(response) { new age = strval(inputtext); if(!(13 <= age <= 99)) { ShowDialogToPlayer(playerid, DIALOG_AGE); SendClientMessage(playerid, COLOR_GREY, "You may only enter a number from 13 to 99. Please try again."); return 1; } PlayerInfo[playerid][pAge] = age; PlayerInfo[playerid][pReferralUID] = 0; //PlayerInfo[playerid][pTutorial] = 1; //PlayerInfo[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 3000, false, "ii", playerid, 1); //SendClientMessage(playerid, COLOR_GREEN, "** Good stuff! That's all we need right now. The tutorial will start in a moment."); //SetPlayerToSpawn(playerid); SendClientMessageEx(playerid, COLOR_GREEN, "** Alright, so you're %s and %i years old. Now you will need to pick a referrer.", (PlayerInfo[playerid][pGender] == 2) ? ("Female") : ("Male"), age); ShowDialogToPlayer(playerid, DIALOG_REFERRAL); } else { ShowDialogToPlayer(playerid, DIALOG_AGE); } } case DIALOG_REFERRAL: { if(response) { if(isnull(inputtext) || strlen(inputtext) > 24) { return ShowDialogToPlayer(playerid, DIALOG_REFERRAL); } if(!strcmp(inputtext, GetPlayerNameEx(playerid))) { SendClientMessage(playerid, COLOR_GREY, "You can't put down your own name as a referral."); return ShowDialogToPlayer(playerid, DIALOG_REFERRAL); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, ip, uid FROM users WHERE username = '%e'", inputtext); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_CHECK_REFERRAL, playerid); } else { PlayerInfo[playerid][pTutorial] = 1; PlayerInfo[playerid][pTutorialTimer] = SetTimerEx("TutorialTimer", 3000, false, "ii", playerid, 1); SendClientMessage(playerid, COLOR_GREEN, "** Good stuff! That's all we need right now. The tutorial will start in a moment."); } } case DIALOG_INTERIORS: { if(response) { TeleportToCoords(playerid, interiorArray[listitem][intX], interiorArray[listitem][intY], interiorArray[listitem][intZ], interiorArray[listitem][intA], interiorArray[listitem][intID], GetPlayerVirtualWorld(playerid)); GameTextForPlayer(playerid, "~w~Teleported", 5000, 1); } } case DIALOG_BUYFURNITURE1: { new houseid = GetInsideHouse(playerid); if(houseid == -1 || !HasFurniturePerms(playerid, houseid)) { return 0; } if(response) { PlayerInfo[playerid][pCategory] = listitem; ShowDialogToPlayer(playerid, DIALOG_BUYFURNITURE2); } } case DIALOG_BUYFURNITURE2: { new houseid = GetInsideHouse(playerid); if(houseid == -1 || !HasFurniturePerms(playerid, houseid)) { return 0; } if(response) { listitem += PlayerInfo[playerid][pFurnitureIndex]; if(PlayerInfo[playerid][pCash] < furnitureArray[listitem][fPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't purchase this. You don't have enough money for it."); } else { new Float:x, Float:y, Float:z, Float:a; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); PlayerInfo[playerid][pEditType] = EDIT_FURNITURE_PREVIEW; PlayerInfo[playerid][pEditObject] = CreateDynamicObject(furnitureArray[listitem][fModel], x + 2.0 * floatsin(-a, degrees), y + 2.0 * floatcos(-a, degrees), z + 1.0, 0.0, 0.0, ((19353 <= furnitureArray[listitem][fModel] <= 19417) || (19426 <= furnitureArray[listitem][fModel] <= 19465)) ? (a + 90.0) : (a), GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid)); PlayerInfo[playerid][pSelected] = listitem; SendClientMessageEx(playerid, COLOR_AQUA, "You are now previewing {FF6347}%s{33CCFF}. This furniture item costs {00AA00}$%i{33CCFF} to purchase.", furnitureArray[listitem][fName], furnitureArray[listitem][fPrice]); SendClientMessageEx(playerid, COLOR_AQUA, "Use your cursor to control the editor interface. Click the floppy disk to save changes."); EditDynamicObject(playerid, PlayerInfo[playerid][pEditObject]); } } else { ShowDialogToPlayer(playerid, DIALOG_BUYFURNITURE1); } } case DIALOG_BUY: { if(response) { new businessid = GetInsideBusiness(playerid); if(BusinessInfo[businessid][bProducts] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "This business is out of stock."); } if(BusinessInfo[businessid][bType] == BUSINESS_STORE) { switch(listitem) { case 0: { new price = 525; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pPhone] = random(100000) + 899999; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET phone = %i WHERE uid = %i", PlayerInfo[playerid][pPhone], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a mobile phone.", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_WHITE, "** Mobile phone purchased. Your new phone number is %i.", PlayerInfo[playerid][pPhone]); } case 1: { new price = 5000; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pWalkieTalkie]) { return SendClientMessage(playerid, COLOR_GREY, "You have a walkie talkie already."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pWalkieTalkie] = 1; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET walkietalkie = 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a walkie talkie.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Walkie talkie purchased. Use /wt to speak and /channel to change the frequency."); } case 2: { new price = 125; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pCigars] >= 20) { return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 20 cigars."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pCigars] += 10; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cigars = %i WHERE uid = %i", PlayerInfo[playerid][pCigars], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a pack of cigars.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Cigars purchased. Use /usecigar to smoke a cigar."); } case 3: { new price = 400; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pSpraycans] + 10 >= 20) { return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 20 spraycans."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pSpraycans] += 10; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET spraycans = %i WHERE uid = %i", PlayerInfo[playerid][pSpraycans], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received 10 spraycans.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Spraycans purchased. Use /colorcar and /paintcar in a vehicle to use them."); } case 4: { new price = 200; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pPhonebook]) { return SendClientMessage(playerid, COLOR_GREY, "You have a phonebook already."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pPhonebook] = 1; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET phonebook = 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a phonebook.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Phonebook purchased. Use /number to lookup a player's number."); } case 5: { new price = 200; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerWeaponEx(playerid, 43); GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a camera.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Camera purchased."); } case 6: { new price = 2400; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pMP3Player]) { return SendClientMessage(playerid, COLOR_GREY, "You have an MP3 player already."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pMP3Player] = 1; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET mp3player = 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received an MP3 player.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** MP3 player purchased. Use /mp3 for a list of options."); } case 7: { new price = 1000; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pFishingRod]) { return SendClientMessage(playerid, COLOR_GREY, "You have a fishing rod already."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pFishingRod] = 1; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fishingrod = 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a fishing rod.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Fishing rod purchased. Use /fish at the pier or in a boat to begin fishing."); } case 8: { new price = 790; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pFishingBait] + 10 >= 20) { return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 20 pieces of bait."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pFishingBait] += 10; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fishingbait = %i WHERE uid = %i", PlayerInfo[playerid][pFishingBait], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received fish bait.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Fishing bait purchased. Bait increases the odds of catching bigger fish."); } case 9: { new price = 1500; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pMuriaticAcid] + 1 >= 10) { return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 10 bottles of muriatic acid."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pMuriaticAcid] += 1; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET muriaticacid = %i WHERE uid = %i", PlayerInfo[playerid][pMuriaticAcid], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a bottle of muriatic acid.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Muriatic acid purchased."); } case 10: { new price = 1290; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pBakingSoda] + 1 >= 3) { return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 3 bottles of baking soda."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pBakingSoda] += 1; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET bakingsoda = %i WHERE uid = %i", PlayerInfo[playerid][pBakingSoda], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a bottle of baking soda.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Baking soda purchased."); } case 11: { new price = 1000; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pWatch]) { return SendClientMessage(playerid, COLOR_GREY, "You have a pocket watch already."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pWatch] = 1; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET watch = 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a pocket watch.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Pocket watch purchased. Use /watch to toggle it."); } case 12: { new price = 750; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pGPS]) { return SendClientMessage(playerid, COLOR_GREY, "You have a GPS already."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pGPS] = 1; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gps = 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a GPS.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** GPS purchased. Use /gps to toggle it."); } case 13: { new price = 500; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pGasCan] + 5 > 20) { return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 20 liters of gas."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } PlayerInfo[playerid][pGasCan] += 5; GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gascan = %i WHERE uid = %i", PlayerInfo[playerid][pGasCan], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a 5 liters of gasoline.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Gas can purchased. Use /gascan in a vehicle to refill its fuel."); } } } else if(BusinessInfo[businessid][bType] == BUSINESS_GUNSHOP) { if(PlayerInfo[playerid][pHours] < 2 || PlayerInfo[playerid][pWeaponRestricted]) { return SendClientMessage(playerid, COLOR_GREY, "You are either weapon restricted or you played less than 2 hours. You can't buy stuff here."); } switch(listitem) { case 0: { new price = 1500; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerHasWeapon(playerid, 22)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerWeaponEx(playerid, 22); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a 9mm pistol.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** 9mm pistol purchased."); } case 1: { new price = 2000; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerHasWeapon(playerid, 25)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerWeaponEx(playerid, 25); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a shotgun.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Shotgun purchased."); } case 2: { new price = 4000; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerHasWeapon(playerid, 33)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerWeaponEx(playerid, 33); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a country rifle.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Country rifle purchased."); } case 3: { new price = 1500; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } SetScriptArmour(playerid, 50.0); GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received light armor.", GetPlayerRPName(playerid), price); SendClientMessage(playerid, COLOR_WHITE, "** Light armor of 50 armor points purchased."); } } } else if(BusinessInfo[businessid][bType] == BUSINESS_CLOTHES) { new string[128]; format(string, sizeof(string), "%s's %s [%i products]", BusinessInfo[businessid][bOwner], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bProducts]); if(listitem == 0) { ShowDialogToPlayer(playerid, DIALOG_BUYCLOTHES); } else { PlayerInfo[playerid][pCategory] = listitem - 1; ShowDialogToPlayer(playerid, DIALOG_BUYCLOTHING); } } else if(BusinessInfo[businessid][bType] == BUSINESS_GYM) { switch(listitem) { case 0: { if(PlayerInfo[playerid][pFightStyle] == FIGHT_STYLE_NORMAL) { return SendClientMessage(playerid, COLOR_GREY, "You already have this fighting style."); } PlayerInfo[playerid][pFightStyle] = FIGHT_STYLE_NORMAL; SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightStyle]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fightstyle = %i WHERE uid = %i", PlayerInfo[playerid][pFightStyle], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_WHITE, "** You have chosen the normal fighting style."); } case 1: { new price = 4725; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pFightStyle] == FIGHT_STYLE_BOXING) { return SendClientMessage(playerid, COLOR_GREY, "You already have this fighting style."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; PlayerInfo[playerid][pFightStyle] = FIGHT_STYLE_BOXING; SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightStyle]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fightstyle = %i WHERE uid = %i", PlayerInfo[playerid][pFightStyle], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_WHITE, "** You have purchased the Boxing fighting style for $%i.", price); } case 2: { new price = 7650; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pFightStyle] == FIGHT_STYLE_KUNGFU) { return SendClientMessage(playerid, COLOR_GREY, "You already have this fighting style."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; PlayerInfo[playerid][pFightStyle] = FIGHT_STYLE_KUNGFU; SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightStyle]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fightstyle = %i WHERE uid = %i", PlayerInfo[playerid][pFightStyle], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_WHITE, "** You have purchased the Kung-Fu fighting style for $%i.", price); } case 3: { new price = 9275; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pFightStyle] == FIGHT_STYLE_KNEEHEAD) { return SendClientMessage(playerid, COLOR_GREY, "You already have this fighting style."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; PlayerInfo[playerid][pFightStyle] = FIGHT_STYLE_KNEEHEAD; SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightStyle]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fightstyle = %i WHERE uid = %i", PlayerInfo[playerid][pFightStyle], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_WHITE, "** You have purchased the Kneehead fighting style for $%i.", price); } case 4: { new price = 1250; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pFightStyle] == FIGHT_STYLE_GRABKICK) { return SendClientMessage(playerid, COLOR_GREY, "You already have this fighting style."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; PlayerInfo[playerid][pFightStyle] = FIGHT_STYLE_GRABKICK; SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightStyle]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fightstyle = %i WHERE uid = %i", PlayerInfo[playerid][pFightStyle], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_WHITE, "** You have purchased the Grabkick fighting style for $%i.", price); } case 5: { new price = 2950; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pFightStyle] == FIGHT_STYLE_ELBOW) { return SendClientMessage(playerid, COLOR_GREY, "You already have this fighting style."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; PlayerInfo[playerid][pFightStyle] = FIGHT_STYLE_ELBOW; SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightStyle]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fightstyle = %i WHERE uid = %i", PlayerInfo[playerid][pFightStyle], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_WHITE, "** You have purchased the Elbow fighting style for $%i.", price); } } } else if(BusinessInfo[businessid][bType] == BUSINESS_RESTAURANT) { switch(listitem) { case 0: { new price = 50; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerHealth(playerid, 10.0); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a bottled water.", GetPlayerRPName(playerid), price); } case 1: { new price = 100; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerHealth(playerid, 15.0); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a can of sprunk.", GetPlayerRPName(playerid), price); } case 2: { new price = 250; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerHealth(playerid, 20.0); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received french fries.", GetPlayerRPName(playerid), price); } case 3: { new price = 400; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerHealth(playerid, 25.0); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a hamburger.", GetPlayerRPName(playerid), price); } case 4: { new price = 450; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerHealth(playerid, 30.0); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a cheeseburger.", GetPlayerRPName(playerid), price); } case 5: { new price = 525; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerHealth(playerid, 25.0); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a mac & cheese.", GetPlayerRPName(playerid), price); } case 6: { new price = 600; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerHealth(playerid, 35.0); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a club sandwich.", GetPlayerRPName(playerid), price); } case 7: { new price = 925; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerHealth(playerid, 45.0); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received fish & chips.", GetPlayerRPName(playerid), price); } case 8: { new price = 1200; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerHealth(playerid, 55.0); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a pan pizza.", GetPlayerRPName(playerid), price); } } } else if(BusinessInfo[businessid][bType] == BUSINESS_BARCLUB) { switch(listitem) { case 0: { new price = 50; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); GivePlayerHealth(playerid, 10.0); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a bottled water.", GetPlayerRPName(playerid), price); } case 1: { new price = 100; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a can of sprunk.", GetPlayerRPName(playerid), price); } case 2: { new price = 200; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a bottle of beer.", GetPlayerRPName(playerid), price); } case 3: { new price = 350; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a bottle of wine.", GetPlayerRPName(playerid), price); } case 4: { new price = 475; if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy this."); } if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a bottle of whiskey.", GetPlayerRPName(playerid), price); } } } } } case DIALOG_BUYCLOTHES: { if(response) { new businessid = GetInsideBusiness(playerid); if(BusinessInfo[businessid][bProducts] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "This business is out of stock."); } if(PlayerInfo[playerid][pVIPPackage] == 0 && PlayerInfo[playerid][pCash] < 2000) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money. You can't buy new clothes."); } if(BusinessInfo[businessid][bType] == BUSINESS_CLOTHES) { new skinid; if(sscanf(inputtext, "i", skinid)) { return ShowDialogToPlayer(playerid, DIALOG_BUYCLOTHES); } if(!(0 <= skinid <= 311) || (265 <= skinid <= 267) || (274 <= skinid <= 288) || (300 <= skinid <= 302) || (306 <= skinid <= 311)) { SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use that skin as it is either invalid or faction reserved."); return ShowDialogToPlayer(playerid, DIALOG_BUYCLOTHES); } if(PlayerInfo[playerid][pVIPPackage] == 0) { new price = 2000; if(PlayerInfo[playerid][pTraderUpgrade] > 0) { price -= percent(price, (PlayerInfo[playerid][pTraderUpgrade] * 5)); SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Trader perk: Your level %i/3 trader perk reduced the price of this item to $%i.", PlayerInfo[playerid][pTraderUpgrade], price); } GivePlayerCash(playerid, -price); BusinessInfo[businessid][bCash] += price; BusinessInfo[businessid][bProducts]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i, products = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the shopkeeper and received a new set of clothes.", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_WHITE, "** You've changed your skin for $%i.", price); } else { SendClientMessage(playerid, COLOR_VIP, "** VIP perk: You changed your clothes free of charge."); } SetPlayerSkin(playerid, skinid); PlayerInfo[playerid][pSkin] = skinid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET skin = %i WHERE uid = %i", PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } } } case DIALOG_PICKLOAD: { if(response) { if(!PlayerHasJob(playerid, JOB_COURIER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you are not a Courier."); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 414 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 498) { return SendClientMessage(playerid, COLOR_GREY, "You need to be driving a Mule or a Boxville."); } if(!IsPlayerInRangeOfPoint(playerid, 8.0, -63.4372, -1121.4932, 1.1103)) { return SendClientMessage(playerid, COLOR_GREY, "You are not at the loading dock."); } switch(listitem) { case 0: { SendClientMessage(playerid, COLOR_AQUA, "You selected {FF6347}Grocery supplies{33CCFF}. Use /deliver at any Supermarket to drop off this shipment."); PlayerInfo[playerid][pShipment] = BUSINESS_STORE; } case 1: { SendClientMessage(playerid, COLOR_AQUA, "You selected {FF6347}Ammunition{33CCFF}. Use /deliver at any Gun Shop to drop off this shipment."); PlayerInfo[playerid][pShipment] = BUSINESS_GUNSHOP; } case 2: { SendClientMessage(playerid, COLOR_AQUA, "You selected {FF6347}Clothing items{33CCFF}. Use /deliver at any Clothes Shop to drop off this shipment."); PlayerInfo[playerid][pShipment] = BUSINESS_CLOTHES; } case 3: { SendClientMessage(playerid, COLOR_AQUA, "You selected {FF6347}Food & drinks{33CCFF}. Use /deliver at any Restaurant to drop off this shipment."); PlayerInfo[playerid][pShipment] = BUSINESS_RESTAURANT; } case 4: { SendClientMessage(playerid, COLOR_AQUA, "You selected {FF6347}Beverages{33CCFF}. Use /deliver at any Club/Bar to drop off this shipment."); PlayerInfo[playerid][pShipment] = BUSINESS_BARCLUB; } } PlayerInfo[playerid][pLastLoad] = gettime(); } } case DIALOG_UNREADTEXTS: { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM texts WHERE recipient_number = %i ORDER BY date DESC LIMIT 25", PlayerInfo[playerid][pPhone]); mysql_tquery(connectionID, queryBuffer); if(response) { cmd_texts(playerid, "\1"); } } case DIALOG_ATM: { if(response) { new amount, fee; if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_ATM); } if(amount < 1 || amount > PlayerInfo[playerid][pBank]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount. Please try again."); ShowDialogToPlayer(playerid, DIALOG_ATM); return 1; } if(amount > 1000000) { SendClientMessage(playerid, COLOR_GREY, "You can't withdraw more than $1,000,000 at a time."); ShowDialogToPlayer(playerid, DIALOG_ATM); return 1; } PlayerInfo[playerid][pBank] -= amount; GivePlayerCash(playerid, amount); if(PlayerInfo[playerid][pVIPPackage] == 0) { fee = percent(amount, 3); PlayerInfo[playerid][pBank] -= fee; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET bank = %i WHERE uid = %i", PlayerInfo[playerid][pBank], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s presses a button and withdraws some cash from the ATM.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have withdrawn $%i from your account. Your new balance is $%i.", amount, PlayerInfo[playerid][pBank]); if(fee) { SendClientMessageEx(playerid, COLOR_WHITE, "** A 3 percent convenience fee of $%i was deducted from your bank account.", fee); AddToTaxVault(fee); } else if(PlayerInfo[playerid][pVIPPackage] > 0) { SendClientMessage(playerid, COLOR_VIP, "** VIP perk: You do not pay the 3 percent convenience fee as you are a VIP!"); } } } case DIALOG_CHANGEPASS: { if(response) { if(strlen(inputtext) < 4) { return SendClientMessage(playerid, COLOR_GREY, "You need to enter a password greater than 4 characters."); } new password[129]; WP_Hash(password, sizeof(password), inputtext); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET password = '%s' WHERE uid = %i", password, PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_WHITE, "** Your account password was changed successfully."); } } case DIALOG_BUYCLOTHING: { if(response) { listitem += PlayerInfo[playerid][pClothingIndex]; if(PlayerInfo[playerid][pCash] < clothingArray[listitem][clothingPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't purchase this. You don't have enough money for it."); } else { SetPlayerAttachedObject(playerid, 9, clothingArray[listitem][clothingModel], clothingArray[listitem][clothingBone]); PlayerInfo[playerid][pEditType] = EDIT_CLOTHING_PREVIEW; PlayerInfo[playerid][pSelected] = listitem; SendClientMessageEx(playerid, COLOR_AQUA, "You are now previewing {FF6347}%s{33CCFF}. This clothing item costs {00AA00}$%i{33CCFF} to purchase.", clothingArray[listitem][clothingName], clothingArray[listitem][clothingPrice]); SendClientMessageEx(playerid, COLOR_AQUA, "Use your cursor to control the editor interface. Click the floppy disk to save changes."); EditAttachedObject(playerid, 9); } } } case DIALOG_CLOTHING: { if(response) { if(!ClothingInfo[playerid][listitem][cExists]) { return SendClientMessage(playerid, COLOR_GREY, "The slot you've selected does not contain any item of clothing."); } if(ClothingInfo[playerid][listitem][cAttached]) { ShowPlayerDialog(playerid, DIALOG_CLOTHINGMENU, DIALOG_STYLE_LIST, ClothingInfo[playerid][listitem][cName], "Detach\nEdit\nDelete", "Select", "Cancel"); } else { ShowPlayerDialog(playerid, DIALOG_CLOTHINGMENU, DIALOG_STYLE_LIST, ClothingInfo[playerid][listitem][cName], "Attach\nEdit\nDelete", "Select", "Cancel"); } PlayerInfo[playerid][pSelected] = listitem; } } case DIALOG_CLOTHINGMENU: { if(response) { new clothingid = PlayerInfo[playerid][pSelected]; switch(listitem) { case 0: { if(!ClothingInfo[playerid][clothingid][cAttached]) { ClothingInfo[playerid][clothingid][cAttachedIndex] = GetAvailableAttachedSlot(playerid); if(ClothingInfo[playerid][clothingid][cAttachedIndex] >= 0) { ClothingInfo[playerid][clothingid][cAttached] = 1; SetPlayerAttachedObject(playerid, ClothingInfo[playerid][clothingid][cAttachedIndex], ClothingInfo[playerid][clothingid][cModel], ClothingInfo[playerid][clothingid][cBone], ClothingInfo[playerid][clothingid][cPosX], ClothingInfo[playerid][clothingid][cPosY], ClothingInfo[playerid][clothingid][cPosZ], ClothingInfo[playerid][clothingid][cRotX], ClothingInfo[playerid][clothingid][cRotY], ClothingInfo[playerid][clothingid][cRotZ], ClothingInfo[playerid][clothingid][cScaleX], ClothingInfo[playerid][clothingid][cScaleY], ClothingInfo[playerid][clothingid][cScaleZ]); SendClientMessageEx(playerid, COLOR_WHITE, "** %s attached to slot %i/5.", ClothingInfo[playerid][clothingid][cName], ClothingInfo[playerid][clothingid][cAttachedIndex] + 1); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE clothing SET attached = 1 WHERE id = %i", ClothingInfo[playerid][clothingid][cID]); mysql_tquery(connectionID, queryBuffer); } else { SendClientMessage(playerid, COLOR_GREY, "No attachment slots available. You can only have up to five clothing items attached at once."); } } else { RemovePlayerAttachedObject(playerid, ClothingInfo[playerid][clothingid][cAttachedIndex]); ClothingInfo[playerid][clothingid][cAttached] = 0; ClothingInfo[playerid][clothingid][cAttachedIndex] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE clothing SET attached = 0 WHERE id = %i", ClothingInfo[playerid][clothingid][cID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_WHITE, "** %s detached and added to inventory.", ClothingInfo[playerid][clothingid][cName]); } } case 1: { ShowPlayerDialog(playerid, DIALOG_CLOTHINGEDIT, DIALOG_STYLE_LIST, "Edition menu", "Edit offset\nChange bone", "Select", "Cancel"); } case 2: { RemovePlayerAttachedObject(playerid, ClothingInfo[playerid][clothingid][cAttachedIndex]); SendClientMessageEx(playerid, COLOR_WHITE, "** %s deleted from your clothing inventory.", ClothingInfo[playerid][clothingid][cName]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM clothing WHERE id = %i", ClothingInfo[playerid][clothingid][cID]); mysql_tquery(connectionID, queryBuffer); ClothingInfo[playerid][clothingid][cAttached] = 0; ClothingInfo[playerid][clothingid][cAttachedIndex] = -1; ClothingInfo[playerid][clothingid][cExists] = 0; ClothingInfo[playerid][clothingid][cID] = 0; ClothingInfo[playerid][clothingid][cName] = 0; } } } } case DIALOG_CLOTHINGEDIT: { if(response) { switch(listitem) { case 0: { PlayerInfo[playerid][pEditType] = EDIT_CLOTHING; if(!ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cAttached]) { SetPlayerAttachedObject(playerid, 9, ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cModel], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cBone], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cPosX], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cPosY], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cPosZ], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cRotX], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cRotY], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cRotZ], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cScaleX], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cScaleY], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cScaleZ]); EditAttachedObject(playerid, 9); } else { EditAttachedObject(playerid, ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cAttachedIndex]); } GameTextForPlayer(playerid, "~w~Editing Mode~n~~g~Click disk to save~n~~r~Press ESC to cancel", 5000, 1); } case 1: { ShowPlayerDialog(playerid, DIALOG_CLOTHINGBONE, DIALOG_STYLE_LIST, "Choose a new bone for this clothing item.", "Spine\nHead\nLeft upper arm\nRight upper arm\nLeft hand\nRight hand\nLeft thigh\nRight thigh\nLeft foot\nRight foot\nRight calf\nLeft calf\nLeft forearm\nRight forearm\nLeft shoulder\nRight shoulder\nNeck\nJaw", "Select", "Cancel"); } } } } case DIALOG_CLOTHINGBONE: { if(response) { ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cBone] = listitem + 1; if(ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cAttached]) { RemovePlayerAttachedObject(playerid, ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cAttachedIndex]); SetPlayerAttachedObject(playerid, ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cAttachedIndex], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cModel], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cBone], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cPosX], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cPosY], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cPosZ], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cRotX], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cRotY], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cRotZ], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cScaleX], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cScaleY], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cScaleZ]); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE clothing SET boneid = %i WHERE id = %i", ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cBone], ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_WHITE, "** Bone for {00AA00}%s{FFFFFF} changed to '%s'.", ClothingInfo[playerid][PlayerInfo[playerid][pSelected]][cName], inputtext); } } case DIALOG_BUYVEHICLE: { if(response) { if(PlayerInfo[playerid][pCash] < vehicleArray[listitem][carPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this vehicle."); } new string[128]; PlayerInfo[playerid][pSelected] = listitem; format(string, sizeof(string), "{FFD700}Confirmation:\nAre you sure you want to purchase this %s for {00AA00}$%i{FFD700}?", vehicleNames[vehicleArray[listitem][carModel] - 400], vehicleArray[listitem][carPrice]); ShowPlayerDialog(playerid, DIALOG_BUYVEHICLE2, DIALOG_STYLE_MSGBOX, "Purchase confirmation", string, "Yes", "No"); } } case DIALOG_BUYVEHICLE2: { if(response) { if(PlayerInfo[playerid][pGangCar]) { new string[20]; listitem = PlayerInfo[playerid][pSelected]; if(PlayerInfo[playerid][pCash] < vehicleArray[listitem][carPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this vehicle."); } if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not rank 5+ in any gang at the moment."); } if(GetGangVehicles(PlayerInfo[playerid][pGang]) >= GetGangVehicleLimit(PlayerInfo[playerid][pGang])) { return SendClientMessageEx(playerid, COLOR_GREY, "Your gang can't have more than %i vehicles at its level.", GetGangVehicleLimit(PlayerInfo[playerid][pGang])); } switch(random(3)) { case 0: mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO vehicles (modelid, price, pos_x, pos_y, pos_z, pos_a, gangid) VALUES(%i, %i, '562.3970', '-1283.8485', '17.0007', '0.0000', %i)", vehicleArray[listitem][carModel], vehicleArray[listitem][carPrice], PlayerInfo[playerid][pGang]); case 1: mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO vehicles (modelid, price, pos_x, pos_y, pos_z, pos_a, gangid) VALUES(%i, %i, '557.8670', '-1283.9822', '17.0007', '0.0000', %i)", vehicleArray[listitem][carModel], vehicleArray[listitem][carPrice], PlayerInfo[playerid][pGang]); case 2: mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO vehicles (modelid, price, pos_x, pos_y, pos_z, pos_a, gangid) VALUES(%i, %i, '552.8177', '-1284.1307', '17.0007', '0.0000', %i)", vehicleArray[listitem][carModel], vehicleArray[listitem][carPrice], PlayerInfo[playerid][pGang]); } AddPointMoney(POINT_AUTOEXPORT, percent(vehicleArray[listitem][carPrice], 3)); mysql_tquery(connectionID, queryBuffer); mysql_tquery(connectionID, "SELECT * FROM vehicles WHERE id = LAST_INSERT_ID()", "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, -1); format(string, sizeof(string), "~r~-$%i", vehicleArray[listitem][carPrice]); GameTextForPlayer(playerid, string, 5000, 1); GivePlayerCash(playerid, -vehicleArray[listitem][carPrice]); PlayerInfo[playerid][pGangCar] = 0; SendClientMessageEx(playerid, COLOR_GREEN, "%s purchased for your gang for $%i. /ganghelp for more commands.", vehicleNames[vehicleArray[listitem][carModel] - 400], vehicleArray[listitem][carPrice]); Log_Write("log_give", "%s (uid: %i) purchased a %s for %s for $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], vehicleNames[vehicleArray[listitem][carModel] - 400], GangInfo[PlayerInfo[playerid][pGang]][gName], vehicleArray[listitem][carPrice]); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM vehicles WHERE ownerid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer, "OnPlayerAttemptBuyVehicle", "ii", playerid, PlayerInfo[playerid][pSelected]); } } } case DIALOG_SPAWNCAR: { if(response) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE ownerid = %i LIMIT %i, 1", PlayerInfo[playerid][pID], listitem); mysql_tquery(connectionID, queryBuffer, "OnPlayerSpawnVehicle", "ii", playerid, false); } } case DIALOG_DESPAWNCAR: { if(response) { new count; for(new i = 1; i < MAX_VEHICLES; i ++) { if((VehicleInfo[i][vID] > 0 && IsVehicleOwner(playerid, i)) && (count++ == listitem)) { if(IsVehicleOccupied(i) && GetVehicleDriver(i) != playerid) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle is occupied."); } SendClientMessageEx(playerid, COLOR_AQUA, "Your {FF6347}%s{33CCFF} which is located in %s has been despawned.", GetVehicleName(i), GetVehicleZoneName(i)); DespawnVehicle(i); return 1; } } } } case DIALOG_FINDCAR: { if(response) { new count, garageid; for(new i = 1; i < MAX_VEHICLES; i ++) { if((VehicleInfo[i][vID] > 0 && IsVehicleOwner(playerid, i)) && (count++ == listitem)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; if((garageid = GetVehicleGarage(i)) >= 0) { SetPlayerCheckpoint(playerid, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ], 3.0); SendClientMessageEx(playerid, COLOR_YELLOW, "** Your %s is located in a garage. Checkpoint marked at the garage's location.", GetVehicleName(i)); } else { new Float:x, Float:y, Float:z; GetVehiclePos(i, x, y, z); SetPlayerCheckpoint(playerid, x, y, z, 3.0); SendClientMessageEx(playerid, COLOR_YELLOW, "** Your %s is located in %s. Checkpoint marked at the location.", GetVehicleName(i), GetZoneName(x, y, z)); } return 1; } } } } case DIALOG_BIZINTERIOR: { if(response) { new businessid = PlayerInfo[playerid][pSelected]; foreach(new i : Player) { if(GetInsideBusiness(i) == businessid) { SetPlayerPos(i, bizInteriorArray[listitem][intX], bizInteriorArray[listitem][intY], bizInteriorArray[listitem][intZ]); SetPlayerFacingAngle(i, bizInteriorArray[listitem][intA]); SetPlayerInterior(i, bizInteriorArray[listitem][intID]); SetCameraBehindPlayer(i); } } BusinessInfo[businessid][bIntX] = bizInteriorArray[listitem][intX]; BusinessInfo[businessid][bIntY] = bizInteriorArray[listitem][intY]; BusinessInfo[businessid][bIntZ] = bizInteriorArray[listitem][intZ]; BusinessInfo[businessid][bIntA] = bizInteriorArray[listitem][intA]; BusinessInfo[businessid][bInterior] = bizInteriorArray[listitem][intID]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i WHERE id = %i", BusinessInfo[businessid][bIntX], BusinessInfo[businessid][bIntY], BusinessInfo[businessid][bIntZ], BusinessInfo[businessid][bIntA], BusinessInfo[businessid][bInterior], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); ReloadBusiness(businessid); SendClientMessageEx(playerid, COLOR_AQUA, "You've changed the interior of business %i to %s.", businessid, bizInteriorArray[listitem][intName]); } } case DIALOG_FACTIONLOCKER: { if((response) && PlayerInfo[playerid][pFaction] >= 0 && IsPlayerInRangeOfPoint(playerid, 3.0, FactionInfo[PlayerInfo[playerid][pFaction]][fLockerX], FactionInfo[PlayerInfo[playerid][pFaction]][fLockerY], FactionInfo[PlayerInfo[playerid][pFaction]][fLockerZ])) { switch(FactionInfo[PlayerInfo[playerid][pFaction]][fType]) { case FACTION_POLICE, FACTION_MEDIC, FACTION_FEDERAL: { if(listitem == 0) // Toggle duty { if(!PlayerInfo[playerid][pDuty]) { if(IsLawEnforcement(playerid)) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s clocks in and grabs their police issued equipment from the locker.", GetPlayerRPName(playerid)); } else if(FactionInfo[PlayerInfo[playerid][pFaction]][fType] == FACTION_MEDIC) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s clocks in and grabs their medical supplies from the locker.", GetPlayerRPName(playerid)); } PlayerInfo[playerid][pDuty] = 1; SetPlayerHealth(playerid, 100.0); SetScriptArmour(playerid, 100.0); } else { PlayerInfo[playerid][pDuty] = 0; ResetPlayerWeaponsEx(playerid); SetScriptArmour(playerid, 0.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s clocks out and puts their equipment back in the locker.", GetPlayerRPName(playerid)); } } else if(listitem == 1) // Equipment { if(IsLawEnforcement(playerid)) { ShowPlayerDialog(playerid, DIALOG_FACTIONEQUIPMENT, DIALOG_STYLE_LIST, "Equipment", "Kevlar Vest\nMedkit\nNitestick\nSpraycan\nDesert Eagle\nShotgun\nMP5\nM4\nSPAS-12\nSniper Rifle", "Select", "Cancel"); } else { ShowPlayerDialog(playerid, DIALOG_FACTIONEQUIPMENT, DIALOG_STYLE_LIST, "Equipment", "Kevlar Vest\nMedkit\nFire Extinguisher\nShotgun\nJaws of Life\nPainkillers", "Select", "Cancel"); } } else if(listitem == 2) // Uniforms { if(!GetFactionSkinCount(PlayerInfo[playerid][pFaction])) { return SendClientMessage(playerid, COLOR_GREY, "There are no uniforms setup for your faction."); } if(PlayerInfo[playerid][pClothes] >= 0) { PlayerInfo[playerid][pSkin] = PlayerInfo[playerid][pClothes]; PlayerInfo[playerid][pClothes] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET skin = %i, clothes = -1 WHERE uid = %i", PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s switches back to their old outfit.", GetPlayerRPName(playerid)); } else { PlayerInfo[playerid][pSkinSelected] = -1; ShowPlayerDialog(playerid, DIALOG_FACTIONSKINS, DIALOG_STYLE_MSGBOX, "Uniform selection", "Press {00AA00}>> Next{A9C4E4} to browse through available uniforms.", ">> Next", "Confirm"); } } } case FACTION_GOVERNMENT, FACTION_NEWS: { if(listitem == 0) // Equipment { if(FactionInfo[PlayerInfo[playerid][pFaction]][fType] == FACTION_GOVERNMENT) { ShowPlayerDialog(playerid, DIALOG_FACTIONEQUIPMENT, DIALOG_STYLE_LIST, "Equipment", "Kevlar Vest\nMedkit\nDesert Eagle\nShotgun\nMP5\nM4\nSPAS-12", "Select", "Cancel"); } else { ShowPlayerDialog(playerid, DIALOG_FACTIONEQUIPMENT, DIALOG_STYLE_LIST, "Equipment", "Kevlar Vest\nMedkit\nCamera", "Select", "Cancel"); } } else if(listitem == 1) // Uniforms { if(!GetFactionSkinCount(PlayerInfo[playerid][pFaction])) { return SendClientMessage(playerid, COLOR_GREY, "There are no uniforms setup for your faction."); } if(PlayerInfo[playerid][pClothes] >= 0) { PlayerInfo[playerid][pSkin] = PlayerInfo[playerid][pClothes]; PlayerInfo[playerid][pClothes] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET skin = %i, clothes = -1 WHERE uid = %i", PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s switches back to their old outfit.", GetPlayerRPName(playerid)); } else { PlayerInfo[playerid][pSkinSelected] = -1; ShowPlayerDialog(playerid, DIALOG_FACTIONSKINS, DIALOG_STYLE_MSGBOX, "Uniform selection", "Press {00AA00}>> Next{A9C4E4} to browse through available uniforms.", ">> Next", "Confirm"); } } } case FACTION_HITMAN: { if(listitem == 0) // Order weapons { ShowPlayerDialog(playerid, DIALOG_FACTIONEQUIPMENT, DIALOG_STYLE_LIST, "Order weapons", "Kevlar Vest ($1000)\nKnife ($1500)\nSilenced pistol ($1000)\nShotgun ($1500)\nDesert Eagle ($2000)\nMP5 ($2500)\nCountry rifle ($4000)\nAK-47 ($6000)\nM4 ($8000)\nSPAS-12 ($8500)\nSniper rifle ($9000)\nBomb ($7500)", "Order", "Cancel"); } else if(listitem == 1) // Change clothes { ShowPlayerDialog(playerid, DIALOG_HITMANCLOTHES, DIALOG_STYLE_INPUT, "Change clothes", "Please input the ID of the skin you wish to purchase.\n(( List of skins: http://wiki.sa-mp.com/wiki/Skins:All ))", "Submit", "Cancel"); } } } } } case DIALOG_FACTIONEQUIPMENT: { if((response) && PlayerInfo[playerid][pFaction] >= 0 && IsPlayerInRangeOfPoint(playerid, 3.0, FactionInfo[PlayerInfo[playerid][pFaction]][fLockerX], FactionInfo[PlayerInfo[playerid][pFaction]][fLockerY], FactionInfo[PlayerInfo[playerid][pFaction]][fLockerZ])) { switch(FactionInfo[PlayerInfo[playerid][pFaction]][fType]) { case FACTION_POLICE, FACTION_FEDERAL: { switch(listitem) { case 0: { SetScriptArmour(playerid, 100.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a kevlar vest from the locker and puts it on.", GetPlayerRPName(playerid)); } case 1: { SetPlayerHealth(playerid, 100.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a medkit from the locker and opens it.", GetPlayerRPName(playerid)); } case 2: { GivePlayerWeaponEx(playerid, 3); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a nitestick from the locker.", GetPlayerRPName(playerid)); } case 3: { GivePlayerWeaponEx(playerid, 41); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a can of pepper spray from the locker.", GetPlayerRPName(playerid)); } case 4: { GivePlayerWeaponEx(playerid, 24); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a Desert Eagle from the locker.", GetPlayerRPName(playerid)); } case 5: { GivePlayerWeaponEx(playerid, 25); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a Desert Eagle from the locker.", GetPlayerRPName(playerid)); } case 6: { GivePlayerWeaponEx(playerid, 29); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs an MP5 from the locker.", GetPlayerRPName(playerid)); } case 7: { GivePlayerWeaponEx(playerid, 31); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs an M4 from the locker.", GetPlayerRPName(playerid)); } case 8: { GivePlayerWeaponEx(playerid, 27); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a SPAS-12 from the locker.", GetPlayerRPName(playerid)); } case 9: { GivePlayerWeaponEx(playerid, 34); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a Sniper Rifle from the locker.", GetPlayerRPName(playerid)); } } } case FACTION_MEDIC: { switch(listitem) { case 0: { SetScriptArmour(playerid, 100.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a kevlar vest from the locker and puts it on.", GetPlayerRPName(playerid)); } case 1: { SetPlayerHealth(playerid, 100.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a medkit from the locker and opens it.", GetPlayerRPName(playerid)); } case 2: { GivePlayerWeaponEx(playerid, 42); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a fire extinguisher from the locker.", GetPlayerRPName(playerid)); } case 3: { GivePlayerWeaponEx(playerid, 25); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a Shotgun from the locker.", GetPlayerRPName(playerid)); } case 4: { GivePlayerWeaponEx(playerid, 9); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a jaws of life from the locker.", GetPlayerRPName(playerid)); } case 5: { PlayerInfo[playerid][pPainkillers] = 5; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a five pack of painkillers from the locker.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", PlayerInfo[playerid][pPainkillers], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } } } case FACTION_GOVERNMENT: { switch(listitem) { case 0: { SetScriptArmour(playerid, 100.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a kevlar vest from the locker and puts it on.", GetPlayerRPName(playerid)); } case 1: { SetPlayerHealth(playerid, 100.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a medkit from the locker and opens it.", GetPlayerRPName(playerid)); } case 2: { GivePlayerWeaponEx(playerid, 24); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a Desert Eagle from the locker.", GetPlayerRPName(playerid)); } case 3: { GivePlayerWeaponEx(playerid, 25); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a Shotgun from the locker.", GetPlayerRPName(playerid)); } case 4: { GivePlayerWeaponEx(playerid, 29); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs an MP5 from the locker.", GetPlayerRPName(playerid)); } case 5: { GivePlayerWeaponEx(playerid, 31); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs an M4 from the locker.", GetPlayerRPName(playerid)); } case 6: { GivePlayerWeaponEx(playerid, 27); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a SPAS-12 from the locker.", GetPlayerRPName(playerid)); } case 7: { GivePlayerWeaponEx(playerid, 34); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a Sniper Rifle from the locker.", GetPlayerRPName(playerid)); } } } case FACTION_NEWS: { switch(listitem) { case 0: { SetScriptArmour(playerid, 100.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a kevlar vest from the locker and puts it on.", GetPlayerRPName(playerid)); } case 1: { SetPlayerHealth(playerid, 100.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a medkit from the locker and opens it.", GetPlayerRPName(playerid)); } case 2: { GivePlayerWeaponEx(playerid, 43); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs a digital camera from the locker.", GetPlayerRPName(playerid)); } } } case FACTION_HITMAN: { switch(listitem) { case 0: { if(PlayerInfo[playerid][pCash] < 1000) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon."); } GivePlayerCash(playerid, -1000); SetScriptArmour(playerid, 100.0); SendClientMessageEx(playerid, COLOR_AQUA, "** You ordered a kevlar vest for $1000."); GameTextForPlayer(playerid, "~r~-$1000", 5000, 1); } case 1: { if(PlayerInfo[playerid][pCash] < 1500) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon."); } GivePlayerWeaponEx(playerid, 4); GivePlayerCash(playerid, -1500); SendClientMessageEx(playerid, COLOR_AQUA, "** You ordered a knife for $1500."); GameTextForPlayer(playerid, "~r~-$1500", 5000, 1); } case 2: { if(PlayerInfo[playerid][pCash] < 1000) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon."); } GivePlayerWeaponEx(playerid, 23); GivePlayerCash(playerid, -1000); SendClientMessageEx(playerid, COLOR_AQUA, "** You ordered a silenced pistol for $1000."); GameTextForPlayer(playerid, "~r~-$1000", 5000, 1); } case 3: { if(PlayerInfo[playerid][pCash] < 1500) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon."); } GivePlayerWeaponEx(playerid, 25); GivePlayerCash(playerid, -1500); SendClientMessageEx(playerid, COLOR_AQUA, "** You ordered a shotgun for $1500."); GameTextForPlayer(playerid, "~r~-$1500", 5000, 1); } case 4: { if(PlayerInfo[playerid][pCash] < 2000) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon."); } GivePlayerWeaponEx(playerid, 24); GivePlayerCash(playerid, -2000); SendClientMessageEx(playerid, COLOR_AQUA, "** You ordered a Desert Eagle for $2000."); GameTextForPlayer(playerid, "~r~-$2000", 5000, 1); } case 5: { if(PlayerInfo[playerid][pCash] < 2500) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon."); } GivePlayerWeaponEx(playerid, 29); GivePlayerCash(playerid, -2500); SendClientMessageEx(playerid, COLOR_AQUA, "** You ordered an MP5 for $2500."); GameTextForPlayer(playerid, "~r~-$2500", 5000, 1); } case 6: { if(PlayerInfo[playerid][pCash] < 4000) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon."); } GivePlayerWeaponEx(playerid, 33); GivePlayerCash(playerid, -4000); SendClientMessageEx(playerid, COLOR_AQUA, "** You ordered a country rifle for $4000."); GameTextForPlayer(playerid, "~r~-$4000", 5000, 1); } case 7: { if(PlayerInfo[playerid][pCash] < 6000) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon."); } GivePlayerWeaponEx(playerid, 30); GivePlayerCash(playerid, -6000); SendClientMessageEx(playerid, COLOR_AQUA, "** You ordered an AK-47 for $6000."); GameTextForPlayer(playerid, "~r~-$6000", 5000, 1); } case 8: { if(PlayerInfo[playerid][pCash] < 8000) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon."); } GivePlayerWeaponEx(playerid, 31); GivePlayerCash(playerid, -8000); SendClientMessageEx(playerid, COLOR_AQUA, "** You ordered an M4 for $8000."); GameTextForPlayer(playerid, "~r~-$8000", 5000, 1); } case 9: { if(PlayerInfo[playerid][pCash] < 8500) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon."); } GivePlayerWeaponEx(playerid, 27); GivePlayerCash(playerid, -8500); SendClientMessageEx(playerid, COLOR_AQUA, "** You ordered a SPAS-12 for $8500."); GameTextForPlayer(playerid, "~r~-$8500", 5000, 1); } case 10: { if(PlayerInfo[playerid][pCash] < 9000) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon."); } GivePlayerWeaponEx(playerid, 34); GivePlayerCash(playerid, -9000); SendClientMessageEx(playerid, COLOR_AQUA, "** You ordered a sniper rifle for $9000."); GameTextForPlayer(playerid, "~r~-$9000", 5000, 1); } case 11: { if(PlayerInfo[playerid][pCash] < 7500) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford this weapon."); } if(PlayerInfo[playerid][pBombs] > 3) { return SendClientMessage(playerid, COLOR_GREY, "You have more than 3 bombs. You can't buy anymore."); } PlayerInfo[playerid][pBombs]++; GivePlayerCash(playerid, -7500); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET bombs = %i WHERE uid = %i", PlayerInfo[playerid][pBombs], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You ordered a bomb for $7500. /plantbomb to place the bomb."); GameTextForPlayer(playerid, "~r~-$7500", 5000, 1); } } } } } } case DIALOG_FACTIONSKINS: { if(PlayerInfo[playerid][pFaction] >= 0 && IsPlayerInRangeOfPoint(playerid, 3.0, FactionInfo[PlayerInfo[playerid][pFaction]][fLockerX], FactionInfo[PlayerInfo[playerid][pFaction]][fLockerY], FactionInfo[PlayerInfo[playerid][pFaction]][fLockerZ])) { if(response) { new index = PlayerInfo[playerid][pSkinSelected] + 1; if(index >= MAX_FACTION_SKINS) { // When the player is shown the dialog for the first time, their skin isn't changed until they click >> Next. SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); PlayerInfo[playerid][pSkinSelected] = -1; } else { // Find the next skin in the array. for(new i = index; i < MAX_FACTION_SKINS; i ++) { if(FactionInfo[PlayerInfo[playerid][pFaction]][fSkins][i] != 0) { SetPlayerSkin(playerid, FactionInfo[PlayerInfo[playerid][pFaction]][fSkins][i]); PlayerInfo[playerid][pSkinSelected] = i; break; } } if(index == PlayerInfo[playerid][pSkinSelected] + 1) { // Looks like there was no skin found. So, we'll go back to the very first valid skin in the skin array. for(new i = 0; i < MAX_FACTION_SKINS; i ++) { if(FactionInfo[PlayerInfo[playerid][pFaction]][fSkins][i] != 0) { SetPlayerSkin(playerid, FactionInfo[PlayerInfo[playerid][pFaction]][fSkins][i]); PlayerInfo[playerid][pSkinSelected] = i; break; } } } } ShowPlayerDialog(playerid, DIALOG_FACTIONSKINS, DIALOG_STYLE_MSGBOX, "Uniform selection", "Press {00AA00}>> Next{A9C4E4} to browse through available uniforms.", ">> Next", "Confirm"); } else { PlayerInfo[playerid][pClothes] = PlayerInfo[playerid][pSkin]; PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid); PlayerInfo[playerid][pSkinSelected] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET skin = %i, clothes = %i WHERE uid = %i", PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pClothes], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes a uniform out of the locker and puts it on.", GetPlayerRPName(playerid)); } } } case DIALOG_HITMANCLOTHES: { if((response) && PlayerInfo[playerid][pFaction] >= 0 && IsPlayerInRangeOfPoint(playerid, 3.0, FactionInfo[PlayerInfo[playerid][pFaction]][fLockerX], FactionInfo[PlayerInfo[playerid][pFaction]][fLockerY], FactionInfo[PlayerInfo[playerid][pFaction]][fLockerZ])) { new skinid; if(sscanf(inputtext, "i", skinid)) { return ShowPlayerDialog(playerid, DIALOG_HITMANCLOTHES, DIALOG_STYLE_INPUT, "Change clothes", "Please input the ID of the skin you wish to purchase.\n(( List of skins: http://wiki.sa-mp.com/wiki/Skins:All ))", "Submit", "Cancel"); } if(!(0 <= skinid <= 311)) { SendClientMessage(playerid, COLOR_GREY, "Invalid skin."); return ShowPlayerDialog(playerid, DIALOG_HITMANCLOTHES, DIALOG_STYLE_INPUT, "Change clothes", "Please input the ID of the skin you wish to purchase.\n(( List of skins: http://wiki.sa-mp.com/wiki/Skins:All ))", "Submit", "Cancel"); } PlayerInfo[playerid][pSkin] = skinid; SetPlayerSkin(playerid, skinid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET skin = %i WHERE uid = %i", PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); GameTextForPlayer(playerid, "~w~Clothes changed for free", 3000, 3); } } case DIALOG_MDC: { if((response) && IsLawEnforcement(playerid)) { switch(listitem) { case 0: { static string[2048], count; string = "Suspect\tLocation\tWanted level"; count = 0; foreach(new i : Player) { if(PlayerInfo[i][pWantedLevel] > 0) { format(string, sizeof(string), "%s\n%s\t%s\t%i/6", string, GetPlayerRPName(i), GetPlayerZoneName(i), PlayerInfo[i][pWantedLevel]); count++; } } if(!count) { return SendClientMessage(playerid, COLOR_GREY, "There are currently no wanted suspects online."); } ShowPlayerDialog(playerid, DIALOG_MDCWANTED, DIALOG_STYLE_TABLIST_HEADERS, "Suspects wanted", string, "Track", "Cancel"); } case 1: { ShowPlayerDialog(playerid, DIALOG_PLAYERLOOKUP, DIALOG_STYLE_INPUT, "Player lookup", "Enter the full name of the player to lookup:", "Submit", "Cancel"); } case 2: { ShowPlayerDialog(playerid, DIALOG_VEHICLELOOKUP1, DIALOG_STYLE_INPUT, "Vehicle lookup", "Enter the ID of the vehicle to lookup.\n(( You can find out the ID of a vehicle by using /dl. ))", "Submit", "Cancel"); } } } } case DIALOG_MDCWANTED: { if((response) && IsLawEnforcement(playerid)) { foreach(new i : Player) { if(!strcmp(GetPlayerRPName(i), inputtext)) { new Float:x, Float:y, Float:z; GetPlayerPosEx(i, x, y, z); PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, x, y, z, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the suspect's last known location."); return 1; } } SendClientMessage(playerid, COLOR_GREY, "The suspect you've selected has went offline."); } } case DIALOG_PLAYERLOOKUP: { if((response) && IsLawEnforcement(playerid)) { new username[MAX_PLAYER_NAME]; if(sscanf(inputtext, "s[24]", username)) { return ShowPlayerDialog(playerid, DIALOG_PLAYERLOOKUP, DIALOG_STYLE_INPUT, "Player lookup", "Enter the full name of the player to lookup:", "Submit", "Cancel"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid, gender, age, wantedlevel, crimes, arrested, carlicense FROM users WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer, "MDC_PlayerLookup", "is", playerid, username); } } case DIALOG_MDCPLAYER1: { if((response) && IsLawEnforcement(playerid)) { ShowPlayerDialog(playerid, DIALOG_MDCPLAYER2, DIALOG_STYLE_LIST, "Options", "Show active charges\nClear charges", "Select", "Cancel"); } } case DIALOG_MDCPLAYER2: { if((response) && IsLawEnforcement(playerid)) { switch(listitem) { case 0: { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM charges WHERE uid = %i", PlayerInfo[playerid][pSelected]); mysql_tquery(connectionID, queryBuffer, "MDC_ListCharges", "i", playerid); } case 1: { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username FROM users WHERE uid = %i", PlayerInfo[playerid][pSelected]); mysql_tquery(connectionID, queryBuffer, "MDC_ClearCharges", "i", playerid); } } } } case DIALOG_MDCCHARGES: { ShowPlayerDialog(playerid, DIALOG_MDCPLAYER2, DIALOG_STYLE_LIST, "Options", "Show active charges\nClear charges", "Select", "Cancel"); } case DIALOG_VEHICLELOOKUP1: { if((response) && IsLawEnforcement(playerid)) { new vehicleid, string[512]; if(sscanf(inputtext, "i", vehicleid)) { return ShowPlayerDialog(playerid, DIALOG_VEHICLELOOKUP1, DIALOG_STYLE_INPUT, "Vehicle lookup", "Enter the ID of the vehicle to lookup.\n(( You can find out the ID of a vehicle by using /dl. ))", "Submit", "Cancel"); } if(!IsValidVehicle(vehicleid) || !VehicleInfo[vehicleid][vOwnerID]) { SendClientMessage(playerid, COLOR_GREY, "The vehicle ID specified is not owned by any particular person."); return ShowPlayerDialog(playerid, DIALOG_VEHICLELOOKUP1, DIALOG_STYLE_INPUT, "Vehicle lookup", "Enter the ID of the vehicle to lookup.\n(( You can find out the ID of a vehicle by using /dl. ))", "Submit", "Cancel"); } PlayerInfo[playerid][pSelected] = vehicleid; format(string, sizeof(string), "Name: %s\nOwner: %s\nTickets: $%i\nLocation: %s", GetVehicleName(vehicleid), VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vTickets], GetVehicleZoneName(vehicleid)); ShowPlayerDialog(playerid, DIALOG_VEHICLELOOKUP2, DIALOG_STYLE_MSGBOX, "Vehicle lookup", string, "Track", "Cancel"); } } case DIALOG_VEHICLELOOKUP2: { if((response) && IsLawEnforcement(playerid)) { new garageid, vehicleid = PlayerInfo[playerid][pSelected]; if((garageid = GetVehicleGarage(vehicleid)) >= 0) { SetPlayerCheckpoint(playerid, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the garage this vehicle is inside of."); } else { new Float:x, Float:y, Float:z; SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the vehicle's last known location."); GetVehiclePos(vehicleid, x, y, z); SetPlayerCheckpoint(playerid, x, y, z, 3.0); } PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; } } case DIALOG_FACTIONPAY1: { if((response) && GetFactionType(playerid) == FACTION_GOVERNMENT) { PlayerInfo[playerid][pSelected] = listitem; ShowPlayerDialog(playerid, DIALOG_FACTIONPAY2, DIALOG_STYLE_INPUT, "Change paycheck", "Enter the new paycheck amount for this rank:", "Submit", "Back"); } } case DIALOG_FACTIONPAY2: { if(GetFactionType(playerid) == FACTION_GOVERNMENT) { if(response) { new amount, factionid = PlayerInfo[playerid][pFactionEdit], rankid = PlayerInfo[playerid][pSelected]; if(sscanf(inputtext, "i", amount)) { return ShowPlayerDialog(playerid, DIALOG_FACTIONPAY2, DIALOG_STYLE_INPUT, "Change paycheck", "Enter the new paycheck amount for this rank:", "Submit", "Back"); } if(!(1 <= amount <= 50000)) { SendClientMessage(playerid, COLOR_GREY, "The specified amount must range from $1 to $50000."); return ShowPlayerDialog(playerid, DIALOG_FACTIONPAY2, DIALOG_STYLE_INPUT, "Change paycheck", "Enter the new paycheck amount for this rank:", "Submit", "Back"); } FactionInfo[factionid][fPaycheck][rankid] = amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO factionpay VALUES(%i, %i, %i) ON DUPLICATE KEY UPDATE amount = %i", factionid, rankid, amount, amount); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the paycheck for rank %i to $%i.", rankid, amount); Log_Write("log_faction", "%s (uid: %i) set %s's (id: %i) paycheck for rank %i to $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], FactionInfo[factionid][fName], factionid, rankid, amount); } ShowDialogToPlayer(playerid, DIALOG_FACTIONPAY1); } } case DIALOG_PHONEBOOK: { if(response) { if(!strcmp(inputtext, ">> Next page", true)) { PlayerInfo[playerid][pPage]++; ShowDialogToPlayer(playerid, DIALOG_PHONEBOOK); } else if(!strcmp(inputtext, "<< Go back", true) && PlayerInfo[playerid][pPage] > 1) { PlayerInfo[playerid][pPage]--; ShowDialogToPlayer(playerid, DIALOG_PHONEBOOK); } } } case DIALOG_CREATEZONE: { if((response) && PlayerInfo[playerid][pAdmin] >= 5) { PlayerInfo[playerid][pMinX] = 0.0; PlayerInfo[playerid][pMinY] = 0.0; PlayerInfo[playerid][pMaxX] = 0.0; PlayerInfo[playerid][pMaxY] = 0.0; if(PlayerInfo[playerid][pZoneType] == ZONETYPE_LAND) { PlayerInfo[playerid][pZoneCreation] = ZONETYPE_LAND; SendClientMessage(playerid, COLOR_WHITE, "** Your land needs to be within a square or rectangle. /confirm to set the four boundary points."); } else if(PlayerInfo[playerid][pZoneType] == ZONETYPE_TURF) { PlayerInfo[playerid][pZoneCreation] = ZONETYPE_TURF; SendClientMessage(playerid, COLOR_WHITE, "** Your turf needs to be within a square or rectangle. /confirm to set the four boundary points."); } } } case DIALOG_CONFIRMZONE: { if(response) { if(PlayerInfo[playerid][pZoneCreation] == ZONETYPE_LAND) { for(new i = 0; i < MAX_LANDS; i ++) { if(!LandInfo[i][lExists]) { new Float:minx = PlayerInfo[playerid][pMinX], Float:miny = PlayerInfo[playerid][pMinY], Float:maxx = PlayerInfo[playerid][pMaxX], Float:maxy = PlayerInfo[playerid][pMaxY], Float:z; GetPlayerPos(playerid, z, z, z); if(minx > maxx) { PlayerInfo[playerid][pMinX] = maxx; PlayerInfo[playerid][pMaxX] = minx; } if(miny > maxy) { PlayerInfo[playerid][pMinY] = maxy; PlayerInfo[playerid][pMaxY] = miny; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO lands (price, min_x, min_y, max_x, max_y, height) VALUES(%i, '%f', '%f', '%f', '%f', '%f')", PlayerInfo[playerid][pLandCost], PlayerInfo[playerid][pMinX], PlayerInfo[playerid][pMinY], PlayerInfo[playerid][pMaxX], PlayerInfo[playerid][pMaxY], z); mysql_tquery(connectionID, queryBuffer, "OnAdminCreateLand", "iiifffff", playerid, i, PlayerInfo[playerid][pLandCost], PlayerInfo[playerid][pMinX], PlayerInfo[playerid][pMinY], PlayerInfo[playerid][pMaxX], PlayerInfo[playerid][pMaxY], z); CancelZoneCreation(playerid); return 1; } } SendClientMessage(playerid, COLOR_GREY, "Land slots are currently full. Ask Emmet to increase the internal limit."); CancelZoneCreation(playerid); } else if(PlayerInfo[playerid][pZoneCreation] == ZONETYPE_TURF) { for(new i = 0; i < MAX_TURFS; i ++) { if(!TurfInfo[i][tExists]) { new Float:minx = PlayerInfo[playerid][pMinX], Float:miny = PlayerInfo[playerid][pMinY], Float:maxx = PlayerInfo[playerid][pMaxX], Float:maxy = PlayerInfo[playerid][pMaxY], Float:z; GetPlayerPos(playerid, z, z, z); if(minx > maxx) { PlayerInfo[playerid][pMinX] = maxx; PlayerInfo[playerid][pMaxX] = minx; } if(miny > maxy) { PlayerInfo[playerid][pMinY] = maxy; PlayerInfo[playerid][pMaxY] = miny; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO turfs (id, name, type, min_x, min_y, max_x, max_y, height) VALUES(%i, '%e', %i, '%f', '%f', '%f', '%f', '%f')", i, PlayerInfo[playerid][pTurfName], PlayerInfo[playerid][pTurfType], PlayerInfo[playerid][pMinX], PlayerInfo[playerid][pMinY], PlayerInfo[playerid][pMaxX], PlayerInfo[playerid][pMaxY], z); mysql_tquery(connectionID, queryBuffer, "OnAdminCreateTurf", "iisifffff", playerid, i, PlayerInfo[playerid][pTurfName], PlayerInfo[playerid][pTurfType], PlayerInfo[playerid][pMinX], PlayerInfo[playerid][pMinY], PlayerInfo[playerid][pMaxX], PlayerInfo[playerid][pMaxY], z); CancelZoneCreation(playerid); return 1; } } SendClientMessage(playerid, COLOR_GREY, "Turf slots are currently full. Ask Emmet to increase the internal limit."); CancelZoneCreation(playerid); } } else { CancelZoneCreation(playerid); if(PlayerInfo[playerid][pZoneType] == ZONETYPE_LAND) { SendClientMessage(playerid, COLOR_WHITE, "** Your land needs to be within a square or rectangle. /confirm to set the four boundary points."); SendClientMessage(playerid, COLOR_WHITE, "** Note: You can use /landcancel to exit land creation mode."); PlayerInfo[playerid][pZoneCreation] = ZONETYPE_LAND; } else if(PlayerInfo[playerid][pZoneType] == ZONETYPE_TURF) { SendClientMessage(playerid, COLOR_WHITE, "** Your turf needs to be within a square or rectangle. /confirm to set the four boundary points."); SendClientMessage(playerid, COLOR_WHITE, "** Note: You can use /turfcancel to exit turf creation mode."); PlayerInfo[playerid][pZoneCreation] = ZONETYPE_TURF; } } } case DIALOG_LANDBUILD1: { new landid = GetNearbyLand(playerid); if(landid == -1 || !HasLandPerms(playerid, landid)) { return 0; } if(response) { PlayerInfo[playerid][pCategory] = listitem; ShowDialogToPlayer(playerid, DIALOG_LANDBUILD2); } else { ShowDialogToPlayer(playerid, DIALOG_LANDMENU); } } case DIALOG_LANDBUILD2: { new landid = GetNearbyLand(playerid); if(landid == -1 || !HasLandPerms(playerid, landid)) { return 0; } if(response) { listitem += PlayerInfo[playerid][pFurnitureIndex]; if(PlayerInfo[playerid][pCash] < furnitureArray[listitem][fPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't purchase this. You don't have enough money for it."); } else { new Float:x, Float:y, Float:z, Float:a; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); PlayerInfo[playerid][pEditType] = EDIT_LAND_OBJECT_PREVIEW; PlayerInfo[playerid][pEditObject] = CreateDynamicObject(furnitureArray[listitem][fModel], x + 2.0 * floatsin(-a, degrees), y + 2.0 * floatcos(-a, degrees), z + 1.0, 0.0, 0.0, ((19353 <= furnitureArray[listitem][fModel] <= 19417) || (19426 <= furnitureArray[listitem][fModel] <= 19465)) ? (a + 90.0) : (a), GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid)); PlayerInfo[playerid][pObjectLand] = landid; PlayerInfo[playerid][pSelected] = listitem; SendClientMessageEx(playerid, COLOR_AQUA, "You are now previewing {FF6347}%s{33CCFF}. This object costs {00AA00}$%i{33CCFF} to purchase.", furnitureArray[listitem][fName], furnitureArray[listitem][fPrice]); SendClientMessageEx(playerid, COLOR_AQUA, "Use your cursor to control the editor interface. Click the floppy disk to save changes."); EditDynamicObject(playerid, PlayerInfo[playerid][pEditObject]); } } else { ShowDialogToPlayer(playerid, DIALOG_LANDBUILD1); } } case DIALOG_LANDMENU: { new landid = GetNearbyLand(playerid); if(landid == -1 || !HasLandPerms(playerid, landid)) { return 1; } if(response) { switch(listitem) { case 0: { ShowDialogToPlayer(playerid, DIALOG_LANDBUILD1); } case 1: { ShowPlayerDialog(playerid, DIALOG_LANDEDITOBJECT, DIALOG_STYLE_INPUT, "Edit object", "Please enter the object ID of the object to edit:\nYou can find out the ID of objects by toggling labels in the menu.", "Submit", "Back"); } case 2: { if(!LandInfo[landid][lLabels]) { LandInfo[landid][lLabels] = 1; SendClientMessage(playerid, COLOR_AQUA, "You will now see labels appear above the objects in your land."); } else { LandInfo[landid][lLabels] = 0; SendClientMessage(playerid, COLOR_AQUA, "You will no longer see any labels appear above your land objects."); } ReloadAllLandObjects(landid); ShowDialogToPlayer(playerid, DIALOG_LANDMENU); } case 3: { PlayerInfo[playerid][pPage] = 1; ShowDialogToPlayer(playerid, DIALOG_LANDOBJECTS); } case 4: { ShowPlayerDialog(playerid, DIALOG_LANDSELLALL, DIALOG_STYLE_MSGBOX, "Clear objects", "This option sells all the objects in your land. You will receive\n75 percent of the total cost of all your objects.\n\nPress {FF6347}Confirm{A9C4E4} to proceed with the operation.", "Confirm", "Back"); } case 5: { ShowPlayerDialog(playerid, DIALOG_LANDPERMS, DIALOG_STYLE_INPUT, "Permissions", "Please enter the name or ID of the player to take or give permissions to:", "Submit", "Back"); } } } } case DIALOG_LANDEDITOBJECT: { new landid = GetNearbyLand(playerid); if(landid == -1 || !HasLandPerms(playerid, landid)) { return 1; } if(response) { new objectid; if(sscanf(inputtext, "i", objectid)) { return ShowPlayerDialog(playerid, DIALOG_LANDEDITOBJECT, DIALOG_STYLE_INPUT, "Edit object", "Please enter the object ID of the object to edit:\nYou can find out the ID of objects by toggling labels in the menu.", "Submit", "Back"); } if(!IsValidDynamicObject(objectid) || Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) != E_OBJECT_LAND) { SendClientMessage(playerid, COLOR_GREY, "Invalid object. You can find out an object's ID by enabling labels."); return ShowPlayerDialog(playerid, DIALOG_LANDEDITOBJECT, DIALOG_STYLE_INPUT, "Edit object", "Please enter the object ID of the object to edit:\nYou can find out the ID of objects by toggling labels in the menu.", "Submit", "Back"); } if(Streamer_GetExtraInt(objectid, E_OBJECT_EXTRA_ID) != LandInfo[landid][lID]) { SendClientMessage(playerid, COLOR_GREY, "Invalid object. This land object is not apart of your land."); return ShowPlayerDialog(playerid, DIALOG_LANDEDITOBJECT, DIALOG_STYLE_INPUT, "Edit object", "Please enter the object ID of the object to edit:\nYou can find out the ID of objects by toggling labels in the menu.", "Submit", "Back"); } PlayerInfo[playerid][pSelected] = objectid; ShowDialogToPlayer(playerid, DIALOG_LANDOBJECTMENU); } else { ShowDialogToPlayer(playerid, DIALOG_LANDMENU); } } case DIALOG_LANDOBJECTMENU: { new landid = GetNearbyLand(playerid); if(landid == -1 || !HasLandPerms(playerid, landid)) { return 1; } if(response) { new objectid = PlayerInfo[playerid][pSelected]; if(!strcmp(inputtext, "Edit object")) { if(Streamer_GetExtraInt(objectid, E_OBJECT_OPENED)) { return SendClientMessage(playerid, COLOR_GREY, "You can't edit your gate while it is opened."); } PlayerInfo[playerid][pEditType] = EDIT_LAND_OBJECT; PlayerInfo[playerid][pEditObject] = objectid; PlayerInfo[playerid][pObjectLand] = landid; EditDynamicObject(playerid, objectid); GameTextForPlayer(playerid, "~w~Editing Mode~n~~g~Click disk to save~n~~r~Press ESC to cancel", 5000, 1); } else if(!strcmp(inputtext, "Edit gate destination")) { if(Streamer_GetExtraInt(objectid, E_OBJECT_OPENED)) { return SendClientMessage(playerid, COLOR_GREY, "You can't edit your gate while it is opened."); } PlayerInfo[playerid][pEditType] = EDIT_LAND_GATE_MOVE; PlayerInfo[playerid][pEditObject] = objectid; PlayerInfo[playerid][pObjectLand] = landid; EditDynamicObject(playerid, objectid); SendClientMessage(playerid, COLOR_WHITE, "** You are now editing the move-to position for your gate."); GameTextForPlayer(playerid, "~w~Editing Mode~n~~g~Click disk to save~n~~r~Press ESC to cancel", 5000, 1); } else if(!strcmp(inputtext, "Duplicate object")) { PlayerInfo[playerid][pSelected] = objectid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT name, modelid, price, pos_x, pos_y, pos_z, rot_x, rot_y, rot_z FROM landobjects WHERE id = %i", Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID)); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_DUPLICATE_LANDOBJECT, playerid); } else if(!strcmp(inputtext, "Sell object")) { PlayerInfo[playerid][pSelected] = objectid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT name, price FROM landobjects WHERE id = %i", Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID)); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_SELL_LANDOBJECT, playerid); } } else { ShowPlayerDialog(playerid, DIALOG_LANDEDITOBJECT, DIALOG_STYLE_INPUT, "Edit object", "Please enter the object ID of the object to edit:\nYou can find out the ID of objects by toggling labels in the menu.", "Submit", "Back"); } } case DIALOG_LANDOBJECTS: { if(response) { if(!strcmp(inputtext, ">> Next page", true)) { PlayerInfo[playerid][pPage]++; ShowDialogToPlayer(playerid, DIALOG_LANDOBJECTS); } else if(!strcmp(inputtext, "<< Go back", true) && PlayerInfo[playerid][pPage] > 1) { PlayerInfo[playerid][pPage]--; ShowDialogToPlayer(playerid, DIALOG_LANDOBJECTS); } else { new objectid = strval(inputtext); if(IsValidDynamicObject(objectid) && Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) == E_OBJECT_LAND) { PlayerInfo[playerid][pSelected] = objectid; ShowDialogToPlayer(playerid, DIALOG_LANDOBJECTMENU); } } } else { ShowDialogToPlayer(playerid, DIALOG_LANDMENU); } } case DIALOG_LANDSELLALL: { new landid = GetNearbyLand(playerid); if(landid == -1 || !HasLandPerms(playerid, landid)) { return 1; } if(response) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT price FROM landobjects WHERE landid = %i", LandInfo[landid][lID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_CLEAR_LANDOBJECTS, playerid); } else { ShowDialogToPlayer(playerid, DIALOG_LANDMENU); } } case DIALOG_LANDPERMS: { new landid = GetNearbyLand(playerid), targetid; if(landid == -1 || !HasLandPerms(playerid, landid)) { return 1; } if(response) { if(sscanf(inputtext, "u", targetid)) { return ShowPlayerDialog(playerid, DIALOG_LANDPERMS, DIALOG_STYLE_INPUT, "Permissions", "Please enter the name or ID of the player to take or give permissions to:", "Submit", "Back"); } if(!IsPlayerConnected(targetid)) { SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); return ShowPlayerDialog(playerid, DIALOG_LANDPERMS, DIALOG_STYLE_INPUT, "Permissions", "Please enter the name or ID of the player to take or give permissions to:", "Submit", "Back"); } if(targetid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You can't give permissions to yourself."); return ShowPlayerDialog(playerid, DIALOG_LANDPERMS, DIALOG_STYLE_INPUT, "Permissions", "Please enter the name or ID of the player to take or give permissions to:", "Submit", "Back"); } if(PlayerInfo[targetid][pLandPerms] == landid) { PlayerInfo[targetid][pLandPerms] = -1; SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your access to their land's objects.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's access to your land's objects.", GetPlayerRPName(targetid)); } else { PlayerInfo[targetid][pLandPerms] = landid; SendClientMessageEx(targetid, COLOR_AQUA, "%s has granted you access to their land's objects.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have granted %s access to your land's objects.", GetPlayerRPName(targetid)); } } ShowDialogToPlayer(playerid, DIALOG_LANDMENU); } case DIALOG_MP3PLAYER: { if(response) { switch(listitem) { case 0: { ShowPlayerDialog(playerid, DIALOG_MP3URL, DIALOG_STYLE_INPUT, "Custom URL", "Please enter the URL of the stream you want to play:", "Submit", "Back"); } case 1: { ShowPlayerDialog(playerid, DIALOG_MP3MUSIC, DIALOG_STYLE_INPUT, "Uploaded Music", "Please enter the name of the .mp3 file to play:\n(Use /music for a list of all music uploaded to the server.)", "Submit", "Back"); } case 2: { if(!radioConnectionID) { return SendClientMessage(playerid, COLOR_GREY, "The radio station database is currently unavailable."); } ShowDialogToPlayer(playerid, DIALOG_MP3RADIO); } case 3: { switch(PlayerInfo[playerid][pMusicType]) { case MUSIC_MP3PLAYER: { SetMusicStream(MUSIC_MP3PLAYER, playerid, ""); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s turns off their MP3 player.", GetPlayerRPName(playerid)); } case MUSIC_BOOMBOX: { SetMusicStream(MUSIC_BOOMBOX, playerid, ""); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s turns off their boombox.", GetPlayerRPName(playerid)); } case MUSIC_VEHICLE: { if(IsPlayerInAnyVehicle(playerid)) { SetMusicStream(MUSIC_VEHICLE, GetPlayerVehicleID(playerid), ""); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s turns off the radio in the vehicle.", GetPlayerRPName(playerid)); } } } } } } } case DIALOG_MP3MUSIC: { if(response) { new url[128]; if(isnull(inputtext)) { return ShowPlayerDialog(playerid, DIALOG_MP3MUSIC, DIALOG_STYLE_INPUT, "Uploaded Music", "Please enter the name of the .mp3 file to play:\n(Use /music for a list of all music uploaded to the server.)", "Submit", "Back"); } for(new i = 0, l = strlen(inputtext); i < l; i ++) { switch(inputtext[i]) { case 'A'..'Z', 'a'..'z', '0'..'9', '_', '.', '\'', ' ': { continue; } default: { SendClientMessage(playerid, COLOR_GREY, "The name of the .mp3 contains invalid characters, please try again."); return ShowPlayerDialog(playerid, DIALOG_MP3MUSIC, DIALOG_STYLE_INPUT, "Uploaded Music", "Please enter the name of the .mp3 file to play:\n(Use /musicfor a list of all music uploaded to the server.)", "Submit", "Back"); } } } format(url, sizeof(url), "http://%s/%s", SERVER_MUSIC_URL, inputtext); switch(PlayerInfo[playerid][pMusicType]) { case MUSIC_MP3PLAYER: { SetMusicStream(MUSIC_MP3PLAYER, playerid, url); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s changes the song on their MP3 player.", GetPlayerRPName(playerid)); } case MUSIC_BOOMBOX: { SetMusicStream(MUSIC_BOOMBOX, playerid, url); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s changes the song on their boombox.", GetPlayerRPName(playerid)); } case MUSIC_VEHICLE: { if(IsPlayerInAnyVehicle(playerid)) { SetMusicStream(MUSIC_VEHICLE, GetPlayerVehicleID(playerid), url); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s changes the song on the radio.", GetPlayerRPName(playerid)); } } } SendClientMessageEx(playerid, COLOR_AQUA, "You have started the playback of {00AA00}%s{33CCFF}.", inputtext); } else { ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER); } } case DIALOG_MP3URL: { if(response) { if(isnull(inputtext)) { return ShowPlayerDialog(playerid, DIALOG_MP3URL, DIALOG_STYLE_INPUT, "Custom URL", "Please enter the URL of the stream you want to play:", "Submit", "Back"); } switch(PlayerInfo[playerid][pMusicType]) { case MUSIC_MP3PLAYER: { SetMusicStream(MUSIC_MP3PLAYER, playerid, inputtext); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s changes the song on their MP3 player.", GetPlayerRPName(playerid)); } case MUSIC_BOOMBOX: { SetMusicStream(MUSIC_BOOMBOX, playerid, inputtext); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s changes the song on their boombox.", GetPlayerRPName(playerid)); } case MUSIC_VEHICLE: { if(IsPlayerInAnyVehicle(playerid)) { SetMusicStream(MUSIC_VEHICLE, GetPlayerVehicleID(playerid), inputtext); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s changes the song on the radio.", GetPlayerRPName(playerid)); } } } } else { ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER); } } case DIALOG_MP3RADIO: { if(response) { switch(listitem) { case 0: { ShowDialogToPlayer(playerid, DIALOG_MP3RADIOGENRES); } case 1: { ShowDialogToPlayer(playerid, DIALOG_MP3RADIOSEARCH); } } } else { ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER); } } case DIALOG_MP3RADIOGENRES: { if(response) { strcpy(PlayerInfo[playerid][pGenre], inputtext, 32); ShowDialogToPlayer(playerid, DIALOG_MP3RADIOSUBGENRES); } else { ShowDialogToPlayer(playerid, DIALOG_MP3RADIO); } } case DIALOG_MP3RADIOSUBGENRES: { if(response) { PlayerInfo[playerid][pPage] = 1; PlayerInfo[playerid][pSearch] = 0; strcpy(PlayerInfo[playerid][pSubgenre], inputtext, 32); ShowDialogToPlayer(playerid, DIALOG_MP3RADIORESULTS); } else { ShowDialogToPlayer(playerid, DIALOG_MP3RADIOGENRES); } } case DIALOG_MP3RADIORESULTS: { if(response) { if(!strcmp(inputtext, ">> Next page", true)) { PlayerInfo[playerid][pPage]++; ShowDialogToPlayer(playerid, DIALOG_MP3RADIORESULTS); } else if(!strcmp(inputtext, "<< Go back", true) && PlayerInfo[playerid][pPage] > 1) { PlayerInfo[playerid][pPage]--; ShowDialogToPlayer(playerid, DIALOG_MP3RADIORESULTS); } else { listitem = ((PlayerInfo[playerid][pPage] - 1) * MAX_LISTED_STATIONS) + listitem; if(PlayerInfo[playerid][pSearch]) { mysql_format(radioConnectionID, queryBuffer, sizeof(queryBuffer), "SELECT name, url FROM radiostations WHERE name LIKE '%%%e%%' OR subgenre LIKE '%%%e%%' ORDER BY name LIMIT %i, 1", PlayerInfo[playerid][pGenre], PlayerInfo[playerid][pGenre], listitem); mysql_tquery(radioConnectionID, queryBuffer, "Radio_PlayStation", "i", playerid); } else { mysql_format(radioConnectionID, queryBuffer, sizeof(queryBuffer), "SELECT name, url FROM radiostations WHERE genre = '%e' AND subgenre = '%e' ORDER BY name LIMIT %i, 1", PlayerInfo[playerid][pGenre], PlayerInfo[playerid][pSubgenre], listitem); mysql_tquery(radioConnectionID, queryBuffer, "Radio_PlayStation", "i", playerid); } } } else { if(PlayerInfo[playerid][pSearch]) { ShowDialogToPlayer(playerid, DIALOG_MP3RADIOSEARCH); } else { ShowDialogToPlayer(playerid, DIALOG_MP3RADIOSUBGENRES); } } } case DIALOG_MP3RADIOSEARCH: { if(response) { if(strlen(inputtext) < 3) { SendClientMessage(playerid, COLOR_GREY, "Your search query must contain 3 characters or more."); return ShowDialogToPlayer(playerid, DIALOG_MP3RADIOSEARCH); } PlayerInfo[playerid][pPage] = 1; PlayerInfo[playerid][pSearch] = 1; strcpy(PlayerInfo[playerid][pGenre], inputtext, 32); ShowDialogToPlayer(playerid, DIALOG_MP3RADIORESULTS); } else { ShowDialogToPlayer(playerid, DIALOG_MP3RADIO); } } case DIALOG_USECOOKIES: { if(response) { /* mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, '%s', NOW(), '%e')", PlayerInfo[targetid][pID], GetPlayerNameEx(playerid), desc); mysql_tquery(connectionID, queryBuffer); */ switch(listitem) { case 0: { if(PlayerInfo[playerid][pCookies] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } ShowPlayerDialog(playerid, DIALOG_COOKIESHOUTOUT, DIALOG_STYLE_INPUT, "Shoutout of choice", "Enter a shoutout to broadcast to the server:", "Submit", "Cancel"); } case 1: { if(PlayerInfo[playerid][pCookies] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } PlayerInfo[playerid][pCookies]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SetScriptArmour(playerid, 100.0); SendClientMessage(playerid, COLOR_AQUA, "You have redeemed 1 cookie for {00AA00}Full armor{33CCFF}."); } case 2: { if(PlayerInfo[playerid][pCookies] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } PlayerInfo[playerid][pCookies] -= 2; PlayerInfo[playerid][pEXP] += 4; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, exp = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pEXP], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_AQUA, "You have redeemed 2 cookies for {00AA00}+4 Respect points{33CCFF}."); } case 3: { if(PlayerInfo[playerid][pCookies] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } ShowPlayerDialog(playerid, DIALOG_COOKIEWEATHER, DIALOG_STYLE_LIST, "Choose your weather.", "Clear skies\nCloudy\nRainy weather\nFoggy\nDull\nHeatwave\nSandstorm", "Select", "Cancel"); } case 4: { if(PlayerInfo[playerid][pCookies] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } if(PlayerInfo[playerid][pMaterials] + 5000 > GetPlayerCapacity(playerid, CAPACITY_MATERIALS)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS)); } PlayerInfo[playerid][pCookies] -= 4; PlayerInfo[playerid][pMaterials] += 5000; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, materials = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_AQUA, "You have redeemed 4 cookies for {00AA00}5000 materials{33CCFF}."); } case 5: { if(PlayerInfo[playerid][pCookies] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } if(PlayerInfo[playerid][pHours] < 2 || PlayerInfo[playerid][pWeaponRestricted] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are either weapon restricted or you played less than two playing hours."); } PlayerInfo[playerid][pCookies] -= 5; GivePlayerWeaponEx(playerid, 24); GivePlayerWeaponEx(playerid, 27); GivePlayerWeaponEx(playerid, 29); GivePlayerWeaponEx(playerid, 31); GivePlayerWeaponEx(playerid, 34); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_AQUA, "You have redeemed 5 cookies for a {00AA00}Full weapon set{33CCFF}."); } case 6: { if(PlayerInfo[playerid][pCookies] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } ShowPlayerDialog(playerid, DIALOG_COOKIENUMBER, DIALOG_STYLE_INPUT, "Number change", "Enter your phone number of choice:", "Submit", "Cancel"); } case 7: { if(PlayerInfo[playerid][pCookies] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } ShowPlayerDialog(playerid, DIALOG_COOKIEJOB, DIALOG_STYLE_LIST, "Choose a job to 1x level up.", "Courier\nFisherman\nBodyguard\nMechanic\nWeapons Dealer\nDrug Dealer\nLawyer\nDetective", "Select", "Cancel"); } case 8: { if(PlayerInfo[playerid][pCookies] < 10) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } PlayerInfo[playerid][pCookies] -= 10; PlayerInfo[playerid][pDoubleXP] += 8; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, doublexp = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pDoubleXP], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_AQUA, "You have redeemed 10 cookies for {00AA00}8 hours of Double XP{33CCFF}."); } case 9: { if(PlayerInfo[playerid][pCookies] < 15) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } PlayerInfo[playerid][pCookies] -= 15; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, 'Cookie prize', NOW(), 'Free vehicle (up to $100k value)')", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_AQUA, "You have redeemed 15 cookies for a {00AA00}Free vehicle ticket{33CCFF}. /report for your prize."); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has a pending flag for a vehicle ticket (up to $100k value).", GetPlayerRPName(playerid), playerid); } case 10: { if(PlayerInfo[playerid][pCookies] < 30) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } PlayerInfo[playerid][pCookies] -= 30; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, 'Cookie prize', NOW(), 'Free house (up to $100k value)')", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_AQUA, "You have redeemed 30 cookies for a {00AA00}Free house ticket{33CCFF}. /report for your prize."); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has a pending flag for a house ticket (up to $100k value).", GetPlayerRPName(playerid), playerid); } case 11: { if(PlayerInfo[playerid][pCookies] < 40) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } PlayerInfo[playerid][pCookies] -= 40; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, 'Cookie prize', NOW(), 'Free business of any type')", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_AQUA, "You have redeemed 40 cookies for a {00AA00}Free business ticket{33CCFF}. /report for your prize."); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has a pending flag for a business ticket (any type).", GetPlayerRPName(playerid), playerid); } case 12: { if(PlayerInfo[playerid][pCookies] < 50) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } PlayerInfo[playerid][pCookies] -= 50; PlayerInfo[playerid][pVIPPackage] = 1; PlayerInfo[playerid][pVIPTime] = gettime() + 2592000; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, vippackage = 1, viptime = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pVIPTime], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_AQUA, "You have redeemed 50 cookies for {00AA00}1 month limited VIP{33CCFF}."); } } } } case DIALOG_COOKIESHOUTOUT: { if(response) { if(!(3 <= strlen(inputtext) <= 64)) { SendClientMessage(playerid, COLOR_GREY, "Your shoutout may only contain 3 to 64 characters."); return ShowPlayerDialog(playerid, DIALOG_COOKIESHOUTOUT, DIALOG_STYLE_INPUT, "Shoutout of choice", "Enter a shoutout to broadcast to the server:", "Submit", "Cancel"); } if(PlayerInfo[playerid][pCookies] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } PlayerInfo[playerid][pCookies]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageToAllEx(COLOR_ORANGE, "Shoutout from %s: %s", GetPlayerRPName(playerid), inputtext); SendClientMessage(playerid, COLOR_AQUA, "You have redeemed 1 cookie for a {00AA00}Shoutout{33CCFF} to the entire server."); } } case DIALOG_COOKIEWEATHER: { if(response) { if(PlayerInfo[playerid][pCookies] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } switch(listitem) { case 0: gWeather = 1; case 1: gWeather = 4; case 2: gWeather = 8; case 3: gWeather = 9; case 4: gWeather = 12; case 5: gWeather = 18; case 6: gWeather = 19; } SetWeather(gWeather); PlayerInfo[playerid][pCookies] -= 3; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have redeemed 3 cookies for a weather change to {00AA00}%s{33CCFF}.", inputtext); } } case DIALOG_COOKIENUMBER: { if(response) { new number; if(sscanf(inputtext, "i", number)) { return ShowPlayerDialog(playerid, DIALOG_COOKIENUMBER, DIALOG_STYLE_INPUT, "Number change", "Enter your phone number of choice:", "Submit", "Cancel"); } if(number == 0 || number == 911 || number == 6397 || number == 6324 || number == 8294) { SendClientMessage(playerid, COLOR_GREY, "Invalid number."); return ShowPlayerDialog(playerid, DIALOG_COOKIENUMBER, DIALOG_STYLE_INPUT, "Number change", "Enter your phone number of choice:", "Submit", "Cancel"); } if(PlayerInfo[playerid][pCookies] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT phone FROM users WHERE phone = %i", number); mysql_tquery(connectionID, queryBuffer, "OnPlayerChangeNumber", "ii", playerid, number); } } case DIALOG_COOKIEJOB: { new job, level; if(response) { switch(listitem) { case 0: job = JOB_COURIER; case 1: job = JOB_FISHERMAN; case 2: job = JOB_BODYGUARD; case 3: job = JOB_MECHANIC; case 4: job = JOB_WEAPONDEALER; case 5: job = JOB_DRUGDEALER; case 6: job = JOB_LAWYER; case 7: job = JOB_DETECTIVE; } if((level = GetJobLevel(playerid, job)) >= 5) { return SendClientMessage(playerid, COLOR_GREY, "Your level for this job is already at its maximum."); } if(PlayerInfo[playerid][pCookies] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough cookies. You can't redeem this item."); } PlayerInfo[playerid][pCookies] -= 5; switch(job) { case JOB_COURIER: { if(0 <= PlayerInfo[playerid][pCourierSkill] <= 49) { PlayerInfo[playerid][pCourierSkill] = 50; } else if(50 <= PlayerInfo[playerid][pCourierSkill] <= 99) { PlayerInfo[playerid][pCourierSkill] = 100; } else if(100 <= PlayerInfo[playerid][pCourierSkill] <= 199) { PlayerInfo[playerid][pCourierSkill] = 200; } else if(200 <= PlayerInfo[playerid][pCourierSkill] <= 349) { PlayerInfo[playerid][pCourierSkill] = 350; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, courierskill = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pCourierSkill], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } case JOB_FISHERMAN: { if(0 <= PlayerInfo[playerid][pFishingSkill] <= 49) { PlayerInfo[playerid][pFishingSkill] = 50; } else if(50 <= PlayerInfo[playerid][pFishingSkill] <= 99) { PlayerInfo[playerid][pFishingSkill] = 100; } else if(100 <= PlayerInfo[playerid][pFishingSkill] <= 199) { PlayerInfo[playerid][pFishingSkill] = 200; } else if(200 <= PlayerInfo[playerid][pFishingSkill] <= 349) { PlayerInfo[playerid][pFishingSkill] = 350; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, fishingskill = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pFishingSkill], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } case JOB_BODYGUARD: { if(0 <= PlayerInfo[playerid][pGuardSkill] <= 24) { PlayerInfo[playerid][pGuardSkill] = 25; } else if(25 <= PlayerInfo[playerid][pGuardSkill] <= 49) { PlayerInfo[playerid][pGuardSkill] = 50; } else if(50 <= PlayerInfo[playerid][pGuardSkill] <= 99) { PlayerInfo[playerid][pGuardSkill] = 100; } else if(100 <= PlayerInfo[playerid][pGuardSkill] <= 199) { PlayerInfo[playerid][pGuardSkill] = 200; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, guardskill = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pGuardSkill], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } case JOB_MECHANIC: { if(0 <= PlayerInfo[playerid][pMechanicSkill] <= 24) { PlayerInfo[playerid][pMechanicSkill] = 25; } else if(25 <= PlayerInfo[playerid][pMechanicSkill] <= 49) { PlayerInfo[playerid][pMechanicSkill] = 50; } else if(50 <= PlayerInfo[playerid][pMechanicSkill] <= 99) { PlayerInfo[playerid][pMechanicSkill] = 100; } else if(100 <= PlayerInfo[playerid][pMechanicSkill] <= 199) { PlayerInfo[playerid][pMechanicSkill] = 200; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, mechanicskill = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pMechanicSkill], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } case JOB_WEAPONDEALER: { if(0 <= PlayerInfo[playerid][pWeaponSkill] <= 49) { PlayerInfo[playerid][pWeaponSkill] = 50; } else if(50 <= PlayerInfo[playerid][pWeaponSkill] <= 99) { PlayerInfo[playerid][pWeaponSkill] = 100; } else if(100 <= PlayerInfo[playerid][pWeaponSkill] <= 199) { PlayerInfo[playerid][pWeaponSkill] = 200; } else if(200 <= PlayerInfo[playerid][pWeaponSkill] <= 499) { PlayerInfo[playerid][pWeaponSkill] = 500; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, weaponskill = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pWeaponSkill], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } case JOB_DRUGDEALER: { if(0 <= PlayerInfo[playerid][pSmugglerSkill] <= 24) { PlayerInfo[playerid][pSmugglerSkill] = 25; } else if(25 <= PlayerInfo[playerid][pSmugglerSkill] <= 49) { PlayerInfo[playerid][pSmugglerSkill] = 50; } else if(50 <= PlayerInfo[playerid][pSmugglerSkill] <= 74) { PlayerInfo[playerid][pSmugglerSkill] = 75; } else if(75 <= PlayerInfo[playerid][pSmugglerSkill] <= 99) { PlayerInfo[playerid][pSmugglerSkill] = 100; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, smugglerskill = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pSmugglerSkill], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } case JOB_LAWYER: { if(0 <= PlayerInfo[playerid][pLawyerSkill] <= 24) { PlayerInfo[playerid][pLawyerSkill] = 25; } else if(25 <= PlayerInfo[playerid][pLawyerSkill] <= 49) { PlayerInfo[playerid][pLawyerSkill] = 50; } else if(50 <= PlayerInfo[playerid][pLawyerSkill] <= 99) { PlayerInfo[playerid][pLawyerSkill] = 100; } else if(75 <= PlayerInfo[playerid][pLawyerSkill] <= 199) { PlayerInfo[playerid][pLawyerSkill] = 200; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, lawyerskill = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pLawyerSkill], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } case JOB_DETECTIVE: { if(0 <= PlayerInfo[playerid][pDetectiveSkill] <= 49) { PlayerInfo[playerid][pDetectiveSkill] = 50; } else if(50 <= PlayerInfo[playerid][pDetectiveSkill] <= 99) { PlayerInfo[playerid][pDetectiveSkill] = 100; } else if(100 <= PlayerInfo[playerid][pDetectiveSkill] <= 199) { PlayerInfo[playerid][pDetectiveSkill] = 200; } else if(200 <= PlayerInfo[playerid][pDetectiveSkill] <= 399) { PlayerInfo[playerid][pDetectiveSkill] = 400; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i, detectiveskill = %i WHERE uid = %i", PlayerInfo[playerid][pCookies], PlayerInfo[playerid][pDetectiveSkill], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } } SendClientMessageEx(playerid, COLOR_AQUA, "You have redeemed 5 cookies to advance your {00AA00}%s{33CCFF} level from %i to %i.", GetJobName(job), level, level + 1); } } case DIALOG_GANGSTASH: { if(PlayerInfo[playerid][pGang] == -1) { return 1; } if(response) { switch(listitem) { case 0: { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHWEAPONS1); } case 1: { //SendClientMessage(playerid, COLOR_GREY, "This feature is under construction."); ShowDialogToPlayer(playerid, DIALOG_GANGSTASHAMMO1); } case 2: { if(PlayerInfo[playerid][pGangRank] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 1+ to craft kevlar vests."); } if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] < 1000) { return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe for kevlar vests."); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= 1000; SetScriptArmour(playerid, 100.0); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes a kevlar vest from the gang stash.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_AQUA, "You crafted a kevlar vest using 1000 materials from the safe."); } case 3: { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHDRUGS1); } case 4: { if(PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 5+ to craft weapons."); } ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT); } case 5: { PlayerInfo[playerid][pSelected] = ITEM_MATERIALS; ShowDialogToPlayer(playerid, DIALOG_GANGSTASHMATS); } case 6: { PlayerInfo[playerid][pSelected] = ITEM_CASH; ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCASH); } } } } case DIALOG_GANGSTASHWEAPONS1: { if(PlayerInfo[playerid][pGang] == -1) { return 1; } if(response) { PlayerInfo[playerid][pSelected] = listitem; ShowPlayerDialog(playerid, DIALOG_GANGSTASHWEAPONS2, DIALOG_STYLE_LIST, "Gang stash | Weapons", "Withdraw\nDeposit", "Select", "Back"); } else { ShowDialogToPlayer(playerid, DIALOG_GANGSTASH); } } case DIALOG_GANGSTASHWEAPONS2: { if(PlayerInfo[playerid][pGang] == -1) { return 1; } if(response) { if(listitem == 0) { if(PlayerInfo[playerid][pGangRank] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 1+ in order to withdraw weapons."); } switch(PlayerInfo[playerid][pSelected]) { case GANGWEAPON_9MM: { if(PlayerInfo[playerid][pGangRank] < 1) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_9MM] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 22)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_9MM]--; GivePlayerWeaponEx(playerid, 22); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_9mm = weapon_9mm - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws a 9mm from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws a 9mm from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_SDPISTOL: { if(PlayerInfo[playerid][pGangRank] < 1) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SDPISTOL] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 23)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SDPISTOL]--; GivePlayerWeaponEx(playerid, 23); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_sdpistol = weapon_sdpistol - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws a silenced pistol from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws a silenced pistol from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_DEAGLE: { if(PlayerInfo[playerid][pGangRank] < 2) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_DEAGLE] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 24)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_DEAGLE]--; GivePlayerWeaponEx(playerid, 24); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_deagle = weapon_deagle - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws a Desert Eagle from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws a Desert Eagle from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_SHOTGUN: { if(PlayerInfo[playerid][pGangRank] < 1) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SHOTGUN] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 25)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SHOTGUN]--; GivePlayerWeaponEx(playerid, 25); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_shotgun = weapon_shotgun - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws a shotgun from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws a shotgun from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_SPAS12: { if(PlayerInfo[playerid][pGangRank] < 4) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SPAS12] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 27)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SPAS12]--; GivePlayerWeaponEx(playerid, 27); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_spas12 = weapon_spas12 - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws a SPAS-12 from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws a SPAS-12 from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_SAWNOFF: { if(PlayerInfo[playerid][pGangRank] < 4) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SAWNOFF] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 26)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SAWNOFF]--; GivePlayerWeaponEx(playerid, 26); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_sawnoff = weapon_sawnoff - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws a sawnoff shotgun from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws a sawnoff shotgun from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_TEC9: { if(PlayerInfo[playerid][pGangRank] < 1) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_TEC9] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 32)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_TEC9]--; GivePlayerWeaponEx(playerid, 32); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_tec9 = weapon_tec9 - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws a Tec-9 from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws a Tec-9 from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_UZI: { if(PlayerInfo[playerid][pGangRank] < 1) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_UZI] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 28)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_UZI]--; GivePlayerWeaponEx(playerid, 28); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_uzi = weapon_uzi - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws a Micro Uzi from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws a Micro Uzi from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_MP5: { if(PlayerInfo[playerid][pGangRank] < 2) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_MP5] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 29)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_MP5]--; GivePlayerWeaponEx(playerid, 29); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_mp5 = weapon_mp5 - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws an MP5 from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws an MP5 from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_AK47: { if(PlayerInfo[playerid][pGangRank] < 3) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_AK47] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 30)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_AK47]--; GivePlayerWeaponEx(playerid, 30); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_ak47 = weapon_ak47 - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws an AK-47 from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws an AK-47 from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_M4: { if(PlayerInfo[playerid][pGangRank] < 4) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_M4] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 31)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_M4]--; GivePlayerWeaponEx(playerid, 31); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_m4 = weapon_m4 - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws an M4 from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws an M4 from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_RIFLE: { if(PlayerInfo[playerid][pGangRank] < 2) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_RIFLE] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 33)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_RIFLE]--; GivePlayerWeaponEx(playerid, 33); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_rifle = weapon_rifle - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws a rifle from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws a rifle from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_SNIPER: { if(PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SNIPER] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 34)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SNIPER]--; GivePlayerWeaponEx(playerid, 34); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_sniper = weapon_sniper - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws a sniper rifle from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws a sniper rifle from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_MOLOTOV: { if(PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "Your rank isn't high enough to withdraw this weapon."); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_MOLOTOV] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "The gang stash doesn't have any of this weapon left."); } if(PlayerHasWeapon(playerid, 18)) { return SendClientMessage(playerid, COLOR_GREY, "You have this weapon already."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_MOLOTOV]--; GivePlayerWeaponEx(playerid, 18); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_molotov = weapon_molotov - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws a molotov from the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) withdraws a molotov from the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } } } else if(listitem == 1) { switch(PlayerInfo[playerid][pSelected]) { case GANGWEAPON_9MM: { if(!PlayerHasWeapon(playerid, 22)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_9MM]++; RemovePlayerWeapon(playerid, 22); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_9mm = weapon_9mm + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits a 9mm in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits a 9mm in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_SDPISTOL: { if(!PlayerHasWeapon(playerid, 23)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SDPISTOL]++; RemovePlayerWeapon(playerid, 23); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_sdpistol = weapon_sdpistol + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits a silenced pistol in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits a silenced pistol in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_DEAGLE: { if(!PlayerHasWeapon(playerid, 24)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_DEAGLE]++; RemovePlayerWeapon(playerid, 24); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_deagle = weapon_deagle + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits a Desert Eagle in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits a Desert Eagle in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_SHOTGUN: { if(!PlayerHasWeapon(playerid, 25)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SHOTGUN]++; RemovePlayerWeapon(playerid, 25); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_shotgun = weapon_shotgun + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits a shotgun in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits a shotgun in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_SPAS12: { if(!PlayerHasWeapon(playerid, 27)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SPAS12]++; RemovePlayerWeapon(playerid, 27); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_spas12 = weapon_spas12 + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits a SPAS-12 in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits a SPAS-12 in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_SAWNOFF: { if(!PlayerHasWeapon(playerid, 26)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SAWNOFF]++; RemovePlayerWeapon(playerid, 26); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_sawnoff = weapon_sawnoff + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits a sawnoff shotgun in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits a sawnoff shotgun in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_TEC9: { if(!PlayerHasWeapon(playerid, 32)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_TEC9]++; RemovePlayerWeapon(playerid, 32); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_tec9 = weapon_tec9 + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits a Tec-9 in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits a Tec-9 in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_UZI: { if(!PlayerHasWeapon(playerid, 28)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_UZI]++; RemovePlayerWeapon(playerid, 28); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_uzi = weapon_uzi + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits a Micro Uzi in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits a Micro Uzi in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_MP5: { if(!PlayerHasWeapon(playerid, 29)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_MP5]++; RemovePlayerWeapon(playerid, 29); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_mp5 = weapon_mp5 + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits an MP5 in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits an MP5 in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_AK47: { if(!PlayerHasWeapon(playerid, 30)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_AK47]++; RemovePlayerWeapon(playerid, 30); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_ak47 = weapon_ak47 + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits an AK-47 in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits an AK-47 in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_M4: { if(!PlayerHasWeapon(playerid, 31)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_M4]++; RemovePlayerWeapon(playerid, 31); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_m4 = weapon_m4 + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits an M4 in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits an M4 in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_RIFLE: { if(!PlayerHasWeapon(playerid, 33)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_RIFLE]++; RemovePlayerWeapon(playerid, 33); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_rifle = weapon_rifle + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits a rifle in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits a rifle in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_SNIPER: { if(!PlayerHasWeapon(playerid, 34)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SNIPER]++; RemovePlayerWeapon(playerid, 34); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_sniper = weapon_sniper + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits a sniper rifle in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits a sniper rifle in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case GANGWEAPON_MOLOTOV: { if(!PlayerHasWeapon(playerid, 18)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have this weapon."); } GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_MOLOTOV]++; RemovePlayerWeapon(playerid, 18); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weapon_molotov = weapon_molotov + 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits a molotov in the gang stash.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) deposits a molotov in the %s (id: %i) gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } } } } else { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHWEAPONS1); } } case DIALOG_GANGSTASHDRUGS1: { if(PlayerInfo[playerid][pGang] == -1) { return 1; } if(response) { switch(listitem) { case 0: PlayerInfo[playerid][pSelected] = ITEM_WEED; case 1: PlayerInfo[playerid][pSelected] = ITEM_COCAINE; case 2: PlayerInfo[playerid][pSelected] = ITEM_METH; case 3: PlayerInfo[playerid][pSelected] = ITEM_PAINKILLERS; } ShowDialogToPlayer(playerid, DIALOG_GANGSTASHDRUGS2); } else { ShowDialogToPlayer(playerid, DIALOG_GANGSTASH); } } case DIALOG_GANGSTASHDRUGS2: { if(PlayerInfo[playerid][pGang] == -1) { return 1; } if(response) { if(listitem == 0) { if(PlayerInfo[playerid][pGangRank] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 2+ in order to withdraw drugs."); } ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } else if(listitem == 1) { ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } } else { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHDRUGS1); } } case DIALOG_GANGSTASHAMMO1: { if(PlayerInfo[playerid][pGang] == -1) { return 1; } if(response) { switch(listitem) { case 0: PlayerInfo[playerid][pSelected] = ITEM_HPAMMO; case 1: PlayerInfo[playerid][pSelected] = ITEM_POISONAMMO; case 2: PlayerInfo[playerid][pSelected] = ITEM_FMJAMMO; } ShowDialogToPlayer(playerid, DIALOG_GANGSTASHAMMO2); } else { ShowDialogToPlayer(playerid, DIALOG_GANGSTASH); } } case DIALOG_GANGSTASHAMMO2: { if(PlayerInfo[playerid][pGang] == -1) { return 1; } if(response) { if(listitem == 0) { if(PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 5+ in order to withdraw ammo."); } ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } else if(listitem == 1) { ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } } else { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHAMMO1); } } case DIALOG_GANGWITHDRAW: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 3) { return 1; } if(response) { new amount; if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } switch(PlayerInfo[playerid][pSelected]) { case ITEM_WEED: { if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gWeed]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } if(PlayerInfo[playerid][pWeed] + amount > GetPlayerCapacity(playerid, CAPACITY_WEED)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED)); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gWeed] -= amount; PlayerInfo[playerid][pWeed] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weed = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gWeed], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[playerid][pWeed], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws some weed from the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have withdrawn %i grams of weed from the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) withdraws %i grams of weed from the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_COCAINE: { if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gCocaine]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } if(PlayerInfo[playerid][pCocaine] + amount > GetPlayerCapacity(playerid, CAPACITY_COCAINE)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE)); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gCocaine] -= amount; PlayerInfo[playerid][pCocaine] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET cocaine = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gCocaine], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws some cocaine from the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have withdrawn %i grams of cocaine from the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) withdraws %i grams of cocaine from the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_METH: { if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gMeth]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } if(PlayerInfo[playerid][pMeth] + amount > GetPlayerCapacity(playerid, CAPACITY_METH)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i meth. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH)); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gMeth] -= amount; PlayerInfo[playerid][pMeth] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET meth = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMeth], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws some meth from the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have withdrawn %i grams of meth from the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) withdraws %i grams of meth from the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_PAINKILLERS: { if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gPainkillers]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } if(PlayerInfo[playerid][pPainkillers] + amount > GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i painkillers. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pPainkillers], GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS)); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gPainkillers] -= amount; PlayerInfo[playerid][pPainkillers] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET painkillers = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gPainkillers], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", PlayerInfo[playerid][pPainkillers], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws some painkillers from the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have withdrawn %i painkillers from the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) withdraws %i painkillers from the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_MATERIALS: { if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gMaterials]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } if(PlayerInfo[playerid][pMaterials] + amount > GetPlayerCapacity(playerid, CAPACITY_MATERIALS)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS)); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= amount; PlayerInfo[playerid][pMaterials] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws some materials from the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have withdrawn %i materials from the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) withdraws %i materials from the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_CASH: { if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gCash]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gCash] -= amount; GivePlayerCash(playerid, amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gCash], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws some cash from the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have withdrawn $%i from the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) withdraws $%i from the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_HPAMMO: { if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gHPAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } if(PlayerInfo[playerid][pHPAmmo] + amount > GetPlayerCapacity(playerid, CAPACITY_HPAMMO)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i HP ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pHPAmmo], GetPlayerCapacity(playerid, CAPACITY_HPAMMO)); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gHPAmmo] -= amount; SetWeaponAmmo(playerid, AMMO_HP, PlayerInfo[playerid][pHPAmmo] + amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET hpammo = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gHPAmmo], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws some hollow point ammo from the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have withdrawn %i rounds of hollow point ammo from the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) withdraws %i hollow point ammo from the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_POISONAMMO: { if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gPoisonAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } if(PlayerInfo[playerid][pPoisonAmmo] + amount > GetPlayerCapacity(playerid, CAPACITY_POISONAMMO)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i poison ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pPoisonAmmo], GetPlayerCapacity(playerid, CAPACITY_POISONAMMO)); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gPoisonAmmo] -= amount; SetWeaponAmmo(playerid, AMMO_POISON, PlayerInfo[playerid][pPoisonAmmo] + amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET poisonammo = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gPoisonAmmo], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws some poison tip ammo from the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have withdrawn %i rounds of poison tip ammo from the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) withdraws %i poison tip ammo from the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_FMJAMMO: { if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gFMJAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } if(PlayerInfo[playerid][pFMJAmmo] + amount > GetPlayerCapacity(playerid, CAPACITY_FMJAMMO)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i FMJ ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pFMJAmmo], GetPlayerCapacity(playerid, CAPACITY_FMJAMMO)); return ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gFMJAmmo] -= amount; SetWeaponAmmo(playerid, AMMO_FMJ, PlayerInfo[playerid][pFMJAmmo] + amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET fmjammo = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gFMJAmmo], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s withdraws some full metal jacket ammo from the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have withdrawn %i rounds of full metal jacket ammo from the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) withdraws %i FMJ ammo from the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } } } else { if(PlayerInfo[playerid][pSelected] == ITEM_MATERIALS) { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHMATS); } else if(PlayerInfo[playerid][pSelected] == ITEM_CASH) { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCASH); } else if(ITEM_HPAMMO <= PlayerInfo[playerid][pSelected] <= ITEM_FMJAMMO) { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHAMMO2); } else { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHDRUGS2); } } } case DIALOG_GANGDEPOSIT: { if(PlayerInfo[playerid][pGang] == -1) { return 1; } if(response) { new amount; if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } switch(PlayerInfo[playerid][pSelected]) { case ITEM_WEED: { if(amount < 1 || amount > PlayerInfo[playerid][pWeed]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } if(GangInfo[PlayerInfo[playerid][pGang]][gWeed] + amount > GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_WEED)) { SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i grams of weed.", GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_WEED)); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gWeed] += amount; PlayerInfo[playerid][pWeed] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weed = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gWeed], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[playerid][pWeed], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits some weed in the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have deposited %i grams of weed in the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) deposits %i grams of weed in the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_COCAINE: { if(amount < 1 || amount > PlayerInfo[playerid][pCocaine]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } if(GangInfo[PlayerInfo[playerid][pGang]][gCocaine] + amount > GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_COCAINE)) { SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i grams of cocaine.", GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_COCAINE)); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gCocaine] += amount; PlayerInfo[playerid][pCocaine] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET cocaine = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gCocaine], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits some cocaine in the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have deposited %i grams of cocaine in the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) deposits %i grams of cocaine in the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_METH: { if(amount < 1 || amount > PlayerInfo[playerid][pMeth]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } if(GangInfo[PlayerInfo[playerid][pGang]][gMeth] + amount > GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_METH)) { SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i grams of meth.", GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_METH)); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gMeth] += amount; PlayerInfo[playerid][pMeth] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET meth = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMeth], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits some meth in the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have deposited %i grams of meth in the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) deposits %i grams of meth in the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_PAINKILLERS: { if(amount < 1 || amount > PlayerInfo[playerid][pPainkillers]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } if(GangInfo[PlayerInfo[playerid][pGang]][gPainkillers] + amount > GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_PAINKILLERS)) { SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i painkillers.", GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_PAINKILLERS)); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gPainkillers] += amount; PlayerInfo[playerid][pPainkillers] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET painkillers = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gPainkillers], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", PlayerInfo[playerid][pPainkillers], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits some painkillers in the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have deposited %i painkillers in the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) deposits %i painkillers in the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_MATERIALS: { if(amount < 1 || amount > PlayerInfo[playerid][pMaterials]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] + amount > GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_MATERIALS)) { SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i materials.", GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_MATERIALS)); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] += amount; PlayerInfo[playerid][pMaterials] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits some materials in the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have deposited %i materials in the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) deposits %i materials in the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_CASH: { if(amount < 1 || amount > PlayerInfo[playerid][pCash]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } if(GangInfo[PlayerInfo[playerid][pGang]][gCash] + amount > GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_CASH)) { SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than $%i.", GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_CASH)); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gCash] += amount; GivePlayerCash(playerid, -amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gCash], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits some cash in the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have deposited $%i in the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) deposited $%i in the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_HPAMMO: { if(amount < 1 || amount > PlayerInfo[playerid][pHPAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } if(GangInfo[PlayerInfo[playerid][pGang]][gHPAmmo] + amount > GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_HPAMMO)) { SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i rounds of hollow point ammo.", GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_HPAMMO)); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gHPAmmo] += amount; SetWeaponAmmo(playerid, AMMO_HP, PlayerInfo[playerid][pHPAmmo] - amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET hpammo = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gHPAmmo], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits some hollow point ammo in the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have deposited %i rounds of hollow point ammo in the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) deposits %i hollow point ammo in the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_POISONAMMO: { if(amount < 1 || amount > PlayerInfo[playerid][pPoisonAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } if(GangInfo[PlayerInfo[playerid][pGang]][gPoisonAmmo] + amount > GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_POISONAMMO)) { SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i rounds of poison tip ammo.", GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_POISONAMMO)); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gPoisonAmmo] += amount; SetWeaponAmmo(playerid, AMMO_POISON, PlayerInfo[playerid][pPoisonAmmo] - amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET poisonammo = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gPoisonAmmo], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits some poison tip ammo in the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have deposited %i rounds of poison tip ammo in the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) deposits %i poison tip ammo in the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } case ITEM_FMJAMMO: { if(amount < 1 || amount > PlayerInfo[playerid][pFMJAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } if(GangInfo[PlayerInfo[playerid][pGang]][gFMJAmmo] + amount > GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_FMJAMMO)) { SendClientMessageEx(playerid, COLOR_GREY, "The gang stash can't contain more than %i rounds of FMJ ammo.", GetGangStashCapacity(PlayerInfo[playerid][pGang], STASH_CAPACITY_FMJAMMO)); return ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gFMJAmmo] += amount; SetWeaponAmmo(playerid, AMMO_FMJ, PlayerInfo[playerid][pFMJAmmo] - amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET fmjammo = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gFMJAmmo], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s deposits some full metal jacket ammo in the gang stash.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have deposited %i rounds of full metal jacket ammo in the gang stash.", amount); Log_Write("log_gang", "%s (uid: %i) deposits %i FMJ ammo in the gang stash.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); } } } else { if(PlayerInfo[playerid][pSelected] == ITEM_MATERIALS) { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHMATS); } else if(PlayerInfo[playerid][pSelected] == ITEM_CASH) { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCASH); } else if(ITEM_HPAMMO <= PlayerInfo[playerid][pSelected] <= ITEM_FMJAMMO) { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHAMMO2); } else { ShowDialogToPlayer(playerid, DIALOG_GANGSTASHDRUGS2); } } } case DIALOG_GANGSTASHCRAFT: { if(response) { switch(listitem) { case 0: { if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] < 150) { return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe."); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= 150; GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_9MM]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i, weapon_9mm = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_9MM], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s crafts a 9mm and stores it to the gang stash.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_AQUA, "You used 150 materials from your gang stash to craft a 9mm."); Log_Write("log_gang", "%s (uid: %i) crafts a 9mm using 150 materials from the gang stash.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID]); ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT); } case 1: { if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] < 200) { return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe."); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= 200; GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SDPISTOL]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i, weapon_sdpistol = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SDPISTOL], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s crafts a silenced pistol and stores it to the gang stash.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_AQUA, "You used 200 materials from your gang stash to craft a silenced pistol."); Log_Write("log_gang", "%s (uid: %i) crafts a silenced pistol using 200 materials from the gang stash.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID]); ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT); } case 2: { if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] < 500) { return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe."); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= 500; GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SHOTGUN]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i, weapon_shotgun = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SHOTGUN], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s crafts a shotgun and stores it to the gang stash.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_AQUA, "You used 500 materials from your gang stash to craft a shotgun."); Log_Write("log_gang", "%s (uid: %i) crafts a shotgun using 500 materials from the gang stash.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID]); ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT); } case 3: { if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] < 500) { return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe."); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= 500; GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_UZI]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i, weapon_uzi = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_UZI], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s crafts a Micro SMG and stores it to the gang stash.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_AQUA, "You used 500 materials from your gang stash to craft a Micro SMG."); Log_Write("log_gang", "%s (uid: %i) crafts a Micro SMG using 500 materials from the gang stash.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID]); ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT); } case 4: { if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] < 500) { return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe."); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= 500; GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_TEC9]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i, weapon_tec9 = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_TEC9], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s crafts a Tec-9 and stores it to the gang stash.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_AQUA, "You used 500 materials from your gang stash to craft a Tec-9."); Log_Write("log_gang", "%s (uid: %i) crafts a Tec-9 using 500 materials from the gang stash.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID]); ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT); } case 5: { if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] < 1000) { return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe."); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= 1000; GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_MP5]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i, weapon_mp5 = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_MP5], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s crafts an MP5 and stores it to the gang stash.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_AQUA, "You used 1000 materials from your gang stash to craft an MP5."); Log_Write("log_gang", "%s (uid: %i) crafts an MP5 using 1000 materials from the gang stash.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID]); ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT); } case 6: { if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] < 1000) { return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe."); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= 1000; GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_RIFLE]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i, weapon_rifle = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_RIFLE], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s crafts a rifle and stores it to the gang stash.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_AQUA, "You used 1000 materials from your gang stash to craft a rifle."); Log_Write("log_gang", "%s (uid: %i) crafts a rifle using 1000 materials from the gang stash.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID]); ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT); } case 7: { if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] < 2000) { return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe."); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= 2000; GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_DEAGLE]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i, weapon_deagle = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_DEAGLE], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s crafts a Desert Eagle and stores it to the gang stash.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_AQUA, "You used 2000 materials from your gang stash to craft a Desert Eagle."); Log_Write("log_gang", "%s (uid: %i) crafts a Desert Eagle using 2000 materials from the gang stash.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID]); ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT); } case 8: { if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] < 5000) { return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe."); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= 5000; GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_MOLOTOV]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i, weapon_molotov = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_MOLOTOV], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s crafts a molotov and stores it to the gang stash.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_AQUA, "You used 5000 materials from your gang stash to craft a molotov."); Log_Write("log_gang", "%s (uid: %i) crafts a molotov using 5000 materials from the gang stash.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID]); ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT); } case 9: { if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] < 3000) { return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe."); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= 3000; GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_AK47]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i, weapon_ak47 = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_AK47], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s crafts an AK-47 and stores it to the gang stash.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_AQUA, "You used 3000 materials from your gang stash to craft an AK-47."); Log_Write("log_gang", "%s (uid: %i) crafts an AK-47 using 3000 materials from the gang stash.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID]); ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT); } case 10: { if(GangInfo[PlayerInfo[playerid][pGang]][gMaterials] < 3000) { return SendClientMessage(playerid, COLOR_GREY, "There aren't enough materials in the safe."); } GangInfo[PlayerInfo[playerid][pGang]][gMaterials] -= 3000; GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SAWNOFF]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET materials = %i, weapon_sawnoff = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gMaterials], GangInfo[PlayerInfo[playerid][pGang]][gWeapons][GANGWEAPON_SAWNOFF], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s crafts a sawnoff shotgun and stores it to the gang stash.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_AQUA, "You used 3000 materials from your gang stash to craft a sawnoff shotgun."); Log_Write("log_gang", "%s (uid: %i) crafts a sawnoff shotgun using 3000 materials from the gang stash.", GetPlayerRPName(playerid), PlayerInfo[playerid][pID]); ShowDialogToPlayer(playerid, DIALOG_GANGSTASHCRAFT); } } } else { ShowDialogToPlayer(playerid, DIALOG_GANGSTASH); } } case DIALOG_GANGSTASHMATS: { if(response) { if(listitem == 0) { if(PlayerInfo[playerid][pGangRank] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 6+ in order to withdraw materials."); } ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } else if(listitem == 1) { ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } } else { ShowDialogToPlayer(playerid, DIALOG_GANGSTASH); } } case DIALOG_GANGSTASHCASH: { if(response) { if(listitem == 0) { if(PlayerInfo[playerid][pGangRank] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 6+ in order to withdraw cash."); } ShowDialogToPlayer(playerid, DIALOG_GANGWITHDRAW); } else if(listitem == 1) { ShowDialogToPlayer(playerid, DIALOG_GANGDEPOSIT); } } else { ShowDialogToPlayer(playerid, DIALOG_GANGSTASH); } } case DIALOG_GANGSKINS: { if(PlayerInfo[playerid][pGang] >= 0) { if(response) { new index = PlayerInfo[playerid][pSkinSelected] + 1; if(index >= MAX_GANG_SKINS) { // When the player is shown the dialog for the first time, their skin isn't chnaged until they click >> Next. SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); PlayerInfo[playerid][pSkinSelected] = -1; } else { // Find the next skin in the array. for(new i = index; i < MAX_GANG_SKINS; i ++) { if(GangInfo[PlayerInfo[playerid][pGang]][gSkins][i] != 0) { SetPlayerSkin(playerid, GangInfo[PlayerInfo[playerid][pGang]][gSkins][i]); PlayerInfo[playerid][pSkinSelected] = i; break; } } if(index == PlayerInfo[playerid][pSkinSelected] + 1) { // Looks like there was no skin found. So, we'll go back to the very first valid skin in the skin array. for(new i = 0; i < MAX_GANG_SKINS; i ++) { if(GangInfo[PlayerInfo[playerid][pGang]][gSkins][i] != 0) { SetPlayerSkin(playerid, GangInfo[PlayerInfo[playerid][pGang]][gSkins][i]); PlayerInfo[playerid][pSkinSelected] = i; break; } } } } ShowPlayerDialog(playerid, DIALOG_GANGSKINS, DIALOG_STYLE_MSGBOX, "Skin selection", "Press {00AA00}>> Next{A9C4E4} to browse through available gang skins.", ">> Next", "Confirm"); } else { PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid); PlayerInfo[playerid][pSkinSelected] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET skin = %i WHERE uid = %i", PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s changes their clothes.", GetPlayerRPName(playerid)); } } } case DIALOG_GANGFINDCAR: { if(response) { new count, garageid; for(new i = 1; i < MAX_VEHICLES; i ++) { if((VehicleInfo[i][vID] > 0 && VehicleInfo[i][vGang] == PlayerInfo[playerid][pGang]) && (count++ == listitem)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; if((garageid = GetVehicleGarage(i)) >= 0) { SetPlayerCheckpoint(playerid, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ], 3.0); SendClientMessageEx(playerid, COLOR_YELLOW, "** This %s is located in a garage. Checkpoint marked at the garage's location.", GetVehicleName(i)); } else { new Float:x, Float:y, Float:z; GetVehiclePos(i, x, y, z); SetPlayerCheckpoint(playerid, x, y, z, 3.0); SendClientMessageEx(playerid, COLOR_YELLOW, "** This %s is located in %s. Checkpoint marked at the location.", GetVehicleName(i), GetZoneName(x, y, z)); } return 1; } } } } case DIALOG_GANGPOINTSHOP: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 6) { return 1; } if(response) { switch(listitem) { case 0: { if(GangInfo[PlayerInfo[playerid][pGang]][gPoints] < 500) { return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points."); } if(PlayerInfo[playerid][pCash] < 50000) { return SendClientMessage(playerid, COLOR_GREY, "You need $50000 on hand to purchase this upgrade."); } if(GangInfo[PlayerInfo[playerid][pGang]][gDrugDealer]) { return SendClientMessage(playerid, COLOR_GREY, "Your gang already has this upgrade."); } GangInfo[PlayerInfo[playerid][pGang]][gDrugDealer] = 1; GangInfo[PlayerInfo[playerid][pGang]][gDrugX] = 0.0; GangInfo[PlayerInfo[playerid][pGang]][gDrugY] = 0.0; GangInfo[PlayerInfo[playerid][pGang]][gDrugZ] = 0.0; GangInfo[PlayerInfo[playerid][pGang]][gDrugWeed] = 0; GangInfo[PlayerInfo[playerid][pGang]][gDrugMeth] = 0; GangInfo[PlayerInfo[playerid][pGang]][gDrugCocaine] = 0; GangInfo[PlayerInfo[playerid][pGang]][gDrugPrices][0] = 500; GangInfo[PlayerInfo[playerid][pGang]][gDrugPrices][1] = 1000; GangInfo[PlayerInfo[playerid][pGang]][gDrugPrices][2] = 1500; GangInfo[PlayerInfo[playerid][pGang]][gPoints] -= 500; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET drugdealer = 1, drug_x = 0.0, drug_y = 0.0, drug_z = 0.0, drugweed = 0, drugcocaine = 0, drugmeth = 0, weed_price = 500, cocaine_price = 1000, meth_price = 1500, points = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gPoints], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, -50000); SendClientMessage(playerid, COLOR_AQUA, "You have spent 500 GP & $50000 on an {00AA00}NPC drug dealer{33CCFF}. '/gang npc' to edit your drug dealer."); Log_Write("log_gang", "%s (uid: %i) spent 500 GP & $50000 on an NPC drug dealer for %s (id: %i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case 1: { if(GangInfo[PlayerInfo[playerid][pGang]][gPoints] < 500) { return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points."); } if(PlayerInfo[playerid][pCash] < 50000) { return SendClientMessage(playerid, COLOR_GREY, "You need $50000 on hand to purchase this upgrade."); } if(GangInfo[PlayerInfo[playerid][pGang]][gArmsDealer]) { return SendClientMessage(playerid, COLOR_GREY, "Your gang already has this upgrade."); } GangInfo[PlayerInfo[playerid][pGang]][gArmsDealer] = 1; GangInfo[PlayerInfo[playerid][pGang]][gArmsX] = 0.0; GangInfo[PlayerInfo[playerid][pGang]][gArmsY] = 0.0; GangInfo[PlayerInfo[playerid][pGang]][gArmsZ] = 0.0; GangInfo[PlayerInfo[playerid][pGang]][gArmsMaterials] = 0; GangInfo[PlayerInfo[playerid][pGang]][gPoints] -= 500; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsdealer = 1, arms_x = 0.0, arms_y = 0.0, arms_z = 0.0, armsmaterials = 0, points = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gPoints], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, -50000); SendClientMessage(playerid, COLOR_AQUA, "You have spent 500 GP & $50000 on an {00AA00}NPC arms dealer{33CCFF}. '/gang npc' to edit your arms dealer."); Log_Write("log_gang", "%s (uid: %i) spent 500 GP & $50000 on an NPC arm dealer for %s (id: %i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case 2: { if(GangInfo[PlayerInfo[playerid][pGang]][gPoints] < 400) { return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points."); } if(PlayerInfo[playerid][pCash] < 75000) { return SendClientMessage(playerid, COLOR_GREY, "You need $75000 on hand to purchase this upgrade."); } GivePlayerCash(playerid, -75000); GiveGangPoints(PlayerInfo[playerid][pGang], -400); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, 'Gang point redemption', NOW(), 'Duel arena')", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_AQUA, "You have spent 400 GP & $75000 on a {00AA00}Duel arena{33CCFF}. /report for an admin to set it up."); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has a pending flag for a duel arena for their gang.", GetPlayerRPName(playerid), playerid); } case 3: { if(GangInfo[PlayerInfo[playerid][pGang]][gPoints] < 4500) { return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points."); } if(PlayerInfo[playerid][pCash] < 100000) { return SendClientMessage(playerid, COLOR_GREY, "You need $100000 on hand to purchase this upgrade."); } GivePlayerCash(playerid, -100000); GiveGangPoints(PlayerInfo[playerid][pGang], -4500); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, 'Gang point redemption', NOW(), 'Gang mapping (up to 50 objects)')", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_AQUA, "You have spent 4500 GP & $100000 on {00AA00}Mapping{33CCFF}. /report for an admin to set it up."); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has a pending flag for mapping for their gang.", GetPlayerRPName(playerid), playerid); } case 4: { if(GangInfo[PlayerInfo[playerid][pGang]][gPoints] < 5000) { return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points."); } if(PlayerInfo[playerid][pCash] < 100000) { return SendClientMessage(playerid, COLOR_GREY, "You need $100000 on hand to purchase this upgrade."); } GivePlayerCash(playerid, -100000); GiveGangPoints(PlayerInfo[playerid][pGang], -5000); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, 'Gang point redemption', NOW(), 'Custom gang interior')", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_AQUA, "You have spent 5000 GP & $100000 on {00AA00}Custom gang interior{33CCFF}. /report for an admin to set it up."); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has a pending flag for a custom gang interior.", GetPlayerRPName(playerid), playerid); } case 5: { switch(GangInfo[PlayerInfo[playerid][pGang]][gLevel]) { case 1: { if(GangInfo[PlayerInfo[playerid][pGang]][gPoints] < 6000) { return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points."); } if(PlayerInfo[playerid][pCash] < 75000) { return SendClientMessage(playerid, COLOR_GREY, "You need $75000 on hand to purchase this upgrade."); } GangInfo[PlayerInfo[playerid][pGang]][gLevel] = 2; GangInfo[PlayerInfo[playerid][pGang]][gPoints] -= 6000; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET level = 2, points = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gPoints], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, -75000); ReloadGang(PlayerInfo[playerid][pGang]); SendClientMessageEx(playerid, COLOR_GREEN, "You have spent 6000 GP & $75000 for gang level 2/3. Your gang can now have %i members & %i gang vehicles.", GetGangMemberLimit(PlayerInfo[playerid][pGang]), GetGangVehicleLimit(PlayerInfo[playerid][pGang])); SendClientMessage(playerid, COLOR_GREEN, "Your capacity for items in your gang stash has also been increased. Access your gang stash to learn more!"); Log_Write("log_gang", "%s (uid: %i) spent 6000 GP & $75000 for gang level 2/3 for %s (id: %i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } case 2: { if(GangInfo[PlayerInfo[playerid][pGang]][gPoints] < 12000) { return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have enough points."); } if(PlayerInfo[playerid][pCash] < 100000) { return SendClientMessage(playerid, COLOR_GREY, "You need $100000 on hand to purchase this upgrade."); } GangInfo[PlayerInfo[playerid][pGang]][gLevel] = 3; GangInfo[PlayerInfo[playerid][pGang]][gPoints] -= 12000; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET level = 3, points = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gPoints], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, -100000); ReloadGang(PlayerInfo[playerid][pGang]); SendClientMessageEx(playerid, COLOR_GREEN, "You have spent 12000 GP & $100000 for gang level 3/3. Your gang can now have %i members & %i gang vehicles.", GetGangMemberLimit(PlayerInfo[playerid][pGang]), GetGangVehicleLimit(PlayerInfo[playerid][pGang])); SendClientMessage(playerid, COLOR_GREEN, "Your capacity for items in your gang stash has also been increased. Access your gang stash to learn more!"); Log_Write("log_gang", "%s (uid: %i) spent 12000 GP & $100000 for gang level 3/3 for %s (id: %i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang]); } } } } } } case DIALOG_GANGARMSPRICES: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return 1; } if(response) { PlayerInfo[playerid][pSelected] = listitem; ShowPlayerDialog(playerid, DIALOG_GANGARMSPRICE, DIALOG_STYLE_INPUT, "Arms dealer | Prices", "Enter the new price for this item:", "Submit", "Back"); } else { ShowDialogToPlayer(playerid, DIALOG_GANGARMSEDIT); } } case DIALOG_GANGARMSPRICE: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return 1; } if(response) { new amount; if(sscanf(inputtext, "i", amount)) { return ShowPlayerDialog(playerid, DIALOG_GANGARMSPRICE, DIALOG_STYLE_INPUT, "Arms dealer | Prices", "Enter the new price for this item", "Submit", "Back"); } if(amount < 0) { SendClientMessage(playerid, COLOR_GREY, "The amount can't be below $0."); return ShowPlayerDialog(playerid, DIALOG_GANGARMSPRICE, DIALOG_STYLE_INPUT, "Arms dealer | Prices", "Enter the new price for this item", "Submit", "Back"); } GangInfo[PlayerInfo[playerid][pGang]][gArmsPrices][PlayerInfo[playerid][pSelected]] = amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsprice_%i = %i WHERE id = %i", PlayerInfo[playerid][pSelected] + 1, amount, PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); if(PlayerInfo[playerid][pSelected] == 0) { SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Micro Uzi{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 1) { SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Tec-9{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 2) { SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}MP5{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 3) { SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Desert Eagle{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 4) { SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Molotov{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 5) { SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}AK-47{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 6) { SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}M4{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 7) { SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Sniper{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 8) { SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Sawnoff Shotgun{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 9) { SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Hollow Point Ammo{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 10) { SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}Poison Tip Ammo{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 11) { SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}FMJ Ammo{33CCFF} to $%i.", amount); } } ShowDialogToPlayer(playerid, DIALOG_GANGARMSPRICES); } case DIALOG_GANGARMSDEALER: { if(!IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsX], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsY], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsZ])) { return 1; } if(response) { if(listitem == 0) { ShowDialogToPlayer(playerid, DIALOG_GANGARMSWEAPONS); } else if(listitem == 1) { ShowDialogToPlayer(playerid, DIALOG_GANGARMSAMMO); } else if(listitem == 2) { if(PlayerInfo[playerid][pGang] != PlayerInfo[playerid][pDealerGang]) { return SendClientMessage(playerid, COLOR_GREY, "This arms dealer doesn't belong to your gang."); } if(PlayerInfo[playerid][pGangRank] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You need to be rank 6+ in order to edit."); } ShowDialogToPlayer(playerid, DIALOG_GANGARMSEDIT); } } } case DIALOG_GANGARMSWEAPONS: { if(!IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsX], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsY], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsZ])) { return 1; } if(response) { switch(listitem) { case 0: { if(GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] < 500) { return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon."); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon."); } GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] -= 500; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); GivePlayerWeaponEx(playerid, 28); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the arms dealer and received a micro uzi.", GetPlayerRPName(playerid), GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased a {00AA00}micro uzi{33CCFF} for $%i.", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); } case 1: { if(GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] < 500) { return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon."); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon."); } GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] -= 500; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); GivePlayerWeaponEx(playerid, 32); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the arms dealer and received a Tec-9.", GetPlayerRPName(playerid), GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased a {00AA00}Tec-9{33CCFF} for $%i.", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); } case 2: { if(GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] < 1000) { return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon."); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon."); } GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] -= 1000; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); GivePlayerWeaponEx(playerid, 29); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the arms dealer and received an MP5.", GetPlayerRPName(playerid), GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased an {00AA00}MP5{33CCFF} for $%i.", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); } case 3: { if(GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] < 2000) { return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon."); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon."); } GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] -= 2000; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); GivePlayerWeaponEx(playerid, 24); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the arms dealer and received a Desert Eagle.", GetPlayerRPName(playerid), GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased a {00AA00}Desert Eagle{33CCFF} for $%i.", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); } case 4: { if(GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] < 5000) { return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon."); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon."); } GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] -= 5000; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); GivePlayerWeaponEx(playerid, 18); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the arms dealer and received a molotov.", GetPlayerRPName(playerid), GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased a {00AA00}molotov{33CCFF} for $%i.", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); } case 5: { if(GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] < 3000) { return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon."); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon."); } GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] -= 3000; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); GivePlayerWeaponEx(playerid, 30); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the arms dealer and received an AK-47.", GetPlayerRPName(playerid), GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased an {00AA00}AK-47{33CCFF} for $%i.", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); } case 6: { if(GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] < 4000) { return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon."); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon."); } GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] -= 4000; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); GivePlayerWeaponEx(playerid, 31); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the arms dealer and received an M4.", GetPlayerRPName(playerid), GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased an {00AA00}M4{33CCFF} for $%i.", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); } case 7: { if(GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] < 6500) { return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon."); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon."); } GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] -= 6500; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); GivePlayerWeaponEx(playerid, 34); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the arms dealer and received a sniper.", GetPlayerRPName(playerid), GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased a {00AA00}sniper{33CCFF} for $%i.", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); } case 8: { if(GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] < 3000) { return SendClientMessage(playerid, COLOR_GREY, "This gang's arms dealer doesn't have enough materials for this weapon."); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this weapon."); } GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials] -= 3000; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsmaterials = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsMaterials], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(playerid, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); GivePlayerWeaponEx(playerid, 26); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the arms dealer and received a sawnoff shotgun.", GetPlayerRPName(playerid), GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased a {00AA00}sawnoff shotgun{33CCFF} for $%i.", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][listitem]); } } } else { ShowDialogToPlayer(playerid, DIALOG_GANGARMSDEALER); } } case DIALOG_GANGARMSAMMO: { if(!IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsX], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsY], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsZ])) { return 1; } if(response) { PlayerInfo[playerid][pSelected] = listitem; ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } else { ShowDialogToPlayer(playerid, DIALOG_GANGARMSDEALER); } } case DIALOG_GANGAMMOBUY: { if(!IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsX], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsY], GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsZ])) { return 1; } if(response) { new amount; switch(PlayerInfo[playerid][pSelected]) { case 0: // Hollow point ammo { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsHPAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][9] * amount) { SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy that many rounds."); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } if(PlayerInfo[playerid][pHPAmmo] + amount > GetPlayerCapacity(playerid, CAPACITY_HPAMMO)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i HP ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pHPAmmo], GetPlayerCapacity(playerid, CAPACITY_HPAMMO)); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } new cost = GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][9] * amount; GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsHPAmmo] -= amount; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += cost; SetWeaponAmmo(playerid, AMMO_HP, PlayerInfo[playerid][pHPAmmo] + amount); GivePlayerCash(playerid, -cost); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armshpammo = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsHPAmmo], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the arms dealer and received %i rounds of hollow point ammo.", GetPlayerRPName(playerid), cost, amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased %i rounds of {00AA00}hollow point ammo{33CCFF} for $%i.", amount, cost); } case 1: // Poison tip ammo { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPoisonAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][10] * amount) { SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy that many rounds."); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } if(PlayerInfo[playerid][pPoisonAmmo] + amount > GetPlayerCapacity(playerid, CAPACITY_POISONAMMO)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i poison ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pPoisonAmmo], GetPlayerCapacity(playerid, CAPACITY_POISONAMMO)); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } new cost = GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][10] * amount; GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPoisonAmmo] -= amount; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += cost; SetWeaponAmmo(playerid, AMMO_POISON, PlayerInfo[playerid][pPoisonAmmo] + amount); GivePlayerCash(playerid, -cost); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armspoisonammo = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPoisonAmmo], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the arms dealer and received %i rounds of poison tip ammo.", GetPlayerRPName(playerid), cost, amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased %i rounds of {00AA00}poison tip ammo{33CCFF} for $%i.", amount, cost); } case 2: // FMJ ammo { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsFMJAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][11] * amount) { SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy that many rounds."); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } if(PlayerInfo[playerid][pFMJAmmo] + amount > GetPlayerCapacity(playerid, CAPACITY_FMJAMMO)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i FMJ ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pFMJAmmo], GetPlayerCapacity(playerid, CAPACITY_FMJAMMO)); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOBUY); } new cost = GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsPrices][11] * amount; GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsFMJAmmo] -= amount; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += cost; SetWeaponAmmo(playerid, AMMO_FMJ, PlayerInfo[playerid][pFMJAmmo] + amount); GivePlayerCash(playerid, -cost); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsfmjammo = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gArmsFMJAmmo], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the arms dealer and received %i rounds of FMJ ammo.", GetPlayerRPName(playerid), cost, amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased %i rounds of {00AA00}FMJ ammo{33CCFF} for $%i.", amount, cost); } } } else { ShowDialogToPlayer(playerid, DIALOG_GANGARMSAMMO); } } case DIALOG_GANGARMSEDIT: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 6) { return 1; } if(response) { switch(listitem) { case 0: ShowDialogToPlayer(playerid, DIALOG_GANGARMSPRICES); case 1: ShowDialogToPlayer(playerid, DIALOG_GANGARMSDEPOSITMATS); case 2: ShowDialogToPlayer(playerid, DIALOG_GANGARMSWITHDRAWMATS); case 3: ShowDialogToPlayer(playerid, DIALOG_GANGAMMODEPOSITS); case 4: ShowDialogToPlayer(playerid, DIALOG_GANGAMMOWITHDRAWS); } } else { ShowDialogToPlayer(playerid, DIALOG_GANGARMSDEALER); } } case DIALOG_GANGARMSDEPOSITMATS: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 6) { return 1; } if(response) { new amount; if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGARMSDEPOSITMATS); } if(amount < 1 || amount > PlayerInfo[playerid][pMaterials]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGARMSDEPOSITMATS); } GangInfo[PlayerInfo[playerid][pGang]][gArmsMaterials] += amount; PlayerInfo[playerid][pMaterials] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsmaterials = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gArmsMaterials], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have deposited %i materials in your arms dealer NPC.", amount); } ShowDialogToPlayer(playerid, DIALOG_GANGARMSEDIT); } case DIALOG_GANGARMSWITHDRAWMATS: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 6) { return 1; } if(response) { new amount; if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGARMSWITHDRAWMATS); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gArmsMaterials]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGARMSWITHDRAWMATS); } GangInfo[PlayerInfo[playerid][pGang]][gArmsMaterials] -= amount; PlayerInfo[playerid][pMaterials] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsmaterials = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gArmsMaterials], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have withdrawn %i materials from your arms dealer NPC.", amount); } ShowDialogToPlayer(playerid, DIALOG_GANGARMSEDIT); } case DIALOG_GANGAMMODEPOSITS: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return 1; } if(response) { PlayerInfo[playerid][pSelected] = listitem; ShowDialogToPlayer(playerid, DIALOG_GANGAMMODEPOSIT); } else { ShowDialogToPlayer(playerid, DIALOG_GANGARMSEDIT); } } case DIALOG_GANGAMMOWITHDRAWS: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return 1; } if(response) { PlayerInfo[playerid][pSelected] = listitem; ShowDialogToPlayer(playerid, DIALOG_GANGAMMOWITHDRAW); } else { ShowDialogToPlayer(playerid, DIALOG_GANGARMSEDIT); } } case DIALOG_GANGAMMODEPOSIT: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return 1; } if(response) { new amount; switch(PlayerInfo[playerid][pSelected]) { case 0: // HP ammo { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGAMMODEPOSIT); } if(amount < 1 || amount > PlayerInfo[playerid][pHPAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMODEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gArmsHPAmmo] += amount; SetWeaponAmmo(playerid, AMMO_HP, PlayerInfo[playerid][pHPAmmo] - amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armshpammo = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gArmsHPAmmo], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have deposited %i rounds of {00AA00}hollow point ammo{33CCFF} in your arms dealer NPC.", amount); } case 1: // Poison ammo { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGAMMODEPOSIT); } if(amount < 1 || amount > PlayerInfo[playerid][pPoisonAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMODEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gArmsPoisonAmmo] += amount; SetWeaponAmmo(playerid, AMMO_POISON, PlayerInfo[playerid][pPoisonAmmo] - amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armspoisonammo = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gArmsPoisonAmmo], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have deposited %i rounds of {00AA00}poison tip ammo{33CCFF} in your arms dealer NPC.", amount); } case 2: // FMJ ammo { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGAMMODEPOSIT); } if(amount < 1 || amount > PlayerInfo[playerid][pFMJAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMODEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gArmsFMJAmmo] += amount; SetWeaponAmmo(playerid, AMMO_FMJ, PlayerInfo[playerid][pFMJAmmo] - amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsfmjammo = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gArmsFMJAmmo], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have deposited %i rounds of {00AA00}FMJ ammo{33CCFF} in your arms dealer NPC.", amount); } } } ShowDialogToPlayer(playerid, DIALOG_GANGAMMODEPOSITS); } case DIALOG_GANGAMMOWITHDRAW: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return 1; } if(response) { new amount; switch(PlayerInfo[playerid][pSelected]) { case 0: // HP ammo { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOWITHDRAW); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gArmsHPAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOWITHDRAW); } if(PlayerInfo[playerid][pHPAmmo] + amount > GetPlayerCapacity(playerid, CAPACITY_HPAMMO)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i HP ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pHPAmmo], GetPlayerCapacity(playerid, CAPACITY_HPAMMO)); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gArmsHPAmmo] -= amount; SetWeaponAmmo(playerid, AMMO_HP, PlayerInfo[playerid][pHPAmmo] + amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armshpammo = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gArmsHPAmmo], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have withdrawn %i rounds of {00AA00}hollow point ammo{33CCFF} from your arms dealer NPC.", amount); } case 1: // Poison ammo { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOWITHDRAW); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gArmsPoisonAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOWITHDRAW); } if(PlayerInfo[playerid][pPoisonAmmo] + amount > GetPlayerCapacity(playerid, CAPACITY_POISONAMMO)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i poison ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pPoisonAmmo], GetPlayerCapacity(playerid, CAPACITY_POISONAMMO)); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gArmsPoisonAmmo] -= amount; SetWeaponAmmo(playerid, AMMO_POISON, PlayerInfo[playerid][pPoisonAmmo] + amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armspoisonammo = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gArmsPoisonAmmo], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have withdrawn %i rounds of {00AA00}poison tip ammo{33CCFF} from your arms dealer NPC.", amount); } case 2: // FMJ ammo { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOWITHDRAW); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gArmsFMJAmmo]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOWITHDRAW); } if(PlayerInfo[playerid][pFMJAmmo] + amount > GetPlayerCapacity(playerid, CAPACITY_FMJAMMO)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i FMJ ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pFMJAmmo], GetPlayerCapacity(playerid, CAPACITY_FMJAMMO)); return ShowDialogToPlayer(playerid, DIALOG_GANGAMMOWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gArmsFMJAmmo] -= amount; SetWeaponAmmo(playerid, AMMO_FMJ, PlayerInfo[playerid][pFMJAmmo] + amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET armsfmjammo = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gArmsFMJAmmo], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have withdrawn %i rounds of {00AA00}FMJ ammo{33CCFF} from your arms dealer NPC.", amount); } } } ShowDialogToPlayer(playerid, DIALOG_GANGAMMOWITHDRAWS); } case DIALOG_GANGDRUGDEALER: { if(!IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugX], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugY], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugZ])) { return 1; } if(response) { if(listitem == 0) { ShowDialogToPlayer(playerid, DIALOG_GANGDRUGSHOP); } else if(listitem == 1) { if(PlayerInfo[playerid][pGang] != PlayerInfo[playerid][pDealerGang]) { return SendClientMessage(playerid, COLOR_GREY, "This drug dealer doesn't belong to your gang."); } if(PlayerInfo[playerid][pGangRank] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You need to be rank 6+ in order to edit."); } ShowDialogToPlayer(playerid, DIALOG_GANGDRUGEDIT); } } } case DIALOG_GANGDRUGSHOP: { if(!IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugX], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugY], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugZ])) { return 1; } if(response) { PlayerInfo[playerid][pSelected] = listitem; ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } else { ShowDialogToPlayer(playerid, DIALOG_GANGDRUGDEALER); } } case DIALOG_GANGDRUGBUY: { if(!IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugX], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugY], GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugZ])) { return 1; } if(response) { new amount; switch(PlayerInfo[playerid][pSelected]) { case 0: // Weed { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugWeed]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugPrices][0] * amount) { SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy that many grams."); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } if(PlayerInfo[playerid][pWeed] + amount > GetPlayerCapacity(playerid, CAPACITY_WEED)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED)); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } new cost = GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugPrices][0] * amount; GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugWeed] -= amount; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += cost; PlayerInfo[playerid][pWeed] += amount; GivePlayerCash(playerid, -cost); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET drugweed = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugWeed], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[playerid][pWeed], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the drug dealer and received %i grams of weed.", GetPlayerRPName(playerid), cost, amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased %i grams of {00AA00}weed{33CCFF} for $%i.", amount, cost); } case 1: // Cocaine { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugCocaine]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugPrices][1] * amount) { SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy that many grams."); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } if(PlayerInfo[playerid][pCocaine] + amount > GetPlayerCapacity(playerid, CAPACITY_COCAINE)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE)); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } new cost = GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugPrices][1] * amount; GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugCocaine] -= amount; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += cost; PlayerInfo[playerid][pCocaine] += amount; GivePlayerCash(playerid, -cost); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET drugcocaine = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugCocaine], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the drug dealer and received %i grams of cocaine.", GetPlayerRPName(playerid), cost, amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased %i grams of {00AA00}cocaine{33CCFF} for $%i.", amount, cost); } case 2: // Meth { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugMeth]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } if(PlayerInfo[playerid][pCash] < GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugPrices][2] * amount) { SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy that many grams."); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } if(PlayerInfo[playerid][pMeth] + amount > GetPlayerCapacity(playerid, CAPACITY_METH)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i meth. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH)); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGBUY); } new cost = GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugPrices][2] * amount; GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugMeth] -= amount; GangInfo[PlayerInfo[playerid][pDealerGang]][gCash] += cost; PlayerInfo[playerid][pMeth] += amount; GivePlayerCash(playerid, -cost); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET drugmeth = %i, cash = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pDealerGang]][gDrugMeth], GangInfo[PlayerInfo[playerid][pDealerGang]][gCash], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s paid $%i to the drug dealer and received %i grams of meth.", GetPlayerRPName(playerid), cost, amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased %i grams of {00AA00}meth{33CCFF} for $%i.", amount, cost); } } } else { ShowDialogToPlayer(playerid, DIALOG_GANGDRUGSHOP); } } case DIALOG_GANGDRUGEDIT: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 6) { return 1; } if(response) { switch(listitem) { case 0: ShowDialogToPlayer(playerid, DIALOG_GANGDRUGPRICES); case 1: ShowDialogToPlayer(playerid, DIALOG_GANGDRUGDEPOSITS); case 2: ShowDialogToPlayer(playerid, DIALOG_GANGDRUGWITHDRAWS); } } else { ShowDialogToPlayer(playerid, DIALOG_GANGDRUGDEALER); } } case DIALOG_GANGDRUGPRICES: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return 1; } if(response) { PlayerInfo[playerid][pSelected] = listitem; ShowPlayerDialog(playerid, DIALOG_GANGDRUGPRICE, DIALOG_STYLE_INPUT, "Drug dealer | Prices", "Enter the new price for this drug:", "Submit", "Back"); } else { ShowDialogToPlayer(playerid, DIALOG_GANGDRUGEDIT); } } case DIALOG_GANGDRUGPRICE: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return 1; } if(response) { new amount; if(sscanf(inputtext, "i", amount)) { return ShowPlayerDialog(playerid, DIALOG_GANGDRUGPRICE, DIALOG_STYLE_INPUT, "Drug dealer | Prices", "Enter the new price for this drug:", "Submit", "Back"); } if(amount < 0) { SendClientMessage(playerid, COLOR_GREY, "The amount can't be below $0."); return ShowPlayerDialog(playerid, DIALOG_GANGDRUGPRICE, DIALOG_STYLE_INPUT, "Drug dealer | Prices", "Enter the new price for this drug:", "Submit", "Back"); } GangInfo[PlayerInfo[playerid][pGang]][gDrugPrices][PlayerInfo[playerid][pSelected]] = amount; if(PlayerInfo[playerid][pSelected] == 0) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET weed_price = %i WHERE id = %i", amount, PlayerInfo[playerid][pGang]); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}weed{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 1) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET cocaine_price = %i WHERE id = %i", amount, PlayerInfo[playerid][pGang]); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}cocaine{33CCFF} to $%i.", amount); } else if(PlayerInfo[playerid][pSelected] == 2) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET meth_price = %i WHERE id = %i", amount, PlayerInfo[playerid][pGang]); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the price of {00AA00}meth{33CCFF} to $%i.", amount); } mysql_tquery(connectionID, queryBuffer); } ShowDialogToPlayer(playerid, DIALOG_GANGDRUGPRICES); } case DIALOG_GANGDRUGDEPOSITS: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return 1; } if(response) { PlayerInfo[playerid][pSelected] = listitem; ShowDialogToPlayer(playerid, DIALOG_GANGDRUGDEPOSIT); } else { ShowDialogToPlayer(playerid, DIALOG_GANGDRUGEDIT); } } case DIALOG_GANGDRUGWITHDRAWS: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return 1; } if(response) { PlayerInfo[playerid][pSelected] = listitem; ShowDialogToPlayer(playerid, DIALOG_GANGDRUGWITHDRAW); } else { ShowDialogToPlayer(playerid, DIALOG_GANGDRUGEDIT); } } case DIALOG_GANGDRUGDEPOSIT: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return 1; } if(response) { new amount; switch(PlayerInfo[playerid][pSelected]) { case 0: // Weed { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGDEPOSIT); } if(amount < 1 || amount > PlayerInfo[playerid][pWeed]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGDEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gDrugWeed] += amount; PlayerInfo[playerid][pWeed] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET drugweed = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gDrugWeed], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[playerid][pWeed], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have deposited %i grams of {00AA00}weed{33CCFF} in your drug dealer NPC.", amount); } case 1: // Cocaine { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGDEPOSIT); } if(amount < 1 || amount > PlayerInfo[playerid][pCocaine]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGDEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gDrugCocaine] += amount; PlayerInfo[playerid][pCocaine] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET drugcocaine = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gDrugCocaine], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have deposited %i grams of {00AA00}cocaine{33CCFF} in your drug dealer NPC.", amount); } case 2: // Meth { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGDEPOSIT); } if(amount < 1 || amount > PlayerInfo[playerid][pMeth]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGDEPOSIT); } GangInfo[PlayerInfo[playerid][pGang]][gDrugMeth] += amount; PlayerInfo[playerid][pMeth] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET drugmeth = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gDrugMeth], PlayerInfo[playerid][pDealerGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have deposited %i grams of {00AA00}meth{33CCFF} in your drug dealer NPC.", amount); } } } ShowDialogToPlayer(playerid, DIALOG_GANGDRUGDEPOSITS); } case DIALOG_GANGDRUGWITHDRAW: { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return 1; } if(response) { new amount; switch(PlayerInfo[playerid][pSelected]) { case 0: // Weed { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGWITHDRAW); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gDrugWeed]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGWITHDRAW); } if(PlayerInfo[playerid][pWeed] + amount > GetPlayerCapacity(playerid, CAPACITY_WEED)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED)); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gDrugWeed] -= amount; PlayerInfo[playerid][pWeed] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET drugweed = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gDrugWeed], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[playerid][pWeed], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have withdrawn %i grams of {00AA00}weed{33CCFF} from your drug dealer NPC.", amount); } case 1: // Cocaine { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGWITHDRAW); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gDrugCocaine]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGWITHDRAW); } if(PlayerInfo[playerid][pCocaine] + amount > GetPlayerCapacity(playerid, CAPACITY_COCAINE)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE)); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gDrugCocaine] -= amount; PlayerInfo[playerid][pCocaine] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET drugcocaine = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gDrugCocaine], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have withdrawn %i grams of {00AA00}cocaine{33CCFF} from your drug dealer NPC.", amount); } case 2: // Meth { if(sscanf(inputtext, "i", amount)) { return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGWITHDRAW); } if(amount < 1 || amount > GangInfo[PlayerInfo[playerid][pGang]][gDrugMeth]) { SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGWITHDRAW); } if(PlayerInfo[playerid][pMeth] + amount > GetPlayerCapacity(playerid, CAPACITY_METH)) { SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i meth. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH)); return ShowDialogToPlayer(playerid, DIALOG_GANGDRUGWITHDRAW); } GangInfo[PlayerInfo[playerid][pGang]][gDrugMeth] -= amount; PlayerInfo[playerid][pMeth] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET drugmeth = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gDrugMeth], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have withdrawn %i grams of {00AA00}meth{33CCFF} from your drug dealer NPC.", amount); } } } ShowDialogToPlayer(playerid, DIALOG_GANGDRUGWITHDRAWS); } case DIALOG_FREENAMECHANGE: { if(response) { if(isnull(inputtext)) { return ShowPlayerDialog(playerid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel"); } if(!(3 <= strlen(inputtext) <= 20)) { SendClientMessage(playerid, COLOR_GREY, "Your name must contain 3 to 20 characters."); return ShowPlayerDialog(playerid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel"); } if(strfind(inputtext, "_") == -1) { SendClientMessage(playerid, COLOR_GREY, "The name needs to contain at least one underscore."); return ShowPlayerDialog(playerid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel"); } if(!IsValidName(inputtext)) { SendClientMessage(playerid, COLOR_GREY, "That name is not supported by SA-MP."); return ShowPlayerDialog(playerid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel"); } PlayerInfo[playerid][pFreeNamechange] = 1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM users WHERE username = '%e'", inputtext); mysql_tquery(connectionID, queryBuffer, "OnPlayerAttemptNameChange", "is", playerid, inputtext); } else { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has cancelled the free namechange dialog.", GetPlayerRPName(playerid), playerid); } } } return 1; } // --------------------------------------- /*CMD:makemeadmin(playerid, params[]) { PlayerInfo[playerid][pAdmin] = 4; SendClientMessage(playerid, COLOR_AQUA, "You have received admin level 4 for testing."); return 1; }*/ CMD:b(playerid, params[]) { new string[144]; if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /b [local OOC]"); } format(string, sizeof(string), "%s: (( %s ))", GetPlayerRPName(playerid), params); SendProximityFadeMessage(playerid, 20.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5); return 1; } CMD:s(playerid, params[]) { return cmd_shout(playerid, params); } CMD:shout(playerid, params[]) { new string[144]; if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /(s)hout [text]"); } SetPlayerBubbleText(playerid, 20.0, COLOR_WHITE, "shouts: %s!", params); format(string, sizeof(string), "%s shouts: %s!", GetPlayerRPName(playerid), params); SendProximityFadeMessage(playerid, 20.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5); return 1; } CMD:me(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /me [action]"); } if(strlen(params) > MAX_SPLIT_LENGTH) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s %.*s...", GetPlayerRPName(playerid), MAX_SPLIT_LENGTH, params); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** ...%s", params[MAX_SPLIT_LENGTH]); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s %s", GetPlayerRPName(playerid), params); } return 1; } CMD:do(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /do [describe]"); } if(strlen(params) > MAX_SPLIT_LENGTH) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %.*s...", MAX_SPLIT_LENGTH, params); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** ...%s (( %s ))", params[MAX_SPLIT_LENGTH], GetPlayerRPName(playerid)); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s (( %s ))", params, GetPlayerRPName(playerid)); } return 1; } CMD:stats(playerid, params[]) { DisplayStats(playerid); return 1; } CMD:l(playerid, params[]) { return cmd_low(playerid, params); } CMD:low(playerid, params[]) { new string[144]; if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /(l)ow [text]"); } SetPlayerBubbleText(playerid, 5.0, COLOR_WHITE, "[low]: %s", params); format(string, sizeof(string), "%s says [low]: %s", GetPlayerRPName(playerid), params); SendProximityFadeMessage(playerid, 5.0, string, COLOR_GREY1, COLOR_GREY2, COLOR_GREY3, COLOR_GREY4, COLOR_GREY5); return 1; } CMD:w(playerid, params[]) { return cmd_whisper(playerid, params); } CMD:whisper(playerid, params[]) { new targetid, text[128]; if(sscanf(params, "us[128]", targetid, text)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /(w)hisper [playerid] [text]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!IsPlayerInRangeOfPlayer(playerid, targetid, 5.0) && (!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6)) { return SendClientMessage(playerid, COLOR_GREY, "You must be near that player to whisper them."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't whisper to yourself."); } SendClientMessageEx(targetid, COLOR_YELLOW, "** Whisper from %s: %s **", GetPlayerRPName(playerid), text); SendClientMessageEx(playerid, COLOR_YELLOW, "** Whisper to %s: %s **", GetPlayerRPName(targetid), text); if(PlayerInfo[targetid][pWhisperFrom] == INVALID_PLAYER_ID) { SendClientMessage(targetid, COLOR_WHITE, "** You can use '/rw [message]' to reply to this whisper."); } PlayerInfo[targetid][pWhisperFrom] = playerid; return 1; } CMD:rw(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /rw [text]"); } if(PlayerInfo[playerid][pWhisperFrom] == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't been whispered by anyone since you joined the server."); } if(!IsPlayerInRangeOfPlayer(playerid, PlayerInfo[playerid][pWhisperFrom], 5.0) && (!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6)) { return SendClientMessage(playerid, COLOR_GREY, "You must be near that player to whisper them."); } SendClientMessageEx(PlayerInfo[playerid][pWhisperFrom], COLOR_YELLOW, "** Whisper from %s: %s **", GetPlayerRPName(playerid), params); SendClientMessageEx(playerid, COLOR_YELLOW, "** Whisper to %s: %s **", GetPlayerRPName(PlayerInfo[playerid][pWhisperFrom]), params); return 1; } CMD:engine(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid), Float:health; if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You must be driving a vehicle to use this command."); } if(!VehicleHasEngine(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine which can be turned on."); } if(vehicleFuel[vehicleid] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "There is no fuel left in this vehicle."); } if(!GetVehicleParams(vehicleid, VEHICLE_ENGINE)) { GetVehicleHealth(vehicleid, health); if(health <= 300.0) { return SendClientMessage(playerid, COLOR_GREY, "The engine is totalled and cannot be started until it's repaired."); } SetVehicleParams(vehicleid, VEHICLE_ENGINE, true); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s turns on the engine of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); } else { SetVehicleParams(vehicleid, VEHICLE_ENGINE, false); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s turns off the engine of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); } return 1; } CMD:lights(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You must be driving a vehicle to use this command."); } if(!VehicleHasEngine(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no lights which can be turned on."); } if(!GetVehicleParams(vehicleid, VEHICLE_LIGHTS)) { SetVehicleParams(vehicleid, VEHICLE_LIGHTS, true); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s turns on the headlights of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); } else { SetVehicleParams(vehicleid, VEHICLE_LIGHTS, false); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s turns off the headlights of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); } return 1; } CMD:hood(playerid, params[]) { new vehicleid = GetNearbyVehicle(playerid); if(vehicleid == INVALID_VEHICLE_ID) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle."); } if(!VehicleHasWindows(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no hood."); } if(!GetVehicleParams(vehicleid, VEHICLE_BONNET)) { SetVehicleParams(vehicleid, VEHICLE_BONNET, true); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s opens the hood of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); } else { SetVehicleParams(vehicleid, VEHICLE_BONNET, false); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s closes the hood of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); } return 1; } CMD:boot(playerid, params[]) { new vehicleid = GetNearbyVehicle(playerid); if(vehicleid == INVALID_VEHICLE_ID) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle."); } if(!VehicleHasWindows(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no boot."); } if(!GetVehicleParams(vehicleid, VEHICLE_BOOT)) { SetVehicleParams(vehicleid, VEHICLE_BOOT, true); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s opens the boot of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); } else { SetVehicleParams(vehicleid, VEHICLE_BOOT, false); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s closes the boot of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); } return 1; } CMD:resetupgrades(playerid, params[]) { if(strcmp(params, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /resetupgrades [confirm]"); SendClientMessageEx(playerid, COLOR_GREY3, "This command resets all of your upgrades and give you back %i upgrade points.", PlayerInfo[playerid][pLevel] * 2); return 1; } if(PlayerInfo[playerid][pLevel] == 1) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't level 2+."); } if(PlayerInfo[playerid][pInventoryUpgrade] == 0 && PlayerInfo[playerid][pTraderUpgrade] == 0 && PlayerInfo[playerid][pAddictUpgrade] == 0 && PlayerInfo[playerid][pAssetUpgrade] == 0 && PlayerInfo[playerid][pSpawnHealth] == 50.0 && PlayerInfo[playerid][pSpawnArmor] == 0.0 && PlayerInfo[playerid][pUpgradePoints] == (PlayerInfo[playerid][pLevel] - 1) * 2) { return SendClientMessage(playerid, COLOR_GREY, "You haven't spent any upgrade points on upgrades. Therefore you can't reset them."); } if(GetPlayerAssetCount(playerid, LIMIT_HOUSES) > 1) { return SendClientMessageEx(playerid, COLOR_GREY, "You own %i/%i houses at the moment. Please sell %i of them before using this command.", GetPlayerAssetCount(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_HOUSES) - GetPlayerAssetCount(playerid, LIMIT_HOUSES)); } if(GetPlayerAssetCount(playerid, LIMIT_BUSINESSES) > 1) { return SendClientMessageEx(playerid, COLOR_GREY, "You own %i/%i businesses at the moment. Please sell %i of them before using this command.", GetPlayerAssetCount(playerid, LIMIT_BUSINESSES), GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES), GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES) - GetPlayerAssetCount(playerid, LIMIT_BUSINESSES)); } if(GetPlayerAssetCount(playerid, LIMIT_GARAGES) > 1) { return SendClientMessageEx(playerid, COLOR_GREY, "You own %i/%i garages at the moment. Please sell %i of them before using this command.", GetPlayerAssetCount(playerid, LIMIT_GARAGES), GetPlayerAssetLimit(playerid, LIMIT_GARAGES), GetPlayerAssetLimit(playerid, LIMIT_GARAGES) - GetPlayerAssetCount(playerid, LIMIT_GARAGES)); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM vehicles WHERE ownerid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer, "OnPlayerAttemptResetUpgrades", "i", playerid); return 1; } CMD:myupgrades(playerid, params[]) { SendClientMessageEx(playerid, COLOR_GREEN, "|____ %s's upgrades (%i points available) ____|", GetPlayerRPName(playerid), PlayerInfo[playerid][pUpgradePoints]); SendClientMessageEx(playerid, COLOR_YELLOW, "[Shealth: %.0f/100]{C8C8C8} You spawn with %.1f health at the hospital after death.", PlayerInfo[playerid][pSpawnHealth], PlayerInfo[playerid][pSpawnHealth]); SendClientMessageEx(playerid, COLOR_YELLOW, "[Sarmor: %.0f/100]{C8C8C8} You spawn with %.1f armor at the hospital after death.", PlayerInfo[playerid][pSpawnArmor], PlayerInfo[playerid][pSpawnArmor]); SendClientMessageEx(playerid, COLOR_YELLOW, "[Inventory: %i/5]{C8C8C8} This upgrade increases the capacity for your items. [/inv]", PlayerInfo[playerid][pInventoryUpgrade]); SendClientMessageEx(playerid, COLOR_YELLOW, "[Trader: %i/3]{C8C8C8} You save an extra %i percent on all items purchased in businesses.", PlayerInfo[playerid][pTraderUpgrade], PlayerInfo[playerid][pTraderUpgrade] * 5); SendClientMessageEx(playerid, COLOR_YELLOW, "[Addict: %i/3]{C8C8C8} You gain an extra %.1f health and armor when using drugs.", PlayerInfo[playerid][pAddictUpgrade], PlayerInfo[playerid][pAddictUpgrade] * 5.0); SendClientMessageEx(playerid, COLOR_YELLOW, "[Asset: %i/4]{C8C8C8} You can own %i houses, %i businesses, %i garages & %i vehicles.", PlayerInfo[playerid][pAssetUpgrade], GetPlayerAssetLimit(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES), GetPlayerAssetLimit(playerid, LIMIT_GARAGES), GetPlayerAssetLimit(playerid, LIMIT_VEHICLES)); return 1; } CMD:buylevel(playerid, params[]) { new exp = (PlayerInfo[playerid][pLevel] * 4), cost = (PlayerInfo[playerid][pLevel] + 1) * 5000, string[64]; if(PlayerInfo[playerid][pEXP] < exp) { return SendClientMessageEx(playerid, COLOR_GREY, "You need %i more respect points in order to level up.", exp - PlayerInfo[playerid][pEXP]); } if(PlayerInfo[playerid][pCash] < cost) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to have at least $%i on hand to buy your next level.", cost); } PlayerInfo[playerid][pEXP] -= exp; PlayerInfo[playerid][pCash] -= cost; PlayerInfo[playerid][pLevel]++; PlayerInfo[playerid][pUpgradePoints] += 2; if(PlayerInfo[playerid][pLevel] == 3 && PlayerInfo[playerid][pReferralUID] > 0) { ReferralCheck(playerid); } format(string, sizeof(string), "~g~Level Up~n~~w~You are now level %i", PlayerInfo[playerid][pLevel]); GameTextForPlayer(playerid, string, 5000, 1); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET exp = exp - %i, cash = cash - %i, level = level + 1, upgradepoints = upgradepoints + 2 WHERE uid = %i", exp, cost, PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_GREEN, "You have moved up to level %i. This costed you $%i.", PlayerInfo[playerid][pLevel], cost); SendClientMessageEx(playerid, COLOR_GREEN, "You now have %i upgrade points. Use /upgrade to learn more.", PlayerInfo[playerid][pUpgradePoints]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); return 1; } CMD:help(playerid, params[]) { SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "[LL:RP Commands] {C8C8C8}/stats, /buylevel, /b, /g, /me, /do, /(o)oc, /(s)hout, /(l)ow, /(w)hisper, /(n)ewbie."); SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "[LL:RP Commands] {C8C8C8}/pay, /id, /time, /report, /upgrade, /charity, /stopmusic, /joinevent, /quitevent."); SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "[LL:RP Commands] {C8C8C8}/dice, /flipcoin, /accent, /helpers, /helpme, /accept, /activity, /skill, /quitjob."); SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "[LL:RP Commands] {C8C8C8}/give, /sell, /toggle, /cancelcp, /afk, /(ad)vertise, /buy, /refuel, /call, /sms."); SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "[LL:RP Commands] {C8C8C8}/clothing, /locate, /frisk, /contract, /number, /boombox, /switchspeedo, /stuck."); SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "[LL:RP Commands] {C8C8C8}/shakehand, /dropgun, /grabgun, /usecookies, /usecigar, /usedrug, /showid."); SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "[LL:RP Commands] {C8C8C8}/(inv)entory, /guninv, /loadammo, /drop, /eject, /dicebet, /gangs, /factions."); SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "[LL:RP Commands] {C8C8C8}/calculate, /serverstats, /turfs, /lands, /changename, /watch, /gps, /fixvw."); SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "[LL:RP Commands] {C8C8C8}/resetupgrades, /myupgrades."); SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "[LL:RP Commands] {C8C8C8}/househelp, /garagehelp, /bizhelp, /jobhelp, /animhelp, /vehiclehelp, /viphelp."); SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "[LL:RP Commands] {C8C8C8}/bankhelp, /factionhelp, /ganghelp, /landhelp, /helperhelp."); if(PlayerInfo[playerid][pFactionMod]) { SendClientMessage(playerid, COLOR_LIGHTRED, "[Faction Mod]{C8C8C8} /createfaction, /editfaction, /setfaction, /purgefaction."); } if(PlayerInfo[playerid][pGangMod]) { SendClientMessage(playerid, COLOR_LIGHTRED, "[Gang Mod]{C8C8C8} /creategang, /editgang, /removegang, /gangstrike, /setgang."); SendClientMessage(playerid, COLOR_LIGHTRED, "[Gang Mod]{C8C8C8} /createpoint, /editpoint, /removepoint."); } if(PlayerInfo[playerid][pBanAppealer]) { SendClientMessage(playerid, COLOR_LIGHTRED, "[Ban Appealer]{C8C8C8} /banip, /baninfo, /banhistory, unbanip, /unban."); } if(PlayerInfo[playerid][pAdmin] > 0) { SendClientMessage(playerid, COLOR_LIGHTRED, "[Admin Commands]{C8C8C8} /a, /adminhelp."); } return 1; } CMD:jobhelp(playerid, params[]) { if(PlayerInfo[playerid][pJob] == JOB_NONE && PlayerInfo[playerid][pSecondJob] == JOB_NONE) { return SendClientMessage(playerid, COLOR_GREY, "You have no job and therefore no job commands to view."); } switch(PlayerInfo[playerid][pJob]) { //case JOB_NONE: SendClientMessage(playerid, COLOR_GREY, "You have no job and therefore no job commands to view."); case JOB_PIZZAMAN: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /getpizza, /cancelcp."); case JOB_COURIER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /load, /deliver, /cancelcp."); case JOB_FISHERMAN: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /fish, /myfish, /sellfish."); case JOB_BODYGUARD: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /sellvest, /frisk."); case JOB_WEAPONDEALER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /smugglemats, /sellgun."); case JOB_MECHANIC: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /buycomps, /repair, /refill, /nos, /hyd, /takecall."); case JOB_MINER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /mine, /cancelcp."); case JOB_SWEEPER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /startsweeping, /stopsweeping."); case JOB_TAXIDRIVER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /setfare, /takecall."); case JOB_DRUGDEALER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /buydrug, /planthelp, /cookmeth, /smuggledrugs."); case JOB_LAWYER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /defend, /free, /wanted."); case JOB_DETECTIVE: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /find."); } if(PlayerInfo[playerid][pSecondJob] != JOB_NONE) { switch(PlayerInfo[playerid][pSecondJob]) { //case JOB_NONE: SendClientMessage(playerid, COLOR_GREY, "You have no job and therefore no job commands to view."); case JOB_PIZZAMAN: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /getpizza."); case JOB_COURIER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /load, /deliver."); case JOB_FISHERMAN: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /fish, /myfish, /sellfish."); case JOB_BODYGUARD: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /sellvest, /frisk."); case JOB_WEAPONDEALER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /smugglemats, /sellgun."); case JOB_MECHANIC: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /buycomps, /repair, /refill, /nos, /hyd."); case JOB_MINER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /mine."); case JOB_SWEEPER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /startsweeping, /stopsweeping."); case JOB_TAXIDRIVER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /setfare."); case JOB_DRUGDEALER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /buydrug, /planthelp, /cookmeth, /smuggledrugs."); case JOB_LAWYER: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /defend, /free, /wanted."); case JOB_DETECTIVE: SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Job Commands] /find."); } } return 1; } CMD:vehiclehelp(playerid, params[]) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Vehicle Commands] /engine, /lights, /hood, /boot, /buyvehicle, /spawncar, /park, /lock, /despawncar."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Vehicle Commands] /vstash, /neon, /unmod, /colorcar, /paintcar, /upgradevehicle, /sellcar, /sellmycar."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Vehicle Commands] /findcar, /givekeys, /takekeys, /setradio, /paytickets, /carinfo, /gascan."); return 1; } CMD:bankhelp(playerid, params[]) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Bank Commands] /withdraw, /deposit, /wiretransfer, /balance, /robbank, /robinvite, /bombvault."); return 1; } CMD:viphelp(playerid, params[]) { if(!PlayerInfo[playerid][pVIPPackage]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription."); } SendClientMessage(playerid, COLOR_VIP, "** [VIP Commands] /(v)ip, /vipinfo, /viptag, /vipcolor, /vipinvite, /vipnumber."); if(PlayerInfo[playerid][pVIPPackage] == 3) { SendClientMessage(playerid, COLOR_VIP, "** [VIP Commands] /repair, /nos, /hyd."); } return 1; } CMD:fmembers(playerid, params[]) { if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not apart of any faction."); } SendClientMessage(playerid, COLOR_GREEN, "|____ Members Online ____|"); foreach(new i : Player) { if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction]) { SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s %s", i, FactionRanks[PlayerInfo[i][pFaction]][PlayerInfo[i][pFactionRank]], GetPlayerRPName(i)); } } return 1; } CMD:factionhelp(playerid, params[]) { if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not apart of any faction."); } SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Faction Commands] /fc, /d, /(r)adio, /div, /faction, /division, /locker, /showbadge, /(m)egaphone."); switch(FactionInfo[PlayerInfo[playerid][pFaction]][fType]) { case FACTION_POLICE, FACTION_FEDERAL: { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Faction Commands] /gate, /door, /cell, /tazer, /cuff, /uncuff, /drag, /detain, /charge, /arrest."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Faction Commands] /wanted, /frisk, /take, /ticket, /gov, /ram, /deploy, /undeploy, /backup."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Faction Commands] /mdc, /clearwanted, /siren, /badge, /vticket, /vfrisk, /vtake, /seizeplant."); if(FactionInfo[PlayerInfo[playerid][pFaction]][fType] == FACTION_FEDERAL) SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Faction Commands] /listcallers, /trackcall, /passport."); else SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Faction Commands] /listcallers, /trackcall."); } case FACTION_MEDIC: { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Faction Commands] /firstaid, /stretcher, /deliverpatient, /injuries, /mrevive, /deploy, /undeploy."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Faction Commands] /badge, /gov, /backup, /listcallers, /trackcall."); } case FACTION_NEWS: { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Faction Commands] /news, /live, /endlive, /liveban."); } case FACTION_GOVERNMENT: { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Faction Commands] /gov, /settax, /factionpay, /tazer, /cuff, /uncuff, /detain, /taxdeposit, /taxwithdraw."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Faction Commands] /backup, /badge."); } case FACTION_HITMAN: { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Faction Commands] /contracts, /takehit, /profile, /passport, /plantbomb, /defusebomb, /detonate."); } } return 1; } CMD:ganghelp(playerid, params[]) { if(PlayerInfo[playerid][pGang] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a gang member."); } SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Gang Commands] /f, /gang, /gstash, /bandana, /clothes, /capture, /claim, /reclaim, /turfinfo, /points."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Gang Commands] /gbuyvehicle, /gpark, /gfindcar, /grespawncars, /gsellcar, /lock."); return 1; } CMD:landhelp(playerid, params[]) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Land Commands] /buyland, /lock, /door, /landinfo, /land, /sellmyland, /sellland."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Land Commands] '/toggle lands' to show or hide lands on your mini-map."); return 1; } CMD:planthelp(playerid, params[]) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Plant Commands] /plantweed, /plantinfo, /pickplant, /seizeplant."); return 1; } CMD:o(playerid, params[]) { return cmd_ooc(playerid, params); } CMD:ooc(playerid, params[]) { new string[64]; if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /(o)oc [global OOC]"); } if(!enabledOOC && PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "The global OOC channel is disabled at the moment."); } if(PlayerInfo[playerid][pToggleOOC]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the OOC chat as you have it toggled."); } if(PlayerInfo[playerid][pAdmin] > 1) { format(string, sizeof(string), "%s %s", GetAdminRank(playerid), GetPlayerRPName(playerid)); } else if(PlayerInfo[playerid][pHelper] > 0) { format(string, sizeof(string), "%s %s", GetHelperRank(playerid), GetPlayerRPName(playerid)); } else if(PlayerInfo[playerid][pVIPPackage] > 0) { format(string, sizeof(string), "{A028AD}%s VIP{FFFFFF} %s", GetVIPRank(PlayerInfo[playerid][pVIPPackage]), GetPlayerRPName(playerid)); } else { format(string, sizeof(string), "%s", GetPlayerRPName(playerid)); } foreach(new i : Player) { if(!PlayerInfo[i][pToggleOOC]) { if(strlen(params) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, COLOR_WHITE, "(( %s: %.*s... ))", string, MAX_SPLIT_LENGTH, params); SendClientMessageEx(i, COLOR_WHITE, "(( %s: ...%s ))", string, params[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, COLOR_WHITE, "(( %s: %s ))", string, params); } } } return 1; } CMD:newb(playerid, params[]) { return cmd_newbie(playerid, params); } CMD:n(playerid, params[]) { return cmd_newbie(playerid, params); } CMD:newbie(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /(n)ewbie [newbie chat]"); } if(!enabledNewbie && PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "The newbie channel is disabled at the moment."); } if(PlayerInfo[playerid][pNewbieMuted]) { return SendClientMessage(playerid, COLOR_GREY, "You are muted from speaking in this channel. /report for an unmute."); } if(gettime() - PlayerInfo[playerid][pLastNewbie] < 60) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only speak in this channel every 60 seconds. Please wait %i more seconds.", 60 - (gettime() - PlayerInfo[playerid][pLastNewbie])); } if(PlayerInfo[playerid][pToggleNewbie]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the newbie chat as you have it toggled."); } SendNewbieChatMessage(playerid, params); return 1; } CMD:id(playerid, params[]) { new count, color, name[MAX_PLAYER_NAME], targetid = strval(params); if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /id [playerid/partial name]"); } if(IsNumeric(params)) { if(IsPlayerConnected(targetid)) { if((color = GetPlayerColor(targetid)) == 0xFFFFFF00) { color = 0xAAAAAAFF; } GetPlayerName(targetid, name, sizeof(name)); SendClientMessageEx(playerid, COLOR_GREY3, "(ID: %i) {%06x}%s{AAAAAA} - (Level: %i) - (Ping: %i)", targetid, color >>> 8, name, PlayerInfo[targetid][pLevel], GetPlayerPing(targetid)); } else { SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } } else if(strlen(params) < 2) { SendClientMessage(playerid, COLOR_GREY, "Please input at least two characters to search."); } else { foreach(new i : Player) { GetPlayerName(i, name, sizeof(name)); if(strfind(name, params, true) != -1) { if((color = GetPlayerColor(i)) == 0xFFFFFF00) { color = 0xAAAAAAFF; } SendClientMessageEx(playerid, COLOR_GREY3, "(ID: %i) {%06x}%s{AAAAAA} - (Level: %i) - (Ping: %i)", i, color >>> 8, name, PlayerInfo[i][pLevel], GetPlayerPing(i)); count++; } } if(!count) { SendClientMessageEx(playerid, COLOR_GREY, "No results found for \"%s\". Please narrow your search.", params); } } return 1; } CMD:pay(playerid, params[]) { new targetid, amount; if(sscanf(params, "ui", targetid, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /pay [playerid] [amount]"); } if(gettime() - PlayerInfo[playerid][pLastPay] < 3) { return SendClientMessage(playerid, COLOR_GREY, "Please wait three seconds between each transaction."); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't pay yourself."); } if(amount > PlayerInfo[playerid][pCash]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have that much."); } if(amount > 1000 && PlayerInfo[playerid][pLevel] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You can only pay up to $1,000 at a time as a level 1."); } if(amount > 100000) { return SendClientMessage(playerid, COLOR_GREY, "You are only allowed to pay up to $100,000 at a time."); } PlayerInfo[playerid][pLastPay] = gettime(); GivePlayerCash(playerid, -amount); GivePlayerCash(targetid, amount); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); PlayerPlaySound(targetid, 1052, 0.0, 0.0, 0.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes out $%i and gives it to %s.", GetPlayerRPName(playerid), amount, GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) (IP: %s) gives $%i to %s (uid: %i) (IP: %s)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerIP(playerid), amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], GetPlayerIP(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "You have been given {00AA00}$%i{33CCFF} by %s.", amount, GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have given {FF6347}$%i{33CCFF} to %s.", amount, GetPlayerRPName(targetid)); if(!strcmp(GetPlayerIP(playerid), GetPlayerIP(targetid))) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s (IP: %s) has given $%i to %s (IP: %s).", GetPlayerRPName(playerid), GetPlayerIP(playerid), amount, GetPlayerRPName(targetid), GetPlayerIP(targetid)); } return 1; } CMD:give(playerid, params[]) { new targetid, option[14], param[32], amount; if(sscanf(params, "us[14]S()[32]", targetid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Weapon, Materials, Weed, Cocaine, Meth, Painkillers, Cigars, Spraycans"); SendClientMessage(playerid, COLOR_GREY3, "List of options: GasCan, Seeds, Ephedrine, HPAmmo, PoisonAmmo, FMJAmmo"); return 1; } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0 || PlayerInfo[playerid][pJoinedEvent] > 0 || PlayerInfo[playerid][pPaintball]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(!strcmp(option, "weapon", true)) { new weaponid = GetScriptWeapon(playerid); if(!weaponid) { return SendClientMessage(playerid, COLOR_GREY, "You must be holding the weapon you're willing to give away."); } if(PlayerInfo[targetid][pWeapons][weaponSlotIDs[weaponid]] > 0) { return SendClientMessage(playerid, COLOR_GREY, "That player already has a weapon in that slot."); } if(PlayerInfo[targetid][pHours] < 2 || PlayerInfo[targetid][pWeaponRestricted] > 0) { return SendClientMessage(playerid, COLOR_GREY, "That player is either weapon restricted or played less than two playing hours."); } if(PlayerInfo[playerid][pFaction] >= 0 && PlayerInfo[targetid][pFaction] != PlayerInfo[playerid][pFaction]) { return SendClientMessage(playerid, COLOR_GREY, "You can only give away weapons to your own faction members."); } GivePlayerWeaponEx(targetid, weaponid); RemovePlayerWeapon(playerid, weaponid); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you their %s.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %s your %s.", GetPlayerRPName(targetid), GetWeaponNameEx(weaponid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s passes over their %s to %s.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives their %s to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetWeaponNameEx(weaponid), GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "materials", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [materials] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pMaterials]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } if(PlayerInfo[targetid][pMaterials] + amount > GetPlayerCapacity(targetid, CAPACITY_MATERIALS)) { return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more materials."); } PlayerInfo[playerid][pMaterials] -= amount; PlayerInfo[targetid][pMaterials] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[targetid][pMaterials], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i materials.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i materials to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some materials to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i materials to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "weed", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [weed] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pWeed]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } if(PlayerInfo[targetid][pWeed] + amount > GetPlayerCapacity(targetid, CAPACITY_WEED)) { return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more weed."); } PlayerInfo[playerid][pWeed] -= amount; PlayerInfo[targetid][pWeed] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[playerid][pWeed], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[targetid][pWeed], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i grams of weed.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i grams of weed to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some weed to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i grams of weed to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "cocaine", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [cocaine] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pCocaine]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } if(PlayerInfo[targetid][pCocaine] + amount > GetPlayerCapacity(targetid, CAPACITY_COCAINE)) { return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more cocaine."); } PlayerInfo[playerid][pCocaine] -= amount; PlayerInfo[targetid][pCocaine] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[targetid][pCocaine], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i grams of cocaine.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i grams of cocaine to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some cocaine to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i grams of cocaine to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "meth", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [meth] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pMeth]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } if(PlayerInfo[targetid][pMeth] + amount > GetPlayerCapacity(targetid, CAPACITY_METH)) { return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more meth."); } PlayerInfo[playerid][pMeth] -= amount; PlayerInfo[targetid][pMeth] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[targetid][pMeth], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i grams of meth.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i grams of meth to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some meth to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i grams of meth to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "painkillers", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [painkillers] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pPainkillers]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } if(PlayerInfo[targetid][pPainkillers] + amount > GetPlayerCapacity(targetid, CAPACITY_PAINKILLERS)) { return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more painkillers."); } PlayerInfo[playerid][pPainkillers] -= amount; PlayerInfo[targetid][pPainkillers] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", PlayerInfo[playerid][pPainkillers], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", PlayerInfo[targetid][pPainkillers], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i painkillers.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i painkillers to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some painkillers to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i painkillers to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "cigars", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [cigars] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pCigars]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } PlayerInfo[playerid][pCigars] -= amount; PlayerInfo[targetid][pCigars] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cigars = %i WHERE uid = %i", PlayerInfo[playerid][pCigars], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cigars = %i WHERE uid = %i", PlayerInfo[targetid][pCigars], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i cigars.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i cigars to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some cigars to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i cigars to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "spraycans", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [spraycans] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pSpraycans]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } PlayerInfo[playerid][pSpraycans] -= amount; PlayerInfo[targetid][pSpraycans] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET spraycans = %i WHERE uid = %i", PlayerInfo[playerid][pSpraycans], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET spraycans = %i WHERE uid = %i", PlayerInfo[targetid][pSpraycans], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i spraycans.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i spraycans to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some spraycans to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i spraycans to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "gascan", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [gascan] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pGasCan]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } PlayerInfo[playerid][pGasCan] -= amount; PlayerInfo[targetid][pGasCan] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gascan = %i WHERE uid = %i", PlayerInfo[playerid][pGasCan], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gascan = %i WHERE uid = %i", PlayerInfo[targetid][pGasCan], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i liters of gasoline.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i liters of gasoline to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some gasoline to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i liters of gasoline to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "seeds", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [seeds] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pSeeds]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } if(PlayerInfo[targetid][pSeeds] + amount > GetPlayerCapacity(targetid, CAPACITY_SEEDS)) { return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more seeds."); } PlayerInfo[playerid][pSeeds] -= amount; PlayerInfo[targetid][pSeeds] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET seeds = %i WHERE uid = %i", PlayerInfo[playerid][pSeeds], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET seeds = %i WHERE uid = %i", PlayerInfo[targetid][pSeeds], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i seeds.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i seeds to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some seeds to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i seeds to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "ephedrine", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [ephedrine] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pEphedrine]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } if(PlayerInfo[targetid][pEphedrine] + amount > GetPlayerCapacity(targetid, CAPACITY_EPHEDRINE)) { return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more ephedrine."); } PlayerInfo[playerid][pEphedrine] -= amount; PlayerInfo[targetid][pEphedrine] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET ephedrine = %i WHERE uid = %i", PlayerInfo[playerid][pEphedrine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET ephedrine = %i WHERE uid = %i", PlayerInfo[targetid][pEphedrine], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i grams of ephedrine.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i grams of ephedrine to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some ephedrine to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i grams of ephedrine to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "hpammo", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [hpammo] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pHPAmmo]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } if(PlayerInfo[targetid][pHPAmmo] + amount > GetPlayerCapacity(targetid, CAPACITY_HPAMMO)) { return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more HP ammo."); } SetWeaponAmmo(playerid, AMMO_HP, PlayerInfo[playerid][pHPAmmo] - amount); SetWeaponAmmo(targetid, AMMO_HP, PlayerInfo[targetid][pHPAmmo] + amount); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i rounds of hollow point ammo.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i rounds of hollow point ammo to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some hollow point ammo to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i rounds of hollow point ammo to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "poisonammo", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [poisonammo] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pPoisonAmmo]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } if(PlayerInfo[targetid][pPoisonAmmo] + amount > GetPlayerCapacity(targetid, CAPACITY_POISONAMMO)) { return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more poison tip ammo."); } SetWeaponAmmo(playerid, AMMO_POISON, PlayerInfo[playerid][pPoisonAmmo] - amount); SetWeaponAmmo(targetid, AMMO_POISON, PlayerInfo[targetid][pPoisonAmmo] + amount); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i rounds of poison tip ammo.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i rounds of poison tip ammo to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some poison tip ammo to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i rounds of poison tip ammo to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "fmjammo", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [fmjammo] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pFMJAmmo]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } if(PlayerInfo[targetid][pFMJAmmo] + amount > GetPlayerCapacity(targetid, CAPACITY_FMJAMMO)) { return SendClientMessageEx(playerid, COLOR_GREY, "That player can't carry that much more FMJ ammo."); } SetWeaponAmmo(playerid, AMMO_FMJ, PlayerInfo[playerid][pFMJAmmo] - amount); SetWeaponAmmo(targetid, AMMO_FMJ, PlayerInfo[targetid][pFMJAmmo] + amount); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you %i rounds of full metal jacket ammo.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %i rounds of full metal jacket ammo to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives some full metal jacket ammo to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i rounds of full metal jacket ammo to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } /*else if(!strcmp(option, "cookies", true)) { if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /give [playerid] [cookies] [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pCookies]) { return SendClientMessage(playerid, COLOR_GREY3, "Insufficient amount."); } PlayerInfo[playerid][pCookies] -= amount; PlayerInfo[targetid][pCookies] += amount; SendClientMessageEx(targetid, COLOR_AQUA, "** %s has given you %i cookies", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You have given %i cookies to %s.", amount, GetPlayerRPName(targetid)); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives a baggie of oreos to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_give", "%s (uid: %i) gives %i cookies to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); }*/ return 1; } CMD:sell(playerid, params[]) { new targetid, option[14], param[32], amount, price; if(sscanf(params, "us[14]S()[32]", targetid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sell [playerid] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Weapon, Materials, Weed, Cocaine, Meth, Painkillers, Seeds, Ephedrine"); return 1; } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0 || PlayerInfo[playerid][pJoinedEvent] > 0 || PlayerInfo[playerid][pPaintball]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(gettime() - PlayerInfo[playerid][pLastSell] < 10) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only use this command every 10 seconds. Please wait %i more seconds.", 10 - (gettime() - PlayerInfo[playerid][pLastSell])); } if(!strcmp(option, "weapon", true)) { new weaponid; if(sscanf(param, "ii", weaponid, price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sell [playerid] [weapon] [weaponid] [price] (/guninv for weapon IDs)"); } if(!(1 <= weaponid <= 46) || PlayerInfo[playerid][pWeapons][weaponSlotIDs[weaponid]] != weaponid) { return SendClientMessage(playerid, COLOR_GREY, "You don't have that weapon. /guninv for a list of your weapons."); } if(PlayerInfo[targetid][pWeapons][weaponSlotIDs[weaponid]] > 0) { return SendClientMessage(playerid, COLOR_GREY, "That player already has a weapon in that slot."); } if(PlayerInfo[targetid][pHours] < 2 || PlayerInfo[targetid][pWeaponRestricted] > 0) { return SendClientMessage(playerid, COLOR_GREY, "That player is either weapon restricted or played less than two playing hours."); } if(PlayerInfo[playerid][pFaction] >= 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't sell weapons as a faction member."); } if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_WEAPON; PlayerInfo[targetid][pSellExtra] = weaponid; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you their %s for $%i. (/accept item)", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s your %s for $%i.", GetPlayerRPName(targetid), GetWeaponNameEx(weaponid), price); } else if(!strcmp(option, "materials", true)) { if(sscanf(param, "ii", amount, price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sell [playerid] [materials] [amount] [price]"); } if(amount < 1 || amount > PlayerInfo[playerid][pMaterials]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_MATERIALS; PlayerInfo[targetid][pSellExtra] = amount; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you %i materials for $%i. (/accept item)", GetPlayerRPName(playerid), amount, price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s your %i materials for $%i.", GetPlayerRPName(targetid), amount, price); } else if(!strcmp(option, "weed", true)) { if(sscanf(param, "ii", amount, price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sell [playerid] [weed] [amount] [price]"); } if(amount < 1 || amount > PlayerInfo[playerid][pWeed]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_WEED; PlayerInfo[targetid][pSellExtra] = amount; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you %i grams of weed for $%i. (/accept item)", GetPlayerRPName(playerid), amount, price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s your %i grams of weed for $%i.", GetPlayerRPName(targetid), amount, price); } else if(!strcmp(option, "cocaine", true)) { if(sscanf(param, "ii", amount, price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sell [playerid] [cocaine] [amount] [price]"); } if(amount < 1 || amount > PlayerInfo[playerid][pCocaine]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_COCAINE; PlayerInfo[targetid][pSellExtra] = amount; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you %i grams of cocaine for $%i. (/accept item)", GetPlayerRPName(playerid), amount, price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s your %i grams of cocaine for $%i.", GetPlayerRPName(targetid), amount, price); } else if(!strcmp(option, "meth", true)) { if(sscanf(param, "ii", amount, price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sell [playerid] [meth] [amount] [price]"); } if(amount < 1 || amount > PlayerInfo[playerid][pMeth]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_METH; PlayerInfo[targetid][pSellExtra] = amount; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you %i grams of meth for $%i. (/accept item)", GetPlayerRPName(playerid), amount, price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s your %i grams of meth for $%i.", GetPlayerRPName(targetid), amount, price); } else if(!strcmp(option, "painkillers", true)) { if(sscanf(param, "ii", amount, price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sell [playerid] [painkillers] [amount] [price]"); } if(amount < 1 || amount > PlayerInfo[playerid][pPainkillers]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_PAINKILLERS; PlayerInfo[targetid][pSellExtra] = amount; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you %i painkillers for $%i. (/accept item)", GetPlayerRPName(playerid), amount, price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s your %i painkillers for $%i.", GetPlayerRPName(targetid), amount, price); } else if(!strcmp(option, "seeds", true)) { if(sscanf(param, "ii", amount, price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sell [playerid] [seeds] [amount] [price]"); } if(amount < 1 || amount > PlayerInfo[playerid][pSeeds]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SEEDS; PlayerInfo[targetid][pSellExtra] = amount; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you %i seeds for $%i. (/accept item)", GetPlayerRPName(playerid), amount, price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s your %i seeds for $%i.", GetPlayerRPName(targetid), amount, price); } else if(!strcmp(option, "ephedrine", true)) { if(sscanf(param, "ii", amount, price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sell [playerid] [ephedrine] [amount] [price]"); } if(amount < 1 || amount > PlayerInfo[playerid][pEphedrine]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_EPHEDRINE; PlayerInfo[targetid][pSellExtra] = amount; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you %i grams of ephedrine for $%i. (/accept item)", GetPlayerRPName(playerid), amount, price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s your %i grams of ephedrine for $%i.", GetPlayerRPName(targetid), amount, price); } return 1; } CMD:accent(playerid, params[]) { new type; if(sscanf(params, "i", type)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /accent [type]"); SendClientMessage(playerid, COLOR_GREY3, "List of accents: (0) None - (1) English - (2) American - (3) British - (4) Chinese - (5) Korean - (6) Japanese - (7) Asian"); SendClientMessage(playerid, COLOR_GREY3, "List of accents: (8) Canadian - (9) Australian - (10) Southern - (11) Russian - (12) Ukrainian - (13) German - (14) French"); SendClientMessage(playerid, COLOR_GREY3, "List of accents: (15) Portguese - (16) Polish - (17) Estonian - (18) Latvian - (19) Dutch - (20) Jamaican - (21) Turkish"); SendClientMessage(playerid, COLOR_GREY3, "List of accents: (22) Mexican - (23) Spanish - (24) Arabic - (25) Israeli - (26) Romanian - (27) Italian - (28) Gangsta"); SendClientMessage(playerid, COLOR_GREY3, "List of accents: (29) Greek - (30) Serbian - (31) Balkin - (32) Danish - (33) Scottish - (34) Irish - (35) Indian"); SendClientMessage(playerid, COLOR_GREY3, "List of accents: (36) Norwegian - (37) Swedish - (38) Finnish - (39) Hungarian - (40) Bulgarian - (41) Pakistani"); SendClientMessage(playerid, COLOR_GREY3, "List of accents: (42) Cuban - (43) Slavic - (44) Indonesian - (45) Filipino - (46) Hawaiian - (47) Somalian"); SendClientMessage(playerid, COLOR_GREY3, "List of accents: (48) Armenian - (49) Persian - (50) Vietnamese - (51) Slovenian - (52) Kiwi - (53) Brazilian"); return 1; } switch(type) { case 0: strcpy(PlayerInfo[playerid][pAccent], "None", 16); case 1: strcpy(PlayerInfo[playerid][pAccent], "English", 16); case 2: strcpy(PlayerInfo[playerid][pAccent], "American", 16); case 3: strcpy(PlayerInfo[playerid][pAccent], "British", 16); case 4: strcpy(PlayerInfo[playerid][pAccent], "Chinese", 16); case 5: strcpy(PlayerInfo[playerid][pAccent], "Korean", 16); case 6: strcpy(PlayerInfo[playerid][pAccent], "Japanese", 16); case 7: strcpy(PlayerInfo[playerid][pAccent], "Asian", 16); case 8: strcpy(PlayerInfo[playerid][pAccent], "Canadian", 16); case 9: strcpy(PlayerInfo[playerid][pAccent], "Australian", 16); case 10: strcpy(PlayerInfo[playerid][pAccent], "Southern", 16); case 11: strcpy(PlayerInfo[playerid][pAccent], "Russian", 16); case 12: strcpy(PlayerInfo[playerid][pAccent], "Ukrainian", 16); case 13: strcpy(PlayerInfo[playerid][pAccent], "German", 16); case 14: strcpy(PlayerInfo[playerid][pAccent], "French", 16); case 15: strcpy(PlayerInfo[playerid][pAccent], "Portuguese", 16); case 16: strcpy(PlayerInfo[playerid][pAccent], "Polish", 16); case 17: strcpy(PlayerInfo[playerid][pAccent], "Estonian", 16); case 18: strcpy(PlayerInfo[playerid][pAccent], "Latvian", 16); case 19: strcpy(PlayerInfo[playerid][pAccent], "Dutch", 16); case 20: strcpy(PlayerInfo[playerid][pAccent], "Jamaican", 16); case 21: strcpy(PlayerInfo[playerid][pAccent], "Turkish", 16); case 22: strcpy(PlayerInfo[playerid][pAccent], "Mexican", 16); case 23: strcpy(PlayerInfo[playerid][pAccent], "Spanish", 16); case 24: strcpy(PlayerInfo[playerid][pAccent], "Arabic", 16); case 25: strcpy(PlayerInfo[playerid][pAccent], "Israeli", 16); case 26: strcpy(PlayerInfo[playerid][pAccent], "Romanian", 16); case 27: strcpy(PlayerInfo[playerid][pAccent], "Italian", 16); case 28: strcpy(PlayerInfo[playerid][pAccent], "Gangsta", 16); case 29: strcpy(PlayerInfo[playerid][pAccent], "Greek", 16); case 30: strcpy(PlayerInfo[playerid][pAccent], "Serbian", 16); case 31: strcpy(PlayerInfo[playerid][pAccent], "Balkin", 16); case 32: strcpy(PlayerInfo[playerid][pAccent], "Danish", 16); case 33: strcpy(PlayerInfo[playerid][pAccent], "Scottish", 16); case 34: strcpy(PlayerInfo[playerid][pAccent], "Irish", 16); case 35: strcpy(PlayerInfo[playerid][pAccent], "Indian", 16); case 36: strcpy(PlayerInfo[playerid][pAccent], "Norwegian", 16); case 37: strcpy(PlayerInfo[playerid][pAccent], "Swedish", 16); case 38: strcpy(PlayerInfo[playerid][pAccent], "Finnish", 16); case 39: strcpy(PlayerInfo[playerid][pAccent], "Hungarian", 16); case 40: strcpy(PlayerInfo[playerid][pAccent], "Bulgarian", 16); case 41: strcpy(PlayerInfo[playerid][pAccent], "Pakistani", 16); case 42: strcpy(PlayerInfo[playerid][pAccent], "Cuban", 16); case 43: strcpy(PlayerInfo[playerid][pAccent], "Slavic", 16); case 44: strcpy(PlayerInfo[playerid][pAccent], "Indonesian", 16); case 45: strcpy(PlayerInfo[playerid][pAccent], "Filipino", 16); case 46: strcpy(PlayerInfo[playerid][pAccent], "Hawaiian", 16); case 47: strcpy(PlayerInfo[playerid][pAccent], "Somalian", 16); case 48: strcpy(PlayerInfo[playerid][pAccent], "Armenian", 16); case 49: strcpy(PlayerInfo[playerid][pAccent], "Persian", 16); case 50: strcpy(PlayerInfo[playerid][pAccent], "Vietnamese", 16); case 51: strcpy(PlayerInfo[playerid][pAccent], "Slovenian", 16); case 52: strcpy(PlayerInfo[playerid][pAccent], "Kiwi", 16); case 53: strcpy(PlayerInfo[playerid][pAccent], "Brazilian", 16); default: SendClientMessage(playerid, COLOR_GREY, "Invalid accent. Valid types range from 0 to 53."); } SendClientMessageEx(playerid, COLOR_WHITE, "** You set your accent to '%s'.", PlayerInfo[playerid][pAccent]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET accent = '%e' WHERE uid = %i", PlayerInfo[playerid][pAccent], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); return 1; } CMD:dice(playerid, params[]) { SendProximityMessage(playerid, 20.0, COLOR_WHITE, "** %s rolls a dice which lands on the number %i.", GetPlayerRPName(playerid), random(6) + 1); return 1; } CMD:flipcoin(playerid, params[]) { SendProximityMessage(playerid, 20.0, COLOR_WHITE, "** %s flips a coin which lands on %s.", GetPlayerRPName(playerid), (random(2)) ? ("Heads") : ("Tails")); return 1; } CMD:time(playerid, params[]) { new string[128], date[6]; getdate(date[0], date[1], date[2]); gettime(date[3], date[4], date[5]); switch(date[1]) { case 1: string = "January"; case 2: string = "February"; case 3: string = "March"; case 4: string = "April"; case 5: string = "May"; case 6: string = "June"; case 7: string = "July"; case 8: string = "August"; case 9: string = "September"; case 10: string = "October"; case 11: string = "November"; case 12: string = "December"; } format(string, sizeof(string), "~y~%s %02d, %i~n~~g~|~w~%02d:%02d:%02d~g~|", string, date[2], date[0], date[3], date[4], date[5]); if(PlayerInfo[playerid][pJailTime] > 0) { format(string, sizeof(string), "%s~n~~w~Jail Time: ~y~%i seconds", string, PlayerInfo[playerid][pJailTime]); } GameTextForPlayer(playerid, string, 5000, 1); SendClientMessageEx(playerid, COLOR_WHITE, "** Paychecks occur at every hour. The next paycheck is at %02d:00 which is in %i minutes.", date[3], (60 - date[4])); return 1; } CMD:report(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /report [playerid (optional)] [text]"); } if(!enabledReports) { return SendClientMessage(playerid, COLOR_GREY, "The report channel is disabled at the moment."); } if(PlayerInfo[playerid][pReportMuted]) { if(PlayerInfo[playerid][pReportMuted] > 1000) { return SendClientMessageEx(playerid, COLOR_GREY, "You are indefinitely muted from submitting reports."); } else { return SendClientMessageEx(playerid, COLOR_GREY, "You are muted from submitting reports. Your mute is lifted in %i hours.", PlayerInfo[playerid][pReportMuted]); } } if(gettime() - PlayerInfo[playerid][pLastReport] < 50) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only submit one report every 50 seconds. Please wait %i more seconds.", 50 - (gettime() - PlayerInfo[playerid][pLastReport])); } if(PlayerInfo[playerid][pActiveReport] >= 0) { return SendClientMessage(playerid, COLOR_GREY, "You have an active report which needs to be closed first. Use /cr to close it."); } if(!AddReportToQueue(playerid, params)) { return SendClientMessage(playerid, COLOR_GREY, "The report queue is currently full. Please try again later."); } SendClientMessage(playerid, COLOR_GREEN, "Your report was sent to all online admins. Please wait for a response."); return 1; } CMD:helpme(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /helpme [help request]"); } if(PlayerInfo[playerid][pHelper] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are a helper and therefore can't use this command."); } if(PlayerInfo[playerid][pHelpMuted]) { return SendClientMessage(playerid, COLOR_GREY, "You are muted from submitting help requests."); } if(gettime() - PlayerInfo[playerid][pLastRequest] < 30) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only submit one help request every 30 seconds. Please wait %i more seconds.", 30 - (gettime() - PlayerInfo[playerid][pLastRequest])); } strcpy(PlayerInfo[playerid][pHelpRequest], params, 128); SendHelperMessage(COLOR_AQUA, "** Help Request from %s[%i]: %s **", GetPlayerRPName(playerid), playerid, params); PlayerInfo[playerid][pLastRequest] = gettime(); SendClientMessage(playerid, COLOR_GREEN, "Your help request was sent to all helpers. Please wait for a response."); return 1; } CMD:accept(playerid, params[]) { if(!strcmp(params, "house", true)) { new offeredby = PlayerInfo[playerid][pHouseOffer], houseid = PlayerInfo[playerid][pHouseOffered], price = PlayerInfo[playerid][pHousePrice]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a house."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } if(!IsHouseOwner(offeredby, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "That player no longer is the owner of this house."); } if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy this player's house."); } if(GetPlayerAssetCount(playerid, LIMIT_HOUSES) >= GetPlayerAssetLimit(playerid, LIMIT_HOUSES)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i houses. You can't own anymore unless you upgrade your asset perk.", GetPlayerAssetCount(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_HOUSES)); } SetHouseOwner(houseid, playerid); GivePlayerCash(offeredby, price); GivePlayerCash(playerid, -price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's house offer and paid $%i for their house.", GetPlayerRPName(offeredby), price); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s accepted your house offer and paid $%i for your house.", GetPlayerRPName(playerid), price); Log_Write("log_property", "%s (uid: %i) (IP: %s) sold their house (id: %i) for $%i to %s (uid: %i) (IP: %s)", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], GetPlayerIP(offeredby), HouseInfo[houseid][hID], price, GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerIP(playerid)); PlayerInfo[playerid][pHouseOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "garage", true)) { new offeredby = PlayerInfo[playerid][pGarageOffer], garageid = PlayerInfo[playerid][pGarageOffered], price = PlayerInfo[playerid][pGaragePrice]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a garage."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } if(!IsGarageOwner(offeredby, garageid)) { return SendClientMessage(playerid, COLOR_GREY, "That player no longer is the owner of this garage."); } if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy this player's garage."); } if(GetPlayerAssetCount(playerid, LIMIT_GARAGES) >= GetPlayerAssetLimit(playerid, LIMIT_GARAGES)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i garages. You can't own anymore unless you upgrade your asset perk.", GetPlayerAssetCount(playerid, LIMIT_GARAGES), GetPlayerAssetLimit(playerid, LIMIT_GARAGES)); } SetGarageOwner(garageid, playerid); GivePlayerCash(offeredby, price); GivePlayerCash(playerid, -price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's garage offer and paid $%i for their garage.", GetPlayerRPName(offeredby), price); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s accepted your garage offer and paid $%i for your garage.", GetPlayerRPName(playerid), price); Log_Write("log_property", "%s (uid: %i) (IP: %s) sold their %s garage (id: %i) for $%i to %s (uid: %i) (IP: %s)", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], GetPlayerIP(offeredby), garageInteriors[GarageInfo[garageid][gType]][intName], GarageInfo[garageid][gID], price, GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerIP(playerid)); PlayerInfo[playerid][pGarageOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "business", true)) { new offeredby = PlayerInfo[playerid][pBizOffer], businessid = PlayerInfo[playerid][pBizOffered], price = PlayerInfo[playerid][pBizPrice]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a business."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } if(!IsBusinessOwner(offeredby, businessid)) { return SendClientMessage(playerid, COLOR_GREY, "That player no longer is the owner of this business."); } if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy this player's business."); } if(GetPlayerAssetCount(playerid, LIMIT_BUSINESSES) >= GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i businesses. You can't own anymore unless you upgrade your asset perk.", GetPlayerAssetCount(playerid, LIMIT_BUSINESSES), GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES)); } SetBusinessOwner(businessid, playerid); GivePlayerCash(offeredby, price); GivePlayerCash(playerid, -price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's business offer and paid $%i for their %s.", GetPlayerRPName(offeredby), price, bizInteriors[BusinessInfo[businessid][bType]][intType]); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s accepted your business offer and paid $%i for your %s.", GetPlayerRPName(playerid), price, bizInteriors[BusinessInfo[businessid][bType]][intType]); Log_Write("log_property", "%s (uid: %i) (IP: %s) sold their %s business (id: %i) for $%i to %s (uid: %i) (IP: %s)", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], GetPlayerIP(offeredby), bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bID], price, GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerIP(playerid)); PlayerInfo[playerid][pBizOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "land", true)) { new offeredby = PlayerInfo[playerid][pLandOffer], landid = PlayerInfo[playerid][pLandOffered], price = PlayerInfo[playerid][pLandPrice]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a land."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } if(!IsLandOwner(offeredby, landid)) { return SendClientMessage(playerid, COLOR_GREY, "That player no longer is the owner of this land."); } if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy this player's land."); } SetLandOwner(landid, playerid); GivePlayerCash(offeredby, price); GivePlayerCash(playerid, -price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's land offer and paid $%i for their land.", GetPlayerRPName(offeredby), price); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s accepted your land offer and paid $%i for your land.", GetPlayerRPName(playerid), price); Log_Write("log_property", "%s (uid: %i) (IP: %s) sold their land (id: %i) for $%i to %s (uid: %i) (IP: %s)", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], GetPlayerIP(offeredby), LandInfo[landid][lID], price, GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerIP(playerid)); PlayerInfo[playerid][pLandOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "death", true)) { if(!PlayerInfo[playerid][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "You are not injured and can't accept your death."); } SendClientMessage(playerid, COLOR_GREY, "You have given up and accepted your fate."); SetPlayerHealth(playerid, 0.0); } else if(!strcmp(params, "vest", true)) { new offeredby = PlayerInfo[playerid][pVestOffer], price = PlayerInfo[playerid][pVestPrice]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a vest."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy the vest."); } new Float:armor = 50.0 + (GetJobLevel(offeredby, JOB_BODYGUARD) * 5); SetScriptArmour(playerid, armor); GivePlayerCash(offeredby, price); GivePlayerCash(playerid, -price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's vest and paid $%i for %.1f armor points.", GetPlayerRPName(offeredby), price, armor); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s accepted your vest offer and paid $%i for %.1f armor points.", GetPlayerRPName(playerid), price, armor); TurfTaxCheck(offeredby, price); IncreaseJobSkill(offeredby, JOB_BODYGUARD); PlayerInfo[playerid][pVestOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "vehicle", true)) { new offeredby = PlayerInfo[playerid][pCarOffer], vehicleid = PlayerInfo[playerid][pCarOffered], price = PlayerInfo[playerid][pCarPrice]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a vehicle."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } if(!IsVehicleOwner(offeredby, vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "That player no longer is the owner of this vehicle."); } if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy this player's vehicle."); } GetPlayerName(playerid, VehicleInfo[vehicleid][vOwner], MAX_PLAYER_NAME); VehicleInfo[vehicleid][vOwnerID] = PlayerInfo[playerid][pID]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET ownerid = %i, owner = '%s' WHERE id = %i", VehicleInfo[vehicleid][vOwnerID], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); GivePlayerCash(offeredby, price); GivePlayerCash(playerid, -price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's vehicle offer and paid $%i for their %s.", GetPlayerRPName(offeredby), price, GetVehicleName(vehicleid)); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s accepted your vehicle offer and paid $%i for your %s.", GetPlayerRPName(playerid), price, GetVehicleName(vehicleid)); Log_Write("log_property", "%s (uid: %i) (IP: %s) sold their %s (id: %i) for $%i to %s (uid: %i) (IP: %s)", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], GetPlayerIP(offeredby), GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID], price, GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerIP(playerid)); PlayerInfo[playerid][pCarOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "faction", true)) { new offeredby = PlayerInfo[playerid][pFactionOffer], factionid = PlayerInfo[playerid][pFactionOffered]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any invites to a faction."); } if(PlayerInfo[offeredby][pFaction] != factionid || PlayerInfo[offeredby][pFactionRank] < FactionInfo[factionid][fRankCount] - 2) { return SendClientMessage(playerid, COLOR_GREY, "That player is no longer allowed to invite you."); } PlayerInfo[playerid][pFaction] = factionid; PlayerInfo[playerid][pFactionRank] = 0; PlayerInfo[playerid][pDivision] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET faction = %i, factionrank = 0, division = -1 WHERE uid = %i", factionid, PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's faction offer to join {00AA00}%s{33CCFF}.", GetPlayerRPName(offeredby), FactionInfo[factionid][fName]); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s accepted your faction offer and is now apart of your faction.", GetPlayerRPName(playerid)); Log_Write("log_faction", "%s (uid: %i) has invited %s (uid: %i) to %s (id: %i).", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], FactionInfo[factionid][fName], factionid); PlayerInfo[playerid][pFactionOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "gang", true)) { new offeredby = PlayerInfo[playerid][pGangOffer], gangid = PlayerInfo[playerid][pGangOffered]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any invites to a gang."); } if(PlayerInfo[offeredby][pGang] != gangid || PlayerInfo[offeredby][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "That player is no longer allowed to invite you."); } PlayerInfo[playerid][pGang] = gangid; PlayerInfo[playerid][pGangRank] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gang = %i, gangrank = 0 WHERE uid = %i", gangid, PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's gang offer to join {00AA00}%s{33CCFF}.", GetPlayerRPName(offeredby), GangInfo[gangid][gName]); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s accepted your gang offer and is now apart of your gang.", GetPlayerRPName(playerid)); Log_Write("log_gang", "%s (uid: %i) has invited %s (uid: %i) to %s (id: %i).", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[gangid][gName], gangid); PlayerInfo[playerid][pGangOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "frisk", true)) { new offeredby = PlayerInfo[playerid][pFriskOffer]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers to be frisked."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } FriskPlayer(offeredby, playerid); PlayerInfo[playerid][pFriskOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "ticket", true)) { new offeredby = PlayerInfo[playerid][pTicketOffer], price = PlayerInfo[playerid][pTicketPrice]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a ticket."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to pay this ticket."); } //GivePlayerCash(offeredby, price); AddToTaxVault(price); GivePlayerCash(playerid, -price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have paid the $%i ticket written by %s.", price, GetPlayerRPName(offeredby)); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has paid the $%i ticket which was written to them.", GetPlayerRPName(playerid), price); Log_Write("log_faction", "%s (uid: %i) has given %s (uid: %i) a ticket for $%i.", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], price); PlayerInfo[playerid][pTicketOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "live", true)) { new offeredby = PlayerInfo[playerid][pLiveOffer]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a live interview."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } if(PlayerInfo[playerid][pCallLine] != INVALID_PLAYER_ID || PlayerInfo[offeredby][pCallLine] != INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You or the offerer can't be on a phone call during a live interview."); } SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's live interview offer. Speak in IC chat to begin the interview!", GetPlayerRPName(offeredby)); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has accepted your live interview offer. Speak in IC chat to begin the interview!", GetPlayerRPName(playerid)); Log_Write("log_faction", "%s (uid: %i) has started a live interview with %s (uid: %i)", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], GetPlayerNameEx(playerid), PlayerInfo[playerid][pID]); PlayerInfo[playerid][pLiveBroadcast] = offeredby; PlayerInfo[offeredby][pLiveBroadcast] = playerid; PlayerInfo[playerid][pLiveOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "handshake", true)) { new offeredby = PlayerInfo[playerid][pShakeOffer]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a handshake."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } ClearAnimations(playerid); ClearAnimations(offeredby); SetPlayerToFacePlayer(playerid, offeredby); SetPlayerToFacePlayer(offeredby, playerid); switch(PlayerInfo[playerid][pShakeType]) { case 1: { ApplyAnimation(playerid, "GANGS", "hndshkaa", 4.0, 0, 0, 0, 0, 0, 1); ApplyAnimation(offeredby, "GANGS", "hndshkaa", 4.0, 0, 0, 0, 0, 0, 1); } case 2: { ApplyAnimation(playerid, "GANGS", "hndshkba", 4.0, 0, 0, 0, 0, 0, 1); ApplyAnimation(offeredby, "GANGS", "hndshkba", 4.0, 0, 0, 0, 0, 0, 1); } case 3: { ApplyAnimation(playerid, "GANGS", "hndshkda", 4.0, 0, 0, 0, 0, 0, 1); ApplyAnimation(offeredby, "GANGS", "hndshkda", 4.0, 0, 0, 0, 0, 0, 1); } case 4: { ApplyAnimation(playerid, "GANGS", "hndshkea", 4.0, 0, 0, 0, 0, 0, 1); ApplyAnimation(offeredby, "GANGS", "hndshkea", 4.0, 0, 0, 0, 0, 0, 1); } case 5: { ApplyAnimation(playerid, "GANGS", "hndshkfa", 4.0, 0, 0, 0, 0, 0, 1); ApplyAnimation(offeredby, "GANGS", "hndshkfa", 4.0, 0, 0, 0, 0, 0, 1); } case 6: { ApplyAnimation(playerid, "GANGS", "prtial_hndshk_biz_01", 4.0, 0, 0, 0, 0, 0); ApplyAnimation(offeredby, "GANGS", "prtial_hndshk_biz_01", 4.0, 0, 0, 0, 0, 0); } } SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's handshake offer.", GetPlayerRPName(offeredby)); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has accepted your handshake offer.", GetPlayerRPName(playerid)); PlayerInfo[playerid][pShakeOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "item", true)) { new offeredby = PlayerInfo[playerid][pSellOffer], type = PlayerInfo[playerid][pSellType], amount = PlayerInfo[playerid][pSellExtra], price = PlayerInfo[playerid][pSellPrice]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for an item."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to accept the offer."); } switch(type) { case ITEM_WEAPON: { new weaponid = PlayerInfo[playerid][pSellExtra]; if(!PlayerHasWeapon(offeredby, weaponid)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item."); } GivePlayerCash(playerid, -price); GivePlayerCash(offeredby, price); GivePlayerWeaponEx(playerid, weaponid); RemovePlayerWeapon(offeredby, weaponid); SendClientMessageEx(playerid, COLOR_AQUA, "** You have purchased %s's %s for $%i.", GetPlayerRPName(offeredby), GetWeaponNameEx(weaponid), price); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has purchased your %s for $%i.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid), price); Log_Write("log_give", "%s (uid: %i) has sold their %s to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], GetWeaponNameEx(weaponid), GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], price); TurfTaxCheck(offeredby, price); PlayerInfo[playerid][pSellOffer] = INVALID_PLAYER_ID; } case ITEM_MATERIALS: { if(PlayerInfo[offeredby][pMaterials] < amount) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item."); } if(PlayerInfo[playerid][pMaterials] + amount > GetPlayerCapacity(playerid, CAPACITY_MATERIALS)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS)); } GivePlayerCash(playerid, -price); GivePlayerCash(offeredby, price); PlayerInfo[playerid][pMaterials] += amount; PlayerInfo[offeredby][pMaterials] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[offeredby][pMaterials], PlayerInfo[offeredby][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have purchased %i materials from %s for $%i.", amount, GetPlayerRPName(offeredby), price); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has purchased your %i materials for $%i.", GetPlayerRPName(playerid), amount, price); Log_Write("log_give", "%s (uid: %i) has sold their %i materials to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], price); TurfTaxCheck(offeredby, price); PlayerInfo[playerid][pSellOffer] = INVALID_PLAYER_ID; } case ITEM_WEED: { if(PlayerInfo[offeredby][pWeed] < amount) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item."); } if(PlayerInfo[playerid][pWeed] + amount > GetPlayerCapacity(playerid, CAPACITY_WEED)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED)); } GivePlayerCash(playerid, -price); GivePlayerCash(offeredby, price); PlayerInfo[playerid][pWeed] += amount; PlayerInfo[offeredby][pWeed] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[playerid][pWeed], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[offeredby][pWeed], PlayerInfo[offeredby][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have purchased %i grams of weed from %s for $%i.", amount, GetPlayerRPName(offeredby), price); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has purchased your %i grams of weed for $%i.", GetPlayerRPName(playerid), amount, price); Log_Write("log_give", "%s (uid: %i) has sold their %i grams of weed to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], price); TurfTaxCheck(offeredby, price); PlayerInfo[playerid][pSellOffer] = INVALID_PLAYER_ID; } case ITEM_COCAINE: { if(PlayerInfo[offeredby][pCocaine] < amount) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item."); } if(PlayerInfo[playerid][pCocaine] + amount > GetPlayerCapacity(playerid, CAPACITY_COCAINE)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE)); } GivePlayerCash(playerid, -price); GivePlayerCash(offeredby, price); PlayerInfo[playerid][pCocaine] += amount; PlayerInfo[offeredby][pCocaine] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[offeredby][pCocaine], PlayerInfo[offeredby][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have purchased %i grams of cocaine from %s for $%i.", amount, GetPlayerRPName(offeredby), price); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has purchased your %i grams of cocaine for $%i.", GetPlayerRPName(playerid), amount, price); Log_Write("log_give", "%s (uid: %i) has sold their %i grams of cocaine to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], price); TurfTaxCheck(offeredby, price); PlayerInfo[playerid][pSellOffer] = INVALID_PLAYER_ID; } case ITEM_METH: { if(PlayerInfo[offeredby][pMeth] < amount) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item."); } if(PlayerInfo[playerid][pMeth] + amount > GetPlayerCapacity(playerid, CAPACITY_METH)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i meth. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH)); } GivePlayerCash(playerid, -price); GivePlayerCash(offeredby, price); PlayerInfo[playerid][pMeth] += amount; PlayerInfo[offeredby][pMeth] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[offeredby][pMeth], PlayerInfo[offeredby][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have purchased %i grams of meth from %s for $%i.", amount, GetPlayerRPName(offeredby), price); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has purchased your %i grams of meth for $%i.", GetPlayerRPName(playerid), amount, price); Log_Write("log_give", "%s (uid: %i) has sold their %i grams of meth to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], price); TurfTaxCheck(offeredby, price); PlayerInfo[playerid][pSellOffer] = INVALID_PLAYER_ID; } case ITEM_PAINKILLERS: { if(PlayerInfo[offeredby][pPainkillers] < amount) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item."); } if(PlayerInfo[playerid][pPainkillers] + amount > GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i painkillers. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pPainkillers], GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS)); } GivePlayerCash(playerid, -price); GivePlayerCash(offeredby, price); PlayerInfo[playerid][pPainkillers] += amount; PlayerInfo[offeredby][pPainkillers] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", PlayerInfo[playerid][pPainkillers], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", PlayerInfo[offeredby][pPainkillers], PlayerInfo[offeredby][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have purchased %i painkillers from %s for $%i.", amount, GetPlayerRPName(offeredby), price); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has purchased your %i painkillers for $%i.", GetPlayerRPName(playerid), amount, price); Log_Write("log_give", "%s (uid: %i) has sold their %i painkillers to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], price); TurfTaxCheck(offeredby, price); PlayerInfo[playerid][pSellOffer] = INVALID_PLAYER_ID; } case ITEM_SEEDS: { if(PlayerInfo[offeredby][pSeeds] < amount) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item."); } if(PlayerInfo[playerid][pSeeds] + amount > GetPlayerCapacity(playerid, CAPACITY_SEEDS)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i seeds. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pSeeds], GetPlayerCapacity(playerid, CAPACITY_SEEDS)); } GivePlayerCash(playerid, -price); GivePlayerCash(offeredby, price); PlayerInfo[playerid][pSeeds] += amount; PlayerInfo[offeredby][pSeeds] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET seeds = %i WHERE uid = %i", PlayerInfo[playerid][pSeeds], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET seeds = %i WHERE uid = %i", PlayerInfo[offeredby][pSeeds], PlayerInfo[offeredby][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have purchased %i seeds from %s for $%i.", amount, GetPlayerRPName(offeredby), price); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has purchased your %i seeds for $%i.", GetPlayerRPName(playerid), amount, price); Log_Write("log_give", "%s (uid: %i) has sold their %i seeds to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], price); TurfTaxCheck(offeredby, price); PlayerInfo[playerid][pSellOffer] = INVALID_PLAYER_ID; } case ITEM_EPHEDRINE: { if(PlayerInfo[offeredby][pEphedrine] < amount) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer no longer has that item."); } if(PlayerInfo[playerid][pEphedrine] + amount > GetPlayerCapacity(playerid, CAPACITY_EPHEDRINE)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i ephedrine. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pEphedrine], GetPlayerCapacity(playerid, CAPACITY_EPHEDRINE)); } GivePlayerCash(playerid, -price); GivePlayerCash(offeredby, price); PlayerInfo[playerid][pEphedrine] += amount; PlayerInfo[offeredby][pEphedrine] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET ephedrine = %i WHERE uid = %i", PlayerInfo[playerid][pEphedrine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET ephedrine = %i WHERE uid = %i", PlayerInfo[offeredby][pEphedrine], PlayerInfo[offeredby][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have purchased %i grams of ephedrine from %s for $%i.", amount, GetPlayerRPName(offeredby), price); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has purchased your %i grams of ephedrine for $%i.", GetPlayerRPName(playerid), amount, price); Log_Write("log_give", "%s (uid: %i) has sold their %i grams of ephedrine to %s (uid: %i) for $%i.", GetPlayerNameEx(offeredby), PlayerInfo[offeredby][pID], amount, GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], price); TurfTaxCheck(offeredby, price); PlayerInfo[playerid][pSellOffer] = INVALID_PLAYER_ID; } } } else if(!strcmp(params, "weapon", true)) { if(PlayerInfo[playerid][pSellOffer] == INVALID_PLAYER_ID || PlayerInfo[playerid][pSellType] != ITEM_SELLGUN) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for a weapon."); } if(PlayerInfo[playerid][pCash] < PlayerInfo[playerid][pSellPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase the weapon."); } SellWeapon(PlayerInfo[playerid][pSellOffer], playerid, PlayerInfo[playerid][pSellExtra], PlayerInfo[playerid][pSellPrice]); PlayerInfo[playerid][pSellOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "lawyer", true)) { new offeredby = PlayerInfo[playerid][pDefendOffer], price = PlayerInfo[playerid][pDefendPrice]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers from a lawyer."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } if(PlayerInfo[playerid][pCash] < price) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to accept the offer."); } if(!PlayerInfo[playerid][pWantedLevel]) { return SendClientMessage(playerid, COLOR_GREY, "You are no longer wanted. You can't accept this offer anymore."); } PlayerInfo[playerid][pWantedLevel]--; GivePlayerCash(playerid, -price); GivePlayerCash(offeredby, price); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET wantedlevel = wantedlevel - 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's offer to reduce your wanted level for $%i.", GetPlayerRPName(offeredby), price); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has accepted your offer to reduce their wanted level for $%i.", GetPlayerRPName(playerid), price); IncreaseJobSkill(offeredby, JOB_LAWYER); PlayerInfo[playerid][pDefendOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "dicebet", true)) { new offeredby = PlayerInfo[playerid][pDiceOffer], amount = PlayerInfo[playerid][pDiceBet]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any offers for dice betting."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } if(PlayerInfo[playerid][pCash] < amount) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to accept this bet."); } if(PlayerInfo[offeredby][pCash] < amount) { return SendClientMessage(playerid, COLOR_GREY, "That player can't afford to accept this bet."); } new rand[2]; rand[0] = random(6) + 1; rand[1] = random(6) + 1; SendProximityMessage(offeredby, 20.0, COLOR_WHITE, "** %s rolls a dice which lands on the number %i.", GetPlayerRPName(offeredby), rand[0]); SendProximityMessage(playerid, 20.0, COLOR_WHITE, "** %s rolls a dice which lands on the number %i.", GetPlayerRPName(playerid), rand[1]); if(rand[0] > rand[1]) { GivePlayerCash(offeredby, amount); GivePlayerCash(playerid, -amount); SendClientMessageEx(offeredby, COLOR_AQUA, "** You have won $%i from your dice bet with %s.", amount, GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_RED, "** You have lost $%i from your dice bet with %s.", amount, GetPlayerRPName(offeredby)); if(amount > 10000 && !strcmp(GetPlayerIP(offeredby), GetPlayerIP(playerid))) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s (IP: %s) won a $%i dice bet against %s (IP: %s).", GetPlayerRPName(offeredby), GetPlayerIP(offeredby), amount, GetPlayerRPName(playerid), GetPlayerIP(playerid)); } } else if(rand[0] == rand[1]) { SendClientMessageEx(offeredby, COLOR_AQUA, "** The bet of $%i was a tie. You kept your money as a result!", amount); SendClientMessageEx(playerid, COLOR_AQUA, "** The bet of $%i was a tie. You kept your money as a result!", amount); } else { GivePlayerCash(offeredby, -amount); GivePlayerCash(playerid, amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You have won $%i from your dice bet with %s.", amount, GetPlayerRPName(offeredby)); SendClientMessageEx(offeredby, COLOR_RED, "** You have lost $%i from your dice bet with %s.", amount, GetPlayerRPName(playerid)); if(amount > 10000 && !strcmp(GetPlayerIP(offeredby), GetPlayerIP(playerid))) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s (IP: %s) won a $%i dice bet against %s (IP: %s).", GetPlayerRPName(playerid), GetPlayerIP(playerid), amount, GetPlayerRPName(offeredby), GetPlayerIP(offeredby)); } } PlayerInfo[playerid][pDiceOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "invite", true)) { new offeredby = PlayerInfo[playerid][pInviteOffer], houseid = PlayerInfo[playerid][pInviteHouse]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any invitations to a house."); } PlayerInfo[playerid][pCP] = CHECKPOINT_HOUSE; SetPlayerCheckpoint(playerid, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ], 3.0); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's invitation to their house.", GetPlayerRPName(offeredby)); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has accepted your invitation to your house.", GetPlayerRPName(playerid)); PlayerInfo[playerid][pInviteOffer] = INVALID_PLAYER_ID; } else if(!strcmp(params, "robbery", true)) { new offeredby = PlayerInfo[playerid][pRobberyOffer]; if(offeredby == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received any invitations to a bank heist."); } if(!IsPlayerInRangeOfPlayer(playerid, offeredby, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player who initiated the offer is out of range."); } if(RobberyInfo[rRobbers][0] != offeredby || RobberyInfo[rStarted]) { return SendClientMessage(playerid, COLOR_GREY, "The robbery invite is no longer available."); } if(GetBankRobbers() >= MAX_BANK_ROBBERS) { return SendClientMessageEx(playerid, COLOR_GREY, "This bank robbery has reached its limit of %i robbers.", MAX_BANK_ROBBERS); } AddToBankRobbery(playerid); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's bank robbery invitation.", GetPlayerRPName(offeredby)); SendClientMessageEx(offeredby, COLOR_AQUA, "** %s has accepted your bank robbery invitation.", GetPlayerRPName(playerid)); PlayerInfo[playerid][pRobberyOffer] = INVALID_PLAYER_ID; } else { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /accept [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: House, Garage, Business, Land, Death, Vest, Vehicle, Faction, Gang, Ticket, Live"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Item, Frisk, Handshake, Weapon, Lawyer, Dicebet, Invite, Robbery"); } return 1; } CMD:e(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /e [executive chat]"); } if(PlayerInfo[playerid][pToggleAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the executive chat as you have admin chats toggled."); } foreach(new i : Player) { if(PlayerInfo[i][pAdmin] > 5 && !PlayerInfo[i][pToggleAdmin]) { SendClientMessageEx(i, 0xA077BFFF, "** [%s] %s: %s **", GetAdminRank(playerid), GetPlayerRPName(playerid), params); } } return 1; } CMD:ha(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /ha [head admin chat]"); } if(PlayerInfo[playerid][pToggleAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the head administrator chat as you have admin chats toggled."); } foreach(new i : Player) { if(PlayerInfo[i][pAdmin] > 4 && !PlayerInfo[i][pToggleAdmin]) { SendClientMessageEx(i, 0x5C80FFFF, "** [%s] %s: %s **", GetAdminRank(playerid), GetPlayerRPName(playerid), params); } } return 1; } CMD:a(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /a [admin chat]"); } if(PlayerInfo[playerid][pToggleAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the admin chat as you have it toggled."); } foreach(new i : Player) { if(PlayerInfo[i][pAdmin] > 0 && !PlayerInfo[i][pToggleAdmin]) { if(strlen(params) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, COLOR_ADMINCHAT, "** [%s] %s: %.*s... **", GetAdminRank(playerid), GetPlayerRPName(playerid), MAX_SPLIT_LENGTH, params); SendClientMessageEx(i, COLOR_ADMINCHAT, "** [%s] %s: ...%s **", GetAdminRank(playerid), GetPlayerRPName(playerid), params[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, COLOR_ADMINCHAT, "** [%s] %s: %s **", GetAdminRank(playerid), GetPlayerRPName(playerid), params); } } } return 1; } CMD:ah(playerid, params[]) { return cmd_adminhelp(playerid, params); } CMD:ahelp(playerid, params[]) { return cmd_adminhelp(playerid, params); } CMD:adminhelp(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(PlayerInfo[playerid][pAdmin] >= 1) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 1:{DDDDDD} /a, /skick, /sban, /sjail, /pinfo, /spec, /reports, /admins, /flag, /removeflag, /listflags, /check, /dm."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 1:{DDDDDD} /ocheck, /oflag, /listflagged."); } if(PlayerInfo[playerid][pAdmin] >= 2) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 2:{DDDDDD} /aduty, /adminname, /kick, /ban, /warn, /slap, /ar, /tr, /rr, /cr, /getip, /iplookup, /ogetip, /setint, /setvw."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 2:{DDDDDD} /setskin, /revive, /heject, /goto, /gethere, /gotocar, /getcar, /gotocoords, /gotoint, /listen, /jetpack, /sendto."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 2:{DDDDDD} /freeze, /unfreeze, /rwarn, /runmute, /nmute, /admute, /hmute, /gmute, /skiptut, /listguns, /disarm."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 2:{DDDDDD} /jail, /listjailed, /lastactive, /checkinv, /afklist, /acceptname, /denyname, /namechanges, /nrn."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 2:{DDDDDD} /prisoninfo, /relog, /rtnc, /sth, /nro, /nao, /nor, /post, /contracts, /denyhit, /undercover."); } if(PlayerInfo[playerid][pAdmin] >= 3) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 3:{DDDDDD} /prison, /sprison, /oprison, /release, /fine, /pfine, /ofine, /sethp, /setarmor, /mark, /gotomark."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 3:{DDDDDD} /veh, /destroyveh, /respawncars, /broadcast, /fixveh, /clearchat, /healrange, /shots, /damages."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 3:{DDDDDD} /resetadtimer, /baninfo, /banhistory, /kills, /togooc, /tognewbie, /togglobal, /listpvehs, /despawnpveh."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 3:{DDDDDD} /aclearwanted, /removedm, /savevehicle, /editvehicle, /removevehicle, /refillcars, /refilldrug, /duel."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 3:{DDDDDD} /startchat, /invitechat, /kickchat, /endchat."); } if(PlayerInfo[playerid][pAdmin] >= 4) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 4:{DDDDDD} /givegun, /setname, /permaban, /oban, /unban, /unbanip, /banip, /lockaccount, /unlockaccount."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 4:{DDDDDD} /explode, /event, /gplay, /gplayurl, /gstop, /sethpall, /setarmorall, /setweather, /settime, /addtoevent."); } if(PlayerInfo[playerid][pAdmin] >= 5) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 5:{DDDDDD} /setstat, /givemoney, /givemoneyall, /givecookie, /givecookieall, /setvip, /forcepayday."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 5:{DDDDDD} /removevip, /rangeban, /deleteaccount, /doublexp, /previewint, /nearest, /dynamichelp."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 5:{DDDDDD} /saveaccounts, /adestroyboombox, /resetbanktimer, /resetrobbery, /givepayday, /givepveh, /givedoublexp."); } if(PlayerInfo[playerid][pAdmin] >= 6) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 6:{DDDDDD} /makeadmin, /makehelper, /omakeadmin, /omakehelper, /setmotd, /setstaff, /forceaduty."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "LEVEL 6:{DDDDDD} /olisthelpers, /gmx, /sellinactive, /changelist, /fixplayerid, /anticheat."); } return 1; } CMD:reports(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } SendClientMessage(playerid, COLOR_GREEN, "|_________ Pending Reports _________|"); for(new i = 0; i < MAX_REPORTS; i ++) { if(ReportInfo[i][rExists] && !ReportInfo[i][rAccepted]) { SendClientMessageEx(playerid, COLOR_GREY2, "(RID: %i) %s[%i] reports: %s", i, GetPlayerRPName(ReportInfo[i][rReporter]), ReportInfo[i][rReporter], ReportInfo[i][rText]); } } SendClientMessage(playerid, COLOR_YELLOW, "** Use /ar [rid] or /tr [rid] to handle these reports."); return 1; } CMD:rtnc(playerid, params[]) { new reportid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", reportid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /rtnc [reportid] (Sends to newbie chat)"); } if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid report ID."); } if(ReportInfo[reportid][rAccepted]) { return SendClientMessage(playerid, COLOR_GREY, "The report specified is being handled by another admin."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has sent report %i to newbie chat.", GetPlayerRPName(playerid), reportid); SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_GREEN, "%s has redirected your report to the newbie chat.", GetPlayerRPName(playerid)); SendNewbieChatMessage(ReportInfo[reportid][rReporter], ReportInfo[reportid][rText]); ReportInfo[reportid][rExists] = 0; return 1; } CMD:sth(playerid, params[]) { new reportid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", reportid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sth [reportid] (Sends to helpers)"); } if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid report ID."); } if(ReportInfo[reportid][rAccepted]) { return SendClientMessage(playerid, COLOR_GREY, "The report specified is being handled by another admin."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has sent report %i to helpers.", GetPlayerRPName(playerid), reportid); SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_GREEN, "%s has redirected your report to all helpers online.", GetPlayerRPName(playerid)); strcpy(PlayerInfo[ReportInfo[reportid][rReporter]][pHelpRequest], ReportInfo[reportid][rText], 128); SendHelperMessage(COLOR_AQUA, "** Help Request from %s[%i]: %s **", GetPlayerRPName(ReportInfo[reportid][rReporter]), ReportInfo[reportid][rReporter], ReportInfo[reportid][rText]); PlayerInfo[playerid][pLastRequest] = gettime(); ReportInfo[reportid][rExists] = 0; return 1; } CMD:ar(playerid, params[]) { new reportid, chat; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "iI(1)", reportid, chat)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /ar [reportid] [chat (optional - 0/1)]"); } if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid report ID."); } if(ReportInfo[reportid][rAccepted]) { return SendClientMessage(playerid, COLOR_GREY, "The report specified is being handled by another admin."); } if(PlayerInfo[playerid][pActiveReport] >= 0) { return SendClientMessage(playerid, COLOR_GREY, "You have a report active already. Use /cr to close it."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has accepted report %i from %s.", GetPlayerRPName(playerid), reportid, GetPlayerRPName(ReportInfo[reportid][rReporter])); if(chat) { SendClientMessage(playerid, COLOR_WHITE, "** You can use /rr to speak with the reporter and /cr to close the report."); SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_GREEN, "%s has accepted your report and is now reviewing it.", GetPlayerRPName(playerid)); SendClientMessage(ReportInfo[reportid][rReporter], COLOR_GREEN, "You can use /rr to reply to the admin handling your report."); PlayerInfo[playerid][pActiveReport] = reportid; PlayerInfo[ReportInfo[reportid][rReporter]][pActiveReport] = reportid; ReportInfo[reportid][rHandledBy] = playerid; ReportInfo[reportid][rAccepted] = 1; } else { SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_GREEN, "%s has accepted your report and is now reviewing it.", GetPlayerRPName(playerid)); ReportInfo[reportid][rExists] = 0; } PlayerInfo[playerid][pReports]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET reports = %i WHERE uid = %i", PlayerInfo[playerid][pReports], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); return 1; } CMD:tr(playerid, params[]) { new reportid, reason[128]; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "iS(N/A)[128]", reportid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /tr [reportid] [reason (optional)]"); } if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid report ID."); } if(ReportInfo[reportid][rAccepted]) { return SendClientMessage(playerid, COLOR_GREY, "The report specified is being handled by another admin."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has trashed report %i from %s, reason: %s", GetPlayerRPName(playerid), reportid, GetPlayerRPName(ReportInfo[reportid][rReporter]), reason); SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "** %s has trashed your report, reason: %s", GetPlayerRPName(playerid), reason); ReportInfo[reportid][rExists] = 0; return 1; } CMD:nro(playerid, params[]) { new reportid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", reportid)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /nro [reportid]"); SendClientMessage(playerid, COLOR_GREY3, "This command will clear a report for not being a rulebreaking offense."); return 1; } if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists]) { return SendClientMessage(playerid, COLOR_GREY, "There's not a report that currently exists with this ID."); } if(ReportInfo[reportid][rAccepted]) { return SendClientMessage(playerid, COLOR_GREY, "This report is already being handled by another administrator."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has trashed report %i from %s as their report involves a non-rulebreaking offense.", GetPlayerRPName(playerid), reportid, GetPlayerRPName(ReportInfo[reportid][rReporter])); SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "%s has trashed your report as it involves a non-rulebreaking offense", GetPlayerRPName(playerid)); SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "Please visit our rules page at limitlessrp.com for a full list of rulebreaking offenses."); ReportInfo[reportid][rExists] = 0; return 1; } CMD:nao(playerid, params[]) { new reportid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", reportid)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /nao [reportid]"); SendClientMessage(playerid, COLOR_GREY3, "This command will clear a report if there isn't a high enough administrator online."); return 1; } if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists]) { return SendClientMessage(playerid, COLOR_GREY, "There's not a report that currently exists with this ID."); } if(ReportInfo[reportid][rAccepted]) { return SendClientMessage(playerid, COLOR_GREY, "This report is already being handled by another administrator."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has trashed report %i from %s as there are no admins online to handle it.", GetPlayerRPName(playerid), reportid, GetPlayerRPName(ReportInfo[reportid][rReporter])); SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "%s has trashed your report as there no admins online with the authority to handle it.", GetPlayerRPName(playerid)); ReportInfo[reportid][rExists] = 0; return 1; } CMD:nor(playerid, params[]) { new reportid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", reportid)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /nor [reportid]"); SendClientMessage(playerid, COLOR_GREY3, "This command will clear a report if the reporters revive request is invalid."); return 1; } if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists]) { return SendClientMessage(playerid, COLOR_GREY, "There's not a report that currently exists with this ID."); } if(ReportInfo[reportid][rAccepted]) { return SendClientMessage(playerid, COLOR_GREY, "This report is already being handled by another administrator."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has trashed report %i from %s as their request for a revive is invalid.", GetPlayerRPName(playerid), reportid, GetPlayerRPName(ReportInfo[reportid][rReporter])); SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "%s has trashed your report as your request for a revive is invalid. (/call 911)", GetPlayerRPName(playerid)); ReportInfo[reportid][rExists] = 0; return 1; } CMD:post(playerid, params[]) { new reportid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", reportid)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /nor [reportid]"); SendClientMessage(playerid, COLOR_GREY3, "This command will clear a report and notify the player to post an admin request."); return 1; } if(!(0 <= reportid < MAX_REPORTS) || !ReportInfo[reportid][rExists]) { return SendClientMessage(playerid, COLOR_GREY, "There's not a report that currently exists with this ID."); } if(ReportInfo[reportid][rAccepted]) { return SendClientMessage(playerid, COLOR_GREY, "This report is already being handled by another administrator."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has trashed report %i from %s as it needs to be handled on the forums.", GetPlayerRPName(playerid), reportid, GetPlayerRPName(ReportInfo[reportid][rReporter])); SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "%s has trashed your report as your issue at hand must be handled on our forums.", GetPlayerRPName(playerid)); SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_LIGHTRED, "Please visit our website at limitlessrp.com in order to to resolve this issue."); ReportInfo[reportid][rExists] = 0; return 1; } CMD:norevive(playerid, params[]) { return cmd_nor(playerid, params); } CMD:er(playerid, params[]) { return cmd_cr(playerid, params); } CMD:bigears(playerid, params[]) { return cmd_listen(playerid, params); } CMD:rr(playerid, params[]) { new reportid = PlayerInfo[playerid][pActiveReport]; if(reportid == -1) { return SendClientMessage(playerid, COLOR_GREY, "You have no active report to reply to."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /rr [reply text]"); } if(ReportInfo[reportid][rReporter] == playerid) { SendClientMessageEx(ReportInfo[reportid][rHandledBy], COLOR_YELLOW, "** Player %s (ID %i): %s **", GetPlayerRPName(playerid), playerid, params); SendClientMessageEx(playerid, COLOR_YELLOW, "** Reply to %s (ID %i): %s **", GetPlayerRPName(ReportInfo[reportid][rHandledBy]), ReportInfo[reportid][rHandledBy], params); } else { SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_YELLOW, "** Admin %s (ID %i): %s **", GetPlayerRPName(playerid), playerid, params); SendClientMessageEx(playerid, COLOR_YELLOW, "** Reply to %s (ID %i): %s **", GetPlayerRPName(ReportInfo[reportid][rReporter]), ReportInfo[reportid][rReporter], params); } return 1; } CMD:cr(playerid, params[]) { new reportid = PlayerInfo[playerid][pActiveReport]; if(reportid == -1) { return SendClientMessage(playerid, COLOR_GREY, "You have no active report which you can close."); } if(ReportInfo[reportid][rReporter] == playerid) { SendClientMessageEx(ReportInfo[reportid][rHandledBy], COLOR_YELLOW, "** Player %s has closed the report. **", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_GREEN, "You have closed the report and ended your conversation with the admin."); } else { SendClientMessageEx(ReportInfo[reportid][rReporter], COLOR_YELLOW, "** Administrator %s has closed the report. **", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_GREEN, "You have closed the report and ended your conversation with the reporter."); } if(ReportInfo[reportid][rReporter] != INVALID_PLAYER_ID) { PlayerInfo[ReportInfo[reportid][rReporter]][pActiveReport] = -1; } if(ReportInfo[reportid][rHandledBy] != INVALID_PLAYER_ID) { PlayerInfo[ReportInfo[reportid][rHandledBy]][pActiveReport] = -1; } ReportInfo[reportid][rExists] = 0; ReportInfo[reportid][rAccepted] = 0; ReportInfo[reportid][rReporter] = INVALID_PLAYER_ID; ReportInfo[reportid][rHandledBy] = INVALID_PLAYER_ID; PlayerInfo[playerid][pActiveReport] = -1; return 1; } CMD:skick(playerid, params[]) { new targetid, reason[128]; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[128]", targetid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /skick [playerid] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be kicked."); } Log_Write("log_punishments", "%s (uid: %i) silently kicked %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], reason); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has silently kicked %s, reason: %s", GetPlayerRPName(playerid), GetPlayerRPName(targetid), reason); KickPlayer(targetid); return 1; } CMD:sban(playerid, params[]) { new targetid, reason[128]; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[128]", targetid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sban [playerid] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be banned."); } Log_Write("log_punishments", "%s (uid: %i) silently banned %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], reason); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was silently banned by %s, reason: %s", GetPlayerRPName(targetid), GetPlayerRPName(playerid), reason); BanPlayer(targetid, "Secret Admin", reason, true); return 1; } CMD:sjail(playerid, params[]) { new targetid, minutes, reason[128]; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "uis[128]", targetid, minutes, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sjail [playerid] [minutes] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be jailed."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(minutes < 0) { return SendClientMessage(playerid, COLOR_GREY, "The amount of minutes specified cannot be below zero."); } PlayerInfo[targetid][pJailType] = 1; PlayerInfo[targetid][pJailTime] = minutes * 60; ResetPlayerWeaponsEx(targetid); ResetPlayer(targetid); SetPlayerInJail(targetid); Log_Write("log_punishments", "%s (uid: %i) silently jailed %s (uid: %i) for %i minutes, reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], minutes, reason); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was jailed for %i minutes by an Admin, reason: %s", GetPlayerRPName(targetid), minutes, reason); SendClientMessageEx(targetid, COLOR_AQUA, "** You have been jailed for %i minutes by an admin.", minutes); return 1; } CMD:pinfo(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /pinfo [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } SendClientMessageEx(playerid, COLOR_GREY1, "(ID: %i) - (Name: %s) - (Ping: %i) - (FPS: %i) - (Packet Loss: %.1f%c)", targetid, GetPlayerRPName(targetid), GetPlayerPing(targetid), PlayerInfo[targetid][pFPS], NetStats_PacketLossPercent(targetid), '%'); return 1; } CMD:admins(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } SendClientMessage(playerid, COLOR_GREEN, "|________ Admins Online ________|"); foreach(new i : Player) { if(PlayerInfo[i][pAdmin] > 0) { if(!strcmp(PlayerInfo[i][pAdminName], "None", true)) SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s %s - Status: %s{C8C8C8} - Tabbed: %s", i, GetAdminRank(i), PlayerInfo[i][pUsername], (PlayerInfo[i][pAdminDuty]) ? ("{00AA00}On Duty") : ("Off Duty"), (PlayerInfo[i][pAFK]) ? ("Yes") : ("No")); else SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s %s (%s) - Status: %s{C8C8C8} - Tabbed: %s", i, GetAdminRank(i), PlayerInfo[i][pUsername], PlayerInfo[i][pAdminName], (PlayerInfo[i][pAdminDuty]) ? ("{00AA00}On Duty") : ("Off Duty"), (PlayerInfo[i][pAFK]) ? ("Yes") : ("No")); } } return 1; } CMD:helpers(playerid, params[]) { SendClientMessage(playerid, COLOR_GREEN, "|________ Helpers Online ________|"); foreach(new i : Player) { if(PlayerInfo[i][pHelper] > 0) { SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s %s", i, GetHelperRank(i), GetPlayerRPName(i)); } } return 1; } CMD:flag(playerid, params[]) { new targetid, desc[128]; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[128]", targetid, desc)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /flag [playerid] [description]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO flags VALUES(null, %i, '%s', NOW(), '%e')", PlayerInfo[targetid][pID], GetPlayerNameEx(playerid), desc); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s flagged %s's account for '%s'.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), desc); return 1; } CMD:oflag(playerid, params[]) { new name[24], desc[128]; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]s[128]", name, desc)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /oflag [username] [description]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM users WHERE username = '%e'", name); mysql_tquery(connectionID, queryBuffer, "OnAdminOfflineFlag", "iss", playerid, name, desc); return 1; } CMD:listflagged(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } mysql_tquery(connectionID, "SELECT b.username FROM flags a, users b WHERE a.uid = b.uid ORDER BY b.username", "OnQueryFinished", "ii", THREAD_LIST_FLAGGED, playerid); return 1; } CMD:ocheck(playerid, params[]) { new name[24]; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]", name)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /ocheck [username]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM users WHERE username = '%e'", name); mysql_tquery(connectionID, queryBuffer, "OnAdminOfflineCheck", "is", playerid, name); return 1; } CMD:removeflag(playerid, params[]) { new targetid, slot; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "ui", targetid, slot)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removeflag [playerid] [slot]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(slot < 1) { return SendClientMessage(playerid, COLOR_GREY, "Invalid slot specified."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id FROM flags WHERE uid = %i ORDER BY id LIMIT %i, 1", PlayerInfo[targetid][pID], slot-1); mysql_tquery(connectionID, queryBuffer, "OnVerifyRemoveFlag", "iii", playerid, targetid, slot); return 1; } CMD:listflags(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /listflags [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM flags WHERE uid = %i ORDER BY date DESC", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer, "OnListPlayerFlags", "ii", playerid, targetid); return 1; } CMD:spec(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!strcmp(params, "off", true) && GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) { SendClientMessageEx(playerid, COLOR_ORANGE, "You are no longer spectating %s (ID %i).", GetPlayerRPName(PlayerInfo[playerid][pSpectating]), PlayerInfo[playerid][pSpectating]); PlayerInfo[playerid][pSpectating] = INVALID_PLAYER_ID; SetPlayerToSpawn(playerid); return 1; } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /spec [playerid/off]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't spectate yourself."); } if(!IsPlayerSpawned(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is either not spawned, or spectating."); } SavePlayerVariables(playerid); TogglePlayerSpectating(playerid, 1); SetPlayerInterior(playerid, GetPlayerInterior(targetid)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid)); if(IsPlayerInAnyVehicle(targetid)) { PlayerSpectateVehicle(playerid, GetPlayerVehicleID(targetid)); } else { PlayerSpectatePlayer(playerid, targetid); } PlayerInfo[playerid][pSpectating] = targetid; SendClientMessageEx(playerid, COLOR_ORANGE, "You are now spectating %s (ID %i).", GetPlayerRPName(PlayerInfo[playerid][pSpectating]), PlayerInfo[playerid][pSpectating]); return 1; } CMD:kick(playerid, params[]) { new targetid, reason[128]; if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pHelper] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[128]", targetid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /kick [playerid] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be kicked."); } Log_Write("log_punishments", "%s (uid: %i) kicked %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], reason); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was kicked by %s, reason: %s", GetPlayerRPName(targetid), GetPlayerRPName(playerid), reason); KickPlayer(targetid); return 1; } CMD:ban(playerid, params[]) { new targetid, reason[128]; if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pHelper] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[128]", targetid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /ban [playerid] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be banned."); } Log_Write("log_punishments", "%s (uid: %i) banned %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], reason); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was banned by %s, reason: %s", GetPlayerRPName(targetid), GetPlayerRPName(playerid), reason); BanPlayer(targetid, GetPlayerNameEx(playerid), reason); return 1; } CMD:warn(playerid, params[]) { new targetid, reason[128]; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[128]", targetid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /warn [playerid] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be warned."); } PlayerInfo[targetid][pWarnings]++; Log_Write("log_punishments", "%s (uid: %i) warned %s (uid: %i), reason: %s (%i/3)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], reason, PlayerInfo[targetid][pWarnings]); if(PlayerInfo[targetid][pWarnings] < 3) { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was warned by %s, reason: %s", GetPlayerRPName(targetid), GetPlayerRPName(playerid), reason); SendClientMessageEx(targetid, COLOR_YELLOW, "** %s issued a warning to your account, reason: %s", GetPlayerRPName(playerid), reason); } else { PlayerInfo[targetid][pWarnings] = 0; SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was banned by %s, reason: %s (3/3 warnings)", GetPlayerRPName(targetid), GetPlayerRPName(playerid), reason); BanPlayer(targetid, GetPlayerNameEx(playerid), reason); } return 1; } CMD:check(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /check [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } DisplayStats(targetid, playerid); return 1; } CMD:checkinv(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /checkinv [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } DisplayInventory(targetid, playerid); return 1; } CMD:slap(playerid, params[]) { new targetid, Float:height; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "uF(5.0)", targetid, height)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /slap [playerid] [height (optional)]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!IsPlayerSpawned(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is not spawned and therefore cannot be slapped."); } new Float:x, Float:y, Float:z; GetPlayerPos(targetid, x, y, z); SetPlayerPos(targetid, x, y, z + height); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was slapped by %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); PlayerPlaySound(targetid, 1130, 0.0, 0.0, 0.0); return 1; } CMD:upgrade(playerid, params[]) { if(PlayerInfo[playerid][pUpgradePoints] < 1) { return SendClientMessage(playerid, COLOR_GREY3, "You have no upgrade points available which you can spend."); } if(!strcmp(params, "inventory", true)) { if(PlayerInfo[playerid][pInventoryUpgrade] >= 5) { return SendClientMessage(playerid, COLOR_GREY, "Your inventory skill is already upgraded to its maximum level of 5."); } PlayerInfo[playerid][pInventoryUpgrade]++; PlayerInfo[playerid][pUpgradePoints]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET inventoryupgrade = %i, upgradepoints = %i WHERE uid = %i", PlayerInfo[playerid][pInventoryUpgrade], PlayerInfo[playerid][pUpgradePoints], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_GREEN, "You upgraded your inventory skill to %i/5. Your inventory capacity was increased.", PlayerInfo[playerid][pInventoryUpgrade]); } else if(!strcmp(params, "addict", true)) { if(PlayerInfo[playerid][pAddictUpgrade] >= 3) { return SendClientMessage(playerid, COLOR_GREY, "Your addict skill is already upgraded to its maximum level of 3."); } PlayerInfo[playerid][pAddictUpgrade]++; PlayerInfo[playerid][pUpgradePoints]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET addictupgrade = %i, upgradepoints = %i WHERE uid = %i", PlayerInfo[playerid][pAddictUpgrade], PlayerInfo[playerid][pUpgradePoints], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_GREEN, "You upgraded your addict skill to level %i/3. You now gain %.1f more health & armor when using drugs.", PlayerInfo[playerid][pAddictUpgrade], PlayerInfo[playerid][pAddictUpgrade] * 5.0); } else if(!strcmp(params, "trader", true)) { if(PlayerInfo[playerid][pTraderUpgrade] >= 3) { return SendClientMessage(playerid, COLOR_GREY, "Your trader skill is already upgraded to its maximum level of 3."); } PlayerInfo[playerid][pTraderUpgrade]++; PlayerInfo[playerid][pUpgradePoints]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET traderupgrade = %i, upgradepoints = %i WHERE uid = %i", PlayerInfo[playerid][pTraderUpgrade], PlayerInfo[playerid][pUpgradePoints], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_GREEN, "You upgraded your trader skill to level %i/3. You now pay %i percent less for items in shops.", PlayerInfo[playerid][pTraderUpgrade], PlayerInfo[playerid][pTraderUpgrade] * 5); } else if(!strcmp(params, "asset", true)) { if(PlayerInfo[playerid][pAssetUpgrade] >= 4) { return SendClientMessage(playerid, COLOR_GREY, "Your asset skill is already upgraded to its maximum level of 4."); } PlayerInfo[playerid][pAssetUpgrade]++; PlayerInfo[playerid][pUpgradePoints]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET assetupgrade = %i, upgradepoints = %i WHERE uid = %i", PlayerInfo[playerid][pAssetUpgrade], PlayerInfo[playerid][pUpgradePoints], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_GREEN, "You upgraded your asset skill to level %i/4. You can now own %i/%i houses and garages and %i/%i businesses and vehicles.", PlayerInfo[playerid][pAssetUpgrade], GetPlayerAssetLimit(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_GARAGES), GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES), GetPlayerAssetLimit(playerid, LIMIT_VEHICLES)); } else if(!strcmp(params, "spawnhealth", true)) { if(PlayerInfo[playerid][pSpawnHealth] >= 100) { return SendClientMessage(playerid, COLOR_GREY, "Your spawn health is at maximum (100)."); } PlayerInfo[playerid][pSpawnHealth] += 5.0; PlayerInfo[playerid][pUpgradePoints]--; SendClientMessageEx(playerid, COLOR_GREEN, "You have upgraded your spawn health. You will now spawn with %.1f health after death.", PlayerInfo[playerid][pSpawnHealth]); } else if(!strcmp(params, "spawnarmor", true)) { if(PlayerInfo[playerid][pSpawnArmor] > 100 && PlayerInfo[playerid][pVIPPackage] == 0) { return SendClientMessage(playerid, COLOR_GREY, "Your spawn armor is at maximum (100)."); } else if(PlayerInfo[playerid][pSpawnArmor] > 125 && PlayerInfo[playerid][pVIPPackage] <= 2) { return SendClientMessage(playerid, COLOR_GREY, "Your spawn armor is at maximum (125)."); } else if(PlayerInfo[playerid][pSpawnArmor] > 150 && PlayerInfo[playerid][pVIPPackage] == 3) { return SendClientMessage(playerid, COLOR_GREY, "Your spawn armor is at maximum (150)."); } PlayerInfo[playerid][pSpawnArmor] += 2.0; PlayerInfo[playerid][pUpgradePoints]--; SendClientMessageEx(playerid, COLOR_GREEN, "You have upgraded your spawn armor. You will now spawn with %.1f armor after death.", PlayerInfo[playerid][pSpawnArmor]); } else { SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /upgrade [option] (%i points available)", PlayerInfo[playerid][pUpgradePoints]); SendClientMessage(playerid, COLOR_GREY3, "List of options: Inventory, Addict, Trader, Asset, SpawnHealth, SpawnArmor"); } return 1; } CMD:charity(playerid, params[]) { new option[10], param[64]; if(PlayerInfo[playerid][pLevel] < 5) { return SendClientMessage(playerid, COLOR_GREY3, "You cannot donate to charity if you're under level 5. /buylevel to level up."); } if(sscanf(params, "s[10]S()[64]", option, param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /charity [info | health | armor | song]"); } if(!strcmp(option, "info", true)) { SendClientMessage(playerid, COLOR_GREEN, "|______ Charity ______|"); SendClientMessage(playerid, COLOR_GREY3, "If you have at least $1,000 on hand you can donate to charity."); SendClientMessage(playerid, COLOR_GREY3, "You can donate to give health or armor for the entire server using '{FFD700}/charity health/armor{AAAAAA}'."); SendClientMessage(playerid, COLOR_GREY3, "You can also donate to globally play a song of your choice using '{FFD700}/charity song{AAAAAA}'."); SendClientMessage(playerid, COLOR_GREY3, "You can also donate your money the traditional way using '{FFD700}/charity [amount]{AAAAAA}'."); SendClientMessage(playerid, COLOR_GREY3, "Once the charity bank hits a milestone, some of it will be given back to the community!"); SendClientMessageEx(playerid, COLOR_AQUA, "** $%i has been donated to charity so far.", gCharity); return 1; } else if(!strcmp(option, "health", true)) { if(PlayerInfo[playerid][pCash] < 150000) { return SendClientMessage(playerid, COLOR_GREY3, "You need at least $150,000 on hand for this option."); } if(gCharityHealth) { return SendClientMessage(playerid, COLOR_GREY, "Players can only donate for this perk each hour. Try again after payday."); } foreach(new i : Player) { if(!PlayerInfo[i][pAdminDuty]) { SetPlayerHealth(i, 150.0); } } gCharity += 150000; gCharityHealth = 1; AddToTaxVault(150000); SendClientMessageToAllEx(COLOR_ROYALBLUE, "Charity: %s has generously donated $150,000 to heal everyone to 150 health!", GetPlayerRPName(playerid)); GivePlayerCash(playerid, -150000); } else if(!strcmp(option, "armor", true)) { if(PlayerInfo[playerid][pCash] < 200000) { return SendClientMessage(playerid, COLOR_GREY3, "You need at least $200,000 on hand for this option."); } if(gCharityArmor) { return SendClientMessage(playerid, COLOR_GREY, "Players can only donate for this perk each hour. Try again after payday."); } foreach(new i : Player) { if(!PlayerInfo[i][pAdminDuty]) { SetScriptArmour(i, 100.0); } } gCharity += 200000; gCharityArmor = 1; AddToTaxVault(200000); SendClientMessageToAllEx(COLOR_ROYALBLUE, "Charity: %s has generously donated $200,000 to give full armor to everyone!", GetPlayerRPName(playerid)); GivePlayerCash(playerid, -10000); } else if(!strcmp(option, "song", true)) { if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /charity [song] [songfolder/name.mp3]"); } if(PlayerInfo[playerid][pCash] < 25000) { return SendClientMessage(playerid, COLOR_GREY3, "You need at least $25,000 on hand for this option."); } new url[144]; format(url, sizeof(url), "http://%s/%s", SERVER_MUSIC_URL, param); foreach(new i : Player) { PlayAudioStreamForPlayer(i, url); } gCharity += 25000; AddToTaxVault(25000); SendClientMessageToAllEx(COLOR_ROYALBLUE, "Charity: %s has generously donated $25,000 to play %s for the entire server!", GetPlayerRPName(playerid), param); GivePlayerCash(playerid, -25000); } else if(IsNumeric(option)) { new amount = strval(option); if(amount < 1 || amount > PlayerInfo[playerid][pCash]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } gCharity += amount; AddToTaxVault(amount); GivePlayerCash(playerid, -amount); SendClientMessageEx(playerid, COLOR_ROYALBLUE, "Charity: Thank you for your generous donation of $%i.", amount); } return 1; } CMD:music(playerid, params[]) { SendClientMessage(playerid, COLOR_GREEN, "|____________________ List of Music ____________________|"); HTTP(playerid, HTTP_GET, SERVER_FETCH_URL, "", "HTTP_OnMusicFetchResponse"); return 1; } CMD:stopmusic(playerid, params[]) { SendClientMessage(playerid, COLOR_YELLOW, "You have stopped all active audio streams playing for yourself."); PlayerInfo[playerid][pStreamType] = MUSIC_NONE; StopAudioStreamForPlayer(playerid); return 1; } CMD:gplay(playerid, params[]) { new url[144]; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gplay [songfolder/name.mp3]"); } format(url, sizeof(url), "http://%s/%s", SERVER_MUSIC_URL, params); foreach(new i : Player) { if(!PlayerInfo[i][pToggleMusic]) { PlayAudioStreamForPlayer(i, url); SendClientMessageEx(i, COLOR_LIGHTRED, "AdmCmd: %s has started the global playback of %s.", GetPlayerRPName(playerid), params); SendClientMessageEx(i, COLOR_YELLOW, "Use /stopmusic to stop playback and '/toggle streams' to disable global playback."); } } return 1; } CMD:gplayurl(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gplayurl [link]"); } foreach(new i : Player) { if(!PlayerInfo[i][pToggleMusic]) { PlayAudioStreamForPlayer(i, params); SendClientMessageEx(i, COLOR_LIGHTRED, "AdmCmd: %s has started the global playback of a custom URL.", GetPlayerRPName(playerid)); SendClientMessageEx(i, COLOR_YELLOW, "Use /stopmusic to stop playback and '/toggle streams' to disable global playback."); } } return 1; } CMD:gstop(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } foreach(new i: Player) { if(!PlayerInfo[i][pToggleMusic]) { StopAudioStreamForPlayer(i); SendClientMessageEx(i, COLOR_LIGHTRED, "AdmCmd: %s has stopped all active audio streams.", GetPlayerRPName(playerid)); } } return 1; } CMD:dm(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /dm [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be punished."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet. You can wait until they login or use /oprison."); } PlayerInfo[targetid][pDMWarnings]++; if(PlayerInfo[targetid][pDMWarnings] < 5) { new minutes = PlayerInfo[targetid][pDMWarnings] * 60; PlayerInfo[targetid][pJailType] = 2; PlayerInfo[targetid][pJailTime] = PlayerInfo[targetid][pDMWarnings] * 3600; PlayerInfo[targetid][pWeaponRestricted] = PlayerInfo[targetid][pDMWarnings] * 4; ResetPlayer(targetid); ResetPlayerWeapons(targetid); SetPlayerInJail(targetid); if(PlayerInfo[playerid][pAdmin] == 1) { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was DM Warned & Prisoned for %i minutes by an Admin, reason: DM (%i/5)", GetPlayerRPName(targetid), minutes, PlayerInfo[targetid][pDMWarnings]); strcpy(PlayerInfo[targetid][pPrisonedBy], "Secret Admin", MAX_PLAYER_NAME); } else { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was DM Warned & Prisoned for %i minutes by %s, reason: DM (%i/5)", GetPlayerRPName(targetid), minutes, GetPlayerRPName(playerid), PlayerInfo[targetid][pDMWarnings]); GetPlayerName(playerid, PlayerInfo[targetid][pPrisonedBy], MAX_PLAYER_NAME); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET prisonedby = '%e', prisonreason = 'DM' WHERE uid = %i", PlayerInfo[targetid][pPrisonedBy], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); strcpy(PlayerInfo[targetid][pPrisonReason], "DM", 128); GameTextForPlayer(targetid, "~w~Welcome to~n~~r~admin jail", 5000, 3); SendClientMessageEx(targetid, COLOR_WHITE, "** You have been admin prisoned for %i minutes, reason: DM.", minutes); SendClientMessageEx(targetid, COLOR_WHITE, "** Your punishment is %i hours of weapon restriction and %i/5 DM warning.", PlayerInfo[targetid][pWeaponRestricted], PlayerInfo[targetid][pDMWarnings]); Log_Write("log_punishments", "%s (uid: %i) prisoned %s (uid: %i) for %i minutes, reason: DM [/dm]", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], minutes); } else { Log_Write("log_punishments", "%s (uid: %i) banned %s (uid: %i), reason: DM (5/5 warnings)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); if(PlayerInfo[playerid][pAdmin] == 1) { BanPlayer(targetid, "Secret Admin", "DM (5/5 warnings)"); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was banned by an Admin, reason: DM (5/5 warnings)", GetPlayerRPName(targetid)); } else { BanPlayer(targetid, GetPlayerNameEx(playerid), "DM (5/5 warnings)"); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was banned by %s, reason: DM (5/5 warnings)", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); } } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET jailtype = %i, jailtime = %i, dmwarnings = %i, weaponrestricted = %i WHERE uid = %i", PlayerInfo[targetid][pJailType], PlayerInfo[targetid][pJailTime], PlayerInfo[targetid][pDMWarnings], PlayerInfo[targetid][pWeaponRestricted], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); return 1; } CMD:aduty(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty]) { SetPlayerSpecialTag(playerid, TAG_ADMIN); SavePlayerVariables(playerid); ResetPlayerWeapons(playerid); SetPlayerHealth(playerid, 32767); SetScriptArmour(playerid, 0.0); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s is now on admin duty.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_WHITE, "** You are now on admin duty. Your stats will not be saved until you're off duty."); PlayerInfo[playerid][pAdminDuty] = 1; if(strcmp(PlayerInfo[playerid][pAdminName], "None", true) != 0) { SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]); } } else { //TogglePlayerSpectating(playerid, 1); SetPlayerSpecialTag(playerid, TAG_NONE); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM users WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_PROCESS_LOGIN, playerid); } return 1; } CMD:adminname(playerid, params[]) { new name[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]", name)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /adminname [name ('none' to reset)]"); } if(!IsValidName(name)) { return SendClientMessage(playerid, COLOR_GREY, "The name specified is not supported by the SA-MP client."); } strcpy(PlayerInfo[playerid][pAdminName], name, MAX_PLAYER_NAME); if(PlayerInfo[playerid][pAdminDuty]) { SetPlayerName(playerid, name); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET adminname = '%e' WHERE uid = %i", name, PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s changed their administrator name to %s.", PlayerInfo[playerid][pUsername], name); return 1; } CMD:getip(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /getip [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } SendClientMessageEx(playerid, COLOR_WHITE, "** %s[%i]'s IP: %s **", GetPlayerRPName(targetid), targetid, GetPlayerIP(targetid)); return 1; } CMD:ogetip(playerid, params[]) { new name[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]", name)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /ogetip [username]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, ip FROM users WHERE username = '%e'", name); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_OFFLINE_IP, playerid); return 1; } CMD:iplookup(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!IsAnIP(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /iplookup [ip address]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, lastlogin FROM users WHERE ip = '%s' ORDER BY lastlogin DESC", params); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_TRACE_IP, playerid); return 1; } CMD:lastactive(playerid, params[]) { new username[24], specifiers[] = "%D of %M, %Y @ %k:%i"; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]", username)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /lastactive [username]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT DATE_FORMAT(lastlogin, '%s') FROM users WHERE username = '%e'", specifiers, username); mysql_tquery(connectionID, queryBuffer, "OnAdminCheckLastActive", "is", playerid, username); return 1; } CMD:listjailed(playerid, params[]) { new type[14]; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } SendClientMessage(playerid, COLOR_GREEN, "|_____ Jailed Players _____|"); foreach(new i : Player) { if(PlayerInfo[i][pJailType] > 0) { switch(PlayerInfo[i][pJailType]) { case 1: type = "OOC jailed"; case 2: type = "OOC prisoned"; case 3: type = "IC prisoned"; } SendClientMessageEx(playerid, COLOR_GREY1, "(ID: %i) %s - Status: %s - Time: %i seconds", i, GetPlayerRPName(i), type, PlayerInfo[i][pJailTime]); } } return 1; } CMD:prisoninfo(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /prisoninfo [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pJailType] != 2) { return SendClientMessage(playerid, COLOR_GREY, "That player is not in OOC prison."); } SendClientMessageEx(playerid, COLOR_WHITE, "** %s was prisoned by %s, reason: %s (%i seconds left.) **", GetPlayerRPName(targetid), PlayerInfo[targetid][pPrisonedBy], PlayerInfo[targetid][pPrisonReason], PlayerInfo[targetid][pJailTime]); return 1; } CMD:relog(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /relog [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has forced %s to relog.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); SavePlayerVariables(targetid); ResetPlayer(targetid); PlayerInfo[targetid][pLogged] = 0; CallLocalFunction("OnPlayerRequestClass", "ii", playerid, 0); return 1; } CMD:setint(playerid, params[]) { new targetid, interiorid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "ui", targetid, interiorid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setint [playerid] [int]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!(0 <= interiorid <= 19)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid interior. Valid interiors range from 0 to 19."); } SetPlayerInterior(targetid, interiorid); SendClientMessageEx(playerid, COLOR_GREY2, "%s's interior set to ID %i.", GetPlayerRPName(targetid), interiorid); return 1; } CMD:setvw(playerid, params[]) { new targetid, worldid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "ui", targetid, worldid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setvw [playerid] [vw]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } SetPlayerVirtualWorld(targetid, worldid); SendClientMessageEx(playerid, COLOR_GREY2, "%s's virtual world set to ID %i.", GetPlayerRPName(targetid), worldid); return 1; } CMD:setskin(playerid, params[]) { new targetid, skinid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "ui", targetid, skinid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setskin [playerid] [skinid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!(0 <= skinid <= 311)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid skin specified."); } if(!IsPlayerSpawned(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is either not spawned, or spectating."); } PlayerInfo[targetid][pSkin] = skinid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET skin = %i WHERE uid = %i", skinid, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SetPlayerSkin(targetid, skinid); SendClientMessageEx(playerid, COLOR_GREY2, "%s's skin set to ID %i.", GetPlayerRPName(targetid), skinid); return 1; } CMD:revive(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /revive [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is not injured."); } PlayerInfo[targetid][pInjured] = 0; SetPlayerHealth(targetid, 100.0); ClearAnimations(targetid, 1); SendClientMessage(targetid, COLOR_YELLOW, "You have been revived by an admin!"); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has revived %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); return 1; } CMD:heject(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /heject [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pHospital]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is not in hospital."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s ejected %s from the hospital.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); PlayerInfo[targetid][pHospitalTime] = 1; SendClientMessage(targetid, COLOR_YELLOW, "You have been ejected from hospital by an admin!"); return 1; } CMD:goto(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "u", targetid)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /goto [playerid/location]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: LS, SF, LV, Grove, Idlewood, Unity, Jefferson, Market, Airport, Bank"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Dealership, VIP, Paintball, DMV, Casino"); return 1; } if(!strcmp(params, "ls", true)) { TeleportToCoords(playerid, 1544.4407, -1675.5522, 13.5584, 90.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to Los Santos."); } else if(!strcmp(params, "sf", true)) { TeleportToCoords(playerid, -1421.5629, -288.9972, 14.1484, 135.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to San Fierro."); } else if(!strcmp(params, "lv", true)) { TeleportToCoords(playerid, 1670.6908, 1423.5240, 10.7811, 270.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to Las Venturas."); } else if(!strcmp(params, "grove", true)) { TeleportToCoords(playerid, 2497.8274, -1668.9033, 13.3438, 90.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to Grove Street."); } else if(!strcmp(params, "idlewood", true)) { TeleportToCoords(playerid, 2090.0664, -1816.9071, 13.3904, 90.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to Idlewood."); } else if(!strcmp(params, "unity", true)) { TeleportToCoords(playerid, 1782.2683, -1865.5726, 13.5725, 0.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to Unity Station."); } else if(!strcmp(params, "jefferson", true)) { TeleportToCoords(playerid, 2222.3438, -1164.5013, 25.7331, 0.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to Jefferson Motel."); } else if(!strcmp(params, "market", true)) { TeleportToCoords(playerid, 818.1782, -1349.2217, 13.5260, 0.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to Market."); } else if(!strcmp(params, "airport", true)) { TeleportToCoords(playerid, 1938.7185, -2370.6375, 13.5469, 0.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to LS airport."); } else if(!strcmp(params, "bank", true)) { TeleportToCoords(playerid, 1463.8929, -1026.6189, 23.8281, 180.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to Mulholland bank."); } else if(!strcmp(params, "dealership", true)) { TeleportToCoords(playerid, 546.7000, -1281.5160, 17.2482, 180.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to Grotti dealership."); } else if(!strcmp(params, "vip", true)) { TeleportToCoords(playerid, 1024.2438, -1553.4551, 13.5691, 90.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to VIP lounge."); } else if(!strcmp(params, "paintball", true)) { TeleportToCoords(playerid, 1738.7400, -1269.8062, 13.5433, 315.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to Paintball."); } else if(!strcmp(params, "dmv", true)) { TeleportToCoords(playerid, 1224.1537, -1824.5253, 13.5900, 180.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to DMV."); } else if(!strcmp(params, "casino", true)) { TeleportToCoords(playerid, 1022.5992, -1122.8069, 23.8710, 180.0000, 0, 0); SendClientMessage(playerid, COLOR_GREY2, "Teleported to Casino."); } else { if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!IsPlayerSpawned(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is either not spawned, or spectating."); } TeleportToPlayer(playerid, targetid); SendClientMessageEx(playerid, COLOR_GREY2, "Teleported to %s's position.", GetPlayerRPName(targetid)); } return 1; } CMD:gethere(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gethere [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!IsPlayerSpawned(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is either not spawned, or spectating."); } if(PlayerInfo[targetid][pPaintball]) { return SendClientMessage(playerid, COLOR_GREY, "That player is currently in the paintball arena."); } TeleportToPlayer(targetid, playerid); SendClientMessageEx(playerid, COLOR_GREY2, "Teleported %s to your position.", GetPlayerRPName(targetid)); return 1; } CMD:gotocar(playerid, params[]) { new vehicleid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "i", vehicleid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gotocar [vehicleid]"); } if(!IsValidVehicle(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle specified."); } TeleportToVehicle(playerid, vehicleid); SendClientMessageEx(playerid, COLOR_GREY2, "Teleported to vehicle ID %i.", vehicleid); return 1; } CMD:getcar(playerid, params[]) { new vehicleid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "i", vehicleid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /getcar [vehicleid]"); } if(!IsValidVehicle(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle specified."); } new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetVehiclePos(vehicleid, x + 1, y + 1, z + 2.0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); SendClientMessageEx(playerid, COLOR_GREY2, "Teleported vehicle ID %i to your position.", vehicleid); return 1; } CMD:gotocoords(playerid, params[]) { new Float:x, Float:y, Float:z, interiorid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "fffI(0)", x, y, z, interiorid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gotocoords [x] [y] [z] [int (optional)]"); } SetPlayerPos(playerid, x, y, z); SetPlayerInterior(playerid, interiorid); return 1; } CMD:gotoint(playerid, params[]) { static list[4096]; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(isnull(list)) { for(new i = 0; i < sizeof(interiorArray); i ++) { format(list, sizeof(list), "%s\n%s", list, interiorArray[i][intName]); } } ShowPlayerDialog(playerid, DIALOG_INTERIORS, DIALOG_STYLE_LIST, "Choose an interior to teleport to.", list, "Select", "Cancel"); return 1; } CMD:jetpack(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } PlayerInfo[playerid][pJetpack] = 1; SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK); GameTextForPlayer(playerid, "~g~Jetpack", 3000, 3); switch(random(4)) { case 0: SendClientMessage(playerid, COLOR_WHITE, "** Random Fact: The jetpack is part of an experiment conducted at the Area 69 facility."); case 1: SendClientMessage(playerid, COLOR_WHITE, "** Random Fact: You stole this from Area 69 in that one single player mission. Remember?"); case 2: SendClientMessage(playerid, COLOR_WHITE, "** Random Fact: You probably don't need this anyway. All you admins seem to do is airbreak around the map."); case 3: SendClientMessage(playerid, COLOR_WHITE, "** Random Fact: You probably aren't reading this anyway. Fuck you."); } return 1; } CMD:sendto(playerid, params[]) { new targetid, option[12], param[32]; if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pHelper] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[12]S()[32]", targetid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sendto [playerid] [location]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Player, Vehicle, LS, SF, LV, Grove, Idlewood, Unity, Jefferson, Market, Bank"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Dealership, VIP, Paintball, DMV, Casino"); return 1; } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!IsPlayerSpawned(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is either not spawned, or spectating."); } if(PlayerInfo[targetid][pJailType]) { return SendClientMessage(playerid, COLOR_GREY, "This player is in jail so you can't teleport them."); } if(PlayerInfo[targetid][pPaintball]) { return SendClientMessage(playerid, COLOR_GREY, "That player is currently in the paintball arena."); } if(PlayerInfo[playerid][pAdmin] < 2 && isnull(PlayerInfo[targetid][pHelpRequest]) && PlayerInfo[playerid][pAcceptedHelp] == 0) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't submitted a help request. Therefore you can't teleport them."); } if(!strcmp(option, "ls", true)) { TeleportToCoords(targetid, 1544.4407, -1675.5522, 13.5584, 90.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Los Santos.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Los Santos.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "sf", true)) { TeleportToCoords(targetid, -1421.5629, -288.9972, 14.1484, 135.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to San Fierro.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to San Fierro.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "lv", true)) { TeleportToCoords(targetid, 1670.6908, 1423.5240, 10.7811, 270.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Las Venturas.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Las Venturas.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "grove", true)) { TeleportToCoords(targetid, 2497.8274, -1668.9033, 13.3438, 90.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Grove Street.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Grove Street.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "idlewood", true)) { TeleportToCoords(targetid, 2090.0664, -1816.9071, 13.3904, 90.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Idlewood.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Idlewood.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "unity", true)) { TeleportToCoords(targetid, 1782.2683, -1865.5726, 13.5725, 0.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Unity Station.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Unity Station.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "jefferson", true)) { TeleportToCoords(targetid, 2222.3438, -1164.5013, 25.7331, 0.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Jefferson Motel.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Jefferson Motel.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "market", true)) { TeleportToCoords(targetid, 818.1782, -1349.2217, 13.5260, 0.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Market.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Market.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "bank", true)) { TeleportToCoords(targetid, 1463.8929, -1026.6189, 23.8281, 180.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to the Bank.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to the Bank.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "dealership", true)) { TeleportToCoords(targetid, 546.7000, -1281.5160, 17.2482, 180.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Grotti car dealership.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Grotti car dealership.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "vip", true)) { TeleportToCoords(targetid, 1024.2438, -1553.4551, 13.5691, 90.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to the VIP lounge.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to the VIP lounge.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "paintball", true)) { TeleportToCoords(targetid, 1738.7400, -1269.8062, 13.5433, 315.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Paintball.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Paintball.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "dmv", true)) { TeleportToCoords(targetid, 1224.1537, -1824.5253, 13.5900, 180.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to the DMV.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to the DMV.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "casino", true)) { TeleportToCoords(targetid, 1022.5992, -1122.8069, 23.8710, 180.0000, 0, 0); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to Casino.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to Casino.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "player", true)) { new sendtargetid; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "Only level 2+ admins can do this."); } if(sscanf(param, "u", sendtargetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sendto [playerid] [player] [targetid]"); } if(!IsPlayerConnected(sendtargetid)) { return SendClientMessage(playerid, COLOR_GREY, "The target specified is disconnected."); } if(!IsPlayerSpawned(sendtargetid)) { return SendClientMessage(playerid, COLOR_GREY, "The target specified is either not spawned, or spectating."); } TeleportToPlayer(targetid, sendtargetid); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to %s's location.", GetPlayerRPName(targetid), GetPlayerRPName(sendtargetid)); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to %s's location.", GetPlayerRPName(playerid), GetPlayerRPName(sendtargetid)); } else if(!strcmp(option, "vehicle", true)) { new vehicleid; if(PlayerInfo[playerid][pAdmin] < 1) { return SendClientMessage(playerid, COLOR_GREY, "Only level 2+ admins can do this."); } if(sscanf(param, "i", vehicleid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sendto [playerid] [vehicle] [vehicleid]"); } if(!IsValidVehicle(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle specified."); } TeleportToVehicle(targetid, vehicleid); SendClientMessageEx(playerid, COLOR_GREY2, "You have sent %s to vehicle ID %i.", GetPlayerRPName(targetid), vehicleid); SendClientMessageEx(targetid, COLOR_GREY2, "%s has sent you to vehicle ID %i.", GetPlayerRPName(playerid), vehicleid); } return 1; } CMD:listen(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(!PlayerInfo[playerid][pListen]) { PlayerInfo[playerid][pListen] = 1; SendClientMessage(playerid, COLOR_AQUA, "You are now listening to all IC & local OOC chats."); } else { PlayerInfo[playerid][pListen] = 0; SendClientMessage(playerid, COLOR_AQUA, "You are no longer listening to IC & local OOC chats."); } return 1; } CMD:jail(playerid, params[]) { new targetid, minutes, reason[128]; if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pHelper] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "uis[128]", targetid, minutes, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /jail [playerid] [minutes] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be jailed."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet. You can wait until they login or use /ojail."); } if(minutes < 1) { return SendClientMessage(playerid, COLOR_GREY, "The amount of minutes cannot be below one. /unjail to release a player."); } PlayerInfo[targetid][pJailType] = 1; PlayerInfo[targetid][pJailTime] = minutes * 60; ResetPlayerWeaponsEx(targetid); ResetPlayer(targetid); SetPlayerInJail(targetid); Log_Write("log_punishments", "%s (uid: %i) jailed %s (uid: %i) for %i minutes, reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], minutes, reason); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was jailed for %i minutes by %s, reason: %s", GetPlayerRPName(targetid), minutes, GetPlayerRPName(playerid), reason); SendClientMessageEx(targetid, COLOR_AQUA, "** You have been admin jailed for %i minutes by %s.", minutes, GetPlayerRPName(playerid)); return 1; } CMD:rwarn(playerid, params[]) { new targetid, reason[128]; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[128]", targetid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /rwarn [playerid] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pReportMuted]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is muted from reports."); } PlayerInfo[targetid][pReportWarns]++; SendClientMessageEx(targetid, COLOR_LIGHTRED, "** %s issued you a report warning, reason: %s (%i/3)", GetPlayerRPName(playerid), reason, PlayerInfo[targetid][pReportWarns]); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was given a report warning by %s, reason: %s", GetPlayerRPName(targetid), GetPlayerRPName(playerid), reason); if(PlayerInfo[targetid][pReportWarns] >= 3) { PlayerInfo[targetid][pReportMuted] = 12; SendClientMessage(targetid, COLOR_LIGHTRED, "** You have been muted from reports for 12 playing hours."); } return 1; } CMD:runmute(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /runmute [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pReportMuted]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is not muted from reports."); } PlayerInfo[targetid][pReportWarns] = 0; PlayerInfo[targetid][pReportMuted] = 0; SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was unmuted from reports by %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); SendClientMessageEx(targetid, COLOR_YELLOW, "** Your report mute has been lifted by %s. Your report warnings were reset.", GetPlayerRPName(playerid)); return 1; } CMD:nmute(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pHelper] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /nmute [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pNewbieMuted]) { PlayerInfo[targetid][pNewbieMuted] = 1; SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was muted from newbie chat by %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); SendClientMessageEx(targetid, COLOR_LIGHTRED, "** You have been muted from newbie chat by %s.", GetPlayerRPName(playerid)); } else { PlayerInfo[targetid][pNewbieMuted] = 0; SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was unmuted from newbie chat by %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); SendClientMessageEx(targetid, COLOR_YELLOW, "** You have been unmuted from newbie chat by %s.", GetPlayerRPName(playerid)); } return 1; } CMD:hmute(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pHelper] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /hmute [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pHelpMuted]) { PlayerInfo[targetid][pHelpMuted] = 1; SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was muted from help requests by %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); SendClientMessageEx(targetid, COLOR_LIGHTRED, "** You have been muted from help requests by %s.", GetPlayerRPName(playerid)); } else { PlayerInfo[targetid][pHelpMuted] = 0; SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was unmuted from help requests by %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); SendClientMessageEx(targetid, COLOR_YELLOW, "** You have been unmuted from help requests by %s.", GetPlayerRPName(playerid)); } return 1; } CMD:admute(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /admute [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pAdMuted]) { PlayerInfo[targetid][pAdMuted] = 1; SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was muted from advertisements by %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); SendClientMessageEx(targetid, COLOR_LIGHTRED, "** You have been muted from advertisements by %s.", GetPlayerRPName(playerid)); } else { PlayerInfo[targetid][pAdMuted] = 0; SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was unmuted from advertisements by %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); SendClientMessageEx(targetid, COLOR_YELLOW, "** You have been unmuted from advertisements by %s.", GetPlayerRPName(playerid)); } return 1; } CMD:gmute(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gmute [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pGlobalMuted]) { PlayerInfo[targetid][pGlobalMuted] = 1; SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was muted from global chat by %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); SendClientMessageEx(targetid, COLOR_LIGHTRED, "** You have been muted from global chat by %s.", GetPlayerRPName(playerid)); } else { PlayerInfo[targetid][pGlobalMuted] = 0; SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was unmuted from global chat by %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); SendClientMessageEx(targetid, COLOR_YELLOW, "** You have been unmuted from global chat by %s.", GetPlayerRPName(playerid)); } return 1; } CMD:rmute(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /rmute [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pReportMuted]) { PlayerInfo[targetid][pReportMuted] = 99999; SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was muted from submitting reports by %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); SendClientMessageEx(targetid, COLOR_LIGHTRED, "** You have been muted from submitting reports by %s.", GetPlayerRPName(playerid)); } else { PlayerInfo[targetid][pReportMuted] = 0; SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s was unmuted from submitting reports by %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); SendClientMessageEx(targetid, COLOR_YELLOW, "** You have been unmuted from submitting reports by %s.", GetPlayerRPName(playerid)); } return 1; } CMD:freeze(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /freeze [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } TogglePlayerControllable(targetid, 0); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was frozen by %s.", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid)); return 1; } CMD:unfreeze(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /unfreeze [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pTazedTime]) { ClearAnimations(targetid, 1); PlayerInfo[targetid][pTazedTime] = 0; } TogglePlayerControllable(targetid, 1); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s was unfrozen by %s.", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid)); return 1; } CMD:skiptut(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /skiptut [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pTutorial]) { return SendClientMessage(playerid, COLOR_GREY, "That player isn't currently watching the tutorial."); } SendClientMessageEx(targetid, COLOR_WHITE, "** %s has forced you out of the tutorial.", GetPlayerRPName(playerid)); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s forced %s out of the tutorial.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); KillTimer(PlayerInfo[targetid][pTutorialTimer]); TutorialTimer(targetid, 11); return 1; } CMD:listguns(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /listguns [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } SendClientMessageEx(playerid, COLOR_GREEN, "|______ %s's Weapons ______|", GetPlayerRPName(targetid)); for(new i = 0; i < 13; i ++) { new weapon, ammo; GetPlayerWeaponData(targetid, i, weapon, ammo); if(weapon) { if(PlayerInfo[targetid][pAmmoType] != AMMOTYPE_NORMAL && PlayerInfo[targetid][pAmmoWeapon] == weapon) { if(PlayerInfo[targetid][pAmmoType] == AMMOTYPE_HP) { SendClientMessageEx(playerid, COLOR_GREY2, "-> %s (%i ammo) (Hollow point ammo)", GetWeaponNameEx(weapon), PlayerInfo[targetid][pHPAmmo]); } else if(PlayerInfo[targetid][pAmmoType] == AMMOTYPE_POISON) { SendClientMessageEx(playerid, COLOR_GREY2, "-> %s (%i ammo) (Poison tip ammo)", GetWeaponNameEx(weapon), PlayerInfo[targetid][pPoisonAmmo]); } else if(PlayerInfo[targetid][pAmmoType] == AMMOTYPE_FMJ) { SendClientMessageEx(playerid, COLOR_GREY2, "-> %s (%i ammo) (FMJ ammo)", GetWeaponNameEx(weapon), PlayerInfo[targetid][pFMJAmmo]); } } else if(!PlayerHasWeapon(targetid, weapon)) { SendClientMessageEx(playerid, COLOR_GREY2, "-> %s {FFD700}(Desynced){C8C8C8}", GetWeaponNameEx(weapon)); } else { SendClientMessageEx(playerid, COLOR_GREY2, "-> %s", GetWeaponNameEx(weapon)); } } } return 1; } CMD:disarm(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /disarm [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } ResetPlayerWeaponsEx(targetid); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has disarmed %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); return 1; } CMD:nrn(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /nrn [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pLevel] > 3) { return SendClientMessage(playerid, COLOR_GREY, "That player is level 3 or above and doesn't need a free namechange."); } ShowPlayerDialog(targetid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel"); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has forced %s to change their name for being Non-RP.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); return 1; } CMD:prison(playerid, params[]) { new targetid, minutes, reason[128]; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "uis[128]", targetid, minutes, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /prison [playerid] [minutes] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be prisoned."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet. You can wait until they login or use /oprison."); } if(minutes < 1) { return SendClientMessage(playerid, COLOR_GREY, "The amount of minutes cannot be below one. /unjail to release a player."); } PlayerInfo[targetid][pJailType] = 2; PlayerInfo[targetid][pJailTime] = minutes * 60; ResetPlayerWeaponsEx(targetid); ResetPlayer(targetid); SetPlayerInJail(targetid); GameTextForPlayer(targetid, "~w~Welcome to~n~~r~admin jail", 5000, 3); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET prisonedby = '%e', prisonreason = '%e' WHERE uid = %i", GetPlayerNameEx(playerid), reason, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); GetPlayerName(playerid, PlayerInfo[targetid][pPrisonedBy], MAX_PLAYER_NAME); strcpy(PlayerInfo[targetid][pPrisonReason], reason, 128); Log_Write("log_punishments", "%s (uid: %i) prisoned %s (uid: %i) for %i minutes, reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], minutes, reason); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was prisoned for %i minutes by %s, reason: %s", GetPlayerRPName(targetid), minutes, GetPlayerRPName(playerid), reason); SendClientMessageEx(targetid, COLOR_AQUA, "** You have been admin prisoned for %i minutes by %s.", minutes, GetPlayerRPName(playerid)); return 1; } CMD:oprison(playerid, params[]) { new username[MAX_PLAYERS], minutes, reason[128]; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]is[128]", username, minutes, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /oprison [username] [minutes] [reason]"); } if(minutes < 1) { return SendClientMessage(playerid, COLOR_GREY, "The amount of minutes cannot be below one. /unjail to release a player."); } if(IsPlayerOnline(username)) { return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use /prison instead."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT adminlevel, uid FROM users WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer, "OnAdminOfflinePrison", "isis", playerid, username, minutes, reason); return 1; } CMD:release(playerid, params[]) { new targetid, reason[128]; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[128]", targetid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /release [playerid] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pJailType]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not jailed."); } PlayerInfo[targetid][pJailTime] = 1; SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was released from jail/prison by %s, reason: %s", GetPlayerRPName(targetid), GetPlayerRPName(playerid), reason); return 1; } CMD:fine(playerid, params[]) { new targetid, amount, reason[128]; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "uis[128]", targetid, amount, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /fine [playerid] [amount] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be fined."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(amount < 1) { return SendClientMessage(playerid, COLOR_GREY, "Invalid amount."); } GivePlayerCash(targetid, -amount); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was fined $%i by %s, reason: %s", GetPlayerRPName(targetid), amount, GetPlayerRPName(playerid), reason); Log_Write("log_admin", "%s (uid: %i) fined %s (uid: %i) for $%i, reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], amount, reason); return 1; } CMD:pfine(playerid, params[]) { new targetid, percent, reason[128]; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "uis[128]", targetid, percent, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /pfine [playerid] [percent] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(!(1 <= percent <= 100)) { return SendClientMessage(playerid, COLOR_GREY, "The percentage value must be between 1 and 100."); } new amount = ((PlayerInfo[targetid][pCash] + PlayerInfo[targetid][pBank]) / 100) * percent; GivePlayerCash(targetid, -amount); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was fined $%i by %s, reason: %s", GetPlayerRPName(targetid), amount, GetPlayerRPName(playerid), reason); Log_Write("log_admin", "%s (uid: %i) fined %s (uid: %i) for $%i (%i percent), reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], amount, percent, reason); return 1; } CMD:ofine(playerid, params[]) { new username[MAX_PLAYERS], amount, reason[128]; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]is[128]", username, amount, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /ofine [username] [amount] [reason]"); } if(amount < 1) { return SendClientMessage(playerid, COLOR_GREY, "Invalid amount."); } if(IsPlayerOnline(username)) { return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use /fine instead."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT adminlevel FROM users WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer, "OnAdminOfflineFine", "isis", playerid, username, amount, reason); return 1; } CMD:sethp(playerid, params[]) { new targetid, Float:amount; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "uf", targetid, amount)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sethp [playerid] [amount]"); SendClientMessage(playerid, COLOR_GREY3, "Warning: Values above 255.0 may not work properly with the server-sided damage system."); return 1; } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } SetPlayerHealth(targetid, amount); SendClientMessageEx(playerid, COLOR_GREY2, "%s's health set to %.1f.", GetPlayerRPName(targetid), amount); return 1; } CMD:setarmor(playerid, params[]) { new targetid, Float:amount; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "uf", targetid, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setarmor [playerid] [amount]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } SetScriptArmour(targetid, amount); SendClientMessageEx(playerid, COLOR_GREY2, "%s's armor set to %.1f.", GetPlayerRPName(targetid), amount); return 1; } CMD:refillcars(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i)) { vehicleFuel[i] = 100; } } SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s refilled all vehicles to maximum fuel.", GetPlayerRPName(playerid)); return 1; } CMD:refilldrug(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(isnull(params)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /refilldrug [seeds | cocaine | ephedrine]"); SendClientMessage(playerid, COLOR_GREY3, "This command refills the specified drug stock to maximum value."); return 1; } if(!strcmp(params, "seeds", true)) { gSeedsStock = 1000; SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has refilled the seeds in the drug den.", GetPlayerRPName(playerid)); } else if(!strcmp(params, "cocaine", true)) { gCocaineStock = 500; SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has refilled the cocaine in the crack house.", GetPlayerRPName(playerid)); } else if(!strcmp(params, "ephedrine", true)) { gEphedrineStock = 250; SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has refilled the ephedrine in the drug den.", GetPlayerRPName(playerid)); } return 1; } CMD:togooc(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!enabledOOC) { enabledOOC = 1; SendClientMessageToAllEx(COLOR_WHITE, "(( Administrator %s enabled the OOC channel. ))", GetPlayerRPName(playerid)); } else { enabledOOC = 0; SendClientMessageToAllEx(COLOR_WHITE, "(( Administrator %s disabled the OOC channel. ))", GetPlayerRPName(playerid)); } return 1; } CMD:tognewbie(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!enabledNewbie) { enabledNewbie = 1; SendClientMessageToAllEx(COLOR_NEWBIE, "** Administrator %s enabled the newbie channel.", GetPlayerRPName(playerid)); } else { enabledNewbie = 0; SendClientMessageToAllEx(COLOR_NEWBIE, "** Administrator %s disabled the newbie channel.", GetPlayerRPName(playerid)); } return 1; } CMD:togglobal(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!enabledGlobal) { enabledGlobal = 1; SendClientMessageToAllEx(COLOR_GLOBAL, "(( Administrator %s enabled the global channel. ))", GetPlayerRPName(playerid)); } else { enabledGlobal = 0; SendClientMessageToAllEx(COLOR_GLOBAL, "(( Administrator %s disabled the global channel. ))", GetPlayerRPName(playerid)); } return 1; } CMD:togreports(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!enabledReports) { enabledReports = 1; SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has enabled the report channel.", GetPlayerRPName(playerid)); } else { enabledReports = 0; SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has disabled the report channel.", GetPlayerRPName(playerid)); } return 1; } CMD:listpvehs(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /listpvehs [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } SendClientMessageEx(playerid, COLOR_GREEN, "|____ %s's Vehicles ____|", GetPlayerRPName(targetid)); for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && VehicleInfo[i][vID] > 0 && IsVehicleOwner(targetid, i)) { SendClientMessageEx(playerid, COLOR_GREY2, "ID: %i | Model: %s | Location: %s", i, GetVehicleName(i), GetVehicleZoneName(i)); } } return 1; } CMD:despawnpveh(playerid, params[]) { new vehicleid; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", vehicleid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /despawnpveh [vehicleid]"); } if(!IsValidVehicle(vehicleid) || !VehicleInfo[vehicleid][vOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "The vehicle specified is invalid or not owned by any player."); } SendClientMessageEx(playerid, COLOR_WHITE, "** You have despawned %s's %s.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid)); DespawnVehicle(vehicleid); return 1; } CMD:veh(playerid, params[]) { new model[20], modelid, color1, color2, Float:x, Float:y, Float:z, Float:a, vehicleid; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "s[20]I(-1)I(-1)", model, color1, color2)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /veh [modelid/name] [color1 (optional)] [color2 (optional)]"); } if((modelid = GetVehicleModelByName(model)) == 0) { return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle model."); } if(!(-1 <= color1 <= 255) || !(-1 <= color2 <= 255)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid color. Valid colors range from -1 to 255."); } GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); vehicleid = AddStaticVehicleEx(modelid, x, y, z, a, color1, color2, -1); if(vehicleid == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "Cannot spawn vehicle. The vehicle pool is currently full."); } adminVehicle{vehicleid} = true; vehicleFuel[vehicleid] = 100; vehicleColors[vehicleid][0] = color1; vehicleColors[vehicleid][1] = color2; SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); PutPlayerInVehicle(playerid, vehicleid, 0); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s spawned a %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); SendClientMessageEx(playerid, COLOR_WHITE, "** %s (ID %i) spawned. Use '/savevehicle %i' to save this vehicle to the database.", GetVehicleName(vehicleid), vehicleid, vehicleid); return 1; } CMD:savevehicle(playerid, params[]) { new vehicleid, gangid, type, delay, Float:x, Float:y, Float:z, Float:a; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "iiii", vehicleid, gangid, type, delay)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /savevehicle [vehicleid] [gangid (-1 = none)] [faction type] [respawn delay (seconds)]"); SendClientMessage(playerid, COLOR_GREY3, "List of types: (0) None (1) Police (2) Medic (3) News (4) Government (5) Hitman (6) Federal"); return 1; } if(!IsValidVehicle(vehicleid) || !adminVehicle{vehicleid}) { return SendClientMessage(playerid, COLOR_GREY, "The vehicle specified is either invalid or not an admin spawned vehicle."); } if(!(-1 <= gangid < MAX_GANGS) || (gangid >= 0 && !GangInfo[gangid][gSetup])) { return SendClientMessage(playerid, COLOR_GREY, "Invalid gang."); } if(!(0 <= type <= 7)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } SendClientMessageEx(playerid, COLOR_WHITE, "** %s saved. This vehicle will now spawn here from now on.", GetVehicleName(vehicleid)); GetVehiclePos(vehicleid, x, y, z); GetVehicleZAngle(vehicleid, a); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO vehicles (modelid, pos_x, pos_y, pos_z, pos_a, color1, color2, gangid, factiontype, respawndelay) VALUES(%i, '%f', '%f', '%f', '%f', %i, %i, %i, %i, %i)", GetVehicleModel(vehicleid), x, y, z, a, vehicleColors[vehicleid][0], vehicleColors[vehicleid][1], gangid, type, delay); mysql_tquery(connectionID, queryBuffer); mysql_tquery(connectionID, "SELECT * FROM vehicles WHERE id = LAST_INSERT_ID()", "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, 0); adminVehicle{vehicleid} = false; DestroyVehicle(vehicleid); return 1; } CMD:editvehicle(playerid, params[]) { new vehicleid, option[14], param[32], value; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[14]S()[32]", vehicleid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Spawn, Price, Tickets, Locked, Plate, Color, Paintjob, Neon, Trunk, Health"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Gang, Faction, Job, Respawndelay"); return 1; } if(!IsValidVehicle(vehicleid) || !VehicleInfo[vehicleid][vID]) { return SendClientMessage(playerid, COLOR_GREY, "The vehicle specified is invalid or a static vehicle."); } if(!strcmp(option, "spawn", true)) { new id = VehicleInfo[vehicleid][vID]; if(VehicleInfo[vehicleid][vFactionType] > 0 && GetPlayerInterior(playerid) > 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't set the spawn of a faction vehicle indoors."); } if(IsPlayerInAnyVehicle(playerid)) { GetVehiclePos(vehicleid, VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ]); GetVehicleZAngle(vehicleid, VehicleInfo[vehicleid][vPosA]); } else { GetPlayerPos(playerid, VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ]); GetPlayerFacingAngle(playerid, VehicleInfo[vehicleid][vPosA]); } if(VehicleInfo[vehicleid][vGang] >= 0 || VehicleInfo[vehicleid][vOwnerID] > 0) { VehicleInfo[vehicleid][vInterior] = GetPlayerInterior(playerid); VehicleInfo[vehicleid][vWorld] = GetPlayerVirtualWorld(playerid); SaveVehicleModifications(vehicleid); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', interior = %i, world = %i WHERE id = %i", VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ], VehicleInfo[vehicleid][vPosA], VehicleInfo[vehicleid][vInterior], VehicleInfo[vehicleid][vWorld], id); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have moved the spawn point for %s (ID %i).", GetVehicleName(vehicleid), vehicleid); SendClientMessage(playerid, COLOR_WHITE, "Note: The vehicle's ID may have changed in the mean time."); DespawnVehicle(vehicleid, false); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE id = %i", id); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, -1); } else if(!strcmp(option, "price", true)) { if(!VehicleInfo[vehicleid][vOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "This option can only be adjusted on player owned vehicles."); } if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [price] [value]"); } VehicleInfo[vehicleid][vPrice] = value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET price = %i WHERE id = %i", VehicleInfo[vehicleid][vPrice], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have set the price of %s's %s (ID %i) to $%i.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid), vehicleid, value); } else if(!strcmp(option, "tickets", true)) { if(!VehicleInfo[vehicleid][vOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "This option can only be adjusted on player owned vehicles."); } if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [tickets] [value]"); } VehicleInfo[vehicleid][vTickets] = value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET tickets = %i WHERE id = %i", VehicleInfo[vehicleid][vTickets], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have set the tickets of %s's %s (ID %i) to $%i.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid), vehicleid, value); } else if(!strcmp(option, "locked", true)) { if(sscanf(param, "i", value) || !(0 <= value <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [locked] [0/1]"); } if(VehicleInfo[vehicleid][vFactionType] > 0) { return SendClientMessage(playerid, COLOR_GREY, "Faction vehicles can't be locked."); } VehicleInfo[vehicleid][vLocked] = value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET locked = %i WHERE id = %i", VehicleInfo[vehicleid][vLocked], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SetVehicleParams(vehicleid, VEHICLE_DOORS, value); SendClientMessageEx(playerid, COLOR_AQUA, "** You have set the locked state of %s (ID %i) to %i.", GetVehicleName(vehicleid), vehicleid, value); } else if(!strcmp(option, "plate", true)) { if(!VehicleInfo[vehicleid][vOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "This option can only be adjusted on player owned vehicles."); } if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [plate] [text]"); } strcpy(VehicleInfo[vehicleid][vPlate], param, 32); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET plate = '%e' WHERE id = %i", VehicleInfo[vehicleid][vPlate], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); ResyncVehicle(vehicleid); SendClientMessageEx(playerid, COLOR_AQUA, "** You have set the license plate of %s's %s (ID %i) to %s.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid), vehicleid, param); SendClientMessage(playerid, COLOR_WHITE, "Note: The vehicle will need to be respawned for changes to take effect."); } else if(!strcmp(option, "color", true)) { new color1, color2; if(sscanf(param, "ii", color1, color2)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [color] [color 1] [color 2]"); } if(!(0 <= color1 <= 255) || !(0 <= color2 <= 255)) { return SendClientMessage(playerid, COLOR_GREY, "The colors must range from 0 to 255."); } VehicleInfo[vehicleid][vColor1] = color1; VehicleInfo[vehicleid][vColor2] = color2; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET color1 = %i, color2 = %i WHERE id = %i", VehicleInfo[vehicleid][vColor1], VehicleInfo[vehicleid][vColor2], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); ChangeVehicleColor(vehicleid, color1, color2); SendClientMessageEx(playerid, COLOR_AQUA, "** You have set the colors of %s (ID %i) to %i, %i.", GetVehicleName(vehicleid), vehicleid, color1, color2); } else if(!strcmp(option, "paintjob", true)) { new paintjobid; if(sscanf(param, "i", paintjobid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [paintjobid] [value (-1 = none)]"); } if(!(-1 <= paintjobid <= 5)) { return SendClientMessage(playerid, COLOR_GREY, "The paintjob must range from -1 to 5."); } if(VehicleInfo[vehicleid][vFactionType] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't change the paintjob on a faction vehicle."); } VehicleInfo[vehicleid][vPaintjob] = paintjobid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET paintjob = %i WHERE id = %i", VehicleInfo[vehicleid][vPaintjob], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); ChangeVehiclePaintjob(vehicleid, paintjobid); SendClientMessageEx(playerid, COLOR_AQUA, "** You have set the paintjob of %s (ID %i) to %i.", GetVehicleName(vehicleid), vehicleid, paintjobid); } else if(!strcmp(option, "neon", true)) { if(!VehicleInfo[vehicleid][vOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "This option can only be adjusted on player owned vehicles."); } if(isnull(param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [neon] [color]"); SendClientMessage(playerid, COLOR_GREY3, "List of colors: None, Red, Blue, Green, Yellow, Pink, White"); return 1; } if(!strcmp(param, "neon", true)) { SetVehicleNeon(vehicleid, 0); } else if(!strcmp(param, "red", true)) { SetVehicleNeon(vehicleid, 18647); } else if(!strcmp(param, "blue", true)) { SetVehicleNeon(vehicleid, 18648); } else if(!strcmp(param, "green", true)) { SetVehicleNeon(vehicleid, 18649); } else if(!strcmp(param, "yellow", true)) { SetVehicleNeon(vehicleid, 18650); } else if(!strcmp(param, "pink", true)) { SetVehicleNeon(vehicleid, 18651); } else if(!strcmp(param, "white", true)) { SetVehicleNeon(vehicleid, 18652); } else { return SendClientMessage(playerid, COLOR_GREY, "Invalid color."); } SendClientMessageEx(playerid, COLOR_AQUA, "** You have set the neon type of %s's %s (ID %i) to %s.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid), vehicleid, param); } else if(!strcmp(option, "trunk", true)) { if(!VehicleInfo[vehicleid][vOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "This option can only be adjusted on player owned vehicles."); } if(sscanf(param, "i", value) || !(0 <= value <= 3)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [trunk] [level (0-3)]"); } VehicleInfo[vehicleid][vTrunk] = value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET trunk = %i WHERE id = %i", VehicleInfo[vehicleid][vTrunk], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have set the trunk of %s's %s (ID %i) to level %i/3.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid), vehicleid, value); } else if(!strcmp(option, "health", true)) { new Float:amount; if(sscanf(param, "f", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [health] [amount]"); } if(!(300.0 <= amount <= 10000.0)) { return SendClientMessage(playerid, COLOR_GREY, "The health value must range from 300.0 to 10000.0."); } VehicleInfo[vehicleid][vHealth] = amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET health = '%f' WHERE id = %i", VehicleInfo[vehicleid][vHealth], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SetVehicleHealth(vehicleid, amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You have set the health of %s (ID %i) to %.2f.", GetVehicleName(vehicleid), vehicleid, amount); } else if(!strcmp(option, "gang", true)) { new gangid; if(VehicleInfo[vehicleid][vOwnerID] > 0) { return SendClientMessage(playerid, COLOR_GREY, "This option cannot be adjusted on player owned vehicles."); } if(sscanf(param, "i", gangid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [gang] [gangid (-1 = none)]"); } if(!(-1 <= gangid < MAX_GANGS) || (gangid >= 0 && !GangInfo[gangid][gSetup])) { return SendClientMessage(playerid, COLOR_GREY, "Invalid gang."); } VehicleInfo[vehicleid][vGang] = gangid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET gangid = %i WHERE id = %i", VehicleInfo[vehicleid][vGang], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); if(gangid == -1) SendClientMessageEx(playerid, COLOR_AQUA, "** You have reset the gang for %s (ID %i).", GetVehicleName(vehicleid), vehicleid); else SendClientMessageEx(playerid, COLOR_AQUA, "** You have set the gang of %s (ID %i) to %s (%i).", GetVehicleName(vehicleid), vehicleid, GangInfo[gangid][gName], gangid); } else if(!strcmp(option, "faction", true)) { new type; if(VehicleInfo[vehicleid][vOwnerID] > 0) { return SendClientMessage(playerid, COLOR_GREY, "This option cannot be adjusted on player owned vehicles."); } if(sscanf(param, "i", type)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [faction] [type]"); SendClientMessage(playerid, COLOR_GREY3, "List of types: (0) None (1) Police (2) Medic (3) News (4) Government (5) Hitman (6) Federal"); return 1; } if(!(0 <= type <= 6)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } VehicleInfo[vehicleid][vFactionType] = type; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET factiontype = %i WHERE id = %i", VehicleInfo[vehicleid][vFactionType], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); if(type == FACTION_NONE) SendClientMessageEx(playerid, COLOR_AQUA, "** You've reset the faction type for %s (ID %i).", GetVehicleName(vehicleid), vehicleid); else SendClientMessageEx(playerid, COLOR_AQUA, "** You've set the faction type of %s (ID %i) to %s (%i).", GetVehicleName(vehicleid), vehicleid, factionTypes[type], type); } else if(!strcmp(option, "job", true)) { if(VehicleInfo[vehicleid][vOwnerID] > 0) { return SendClientMessage(playerid, COLOR_GREY, "This option cannot be adjusted on player owned vehicles."); } if(sscanf(param, "i", value)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [job] [type]"); SendClientMessage(playerid, COLOR_GREY3, "List of jobs: (-1) None (0) Pizzaman (1) Courier (2) Fisherman (3) Bodyguard (4) Weapon Dealer (5) Mechanic"); SendClientMessage(playerid, COLOR_GREY3, "List of jobs: (6) Miner (7) Sweeper (8) Taxi Driver (9) Drug Dealer (10) Lawyer (11) Detective"); return 1; } if(!(-1 <= value <= 11)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid job."); } VehicleInfo[vehicleid][vJob] = value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET job = %i WHERE id = %i", VehicleInfo[vehicleid][vJob], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); if(value == JOB_NONE) SendClientMessageEx(playerid, COLOR_AQUA, "** You've reset the job type for %s (ID %i).", GetVehicleName(vehicleid), vehicleid); else SendClientMessageEx(playerid, COLOR_AQUA, "** You've set the job type of %s (ID %i) to %s (%i).", GetVehicleName(vehicleid), vehicleid, GetJobName(value), value); } else if(!strcmp(option, "respawndelay", true)) { new id = VehicleInfo[vehicleid][vID]; if(VehicleInfo[vehicleid][vOwnerID] > 0) { return SendClientMessage(playerid, COLOR_GREY, "This option cannot be adjusted on player owned vehicles."); } if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editvehicle [vehicleid] [respawndelay] [seconds (-1 = none)]"); } VehicleInfo[vehicleid][vRespawnDelay] = value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET respawndelay = %i WHERE id = %i", VehicleInfo[vehicleid][vRespawnDelay], id); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have set the respawn delay of %s (ID %i) to %i seconds.", GetVehicleName(vehicleid), vehicleid, value); SendClientMessage(playerid, COLOR_WHITE, "Note: The vehicle's ID may have changed in the mean time."); DespawnVehicle(vehicleid, false); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE id = %i", id); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, -1); } return 1; } CMD:removevehicle(playerid, params[]) { new vehicleid; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", vehicleid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removevehicle [vehicleid]"); } if(!IsValidVehicle(vehicleid) || !VehicleInfo[vehicleid][vID]) { return SendClientMessage(playerid, COLOR_GREY, "The vehicle specified is invalid or a static vehicle."); } if(VehicleInfo[vehicleid][vOwnerID]) { SendClientMessageEx(playerid, COLOR_WHITE, "** You have deleted %s's %s.", VehicleInfo[vehicleid][vOwner], GetVehicleName(vehicleid)); } else { SendClientMessageEx(playerid, COLOR_WHITE, "** You have deleted %s (ID %i).", GetVehicleName(vehicleid), vehicleid); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM vehicles WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); DespawnVehicle(vehicleid, false); return 1; } CMD:aclearwanted(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /aclearwanted [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pWantedLevel]) { return SendClientMessage(playerid, COLOR_GREY, "That player has no active charges to clear."); } PlayerInfo[targetid][pWantedLevel] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM charges WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET wantedlevel = 0 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_WHITE, "** Your crimes were cleared by %s.", GetPlayerRPName(playerid)); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has cleared %s's crimes and wanted level.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); return 1; } CMD:removedm(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removedm [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(!PlayerInfo[targetid][pDMWarnings] && !PlayerInfo[targetid][pWeaponRestricted]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't been punished for DM recently."); } PlayerInfo[targetid][pDMWarnings]--; PlayerInfo[targetid][pWeaponRestricted] = 0; if(PlayerInfo[targetid][pJailType] == 2) { PlayerInfo[targetid][pJailType] = 0; PlayerInfo[targetid][pJailTime] = 0; SetPlayerPos(targetid, 1544.4407, -1675.5522, 13.5584); SetPlayerFacingAngle(targetid, 90.0000); SetPlayerInterior(targetid, 0); SetPlayerVirtualWorld(targetid, 0); SetCameraBehindPlayer(targetid); SetPlayerWeapons(targetid); } SendClientMessageEx(targetid, COLOR_AQUA, "** Your DM punishment has been reversed by %s.", GetPlayerRPName(playerid)); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reversed %s's DM punishment.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_admin", "%s (uid: %i) reversed %s's (uid: %i) DM punishment.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET jailtype = 0, jailtime = 0, dmwarnings = %i, weaponrestricted = 0 WHERE uid = %i", PlayerInfo[targetid][pDMWarnings], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); return 1; } CMD:destroyveh(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(adminVehicle{vehicleid}) { DestroyVehicle(vehicleid); adminVehicle{vehicleid} = false; return SendClientMessage(playerid, COLOR_GREY, "Admin vehicle destroyed."); } for(new i = 1; i < MAX_VEHICLES; i ++) { if(adminVehicle{i}) { DestroyVehicle(i); adminVehicle{i} = false; } } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s destroyed all admin spawned vehicles.", GetPlayerRPName(playerid)); return 1; } CMD:respawncars(playerid, params[]) { new option[10], param[12]; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[10]S()[12]", option, param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /respawncars [job | faction | nearby | all]"); } if(!strcmp(option, "job", true)) { for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && !IsVehicleOccupied(i) && !adminVehicle{i}) { if((pizzaVehicles[0] <= i <= pizzaVehicles[5]) || (courierVehicles[0] <= i <= courierVehicles[6]) || (sweeperVehicles[0] <= i <= sweeperVehicles[3]) || (taxiVehicles[0] <= i <= taxiVehicles[3]) || (VehicleInfo[i][vJob] != JOB_NONE)) { SetVehicleToRespawn(i); } } } SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s respawned all unoccupied job vehicles.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "faction", true)) { new type; if(sscanf(param, "i", type)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /respawncars [faction] [type]"); SendClientMessage(playerid, COLOR_GREY3, "List of types: (1) Police (2) Medic (3) News (4) Government (5) Hitman (6) Federal"); return 1; } if(!(1 <= type <= 5)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid faction type."); } for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && !IsVehicleOccupied(i) && !adminVehicle{i} && VehicleInfo[i][vFactionType] == type) { SetVehicleToRespawn(i); } } SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s respawned all unoccupied {F7A763}%s{FF6347} vehicles.", GetPlayerRPName(playerid), factionTypes[type]); } else if(!strcmp(option, "nearby", true)) { for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && !IsVehicleOccupied(i) && !adminVehicle{i} && IsVehicleStreamedIn(i, playerid)) { SetVehicleToRespawn(i); } } SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s respawned all unoccupied vehicles in %s.", GetPlayerRPName(playerid), GetPlayerZoneName(playerid)); } else if(!strcmp(option, "all", true)) { for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && !IsVehicleOccupied(i) && !adminVehicle{i}) { SetVehicleToRespawn(i); } } SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s respawned all unoccupied vehicles.", GetPlayerRPName(playerid)); } return 1; } CMD:broadcast(playerid, params[]) { new style, text[128]; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[128]", style, text)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /broadcast [style (0-6)] [text]"); } if(!(0 <= style <= 6)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid style."); } if(style == 2) { return SendClientMessage(playerid, COLOR_GREY, "Style 2 only disappears after death and is therefore disabled."); } GameTextForAll(text, 6000, style); return 1; } CMD:fixveh(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't fix a vehicle if you're not sitting in one."); } RepairVehicle(GetPlayerVehicleID(playerid)); SendClientMessage(playerid, COLOR_GREY, "Vehicle fixed."); return 1; } CMD:clearchat(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } foreach(new i : Player) { ClearChat(i); } return 1; } CMD:healrange(playerid, params[]) { new Float:radius; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "f", radius)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /healrange [radius]"); } if(!(1.0 <= radius <= 50.0)) { return SendClientMessage(playerid, COLOR_GREY3, "The radius can't be below 1.0 or above 50.0."); } foreach(new i : Player) { if(IsPlayerInRangeOfPlayer(i, playerid, radius)) { if(!PlayerInfo[i][pAdminDuty]) { SetPlayerHealth(i, 100.0); if(GetPlayerArmourEx(i) < 100.0) { SetScriptArmour(i, 100.0); } } SendClientMessage(i, COLOR_WHITE, "** An admin has healed everyone nearby."); } } return 1; } CMD:shots(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /shots [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM shots WHERE playerid = %i ORDER BY id DESC LIMIT 20", targetid); mysql_tquery(connectionID, queryBuffer, "OnAdminListShots", "ii", playerid, targetid); return 1; } CMD:damages(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /damages [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT weaponid, playerid, timestamp FROM shots WHERE hitid = %i AND hittype = 1 ORDER BY id DESC LIMIT 20", targetid); mysql_tquery(connectionID, queryBuffer, "OnAdminListDamages", "ii", playerid, targetid); return 1; } CMD:kills(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /kills [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM kills WHERE killer_uid = %i OR target_uid = %i ORDER BY date DESC LIMIT 20", PlayerInfo[targetid][pID], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer, "OnAdminListKills", "ii", playerid, targetid); return 1; } CMD:resetadtimer(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } gLastAd = 0; SendClientMessage(playerid, COLOR_GREY, "Advertisement timer reset."); return 1; } CMD:setname(playerid, params[]) { new targetid, name[24]; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[24]", targetid, name)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setname [playerid] [name]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(PlayerInfo[targetid][pAdminDuty] && strcmp(PlayerInfo[targetid][pAdminName], "None", true) != 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't change the name of a player on admin duty. They're using their admin name."); } if(!IsValidName(name)) { return SendClientMessage(playerid, COLOR_GREY, "The name specified is not supported by the SA-MP client."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM users WHERE username = '%e'", name); mysql_tquery(connectionID, queryBuffer, "OnAdminChangeName", "iis", playerid, targetid, name); return 1; } CMD:explode(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /explode [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } new Float:x, Float:y, Float:z; GetPlayerPos(targetid, x, y, z); CreateExplosionForPlayer(targetid, x, y, z, 6, 20.0); SendClientMessageEx(playerid, COLOR_WHITE, "** You exploded %s for their client only.", GetPlayerRPName(targetid)); return 1; } CMD:event(playerid, params[]) { new option[10], param[128]; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "s[10]S()[128]", option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /event [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Position, JoinText, Type, Health, Armor, Weapon, Skin, Rules"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Ready, Start, Lock, Countdown, Balance, End"); return 1; } if(!strcmp(option, "position", true)) { if(EventInfo[eType] == 2) { if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /event [position] [red/blue]"); } else if(!strcmp(param, "red", true)) { GetPlayerPos(playerid, EventInfo[ePosX][RED_TEAM], EventInfo[ePosY][RED_TEAM], EventInfo[ePosZ][RED_TEAM]); GetPlayerFacingAngle(playerid, EventInfo[ePosA][RED_TEAM]); EventInfo[eInterior] = GetPlayerInterior(playerid); EventInfo[eWorld] = GetPlayerVirtualWorld(playerid); SendClientMessage(playerid, COLOR_AQUA, "You have set the spawn point for {FF0000}Red{33CCFF} team."); } else if(!strcmp(param, "blue", true)) { GetPlayerPos(playerid, EventInfo[ePosX][BLUE_TEAM], EventInfo[ePosY][BLUE_TEAM], EventInfo[ePosZ][BLUE_TEAM]); GetPlayerFacingAngle(playerid, EventInfo[ePosA][BLUE_TEAM]); EventInfo[eInterior] = GetPlayerInterior(playerid); EventInfo[eWorld] = GetPlayerVirtualWorld(playerid); SendClientMessage(playerid, COLOR_AQUA, "You have set the spawn point for {0000FF}Blue{33CCFF} team."); } } else { GetPlayerPos(playerid, EventInfo[ePosX][0], EventInfo[ePosY][0], EventInfo[ePosZ][0]); GetPlayerFacingAngle(playerid, EventInfo[ePosA][0]); EventInfo[eInterior] = GetPlayerInterior(playerid); EventInfo[eWorld] = GetPlayerVirtualWorld(playerid); SendClientMessage(playerid, COLOR_AQUA, "You have set the event spawn point."); } } else if(!strcmp(option, "type", true)) { new type; if(sscanf(param, "i", type)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /event [type] [1=DM 2=TDM 3=Race 4=Other]"); } if(!(1 <= type <= 4)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } /*if(EventInfo[eReady]) { return SendClientMessage(playerid, COLOR_GREY3, "The type can only be adjusted during event setup."); }*/ EventInfo[eType] = type; switch(type) { case 1: { SendClientMessage(playerid, COLOR_AQUA, "You have set the event type to {FF6347}Deathmatch{33CCFF}."); } case 2: { SendClientMessage(playerid, COLOR_AQUA, "You have set the event type to {FF6347}Team Deathmatch{33CCFF}."); EventInfo[eNext] = RED_TEAM; if(EventInfo[ePosX][RED_TEAM] == 0.0 && EventInfo[ePosY][RED_TEAM] == 0.0 && EventInfo[ePosZ][RED_TEAM] == 0.0) SendClientMessage(playerid, COLOR_LIGHTRED, "** Red Team position not set. '/event position red' to set position."); if(EventInfo[ePosX][BLUE_TEAM] == 0.0 && EventInfo[ePosY][BLUE_TEAM] == 0.0 && EventInfo[ePosZ][BLUE_TEAM] == 0.0) SendClientMessage(playerid, COLOR_LIGHTRED, "** Blue Team position not set. '/event position blue' to set position."); } case 3: { SendClientMessage(playerid, COLOR_AQUA, "You have set the event type to {FF6347}Race{33CCFF}. /veh to spawn the vehicles."); } case 4: { SendClientMessage(playerid, COLOR_AQUA, "You have set the event type to {FF6347}Other{33CCFF}."); } } } else if(!strcmp(option, "health", true)) { new Float:amount; if(sscanf(param, "f", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /event [health] [amount]"); } EventInfo[eHealth] = amount; SendClientMessageEx(playerid, COLOR_AQUA, "You set the event health to %.1f.", amount); } else if(!strcmp(option, "armor", true)) { new Float:amount; if(sscanf(param, "f", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /event [armor] [amount]"); } EventInfo[eArmor] = amount; SendClientMessageEx(playerid, COLOR_AQUA, "You set the event armor to %.1f.", amount); } else if(!strcmp(option, "jointext", true)) { if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /event [jointext] [text]"); } strcpy(EventInfo[eJoinText], param, 128); SendClientMessageEx(playerid, COLOR_AQUA, "You set the join text to '%s'.", param); } else if(!strcmp(option, "weapon", true)) { new slot, weaponid; if(sscanf(param, "ii", slot, weaponid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /event [weapon] [slot (1-5)] [weaponid]"); } if(!(1 <= slot <= 5)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid slot."); } if(!(2 <= weaponid <= 46)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid weapon."); } EventInfo[eWeapons][slot-1] = weaponid; SendClientMessageEx(playerid, COLOR_AQUA, "You set the weapon in slot %i to %s.", slot, GetWeaponNameEx(weaponid)); } else if(!strcmp(option, "skin", true)) { new team[6], skinid; if(EventInfo[eType] == 2) { if(sscanf(param, "s[6]i", team, skinid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /event [skin] [red/blue] [skinid]"); } if(!(0 <= skinid <= 311)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid skin ID."); } if(!strcmp(team, "red", true)) { EventInfo[eSkin][RED_TEAM] = skinid; SendClientMessageEx(playerid, COLOR_AQUA, "You set the skin for {FF0000}Red{33CCFF} team to %i.", skinid); } else if(!strcmp(team, "blue", true)) { EventInfo[eSkin][BLUE_TEAM] = skinid; SendClientMessageEx(playerid, COLOR_AQUA, "You set the skin for {0000FF}Blue{33CCFF} team to %i.", skinid); } } else { if(sscanf(param, "i", skinid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /event [skin] [skinid (0 = reset)]"); } if(!(0 <= skinid <= 311)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid skin ID."); } EventInfo[eSkin][0] = skinid; SendClientMessageEx(playerid, COLOR_AQUA, "You set the event skin to %i.", skinid); } } else if(!strcmp(option, "rules", true)) { new rule[8], toggle; if(sscanf(param, "s[8]i", rule, toggle) || !(0 <= toggle <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /event [rules] [cs/qs/healing] [0/1]"); } if(EventInfo[eType] != 1 && EventInfo[eType] != 2) { return SendClientMessage(playerid, COLOR_GREY, "You can only set rules for DM & TDM events."); } if(!strcmp(rule, "cs", true)) { EventInfo[eCS] = toggle; if(toggle) SendClientMessage(playerid, COLOR_AQUA, "You have {00AA00}allowed{33CCFF} crackshooting in the event."); else SendClientMessage(playerid, COLOR_AQUA, "You have {FF6347}disallowed{33CCFF} crackshooting in the event."); } else if(!strcmp(rule, "qs", true)) { EventInfo[eQS] = toggle; if(toggle) SendClientMessage(playerid, COLOR_AQUA, "You have {00AA00}allowed{33CCFF} quickswapping in the event."); else SendClientMessage(playerid, COLOR_AQUA, "You have {FF6347}disallowed{33CCFF} quickswapping in the event."); } else if(!strcmp(rule, "healing", true)) { EventInfo[eHeal] = toggle; if(toggle) SendClientMessage(playerid, COLOR_AQUA, "You have {00AA00}allowed{33CCFF} healing in the event."); else SendClientMessage(playerid, COLOR_AQUA, "You have {FF6347}disallowed{33CCFF} healing in the event."); } } else if(!strcmp(option, "ready", true)) { if(isnull(param) || strcmp(param, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /event [ready] [confirm]"); SendClientMessage(playerid, COLOR_GREY3, "This command will announce to the whole server that an event is ready to join."); return 1; } if(EventInfo[eReady]) { return SendClientMessage(playerid, COLOR_GREY, "The event is already marked as ready."); } if(EventInfo[eType] == 2) { if(EventInfo[ePosX][RED_TEAM] == 0.0 && EventInfo[ePosY][RED_TEAM] == 0.0 && EventInfo[ePosZ][RED_TEAM] == 0.0) { return SendClientMessage(playerid, COLOR_GREY, "There is no spawn point set for red team."); } if(EventInfo[ePosX][BLUE_TEAM] == 0.0 && EventInfo[ePosY][BLUE_TEAM] == 0.0 && EventInfo[ePosZ][BLUE_TEAM] == 0.0) { return SendClientMessage(playerid, COLOR_GREY, "There is no spawn point set for blue team."); } if(!EventInfo[eSkin][RED_TEAM]) { return SendClientMessage(playerid, COLOR_GREY, "There is no skin set for red team."); } if(!EventInfo[eSkin][BLUE_TEAM]) { return SendClientMessage(playerid, COLOR_GREY, "There is no skin set for blue team."); } } else { if(!EventInfo[eType]) { return SendClientMessage(playerid, COLOR_GREY, "The event type has not been set."); } if(EventInfo[ePosX][0] == 0.0 && EventInfo[ePosY][0] == 0.0 && EventInfo[ePosZ][0] == 0.0) { return SendClientMessage(playerid, COLOR_GREY, "The spawn point has not been set."); } } EventInfo[eReady] = 1; switch(EventInfo[eType]) { case 1: SendClientMessageToAllEx(COLOR_AQUA, "%s has started a DM event, use /joinevent to join!", GetPlayerRPName(playerid)); case 2: SendClientMessageToAllEx(COLOR_AQUA, "%s has started a TDM event, use /joinevent to join!", GetPlayerRPName(playerid)); case 3: SendClientMessageToAllEx(COLOR_AQUA, "%s has started a Race event, use /joinevent to join!", GetPlayerRPName(playerid)); case 4: SendClientMessageToAllEx(COLOR_AQUA, "%s has started an event, use /joinevent to join!", GetPlayerRPName(playerid)); } SendClientMessage(playerid, COLOR_WHITE, "** Use '/event lock' to lock the event and '/event start' to start."); } else if(!strcmp(option, "lock", true)) { if(!EventInfo[eReady]) { return SendClientMessage(playerid, COLOR_GREY, "There is no event ready. Please set one up first."); } if(!EventInfo[eLocked]) { EventInfo[eLocked] = 1; SendClientMessageToAllEx(COLOR_AQUA, "The event has been locked by %s.", GetPlayerRPName(playerid)); } else { EventInfo[eLocked] = 0; SendClientMessageToAllEx(COLOR_AQUA, "The event was unlocked by %s.", GetPlayerRPName(playerid)); } } else if(!strcmp(option, "start", true)) { if(!EventInfo[eReady]) { return SendClientMessage(playerid, COLOR_GREY, "There is no event ready. Please set one up first."); } if(EventInfo[eStarted]) { return SendClientMessage(playerid, COLOR_GREY, "The event has already started."); } foreach(new i : Player) { if(PlayerInfo[i][pJoinedEvent]) SendClientMessage(i, COLOR_AQUA, "The event has started. Good luck!"); else SendClientMessage(i, COLOR_AQUA, "The event has started. Better luck next time!"); } EventInfo[eStarted] = 1; } else if(!strcmp(option, "countdown", true)) { if(!EventInfo[eReady]) { return SendClientMessage(playerid, COLOR_GREY, "There is no event ready. Please set one up first."); } SetTimerEx("Countdown", 1000, false, "ii", playerid, 3); SendClientMessage(playerid, COLOR_AQUA, "You have initiated a countdown for all players in the event."); } else if(!strcmp(option, "balance", true)) { new teamid = RED_TEAM; if(!EventInfo[eReady]) { return SendClientMessage(playerid, COLOR_GREY, "There is no event ready. Please set one up first."); } if(EventInfo[eType] != 2) { return SendClientMessage(playerid, COLOR_GREY, "The event currently active is not a TDM event."); } foreach(new i : Player) { if(PlayerInfo[i][pJoinedEvent]) { PlayerInfo[i][pEventTeam] = teamid; SetPlayerSkin(i, EventInfo[eSkin][teamid]); SetPlayerPos(i, EventInfo[ePosX][teamid], EventInfo[ePosY][teamid], EventInfo[ePosZ][teamid]); SetPlayerFacingAngle(i, EventInfo[ePosA][teamid]); teamid = teamid == RED_TEAM ? BLUE_TEAM : RED_TEAM; if(PlayerInfo[i][pEventTeam] == RED_TEAM) { GameTextForPlayer(i, "~w~You are on~n~~r~Red Team", 3000, 4); } else if(PlayerInfo[i][pEventTeam] == BLUE_TEAM) { GameTextForPlayer(i, "~w~You are on~n~~b~Blue Team", 3000, 6); } SendClientMessageEx(i, COLOR_AQUA, "%s has balanced the teams. You are now in %s{33CCFF} team.", GetPlayerRPName(playerid), (PlayerInfo[i][pEventTeam] == RED_TEAM) ? ("{FF0000}Red") : ("{0000FF}Blue")); } } SendClientMessage(playerid, COLOR_AQUA, "You have balanced the event teams."); } else if(!strcmp(option, "end", true)) { if(!EventInfo[eReady]) { return SendClientMessage(playerid, COLOR_GREY, "There is no event ready. Please set one up first."); } ResetEvent(); SendClientMessageToAllEx(COLOR_AQUA, "The event was ended by %s.", GetPlayerRPName(playerid)); } return 1; } CMD:oban(playerid, params[]) { new username[MAX_PLAYERS], reason[128]; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]s[128]", username, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /oban [username] [reason]"); } if(IsPlayerOnline(username)) { return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use /ban instead."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT adminlevel, ip, uid FROM users WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer, "OnAdminOfflineBan", "iss", playerid, username, reason); return 1; } CMD:joinevent(playerid, params[]) { if(PlayerInfo[playerid][pJailType]) { return SendClientMessage(playerid, COLOR_GREY, "You are in jail and therefore cannot participate in an event."); } if(PlayerInfo[playerid][pJoinedEvent]) { return SendClientMessage(playerid, COLOR_GREY, "You already joined the event. /quitevent to leave."); } if(!EventInfo[eReady]) { return SendClientMessage(playerid, COLOR_GREY, "There are no events you can join at the moment."); } if(EventInfo[eLocked]) { return SendClientMessage(playerid, COLOR_GREY, "The event is locked. Better luck next time!"); } if(PlayerInfo[playerid][pPaintball]) { return SendClientMessage(playerid, COLOR_GREY, "You can't join the event while you are playing paintball."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pAcceptedHelp] || GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY) { return SendClientMessage(playerid, COLOR_GREY, "You can't join the event at the moment."); } if((PlayerInfo[playerid][pWeaponRestricted] > 0) && (1 <= EventInfo[eType] <= 2)) { return SendClientMessage(playerid, COLOR_GREY, "You are restricted from weapons and therefore can't join this type of event."); } SetPlayerInEvent(playerid); return 1; } CMD:quitevent(playerid, params[]) { if(!PlayerInfo[playerid][pJoinedEvent]) { return SendClientMessage(playerid, COLOR_GREY, "You are not in an event which you can quit."); } foreach(new i : Player) { if(PlayerInfo[i][pJoinedEvent]) { SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s has left the event. ))", GetPlayerNameEx(playerid)); } } ResetPlayerWeapons(playerid); PlayerInfo[playerid][pJoinedEvent] = 0; SetPlayerToSpawn(playerid); return 1; } CMD:permaban(playerid, params[]) { new targetid, reason[128]; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[128]", targetid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /permaban [playerid] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be banned."); } Log_Write("log_punishments", "%s (uid: %i) permabanned %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], reason); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was permanently banned by %s, reason: %s", GetPlayerRPName(targetid), GetPlayerRPName(playerid), reason); BanPlayer(targetid, GetPlayerNameEx(playerid), reason, true); return 1; } CMD:baninfo(playerid, params[]) { new string[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pAdmin] < 3 && !PlayerInfo[playerid][pBanAppealer]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]", string)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /baninfo [username/ip]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM bans WHERE username = '%e' OR ip = '%e'", string, string); mysql_tquery(connectionID, queryBuffer, "OnAdminCheckBan", "is", playerid, string); return 1; } CMD:banhistory(playerid, params[]) { new name[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pAdmin] < 3 && !PlayerInfo[playerid][pBanAppealer]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]", name)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /banhistory [username]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT a.date, a.description FROM log_bans a, users b WHERE a.uid = b.uid AND b.username = '%e' ORDER BY a.date DESC", name); mysql_tquery(connectionID, queryBuffer, "OnAdminCheckBanHistory", "is", playerid, name); return 1; } CMD:unban(playerid, params[]) { new username[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pAdmin] < 4 && !PlayerInfo[playerid][pBanAppealer]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]", username)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /unban [username]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id, permanent FROM bans WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer, "OnAdminUnbanUser", "is", playerid, username); return 1; } CMD:unbanip(playerid, params[]) { new string[25]; if(PlayerInfo[playerid][pAdmin] < 4 && !PlayerInfo[playerid][pBanAppealer]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!IsAnIP(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /unbanip [ip address]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM bans WHERE ip = '%s'", params); mysql_tquery(connectionID, queryBuffer); format(string, sizeof(string), "unbanip %s", params); SendRconCommand(string); SendRconCommand("reloadbans"); UnBlockIpAddress(params); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has unbanned IP '%s'.", GetPlayerRPName(playerid), params); return 1; } CMD:banip(playerid, params[]) { new ip[16], reason[128]; if(PlayerInfo[playerid][pAdmin] < 4 && !PlayerInfo[playerid][pBanAppealer]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[16]S(N/A)[128]", ip, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /banip [ip address] [reason (optional)]"); } if(!IsAnIP(ip)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid IP address."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT id FROM bans WHERE ip = '%s'", ip); mysql_tquery(connectionID, queryBuffer, "OnAdminBanIP", "iss", playerid, ip, reason); return 1; } CMD:lockaccount(playerid, params[]) { new username[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]", username)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /lockaccount [username]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT locked, adminlevel FROM users WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer, "OnAdminLockAccount", "is", playerid, username); return 1; } CMD:unlockaccount(playerid, params[]) { new username[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]", username)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /unlockaccount [username]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM users WHERE username = '%e' AND locked = 1", username); mysql_tquery(connectionID, queryBuffer, "OnAdminUnlockAccount", "is", playerid, username); return 1; } CMD:sprison(playerid, params[]) { new targetid, minutes, reason[128]; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "uis[128]", targetid, minutes, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sprison [playerid] [minutes] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be prisoned."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet. You can wait until they login or use /oprison."); } if(minutes < 1) { return SendClientMessage(playerid, COLOR_GREY, "The amount of minutes cannot be below one. /unjail to release a player."); } PlayerInfo[targetid][pJailType] = 2; PlayerInfo[targetid][pJailTime] = minutes * 60; ResetPlayerWeaponsEx(targetid); ResetPlayer(targetid); SetPlayerInJail(targetid); Log_Write("log_punishments", "%s (uid: %i) silently prisoned %s (uid: %i) for %i minutes, reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], minutes, reason); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was prisoned for %i minutes by an Admin, reason: %s", GetPlayerRPName(targetid), minutes, reason); SendClientMessageEx(targetid, COLOR_AQUA, "** You have been admin prisoned for %i minutes by an admin.", minutes); return 1; } CMD:sethpall(playerid, params[]) { new Float:amount; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "f", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sethpall [amount]"); } if(amount < 1.0) { return SendClientMessage(playerid, COLOR_GREY, "Health can't be under 1.0."); } foreach(new i : Player) { SetPlayerHealth(i, amount); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s set everyone's health to %.1f.", GetPlayerRPName(playerid), amount); return 1; } CMD:setarmorall(playerid, params[]) { new Float:amount; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "f", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setarmorall [amount]"); } if(amount < 0.0 || amount > 150.0) { return SendClientMessage(playerid, COLOR_GREY, "Armor can't be under 0.0 or above 150.0."); } foreach(new i : Player) { SetScriptArmour(i, amount); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s set everyone's armor to %.1f.", GetPlayerRPName(playerid), amount); return 1; } CMD:givegun(playerid, params[]) { new targetid, weaponid; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "ui", targetid, weaponid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /givegun [playerid] [weaponid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pHours] < 2 || PlayerInfo[targetid][pWeaponRestricted] > 0) { return SendClientMessage(playerid, COLOR_GREY, "That player is either weapon restricted or played less than two playing hours."); } if(!(1 <= weaponid <= 46)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid weapon."); } GivePlayerWeaponEx(targetid, weaponid); SendClientMessageEx(targetid, COLOR_AQUA, "You have received a {00AA00}%s{33CCFF} from %s.", GetWeaponNameEx(weaponid), GetPlayerRPName(playerid)); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given a %s to %s.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid), GetPlayerRPName(targetid)); Log_Write("log_admin", "%s (uid: %i) gives a %s to %s (uid: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetWeaponNameEx(weaponid), GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); return 1; } CMD:setweather(playerid, params[]) { new weatherid; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", weatherid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setweather [weatherid]"); } gWeather = weatherid; SetWeather(weatherid); SendClientMessageEx(playerid, COLOR_WHITE, "** Weather changed to %i.", weatherid); return 1; } CMD:settime(playerid, params[]) { new hour; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", hour)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /settime [hour]"); } if(!(0 <= hour <= 23)) { return SendClientMessage(playerid, COLOR_GREY, "The hour must range from 0 to 23."); } gWorldTime = hour; SetWorldTime(hour); SendClientMessageToAllEx(COLOR_GREY2, "Time of day changed to %i hours.", hour); return 1; } CMD:setstat(playerid, params[]) { new targetid, option[24], param[32], value; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "us[24]S()[32]", targetid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [option]"); SendClientMessageEx(playerid, COLOR_GREY3, "List of options: Gender, Age, Cash, Bank, Level, Respect, UpgradePoints, Hours, Warnings"); SendClientMessageEx(playerid, COLOR_GREY3, "List of options: SpawnHealth, SpawnArmor, FightStyle, Accent, Cookies, Phone, Crimes, Arrested"); SendClientMessageEx(playerid, COLOR_GREY3, "List of options: WantedLevel, Materials, Weed, Cocaine, Meth, Painkillers, Cigars, WalkieTalkie"); SendClientMessageEx(playerid, COLOR_GREY3, "List of options: Channel, Spraycans, Boombox, Phonebook, Paycheck, CarLicense, Seeds, Ephedrine"); SendClientMessageEx(playerid, COLOR_GREY3, "List of options: InventoryUpgrade, AddictUpgrade, TraderUpgrade, AssetUpgrade, MP3Player, Job"); SendClientMessageEx(playerid, COLOR_GREY3, "List of options: MuriaticAcid, BakingSoda, HPAmmo, PoisonAmmo, FMJAmmo, DMWarnings, WeaponRestricted"); SendClientMessageEx(playerid, COLOR_GREY3, "List of options: Components, Watch, GPS, GasCan, CourierSkill, FishingSkill, GuardSkill, WeaponSkill"); SendClientMessageEx(playerid, COLOR_GREY3, "List of options: MechanicSkill, LawyerSkill, SmugglerSkill, DetectiveSkill"); return 1; } if(!strcmp(option, "gender", true)) { if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [gender] [male | female]"); } if(!strcmp(param, "male", true)) { PlayerInfo[targetid][pGender] = 1; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's gender to Male.", GetPlayerRPName(targetid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gender = 1 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(param, "female", true)) { PlayerInfo[targetid][pGender] = 2; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's gender to Female.", GetPlayerRPName(targetid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gender = 2 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } } else if(!strcmp(option, "age", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [age] [value]"); } if(!(0 <= value <= 128)) { return SendClientMessage(playerid, COLOR_GREY3, "The value specified can't be under 0 or above 128."); } PlayerInfo[targetid][pAge] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's age to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET age = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "cash", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [cash] [value]"); } PlayerInfo[targetid][pCash] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's cash to $%i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cash = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "bank", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [bank] [value]"); } PlayerInfo[targetid][pBank] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's bank money to $%i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET bank = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "level", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [level] [value]"); } PlayerInfo[targetid][pLevel] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's level to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET level = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "respect", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [respect] [value]"); } PlayerInfo[targetid][pEXP] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's respect points to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET exp = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "upgradepoints", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [upgradepoints] [value]"); } PlayerInfo[targetid][pUpgradePoints] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's upgrade points to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET upgradepoints = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "hours", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [hours] [value]"); } PlayerInfo[targetid][pHours] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's playing hours to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET hours = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "warnings", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [warnings] [value]"); } if(!(0 <= value <= 3)) { return SendClientMessage(playerid, COLOR_GREY3, "The value specified can't be under 0 or above 3."); } PlayerInfo[targetid][pWarnings] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's warnings to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET warnings = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "spawnhealth", true)) { new Float:amount; if(sscanf(param, "f", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [spawnhealth] [value]"); } PlayerInfo[targetid][pSpawnHealth] = amount; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's spawn health to %.1f.", GetPlayerRPName(targetid), amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET spawnhealth = '%f' WHERE uid = %i", amount, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "spawnarmor", true)) { new Float:amount; if(sscanf(param, "f", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [spawnarmor] [value]"); } PlayerInfo[targetid][pSpawnArmor] = amount; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's spawn armor to %.1f.", GetPlayerRPName(targetid), amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET spawnarmor = '%f' WHERE uid = %i", amount, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "fightstyle", true)) { if(isnull(param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [fightstyle] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Normal, Boxing, Kungfu, Kneehead, Grabkick, Elbow"); return 1; } if(!strcmp(param, "normal", true)) { PlayerInfo[targetid][pFightStyle] = FIGHT_STYLE_NORMAL; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's fight style to Normal.", GetPlayerRPName(targetid)); SetPlayerFightingStyle(targetid, PlayerInfo[targetid][pFightStyle]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fightstyle = %i WHERE uid = %i", PlayerInfo[targetid][pFightStyle], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(param, "boxing", true)) { PlayerInfo[targetid][pFightStyle] = FIGHT_STYLE_BOXING; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's fight style to Boxing.", GetPlayerRPName(targetid)); SetPlayerFightingStyle(targetid, PlayerInfo[targetid][pFightStyle]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fightstyle = %i WHERE uid = %i", PlayerInfo[targetid][pFightStyle], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(param, "kungfu", true)) { PlayerInfo[targetid][pFightStyle] = FIGHT_STYLE_KUNGFU; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's fight style to Kung Fu.", GetPlayerRPName(targetid)); SetPlayerFightingStyle(targetid, PlayerInfo[targetid][pFightStyle]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fightstyle = %i WHERE uid = %i", PlayerInfo[targetid][pFightStyle], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(param, "kneehead", true)) { PlayerInfo[targetid][pFightStyle] = FIGHT_STYLE_KNEEHEAD; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's fight style to Kneehead.", GetPlayerRPName(targetid)); SetPlayerFightingStyle(targetid, PlayerInfo[targetid][pFightStyle]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fightstyle = %i WHERE uid = %i", PlayerInfo[targetid][pFightStyle], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(param, "grabkick", true)) { PlayerInfo[targetid][pFightStyle] = FIGHT_STYLE_GRABKICK; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's fight style to Grabkick.", GetPlayerRPName(targetid)); SetPlayerFightingStyle(targetid, PlayerInfo[targetid][pFightStyle]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fightstyle = %i WHERE uid = %i", PlayerInfo[targetid][pFightStyle], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(param, "elbow", true)) { PlayerInfo[targetid][pFightStyle] = FIGHT_STYLE_ELBOW; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's fight style to Elbow.", GetPlayerRPName(targetid)); SetPlayerFightingStyle(targetid, PlayerInfo[targetid][pFightStyle]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fightstyle = %i WHERE uid = %i", PlayerInfo[targetid][pFightStyle], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } } else if(!strcmp(option, "accent", true)) { new accent[16]; if(sscanf(param, "s[16]", accent)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [accent] [text]"); } strcpy(PlayerInfo[targetid][pAccent], accent, 16); SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's accent to '%s'.", GetPlayerRPName(targetid), accent); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET accent = '%e' WHERE uid = %i", accent, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "cookies", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [cookies] [value]"); } PlayerInfo[targetid][pCookies] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's cookies to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cookies = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "phone", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [phone] [number]"); } if(value == 911 || value == 6397 || value == 6324 || value == 8294) { return SendClientMessage(playerid, COLOR_GREY, "Invalid number."); } PlayerInfo[targetid][pPhone] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's phone number to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET phone = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "crimes", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [crimes] [value]"); } PlayerInfo[targetid][pCrimes] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's commited crimes to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET crimes = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "arrested", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [arrested] [value]"); } PlayerInfo[targetid][pArrested] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's arrested count to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET arrested = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "wantedlevel", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [wantedlevel] [value]"); } if(!(0 <= value <= 6)) { return SendClientMessage(playerid, COLOR_GREY3, "The value specified can't be under 0 or above 6."); } PlayerInfo[targetid][pWantedLevel] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's wanted level to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET wantedlevel = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "materials", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [materials] [value]"); } PlayerInfo[targetid][pMaterials] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's materials to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "weed", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [weed] [value]"); } PlayerInfo[targetid][pWeed] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's weed to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "cocaine", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [cocaine] [value]"); } PlayerInfo[targetid][pCocaine] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's cocaine to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "meth", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [meth] [value]"); } PlayerInfo[targetid][pMeth] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's meth to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "painkillers", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [painkillers] [value]"); } PlayerInfo[targetid][pPainkillers] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's painkillers to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "cigars", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [cigars] [value]"); } PlayerInfo[targetid][pCigars] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's cigars to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cigars = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "walkietalkie", true)) { if(sscanf(param, "i", value) || !(0 <= value <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [walkietalkie] [0/1]"); } PlayerInfo[targetid][pWalkieTalkie] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's walkie talkie to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET walkietalkie = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "channel", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [channel] [value]"); } PlayerInfo[targetid][pChannel] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's radio channel to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET channel = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "spraycans", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [spraycans] [value]"); } PlayerInfo[targetid][pSpraycans] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's spraycans to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET spraycans = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "boombox", true)) { if(sscanf(param, "i", value) || !(0 <= value <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [boombox] [0/1]"); } if((value == 0) && PlayerInfo[targetid][pBoomboxPlaced]) { DestroyBoombox(targetid); } PlayerInfo[targetid][pBoombox] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's boombox to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET boombox = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "phonebook", true)) { if(sscanf(param, "i", value) || !(0 <= value <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [phonebook] [0/1]"); } PlayerInfo[targetid][pPhonebook] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's phonebook to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET phonebook = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "paycheck", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [paycheck] [value]"); } PlayerInfo[targetid][pPaycheck] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's paycheck to $%i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET paycheck = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "carlicense", true)) { if(sscanf(param, "i", value) || !(0 <= value <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [carlicense] [0/1]"); } PlayerInfo[targetid][pCarLicense] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's car license to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET carlicense = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "seeds", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [seeds] [value]"); } PlayerInfo[targetid][pSeeds] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's seeds to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET seeds = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "ephedrine", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [ephedrine] [value]"); } PlayerInfo[targetid][pEphedrine] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's ephedrine to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET ephedrine = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "job", true)) { if(sscanf(param, "i", value)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [job] [value (-1 = none)]"); SendClientMessage(playerid, COLOR_GREY3, "List of jobs: (0) Pizzaman (1) Courier (2) Fisherman (3) Bodyguard (4) Weapon Dealer (5) Mechanic (6) Miner"); SendClientMessage(playerid, COLOR_GREY3, "List of jobs: (7) Sweeper (8) Taxi Driver (9) Drug Dealer (10) Lawyer (11) Detective"); return 1; } if(!(-1 <= value <= 11)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid job."); } PlayerInfo[targetid][pJob] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's job to %s.", GetPlayerRPName(targetid), GetJobName(value)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET job = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "inventoryupgrade", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [inventoryupgrade] [value]"); } if(!(0 <= value <= 5)) { return SendClientMessage(playerid, COLOR_GREY, "The value must range from 0 to 5."); } PlayerInfo[targetid][pInventoryUpgrade] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's inventory upgrade to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET inventoryupgrade = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "addictupgrade", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [addictupgrade] [value]"); } if(!(0 <= value <= 3)) { return SendClientMessage(playerid, COLOR_GREY, "The value must range from 0 to 3."); } PlayerInfo[targetid][pAddictUpgrade] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's addict upgrade to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET addictupgrade = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "traderupgrade", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [traderupgrade] [value]"); } if(!(0 <= value <= 3)) { return SendClientMessage(playerid, COLOR_GREY, "The value must range from 0 to 3."); } PlayerInfo[targetid][pTraderUpgrade] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's trader upgrade to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET traderupgrade = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "assetupgrade", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [assetupgrade] [value]"); } if(!(0 <= value <= 4)) { return SendClientMessage(playerid, COLOR_GREY, "The value must range from 0 to 4."); } PlayerInfo[targetid][pAssetUpgrade] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's asset upgrade to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET assetupgrade = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "mp3player", true)) { if(sscanf(param, "i", value) || !(0 <= value <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [mp3player] [0/1]"); } PlayerInfo[targetid][pMP3Player] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's MP3 player to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET mp3player = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "muriaticacid", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [muriaticacid] [value]"); } PlayerInfo[targetid][pMuriaticAcid] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's muriatic acid to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET muriaticacid = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "bakingsoda", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [bakingsoda] [value]"); } PlayerInfo[targetid][pBakingSoda] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's baking soda to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET bakingsoda = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "hpammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [hpammo] [value]"); } SetWeaponAmmo(targetid, AMMO_HP, value); SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's hollow point ammunition to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET hpammo = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "poisonammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [poisonammo] [value]"); } SetWeaponAmmo(targetid, AMMO_POISON, value); SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's poison tip ammunition to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET poisonammo = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "fmjammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [fmjammo] [value]"); } SetWeaponAmmo(targetid, AMMO_FMJ, value); SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's full metal jacket ammunition to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fmjammo = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "dmwarnings", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [dmwarnings] [value]"); } if(!(0 <= value <= 4)) { return SendClientMessage(playerid, COLOR_GREY, "The value must range from 0 to 4."); } PlayerInfo[targetid][pDMWarnings] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's DM warnings to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET dmwarnings = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "weaponrestricted", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [weaponrestricted] [hours]"); } PlayerInfo[targetid][pWeaponRestricted] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's weapon restriction to %i hours.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weaponrestricted = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "components", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [components] [value]"); } PlayerInfo[targetid][pComponents] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's components to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET components = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "watch", true)) { if(sscanf(param, "i", value) || !(0 <= value <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [watch] [0/1]"); } PlayerInfo[targetid][pWatch] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's watch to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET watch = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "gps", true)) { if(sscanf(param, "i", value) || !(0 <= value <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [gps] [0/1]"); } PlayerInfo[targetid][pGPS] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's GPS to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gps = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "gascan", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [gascan] [value]"); } PlayerInfo[targetid][pGasCan] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's gas can to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gascan = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "courierskill", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [courierskill] [value]"); } PlayerInfo[targetid][pCourierSkill] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's courier skill to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET courierskill = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "fishingskill", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [fishingskill] [value]"); } PlayerInfo[targetid][pFishingSkill] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's fishing skill to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fishingskill = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "guardskill", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [guardskill] [value]"); } PlayerInfo[targetid][pGuardSkill] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's bodyguard skill to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET guardskill = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "weaponskill", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [weaponskill] [value]"); } PlayerInfo[targetid][pWeaponSkill] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's weapon skill to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weaponskill = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "mechanicskill", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [mechanicskill] [value]"); } PlayerInfo[targetid][pMechanicSkill] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's mechanic skill to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET mechanicskill = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "lawyerskill", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [lawyerskill] [value]"); } PlayerInfo[targetid][pLawyerSkill] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's lawyer skill to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET lawyerskill = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "detectiveskill", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstat [playerid] [detectiveskill] [value]"); } PlayerInfo[targetid][pDetectiveSkill] = value; SendClientMessageEx(playerid, COLOR_WHITE, "** You have set %s's detective skill to %i.", GetPlayerRPName(targetid), value); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET detectiveskill = %i WHERE uid = %i", value, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else { return 1; } Log_Write("log_admin", "%s (uid: %i) set %s's (uid: %i) %s to %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], option, param); return 1; } CMD:givemoney(playerid, params[]) { new targetid, amount; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "ui", targetid, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /givemoney [playerid] [amount]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } GivePlayerCash(targetid, amount); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given $%i to %s.", GetPlayerRPName(playerid), amount, GetPlayerRPName(targetid)); Log_Write("log_admin", "%s (uid: %i) has used /givemoney to give $%i to %s (uid: %i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); return 1; } CMD:givemoneyall(playerid, params[]) { new amount; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /givemoneyall [amount]"); } if(amount < 1 || amount > 100000) { return SendClientMessage(playerid, COLOR_GREY, "The amount specified must range between $1 and $100000."); } foreach(new i : Player) { if(PlayerInfo[i][pLogged]) { GivePlayerCash(i, amount); } } SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s has given $%i to every player online.", GetPlayerRPName(playerid), amount); return 1; } CMD:givecookie(playerid, params[]) { new targetid, reason[128]; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us", targetid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /givecookie [playerid] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } PlayerInfo[targetid][pCookies]++; SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s has given a cookie to %s, reason: %s", GetPlayerRPName(playerid), GetPlayerRPName(targetid), reason); return 1; } CMD:givecookieall(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } foreach(new i : Player) { if(PlayerInfo[i][pLogged]) { PlayerInfo[i][pCookies]++; } } SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s has given a cookie to every player online.", GetPlayerRPName(playerid)); return 1; } CMD:setvip(playerid, params[]) { new targetid, rank, days; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "uii", targetid, rank, days)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setvip [playerid] [rank] [days]"); SendClientMessage(playerid, COLOR_GREY3, "List of ranks: (1) Limited (2) Limitless (3) Legendary"); return 1; } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(!(1 <= rank <= 3)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid rank."); } if(!(1 <= days <= 365)) { return SendClientMessage(playerid, COLOR_GREY, "The amount of days must range from 1 to 365."); } PlayerInfo[targetid][pVIPPackage] = rank; PlayerInfo[targetid][pVIPTime] = gettime() + (days * 86400); PlayerInfo[targetid][pVIPCooldown] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET vippackage = %i, viptime = %i, vipcooldown = 0 WHERE uid = %i", PlayerInfo[targetid][pVIPPackage], PlayerInfo[targetid][pVIPTime], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); if(days >= 30) { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given a {A028AD}%s{FF6347} donator package to %s for %i months.", GetPlayerRPName(playerid), GetVIPRank(rank), GetPlayerRPName(targetid), days / 30); SendClientMessageEx(playerid, COLOR_AQUA, "** You have given %s a {A028AD}%s{33CCFF} donator package for %i months.", GetPlayerRPName(targetid), GetVIPRank(rank), days / 30); SendClientMessageEx(targetid, COLOR_AQUA, "** %s has given you a {A028AD}%s{33CCFF} donator package for %i months.", GetPlayerRPName(playerid), GetVIPRank(rank), days / 30); } else { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given a {A028AD}%s{FF6347} donator package to %s for %i days.", GetPlayerRPName(playerid), GetVIPRank(rank), GetPlayerRPName(targetid), days); SendClientMessageEx(playerid, COLOR_AQUA, "** You have given %s a {A028AD}%s{33CCFF} donator package for %i days.", GetPlayerRPName(targetid), GetVIPRank(rank), days); SendClientMessageEx(targetid, COLOR_AQUA, "** %s has given you a {A028AD}%s{33CCFF} donator package for %i days.", GetPlayerRPName(playerid), GetVIPRank(rank), days); } Log_Write("log_vip", "%s (uid: %i) has given %s (uid: %i) a %s donator package for %i days.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], GetVIPRank(rank), days); return 1; } CMD:removevip(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removevip [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(!PlayerInfo[targetid][pVIPPackage]) { return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have a VIP subscription which you can remove."); } if(PlayerInfo[targetid][pTagType] == TAG_VIP) { SetPlayerSpecialTag(targetid, TAG_NONE); } Log_Write("log_vip", "%s (uid: %i) has removed %s's (uid: %i) %s donator package.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], GetVIPRank(PlayerInfo[targetid][pVIPPackage])); PlayerInfo[targetid][pVIPPackage] = 0; PlayerInfo[targetid][pVIPTime] = 0; PlayerInfo[targetid][pVIPColor] = 0; PlayerInfo[targetid][pSecondJob] = JOB_NONE; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET vippackage = 0, viptime = 0 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has revoked %s's VIP subscription.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "** %s has revoked your VIP subscription.", GetPlayerRPName(playerid)); return 1; } CMD:rangeban(playerid, params[]) { new targetid, reason[128]; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[128]", targetid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /rangeban [playerid] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be banned."); } Log_Write("log_punishments", "%s (uid: %i) rangebanned %s (uid: %i), reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], reason); SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was rangebanned by %s, reason: %s", GetPlayerRPName(targetid), GetPlayerRPName(playerid), reason); Rangeban(targetid, GetPlayerNameEx(playerid), reason); return 1; } CMD:forcepayday(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } foreach(new i : Player) { SendPaycheck(i); } return 1; } CMD:deleteaccount(playerid, params[]) { new username[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]", username)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /deleteaccount [username]"); } if(IsPlayerOnline(username)) { return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. You can't delete their account."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT adminlevel FROM users WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer, "OnAdminDeleteAccount", "is", playerid, username); return 1; } CMD:doublexp(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!gDoubleXP) { SetDoubleXP(true); SendClientMessageToAllEx(COLOR_AQUA, "** %s enabled double XP. You will now gain double the respect points and job skill points.", GetPlayerRPName(playerid)); } else { SetDoubleXP(false); SendClientMessageToAllEx(COLOR_AQUA, "** %s disabled double XP.", GetPlayerRPName(playerid)); } return 1; } CMD:createhouse(playerid, params[]) { new type, Float:x, Float:y, Float:z, Float:a; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", type)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /createhouse [type (1-%i)]", sizeof(houseInteriors)); } if(!(1 <= type <= sizeof(houseInteriors))) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } if(GetNearbyHouse(playerid) >= 0) { return SendClientMessage(playerid, COLOR_GREY, "There is a house in range. Find somewhere else to create this one."); } GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); type--; for(new i = 0; i < MAX_HOUSES; i ++) { if(!HouseInfo[i][hExists]) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO houses (type, price, pos_x, pos_y, pos_z, pos_a, int_x, int_y, int_z, int_a, interior, outsideint, outsidevw) VALUES(%i, %i, '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', %i, %i, %i)", type, houseInteriors[type][intPrice], x, y, z, a - 180.0, houseInteriors[type][intX], houseInteriors[type][intY], houseInteriors[type][intZ], houseInteriors[type][intA], houseInteriors[type][intID], GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid)); mysql_tquery(connectionID, queryBuffer, "OnAdminCreateHouse", "iiiffff", playerid, i, type, x, y, z, a); return 1; } } SendClientMessage(playerid, COLOR_GREY, "House slots are currently full. Ask Emmet to increase the internal limit."); return 1; } CMD:edithouse(playerid, params[]) { new houseid, option[10], param[32]; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[10]S()[32]", houseid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /edithouse [houseid] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Entrance, Exit, World, Type, Owner, Price, RentPrice, Level, Locked"); return 1; } if(!(0 <= houseid < MAX_HOUSES) || !HouseInfo[houseid][hExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid house."); } if(!strcmp(option, "entrance", true)) { GetPlayerPos(playerid, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]); GetPlayerFacingAngle(playerid, HouseInfo[houseid][hPosA]); HouseInfo[houseid][hOutsideInt] = GetPlayerInterior(playerid); HouseInfo[houseid][hOutsideVW] = GetPlayerVirtualWorld(playerid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', outsideint = %i, outsidevw = %i WHERE id = %i", HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ], HouseInfo[houseid][hPosA], HouseInfo[houseid][hOutsideInt], HouseInfo[houseid][hOutsideVW], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); ReloadHouse(houseid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the entrance of house %i.", houseid); } else if(!strcmp(option, "exit", true)) { new type = -1; for(new i = 0; i < sizeof(houseInteriors); i ++) { if(IsPlayerInRangeOfPoint(playerid, 100.0, houseInteriors[i][intX], houseInteriors[i][intY], houseInteriors[i][intZ])) { type = i; } } GetPlayerPos(playerid, HouseInfo[houseid][hIntX], HouseInfo[houseid][hIntY], HouseInfo[houseid][hIntZ]); GetPlayerFacingAngle(playerid, HouseInfo[houseid][hIntA]); HouseInfo[houseid][hInterior] = GetPlayerInterior(playerid); HouseInfo[houseid][hType] = type; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET type = %i, int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i WHERE id = %i", type, HouseInfo[houseid][hIntX], HouseInfo[houseid][hIntY], HouseInfo[houseid][hIntZ], HouseInfo[houseid][hIntA], HouseInfo[houseid][hInterior], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); ReloadHouse(houseid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the exit of house %i.", houseid); } else if(!strcmp(option, "world", true)) { new worldid; if(sscanf(param, "i", worldid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /edithouse [houseid] [world] [vw]"); } HouseInfo[houseid][hWorld] = worldid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET world = %i WHERE id = %i", HouseInfo[houseid][hWorld], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); ReloadHouse(houseid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the virtual world of house %i to %i.", houseid, worldid); } else if(!strcmp(option, "type", true)) { new type; if(sscanf(param, "i", type)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /edithouse [houseid] [type] [value (1-%i)]", sizeof(houseInteriors)); } if(!(1 <= type <= sizeof(houseInteriors))) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } type--; HouseInfo[houseid][hType] = type; HouseInfo[houseid][hInterior] = houseInteriors[type][intID]; HouseInfo[houseid][hIntX] = houseInteriors[type][intX]; HouseInfo[houseid][hIntY] = houseInteriors[type][intY]; HouseInfo[houseid][hIntZ] = houseInteriors[type][intZ]; HouseInfo[houseid][hIntA] = houseInteriors[type][intA]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET type = %i, int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i, world = %i WHERE id = %i", type, HouseInfo[houseid][hIntX], HouseInfo[houseid][hIntY], HouseInfo[houseid][hIntZ], HouseInfo[houseid][hIntA], HouseInfo[houseid][hInterior], HouseInfo[houseid][hWorld], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); ReloadHouse(houseid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the type of house %i to %i.", houseid, type + 1); } else if(!strcmp(option, "owner", true)) { new targetid; if(sscanf(param, "u", targetid)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /edithouse [houseid] [owner] [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } SetHouseOwner(houseid, targetid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the owner of house %i to %s.", houseid, GetPlayerRPName(targetid)); } else if(!strcmp(option, "price", true)) { new price; if(sscanf(param, "i", price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /edithouse [houseid] [price] [value]"); } if(price < 0) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $0."); } HouseInfo[houseid][hPrice] = price; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET price = %i WHERE id = %i", HouseInfo[houseid][hPrice], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); ReloadHouse(houseid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the price of house %i to $%i.", houseid, price); } else if(!strcmp(option, "rentprice", true)) { new price; if(sscanf(param, "i", price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /edithouse [houseid] [rentprice] [value]"); } if(price < 0) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $0."); } HouseInfo[houseid][hRentPrice] = price; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET rentprice = %i WHERE id = %i", HouseInfo[houseid][hRentPrice], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); ReloadHouse(houseid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the rent price of house %i to $%i.", houseid, price); } else if(!strcmp(option, "level", true)) { new level; if(sscanf(param, "i", level)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /edithouse [houseid] [level] [value (0-5)]"); } if(!(0 <= level <= 5)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 5."); } HouseInfo[houseid][hLevel] = level; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET level = %i WHERE id = %i", HouseInfo[houseid][hLevel], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); ReloadHouse(houseid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the level of house %i to %i.", houseid, level); } else if(!strcmp(option, "locked", true)) { new locked; if(sscanf(param, "i", locked) || !(0 <= locked <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /edithouse [houseid] [locked] [0/1]"); } HouseInfo[houseid][hLocked] = locked; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET locked = %i WHERE id = %i", HouseInfo[houseid][hLocked], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); ReloadHouse(houseid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the lock state of house %i to %i.", houseid, locked); } return 1; } CMD:removefurniture(playerid, params[]) { new houseid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", houseid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removefurniture [houseid]"); } if(!(0 <= houseid < MAX_HOUSES) || !HouseInfo[houseid][hExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid house."); } RemoveAllFurniture(houseid); SendClientMessageEx(playerid, COLOR_AQUA, "** You have removed all furniture for house %i.", houseid); return 1; } CMD:removehouse(playerid, params[]) { new houseid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", houseid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removehouse [houseid]"); } if(!(0 <= houseid < MAX_HOUSES) || !HouseInfo[houseid][hExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid house."); } RemoveAllFurniture(houseid); DestroyDynamic3DTextLabel(HouseInfo[houseid][hText]); DestroyDynamicPickup(HouseInfo[houseid][hPickup]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM houses WHERE id = %i", HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); HouseInfo[houseid][hExists] = 0; HouseInfo[houseid][hID] = 0; HouseInfo[houseid][hOwnerID] = 0; SendClientMessageEx(playerid, COLOR_AQUA, "** You have removed house %i.", houseid); return 1; } CMD:gotohouse(playerid, params[]) { new houseid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "i", houseid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gotohouse [houseid]"); } if(!(0 <= houseid < MAX_HOUSES) || !HouseInfo[houseid][hExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid house."); } GameTextForPlayer(playerid, "~w~Teleported", 5000, 1); SetPlayerPos(playerid, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]); SetPlayerFacingAngle(playerid, HouseInfo[houseid][hPosA]); SetPlayerInterior(playerid, HouseInfo[houseid][hOutsideInt]); SetPlayerVirtualWorld(playerid, HouseInfo[houseid][hOutsideVW]); SetCameraBehindPlayer(playerid); return 1; } CMD:previewint(playerid, params[]) { new type, string[32]; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "i", type)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /previewint [1-%i]", sizeof(houseInteriors)); } if(!(1 <= type <= sizeof(houseInteriors))) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } type--; format(string, sizeof(string), "~w~%s", houseInteriors[type][intClass]); GameTextForPlayer(playerid, string, 5000, 1); SetPlayerPos(playerid, houseInteriors[type][intX], houseInteriors[type][intY], houseInteriors[type][intZ]); SetPlayerFacingAngle(playerid, houseInteriors[type][intA]); SetPlayerInterior(playerid, houseInteriors[type][intID]); SetCameraBehindPlayer(playerid); return 1; } CMD:nearest(playerid, params[]) { new id; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } SendClientMessage(playerid, COLOR_GREEN, "|______ Nearest Items ______|"); if((id = GetNearbyHouse(playerid)) >= 0) { SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of house ID %i.", id); } if((id = GetNearbyGarage(playerid)) >= 0) { SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of garage ID %i.", id); } if((id = GetNearbyBusiness(playerid)) >= 0) { SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of business ID %i.", id); } if((id = GetNearbyEntrance(playerid)) >= 0) { SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of entrance ID %i.", id); } if((id = GetNearbyLand(playerid)) >= 0) { SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of land ID %i.", id); } if((id = GetNearbyTurf(playerid)) >= 0) { SendClientMessageEx(playerid, COLOR_GREY2, "You are in range of turf ID %i.", id); } return 1; } CMD:dynamichelp(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } SendClientMessage(playerid, COLOR_GREEN, "HOUSES:{DDDDDD} /createhouse, /edithouse, /removehouse, /gotohouse, /asellhouse, /removefurniture."); SendClientMessage(playerid, COLOR_GREEN, "GARAGES:{DDDDDD} /creategarage, /editgarage, /removegarage, /gotogarage, /asellgarage."); SendClientMessage(playerid, COLOR_GREEN, "BUSINESSES:{DDDDDD} /createbiz, /editbiz, /removebiz, /gotobiz, /asellbiz."); SendClientMessage(playerid, COLOR_GREEN, "ENTRANCES:{DDDDDD} /createentrance, /editentrance, /removeentrance, /gotoentrance."); SendClientMessage(playerid, COLOR_GREEN, "LANDS:{DDDDDD} /createland, /landcancel, /removeland, /gotoland, /asellland, /removelandobjects."); SendClientMessage(playerid, COLOR_GREEN, "FACTIONS:{DDDDDD} /createfaction, /editfaction, /removefaction, /setfaction, /purgefaction."); SendClientMessage(playerid, COLOR_GREEN, "GANGS:{DDDDDD} /creategang, /editgang, /removegang, /gangstrike, /setgang."); SendClientMessage(playerid, COLOR_GREEN, "POINTS:{DDDDDD} /createpoint, /editpoint, /removepoint, /gotopoint."); SendClientMessage(playerid, COLOR_GREEN, "TURFS:{DDDDDD} /createturf, /turfcancel, /editturf, /removeturf, /gototurf."); SendClientMessage(playerid, COLOR_GREEN, "FIRES:{DDDDDD} /randomfire, /killfire, /spawnfire."); return 1; } CMD:asellhouse(playerid, params[]) { new houseid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", houseid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /asellhouse [houseid]"); } if(!(0 <= houseid < MAX_HOUSES) || !HouseInfo[houseid][hExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid house."); } SetHouseOwner(houseid, INVALID_PLAYER_ID); SendClientMessageEx(playerid, COLOR_AQUA, "** You have admin sold house %i.", houseid); return 1; } CMD:asellgarage(playerid, params[]) { new garageid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", garageid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /asellgarage [garageid]"); } if(!(0 <= garageid < MAX_GARAGES) || !GarageInfo[garageid][gExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid garage."); } SetGarageOwner(garageid, INVALID_PLAYER_ID); SendClientMessageEx(playerid, COLOR_AQUA, "** You have admin sold garage %i.", garageid); return 1; } CMD:asellbiz(playerid, params[]) { new businessid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", businessid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /asellbiz [businessid]"); } if(!(0 <= businessid < MAX_BUSINESSES) || !BusinessInfo[businessid][bExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid business."); } SetBusinessOwner(businessid, INVALID_PLAYER_ID); SendClientMessageEx(playerid, COLOR_AQUA, "** You have admin sold business %i.", businessid); return 1; } CMD:asellland(playerid, params[]) { new landid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", landid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /asellland [landid]"); } if(!(0 <= landid < MAX_LANDS) || !LandInfo[landid][lExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid land."); } SetLandOwner(landid, INVALID_PLAYER_ID); SendClientMessageEx(playerid, COLOR_AQUA, "** You have admin sold land %i.", landid); return 1; } CMD:enter(playerid, params[]) { if(PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pCuffed] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(IsPlayerInRangeOfPoint(playerid, 3.0, 1738.7400, -1269.8062, 13.5433)) { if(PlayerInfo[playerid][pWeaponRestricted] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are restricted from weapons and therefore can't join paintball."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s has entered the paintball arena.", GetPlayerRPName(playerid)); SetPlayerInPaintball(playerid); foreach(new i : Player) { if(PlayerInfo[i][pPaintball]) { SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s has entered the paintball arena. ))", GetPlayerRPName(playerid)); } } } else { EnterCheck(playerid); } return 1; } CMD:exit(playerid, params[]) { if(PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pCuffed] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(PlayerInfo[playerid][pPaintball]) { foreach(new i : Player) { if(PlayerInfo[i][pPaintball]) { SendClientMessageEx(i, COLOR_LIGHTORANGE, "(( %s has left the paintball arena. ))", GetPlayerRPName(playerid)); } } ResetPlayerWeapons(playerid); SetPlayerArmedWeapon(playerid, 0); PlayerInfo[playerid][pPaintball] = 0; SetPlayerToSpawn(playerid); } else { ExitCheck(playerid); } return 1; } CMD:buyhouse(playerid, params[]) { new houseid, type[16]; if((houseid = GetNearbyHouse(playerid)) == -1) { return SendClientMessage(playerid, COLOR_GREY, "There is no house in range. You must be near a house."); } if(strcmp(params, "confirm", true) != 0) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /buyhouse [confirm]"); } if(HouseInfo[houseid][hOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "This house already has an owner."); } if(PlayerInfo[playerid][pCash] < HouseInfo[houseid][hPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this house."); } if(GetPlayerAssetCount(playerid, LIMIT_HOUSES) >= GetPlayerAssetLimit(playerid, LIMIT_HOUSES)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i houses. You can't own anymore unless you upgrade your asset perk.", GetPlayerAssetCount(playerid, LIMIT_HOUSES), GetPlayerAssetLimit(playerid, LIMIT_HOUSES)); } if(HouseInfo[houseid][hType]) { type = "House"; } else { strcpy(type, houseInteriors[HouseInfo[houseid][hType]][intClass]); } SetHouseOwner(houseid, playerid); GivePlayerCash(playerid, -HouseInfo[houseid][hPrice]); SendClientMessageEx(playerid, COLOR_GREEN, "You paid $%i to make this house yours! /househelp for a list of commands.", HouseInfo[houseid][hPrice]); Log_Write("log_property", "%s (uid: %i) purchased %s (id: %i) for $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], type, HouseInfo[houseid][hID], HouseInfo[houseid][hPrice]); return 1; } CMD:alock(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] > 1) { SendClientMessage(playerid, COLOR_GREY, "As an administrator you can lock or unlock anything using /lock if you're on admin duty."); } return 1; } CMD:lock(playerid, params[]) { new id; for(new i = 0; i <= Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i ++) { if(IsValidDynamicObject(i) && IsPlayerInRangeOfDynamicObject(playerid, i, 2.5) && IsDoorObject(i)) { if((id = GetInsideHouse(playerid)) >= 0 && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_FURNITURE && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == HouseInfo[id][hID]) { if(!(IsHouseOwner(playerid, id) || PlayerInfo[playerid][pRentingHouse] == HouseInfo[id][hID] || PlayerInfo[playerid][pFurniturePerms] == id)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have permission from the house owner to lock this door."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT door_locked FROM furniture WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID)); mysql_tquery(connectionID, queryBuffer, "OnPlayerLockFurnitureDoor", "ii", playerid, Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID)); return 1; } else if((id = GetNearbyLand(playerid)) >= 0 && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_LAND && Streamer_GetExtraInt(i, E_OBJECT_EXTRA_ID) == LandInfo[id][lID]) { if(!(IsLandOwner(playerid, id) || PlayerInfo[playerid][pLandPerms] == id)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have permission from the land owner to lock this door."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT door_locked FROM landobjects WHERE id = %i", Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID)); mysql_tquery(connectionID, queryBuffer, "OnPlayerLockLandDoor", "ii", playerid, Streamer_GetExtraInt(i, E_OBJECT_INDEX_ID)); return 1; } } } if((id = GetNearbyVehicle(playerid)) != INVALID_VEHICLE_ID && (IsVehicleOwner(playerid, id) || PlayerInfo[playerid][pVehicleKeys] == id || (VehicleInfo[id][vGang] >= 0 && VehicleInfo[id][vGang] == PlayerInfo[playerid][pGang]))) { if(!VehicleInfo[id][vLocked]) { VehicleInfo[id][vLocked] = 1; GameTextForPlayer(playerid, "~r~Vehicle locked", 3000, 6); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s locks their %s.", GetPlayerRPName(playerid), GetVehicleName(id)); } else { VehicleInfo[id][vLocked] = 0; GameTextForPlayer(playerid, "~g~Vehicle unlocked", 3000, 6); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s unlocks their %s.", GetPlayerRPName(playerid), GetVehicleName(id)); } SetVehicleParams(id, VEHICLE_DOORS, VehicleInfo[id][vLocked]); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET locked = %i WHERE id = %i", VehicleInfo[id][vLocked], VehicleInfo[id][vID]); mysql_tquery(connectionID, queryBuffer); return 1; } else if((id = GetNearbyHouseEx(playerid)) >= 0 && (IsHouseOwner(playerid, id) || PlayerInfo[playerid][pRentingHouse] == HouseInfo[id][hID])) { if(!HouseInfo[id][hLocked]) { HouseInfo[id][hLocked] = 1; GameTextForPlayer(playerid, "~r~House locked", 3000, 6); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s locks their house door.", GetPlayerRPName(playerid)); } else { HouseInfo[id][hLocked] = 0; GameTextForPlayer(playerid, "~g~House unlocked", 3000, 6); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s unlocks their house door.", GetPlayerRPName(playerid)); } PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET locked = %i WHERE id = %i", HouseInfo[id][hLocked], HouseInfo[id][hID]); mysql_tquery(connectionID, queryBuffer); return 1; } else if((id = GetNearbyGarageEx(playerid)) >= 0 && IsGarageOwner(playerid, id)) { if(!GarageInfo[id][gLocked]) { GarageInfo[id][gLocked] = 1; GameTextForPlayer(playerid, "~r~Garage locked", 3000, 6); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s locks their garage door.", GetPlayerRPName(playerid)); } else { GarageInfo[id][gLocked] = 0; GameTextForPlayer(playerid, "~g~Garage unlocked", 3000, 6); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s unlocks their garage door.", GetPlayerRPName(playerid)); } PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET locked = %i WHERE id = %i", GarageInfo[id][gLocked], GarageInfo[id][gID]); mysql_tquery(connectionID, queryBuffer); return 1; } else if((id = GetNearbyBusinessEx(playerid)) >= 0 && IsBusinessOwner(playerid, id)) { if(!BusinessInfo[id][bLocked]) { BusinessInfo[id][bLocked] = 1; GameTextForPlayer(playerid, "~r~Business locked", 3000, 6); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s locks their business door.", GetPlayerRPName(playerid)); } else { BusinessInfo[id][bLocked] = 0; GameTextForPlayer(playerid, "~g~Business unlocked", 3000, 6); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s unlocks their business door.", GetPlayerRPName(playerid)); } PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET locked = %i WHERE id = %i", BusinessInfo[id][bLocked], BusinessInfo[id][bID]); mysql_tquery(connectionID, queryBuffer); return 1; } else if((id = GetNearbyEntranceEx(playerid)) >= 0) { new correct_pass; if(!IsEntranceOwner(playerid, id) && strcmp(EntranceInfo[id][ePassword], "None", true) != 0) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /lock [password]"); } else if(strcmp(params, EntranceInfo[id][ePassword]) != 0) { return SendClientMessage(playerid, COLOR_GREY, "Incorrect password."); } else { correct_pass = true; } } if((correct_pass) || IsEntranceOwner(playerid, id)) { if(!EntranceInfo[id][eLocked]) { EntranceInfo[id][eLocked] = 1; GameTextForPlayer(playerid, "~r~Entrance locked", 3000, 6); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s locks their entrance door.", GetPlayerRPName(playerid)); } else { EntranceInfo[id][eLocked] = 0; GameTextForPlayer(playerid, "~g~Entrance unlocked", 3000, 6); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s unlocks their entrance door.", GetPlayerRPName(playerid)); } PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET locked = %i WHERE id = %i", EntranceInfo[id][eLocked], EntranceInfo[id][eID]); mysql_tquery(connectionID, queryBuffer); } return 1; } SendClientMessage(playerid, COLOR_GREY, "You are not close to anything which you can lock."); return 1; } CMD:househelp(playerid, params[]) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [House Commands] /buyhouse, /lock, /stash, /furniture, /upgradehouse, /sellhouse, /sellmyhouse."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [House Commands] /door, /renthouse, /unrent, /setrent, /tenants, /evict, /evictall, /houseinfo."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [House Commands] /houseinvite"); return 1; } CMD:stash(playerid, params[]) { new houseid; if((houseid = GetInsideHouse(playerid)) >= 0 && IsHouseOwner(playerid, houseid)) { new option[14], param[32]; if(!HouseInfo[houseid][hLevel]) { return SendClientMessage(playerid, COLOR_GREY, "This house has no stash upgrade. '/upgradehouse level' to purchase one."); } if(sscanf(params, "s[14]S()[32]", option, param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [balance | deposit | withdraw]"); } if(!strcmp(option, "balance", true)) { new count; for(new i = 0; i < 10; i ++) { if(HouseInfo[houseid][hWeapons][i]) { count++; } } SendClientMessage(playerid, COLOR_GREEN, "|_____ Stash Balance _____|"); SendClientMessageEx(playerid, COLOR_GREY2, "Cash: $%i/$%i", HouseInfo[houseid][hCash], GetHouseStashCapacity(houseid, STASH_CAPACITY_CASH)); SendClientMessageEx(playerid, COLOR_GREY2, "Materials: %i/%i | Weapons: %i/%i", HouseInfo[houseid][hMaterials], GetHouseStashCapacity(houseid, STASH_CAPACITY_MATERIALS), count, GetHouseStashCapacity(houseid, STASH_CAPACITY_WEAPONS)); SendClientMessageEx(playerid, COLOR_GREY2, "Weed: %i/%i grams | Cocaine: %i/%i grams", HouseInfo[houseid][hWeed], GetHouseStashCapacity(houseid, STASH_CAPACITY_WEED), HouseInfo[houseid][hCocaine], GetHouseStashCapacity(houseid, STASH_CAPACITY_COCAINE)); SendClientMessageEx(playerid, COLOR_GREY2, "Meth: %i/%i grams | Painkillers: %i/%i pills", HouseInfo[houseid][hMeth], GetHouseStashCapacity(houseid, STASH_CAPACITY_METH), HouseInfo[houseid][hPainkillers], GetHouseStashCapacity(houseid, STASH_CAPACITY_PAINKILLERS)); SendClientMessage(playerid, COLOR_GREEN, "|_____ Stash Ammunition_____|"); SendClientMessageEx(playerid, COLOR_GREY2, "HP Ammo: %i/%i | Poison Ammo: %i/%i", HouseInfo[houseid][hHPAmmo], GetHouseStashCapacity(houseid, STASH_CAPACITY_HPAMMO), HouseInfo[houseid][hPoisonAmmo], GetHouseStashCapacity(houseid, STASH_CAPACITY_POISONAMMO)); SendClientMessageEx(playerid, COLOR_GREY2, "FMJ Ammo: %i/%i", HouseInfo[houseid][hFMJAmmo], GetHouseStashCapacity(houseid, STASH_CAPACITY_FMJAMMO)); if(count > 0) { SendClientMessage(playerid, COLOR_GREEN, "|_____ Stash Weapons _____|"); for(new i = 0; i < 10; i ++) { if(HouseInfo[houseid][hWeapons][i]) { SendClientMessageEx(playerid, COLOR_GREY2, "[%i] Weapon: %s", i + 1, GetWeaponNameEx(HouseInfo[houseid][hWeapons][i])); } } } } else if(!strcmp(option, "deposit", true)) { new value; if(sscanf(param, "s[14]S()[32]", option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [deposit] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Cash, Materials, Weed, Cocaine, Meth, Painkillers, Weapon"); SendClientMessage(playerid, COLOR_GREY3, "List of options: HPAmmo, PoisonAmmo, FMJAmmo"); return 1; } if(!strcmp(option, "cash", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [deposit] [cash] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pCash]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(GetHouseStashCapacity(houseid, STASH_CAPACITY_CASH) < HouseInfo[houseid][hCash] + value) { return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to $%i at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_CASH)); } GivePlayerCash(playerid, -value); HouseInfo[houseid][hCash] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET cash = %i WHERE id = %i", HouseInfo[houseid][hCash], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored $%i in your house stash.", value); } else if(!strcmp(option, "materials", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [deposit] [materials] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pMaterials]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(GetHouseStashCapacity(houseid, STASH_CAPACITY_MATERIALS) < HouseInfo[houseid][hMaterials] + value) { return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i materials at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_MATERIALS)); } PlayerInfo[playerid][pMaterials] -= value; HouseInfo[houseid][hMaterials] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET materials = %i WHERE id = %i", HouseInfo[houseid][hMaterials], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %i materials in your house stash.", value); } else if(!strcmp(option, "weed", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [deposit] [weed] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pWeed]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(GetHouseStashCapacity(houseid, STASH_CAPACITY_WEED) < HouseInfo[houseid][hWeed] + value) { return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i grams of weed at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_WEED)); } PlayerInfo[playerid][pWeed] -= value; HouseInfo[houseid][hWeed] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET weed = %i WHERE id = %i", HouseInfo[houseid][hWeed], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[playerid][pWeed], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %ig of weed in your house stash.", value); } else if(!strcmp(option, "cocaine", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [deposit] [cocaine] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pCocaine]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(GetHouseStashCapacity(houseid, STASH_CAPACITY_COCAINE) < HouseInfo[houseid][hCocaine] + value) { return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i grams of cocaine at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_COCAINE)); } PlayerInfo[playerid][pCocaine] -= value; HouseInfo[houseid][hCocaine] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET cocaine = %i WHERE id = %i", HouseInfo[houseid][hCocaine], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %ig of cocaine in your house stash.", value); } else if(!strcmp(option, "meth", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [deposit] [meth] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pMeth]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(GetHouseStashCapacity(houseid, STASH_CAPACITY_METH) < HouseInfo[houseid][hMeth] + value) { return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i grams of meth at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_METH)); } PlayerInfo[playerid][pMeth] -= value; HouseInfo[houseid][hMeth] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET meth = %i WHERE id = %i", HouseInfo[houseid][hMeth], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %ig of meth in your house stash.", value); } else if(!strcmp(option, "painkillers", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [deposit] [painkillers] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pPainkillers]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(GetHouseStashCapacity(houseid, STASH_CAPACITY_PAINKILLERS) < HouseInfo[houseid][hPainkillers] + value) { return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i painkillers at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_PAINKILLERS)); } PlayerInfo[playerid][pPainkillers] -= value; HouseInfo[houseid][hPainkillers] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET painkillers = %i WHERE id = %i", HouseInfo[houseid][hPainkillers], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", PlayerInfo[playerid][pPainkillers], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %i painkillers in your house stash.", value); } else if(!strcmp(option, "weapon", true)) { new weaponid; if(sscanf(param, "i", weaponid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [deposit] [weapon] [weaponid] (/guninv for weapon IDs)"); } if(!(1 <= weaponid <= 46) || PlayerInfo[playerid][pWeapons][weaponSlotIDs[weaponid]] != weaponid) { return SendClientMessage(playerid, COLOR_GREY, "You don't have that weapon. /guninv for a list of your weapons."); } if(GetPlayerHealthEx(playerid) < 60) { return SendClientMessage(playerid, COLOR_GREY, "You can't store weapons as your health is below 60."); } for(new i = 0; i < GetHouseStashCapacity(houseid, STASH_CAPACITY_WEAPONS); i ++) { if(!HouseInfo[houseid][hWeapons][i]) { HouseInfo[houseid][hWeapons][i] = weaponid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET weapon_%i = %i WHERE id = %i", i + 1, HouseInfo[houseid][hWeapons][i], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); RemovePlayerWeapon(playerid, weaponid); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored a %s in slot %i of your house stash.", GetWeaponNameEx(HouseInfo[houseid][hWeapons][i]), value + 1); return 1; } } SendClientMessage(playerid, COLOR_GREY, "Your house stash has no more slots available for weapons."); } else if(!strcmp(option, "hpammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [deposit] [hpammo] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pHPAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(GetHouseStashCapacity(houseid, STASH_CAPACITY_HPAMMO) < HouseInfo[houseid][hHPAmmo] + value) { return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i hollow point ammo at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_HPAMMO)); } SetWeaponAmmo(playerid, AMMO_HP, PlayerInfo[playerid][pHPAmmo] - value); HouseInfo[houseid][hHPAmmo] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET hpammo = %i WHERE id = %i", HouseInfo[houseid][hHPAmmo], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %i rounds of hollow point ammo in your house stash.", value); } else if(!strcmp(option, "poisonammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [deposit] [poisonammo] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pPoisonAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(GetHouseStashCapacity(houseid, STASH_CAPACITY_POISONAMMO) < HouseInfo[houseid][hPoisonAmmo] + value) { return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i poison tip ammo at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_POISONAMMO)); } SetWeaponAmmo(playerid, AMMO_POISON, PlayerInfo[playerid][pPoisonAmmo] - value); HouseInfo[houseid][hPoisonAmmo] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET poisonammo = %i WHERE id = %i", HouseInfo[houseid][hPoisonAmmo], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %i rounds of poison tip ammo in your house stash.", value); } else if(!strcmp(option, "fmjammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [deposit] [fmjammo] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pFMJAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(GetHouseStashCapacity(houseid, STASH_CAPACITY_FMJAMMO) < HouseInfo[houseid][hFMJAmmo] + value) { return SendClientMessageEx(playerid, COLOR_GREY, "Your stash can only hold up to %i FMJ ammo at your house's level.", GetHouseStashCapacity(houseid, STASH_CAPACITY_FMJAMMO)); } SetWeaponAmmo(playerid, AMMO_FMJ, PlayerInfo[playerid][pFMJAmmo] - value); HouseInfo[houseid][hFMJAmmo] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET fmjammo = %i WHERE id = %i", HouseInfo[houseid][hFMJAmmo], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %i rounds of full metal jacket ammo in your house stash.", value); } } else if(!strcmp(option, "withdraw", true)) { new value; if(sscanf(param, "s[14]S()[32]", option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [withdraw] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Cash, Weed, Cocaine, Meth, Painkillers, Weapon"); SendClientMessage(playerid, COLOR_GREY3, "List of options: HPAmmo, PoisonAmmo, FMJAmmo"); return 1; } if(!strcmp(option, "cash", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [withdraw] [cash] [amount]"); } if(value < 1 || value > HouseInfo[houseid][hCash]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } GivePlayerCash(playerid, value); HouseInfo[houseid][hCash] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET cash = %i WHERE id = %i", HouseInfo[houseid][hCash], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken $%i from your house stash.", value); } else if(!strcmp(option, "materials", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [withdraw] [materials] [amount]"); } if(value < 1 || value > HouseInfo[houseid][hMaterials]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pMaterials] + value > GetPlayerCapacity(playerid, CAPACITY_MATERIALS)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS)); } PlayerInfo[playerid][pMaterials] += value; HouseInfo[houseid][hMaterials] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET materials = %i WHERE id = %i", HouseInfo[houseid][hMaterials], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %i materials from your house stash.", value); } else if(!strcmp(option, "weed", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [withdraw] [weed] [amount]"); } if(value < 1 || value > HouseInfo[houseid][hWeed]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pWeed] + value > GetPlayerCapacity(playerid, CAPACITY_WEED)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED)); } PlayerInfo[playerid][pWeed] += value; HouseInfo[houseid][hWeed] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET weed = %i WHERE id = %i", HouseInfo[houseid][hWeed], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[playerid][pWeed], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %ig of weed from your house stash.", value); } else if(!strcmp(option, "cocaine", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [withdraw] [cocaine] [amount]"); } if(value < 1 || value > HouseInfo[houseid][hCocaine]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pCocaine] + value > GetPlayerCapacity(playerid, CAPACITY_COCAINE)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE)); } PlayerInfo[playerid][pCocaine] += value; HouseInfo[houseid][hCocaine] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET cocaine = %i WHERE id = %i", HouseInfo[houseid][hCocaine], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %ig of cocaine from your house stash.", value); } else if(!strcmp(option, "meth", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [withdraw] [meth] [amount]"); } if(value < 1 || value > HouseInfo[houseid][hMeth]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pMeth] + value > GetPlayerCapacity(playerid, CAPACITY_METH)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i meth. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH)); } PlayerInfo[playerid][pMeth] += value; HouseInfo[houseid][hMeth] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET meth = %i WHERE id = %i", HouseInfo[houseid][hMeth], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %ig of meth from your house stash.", value); } else if(!strcmp(option, "painkillers", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [withdraw] [painkillers] [amount]"); } if(value < 1 || value > HouseInfo[houseid][hPainkillers]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pPainkillers] + value > GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i painkillers. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pPainkillers], GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS)); } PlayerInfo[playerid][pPainkillers] += value; HouseInfo[houseid][hPainkillers] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET painkillers = %i WHERE id = %i", HouseInfo[houseid][hPainkillers], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", PlayerInfo[playerid][pPainkillers], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %i painkillers from your house stash.", value); } else if(!strcmp(option, "weapon", true)) { new slots = GetHouseStashCapacity(houseid, STASH_CAPACITY_WEAPONS); if(sscanf(param, "i", value)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /stash [withdraw] [weapon] [slot (1-%i)]", slots); } if(value < 1 || value > slots) { return SendClientMessage(playerid, COLOR_GREY, "Invalid slot, or the slot specified is locked."); } if(!HouseInfo[houseid][hWeapons][value-1]) { return SendClientMessage(playerid, COLOR_GREY, "The slot specified contains no weapon which you can take."); } GivePlayerWeaponEx(playerid, HouseInfo[houseid][hWeapons][value-1]); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken a %s from slot %i of your house stash.", GetWeaponNameEx(HouseInfo[houseid][hWeapons][value-1]), value); HouseInfo[houseid][hWeapons][value-1] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET weapon_%i = 0 WHERE id = %i", value, HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "hpammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [withdraw] [hpammo] [amount]"); } if(value < 1 || value > HouseInfo[houseid][hHPAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pHPAmmo] + value > GetPlayerCapacity(playerid, CAPACITY_HPAMMO)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i HP ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pHPAmmo], GetPlayerCapacity(playerid, CAPACITY_HPAMMO)); } SetWeaponAmmo(playerid, AMMO_HP, PlayerInfo[playerid][pHPAmmo] + value); HouseInfo[houseid][hHPAmmo] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET hpammo = %i WHERE id = %i", HouseInfo[houseid][hHPAmmo], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %i rounds of hollow point ammo from your house stash.", value); } else if(!strcmp(option, "poisonammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [withdraw] [poisonammo] [amount]"); } if(value < 1 || value > HouseInfo[houseid][hPoisonAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pPoisonAmmo] + value > GetPlayerCapacity(playerid, CAPACITY_POISONAMMO)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i poison ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pPoisonAmmo], GetPlayerCapacity(playerid, CAPACITY_POISONAMMO)); } SetWeaponAmmo(playerid, AMMO_POISON, PlayerInfo[playerid][pPoisonAmmo] + value); HouseInfo[houseid][hPoisonAmmo] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET poisonammo = %i WHERE id = %i", HouseInfo[houseid][hPoisonAmmo], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %i rounds of poison tip ammo from your house stash.", value); } else if(!strcmp(option, "fmjammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stash [withdraw] [fmjammo] [amount]"); } if(value < 1 || value > HouseInfo[houseid][hFMJAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pFMJAmmo] + value > GetPlayerCapacity(playerid, CAPACITY_FMJAMMO)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i FMJ ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pFMJAmmo], GetPlayerCapacity(playerid, CAPACITY_FMJAMMO)); } SetWeaponAmmo(playerid, AMMO_FMJ, PlayerInfo[playerid][pFMJAmmo] + value); HouseInfo[houseid][hFMJAmmo] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET fmjammo = %i WHERE id = %i", HouseInfo[houseid][hFMJAmmo], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %i rounds of full metal jacket ammo from your house stash.", value); } } } else { SendClientMessage(playerid, COLOR_GREY, "You are not in range of any stash which you can use."); } return 1; } CMD:upgradehouse(playerid, params[]) { new houseid = GetNearbyHouseEx(playerid), option[10], param[12], string[20]; if(houseid == -1 || !IsHouseOwner(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours."); } if(sscanf(params, "s[10]S()[12]", option, param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /upgradehouse [level/interior]"); } if(!strcmp(option, "level", true)) { new cost = (HouseInfo[houseid][hLevel] * 25000) + 25000; if(HouseInfo[houseid][hLevel] >= 5) { return SendClientMessage(playerid, COLOR_GREY, "Your house is already at the maximum level possible."); } if(isnull(param) || strcmp(param, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /upgradehouse [level] [confirm]"); SendClientMessageEx(playerid, COLOR_GREY3, "You are about to upgrade to level %i/5 which will cost you $%i.", HouseInfo[houseid][hLevel] + 1, cost); return 1; } if(PlayerInfo[playerid][pCash] < cost) { return SendClientMessage(playerid, COLOR_GREY, "You don't have that much cash."); } HouseInfo[houseid][hLevel]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET level = level + 1 WHERE id = %i", HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); format(string, sizeof(string), "~r~-$%i", cost); GameTextForPlayer(playerid, string, 5000, 1); GivePlayerCash(playerid, -cost); ReloadHouse(houseid); if(HouseInfo[houseid][hLevel] == 1) { SendClientMessageEx(playerid, COLOR_GREEN, "You have upgraded your house to level %i/5. You unlocked a stash for your house! (/stash)", HouseInfo[houseid][hLevel]); } else { SendClientMessageEx(playerid, COLOR_GREEN, "You have upgraded your house to level %i/5. Your stash capacity was increased.", HouseInfo[houseid][hLevel]); } SendClientMessageEx(playerid, COLOR_GREEN, "Your tenant and furniture capacity were also both increased to %i/%i.", GetHouseTenantCapacity(houseid), GetHouseFurnitureCapacity(houseid)); Log_Write("log_property", "%s (uid: %i) upgraded their house (id: %i) to level %i for $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], HouseInfo[houseid][hID], HouseInfo[houseid][hLevel], cost); } else if(!strcmp(option, "interior", true)) { for(new i = HouseInfo[houseid][hType] + 1; i < sizeof(houseInteriors); i ++) { if(!strcmp(houseInteriors[i][intClass], houseInteriors[HouseInfo[houseid][hType]][intClass])) { if(isnull(param) || strcmp(param, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /upgradehouse [interior] [confirm]"); SendClientMessageEx(playerid, COLOR_GREY3, "You are about to upgrade your interior to the next one in the class for $%i.", houseInteriors[i][intPrice]); return 1; } if(PlayerInfo[playerid][pCash] < houseInteriors[i][intPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford the upgrade."); } foreach(new x : Player) { if(GetInsideHouse(x) == houseid) { SetPlayerPos(x, houseInteriors[i][intX], houseInteriors[i][intY], houseInteriors[i][intZ]); SetPlayerFacingAngle(x, houseInteriors[i][intA]); SetPlayerInterior(x, houseInteriors[i][intID]); SetCameraBehindPlayer(x); } } GivePlayerCash(playerid, -houseInteriors[i][intPrice]); HouseInfo[houseid][hType] = i; HouseInfo[houseid][hPrice] = houseInteriors[i][intPrice]; HouseInfo[houseid][hInterior] = houseInteriors[i][intID]; HouseInfo[houseid][hIntX] = houseInteriors[i][intX]; HouseInfo[houseid][hIntY] = houseInteriors[i][intY]; HouseInfo[houseid][hIntZ] = houseInteriors[i][intZ]; HouseInfo[houseid][hIntA] = houseInteriors[i][intA]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET type = %i, price = %i, int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i, world = %i WHERE id = %i", i, HouseInfo[houseid][hPrice], HouseInfo[houseid][hIntX], HouseInfo[houseid][hIntY], HouseInfo[houseid][hIntZ], HouseInfo[houseid][hIntA], HouseInfo[houseid][hInterior], HouseInfo[houseid][hWorld], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_GREEN, "You have upgraded to the next interior in the class for $%i.", houseInteriors[i][intPrice]); Log_Write("log_property", "%s (uid: %i) upgraded their house interior (id: %i) to interior %i for $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], HouseInfo[houseid][hID], i, houseInteriors[i][intPrice]); return 1; } } SendClientMessage(playerid, COLOR_GREY, "Your house's interior is already at its maximum in its class. You cannot upgrade it any further."); } return 1; } CMD:sellhouse(playerid, params[]) { new houseid = GetNearbyHouseEx(playerid), targetid, amount; if(houseid == -1 || !IsHouseOwner(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours."); } if(sscanf(params, "ui", targetid, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sellhouse [playerid] [amount]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself."); } if(amount < 1) { return SendClientMessage(playerid, COLOR_GREY, "You must specify an amount above zero."); } PlayerInfo[targetid][pHouseOffer] = playerid; PlayerInfo[targetid][pHouseOffered] = houseid; PlayerInfo[targetid][pHousePrice] = amount; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered you their house for $%i (/accept house).", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered %s to buy your house for $%i.", GetPlayerRPName(targetid), amount); return 1; } CMD:sellmyhouse(playerid, params[]) { new houseid = GetNearbyHouseEx(playerid); if(houseid == -1 || !IsHouseOwner(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours."); } if(strcmp(params, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sellmyhouse [confirm]"); SendClientMessageEx(playerid, COLOR_GREY3, "This command sells your house back to the state. You will receive $%i back.", percent(HouseInfo[houseid][hPrice], 75)); return 1; } SetHouseOwner(houseid, INVALID_PLAYER_ID); GivePlayerCash(playerid, percent(HouseInfo[houseid][hPrice], 75)); SendClientMessageEx(playerid, COLOR_GREEN, "You have sold your house to the state and received $%i back.", percent(HouseInfo[houseid][hPrice], 75)); Log_Write("log_property", "%s (uid: %i) sold their house (id: %i) to the state for $%i", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], HouseInfo[houseid][hID], percent(HouseInfo[houseid][hPrice], 75)); return 1; } CMD:houseinfo(playerid, params[]) { new houseid = GetNearbyHouseEx(playerid); if(houseid == -1 || !IsHouseOwner(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT (SELECT COUNT(*) FROM furniture WHERE houseid = %i) AS furnitureCount, (SELECT COUNT(*) FROM users WHERE rentinghouse = %i) AS tenantCount", HouseInfo[houseid][hID], HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_HOUSE_INFORMATION, playerid); return 1; } CMD:makeadmin(playerid, params[]) { new targetid, level; if(PlayerInfo[playerid][pAdmin] < 0) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "ui", targetid, level)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /makeadmin [playerid] [level]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(!(0 <= level <= 6)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 6."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin] && level < PlayerInfo[targetid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be demoted."); } if(level == 0 && PlayerInfo[targetid][pAdminDuty]) { SetPlayerName(targetid, PlayerInfo[targetid][pUsername]); SetPlayerSpecialTag(targetid, TAG_NONE); PlayerInfo[targetid][pAdminDuty] = 0; } PlayerInfo[targetid][pAdmin] = level; SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a %s (%i).", GetPlayerRPName(playerid), GetPlayerRPName(targetid), GetAdminRank(targetid), level); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET adminlevel = %i WHERE uid = %i", level, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); if(level == 0) { SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's administrator powers.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your administrator powers.", GetPlayerRPName(playerid)); } else { SendClientMessageEx(playerid, COLOR_AQUA, "You have set %s's admin level to {FF6347}%s{33CCFF} (%i).", GetPlayerRPName(targetid), GetAdminRank(targetid), level); SendClientMessageEx(targetid, COLOR_AQUA, "%s has set your admin level to {FF6347}%s{33CCFF} (%i).", GetPlayerRPName(playerid), GetAdminRank(targetid), level); } Log_Write("log_admin", "%s (uid: %i) set %s's (uid: %i) admin level to %i", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], level); return 1; } CMD:makehelper(playerid, params[]) { new targetid, level; if(PlayerInfo[playerid][pAdmin] < 6 && PlayerInfo[playerid][pHelper] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "ui", targetid, level)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /makehelper [playerid] [level]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(!(0 <= level <= 4)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 4."); } if((PlayerInfo[playerid][pAdmin] < 6) && PlayerInfo[targetid][pHelper] > PlayerInfo[playerid][pHelper] && level < PlayerInfo[targetid][pHelper]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher helper level than you. They cannot be demoted."); } if(level == 0 && PlayerInfo[targetid][pTagType] == TAG_HELPER) { SetPlayerSpecialTag(targetid, TAG_NONE); } SendStaffMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a level %i helper.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), level); PlayerInfo[targetid][pHelper] = level; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET helperlevel = %i WHERE uid = %i", level, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {00AA00}%s{33CCFF} (%i).", GetPlayerRPName(targetid), GetHelperRank(targetid), level); SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {00AA00}%s{33CCFF} (%i).", GetPlayerRPName(playerid), GetHelperRank(targetid), level); Log_Write("log_admin", "%s (uid: %i) set %s's (uid: %i) helper level to %i", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], level); return 1; } CMD:omakeadmin(playerid, params[]) { new username[MAX_PLAYER_NAME], level; if(PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]i", username, level)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /omakeadmin [username] [level]"); } if(!(0 <= level <= 6)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 6."); } if(IsPlayerOnline(username)) { return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use /makeadmin instead."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT adminlevel FROM users WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer, "OnAdminSetAdminLevel", "isi", playerid, username, level); return 1; } CMD:omakehelper(playerid, params[]) { new username[MAX_PLAYER_NAME], level; if(PlayerInfo[playerid][pAdmin] < 6 && PlayerInfo[playerid][pHelper] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[24]i", username, level)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /omakehelper [username] [level]"); } if(!(0 <= level <= 4)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 4."); } if(IsPlayerOnline(username)) { return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use /makehelper instead."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT helperlevel FROM users WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer, "OnAdminSetHelperLevel", "isi", playerid, username, level); return 1; } CMD:addtoevent(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 4) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /addtoevent [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!IsPlayerSpawned(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is either not spawned, or spectating."); } if(!EventInfo[eReady]) { return SendClientMessage(playerid, COLOR_GREY, "There are no active events which you can add this player to."); } if(PlayerInfo[targetid][pJoinedEvent]) { return SendClientMessage(playerid, COLOR_GREY, "This player is already in the event."); } if(PlayerInfo[playerid][pPaintball]) { return SendClientMessage(playerid, COLOR_GREY, "That player is currently playing paintball."); } SetPlayerInEvent(targetid); SendClientMessageEx(targetid, COLOR_WHITE, "** %s has added you to the event.", GetPlayerRPName(playerid)); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has added %s to the event.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); return 1; } CMD:olisthelpers(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 6 && PlayerInfo[playerid][pHelper] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } mysql_tquery(connectionID, "SELECT username, lastlogin, helperlevel FROM users WHERE helperlevel > 0 ORDER BY lastlogin DESC", "OnQueryFinished", "ii", THREAD_LIST_HELPERS, playerid); return 1; } CMD:sellinactive(playerid, params[]) { new houses, garages, businesses; if(PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } for(new i = 0; i < MAX_HOUSES; i ++) { if(HouseInfo[i][hExists] && HouseInfo[i][hOwnerID] > 0 && (gettime() - HouseInfo[i][hTimestamp]) > 1209600) { SetHouseOwner(i, INVALID_PLAYER_ID); houses++; } } for(new i = 0; i < MAX_GARAGES; i ++) { if(GarageInfo[i][gExists] && GarageInfo[i][gOwnerID] > 0 && (gettime() - GarageInfo[i][gTimestamp]) > 1209600) { SetGarageOwner(i, INVALID_PLAYER_ID); garages++; } } for(new i = 0; i < MAX_BUSINESSES; i ++) { if(BusinessInfo[i][bExists] && BusinessInfo[i][bOwnerID] > 0 && (gettime() - BusinessInfo[i][bTimestamp]) > 1209600) { SetBusinessOwner(i, INVALID_PLAYER_ID); businesses++; } } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has sold all inactive properties.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_WHITE, "** You have sold %i inactive houses, %i inactive garages and %i inactive businesses.", houses, garages, businesses); return 1; } CMD:setmotd(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setmotd [text ('none' to reset)]"); } if(strfind(params, "|") != -1) { return SendClientMessage(playerid, COLOR_GREY, "You may not include the '|' character in the MOTD."); } if(!strcmp(params, "none", true)) { gServerMOTD[0] = 0; SendClientMessage(playerid, COLOR_WHITE, "** You have reset the MOTD text."); } else { strcpy(gServerMOTD, params, 128); SendClientMessageEx(playerid, COLOR_WHITE, "** You have changed the MOTD text to '%s'.", gServerMOTD); } SaveServerInfo(); return 1; } CMD:setstaff(playerid, params[]) { new targetid, option[16], status; if(PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[16]i", targetid, option, status) || !(0 <= status <= 1)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setstaff [playerid] [option] [status (0/1)]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: FactionMod, GangMod, BanAppealer"); return 1; } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(!strcmp(option, "factionmod", true)) { PlayerInfo[targetid][pFactionMod] = status; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET factionmod = %i WHERE uid = %i", PlayerInfo[targetid][pFactionMod], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); if(status) { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a faction moderator.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a faction moderator.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {FF6347}faction moderator{33CCFF}.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {FF6347}faction moderator{33CCFF}.", GetPlayerRPName(playerid)); } else { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's faction moderator status.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) faction moderator status.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}faction moderator{33CCFF} status.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}faction moderator{33CCFF} status.", GetPlayerRPName(playerid)); } } else if(!strcmp(option, "gangmod", true)) { PlayerInfo[targetid][pGangMod] = status; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gangmod = %i WHERE uid = %i", PlayerInfo[targetid][pGangMod], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); if(status) { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a gang moderator.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a gang moderator.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {FF6347}gang moderator{33CCFF}.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {FF6347}gang moderator{33CCFF}.", GetPlayerRPName(playerid)); } else { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's gang moderator status.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) gang moderator status.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}gang moderator{33CCFF} status.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}gang moderator{33CCFF} status.", GetPlayerRPName(playerid)); } } else if(!strcmp(option, "banappealer", true)) { PlayerInfo[targetid][pBanAppealer] = status; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET banappealer = %i WHERE uid = %i", PlayerInfo[targetid][pBanAppealer], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); if(status) { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a ban appealer.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_admin", "%s (uid: %i) has made %s (uid: %i) a ban appealer.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); SendClientMessageEx(playerid, COLOR_AQUA, "You have made %s a {FF6347}ban appealer{33CCFF}.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {FF6347}ban appealer{33CCFF}.", GetPlayerRPName(playerid)); } else { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s's ban appealer status.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); Log_Write("log_admin", "%s (uid: %i) has removed %s's (uid: %i) ban appealer status.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's {FF6347}ban appealer{33CCFF} status.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your {FF6347}ban appealer{33CCFF} status.", GetPlayerRPName(playerid)); } } return 1; } CMD:changelist(playerid, params[]) { new slot, option[10], param[64]; if(PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[10]S()[64]", option, param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /changelist [view | edit | clear]"); } if(!strcmp(option, "view", true)) { mysql_tquery(connectionID, "SELECT * FROM changes ORDER BY slot", "OnQueryFinished", "ii", THREAD_LIST_CHANGES, playerid); } else if(!strcmp(option, "edit", true)) { if(sscanf(param, "is[64]", slot, param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /changelist [edit] [slot (1-10)] [text]"); } if(!(1 <= slot <= 10)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid slot."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO changes VALUES(%i, '%e') ON DUPLICATE KEY UPDATE text = '%e'", slot, param, param); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** Change text for slot %i changed to '%s'.", slot, param); } else if(!strcmp(option, "clear", true)) { if(sscanf(param, "i", slot)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /changelist [clear] [slot (1-10)]"); } if(!(1 <= slot <= 10)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid slot."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM changes WHERE slot = %i", slot); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** Change text for slot %i cleared.", slot); } return 1; } CMD:forceaduty(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /forceaduty [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "That player needs to be at least a level 2 administrator."); } if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified has a higher admin level than you. They cannot be forced into admin duty."); } if(!PlayerInfo[targetid][pAdminDuty]) { SendClientMessageEx(targetid, COLOR_WHITE, "** %s has forced you to be on admin duty.", GetPlayerRPName(playerid)); } else { SendClientMessageEx(targetid, COLOR_WHITE, "** %s has forced you to be off admin duty.", GetPlayerRPName(playerid)); } cmd_aduty(targetid, "\1"); return 1; } CMD:listhelp(playerid, params[]) { if(PlayerInfo[playerid][pHelper] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } SendClientMessage(playerid, COLOR_GREEN, "|____ Help Requests ____|"); foreach(new i : Player) { if(!isnull(PlayerInfo[i][pHelpRequest])) { SendClientMessageEx(playerid, COLOR_GREY2, "** %s[%i] asks: %s", GetPlayerRPName(i), i, PlayerInfo[i][pHelpRequest]); } } SendClientMessage(playerid, COLOR_AQUA, "** Use /accepthelp [id] or /denyhelp [id] to handle help requests."); SendClientMessage(playerid, COLOR_AQUA, "** Use /answerhelp [id] [msg] to PM an answer without the need to teleport."); return 1; } CMD:accepthelp(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pHelper] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /accepthelp [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(isnull(PlayerInfo[targetid][pHelpRequest])) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested any help since they connected."); } if(PlayerInfo[playerid][pTagType] == TAG_NONE) { SetPlayerSpecialTag(playerid, TAG_HELPER); } if(!PlayerInfo[playerid][pAcceptedHelp]) { SavePlayerVariables(playerid); } TeleportToPlayer(playerid, targetid, false); TogglePlayerControllable(targetid, 0); SetTimerEx("UnfreezeNewbie", 5000, false, "i", targetid); SetPlayerHealth(playerid, 32767); //SetScriptArmour(playerid, 0.0); PlayerInfo[playerid][pHelpRequests]++; PlayerInfo[playerid][pAcceptedHelp] = 1; PlayerInfo[targetid][pHelpRequest][0] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET helprequests = %i WHERE uid = %i", PlayerInfo[playerid][pHelpRequests], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_WHITE, "** You accepted %s's help request and were sent to their position. /return to go back.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_GREEN, "%s has accepted your help request. They are now assisting you.", GetPlayerRPName(playerid)); return 1; } CMD:denyhelp(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pHelper] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /denyhelp [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(isnull(PlayerInfo[targetid][pHelpRequest])) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested any help since they connected."); } PlayerInfo[targetid][pHelpRequest][0] = 0; SendClientMessageEx(playerid, COLOR_WHITE, "** You denied %s's help request.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_LIGHTRED, "** %s has denied your help request.", GetPlayerRPName(playerid)); return 1; } CMD:sta(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pHelper] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sta [playerid] (Sends /helpme to admins)"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(isnull(PlayerInfo[targetid][pHelpRequest])) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested any help since they connected."); } AddReportToQueue(targetid, PlayerInfo[targetid][pHelpRequest]); PlayerInfo[targetid][pHelpRequest][0] = 0; SendClientMessageEx(playerid, COLOR_WHITE, "** You sent %s's help request to all online admins.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "** %s has sent your help request to all online admins.", GetPlayerRPName(playerid)); return 1; } CMD:return(playerid, params[]) { if(PlayerInfo[playerid][pHelper] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAcceptedHelp]) { return SendClientMessage(playerid, COLOR_GREY, "You haven't accepted any help requests."); } if(PlayerInfo[playerid][pTagType] == TAG_HELPER) { SetPlayerSpecialTag(playerid, TAG_NONE); } SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]); SetScriptArmour(playerid, PlayerInfo[playerid][pArmor]); SetPlayerPos(playerid, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]); SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPosA]); SetPlayerInterior(playerid, PlayerInfo[playerid][pInterior]); SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pWorld]); SetCameraBehindPlayer(playerid); SendClientMessage(playerid, COLOR_WHITE, "** You were returned to your previous position."); PlayerInfo[playerid][pAcceptedHelp] = 0; return 1; } CMD:answerhelp(playerid, params[]) { new targetid, msg[128]; if(PlayerInfo[playerid][pHelper] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[128]", targetid, msg)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /answerhelp [playerid] [message]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(isnull(PlayerInfo[targetid][pHelpRequest])) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested any help since they connected."); } PlayerInfo[playerid][pHelpRequests]++; PlayerInfo[targetid][pHelpRequest][0] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET helprequests = %i WHERE uid = %i", PlayerInfo[playerid][pHelpRequests], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); if(strlen(msg) > MAX_SPLIT_LENGTH) { SendClientMessageEx(targetid, COLOR_YELLOW, "** PM from Helper %s: %.*s... **", GetPlayerRPName(playerid), MAX_SPLIT_LENGTH, msg); SendClientMessageEx(targetid, COLOR_YELLOW, "** PM from Helper %s: ...%s **", GetPlayerRPName(playerid), msg[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(targetid, COLOR_YELLOW, "** PM from Helper %s: %s **", GetPlayerRPName(playerid), msg); } return 1; } CMD:hc(playerid, params[]) { if(PlayerInfo[playerid][pHelper] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /hc [helper chat]"); } if(PlayerInfo[playerid][pToggleHelper]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the helper chat as you have it toggled."); } foreach(new i : Player) { if(PlayerInfo[i][pHelper] > 0 && !PlayerInfo[i][pToggleHelper]) { if(strlen(params) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, COLOR_AQUA, "** %s %s: %.*s... **", GetHelperRank(playerid), GetPlayerRPName(playerid), MAX_SPLIT_LENGTH, params); SendClientMessageEx(i, COLOR_AQUA, "** %s %s: ...%s **", GetHelperRank(playerid), GetPlayerRPName(playerid), params[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, COLOR_AQUA, "** %s %s: %s **", GetHelperRank(playerid), GetPlayerRPName(playerid), params); } } } return 1; } CMD:hh(playerid, params[]) { return cmd_helperhelp(playerid, params); } CMD:hhelp(playerid, params[]) { return cmd_helperhelp(playerid, params); } CMD:helperhelp(playerid, params[]) { if(PlayerInfo[playerid][pHelper] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(PlayerInfo[playerid][pHelper] >= 1) { SendClientMessage(playerid, COLOR_AQUA, "LEVEL 1:{DDDDDD} /hc, /listhelp, /accepthelp, /answerhelp, /denyhelp, /sta, /return."); } if(PlayerInfo[playerid][pHelper] >= 2) { SendClientMessage(playerid, COLOR_AQUA, "LEVEL 2:{DDDDDD} /nmute, /hmute."); } if(PlayerInfo[playerid][pHelper] >= 3) { SendClientMessage(playerid, COLOR_AQUA, "LEVEL 3:{DDDDDD} /makehelper, /omakehelper, /olisthelpers, /jail."); } if(PlayerInfo[playerid][pHelper] >= 4) { SendClientMessage(playerid, COLOR_AQUA, "LEVEL 4:{DDDDDD} /kick, /ban, /spec."); } return 1; } CMD:activity(playerid, params[]) { new type[16]; SendClientMessage(playerid, COLOR_GREEN, "|______ My Properties ______|"); for(new i = 0; i < MAX_HOUSES; i ++) { if(HouseInfo[i][hExists] && IsHouseOwner(playerid, i)) { if(HouseInfo[i][hType] == -1) { type = "Other"; } else { strcpy(type, houseInteriors[HouseInfo[i][hType]][intClass]); } if((gettime() - HouseInfo[i][hTimestamp]) > 1209600) { SendClientMessageEx(playerid, COLOR_GREY2, "Your %s house in %s is currently marked as {FF6347}Inactive{C8C8C8}.", type, GetZoneName(HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ])); } else { SendClientMessageEx(playerid, COLOR_GREY2, "Your %s house in %s is currently marked as {00AA00}Active{C8C8C8}.", type, GetZoneName(HouseInfo[i][hPosX], HouseInfo[i][hPosY], HouseInfo[i][hPosZ])); } } } for(new i = 0; i < MAX_GARAGES; i ++) { if(GarageInfo[i][gExists] && IsGarageOwner(playerid, i)) { if((gettime() - GarageInfo[i][gTimestamp]) > 1209600) { SendClientMessageEx(playerid, COLOR_GREY2, "Your %s garage in %s is currently marked as {FF6347}Inactive{C8C8C8}.", garageInteriors[GarageInfo[i][gType]][intName], GetZoneName(GarageInfo[i][gPosX], GarageInfo[i][gPosY], GarageInfo[i][gPosZ])); } else { SendClientMessageEx(playerid, COLOR_GREY2, "Your %s garage in %s is currently marked as {00AA00}Active{C8C8C8}.", garageInteriors[GarageInfo[i][gType]][intName], GetZoneName(GarageInfo[i][gPosX], GarageInfo[i][gPosY], GarageInfo[i][gPosZ])); } } } for(new i = 0; i < MAX_BUSINESSES; i ++) { if(BusinessInfo[i][bExists] && IsBusinessOwner(playerid, i)) { if((gettime() - BusinessInfo[i][bTimestamp]) > 1209600) { SendClientMessageEx(playerid, COLOR_GREY2, "Your %s business in %s is currently marked as {FF6347}Inactive{C8C8C8}.", bizInteriors[BusinessInfo[i][bType]][intType], GetZoneName(BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ])); } else { SendClientMessageEx(playerid, COLOR_GREY2, "Your %s business in %s is currently marked as {00AA00}Active{C8C8C8}.", bizInteriors[BusinessInfo[i][bType]][intType], GetZoneName(BusinessInfo[i][bPosX], BusinessInfo[i][bPosY], BusinessInfo[i][bPosZ])); } } } SendClientMessage(playerid, COLOR_YELLOW, "** Your properties become inactive if you don't enter them for 14+ days."); return 1; } CMD:setrent(playerid, params[]) { new price, houseid = GetNearbyHouseEx(playerid); if(houseid == -1 || !IsHouseOwner(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours."); } if(sscanf(params, "i", price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setrent [price ('0' to disable)]"); } if(!(0 <= price <= 10000)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid price. The price must range between $0 and $10,000."); } HouseInfo[houseid][hRentPrice] = price; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET rentprice = %i WHERE id = %i", price, HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); ReloadHouse(houseid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've set the rental price to $%i.", price); return 1; } CMD:renthouse(playerid, params[]) { new houseid; if((houseid = GetNearbyHouse(playerid)) == -1) { return SendClientMessage(playerid, COLOR_GREY, "There is no house in range. You must be near a house."); } /*if(strcmp(params, "confirm", true) != 0) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /renthouse [confirm]"); }*/ if(!HouseInfo[houseid][hOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "This house is not owned and therefore cannot be rented."); } if(!HouseInfo[houseid][hRentPrice]) { return SendClientMessage(playerid, COLOR_GREY, "This house's owner has chosen to disable renting for this house."); } if(PlayerInfo[playerid][pCash] < HouseInfo[houseid][hRentPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to rent here."); } if(IsHouseOwner(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "You are the owner of this house. You can't rent here."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM users WHERE rentinghouse = %i", HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer, "OnPlayerRentHouse", "ii", playerid, houseid); return 1; } CMD:unrent(playerid, params[]) { if(!PlayerInfo[playerid][pRentingHouse]) { return SendClientMessage(playerid, COLOR_GREY, "You are not renting at any property. You can't use this command."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET rentinghouse = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[playerid][pRentingHouse] = 0; SendClientMessage(playerid, COLOR_WHITE, "** You have ripped up your rental contract."); return 1; } CMD:tenants(playerid, params[]) { new houseid = GetNearbyHouseEx(playerid); if(houseid == -1 || !IsHouseOwner(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, lastlogin FROM users WHERE rentinghouse = %i ORDER BY lastlogin DESC", HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LIST_TENANTS, playerid); return 1; } CMD:evict(playerid, params[]) { new username[MAX_PLAYER_NAME], houseid = GetNearbyHouseEx(playerid); if(houseid == -1 || !IsHouseOwner(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours."); } if(sscanf(params, "s[24]", username)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /evict [username]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM users WHERE username = '%e' AND rentinghouse = %i", username, HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer, "OnPlayerEvict", "is", playerid, username); return 1; } CMD:evictall(playerid, params[]) { new houseid = GetNearbyHouseEx(playerid); if(houseid == -1 || !IsHouseOwner(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours."); } foreach(new i : Player) { if(PlayerInfo[i][pLogged] && PlayerInfo[i][pRentingHouse] == HouseInfo[houseid][hID]) { PlayerInfo[i][pRentingHouse] = 0; SendClientMessage(i, COLOR_RED, "You have been evicted from your home by the owner."); } } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET rentinghouse = 0 WHERE rentinghouse = %i", HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_WHITE, "** You have evicted all tenants from your home."); return 1; } CMD:houseinvite(playerid, params[]) { new targetid, houseid = GetNearbyHouseEx(playerid); if(houseid == -1 || !IsHouseOwner(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any house of yours."); } if(sscanf(params, "i", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /houseinvite [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { //return SendClientMessage(playerid, COLOR_GREY, "You can't invite yourself to your own home."); } PlayerInfo[targetid][pInviteOffer] = playerid; PlayerInfo[targetid][pInviteHouse] = houseid; SendClientMessageEx(targetid, COLOR_AQUA, "** %s has offered you an invitation to their house in %s. (/accept invite)", GetPlayerRPName(playerid), GetZoneName(HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ])); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered %s an invitation to your house.", GetPlayerRPName(targetid)); return 1; } CMD:furniture(playerid, params[]) { new houseid = GetInsideHouse(playerid), option[10], param[32]; if(houseid == -1 || !HasFurniturePerms(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any house of yours."); } if(sscanf(params, "s[10]S()[32]", option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /furniture [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Buy, Edit, Sell, Clear, Allow, Disallow, Labels"); return 1; } if(!strcmp(option, "buy", true)) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM furniture WHERE houseid = %i", HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_COUNT_FURNITURE, playerid); } else if(!strcmp(option, "edit", true)) { new objectid; if(sscanf(param, "i", objectid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /furniture [edit] [objectid]"); } if(!IsValidDynamicObject(objectid) || Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) != E_OBJECT_FURNITURE) { return SendClientMessage(playerid, COLOR_GREY, "Invalid object. You can find the object IDs for your furniture by enabling labels. [/furniture labels]"); } if(Streamer_GetExtraInt(objectid, E_OBJECT_EXTRA_ID) != HouseInfo[houseid][hID]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid object. This furniture object is not inside of your house."); } PlayerInfo[playerid][pEditType] = EDIT_FURNITURE; PlayerInfo[playerid][pEditObject] = objectid; PlayerInfo[playerid][pFurnitureHouse] = houseid; EditDynamicObject(playerid, objectid); GameTextForPlayer(playerid, "~w~Editing Mode~n~~g~Click disk to save~n~~r~Press ESC to cancel", 5000, 1); } else if(!strcmp(option, "sell", true)) { new objectid; if(sscanf(param, "i", objectid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /furniture [sell] [objectid] (75%% refund)"); } if(!IsValidDynamicObject(objectid) || Streamer_GetExtraInt(objectid, E_OBJECT_TYPE) != E_OBJECT_FURNITURE) { return SendClientMessage(playerid, COLOR_GREY, "Invalid object. You can find the object IDs for your furniture by enabling labels. [/furniture labels]"); } if(Streamer_GetExtraInt(objectid, E_OBJECT_EXTRA_ID) != HouseInfo[houseid][hID]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid object. This furniture object is not inside of your house."); } PlayerInfo[playerid][pSelected] = objectid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT name, price FROM furniture WHERE id = %i", Streamer_GetExtraInt(objectid, E_OBJECT_INDEX_ID)); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_SELL_FURNITURE, playerid); } else if(!strcmp(option, "clear", true)) { if(isnull(param) || strcmp(param, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /furniture [clear] [confirm]"); SendClientMessage(playerid, COLOR_GREY3, "This sells all of your furniture in your house. This action is irreversible."); return 1; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT price FROM furniture WHERE houseid = %i", HouseInfo[houseid][hID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_CLEAR_FURNITURE, playerid); } else if(!strcmp(option, "allow", true)) { new targetid; if(sscanf(param, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /furniture [allow] [playerid]"); } if(!IsHouseOwner(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "This can only be done by the house owner."); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself."); } if(PlayerInfo[targetid][pFurniturePerms] == houseid) { return SendClientMessage(playerid, COLOR_GREY, "You already allowed that player to access your furniture."); } PlayerInfo[targetid][pFurniturePerms] = houseid; SendClientMessageEx(targetid, COLOR_AQUA, "%s has allowed you to access their home's furniture.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have allowed %s to access your home's furniture.", GetPlayerRPName(targetid)); } else if(!strcmp(option, "disallow", true)) { new targetid; if(sscanf(param, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /furniture [disallow] [playerid]"); } if(!IsHouseOwner(playerid, houseid)) { return SendClientMessage(playerid, COLOR_GREY, "This can only be done by the house owner."); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself."); } if(PlayerInfo[targetid][pFurniturePerms] != houseid) { return SendClientMessage(playerid, COLOR_GREY, "You haven't allowed that player to access your furniture."); } PlayerInfo[targetid][pFurniturePerms] = -1; SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed your access to their home's furniture.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s's access to your home's furniture.", GetPlayerRPName(targetid)); } else if(!strcmp(option, "labels", true)) { if(!HouseInfo[houseid][hLabels]) { HouseInfo[houseid][hLabels] = 1; SendClientMessage(playerid, COLOR_AQUA, "You will now see labels appear above all of your furniture."); } else { HouseInfo[houseid][hLabels] = 0; SendClientMessage(playerid, COLOR_AQUA, "You will no longer see any labels appear above your furniture."); } ReloadAllFurniture(houseid); } return 1; } CMD:creategarage(playerid, params[]) { new size[8], type = -1, Float:x, Float:y, Float:z, Float:a; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[8]", size)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /creategarage [small/medium/large]"); } if(GetNearbyGarage(playerid) >= 0) { return SendClientMessage(playerid, COLOR_GREY, "There is a garage in range. Find somewhere else to create this one."); } if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0) { return SendClientMessage(playerid, COLOR_GREY, "You cannot create garages indoors."); } if(!strcmp(size, "small", true)) { type = 0; } else if(!strcmp(size, "medium", true)) { type = 1; } else if(!strcmp(size, "large", true)) { type = 2; } if(type == -1) { SendClientMessage(playerid, COLOR_GREY, "Invalid size. Valid sizes range from Small, Medium and Large."); } else { GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); for(new i = 0; i < MAX_GARAGES; i ++) { if(!GarageInfo[i][gExists]) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO garages (type, price, pos_x, pos_y, pos_z, pos_a, exit_x, exit_y, exit_z, exit_a) VALUES(%i, %i, '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f')", type, garageInteriors[type][intPrice], x, y, z, a, x - 3.0 * floatsin(-a, degrees), y - 3.0 * floatcos(-a, degrees), z, a - 180.0); mysql_tquery(connectionID, queryBuffer, "OnAdminCreateGarage", "iiiffff", playerid, i, type, x, y, z, a); return 1; } } SendClientMessage(playerid, COLOR_GREY, "Garage slots are currently full. Ask Emmet to increase the internal limit."); } return 1; } CMD:editgarage(playerid, params[]) { new garageid, option[10], param[32]; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[10]S()[32]", garageid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgarage [garageid] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Entrance, Exit, Type, Owner, Price, Locked"); return 1; } if(!(0 <= garageid < MAX_GARAGES) || !GarageInfo[garageid][gExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid garage."); } if(!strcmp(option, "entrance", true)) { if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0) { return SendClientMessage(playerid, COLOR_GREY, "You cannot create garages indoors."); } GetPlayerPos(playerid, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ]); GetPlayerFacingAngle(playerid, GarageInfo[garageid][gPosA]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f' WHERE id = %i", GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ], GarageInfo[garageid][gPosA], GarageInfo[garageid][gID]); mysql_tquery(connectionID, queryBuffer); ReloadGarage(garageid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the entrance of garage %i.", garageid); } else if(!strcmp(option, "exit", true)) { if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0) { return SendClientMessage(playerid, COLOR_GREY, "You cannot create garages indoors."); } GetPlayerPos(playerid, GarageInfo[garageid][gExitX], GarageInfo[garageid][gExitY], GarageInfo[garageid][gExitZ]); GetPlayerFacingAngle(playerid, GarageInfo[garageid][gExitA]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET exit_x = '%f', exit_y = '%f', exit_z = '%f', exit_a = '%f' WHERE id = %i", GarageInfo[garageid][gExitX], GarageInfo[garageid][gExitY], GarageInfo[garageid][gExitZ], GarageInfo[garageid][gExitA], GarageInfo[garageid][gID]); mysql_tquery(connectionID, queryBuffer); ReloadGarage(garageid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the vehicle exit spawn of garage %i.", garageid); } else if(!strcmp(option, "type", true)) { new size[8], type = -1; if(sscanf(param, "s[8]", size)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgarage [garageid] [type] [small/medium/large]"); } if(!strcmp(size, "small", true)) { type = 0; } else if(!strcmp(size, "medium", true)) { type = 1; } else if(!strcmp(size, "large", true)) { type = 2; } if(type == -1) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } GarageInfo[garageid][gType] = type; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET type = %i WHERE id = %i", type, GarageInfo[garageid][gID]); mysql_tquery(connectionID, queryBuffer); ReloadGarage(garageid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the type of garage %i to %s.", garageid, size); } else if(!strcmp(option, "owner", true)) { new targetid; if(sscanf(param, "u", targetid)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /editgarage [garageid] [owner] [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } SetGarageOwner(garageid, targetid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the owner of garage %i to %s.", garageid, GetPlayerRPName(targetid)); } else if(!strcmp(option, "price", true)) { new price; if(sscanf(param, "i", price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgarage [garageid] [price] [value]"); } if(price < 0) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $0."); } GarageInfo[garageid][gPrice] = price; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET price = %i WHERE id = %i", GarageInfo[garageid][gPrice], GarageInfo[garageid][gID]); mysql_tquery(connectionID, queryBuffer); ReloadGarage(garageid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the price of garage %i to $%i.", garageid, price); } else if(!strcmp(option, "locked", true)) { new locked; if(sscanf(param, "i", locked) || !(0 <= locked <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgarage [garageid] [locked] [0/1]"); } GarageInfo[garageid][gLocked] = locked; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET locked = %i WHERE id = %i", GarageInfo[garageid][gLocked], GarageInfo[garageid][gID]); mysql_tquery(connectionID, queryBuffer); ReloadGarage(garageid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the lock state of garage %i to %i.", garageid, locked); } return 1; } CMD:removegarage(playerid, params[]) { new garageid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", garageid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removegarage [garageid]"); } if(!(0 <= garageid < MAX_GARAGES) || !GarageInfo[garageid][gExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid garage."); } DestroyDynamic3DTextLabel(GarageInfo[garageid][gText]); DestroyDynamicPickup(GarageInfo[garageid][gPickup]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM garages WHERE id = %i", GarageInfo[garageid][gID]); mysql_tquery(connectionID, queryBuffer); GarageInfo[garageid][gExists] = 0; GarageInfo[garageid][gID] = 0; GarageInfo[garageid][gOwnerID] = 0; SendClientMessageEx(playerid, COLOR_AQUA, "** You have removed garage %i.", garageid); return 1; } CMD:gotogarage(playerid, params[]) { new garageid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "i", garageid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gotogarage [garageid]"); } if(!(0 <= garageid < MAX_GARAGES) || !GarageInfo[garageid][gExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid garage."); } GameTextForPlayer(playerid, "~w~Teleported", 5000, 1); SetPlayerPos(playerid, GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ]); SetPlayerFacingAngle(playerid, GarageInfo[garageid][gPosA]); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); return 1; } CMD:garagehelp(playerid, params[]) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Garage Commands] /buygarage, /lock, /upgradegarage, /sellgarage, /sellmygarage, /garageinfo."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Garage Commands] /repair, /refuel, /tune."); return 1; } CMD:buygarage(playerid, params[]) { new garageid; if((garageid = GetNearbyGarage(playerid)) == -1) { return SendClientMessage(playerid, COLOR_GREY, "There is no garage in range. You must be near a garage."); } if(strcmp(params, "confirm", true) != 0) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /buygarage [confirm]"); } if(GarageInfo[garageid][gOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "This garage already has an owner."); } if(PlayerInfo[playerid][pCash] < GarageInfo[garageid][gPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this garage."); } if(GetPlayerAssetCount(playerid, LIMIT_GARAGES) >= GetPlayerAssetLimit(playerid, LIMIT_GARAGES)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i garages. You can't own anymore unless you upgrade your asset perk.", GetPlayerAssetCount(playerid, LIMIT_GARAGES), GetPlayerAssetLimit(playerid, LIMIT_GARAGES)); } SetGarageOwner(garageid, playerid); GivePlayerCash(playerid, -GarageInfo[garageid][gPrice]); SendClientMessageEx(playerid, COLOR_GREEN, "You paid $%i to make this garage yours! /garagehelp for a list of commands.", GarageInfo[garageid][gPrice]); Log_Write("log_property", "%s (uid: %i) purchased %s garage (id: %i) for $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], garageInteriors[GarageInfo[garageid][gType]][intName], GarageInfo[garageid][gID], GarageInfo[garageid][gPrice]); return 1; } CMD:upgradegarage(playerid, params[]) { new garageid = GetNearbyGarageEx(playerid); if(garageid == -1 || !IsGarageOwner(playerid, garageid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any garage of yours."); } if(GarageInfo[garageid][gType] >= 2) { return SendClientMessage(playerid, COLOR_GREY, "Your garage is already at its maximum possible size. You cannot upgrade it further."); } if(isnull(params) || strcmp(params, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /upgradegarage [confirm]"); SendClientMessageEx(playerid, COLOR_GREY3, "The next garage size available is %s and costs $%i to upgrade to.", garageInteriors[GarageInfo[garageid][gType] + 1][intName], garageInteriors[GarageInfo[garageid][gType] + 1][intPrice]); return 1; } if(PlayerInfo[playerid][pCash] < garageInteriors[GarageInfo[garageid][gType] + 1][intPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to upgrade your garage."); } for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && IsVehicleInGarage(i, garageid)) { return SendClientMessage(playerid, COLOR_GREY, "You must remove all vehicles from your garage before proceeding."); } } foreach(new i : Player) { if(GetInsideGarage(i) == garageid) { SetPlayerPos(i, garageInteriors[GarageInfo[garageid][gType] + 1][intVX], garageInteriors[GarageInfo[garageid][gType] + 1][intVY], garageInteriors[GarageInfo[garageid][gType] + 1][intVZ]); SetPlayerFacingAngle(i, garageInteriors[GarageInfo[garageid][gType] + 1][intVA]); SetPlayerInterior(i, garageInteriors[GarageInfo[garageid][gType] + 1][intID]); SetCameraBehindPlayer(i); } } GarageInfo[garageid][gType]++; GarageInfo[garageid][gPrice] = garageInteriors[GarageInfo[garageid][gType]][intPrice]; GivePlayerCash(playerid, -garageInteriors[GarageInfo[garageid][gType]][intPrice]); SendClientMessageEx(playerid, COLOR_GREEN, "You have upgraded your garage's size to %s for $%i.", garageInteriors[GarageInfo[garageid][gType]][intName], garageInteriors[GarageInfo[garageid][gType]][intPrice]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET type = %i, price = %i WHERE id = %i", GarageInfo[garageid][gType], GarageInfo[garageid][gPrice], GarageInfo[garageid][gID]); mysql_tquery(connectionID, queryBuffer); Log_Write("log_property", "%s (uid: %i) upgraded their garage (id: %i) to %s size for $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GarageInfo[garageid][gID], garageInteriors[GarageInfo[garageid][gType]][intName], garageInteriors[GarageInfo[garageid][gType]][intPrice]); return 1; } CMD:sellgarage(playerid, params[]) { new garageid = GetNearbyGarageEx(playerid), targetid, amount; if(garageid == -1 || !IsGarageOwner(playerid, garageid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any garage of yours."); } if(sscanf(params, "ui", targetid, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sellgarage [playerid] [amount]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself."); } if(amount < 1) { return SendClientMessage(playerid, COLOR_GREY, "You must specify an amount above zero."); } PlayerInfo[targetid][pGarageOffer] = playerid; PlayerInfo[targetid][pGarageOffered] = garageid; PlayerInfo[targetid][pGaragePrice] = amount; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered you their garage for $%i (/accept garage).", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered %s to buy your garage for $%i.", GetPlayerRPName(targetid), amount); return 1; } CMD:sellmygarage(playerid, params[]) { new garageid = GetNearbyGarageEx(playerid); if(garageid == -1 || !IsGarageOwner(playerid, garageid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any garage of yours."); } if(strcmp(params, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sellmygarage [confirm]"); SendClientMessageEx(playerid, COLOR_GREY3, "This command sells your garage back to the state. You will receive $%i back.", percent(GarageInfo[garageid][gPrice], 75)); return 1; } SetGarageOwner(garageid, INVALID_PLAYER_ID); GivePlayerCash(playerid, percent(GarageInfo[garageid][gPrice], 75)); SendClientMessageEx(playerid, COLOR_GREEN, "You have sold your garage to the state and received $%i back.", percent(GarageInfo[garageid][gPrice], 75)); Log_Write("log_property", "%s (uid: %i) sold their %s garage (id: %i) to the state for $%i", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], garageInteriors[GarageInfo[garageid][gType]][intName], GarageInfo[garageid][gID], percent(GarageInfo[garageid][gPrice], 75)); return 1; } CMD:garageinfo(playerid, params[]) { new garageid = GetNearbyGarageEx(playerid); if(garageid == -1 || !IsGarageOwner(playerid, garageid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any garage of yours."); } SendClientMessageEx(playerid, COLOR_GREEN, "|______ Garage ID %i ______|", garageid); SendClientMessageEx(playerid, COLOR_GREY2, "(Value: $%i) - (Size: %s) - (Location: %s) - (Active: %s) - (Locked: %s)", GarageInfo[garageid][gPrice], garageInteriors[GarageInfo[garageid][gType]][intName], GetZoneName(GarageInfo[garageid][gPosX], GarageInfo[garageid][gPosY], GarageInfo[garageid][gPosZ]), (gettime() - GarageInfo[garageid][gTimestamp] > 1209600) ? ("{FF6347}No{C8C8C8}") : ("Yes"), (GarageInfo[garageid][gLocked]) ? ("Yes") : ("No")); return 1; } CMD:createbiz(playerid, params[]) { new type, Float:x, Float:y, Float:z, Float:a; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", type)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /createbiz [type]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: (1) 24/7 (2) Gun Shop (3) Clothes Shop (4) Gym (5) Restaurant (6) Ad Agency (7) Club/Bar"); return 1; } if(!(1 <= type <= sizeof(bizInteriors))) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } if(GetNearbyBusiness(playerid) >= 0) { return SendClientMessage(playerid, COLOR_GREY, "There is a business in range. Find somewhere else to create this one."); } GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); type--; for(new i = 0; i < MAX_BUSINESSES; i ++) { if(!BusinessInfo[i][bExists]) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO businesses (type, price, pos_x, pos_y, pos_z, pos_a, int_x, int_y, int_z, int_a, interior, outsideint, outsidevw) VALUES(%i, %i, '%f', '%f', '%f', '%f', '%f', '%f', '%f', '%f', %i, %i, %i)", type, bizInteriors[type][intPrice], x, y, z, a - 180.0, bizInteriors[type][intX], bizInteriors[type][intY], bizInteriors[type][intZ], bizInteriors[type][intA], bizInteriors[type][intID], GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid)); mysql_tquery(connectionID, queryBuffer, "OnAdminCreateBusiness", "iiiffff", playerid, i, type, x, y, z, a); return 1; } } SendClientMessage(playerid, COLOR_GREY, "Business slots are currently full. Ask Emmet to increase the internal limit."); return 1; } CMD:editbiz(playerid, params[]) { new businessid, option[10], param[32]; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[10]S()[32]", businessid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editbiz [businessid] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Entrance, Exit, Interior, World, Type, Owner, Price, EntryFee, Products, Locked"); return 1; } if(!(0 <= businessid < MAX_BUSINESSES) || !BusinessInfo[businessid][bExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid business."); } if(!strcmp(option, "entrance", true)) { GetPlayerPos(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ]); GetPlayerFacingAngle(playerid, BusinessInfo[businessid][bPosA]); BusinessInfo[businessid][bOutsideInt] = GetPlayerInterior(playerid); BusinessInfo[businessid][bOutsideVW] = GetPlayerVirtualWorld(playerid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', outsideint = %i, outsidevw = %i WHERE id = %i", BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], BusinessInfo[businessid][bPosA], BusinessInfo[businessid][bOutsideInt], BusinessInfo[businessid][bOutsideVW], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); ReloadBusiness(businessid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the entrance of business %i.", businessid); } else if(!strcmp(option, "exit", true)) { new type = -1; for(new i = 0; i < sizeof(bizInteriors); i ++) { if(IsPlayerInRangeOfPoint(playerid, 100.0, bizInteriors[i][intX], bizInteriors[i][intY], bizInteriors[i][intZ])) { type = i; } } GetPlayerPos(playerid, BusinessInfo[businessid][bIntX], BusinessInfo[businessid][bIntY], BusinessInfo[businessid][bIntZ]); GetPlayerFacingAngle(playerid, BusinessInfo[businessid][bIntA]); BusinessInfo[businessid][bInterior] = GetPlayerInterior(playerid); BusinessInfo[businessid][bType] = type; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET type = %i, int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i WHERE id = %i", type, BusinessInfo[businessid][bIntX], BusinessInfo[businessid][bIntY], BusinessInfo[businessid][bIntZ], BusinessInfo[businessid][bIntA], BusinessInfo[businessid][bInterior], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); ReloadBusiness(businessid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the exit of business %i.", businessid); } else if(!strcmp(option, "interior", true)) { new string[1024]; for(new i = 0; i < sizeof(bizInteriorArray); i ++) { format(string, sizeof(string), "%s\n%s", string, bizInteriorArray[i][intName]); } PlayerInfo[playerid][pSelected] = businessid; ShowPlayerDialog(playerid, DIALOG_BIZINTERIOR, DIALOG_STYLE_LIST, "Choose an interior to set for this business.", string, "Select", "Cancel"); } else if(!strcmp(option, "world", true)) { new worldid; if(sscanf(param, "i", worldid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editbiz [businessid] [world] [vw]"); } BusinessInfo[businessid][bWorld] = worldid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET world = %i WHERE id = %i", BusinessInfo[businessid][bWorld], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); ReloadBusiness(businessid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the virtual world of business %i to %i.", businessid, worldid); } else if(!strcmp(option, "type", true)) { new type; if(sscanf(param, "i", type)) { SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /editbiz [businessid] [type] [value (1-%i)]", sizeof(bizInteriors)); SendClientMessage(playerid, COLOR_GREY3, "List of options: (1) 24/7 (2) Gun Shop (3) Clothes Shop (4) Gym (5) Restaurant (6) Ad Agency (7) Club/Bar"); return 1; } if(!(1 <= type <= sizeof(bizInteriors))) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } BusinessInfo[businessid][bType] = type; BusinessInfo[businessid][bInterior] = bizInteriors[type][intID]; BusinessInfo[businessid][bIntX] = bizInteriors[type][intX]; BusinessInfo[businessid][bIntY] = bizInteriors[type][intY]; BusinessInfo[businessid][bIntZ] = bizInteriors[type][intZ]; BusinessInfo[businessid][bIntA] = bizInteriors[type][intA]; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET type = %i, int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i, world = %i WHERE id = %i", type, BusinessInfo[businessid][bIntX], BusinessInfo[businessid][bIntY], BusinessInfo[businessid][bIntZ], BusinessInfo[businessid][bIntA], BusinessInfo[businessid][bInterior], BusinessInfo[businessid][bWorld], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); ReloadBusiness(businessid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the type of business %i to %i.", businessid, type); } else if(!strcmp(option, "owner", true)) { new targetid; if(sscanf(param, "u", targetid)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /editbiz [businessid] [owner] [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } SetBusinessOwner(businessid, targetid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the owner of business %i to %s.", businessid, GetPlayerRPName(targetid)); } else if(!strcmp(option, "price", true)) { new price; if(sscanf(param, "i", price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editbiz [businessid] [price] [value]"); } if(price < 0) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $0."); } BusinessInfo[businessid][bPrice] = price; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET price = %i WHERE id = %i", BusinessInfo[businessid][bPrice], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); ReloadBusiness(businessid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the price of business %i to $%i.", businessid, price); } else if(!strcmp(option, "entryfee", true)) { new price; if(sscanf(param, "i", price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editbiz [businessid] [entryfee] [value]"); } if(price < 0) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $0."); } BusinessInfo[businessid][bEntryFee] = price; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET entryfee = %i WHERE id = %i", BusinessInfo[businessid][bEntryFee], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); ReloadBusiness(businessid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the entry fee of business %i to $%i.", businessid, price); } else if(!strcmp(option, "products", true)) { new amount; if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editbiz [businessid] [products] [value]"); } BusinessInfo[businessid][bProducts] = amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET products = %i WHERE id = %i", BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); ReloadBusiness(businessid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the products amount of business %i to %i.", businessid, amount); } else if(!strcmp(option, "locked", true)) { new locked; if(sscanf(param, "i", locked) || !(0 <= locked <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editbiz [businessid] [locked] [0/1]"); } BusinessInfo[businessid][bLocked] = locked; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET locked = %i WHERE id = %i", BusinessInfo[businessid][bLocked], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); ReloadBusiness(businessid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the lock state of business %i to %i.", businessid, locked); } return 1; } CMD:removebiz(playerid, params[]) { new businessid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", businessid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removebiz [businessid]"); } if(!(0 <= businessid < MAX_HOUSES) || !BusinessInfo[businessid][bExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid business."); } RemoveAllFurniture(businessid); DestroyDynamic3DTextLabel(BusinessInfo[businessid][bText]); DestroyDynamicPickup(BusinessInfo[businessid][bPickup]); DestroyDynamicMapIcon(BusinessInfo[businessid][bMapIcon]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM businesses WHERE id = %i", BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); BusinessInfo[businessid][bExists] = 0; BusinessInfo[businessid][bID] = 0; BusinessInfo[businessid][bOwnerID] = 0; SendClientMessageEx(playerid, COLOR_AQUA, "** You have removed business %i.", businessid); return 1; } CMD:gotobiz(playerid, params[]) { new businessid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "i", businessid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gotobiz [businessid]"); } if(!(0 <= businessid < MAX_HOUSES) || !BusinessInfo[businessid][bExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid business."); } GameTextForPlayer(playerid, "~w~Teleported", 5000, 1); SetPlayerPos(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ]); SetPlayerFacingAngle(playerid, BusinessInfo[businessid][bPosA]); SetPlayerInterior(playerid, BusinessInfo[businessid][bOutsideInt]); SetPlayerVirtualWorld(playerid, BusinessInfo[businessid][bOutsideVW]); SetCameraBehindPlayer(playerid); return 1; } CMD:bizhelp(playerid, params[]) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Business Commands] /buybiz, /lock, /bwithdraw, /bdeposit, /sellbiz, /sellmybiz, /bizinfo."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Business Commands] /entryfee."); return 1; } CMD:buybiz(playerid, params[]) { new businessid; if((businessid = GetNearbyBusiness(playerid)) == -1) { return SendClientMessage(playerid, COLOR_GREY, "There is no business in range. You must be near a business."); } if(strcmp(params, "confirm", true) != 0) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /buybiz [confirm]"); } if(BusinessInfo[businessid][bOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "This business already has an owner."); } if(PlayerInfo[playerid][pCash] < BusinessInfo[businessid][bPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this business."); } if(GetPlayerAssetCount(playerid, LIMIT_BUSINESSES) >= GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently own %i/%i businesses. You can't own anymore unless you upgrade your asset perk.", GetPlayerAssetCount(playerid, LIMIT_BUSINESSES), GetPlayerAssetLimit(playerid, LIMIT_BUSINESSES)); } SetBusinessOwner(businessid, playerid); GivePlayerCash(playerid, -BusinessInfo[businessid][bPrice]); SendClientMessageEx(playerid, COLOR_GREEN, "You paid $%i for this %s. /bizhelp for a list of commands.", BusinessInfo[businessid][bPrice], bizInteriors[BusinessInfo[businessid][bType]][intType]); Log_Write("log_property", "%s (uid: %i) purchased %s (id: %i) for $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bID], BusinessInfo[businessid][bPrice]); return 1; } CMD:bwithdraw(playerid, params[]) { new businessid = GetInsideBusiness(playerid), amount; if(businessid == -1 || !IsBusinessOwner(playerid, businessid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside any business of yours."); } if(sscanf(params, "i", amount)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /bwithdraw [amount] ($%i available)", BusinessInfo[businessid][bCash]); } if(amount < 1 || amount > BusinessInfo[businessid][bCash]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } BusinessInfo[businessid][bCash] -= amount; GivePlayerCash(playerid, amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have withdrawn $%i from the business vault. There is now $%i remaining.", amount, BusinessInfo[businessid][bCash]); return 1; } CMD:bdeposit(playerid, params[]) { new businessid = GetInsideBusiness(playerid), amount; if(businessid == -1 || !IsBusinessOwner(playerid, businessid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside any business of yours."); } if(sscanf(params, "i", amount)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /bdeposit [amount] ($%i available)", BusinessInfo[businessid][bCash]); } if(amount < 1 || amount > PlayerInfo[playerid][pCash]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } BusinessInfo[businessid][bCash] += amount; GivePlayerCash(playerid, -amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have deposited $%i in the business vault. There is now $%i available.", amount, BusinessInfo[businessid][bCash]); return 1; } CMD:sellbiz(playerid, params[]) { new businessid = GetNearbyBusinessEx(playerid), targetid, amount; if(businessid == -1 || !IsBusinessOwner(playerid, businessid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any business of yours."); } if(sscanf(params, "ui", targetid, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sellbiz [playerid] [amount]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself."); } if(amount < 1) { return SendClientMessage(playerid, COLOR_GREY, "You must specify an amount above zero."); } PlayerInfo[targetid][pBizOffer] = playerid; PlayerInfo[targetid][pBizOffered] = businessid; PlayerInfo[targetid][pBizPrice] = amount; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered you their business for $%i (/accept business).", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered %s to buy your business for $%i.", GetPlayerRPName(targetid), amount); return 1; } CMD:sellmybiz(playerid, params[]) { new businessid = GetNearbyBusinessEx(playerid); if(businessid == -1 || !IsBusinessOwner(playerid, businessid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any business of yours."); } if(strcmp(params, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sellmybiz [confirm]"); SendClientMessageEx(playerid, COLOR_GREY3, "This command sells your business back to the state. You will receive $%i back.", percent(BusinessInfo[businessid][bPrice], 75)); return 1; } SetBusinessOwner(businessid, INVALID_PLAYER_ID); GivePlayerCash(playerid, percent(BusinessInfo[businessid][bPrice], 75)); SendClientMessageEx(playerid, COLOR_GREEN, "You have sold your business to the state and received $%i back.", percent(BusinessInfo[businessid][bPrice], 75)); Log_Write("log_property", "%s (uid: %i) sold their %s business (id: %i) to the state for $%i", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bID], percent(BusinessInfo[businessid][bPrice], 75)); return 1; } CMD:bizinfo(playerid, params[]) { new businessid = GetNearbyBusinessEx(playerid); if(businessid == -1 || !IsBusinessOwner(playerid, businessid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any business of yours."); } SendClientMessageEx(playerid, COLOR_GREEN, "|______ Business ID %i ______|", businessid); SendClientMessageEx(playerid, COLOR_GREY2, "(Value: $%i) - (Type: %s) - (Location: %s) - (Active: %s) - (Status: %s)", BusinessInfo[businessid][bPrice], bizInteriors[BusinessInfo[businessid][bType]][intType], GetZoneName(BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ]), (gettime() - BusinessInfo[businessid][bTimestamp] > 1209600) ? ("{FF6347}No{C8C8C8}") : ("Yes"), (BusinessInfo[businessid][bLocked]) ? ("Closed") : ("Opened")); SendClientMessageEx(playerid, COLOR_GREY2, "(Vault: $%i) - (Entry Fee: $%i) - (Products: %i)", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bEntryFee], BusinessInfo[businessid][bProducts]); return 1; } CMD:entryfee(playerid, params[]) { new businessid = GetNearbyBusinessEx(playerid), amount; if(businessid == -1 || !IsBusinessOwner(playerid, businessid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any business of yours."); } if(sscanf(params, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /entryfee [amount]"); } if(amount < 0 || amount > 5000) { return SendClientMessage(playerid, COLOR_GREY, "The entry fee can't be below $0 or above $5,000."); } BusinessInfo[businessid][bEntryFee] = amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET entryfee = %i WHERE id = %i", BusinessInfo[businessid][bEntryFee], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); ReloadBusiness(businessid); SendClientMessageEx(playerid, COLOR_AQUA, "** You have set the entry fee to $%i.", amount); return 1; } CMD:buy(playerid, params[]) { new businessid = GetInsideBusiness(playerid), title[64]; if(businessid == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any business where you can buy stuff."); } if(BusinessInfo[businessid][bProducts] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "This business is out of stock."); } format(title, sizeof(title), "%s's %s [%i products]", BusinessInfo[businessid][bOwner], bizInteriors[BusinessInfo[businessid][bType]][intType], BusinessInfo[businessid][bProducts]); switch(BusinessInfo[businessid][bType]) { case BUSINESS_STORE: { ShowPlayerDialog(playerid, DIALOG_BUY, DIALOG_STYLE_LIST, title, "Mobile phone ($525)\nWalkie talkie ($5000)\nCigars ($125)\nSpraycans ($400)\nPhonebook ($125)\nCamera ($200)\nMP3 player ($2400)\nFishing rod ($1000)\nFish bait ($790)\nMuriatic acid ($1500)\nBaking soda ($1290)\nPocket watch ($1000)\nGPS system ($750)\nGasoline can ($500)", "Select", "Cancel"); } case BUSINESS_GUNSHOP: { ShowPlayerDialog(playerid, DIALOG_BUY, DIALOG_STYLE_LIST, title, "9mm pistol ($1500)\nShotgun ($2000)\nRifle ($4000)\nLight armor ($1500)", "Select", "Cancel"); } case BUSINESS_CLOTHES: { ShowPlayerDialog(playerid, DIALOG_BUY, DIALOG_STYLE_LIST, title, "Clothes ($2000)\nGlasses ($500)\nBandanas & masks ($375)\nHats & caps ($240)\nMisc clothing ($500)", "Select", "Cancel"); } case BUSINESS_GYM: { ShowPlayerDialog(playerid, DIALOG_BUY, DIALOG_STYLE_LIST, title, "Normal (Free)\nBoxing ($4725)\nKung Fu ($7650)\nKneehead ($9275)\nGrabkick ($1250)\nElbow ($2950)", "Select", "Cancel"); } case BUSINESS_RESTAURANT: { ShowPlayerDialog(playerid, DIALOG_BUY, DIALOG_STYLE_LIST, title, "Water ($50)\nSprunk ($100)\nFrench fries ($250)\nHamburger ($400)\nCheeseburger ($450)\nMac & cheese ($525)\nClub sandwich ($600)\nFish & chips ($925)\nPan pizza ($1200)", "Select", "Cancel"); } case BUSINESS_BARCLUB: { ShowPlayerDialog(playerid, DIALOG_BUY, DIALOG_STYLE_LIST, title, "Water ($50)\nSprunk ($100)\nBeer ($200)\nWine ($350)\nWhiskey ($475)", "Select", "Cancel"); } } return 1; } CMD:advertise(playerid, params[]) { return cmd_ad(playerid, params); } CMD:ad(playerid, params[]) { new businessid = GetInsideBusiness(playerid), price = strlen(params) * 25; if((PlayerInfo[playerid][pVIPPackage] == 0) && (businessid == -1 || BusinessInfo[businessid][bType] != 5)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any advertisement business."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /(ad)vertise [advertisement] ($25/char)"); } if(PlayerInfo[playerid][pAdMuted]) { return SendClientMessage(playerid, COLOR_GREY, "You are muted from submitting advertisements. /report for an unmute."); } if(!PlayerInfo[playerid][pPhone]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have a mobile phone. You need a phone so people can contact you."); } if(PlayerInfo[playerid][pHours] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You need to play at least 2 hours in order to post an advertisement."); } if(gettime() - gLastAd < 30) { return SendClientMessage(playerid, COLOR_GREY, "Advertisements can only be posted every 30 seconds."); } if(PlayerInfo[playerid][pVIPPackage] < 3 && PlayerInfo[playerid][pCash] < price) { return SendClientMessageEx(playerid, COLOR_GREY, "You need $%i in order to place the advertisement. You can't afford that.", price); } new string[20]; gLastAd = gettime(); if(PlayerInfo[playerid][pVIPPackage] == 3) { SendClientMessage(playerid, COLOR_VIP, "** VIP perk: Your advertisement was posted free of charge!"); } else { format(string, sizeof(string), "~r~-$%i", price); GameTextForPlayer(playerid, string, 5000, 1); GivePlayerCash(playerid, -price); if(businessid >= 0) { BusinessInfo[businessid][bCash] += price; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET cash = %i WHERE id = %i", BusinessInfo[businessid][bCash], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); } } SendClientMessageToAllEx((PlayerInfo[playerid][pVIPPackage] > 0) ? (COLOR_LIGHTORANGE) : (COLOR_DARKGREEN), "Newspaper: %s, Contact: %s, Ph: %i", params, GetPlayerRPName(playerid), PlayerInfo[playerid][pPhone]); return 1; } CMD:mark(playerid, params[]) { new slot; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", slot)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /mark [slot (1-3)]"); } if(!(1 <= slot <= 3)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid slot."); } slot--; GetPlayerPos(playerid, MarkedPositions[playerid][slot][mPosX], MarkedPositions[playerid][slot][mPosY], MarkedPositions[playerid][slot][mPosZ]); GetPlayerFacingAngle(playerid, MarkedPositions[playerid][slot][mPosA]); MarkedPositions[playerid][slot][mInterior] = GetPlayerInterior(playerid); MarkedPositions[playerid][slot][mWorld] = GetPlayerVirtualWorld(playerid); SendClientMessageEx(playerid, COLOR_AQUA, "** Position saved in slot %i.", slot + 1); return 1; } CMD:gotomark(playerid, params[]) { new slot; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", slot)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gotomark [slot (1-3)]"); } if(!(1 <= slot <= 3)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid slot."); } if(MarkedPositions[playerid][slot-1][mPosX] == 0.0 && MarkedPositions[playerid][slot-1][mPosY] == 0.0 && MarkedPositions[playerid][slot-1][mPosZ] == 0.0) { return SendClientMessage(playerid, COLOR_GREY, "There is no position in the slot selected."); } slot--; GameTextForPlayer(playerid, "~w~Teleported", 5000, 1); SetPlayerPos(playerid, MarkedPositions[playerid][slot][mPosX], MarkedPositions[playerid][slot][mPosY], MarkedPositions[playerid][slot][mPosZ]); SetPlayerFacingAngle(playerid, MarkedPositions[playerid][slot][mPosA]); SetPlayerInterior(playerid, MarkedPositions[playerid][slot][mInterior]); SetPlayerVirtualWorld(playerid, MarkedPositions[playerid][slot][mWorld]); SetCameraBehindPlayer(playerid); return 1; } CMD:createentrance(playerid, params[]) { new name[40], Float:x, Float:y, Float:z, Float:a; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[40]", name)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /createentrance [name]"); } if(GetNearbyEntrance(playerid) >= 0) { return SendClientMessage(playerid, COLOR_GREY, "There is an entrance in range. Find somewhere else to create this one."); } GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); for(new i = 0; i < MAX_ENTRANCES; i ++) { if(!EntranceInfo[i][eExists]) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO entrances (name, pos_x, pos_y, pos_z, pos_a, outsideint, outsidevw) VALUES('%e', '%f', '%f', '%f', '%f', %i, %i)", name, x, y, z, a - 180.0, GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid)); mysql_tquery(connectionID, queryBuffer, "OnAdminCreateEntrance", "iisffff", playerid, i, name, x, y, z, a); return 1; } } SendClientMessage(playerid, COLOR_GREY, "Entrance slots are currently full. Ask Emmet to increase the internal limit."); return 1; } CMD:editentrance(playerid, params[]) { new entranceid, option[14], param[64]; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[14]S()[64]", entranceid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Entrance, Exit, Name, Icon, World, Owner, Locked, Radius, AdminLevel"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Faction, VIP, Vehicles, Freeze, Label, Password"); return 1; } if(!(0 <= entranceid < MAX_ENTRANCES) || !EntranceInfo[entranceid][eExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid entrance."); } if(!strcmp(option, "entrance", true)) { GetPlayerPos(playerid, EntranceInfo[entranceid][ePosX], EntranceInfo[entranceid][ePosY], EntranceInfo[entranceid][ePosZ]); GetPlayerFacingAngle(playerid, EntranceInfo[entranceid][ePosA]); EntranceInfo[entranceid][eOutsideInt] = GetPlayerInterior(playerid); EntranceInfo[entranceid][eOutsideVW] = GetPlayerVirtualWorld(playerid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', outsideint = %i, outsidevw = %i WHERE id = %i", EntranceInfo[entranceid][ePosX], EntranceInfo[entranceid][ePosY], EntranceInfo[entranceid][ePosZ], EntranceInfo[entranceid][ePosA], EntranceInfo[entranceid][eOutsideInt], EntranceInfo[entranceid][eOutsideVW], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the entrance of entrance %i.", entranceid); } else if(!strcmp(option, "exit", true)) { GetPlayerPos(playerid, EntranceInfo[entranceid][eIntX], EntranceInfo[entranceid][eIntY], EntranceInfo[entranceid][eIntZ]); GetPlayerFacingAngle(playerid, EntranceInfo[entranceid][eIntA]); EntranceInfo[entranceid][eInterior] = GetPlayerInterior(playerid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET int_x = '%f', int_y = '%f', int_z = '%f', int_a = '%f', interior = %i WHERE id = %i", EntranceInfo[entranceid][eIntX], EntranceInfo[entranceid][eIntY], EntranceInfo[entranceid][eIntZ], EntranceInfo[entranceid][eIntA], EntranceInfo[entranceid][eInterior], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the exit of entrance %i.", entranceid); } else if(!strcmp(option, "name", true)) { new name[32]; if(sscanf(param, "s[32]", name)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [name] [text]"); } strcpy(EntranceInfo[entranceid][eName], name, 32); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET name = '%e' WHERE id = %i", EntranceInfo[entranceid][eName], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the name of entrance %i to '%s'.", entranceid, name); } else if(!strcmp(option, "icon", true)) { new iconid; if(sscanf(param, "i", iconid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [icon] [iconid (19300 = hide)]"); } if(!IsValidModel(iconid)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid model ID."); } EntranceInfo[entranceid][eIcon] = iconid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET iconid = %i WHERE id = %i", EntranceInfo[entranceid][eIcon], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the pickup icon model of entrance %i to %i.", entranceid, iconid); } else if(!strcmp(option, "world", true)) { new worldid; if(sscanf(param, "i", worldid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [world] [vw]"); } EntranceInfo[entranceid][eWorld] = worldid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET world = %i WHERE id = %i", EntranceInfo[entranceid][eWorld], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the virtual world of entrance %i to %i.", entranceid, worldid); } else if(!strcmp(option, "owner", true)) { new targetid; if(!isnull(param) && !strcmp(param, "none", true)) { SetEntranceOwner(entranceid, INVALID_PLAYER_ID); return SendClientMessageEx(playerid, COLOR_AQUA, "** You've reset the owner of entrance %i.", entranceid); } if(sscanf(param, "u", targetid)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [owner] [playerid/none]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } SetEntranceOwner(entranceid, targetid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the owner of entrance %i to %s.", entranceid, GetPlayerRPName(targetid)); } else if(!strcmp(option, "locked", true)) { new locked; if(sscanf(param, "i", locked) || !(0 <= locked <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [locked] [0/1]"); } EntranceInfo[entranceid][eLocked] = locked; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET locked = %i WHERE id = %i", EntranceInfo[entranceid][eLocked], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the lock state of entrance %i to %i.", entranceid, locked); } else if(!strcmp(option, "radius", true)) { new Float:radius; if(sscanf(param, "f", radius)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [radius] [range]"); } if(!(1.0 <= radius <= 20.0)) { return SendClientMessage(playerid, COLOR_GREY, "The entry radius must range between 1.0 and 20.0."); } EntranceInfo[entranceid][eRadius] = radius; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET radius = '%f' WHERE id = %i", EntranceInfo[entranceid][eRadius], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the entry radius of entrance %i to %.1f.", entranceid, radius); } else if(!strcmp(option, "adminlevel", true)) { new level; if(sscanf(param, "i", level)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [adminlevel] [level]"); } if(!(0 <= level <= 7)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid level. Valid levels range from 0 to 7."); } EntranceInfo[entranceid][eAdminLevel] = level; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET adminlevel = %i WHERE id = %i", EntranceInfo[entranceid][eAdminLevel], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the admin level of entrance %i to %i.", entranceid, level); } else if(!strcmp(option, "faction", true)) { new type; if(sscanf(param, "i", type)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [faction] [type]"); SendClientMessage(playerid, COLOR_GREY3, "List of types: (0) None (1) Police (2) Medic (3) News (4) Government (5) Hitman (6) Federal"); return 1; } if(!(0 <= type <= 6)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } EntranceInfo[entranceid][eFactionType] = type; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET factiontype = %i WHERE id = %i", EntranceInfo[entranceid][eFactionType], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); if(type == FACTION_NONE) SendClientMessageEx(playerid, COLOR_AQUA, "** You've reset the faction type of entrance %i.", entranceid); else SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the faction type of entrance %i to %s (%i).", entranceid, factionTypes[type], type); } else if(!strcmp(option, "vip", true)) { new rankid; if(sscanf(param, "i", rankid)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [vip] [rankid]"); SendClientMessage(playerid, COLOR_GREY3, "List of ranks: (0) None (1) Limited (2) Limitless (3) Legendary"); return 1; } if(!(0 <= rankid <= 3)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid VIP rank."); } EntranceInfo[entranceid][eVIP] = rankid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET vip = %i WHERE id = %i", EntranceInfo[entranceid][eVIP], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the VIP rank of entrance %i to {A028AD}%s{33CCFF} (%i).", entranceid, GetVIPRank(rankid), rankid); } else if(!strcmp(option, "vehicles", true)) { new status; if(sscanf(param, "i", status) || !(0 <= status <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [vehicles] [0/1]"); } EntranceInfo[entranceid][eVehicles] = status; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET vehicles = %i WHERE id = %i", EntranceInfo[entranceid][eVehicles], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); if(status) SendClientMessageEx(playerid, COLOR_AQUA, "** You've allowed vehicle entry for entrance %i.", entranceid); else SendClientMessageEx(playerid, COLOR_AQUA, "** You've disallowed vehicle entry for entrance %i.", entranceid); } else if(!strcmp(option, "freeze", true)) { new status; if(sscanf(param, "i", status) || !(0 <= status <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [freeze] [0/1]"); } EntranceInfo[entranceid][eFreeze] = status; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET freeze = %i WHERE id = %i", EntranceInfo[entranceid][eFreeze], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); if(status) SendClientMessageEx(playerid, COLOR_AQUA, "** You've enabled freeze & object loading for entrance %i.", entranceid); else SendClientMessageEx(playerid, COLOR_AQUA, "** You've disabled freeze & object loading for entrance %i.", entranceid); } else if(!strcmp(option, "label", true)) { new status; if(sscanf(param, "i", status) || !(0 <= status <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [label] [0/1]"); } EntranceInfo[entranceid][eLabel] = status; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET label = %i WHERE id = %i", EntranceInfo[entranceid][eLabel], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); if(status) SendClientMessageEx(playerid, COLOR_AQUA, "** You've enabled the 3D text label for entrance %i.", entranceid); else SendClientMessageEx(playerid, COLOR_AQUA, "** You've disabled the 3D text label for entrance %i.", entranceid); } else if(!strcmp(option, "password", true)) { if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editentrance [entranceid] [password] [text ('none' to reset)]"); } strcpy(EntranceInfo[entranceid][ePassword], param, 64); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE entrances SET password = '%e' WHERE id = %i", EntranceInfo[entranceid][ePassword], EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); ReloadEntrance(entranceid); SendClientMessageEx(playerid, COLOR_AQUA, "** You've changed the password of entrance %i to '%s'.", entranceid, param); } return 1; } CMD:removeentrance(playerid, params[]) { new entranceid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", entranceid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removeentrance [entranceid]"); } if(!(0 <= entranceid < MAX_ENTRANCES) || !EntranceInfo[entranceid][eExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid entrance."); } DestroyDynamic3DTextLabel(EntranceInfo[entranceid][eText]); DestroyDynamicPickup(EntranceInfo[entranceid][ePickup]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM entrances WHERE id = %i", EntranceInfo[entranceid][eID]); mysql_tquery(connectionID, queryBuffer); EntranceInfo[entranceid][eExists] = 0; EntranceInfo[entranceid][eID] = 0; EntranceInfo[entranceid][eOwnerID] = 0; SendClientMessageEx(playerid, COLOR_AQUA, "** You have removed entrance %i.", entranceid); return 1; } CMD:gotoentrance(playerid, params[]) { new entranceid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "i", entranceid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gotoentrance [entranceid]"); } if(!(0 <= entranceid < MAX_ENTRANCES) || !EntranceInfo[entranceid][eExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid entrance."); } GameTextForPlayer(playerid, "~w~Teleported", 5000, 1); SetPlayerPos(playerid, EntranceInfo[entranceid][ePosX], EntranceInfo[entranceid][ePosY], EntranceInfo[entranceid][ePosZ]); SetPlayerFacingAngle(playerid, EntranceInfo[entranceid][ePosA]); SetPlayerInterior(playerid, EntranceInfo[entranceid][eOutsideInt]); SetPlayerVirtualWorld(playerid, EntranceInfo[entranceid][eOutsideVW]); SetCameraBehindPlayer(playerid); return 1; } CMD:join(playerid, params[]) { for(new i = 0; i < sizeof(jobLocations); i ++) { if(IsPlayerInRangeOfPoint(playerid, 3.0, jobLocations[i][jobX], jobLocations[i][jobY], jobLocations[i][jobZ])) { if(PlayerInfo[playerid][pJob] != JOB_NONE) { if(PlayerInfo[playerid][pVIPPackage] >= 2) { if(PlayerInfo[playerid][pSecondJob] != JOB_NONE) { return SendClientMessage(playerid, COLOR_GREY, "You have two jobs already. Please quit one of them before getting another one."); } if(PlayerInfo[playerid][pJob] == i) { return SendClientMessage(playerid, COLOR_GREY, "You have this job already."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET secondjob = %i WHERE uid = %i", i, PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[playerid][pSecondJob] = i; SendClientMessageEx(playerid, COLOR_AQUA, "You are now a {FF6347}%s{33CCFF}. Use /jobhelp for a list of commands related to your new job.", jobLocations[i][jobName]); } else { SendClientMessage(playerid, COLOR_GREY, "You have a job already. Please quit your current job before getting another one."); } return 1; } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET job = %i WHERE uid = %i", i, PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[playerid][pJob] = i; SendClientMessageEx(playerid, COLOR_AQUA, "You are now a {FF6347}%s{33CCFF}. Use /jobhelp for a list of commands related to your new job.", jobLocations[i][jobName]); return 1; } } SendClientMessage(playerid, COLOR_GREY, "You are not in range of any job icon."); return 1; } CMD:quitjob(playerid, params[]) { new slot; if(PlayerInfo[playerid][pVIPPackage] >= 2 && sscanf(params, "i", slot)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /quitjob [1/2]"); } if((PlayerInfo[playerid][pVIPPackage] < 2) || (PlayerInfo[playerid][pVIPPackage] >= 2 && slot == 1)) { if(PlayerInfo[playerid][pJob] == JOB_NONE) { return SendClientMessage(playerid, COLOR_GREY, "You don't have a job which you can quit."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET job = -1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have quit your job as a {00AA00}%s{33CCFF}.", GetJobName(PlayerInfo[playerid][pJob])); PlayerInfo[playerid][pJob] = JOB_NONE; } else if(slot == 2 && PlayerInfo[playerid][pVIPPackage] >= 2) { if(PlayerInfo[playerid][pSecondJob] == JOB_NONE) { return SendClientMessage(playerid, COLOR_GREY, "You don't have a job in this slot which you can quit."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET secondjob = -1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have quit your secondary job as a {00AA00}%s{33CCFF}.", GetJobName(PlayerInfo[playerid][pSecondJob])); PlayerInfo[playerid][pSecondJob] = JOB_NONE; } return 1; } CMD:getpizza(playerid, params[]) { new houseid; if(!PlayerHasJob(playerid, JOB_PIZZAMAN)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you are not a Pizzaman."); } if(PlayerInfo[playerid][pPizzaCooldown] > 0) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to wait %i more seconds before you can load another pizza.", PlayerInfo[playerid][pPizzaCooldown]); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 448) { return SendClientMessage(playerid, COLOR_GREY, "You need to be driving a pizza bike."); } /*if(PlayerInfo[playerid][pPizzas] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You have pizzas already. Deliver them first."); }*/ if(!IsPlayerInRangeOfPoint(playerid, 6.0, jobLocations[JOB_PIZZAMAN][jobX], jobLocations[JOB_PIZZAMAN][jobY], jobLocations[JOB_PIZZAMAN][jobZ])) { return SendClientMessage(playerid, COLOR_GREY, "You must be closer to the job icon at the pizza stacks."); } if((houseid = GetRandomHouse(playerid)) == -1) { return SendClientMessage(playerid, COLOR_GREY, "There are no houses in the server to deliver pizza to. Ask an admin to set them up."); } PlayerInfo[playerid][pDistance] = GetPlayerDistanceFromPoint(playerid, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ]); PlayerInfo[playerid][pPizzas] = 1; PlayerInfo[playerid][pLastPizza] = gettime(); PlayerInfo[playerid][pPizzaTime] = 0; PlayerInfo[playerid][pPizzaCooldown] = 60; SetPlayerCheckpoint(playerid, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ], 2.0); PlayerInfo[playerid][pCP] = CHECKPOINT_PIZZA; GameTextForPlayer(playerid, "~w~Deliver to ~r~marker", 5000, 1); SendClientMessageEx(playerid, COLOR_AQUA, "** You loaded your bike with a hot and ready pizza. Deliver it to %s.", GetZoneName(HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ])); return 1; } CMD:load(playerid, params[]) { if(!PlayerHasJob(playerid, JOB_COURIER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you are not a Courier."); } if(PlayerInfo[playerid][pCourierCooldown] > 0) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to wait %i more seconds before you can load another delivery.", PlayerInfo[playerid][pCourierCooldown]); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 414 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 498 && GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You need to be driving a Mule or a Boxville."); } if(!IsPlayerInRangeOfPoint(playerid, 8.0, -63.4372, -1121.4932, 1.1103)) { return SendClientMessage(playerid, COLOR_GREY, "You are not at the loading dock."); } if(PlayerInfo[playerid][pShipment] >= 0) { return SendClientMessage(playerid, COLOR_GREY, "You have a shipment loaded already. You need to deliver it first."); } ShowPlayerDialog(playerid, DIALOG_PICKLOAD, DIALOG_STYLE_LIST, "Choose the load you want to deliver.", "Grocery supplies\nAmmunition\nClothing items\nFood & drinks\nBeverages", "Select", "Cancel"); return 1; } CMD:deliver(playerid, params[]) { new businessid, products, amount; if(!PlayerHasJob(playerid, JOB_COURIER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you are not a Courier."); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 414 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 498 && GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You need to be driving a Mule or a Boxville."); } if(PlayerInfo[playerid][pShipment] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You have no shipment loaded which you can deliver."); } if((businessid = GetNearbyBusiness(playerid, 7.0)) == -1 || BusinessInfo[businessid][bType] != PlayerInfo[playerid][pShipment]) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of a business which accepts this type of load."); } if(gettime() - PlayerInfo[playerid][pLastLoad] < 20 && PlayerInfo[playerid][pAdmin] < 2 && !PlayerInfo[playerid][pKicked]) { PlayerInfo[playerid][pACWarns]++; if(PlayerInfo[playerid][pACWarns] < MAX_ANTICHEAT_WARNINGS) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] is possibly teleport delivering (time: %i).", GetPlayerRPName(playerid), playerid, gettime() - PlayerInfo[playerid][pLastLoad]); } else { SendClientMessageToAllEx(COLOR_LIGHTRED, "AdmCmd: %s was autobanned by %s, reason: Teleport delivering", GetPlayerRPName(playerid), SERVER_ANTICHEAT); BanPlayer(playerid, SERVER_ANTICHEAT, "Teleport delivering"); } } products = (GetJobLevel(playerid, JOB_COURIER) * 5) + 5; if(PlayerInfo[playerid][pShipment] == BUSINESS_STORE) { amount = (GetJobLevel(playerid, JOB_COURIER) * 200) + 270; } else if(PlayerInfo[playerid][pShipment] == BUSINESS_GUNSHOP) { amount = (GetJobLevel(playerid, JOB_COURIER) * 200) + 325; } else if(PlayerInfo[playerid][pShipment] == BUSINESS_CLOTHES) { amount = (GetJobLevel(playerid, JOB_COURIER) * 200) + 345; } else if(PlayerInfo[playerid][pShipment] == BUSINESS_RESTAURANT) { amount = (GetJobLevel(playerid, JOB_COURIER) * 200) + 390; } else if(PlayerInfo[playerid][pShipment] == BUSINESS_BARCLUB) { amount = (GetJobLevel(playerid, JOB_COURIER) * 200) + 240; } amount += floatround(GetPlayerDistanceFromPoint(playerid, -63.4372, -1121.4932, 1.1103) / 2.0); SendClientMessageEx(playerid, COLOR_AQUA, "** You have earned {00AA00}$%i{33CCFF} on your paycheck for delivering %i products.", amount, products); AddToPaycheck(playerid, amount); BusinessInfo[businessid][bProducts] += products; PlayerInfo[playerid][pShipment] = -1; PlayerInfo[playerid][pCourierCooldown] = 120; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET products = %i WHERE id = %i", BusinessInfo[businessid][bProducts], BusinessInfo[businessid][bID]); mysql_tquery(connectionID, queryBuffer); IncreaseJobSkill(playerid, JOB_COURIER); return 1; } CMD:skill(playerid, params[]) { if(!strcmp(params, "courier", true)) { SendClientMessageEx(playerid, COLOR_GREEN, "Your courier skill level is %i/5.", GetJobLevel(playerid, JOB_COURIER)); if(GetJobLevel(playerid, JOB_COURIER) < 5) { if(PlayerInfo[playerid][pCourierSkill] < 50) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to deliver %i more shipments in order to level up.", 50 - PlayerInfo[playerid][pCourierSkill]); } else if(PlayerInfo[playerid][pCourierSkill] < 100) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to deliver %i more shipments in order to level up.", 100 - PlayerInfo[playerid][pCourierSkill]); } else if(PlayerInfo[playerid][pCourierSkill] < 200) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to deliver %i more shipments in order to level up.", 200 - PlayerInfo[playerid][pCourierSkill]); } else if(PlayerInfo[playerid][pCourierSkill] < 350) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to deliver %i more shipments in order to level up.", 350 - PlayerInfo[playerid][pCourierSkill]); } } else { SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job."); } } else if(!strcmp(params, "fishing", true)) { SendClientMessageEx(playerid, COLOR_GREEN, "Your fishing skill level is %i/5.", GetJobLevel(playerid, JOB_FISHERMAN)); if(GetJobLevel(playerid, JOB_FISHERMAN) < 5) { if(PlayerInfo[playerid][pFishingSkill] < 50) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to catch %i more fish in order to level up.", 50 - PlayerInfo[playerid][pFishingSkill]); } else if(PlayerInfo[playerid][pFishingSkill] < 100) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to catch %i more fish in order to level up.", 100 - PlayerInfo[playerid][pFishingSkill]); } else if(PlayerInfo[playerid][pFishingSkill] < 200) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to catch %i more fish in order to level up.", 200 - PlayerInfo[playerid][pFishingSkill]); } else if(PlayerInfo[playerid][pFishingSkill] < 350) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to catch %i more fish in order to level up.", 350 - PlayerInfo[playerid][pFishingSkill]); } } else { SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job."); } } else if(!strcmp(params, "bodyguard", true)) { SendClientMessageEx(playerid, COLOR_GREEN, "Your bodyguard skill level is %i/5.", GetJobLevel(playerid, JOB_BODYGUARD)); if(GetJobLevel(playerid, JOB_BODYGUARD) < 5) { if(PlayerInfo[playerid][pGuardSkill] < 25) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more vests in order to level up.", 25 - PlayerInfo[playerid][pGuardSkill]); } else if(PlayerInfo[playerid][pGuardSkill] < 50) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more vests in order to level up.", 50 - PlayerInfo[playerid][pGuardSkill]); } else if(PlayerInfo[playerid][pGuardSkill] < 100) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more vests in order to level up.", 100 - PlayerInfo[playerid][pGuardSkill]); } else if(PlayerInfo[playerid][pGuardSkill] < 200) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more vests in order to level up.", 200 - PlayerInfo[playerid][pGuardSkill]); } } else { SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job."); } } else if(!strcmp(params, "weapondealer", true)) { SendClientMessageEx(playerid, COLOR_GREEN, "Your weapons dealer skill level is %i/5.", GetJobLevel(playerid, JOB_WEAPONDEALER)); if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 5) { if(PlayerInfo[playerid][pWeaponSkill] < 50) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more weapons in order to level up.", 50 - PlayerInfo[playerid][pWeaponSkill]); } else if(PlayerInfo[playerid][pWeaponSkill] < 100) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more weapons in order to level up.", 100 - PlayerInfo[playerid][pWeaponSkill]); } else if(PlayerInfo[playerid][pWeaponSkill] < 200) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more weapons in order to level up.", 200 - PlayerInfo[playerid][pWeaponSkill]); } else if(PlayerInfo[playerid][pWeaponSkill] < 500) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to sell %i more weapons in order to level up.", 500 - PlayerInfo[playerid][pWeaponSkill]); } } else { SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job."); } } else if(!strcmp(params, "mechanic", true)) { SendClientMessageEx(playerid, COLOR_GREEN, "Your mechanic skill level is %i/5.", GetJobLevel(playerid, JOB_MECHANIC)); if(GetJobLevel(playerid, JOB_MECHANIC) < 5) { if(PlayerInfo[playerid][pMechanicSkill] < 25) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to fix & refuel %i more vehicles in order to level up.", 25 - PlayerInfo[playerid][pMechanicSkill]); } else if(PlayerInfo[playerid][pMechanicSkill] < 50) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to fix & refuel %i more vehicles in order to level up.", 50 - PlayerInfo[playerid][pMechanicSkill]); } else if(PlayerInfo[playerid][pMechanicSkill] < 100) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to fix & refuel %i more vehicles in order to level up.", 100 - PlayerInfo[playerid][pMechanicSkill]); } else if(PlayerInfo[playerid][pMechanicSkill] < 200) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to fix & refuel %i more vehicles in order to level up.", 200 - PlayerInfo[playerid][pMechanicSkill]); } } else { SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job."); } } else if(!strcmp(params, "drugsmuggler", true)) { SendClientMessageEx(playerid, COLOR_GREEN, "Your drug smuggler skill level is %i/5.", GetJobLevel(playerid, JOB_DRUGDEALER)); if(GetJobLevel(playerid, JOB_DRUGDEALER) < 5) { if(PlayerInfo[playerid][pSmugglerSkill] < 25) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to smuggle %i more packages in order to level up.", 25 - PlayerInfo[playerid][pSmugglerSkill]); } else if(PlayerInfo[playerid][pSmugglerSkill] < 50) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to smuggle %i more packages in order to level up.", 50 - PlayerInfo[playerid][pSmugglerSkill]); } else if(PlayerInfo[playerid][pSmugglerSkill] < 75) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to smuggle %i more packages in order to level up.", 75 - PlayerInfo[playerid][pSmugglerSkill]); } else if(PlayerInfo[playerid][pSmugglerSkill] < 100) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to smuggle %i more packages in order to level up.", 100 - PlayerInfo[playerid][pSmugglerSkill]); } } else { SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job."); } } else if(!strcmp(params, "lawyer", true)) { SendClientMessageEx(playerid, COLOR_GREEN, "Your lawyer skill level is %i/5.", GetJobLevel(playerid, JOB_LAWYER)); if(GetJobLevel(playerid, JOB_LAWYER) < 5) { if(PlayerInfo[playerid][pLawyerSkill] < 25) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to defend %i more clients in order to level up.", 25 - PlayerInfo[playerid][pLawyerSkill]); } else if(PlayerInfo[playerid][pLawyerSkill] < 50) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to defend %i more clients in order to level up.", 50 - PlayerInfo[playerid][pLawyerSkill]); } else if(PlayerInfo[playerid][pLawyerSkill] < 100) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to defend %i more clients in order to level up.", 100 - PlayerInfo[playerid][pLawyerSkill]); } else if(PlayerInfo[playerid][pLawyerSkill] < 200) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to defend %i more clients in order to level up.", 200 - PlayerInfo[playerid][pLawyerSkill]); } } else { SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job."); } } else if(!strcmp(params, "detective", true)) { SendClientMessageEx(playerid, COLOR_GREEN, "Your detective skill level is %i/5.", GetJobLevel(playerid, JOB_DETECTIVE)); if(GetJobLevel(playerid, JOB_DETECTIVE) < 5) { if(PlayerInfo[playerid][pDetectiveSkill] < 50) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to find %i more people in order to level up.", 50 - PlayerInfo[playerid][pDetectiveSkill]); } else if(PlayerInfo[playerid][pDetectiveSkill] < 100) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to find %i more people in order to level up.", 100 - PlayerInfo[playerid][pDetectiveSkill]); } else if(PlayerInfo[playerid][pDetectiveSkill] < 200) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to find %i more people in order to level up.", 200 - PlayerInfo[playerid][pDetectiveSkill]); } else if(PlayerInfo[playerid][pDetectiveSkill] < 400) { SendClientMessageEx(playerid, COLOR_GREEN, "You need to find %i more people in order to level up.", 400 - PlayerInfo[playerid][pDetectiveSkill]); } } else { SendClientMessage(playerid, COLOR_GREEN, "You have reached the maximum skill level for this job."); } } else { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /skill [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Courier, Fishing, Bodyguard, WeaponDealer, Mechanic, DrugSmuggler, Lawyer, Detective"); } return 1; } CMD:fish(playerid, params[]) { if(!PlayerHasJob(playerid, JOB_FISHERMAN)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Fisherman."); } if(!IsPlayerAtFishingPlace(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not close to anywhere where you can fish."); } if(!PlayerInfo[playerid][pFishingRod]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have a fishing rod. You need a fishing rod to fish!"); } if(PlayerInfo[playerid][pFishTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are fishing already. Wait for your line to be reeled in first."); } if(PlayerInfo[playerid][pFishWeight] >= 1000) { return SendClientMessage(playerid, COLOR_GREY, "You have too much fish and can't fish any longer."); } if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return SendClientMessage(playerid, COLOR_GREY, "You must be onfoot in order to use this command."); } ApplyAnimation(playerid, "SAMP", "FishingIdle", 4.1, 0, 0, 0, 1, 0, 1); SetPlayerAttachedObject(playerid, 9, 18632, 6, 0.112999, 0.024000, 0.000000, -172.999954, 28.499994, 0.000000); //SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s reels the line of their fishing rod into the water.", GetPlayerRPName(playerid)); GameTextForPlayer(playerid, "~w~Fishing...", 6000, 3); PlayerInfo[playerid][pFishTime] = 6; if(PlayerInfo[playerid][pFishingBait] > 0) { PlayerInfo[playerid][pFishingBait]--; PlayerInfo[playerid][pUsedBait] = 1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fishingbait = fishingbait - 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); //SendClientMessage(playerid, COLOR_AQUA, "** You used one fish bait. Your odds of catching a bigger fish are increased!"); } else { PlayerInfo[playerid][pUsedBait] = 0; } return 1; } CMD:sellfish(playerid, params[]) { new businessid; if(!PlayerHasJob(playerid, JOB_FISHERMAN)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Fisherman."); } if((businessid = GetInsideBusiness(playerid)) == -1 || BusinessInfo[businessid][bType] != BUSINESS_STORE) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside any Supermarket business."); } if(!PlayerInfo[playerid][pFishWeight]) { return SendClientMessage(playerid, COLOR_GREY, "You have no fish which you can sell."); } new amount = (PlayerInfo[playerid][pFishWeight] * 1) + random(200); SendClientMessageEx(playerid, COLOR_AQUA, "** You earned {00AA00}$%i{33CCFF} on your paycheck for selling %i kg of fish.", amount, PlayerInfo[playerid][pFishWeight]); AddToPaycheck(playerid, amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET fishweight = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[playerid][pFishWeight] = 0; return 1; } CMD:myfish(playerid, params[]) { if(!PlayerHasJob(playerid, JOB_FISHERMAN)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Fisherman."); } SendClientMessage(playerid, COLOR_GREEN, "|______ My Fish ______|"); SendClientMessageEx(playerid, COLOR_GREY2, "You have %i/1000 kg of fish in your inventory.", PlayerInfo[playerid][pFishWeight]); return 1; } CMD:sellvest(playerid, params[]) { new targetid, amount; if(!PlayerHasJob(playerid, JOB_BODYGUARD)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Bodyguard."); } if(sscanf(params, "ui", targetid, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sellvest [playerid] [amount]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself."); } if(amount < 1000 || amount > 5000) { return SendClientMessage(playerid, COLOR_GREY, "The amount specified must range between $1000 and $5000."); } if(gettime() - PlayerInfo[playerid][pLastSell] < 10) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only use this command every 10 seconds. Please wait %i more seconds.", 10 - (gettime() - PlayerInfo[playerid][pLastSell])); } PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pVestOffer] = playerid; PlayerInfo[targetid][pVestPrice] = amount; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered you a vest with %.1f points of armor for $%i (/accept vest).", GetPlayerRPName(playerid), 50.0 + (GetJobLevel(playerid, JOB_BODYGUARD) * 5), amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You offered %s a vest with %.1f points of armor for $%i.", GetPlayerRPName(targetid), 50.0 + (GetJobLevel(playerid, JOB_BODYGUARD) * 5), amount); return 1; } CMD:smugglemats(playerid, params[]) { if(!PlayerHasJob(playerid, JOB_WEAPONDEALER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Weapons Dealer."); } if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1421.6913, -1318.4719, 13.5547) && !IsPlayerInRangeOfPoint(playerid, 3.0, 2393.4885, -2008.5726, 13.3467)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any materials pickup."); } if(PlayerInfo[playerid][pCP] != CHECKPOINT_NONE) { return SendClientMessage(playerid, COLOR_GREY, "You must cancel your active checkpoint first. /cancelcp to cancel it."); } if(PlayerInfo[playerid][pCash] < 150) { return SendClientMessage(playerid, COLOR_GREY, "You need at least $300 in cash to smuggle materials."); } if(PlayerInfo[playerid][pMaterials] + 250 > GetPlayerCapacity(playerid, CAPACITY_MATERIALS)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS)); } PlayerInfo[playerid][pCP] = CHECKPOINT_MATS; PlayerInfo[playerid][pSmuggleTime] = gettime(); GivePlayerCash(playerid, -150); SendClientMessage(playerid, COLOR_AQUA, "** You paid $150 for a load of materials. Smuggle them to the depot to collect them."); if(IsPlayerInRangeOfPoint(playerid, 3.0, 1421.6913, -1318.4719, 13.5547)) { AddPointMoney(POINT_MATPICKUP1, 75); SetPlayerCheckpoint(playerid, 2173.2129, -2264.1548, 13.3467, 3.0); PlayerInfo[playerid][pSmuggleMats] = 1; } else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2393.4885, -2008.5726, 13.3467)) { AddPointMoney(POINT_MATPICKUP2, 75); SetPlayerCheckpoint(playerid, 2288.0918, -1105.6555, 37.9766, 3.0); PlayerInfo[playerid][pSmuggleMats] = 2; } return 1; } CMD:getmats(playerid, params[]) { return cmd_smugglemats(playerid, params); } CMD:sellgun(playerid, params[]) { new targetid, weapon[10], price; if(!PlayerHasJob(playerid, JOB_WEAPONDEALER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Weapons Dealer."); } if(PlayerInfo[playerid][pHours] < 2 || PlayerInfo[playerid][pWeaponRestricted] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are either weapon restricted or you played less than two playing hours."); } if(IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't sell weapons from within a vehicle."); } if(sscanf(params, "us[10]I(0)", targetid, weapon, price)) { SendClientMessageEx(playerid, COLOR_GREEN, "|______ Weapons Crafting ______|"); if(GetJobLevel(playerid, JOB_WEAPONDEALER) >= 1) { SendClientMessage(playerid, COLOR_GREY2, "Level 1: Bat [50], Shovel [50], Golfclub [50], Poolcue [50]"); SendClientMessage(playerid, COLOR_GREY2, "Level 1: Katana [50], Dildo [50], Flowers [50], Cane [50]"); SendClientMessage(playerid, COLOR_GREY2, "Level 1: 9mm [100], Sdpistol [150], Shotgun [200]"); } if(GetJobLevel(playerid, JOB_WEAPONDEALER) >= 2) { SendClientMessage(playerid, COLOR_GREY2, "Level 2: MP5 [1000], Deagle [2000]"); } if(GetJobLevel(playerid, JOB_WEAPONDEALER) >= 3) { SendClientMessage(playerid, COLOR_GREY2, "Level 3: Uzi [500], Tec9 [500], Rifle [1000]"); } if(GetJobLevel(playerid, JOB_WEAPONDEALER) >= 4) { SendClientMessage(playerid, COLOR_GREY2, "Level 4: Ak47 [3500]"); } if(GetJobLevel(playerid, JOB_WEAPONDEALER) >= 5) { SendClientMessage(playerid, COLOR_GREY2, "Level 5: M4 [4500]"); } SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sellgun [playerid] [name] [price]"); return 1; } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(PlayerInfo[targetid][pHours] < 2 || PlayerInfo[targetid][pWeaponRestricted] > 0) { return SendClientMessage(playerid, COLOR_GREY, "That player is either weapon restricted or played less than two playing hours."); } if(gettime() - PlayerInfo[playerid][pLastSell] < 10) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only use this command every 10 seconds. Please wait %i more seconds.", 10 - (gettime() - PlayerInfo[playerid][pLastSell])); } if(!strcmp(weapon, "bat", true)) { if(PlayerInfo[playerid][pMaterials] < 50) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 5)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 5); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 5; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a baseball bat for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a baseball bat for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "shovel", true)) { if(PlayerInfo[playerid][pMaterials] < 50) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 6)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 6); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 6; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a shovel for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a shovel for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "golfclub", true)) { if(PlayerInfo[playerid][pMaterials] < 50) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 2)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 2); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 2; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a golf club for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a golf club for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "poolcue", true)) { if(PlayerInfo[playerid][pMaterials] < 50) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 7)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 7); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 7; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a pool cue for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a pool cue for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "katana", true)) { if(PlayerInfo[playerid][pMaterials] < 50) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 8)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 8); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 8; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a katana for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a katana for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "dildo", true)) { if(PlayerInfo[playerid][pMaterials] < 50) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 10)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 10); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 10; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a dildo for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a dildo for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "flowers", true)) { if(PlayerInfo[playerid][pMaterials] < 50) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 14)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 14); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 14; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you flowers for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s flowers for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "cane", true)) { if(PlayerInfo[playerid][pMaterials] < 50) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 15)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 15); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 15; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a cane for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a cane for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "9mm", true)) { if(PlayerInfo[playerid][pMaterials] < 100) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 22)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 22); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[playerid][pLastSell] = gettime(); PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 22; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a 9mm for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a 9mm for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "sdpistol", true)) { if(PlayerInfo[playerid][pMaterials] < 150) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 23)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 23); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 23; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a silenced pistol for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a silenced pistol for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "shotgun", true)) { if(PlayerInfo[playerid][pMaterials] < 200) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 25)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 25); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 25; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a shotgun for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a shotgun for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "mp5", true)) { if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 2) { return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon."); } if(PlayerInfo[playerid][pMaterials] < 1000) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 29)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 29); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 29; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you an MP5 for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s an MP5 for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "deagle", true)) { if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 2) { return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon."); } if(PlayerInfo[playerid][pMaterials] < 2000) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 24)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 24); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 24; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a Desert Eagle for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a Desert Eagle for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "uzi", true)) { if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 3) { return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon."); } if(PlayerInfo[playerid][pMaterials] < 500) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 28)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 28); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 28; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a Micro Uzi for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a Micro Uzi for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "tec9", true)) { if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 3) { return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon."); } if(PlayerInfo[playerid][pMaterials] < 500) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 32)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 32); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 32; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you a Tec-9 for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s a Tec-9 for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "ak47", true)) { if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 4) { return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon."); } if(PlayerInfo[playerid][pMaterials] < 3500) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 30)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 30); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 30; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you an AK-47 for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s an AK-47 for $%i.", GetPlayerRPName(targetid), price); } } else if(!strcmp(weapon, "m4", true)) { if(GetJobLevel(playerid, JOB_WEAPONDEALER) < 5) { return SendClientMessage(playerid, COLOR_GREY, "Your skill level is not high enough to craft this weapon."); } if(PlayerInfo[playerid][pMaterials] < 4500) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough materials to craft this weapon."); } if(PlayerHasWeapon(targetid, 31)) { return SendClientMessage(playerid, COLOR_GREY, "That player has this weapon already."); } if(targetid == playerid) { SellWeapon(playerid, targetid, 31); } else if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } else { PlayerInfo[targetid][pSellOffer] = playerid; PlayerInfo[targetid][pSellType] = ITEM_SELLGUN; PlayerInfo[targetid][pSellExtra] = 31; PlayerInfo[targetid][pSellPrice] = price; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered to sell you an M4 for $%i. (/accept weapon)", GetPlayerRPName(playerid), price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to sell %s an M4 for $%i.", GetPlayerRPName(targetid), price); } } return 1; } CMD:buycomps(playerid, params[]) { new amount, price, cost = 1200 - (GetJobLevel(playerid, JOB_MECHANIC) * 200); if(!PlayerHasJob(playerid, JOB_MECHANIC)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Mechanic."); } if(!IsPlayerInRangeOfPoint(playerid, 3.0, 2330.0369, -2315.4553, 13.5469)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the component shop."); } if(sscanf(params, "i", amount)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /buycomps [amount]"); SendClientMessageEx(playerid, COLOR_GREY3, "You are paying $%i per component at your current skill level.", cost); return 1; } if(!(1 <= amount <= 10)) { return SendClientMessage(playerid, COLOR_GREY, "The amount must range between 1 and 10."); } if(PlayerInfo[playerid][pComponents] + amount > 20) { return SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 20 components."); } price = amount * cost; if(PlayerInfo[playerid][pCash] < price) { SendClientMessageEx(playerid, COLOR_GREY, "You can't afford to purchase %i components for $%i.", amount, price); } else { PlayerInfo[playerid][pComponents] += amount; GivePlayerCash(playerid, -price); SendClientMessageEx(playerid, COLOR_AQUA, "** You have purchased %i components for $%i.", amount, price); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET components = %i WHERE uid = %i", PlayerInfo[playerid][pComponents], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } return 1; } CMD:repair(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid), Float:health; if(GetInsideGarage(playerid) >= 0) { if(gettime() - PlayerInfo[playerid][pLastRepair] < 20) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only repair a vehicle every 20 seconds. Please wait %i more seconds.", 20 - (gettime() - PlayerInfo[playerid][pLastRepair])); } if(!vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle."); } if(!VehicleHasEngine(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine which can be repaired."); } GetVehicleHealth(vehicleid, health); if(health >= 1000.0) { SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't need to be repaired."); } else { PlayerInfo[playerid][pLastRepair] = gettime(); SetVehicleHealth(vehicleid, 1000.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s repairs the vehicle.", GetPlayerRPName(playerid)); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } } else if(PlayerHasJob(playerid, JOB_MECHANIC) || PlayerInfo[playerid][pVIPPackage] == 3) { if(PlayerInfo[playerid][pVIPPackage] < 3 && !PlayerInfo[playerid][pComponents]) { return SendClientMessage(playerid, COLOR_GREY, "You have no components left."); } if(gettime() - PlayerInfo[playerid][pLastRepair] < 20) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only repair a vehicle every 20 seconds. Please wait %i more seconds.", 20 - (gettime() - PlayerInfo[playerid][pLastRepair])); } if(!vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle."); } if(!VehicleHasEngine(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine which can be repaired."); } GetVehicleHealth(vehicleid, health); if(health >= 1000.0) { SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't need to be repaired."); } else { if(PlayerInfo[playerid][pVIPPackage] < 3) { PlayerInfo[playerid][pComponents]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET components = %i WHERE uid = %i", PlayerInfo[playerid][pComponents], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else { SendClientMessage(playerid, COLOR_VIP, "** VIP perk: You repaired this vehicle free of charge."); } PlayerInfo[playerid][pLastRepair] = gettime(); SetVehicleHealth(vehicleid, 1000.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s repairs the vehicle.", GetPlayerRPName(playerid)); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); IncreaseJobSkill(playerid, JOB_MECHANIC); } } else { return SendClientMessage(playerid, COLOR_GREY, "You need to be either inside a garage or a Mechanic."); } return 1; } CMD:refill(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(!PlayerHasJob(playerid, JOB_MECHANIC)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Mechanic."); } if(!PlayerInfo[playerid][pComponents]) { return SendClientMessage(playerid, COLOR_GREY, "You have no components left."); } if(gettime() - PlayerInfo[playerid][pLastRefuel] < 20) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only refuel a vehicle every 20 seconds. Please wait %i more seconds.", 20 - (gettime() - PlayerInfo[playerid][pLastRefuel])); } if(!vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle."); } if(!VehicleHasEngine(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine which can be refueled."); } if(vehicleFuel[vehicleid] >= 100) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't need to be refueled."); } if(vehicleFuel[vehicleid] + 10 >= 100) { vehicleFuel[vehicleid] = 100; } else { vehicleFuel[vehicleid] += 10; } PlayerInfo[playerid][pComponents]--; PlayerInfo[playerid][pLastRefuel] = gettime(); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s pours some gasoline to the vehicle.", GetPlayerRPName(playerid)); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET components = %i WHERE uid = %i", PlayerInfo[playerid][pComponents], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); IncreaseJobSkill(playerid, JOB_MECHANIC); return 1; } CMD:nos(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(!PlayerHasJob(playerid, JOB_MECHANIC) && PlayerInfo[playerid][pVIPPackage] != 3) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Mechanic."); } if(PlayerInfo[playerid][pVIPPackage] == 0 && !PlayerInfo[playerid][pComponents]) { return SendClientMessage(playerid, COLOR_GREY, "You have no components left."); } if(!vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle."); } switch(GetVehicleModel(vehicleid)) { case 581, 523, 462, 521, 463, 522, 461, 448, 468, 586, 509, 481, 510, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 590, 569, 537, 538, 570, 449: return SendClientMessage(playerid, COLOR_GREY, "This vehicle can't be modified with nitrous."); } if(PlayerInfo[playerid][pVIPPackage] < 3) { PlayerInfo[playerid][pComponents]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET components = %i WHERE uid = %i", PlayerInfo[playerid][pComponents], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else { SendClientMessage(playerid, COLOR_VIP, "** VIP perk: You added nitrous to this vehicle free of charge."); } AddVehicleComponent(vehicleid, 1009); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s attaches a 2x NOS Canister on the engine feed.", GetPlayerRPName(playerid)); return 1; } CMD:hyd(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(!PlayerHasJob(playerid, JOB_MECHANIC) && PlayerInfo[playerid][pVIPPackage] != 3) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Mechanic."); } if(PlayerInfo[playerid][pVIPPackage] == 0 && !PlayerInfo[playerid][pComponents]) { return SendClientMessage(playerid, COLOR_GREY, "You have no components left."); } if(!vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle."); } if(PlayerInfo[playerid][pVIPPackage] < 3) { PlayerInfo[playerid][pComponents]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET components = %i WHERE uid = %i", PlayerInfo[playerid][pComponents], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else { SendClientMessage(playerid, COLOR_VIP, "** VIP perk: You added hydraulics to this vehicle free of charge."); } AddVehicleComponent(vehicleid, 1087); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s attaches a set of hydraulics to the vehicle.", GetPlayerRPName(playerid)); return 1; } CMD:fill(playerid, params[]) { return cmd_refuel(playerid, params); } CMD:refuel(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(!IsPlayerAtFuelStation(playerid) && GetInsideGarage(playerid) == -1) { return SendClientMessage(playerid, COLOR_GREY, "You need to be at a gas station or inside of a garage."); } if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle."); } if(!VehicleHasEngine(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine and can't be refilled."); } if(vehicleFuel[vehicleid] >= 100) { return SendClientMessage(playerid, COLOR_GREY, "The fuel tank in this vehicle is already full."); } if(PlayerInfo[playerid][pCash] < (100 - vehicleFuel[vehicleid]) * 2) { return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough cash. It will cost you at least $%i.", (100 - vehicleFuel[vehicleid]) * 2); } if(PlayerInfo[playerid][pRefuel] != INVALID_VEHICLE_ID) { GivePlayerCash(playerid, -PlayerInfo[playerid][pRefuelAmount]); SendClientMessageEx(playerid, COLOR_AQUA, "** You've refilled your vehicle's gas tank for $%i.", PlayerInfo[playerid][pRefuelAmount]); PlayerInfo[playerid][pRefuel] = INVALID_VEHICLE_ID; PlayerInfo[playerid][pRefuelAmount] = 0; } else { if(GetVehicleParams(vehicleid, VEHICLE_ENGINE)) { return SendClientMessage(playerid, COLOR_GREY, "The engine needs to be shut down before proceeding."); } PlayerInfo[playerid][pRefuel] = vehicleid; PlayerInfo[playerid][pRefuelAmount] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s begins to refuel their vehicle's gas tank.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_WHITE, "** This will take about %i seconds. You will be notified once completed.", 100 - vehicleFuel[vehicleid]); } return 1; } CMD:withdraw(playerid, params[]) { new amount; if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank."); } if(sscanf(params, "i", amount)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage] /withdraw [amount] ($%i available)", PlayerInfo[playerid][pBank]); } if(amount < 1 || amount > PlayerInfo[playerid][pBank]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } PlayerInfo[playerid][pBank] -= amount; GivePlayerCash(playerid, amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET bank = %i WHERE uid = %i", PlayerInfo[playerid][pBank], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have withdrawn $%i from your bank account. Your new balance is $%i.", amount, PlayerInfo[playerid][pBank]); return 1; } CMD:deposit(playerid, params[]) { new amount; if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank."); } if(sscanf(params, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage] /deposit [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pCash]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } PlayerInfo[playerid][pBank] += amount; GivePlayerCash(playerid, -amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET bank = %i WHERE uid = %i", PlayerInfo[playerid][pBank], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have deposited $%i into your bank account. Your new balance is $%i.", amount, PlayerInfo[playerid][pBank]); return 1; } CMD:wiretransfer(playerid, params[]) { new targetid, amount; if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank."); } if(PlayerInfo[playerid][pLevel] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You can only use this command if you are level 2+."); } if(sscanf(params, "ui", targetid, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage] /wiretransfer [playerid] [amount]"); } if(!IsPlayerConnected(targetid) || !PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or hasn't logged in yet."); } if(amount < 1 || amount > PlayerInfo[playerid][pBank]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't transfer funds to yourself."); } PlayerInfo[targetid][pBank] += amount; PlayerInfo[playerid][pBank] -= amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET bank = %i WHERE uid = %i", PlayerInfo[playerid][pBank], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET bank = %i WHERE uid = %i", PlayerInfo[targetid][pBank], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have transferred $%i to %s. Your new balance is $%i.", amount, GetPlayerRPName(targetid), PlayerInfo[playerid][pBank]); SendClientMessageEx(targetid, COLOR_AQUA, "** %s has transferred $%i to your bank account.", GetPlayerRPName(playerid), amount); Log_Write("log_give", "%s (uid: %i) (IP: %s) transferred $%i to %s (uid: %i) (IP: %s)", GetPlayerRPName(playerid), PlayerInfo[playerid][pID], GetPlayerIP(playerid), amount, GetPlayerRPName(targetid), PlayerInfo[targetid][pID], GetPlayerIP(targetid)); if(!strcmp(GetPlayerIP(playerid), GetPlayerIP(targetid))) { SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s (IP: %s) has transferred $%i to %s (IP: %s).", GetPlayerRPName(playerid), GetPlayerIP(playerid), amount, GetPlayerRPName(targetid), GetPlayerIP(targetid)); } return 1; } CMD:balance(playerid, params[]) { if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank."); } SendClientMessageEx(playerid, COLOR_GREEN, "Your bank account balance is $%i.", PlayerInfo[playerid][pBank]); return 1; } CMD:rt(playerid, params[]) { return cmd_rsms(playerid, params); } //CMD:rs(playerid, params[]) //{ //return cmd_rsms(playerid, params); //} CMD:rsms(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /rsms [text]"); } if(PlayerInfo[playerid][pTextFrom] == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You haven't received a text by anyone since you joined the server."); } if(PlayerInfo[PlayerInfo[playerid][pTextFrom]][pJailType] > 0) { return SendClientMessage(playerid, COLOR_GREY, "That player is currently imprisoned and cannot use their phone."); } if(PlayerInfo[PlayerInfo[playerid][pTextFrom]][pTogglePhone]) { return SendClientMessage(playerid, COLOR_GREY, "That player has their mobile phone switched off."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are unable to use your cellphone at the moment."); } PlayerInfo[PlayerInfo[playerid][pTextFrom]][pTextFrom] = playerid; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes out a cellphone and sends a message.", GetPlayerRPName(playerid)); SendClientMessageEx(PlayerInfo[playerid][pTextFrom], COLOR_YELLOW, "** SMS from %s (%i): %s **", GetPlayerRPName(playerid), PlayerInfo[playerid][pPhone], params); SendClientMessageEx(playerid, COLOR_YELLOW, "** SMS to %s (%i): %s **", GetPlayerRPName(PlayerInfo[playerid][pTextFrom]), PlayerInfo[PlayerInfo[playerid][pTextFrom]][pPhone], params); GivePlayerCash(playerid, -1); GameTextForPlayer(playerid, "~w~Text sent!~n~~r~-$1", 5000, 1); return 1; } CMD:t(playerid, params[]) { return cmd_sms(playerid, params); } CMD:sms(playerid, params[]) { new number, msg[128]; if(sscanf(params, "is[128]", number, msg)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sms [number] [message]"); } if(!PlayerInfo[playerid][pPhone]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have a cellphone and therefore can't use this command."); } if(PlayerInfo[playerid][pTogglePhone]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use your mobile phone right now as you have it toggled."); } if(number == 0 || number == PlayerInfo[playerid][pPhone]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid number."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are unable to use your cellphone at the moment."); } foreach(new i : Player) { if(PlayerInfo[i][pPhone] == number) { if(PlayerInfo[i][pJailType] > 0) { return SendClientMessage(playerid, COLOR_GREY, "That player is currently imprisoned and cannot use their phone."); } if(PlayerInfo[i][pTogglePhone]) { return SendClientMessage(playerid, COLOR_GREY, "That player has their mobile phone switched off."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes out a cellphone and sends a message.", GetPlayerRPName(playerid)); if(strlen(msg) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, COLOR_YELLOW, "** SMS from %s (%i): %.*s... **", GetPlayerRPName(playerid), PlayerInfo[playerid][pPhone], MAX_SPLIT_LENGTH, msg); SendClientMessageEx(i, COLOR_YELLOW, "** SMS from %s (%i): ...%s **", GetPlayerRPName(playerid), PlayerInfo[playerid][pPhone], msg[MAX_SPLIT_LENGTH]); SendClientMessageEx(playerid, COLOR_YELLOW, "** SMS to %s (%i): %.*s... **", GetPlayerRPName(i), PlayerInfo[i][pPhone], MAX_SPLIT_LENGTH, msg); SendClientMessageEx(playerid, COLOR_YELLOW, "** SMS to %s (%i): ...%s **", GetPlayerRPName(i), PlayerInfo[i][pPhone], msg[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, COLOR_YELLOW, "** SMS from %s (%i): %s **", GetPlayerRPName(playerid), PlayerInfo[playerid][pPhone], msg); SendClientMessageEx(playerid, COLOR_YELLOW, "** SMS to %s (%i): %s **", GetPlayerRPName(i), PlayerInfo[i][pPhone], msg); } if(PlayerInfo[i][pTextFrom] == INVALID_PLAYER_ID) { SendClientMessage(i, COLOR_WHITE, "** You can use '/rsms [message]' to reply to this text message."); } PlayerInfo[i][pTextFrom] = playerid; GivePlayerCash(playerid, -1); GameTextForPlayer(playerid, "~w~Text sent!~n~~r~-$1", 5000, 1); return 1; } } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, jailtype, togglephone FROM users WHERE phone = %i", number); mysql_tquery(connectionID, queryBuffer, "OnPlayerSendTextMessage", "iis", playerid, number, msg); return 1; } CMD:texts(playerid, params[]) { if(!PlayerInfo[playerid][pPhone]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have a cellphone and therefore can't use this command."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM texts WHERE recipient_number = %i ORDER BY date DESC", PlayerInfo[playerid][pPhone]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_VIEW_TEXTS, playerid); return 1; } CMD:call(playerid, params[]) { new number; if(sscanf(params, "i", number)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /call [number]"); SendClientMessage(playerid, COLOR_GREY3, "Special numbers: 911 = Emergency hotline, 6397 = News, 6324 = Mechanic, 8294 = Taxi"); return 1; } if(!PlayerInfo[playerid][pPhone]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have a cellphone and therefore can't use this command."); } if(PlayerInfo[playerid][pTogglePhone]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use your mobile phone right now as you have it toggled."); } if(PlayerInfo[playerid][pCallLine] != INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You have a call in session. /(h)angup to end that call."); } if(number == 0 || number == PlayerInfo[playerid][pPhone]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid number."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are unable to use your cellphone at the moment."); } if(number == 911) { PlayerInfo[playerid][pCallLine] = playerid; PlayerInfo[playerid][pCallStage] = 911; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s dials a number on their keypad and begins a call.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_YELLOW, "Dispatch: 911, what is your emergency? Enter 'police' or 'medic'."); return 1; } else if(number == 6397) { PlayerInfo[playerid][pCallLine] = playerid; PlayerInfo[playerid][pCallStage] = 6397; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s dials a number on their keypad and begins a call.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_LIMITLESSBLUE, "News Team: This is SANews here. Leave a message and we'll get back to you! *BEEP*"); return 1; } else if(number == 6324) { PlayerInfo[playerid][pCallLine] = playerid; PlayerInfo[playerid][pCallStage] = 6324; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s dials a number on their keypad and begins a call.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_LIGHTORANGE, "Dispatch: This is the mechanic hotline. Please explain your situation to us."); return 1; } else if(number == 8294) { PlayerInfo[playerid][pCallLine] = playerid; PlayerInfo[playerid][pCallStage] = 8294; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s dials a number on their keypad and begins a call.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_YELLOW, "Dispatch: This is the cab company. Please state your location and destination."); return 1; } foreach(new i : Player) { if(PlayerInfo[i][pPhone] == number) { if(PlayerInfo[i][pJailType] > 0) { return SendClientMessage(playerid, COLOR_GREY, "That player is currently imprisoned and cannot use their phone."); } if(PlayerInfo[i][pCallLine] != INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "This player is currently in a call. Wait until they hang up."); } if(PlayerInfo[i][pTogglePhone]) { return SendClientMessage(playerid, COLOR_GREY, "That player has their mobile phone switched off."); } if(PlayerInfo[i][pLiveBroadcast] != INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "That player is currently in a live interview and can't talk on the phone."); } SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE); PlayerInfo[playerid][pCallLine] = i; PlayerInfo[playerid][pCallStage] = 0; PlayerInfo[i][pCallLine] = playerid; PlayerInfo[i][pCallStage] = 1; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s dials a number on their keypad and begins a call.", GetPlayerRPName(playerid)); SendProximityMessage(i, 20.0, COLOR_PURPLE, "** %s's mobile phone begins to ring.", GetPlayerRPName(i)); SendClientMessageEx(playerid, COLOR_YELLOW, "** You've placed a call to number: %i. Please wait for your call to be answered.", number); SendClientMessageEx(i, COLOR_YELLOW, "** Incoming call from %s [%i]. Use /pickup to take this call.", GetPlayerRPName(playerid), PlayerInfo[playerid][pPhone]); return 1; } } SendClientMessage(playerid, COLOR_GREY, "That number is either not in service or the owner is offline."); return 1; } CMD:p(playerid, params[]) { return cmd_pickup(playerid, params); } CMD:pickup(playerid, params[]) { if(PlayerInfo[playerid][pCallStage] != 1) { return SendClientMessage(playerid, COLOR_GREY, "You have no incoming calls which you can answer right now."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are unable to use your cellphone at the moment."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s presses a button and answers their mobile phone.", GetPlayerRPName(playerid)); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE); PlayerInfo[PlayerInfo[playerid][pCallLine]][pCallStage] = 2; PlayerInfo[playerid][pCallStage] = 2; SendClientMessage(playerid, COLOR_WHITE, "** You have answered the call. You can now speak in chat to talk to the caller."); SendClientMessage(PlayerInfo[playerid][pCallLine], COLOR_WHITE, "** They answered the call. You can now speak in chat to talk to them."); return 1; } CMD:h(playerid, params[]) { return cmd_hangup(playerid, params); } CMD:hangup(playerid, params[]) { if(PlayerInfo[playerid][pCallLine] == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You have no calls in session which you can hangup."); } HangupCall(playerid, HANGUP_USER); return 1; } CMD:tog(playerid, params[]) { return cmd_toggle(playerid, params); } CMD:toggle(playerid, params[]) { if(!strcmp(params, "textdraws", true)) { if(!PlayerInfo[playerid][pToggleTextdraws]) { PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][0]); PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][1]); PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][2]); PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][3]); PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][4]); PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][5]); TextDrawHideForPlayer(playerid, WebsiteTD); TextDrawHideForPlayer(playerid, TimeTD); PlayerInfo[playerid][pToggleTextdraws] = 1; SendClientMessage(playerid, COLOR_AQUA, "Textdraws toggled. You will no longer see any textdraws."); } else { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && VehicleHasEngine(GetPlayerVehicleID(playerid))) { PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][1]); PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][2]); } if(PlayerInfo[playerid][pGPSOn]) { PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][0]); } if(PlayerInfo[playerid][pWatchOn]) { TextDrawShowForPlayer(playerid, TimeTD); } if(!PlayerInfo[playerid][pToggleHUD]) { PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][3]); PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][4]); } TextDrawShowForPlayer(playerid, WebsiteTD); PlayerInfo[playerid][pToggleTextdraws] = 0; SendClientMessage(playerid, COLOR_AQUA, "Textdraws enabled. You will now see textdraws again."); } } else if(!strcmp(params, "ooc", true)) { if(!PlayerInfo[playerid][pToggleOOC]) { PlayerInfo[playerid][pToggleOOC] = 1; SendClientMessage(playerid, COLOR_AQUA, "OOC chat toggled. You will no longer see any messages in /o."); } else { PlayerInfo[playerid][pToggleOOC] = 0; SendClientMessage(playerid, COLOR_AQUA, "OOC chat enabled. You will now see messages in /o again."); } } else if(!strcmp(params, "global", true)) { if(!PlayerInfo[playerid][pToggleGlobal]) { PlayerInfo[playerid][pToggleGlobal] = 1; SendClientMessage(playerid, COLOR_AQUA, "Global chat toggled. You will no longer see any messages in /g."); } else { PlayerInfo[playerid][pToggleGlobal] = 0; SendClientMessage(playerid, COLOR_AQUA, "Global chat enabled. You can now speak to other players in /g."); } } else if(!strcmp(params, "phone", true)) { if(!PlayerInfo[playerid][pTogglePhone]) { if(PlayerInfo[playerid][pCallLine] != INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You can't do this while in a call."); } PlayerInfo[playerid][pTogglePhone] = 1; SendClientMessage(playerid, COLOR_AQUA, "Phone toggled. You will no longer receive calls or texts."); } else { PlayerInfo[playerid][pTogglePhone] = 0; SendClientMessage(playerid, COLOR_AQUA, "Phone enabled. You can now receive calls and texts again."); } } else if(!strcmp(params, "admin", true)) { if(!PlayerInfo[playerid][pAdmin]) { return SendClientMessage(playerid, COLOR_GREY, "You are not an admin and therefore cannot toggle this feature."); } if(!PlayerInfo[playerid][pToggleAdmin]) { PlayerInfo[playerid][pToggleAdmin] = 1; SendClientMessage(playerid, COLOR_AQUA, "Admin chat toggled. You will no longer see any messages in admin chat."); } else { PlayerInfo[playerid][pToggleAdmin] = 0; SendClientMessage(playerid, COLOR_AQUA, "Admin chat enabled. You will now see messages in admin chat again."); } } else if(!strcmp(params, "helper", true)) { if(!PlayerInfo[playerid][pHelper]) { return SendClientMessage(playerid, COLOR_GREY, "You are not a helper and therefore cannot toggle this feature."); } if(!PlayerInfo[playerid][pToggleHelper]) { PlayerInfo[playerid][pToggleHelper] = 1; SendClientMessage(playerid, COLOR_AQUA, "Helper chat toggled. You will no longer see any messages in helper chat."); } else { PlayerInfo[playerid][pToggleHelper] = 0; SendClientMessage(playerid, COLOR_AQUA, "Helper chat enabled. You will now see messages in helper chat again."); } } else if(!strcmp(params, "newbie", true)) { if(!PlayerInfo[playerid][pToggleNewbie]) { PlayerInfo[playerid][pToggleNewbie] = 1; SendClientMessage(playerid, COLOR_AQUA, "Newbie chat toggled. You will no longer see any messages in newbie chat."); } else { PlayerInfo[playerid][pToggleNewbie] = 0; SendClientMessage(playerid, COLOR_AQUA, "Newbie chat enabled. You will now see messages in newbie chat again."); } } else if(!strcmp(params, "walkietalkie", true)) { if(!PlayerInfo[playerid][pWalkieTalkie]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have a walkie talkie."); } if(!PlayerInfo[playerid][pToggleWT]) { PlayerInfo[playerid][pToggleWT] = 1; SendClientMessage(playerid, COLOR_AQUA, "Walkie talkie toggled. You will no longer receive any messages on your walkie talkie."); } else { PlayerInfo[playerid][pToggleWT] = 0; SendClientMessage(playerid, COLOR_AQUA, "Walkie talkie enabled. You will now receive messages on your walkie talkie again."); } } else if(!strcmp(params, "radio", true)) { if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a faction and therefore can't toggle your radio."); } if(!PlayerInfo[playerid][pToggleRadio]) { PlayerInfo[playerid][pToggleRadio] = 1; SendClientMessage(playerid, COLOR_AQUA, "Radio chat toggled. You will no longer receive any messages on your radio."); } else { PlayerInfo[playerid][pToggleRadio] = 0; SendClientMessage(playerid, COLOR_AQUA, "Radio chat enabled. You will now receive messages on your radio again."); } } else if(!strcmp(params, "streams", true)) { if(!PlayerInfo[playerid][pToggleMusic]) { PlayerInfo[playerid][pToggleMusic] = 1; StopAudioStreamForPlayer(playerid); SendClientMessage(playerid, COLOR_AQUA, "Music streams toggled. You will no longer hear any music played locally & globally."); } else { PlayerInfo[playerid][pToggleMusic] = 0; SendClientMessage(playerid, COLOR_AQUA, "Music streams enabled. You will now hear music played locally & globally again."); } } else if(!strcmp(params, "vip", true)) { if(!PlayerInfo[playerid][pVIPPackage]) { return SendClientMessage(playerid, COLOR_GREY, "You are not a VIP member and therefore cannot toggle this feature."); } if(!PlayerInfo[playerid][pToggleVIP]) { PlayerInfo[playerid][pToggleVIP] = 1; SendClientMessage(playerid, COLOR_AQUA, "VIP chat toggled. You will no longer see any messages in VIP chat."); } else { PlayerInfo[playerid][pToggleVIP] = 0; SendClientMessage(playerid, COLOR_AQUA, "VIP chat enabled. You will now see messages in VIP chat again."); } } else if(!strcmp(params, "faction", true)) { if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a faction and therefore can't toggle this chat."); } if(!PlayerInfo[playerid][pToggleFaction]) { PlayerInfo[playerid][pToggleFaction] = 1; SendClientMessage(playerid, COLOR_AQUA, "Faction chat toggled. You will no longer see any messages in faction chat."); } else { PlayerInfo[playerid][pToggleFaction] = 0; SendClientMessage(playerid, COLOR_AQUA, "Faction chat enabled. You will now see messages in faction chat again."); } } else if(!strcmp(params, "gang", true)) { if(PlayerInfo[playerid][pGang] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not a gang member and therefore can't toggle this chat."); } if(!PlayerInfo[playerid][pToggleGang]) { PlayerInfo[playerid][pToggleGang] = 1; SendClientMessage(playerid, COLOR_AQUA, "Gang chat toggled. You will no longer see any messages in gang chat."); } else { PlayerInfo[playerid][pToggleGang] = 0; SendClientMessage(playerid, COLOR_AQUA, "Gang chat enabled. You will now see messages in gang chat again."); } } else if(!strcmp(params, "news", true)) { if(!PlayerInfo[playerid][pToggleNews]) { PlayerInfo[playerid][pToggleNews] = 1; SendClientMessage(playerid, COLOR_AQUA, "News chat toggled. You will no longer see any news broadcasts."); } else { PlayerInfo[playerid][pToggleNews] = 0; SendClientMessage(playerid, COLOR_AQUA, "News chat enabled. You will now see news broadcasts again."); } } else if(!strcmp(params, "lands", true)) { cmd_lands(playerid, "\1"); } else if(!strcmp(params, "turfs", true)) { cmd_turfs(playerid, "\1"); } else if(!strcmp(params, "spawncam", true)) { if(!PlayerInfo[playerid][pToggleCam]) { PlayerInfo[playerid][pToggleCam] = 1; SendClientMessage(playerid, COLOR_AQUA, "Spawn camera toggled. You will no longer see the camera effects upon spawning."); } else { PlayerInfo[playerid][pToggleCam] = 0; SendClientMessage(playerid, COLOR_AQUA, "Spawn camera enabled. You will now see the camera effects when you spawn again."); } } else if(!strcmp(params, "hud", true)) { if(!PlayerInfo[playerid][pToggleHUD]) { PlayerInfo[playerid][pToggleHUD] = 1; SendClientMessage(playerid, COLOR_AQUA, "HUD toggled. You will no longer see your health & armor indicators."); PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][3]); PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][4]); PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][5]); } else { PlayerInfo[playerid][pToggleHUD] = 0; SendClientMessage(playerid, COLOR_AQUA, "HUD enabled. You will now see your health & armor indicators again."); PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][3]); PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][4]); } } else { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /(tog)gle [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Textdraws, OOC, Global, Phone, Newbie, WalkieTalkie, Radio, Streams, News, Lands, Turfs"); SendClientMessage(playerid, COLOR_GREY3, "List of options: SpawnCam, HUD, Admin, Helper, VIP, Faction, Gang"); } return 1; } CMD:locate(playerid, params[]) { if(!strcmp(params, "dmv", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 1219.2590, -1812.1093, 16.5938, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of DMV."); } else if(!strcmp(params, "dealership", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 542.0433, -1293.5909, 17.2422, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the dealership."); } else if(!strcmp(params, "bank", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 1465.1348, -1010.5063, 26.8438, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the bank."); } else if(!strcmp(params, "paintball", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 1738.7400, -1269.8062, 13.5433, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of paintball."); } else if(!strcmp(params, "casino", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 1022.5992, -1122.8069, 23.8710, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the casino."); } else if(!strcmp(params, "vip", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 1015.6364, -1550.5270, 14.8594, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the VIP lounge."); } else if(!strcmp(params, "smuggledrugs", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 52.0937, -292.2513, 1.7001, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the drug smuggling spot."); } else if(!strcmp(params, "matpickup1", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 1421.6913, -1318.4719, 13.5547, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the 1st materials pickup."); } else if(!strcmp(params, "matpickup2", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 2393.4885, -2008.5726, 13.3467, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the 2nd materials pickup."); } else if(!strcmp(params, "matfactory1", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 2173.2129, -2264.1548, 13.3467, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the 1st materials factory."); } else if(!strcmp(params, "matfactory2", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 2288.0918, -1105.6555, 37.9766, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the 2nd materials factory."); } else if(!strcmp(params, "heisenbergs", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, -65.0972, -1574.3820, 2.6107, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of Heisenberg's meth cooking trailer."); } else if(!strcmp(params, "pizzaman", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, jobLocations[JOB_PIZZAMAN][jobX], jobLocations[JOB_PIZZAMAN][jobY], jobLocations[JOB_PIZZAMAN][jobZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the Pizzaman job."); } else if(!strcmp(params, "courier", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, jobLocations[JOB_COURIER][jobX], jobLocations[JOB_COURIER][jobY], jobLocations[JOB_COURIER][jobZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the Courier job."); } else if(!strcmp(params, "fisherman", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, jobLocations[JOB_FISHERMAN][jobX], jobLocations[JOB_FISHERMAN][jobY], jobLocations[JOB_FISHERMAN][jobZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the Fisherman job."); } else if(!strcmp(params, "bodyguard", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, jobLocations[JOB_BODYGUARD][jobX], jobLocations[JOB_BODYGUARD][jobY], jobLocations[JOB_BODYGUARD][jobZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the Bodyguard job."); } else if(!strcmp(params, "weapondealer", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, jobLocations[JOB_WEAPONDEALER][jobX], jobLocations[JOB_WEAPONDEALER][jobY], jobLocations[JOB_WEAPONDEALER][jobZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the Weapons Dealer job."); } else if(!strcmp(params, "mechanic", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, jobLocations[JOB_MECHANIC][jobX], jobLocations[JOB_MECHANIC][jobY], jobLocations[JOB_MECHANIC][jobZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the Mechanic job."); } else if(!strcmp(params, "miner", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, jobLocations[JOB_MINER][jobX], jobLocations[JOB_MINER][jobY], jobLocations[JOB_MINER][jobZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the Miner job."); } else if(!strcmp(params, "sweeper", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, jobLocations[JOB_SWEEPER][jobX], jobLocations[JOB_SWEEPER][jobY], jobLocations[JOB_SWEEPER][jobZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the Sweeper job."); } else if(!strcmp(params, "taxidriver", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, jobLocations[JOB_TAXIDRIVER][jobX], jobLocations[JOB_TAXIDRIVER][jobY], jobLocations[JOB_TAXIDRIVER][jobZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the Taxi Driver job."); } else if(!strcmp(params, "drugdealer", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, jobLocations[JOB_DRUGDEALER][jobX], jobLocations[JOB_DRUGDEALER][jobY], jobLocations[JOB_DRUGDEALER][jobZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the Drug Dealer job."); } else if(!strcmp(params, "lawyer", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, jobLocations[JOB_LAWYER][jobX], jobLocations[JOB_LAWYER][jobY], jobLocations[JOB_LAWYER][jobZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the Lawyer job."); } else if(!strcmp(params, "detective", true)) { PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 1554.8918, -1675.6486, 16.1953, 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the Detective job."); } else if(!strcmp(params, "supermarket", true)) { new businessid = GetClosestBusiness(playerid, BUSINESS_STORE); if(businessid == -1) { return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found."); } PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the closest supermarket to you."); } else if(!strcmp(params, "gunshop", true)) { new businessid = GetClosestBusiness(playerid, BUSINESS_GUNSHOP); if(businessid == -1) { return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found."); } PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the closest gun shop to you."); } else if(!strcmp(params, "clothesshop", true)) { new businessid = GetClosestBusiness(playerid, BUSINESS_CLOTHES); if(businessid == -1) { return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found."); } PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the closest clothes shop to you."); } else if(!strcmp(params, "gym", true)) { new businessid = GetClosestBusiness(playerid, BUSINESS_GYM); if(businessid == -1) { return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found."); } PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the closest gym to you."); } else if(!strcmp(params, "restaurant", true)) { new businessid = GetClosestBusiness(playerid, BUSINESS_RESTAURANT); if(businessid == -1) { return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found."); } PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the closest restaurant to you."); } else if(!strcmp(params, "adagency", true)) { new businessid = GetClosestBusiness(playerid, BUSINESS_AGENCY); if(businessid == -1) { return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found."); } PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the closest advertisement agency to you."); } else if(!strcmp(params, "club", true)) { new businessid = GetClosestBusiness(playerid, BUSINESS_BARCLUB); if(businessid == -1) { return SendClientMessage(playerid, COLOR_GREY, "There are no businesses of this type to be found."); } PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, BusinessInfo[businessid][bPosX], BusinessInfo[businessid][bPosY], BusinessInfo[businessid][bPosZ], 3.0); SendClientMessage(playerid, COLOR_WHITE, "** Checkpoint marked at the location of the closest club/bar to you."); } else { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /locate [option]"); SendClientMessage(playerid, COLOR_GREY3, "Business Types: Supermarket, GunShop, ClothesShop, Gym, Restaurant, AdAgency, Club"); SendClientMessage(playerid, COLOR_GREY3, "General Locations: DMV, Dealership, Bank, Paintball, Casino, VIP, Smuggledrugs, MatPickup1, MatPickup2"); SendClientMessage(playerid, COLOR_GREY3, "General Locations: MatFactory1, MatFactory2, Heisenbergs"); SendClientMessage(playerid, COLOR_GREY3, "Scripted Jobs: Pizzaman, Courier, Fisherman, Bodyguard, WeaponDealer, Mechanic, Miner, Sweeper"); SendClientMessage(playerid, COLOR_GREY3, "Scripted Jobs: TaxiDriver, DrugDealer, Lawyer, Detective"); } return 1; } CMD:ccp(playerid, params[]) { return cmd_cancelcp(playerid, params); } CMD:kcp(playerid, params[]) { return cmd_cancelcp(playerid, params); } CMD:killcp(playerid, params[]) { return cmd_cancelcp(playerid, params); } CMD:killcheckpoint(playerid, params[]) { return cmd_cancelcp(playerid, params); } CMD:cancelcp(playerid, params[]) { CancelActiveCheckpoint(playerid); SendClientMessage(playerid, COLOR_WHITE, "You have cancelled all active checkpoints."); return 1; } CMD:afk(playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /afk [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pAFK]) { SendClientMessageEx(playerid, COLOR_WHITE, "** %s has been marked as Away from keyboard for %i minutes.", GetPlayerRPName(targetid), PlayerInfo[targetid][pAFKTime] / 60); } else { SendClientMessageEx(playerid, COLOR_WHITE, "** %s is currently not marked as Away from keyboard.", GetPlayerRPName(targetid)); } return 1; } CMD:afklist(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } SendClientMessage(playerid, COLOR_GREEN, "|______ Away from Keyboard ______|"); foreach(new i : Player) { if(PlayerInfo[i][pAFK]) { SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s - Time: %i seconds", i, GetPlayerRPName(i), PlayerInfo[i][pAFKTime]); } } return 1; } CMD:atm(playerid, params[]) { for(new i = 0; i < sizeof(atmMachines); i ++) { if(IsPlayerInRangeOfPoint(playerid, 3.0, atmMachines[i][atmX], atmMachines[i][atmY], atmMachines[i][atmZ])) { ShowDialogToPlayer(playerid, DIALOG_ATM); return 1; } } SendClientMessage(playerid, COLOR_GREY, "You are not in range of any ATM machines."); return 1; } CMD:fixplayerid(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", targetid)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /fixplayerid [playerid]"); SendClientMessage(playerid, COLOR_GREY3, "Sometimes player IDs can become bugged causing sscanf to not identify that ID until server restart."); SendClientMessage(playerid, COLOR_GREY3, "(e.g. a command used upon a valid player ID saying the player is disconnected, invalid or offline.)"); return 1; } if(!IsPlayerConnected(targetid)) { SSCANF_Leave(targetid); } else { SSCANF_Join(targetid, GetPlayerNameEx(targetid), IsPlayerNPC(targetid)); } SendClientMessageEx(playerid, COLOR_WHITE, "** Player ID %i has been fixed.", targetid); return 1; } CMD:anticheat(playerid, params[]) { new status; if(PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", status) || !(0 <= status <= 1)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /anticheat [0/1]"); } if(status) { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has enabled the server anticheat.", GetPlayerRPName(playerid)); } else { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has disabled the server anticheat.", GetPlayerRPName(playerid)); } gAnticheat = status; return 1; } CMD:animhelp(playerid, params[]) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Animation Commands] /dance, /wave, /point, /salute, /laugh, /cry, /deal, /sit, /lay, /fall, /handsup."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Animation Commands] /tired, /cower, /crack, /injured, /fishing, /reload, /aim, /bomb, /checktime."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Animation Commands] /dodge, /stop, /scratch, /what, /wash, /come, /hitch, /cpr, /slapass, /drunk."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Animation Commands] /vomit, /fucku, /taichi, /shifty, /smoke, /chat, /lean, /wank, /crossarms."); SendClientMessage(playerid, COLOR_LIGHTORANGE, "** [Animation Commands] /ghands, /rap, /dj, /walk, /fuckme, /bj, /kiss, /piss, /robman, /stopanim."); return 1; } CMD:dance(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1..4: SetPlayerSpecialAction(playerid, (SPECIAL_ACTION_DANCE1 + (strval(params) - 1))); case 5: ApplyAnimationEx(playerid, "DANCING", "DAN_Down_A", 4.1, 1, 0, 0, 0, 0); case 6: ApplyAnimationEx(playerid, "DANCING", "DAN_Left_A", 4.1, 1, 0, 0, 0, 0); case 7: ApplyAnimationEx(playerid, "DANCING", "DAN_Loop_A", 4.1, 1, 0, 0, 0, 0); case 8: ApplyAnimationEx(playerid, "DANCING", "DAN_Right_A", 4.1, 1, 0, 0, 0, 0); case 9: ApplyAnimationEx(playerid, "DANCING", "DAN_Up_A", 4.1, 1, 0, 0, 0, 0); case 10: ApplyAnimationEx(playerid, "DANCING", "dnce_M_a", 4.1, 1, 0, 0, 0, 0); case 11: ApplyAnimationEx(playerid, "DANCING", "dnce_M_b", 4.1, 1, 0, 0, 0, 0); case 12: ApplyAnimationEx(playerid, "DANCING", "dnce_M_c", 4.1, 1, 0, 0, 0, 0); case 13: ApplyAnimationEx(playerid, "DANCING", "dnce_M_d", 4.1, 1, 0, 0, 0, 0); case 14: ApplyAnimationEx(playerid, "DANCING", "dnce_M_e", 4.1, 1, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /dance [1-14]"); } return 1; } CMD:wave(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "ON_LOOKERS", "wave_loop", 4.1, 1, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "PED", "endchat_03", 4.1, 0, 0, 0, 0, 0); case 3: ApplyAnimationEx(playerid, "KISSING", "gfwave2", 4.1, 0, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /wave [1-3]"); } return 1; } CMD:point(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "ON_LOOKERS", "panic_point", 4.1, 0, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "ON_LOOKERS", "point_loop", 4.1, 1, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /point [1-2]"); } return 1; } CMD:salute(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "ON_LOOKERS", "Pointup_loop", 4.1, 1, 0, 0, 0, 0); return 1; } CMD:laugh(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "RAPPING", "Laugh_01", 4.1, 1, 0, 0, 0, 0); return 1; } CMD:cry(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "GRAVEYARD", "mrnF_loop", 4.1, 1, 0, 0, 0, 0); return 1; } CMD:deal(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "DEALER", "shop_pay", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:sit(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "BEACH", "ParkSit_W_loop", 4.1, 1, 0, 0, 0, 0); case 3: ApplyAnimationEx(playerid, "MISC", "SEAT_LR", 4.1, 0, 0, 0, 1, 0); case 4: ApplyAnimationEx(playerid, "MISC", "Seat_talk_01", 4.1, 1, 0, 0, 0, 0); case 5: ApplyAnimationEx(playerid, "PED", "SEAT_down", 4.1, 0, 0, 0, 1, 0); case 6: ApplyAnimationEx(playerid, "INT_OFFICE", "OFF_Sit_Bored_Loop", 4.1, 1, 0, 0, 0, 0); case 7: ApplyAnimationEx(playerid, "INT_OFFICE", "OFF_Sit_Read", 4.1, 1, 0, 0, 0, 0); case 8: ApplyAnimationEx(playerid, "INT_OFFICE", "OFF_Sit_Crash", 4.1, 1, 0, 0, 0, 0); case 9: ApplyAnimationEx(playerid, "FOOD", "FF_Sit_Eat1", 4.1, 1, 0, 0, 0, 0); case 10: ApplyAnimationEx(playerid, "CRIB", "PED_Console_Loop", 4.1, 0, 0, 0, 1, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sit [1-10]"); } return 1; } CMD:lay(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "BEACH", "bather", 4.1, 1, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "BEACH", "Lay_Bac_Loop", 4.1, 1, 0, 0, 0, 0); case 3: ApplyAnimationEx(playerid, "BEACH", "SitnWait_loop_W", 4.1, 1, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /lay [1-3]"); } return 1; } CMD:fall(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "PED", "KO_skid_front", 4.1, 0, 0, 0, 1, 0); case 2: ApplyAnimationEx(playerid, "PED", "KO_skid_back", 4.1, 0, 0, 0, 1, 0); case 3: ApplyAnimationEx(playerid, "PED", "KO_shot_face", 4.1, 0, 1, 1, 1, 0); case 4: ApplyAnimationEx(playerid, "PED", "KO_shot_front", 4.1, 0, 1, 1, 1, 0); case 5: ApplyAnimationEx(playerid, "PED", "KO_shot_stom", 4.1, 0, 1, 1, 1, 0); case 6: ApplyAnimationEx(playerid, "PED", "BIKE_fallR", 4.1, 0, 1, 1, 1, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /fall [1-6]"); } return 1; } CMD:handsup(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "SHOP", "SHP_HandsUp_Scr", 4.1, 0, 0, 0, 1, 0); return 1; } CMD:tired(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "PED", "IDLE_tired", 4.1, 1, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "FAT", "IDLE_tired", 4.1, 1, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /tired [1-2]"); } return 1; } CMD:hide(playerid, params[]) { return cmd_cower(playerid, params); } CMD:cover(playerid, params[]) { return cmd_cower(playerid, params); } CMD:cower(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "PED", "cower", 4.1, 1, 0, 0, 0, 0); return 1; } CMD:crack(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "CRACK", "crckdeth1", 4.1, 0, 0, 0, 1, 0); case 2: ApplyAnimationEx(playerid, "CRACK", "crckdeth2", 4.1, 1, 0, 0, 0, 0); case 3: ApplyAnimationEx(playerid, "CRACK", "crckdeth3", 4.1, 0, 0, 0, 1, 0); case 4: ApplyAnimationEx(playerid, "CRACK", "crckdeth4", 4.1, 0, 0, 0, 1, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /crack [1-4]"); } return 1; } CMD:injured(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "SWAT", "gnstwall_injurd", 4.1, 1, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "SWEET", "Sweet_injuredloop", 4.1, 1, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /injured [1-2]"); } return 1; } CMD:fishing(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "SAMP", "FishingIdle", 4.1, 0, 0, 0, 1, 0); return 1; } CMD:reload(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "BUDDY", "buddy_reload", 4.1, 0, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "PYTHON", "python_reload", 4.1, 0, 0, 0, 0, 0); case 3: ApplyAnimationEx(playerid, "UZI", "UZI_reload", 4.1, 0, 0, 0, 0, 0); case 4: ApplyAnimationEx(playerid, "RIFLE", "RIFLE_load", 4.1, 0, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /reload [1-4]"); } return 1; } CMD:aim(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "SHOP", "ROB_loop", 4.1, 1, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "PED", "ARRESTgun", 4.1, 0, 0, 0, 1, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /aim [1-2]"); } return 1; } CMD:bomb(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:checktime(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "COP_AMBIENT", "Coplook_watch", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:dodge(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "DODGE", "Crush_Jump", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:stop(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "PED", "endchat_01", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:scratch(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "MISC", "Scratchballs_01", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:what(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "RIOT", "RIOT_ANGRY", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:wash(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "BD_FIRE", "wash_up", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:come(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "WUZI", "Wuzi_follow", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:hitch(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "MISC", "Hiker_Pose", 4.1, 0, 0, 0, 1, 0); return 1; } CMD:cpr(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "MEDIC", "CPR", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:slapass(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "SWEET", "sweet_ass_slap", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:drunk(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "PED", "WALK_DRUNK", 4.1, 1, 1, 1, 1, 1); return 1; } CMD:vomit(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "FOOD", "EAT_Vomit_P", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:fucku(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "PED", "fucku", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:taichi(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "PARK", "Tai_Chi_Loop", 4.1, 1, 0, 0, 0, 0); return 1; } CMD:shifty(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "SHOP", "ROB_Shifty", 4.1, 0, 0, 0, 0, 0); return 1; } CMD:smoke(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "SMOKING", "M_smklean_loop", 4.1, 1, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "SMOKING", "M_smk_in", 4.1, 0, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /smoke [1-2]"); } return 1; } CMD:chat(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "PED", "IDLE_CHAT", 4.1, 1, 1, 1, 1, 1); case 2: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkA", 4.1, 1, 1, 1, 1, 1); case 3: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkB", 4.1, 1, 1, 1, 1, 1); case 4: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkC", 4.1, 1, 1, 1, 1, 1); case 5: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkD", 4.1, 1, 1, 1, 1, 1); case 6: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkE", 4.1, 1, 1, 1, 1, 1); case 7: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkF", 4.1, 1, 1, 1, 1, 1); case 8: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkG", 4.1, 1, 1, 1, 1, 1); case 9: ApplyAnimationEx(playerid, "GANGS", "prtial_gngtlkH", 4.1, 1, 1, 1, 1, 1); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /chat [1-9]"); } return 1; } CMD:lean(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "GANGS", "leanIDLE", 4.1, 1, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "MISC", "Plyrlean_loop", 4.1, 1, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /lean [1-2]"); } return 1; } CMD:wank(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "PAULNMAC", "wank_loop", 4.1, 1, 0, 0, 0, 0); return 1; } CMD:traffic(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "POLICE", "CopTraf_Stop", 4.1, 0, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "POLICE", "CopTraf_Come", 4.1, 0, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /traffic [1-2]"); } return 1; } CMD:rap(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "RAPPING", "RAP_A_LOOP", 4.1, 1, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "RAPPING", "RAP_B_LOOP", 4.1, 1, 0, 0, 0, 0); case 3: ApplyAnimationEx(playerid, "RAPPING", "RAP_C_LOOP", 4.1, 1, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /rap [1-3]"); } return 1; } CMD:dj(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "SCRATCHING", "scdldlp", 4.1, 1, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "SCRATCHING", "scdlulp", 4.1, 1, 0, 0, 0, 0); case 3: ApplyAnimationEx(playerid, "SCRATCHING", "scdrdlp", 4.1, 1, 0, 0, 0, 0); case 4: ApplyAnimationEx(playerid, "SCRATCHING", "scdrulp", 4.1, 1, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /dj [1-4]"); } return 1; } CMD:crossarms(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "COP_AMBIENT", "Coplook_loop", 4.1, 1, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "DEALER", "DEALER_IDLE", 4.1, 1, 0, 0, 0, 0); case 3: ApplyAnimationEx(playerid, "GRAVEYARD", "mrnM_loop", 4.1, 1, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /crossarms [1-3]"); } return 1; } CMD:ghands(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "GHANDS", "gsign1", 4.1, 0, 0, 0, 0, 0); case 2: ApplyAnimationEx(playerid, "GHANDS", "gsign1LH", 4.1, 0, 0, 0, 0, 0); case 3: ApplyAnimationEx(playerid, "GHANDS", "gsign2", 4.1, 0, 0, 0, 0, 0); case 4: ApplyAnimationEx(playerid, "GHANDS", "gsign2LH", 4.1, 0, 0, 0, 0, 0); case 5: ApplyAnimationEx(playerid, "GHANDS", "gsign3", 4.1, 0, 0, 0, 0, 0); case 6: ApplyAnimationEx(playerid, "GHANDS", "gsign3LH", 4.1, 0, 0, 0, 0, 0); case 7: ApplyAnimationEx(playerid, "GHANDS", "gsign4", 4.1, 0, 0, 0, 0, 0); case 8: ApplyAnimationEx(playerid, "GHANDS", "gsign4LH", 4.1, 0, 0, 0, 0, 0); case 9: ApplyAnimationEx(playerid, "GHANDS", "gsign5", 4.1, 0, 0, 0, 0, 0); case 10: ApplyAnimationEx(playerid, "GHANDS", "gsign5LH", 4.1, 0, 0, 0, 0, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /ghands [1-10]"); } return 1; } CMD:walk(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "PED", "WALK_gang1", 4.1, 1, 1, 1, 1, 1); case 2: ApplyAnimationEx(playerid, "PED", "WALK_gang2", 4.1, 1, 1, 1, 1, 1); case 3: ApplyAnimationEx(playerid, "PED", "WALK_civi", 4.1, 1, 1, 1, 1, 1); case 4: ApplyAnimationEx(playerid, "PED", "WALK_armed", 4.1, 1, 1, 1, 1, 1); case 5: ApplyAnimationEx(playerid, "PED", "WALK_fat", 4.1, 1, 1, 1, 1, 1); case 6: ApplyAnimationEx(playerid, "PED", "WALK_fatold", 4.1, 1, 1, 1, 1, 1); case 7: ApplyAnimationEx(playerid, "PED", "WALK_old", 4.1, 1, 1, 1, 1, 1); case 8: ApplyAnimationEx(playerid, "PED", "WALK_player", 4.1, 1, 1, 1, 1, 1); case 9: ApplyAnimationEx(playerid, "PED", "WALK_shuffle", 4.1, 1, 1, 1, 1, 1); case 10: ApplyAnimationEx(playerid, "PED", "WALK_Wuzi", 4.1, 1, 1, 1, 1, 1); case 11: ApplyAnimationEx(playerid, "PED", "WOMAN_walkbusy", 4.1, 1, 1, 1, 1, 1); case 12: ApplyAnimationEx(playerid, "PED", "WOMAN_walkfatold", 4.1, 1, 1, 1, 1, 1); case 13: ApplyAnimationEx(playerid, "PED", "WOMAN_walknorm", 4.1, 1, 1, 1, 1, 1); case 14: ApplyAnimationEx(playerid, "PED", "WOMAN_walksexy", 4.1, 1, 1, 1, 1, 1); case 15: ApplyAnimationEx(playerid, "PED", "WOMAN_walkpro", 4.1, 1, 1, 1, 1, 1); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /walk [1-15]"); } return 1; } CMD:fuckme(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "SNM", "SPANKING_IDLEW", 4.1, 0, 1, 1, 1, 0); case 2: ApplyAnimationEx(playerid, "SNM", "SPANKING_IDLEP", 4.1, 0, 1, 1, 1, 0); case 3: ApplyAnimationEx(playerid, "SNM", "SPANKINGW", 4.1, 0, 1, 1, 1, 0); case 4: ApplyAnimationEx(playerid, "SNM", "SPANKINGP", 4.1, 0, 1, 1, 1, 0); case 5: ApplyAnimationEx(playerid, "SNM", "SPANKEDW", 4.1, 0, 1, 1, 1, 0); case 6: ApplyAnimationEx(playerid, "SNM", "SPANKEDP", 4.1, 0, 1, 1, 1, 0); case 7: ApplyAnimationEx(playerid, "SNM", "SPANKING_ENDW", 4.1, 0, 1, 1, 1, 0); case 8: ApplyAnimationEx(playerid, "SNM", "SPANKING_ENDP", 4.1, 0, 1, 1, 1, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /fuckme [1-8]"); } return 1; } CMD:bj(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } switch(strval(params)) { case 1: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_COUCH_START_P", 4.1, 0, 1, 1, 1, 0); case 2: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_COUCH_START_W", 4.1, 0, 1, 1, 1, 0); case 3: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_COUCH_LOOP_P", 4.1, 0, 1, 1, 1, 0); case 4: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_COUCH_LOOP_W", 4.1, 0, 1, 1, 1, 0); case 5: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_COUCH_END_P", 4.1, 0, 1, 1, 1, 0); case 6: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_COUCH_END_W", 4.1, 0, 1, 1, 1, 0); case 7: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_STAND_START_P", 4.1, 0, 1, 1, 1, 0); case 8: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_STAND_START_W", 4.1, 0, 1, 1, 1, 0); case 9: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_STAND_LOOP_P", 4.1, 1, 0, 0, 0, 0); case 10: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_STAND_LOOP_W", 4.1, 1, 0, 0, 0, 0); case 11: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_STAND_END_P", 4.1, 0, 1, 1, 1, 0); case 12: ApplyAnimationEx(playerid, "BLOWJOBZ", "BJ_STAND_END_W", 4.1, 0, 1, 1, 1, 0); default: SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /bj [1-12]"); } return 1; } CMD:kiss(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "KISSING", "Playa_Kiss_01", 4.0, 0, 0, 0, 0, 0); return 1; } CMD:piss(playerid, params[]) { if(!PlayerUseAnims(playerid) || GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } SetPlayerSpecialAction(playerid, 68); return 1; } CMD:robman(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use animations at this moment."); } ApplyAnimationEx(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0); return 1; } CMD:stopani(playerid, params[]) { return cmd_stopanim(playerid, params); } CMD:stopanim(playerid, params[]) { if(!PlayerUseAnims(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You're currently unable to use this command at this moment."); } PlayerInfo[playerid][pLoopAnim] = 0; ClearAnimations(playerid, 1); TextDrawHideForPlayer(playerid, AnimationTD); ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1); SendClientMessage(playerid, COLOR_GREY, "Animations cleared."); return 1; } CMD:gmx(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(strcmp(params, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gmx [confirm]"); SendClientMessage(playerid, COLOR_GREY3, "This command save all player accounts and restarts the server."); return 1; } if(gGMX) { return SendClientMessage(playerid, COLOR_GREY, "You have already called for a server restart. You can't cancel it."); } gGMX = 1; foreach(new i : Player) { if(i != playerid) { TogglePlayerControllable(i, 0); SendClientMessageEx(i, COLOR_AQUA, "** %s has initated a server restart. You have been frozen.", GetPlayerRPName(playerid)); } SavePlayerVariables(i); GameTextForPlayer(i, "~w~Restarting server...", 100000, 3); } SendClientMessage(playerid, COLOR_WHITE, "** The server will restart once all accounts have been saved."); return 1; } CMD:changepass(playerid, params[]) { ShowPlayerDialog(playerid, DIALOG_CHANGEPASS, DIALOG_STYLE_INPUT, "Change password", "Enter your new password:", "Submit", "Cancel"); return 1; } CMD:usecookies(playerid, params[]) { if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0 || PlayerInfo[playerid][pJoinedEvent] > 0 || PlayerInfo[playerid][pPaintball]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command from within the vehicle."); } new string[1536] = "Perk\tDescription\tCost", title[64]; strcat(string, "\nShoutout\tBroadcast your message of choice globally.\t{F7A763}1 cookie{FFFFFF}"); strcat(string, "\nArmor\tReplenishes you with full armor.\t{F7A763}1 cookie{FFFFFF}"); strcat(string, "\nRespect\tGives you 4 respect points.\t{F7A763}2 cookies{FFFFFF}"); strcat(string, "\nWeather\tOne time use: change weather globally.\t{F7A763}3 cookies{FFFFFF}"); strcat(string, "\nMaterials\tGives you 5000 materials.\t{F7A763}4 cookies{FFFFFF}"); strcat(string, "\nWeapons\tGives you a full weapon set.\t{F7A763}5 cookies{FFFFFF}"); strcat(string, "\nNumber\tChoose a phone number of your choice.\t{F7A763}5 cookies{FFFFFF}"); strcat(string, "\nJob\tChoose a job to 1x level up.\t{F7A763}5 cookies{FFFFFF}"); strcat(string, "\nDouble XP\tAwards you with 8 hours of double XP.\t{F7A763}10 cookies{FFFFFF}"); strcat(string, "\nVehicle\tFree vehicle ticket under $100k value.\t{F7A763}15 cookies{FFFFFF}"); strcat(string, "\nHouse\tFree house ticket under $100k value.\t{F7A763}30 cookies{FFFFFF}"); strcat(string, "\nBusiness\tFree business ticket of any type.\t{F7A763}40 cookies{FFFFFF}"); strcat(string, "\nVIP\t1 month Limited VIP subscription\t{F7A763}50 cookies{FFFFFF}"); format(title, sizeof(title), "Cookie rewards (You have %i cookies.)", PlayerInfo[playerid][pCookies]); ShowPlayerDialog(playerid, DIALOG_USECOOKIES, DIALOG_STYLE_TABLIST_HEADERS, title, string, "Redeem", "Cancel"); return 1; } CMD:clothing(playerid, params[]) { new string[MAX_PLAYER_CLOTHING * 64]; for(new i = 0; i < MAX_PLAYER_CLOTHING; i ++) { if(ClothingInfo[playerid][i][cExists]) { if(ClothingInfo[playerid][i][cAttached]) { format(string, sizeof(string), "%s\n{C8C8C8}%i) {00AA00}%s {FFD700}(Attached)", string, i + 1, ClothingInfo[playerid][i][cName]); } else { format(string, sizeof(string), "%s\n{C8C8C8}%i) {00AA00}%s{FFFFFF}", string, i + 1, ClothingInfo[playerid][i][cName]); } } else { format(string, sizeof(string), "%s\n{C8C8C8}%i) {AFAFAF}Empty Slot{FFFFFF}", string, i + 1); } } ShowPlayerDialog(playerid, DIALOG_CLOTHING, DIALOG_STYLE_LIST, "My clothing items", string, "Select", "Cancel"); return 1; } CMD:taketest(playerid, params[]) { if(!IsPlayerInRangeOfPoint(playerid, 3.0, -2033.2953, -117.4508, 1035.1719)) { return SendClientMessage(playerid, COLOR_GREY, "You are not at the desk in the Licensing department."); } if(PlayerInfo[playerid][pCarLicense]) { return SendClientMessage(playerid, COLOR_GREY, "You have your drivers license already."); } if(PlayerInfo[playerid][pDrivingTest]) { return SendClientMessage(playerid, COLOR_GREY, "You are already taking your drivers test."); } if(PlayerInfo[playerid][pCash] < 400) { return SendClientMessage(playerid, COLOR_GREY, "You need $400 to pay the licensing fee if you pass the test."); } SendClientMessage(playerid, COLOR_WHITE, "** You've taken on the drivers test. Go outside and enter one of the vehicles to begin."); SendClientMessage(playerid, COLOR_WHITE, "** Once you have passed the test, you will receive your license and pay a $500 licensing fee."); PlayerInfo[playerid][pTestVehicle] = INVALID_VEHICLE_ID; PlayerInfo[playerid][pDrivingTest] = 1; PlayerInfo[playerid][pTestCP] = 0; return 1; } CMD:buyvehicle(playerid, params[]) { static string[4096]; if(!IsPlayerInRangeOfPoint(playerid, 3.0, 542.0433, -1293.5909, 17.2422)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the Grotti car dealership."); } if(GetSpawnedVehicles(playerid) >= MAX_SPAWNED_VEHICLES) { return SendClientMessageEx(playerid, COLOR_GREY, "You can't have more than %i vehicles spawned at a time.", MAX_SPAWNED_VEHICLES); } if(isnull(string)) { string = "Category\tVehicle\tPrice"; for(new i = 0; i < sizeof(vehicleArray); i ++) { format(string, sizeof(string), "%s\n%s\t%s\t{00AA00}$%i{FFFFFF}", string, vehicleArray[i][carCategory], vehicleNames[vehicleArray[i][carModel] - 400], vehicleArray[i][carPrice]); } } PlayerInfo[playerid][pGangCar] = 0; ShowPlayerDialog(playerid, DIALOG_BUYVEHICLE, DIALOG_STYLE_TABLIST_HEADERS, "Grotti Dealership", string, "Buy", "Cancel"); return 1; } CMD:spawncar(playerid, params[]) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT modelid, pos_x, pos_y, pos_z, world FROM vehicles WHERE ownerid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LIST_VEHICLES, playerid); return 1; } CMD:park(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid), id = VehicleInfo[vehicleid][vID]; if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle of yours."); } if(!IsVehicleOwner(playerid, vehicleid) && PlayerInfo[playerid][pVehicleKeys] != vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You can't park this vehicle as it doesn't belong to you."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s parks their %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have parked your {00AA00}%s{33CCFF} which will spawn in this spot from now on.", GetVehicleName(vehicleid)); // Save the vehicle's information. GetVehiclePos(vehicleid, VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ]); GetVehicleZAngle(vehicleid, VehicleInfo[vehicleid][vPosA]); VehicleInfo[vehicleid][vInterior] = GetPlayerInterior(playerid); VehicleInfo[vehicleid][vWorld] = GetPlayerVirtualWorld(playerid); // Update the database record with the new information, then despawn the vehicle. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', interior = %i, world = %i WHERE id = %i", VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ], VehicleInfo[vehicleid][vPosA], VehicleInfo[vehicleid][vInterior], VehicleInfo[vehicleid][vWorld], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); DespawnVehicle(vehicleid); // Finally, we reload the vehicle from the database. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE id = %i", id); mysql_tquery(connectionID, queryBuffer, "OnPlayerSpawnVehicle", "ii", playerid, true); return 1; } CMD:givekeys(playerid, params[]) { new targetid, vehicleid = GetPlayerVehicleID(playerid); if(!vehicleid || !IsVehicleOwner(playerid, vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /givekeys [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't give keys to yourself."); } if(PlayerInfo[targetid][pVehicleKeys] == vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "That player already has keys to your vehicle."); } PlayerInfo[targetid][pVehicleKeys] = vehicleid; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s gives %s the keys to their %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), GetVehicleName(vehicleid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you the keys to their {00AA00}%s{33CCFF}.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %s the keys to your {00AA00}%s{33CCFF}.", GetPlayerRPName(targetid), GetVehicleName(vehicleid)); return 1; } CMD:takekeys(playerid, params[]) { new targetid, vehicleid = GetPlayerVehicleID(playerid); if(!vehicleid || !IsVehicleOwner(playerid, vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /takekeys [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't take keys from yourself."); } if(PlayerInfo[targetid][pVehicleKeys] != vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have the keys to your vehicle."); } PlayerInfo[targetid][pVehicleKeys] = INVALID_VEHICLE_ID; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes back the keys to their %s from %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), GetVehicleName(vehicleid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken back the keys to their {00AA00}%s{33CCFF}.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have taken back the keys to your {00AA00}%s{33CCFF} from %s.", GetPlayerRPName(targetid), GetVehicleName(vehicleid)); return 1; } CMD:despawncar(playerid, params[]) { new string[MAX_SPAWNED_VEHICLES * 64], count; string = "#\tModel\tLocation"; for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && VehicleInfo[i][vID] > 0 && IsVehicleOwner(playerid, i)) { format(string, sizeof(string), "%s\n%i\t%s\t%s", string, count + 1, GetVehicleName(i), GetVehicleZoneName(i)); count++; } } if(!count) { SendClientMessage(playerid, COLOR_GREY, "You have no vehicles spawned at the moment."); } else { ShowPlayerDialog(playerid, DIALOG_DESPAWNCAR, DIALOG_STYLE_TABLIST_HEADERS, "Choose a vehicle to despawn.", string, "Select", "Cancel"); } return 1; } CMD:findcar(playerid, params[]) { new string[MAX_SPAWNED_VEHICLES * 64], count; string = "#\tModel\tLocation"; for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && VehicleInfo[i][vID] > 0 && IsVehicleOwner(playerid, i)) { format(string, sizeof(string), "%s\n%i\t%s\t%s", string, count + 1, GetVehicleName(i), GetVehicleZoneName(i)); count++; } } if(!count) { SendClientMessage(playerid, COLOR_GREY, "You have no vehicles spawned at the moment."); } else { ShowPlayerDialog(playerid, DIALOG_FINDCAR, DIALOG_STYLE_TABLIST_HEADERS, "Choose a vehicle to track.", string, "Select", "Cancel"); } return 1; } CMD:upgradevehicle(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid), option[8], param[32]; if(!vehicleid || !IsVehicleOwner(playerid, vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours."); } if(!IsPlayerInRangeOfPoint(playerid, 8.0, 542.0433, -1293.5909, 17.2422)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the Grotti car dealership."); } if(sscanf(params, "s[8]S()[32]", option, param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /upgradevehicle [stash | neon | plate]"); } if(!strcmp(option, "stash", true)) { if(isnull(param) || strcmp(param, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /upgradevehicle [stash] [confirm]"); SendClientMessageEx(playerid, COLOR_GREY3, "Your vehicle's stash level is at %i/3. Upgrading your stash will cost you $10,000.", VehicleInfo[vehicleid][vTrunk]); return 1; } if(VehicleInfo[vehicleid][vTrunk] >= 3) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle's stash is already at its maximum level."); } if(PlayerInfo[playerid][pCash] < 10000) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to upgrade your trunk."); } VehicleInfo[vehicleid][vTrunk]++; GivePlayerCash(playerid, -10000); GameTextForPlayer(playerid, "~r~-$10000", 5000, 1); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET trunk = %i WHERE id = %i", VehicleInfo[vehicleid][vTrunk], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_GREEN, "You have paid $10000 for stash level %i/3. '/vstash balance' to see your new capacities.", VehicleInfo[vehicleid][vTrunk]); Log_Write("log_property", "%s (uid: %i) upgraded the stash of their %s (id: %i) to level %i/3.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID], VehicleInfo[vehicleid][vTrunk]); } else if(!strcmp(option, "neon", true)) { if(isnull(param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /upgradevehicle [neon] [color] (costs $30,000)"); SendClientMessage(playerid, COLOR_GREY3, "List of colors: Red, Blue, Green, Yellow, Pink, White"); return 1; } if(PlayerInfo[playerid][pCash] < 30000) { return SendClientMessage(playerid, COLOR_GREY, "You need at least $30,000 to upgrade your neon."); } if(!VehicleHasWindows(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't support neon."); } if(!strcmp(param, "red", true)) { SetVehicleNeon(vehicleid, 18647); GivePlayerCash(playerid, -30000); GameTextForPlayer(playerid, "~r~-$30000", 5000, 1); SendClientMessage(playerid, COLOR_GREEN, "You have paid $30000 for red neon. You can use /neon to toggle your neon."); Log_Write("log_property", "%s (uid: %i) purchased red neon for their %s (id: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]); } else if(!strcmp(param, "blue", true)) { SetVehicleNeon(vehicleid, 18648); GivePlayerCash(playerid, -30000); GameTextForPlayer(playerid, "~r~-$30000", 5000, 1); SendClientMessage(playerid, COLOR_GREEN, "You have paid $30000 for blue neon. You can use /neon to toggle your neon."); Log_Write("log_property", "%s (uid: %i) purchased blue neon for their %s (id: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]); } else if(!strcmp(param, "green", true)) { SetVehicleNeon(vehicleid, 18649); GivePlayerCash(playerid, -30000); GameTextForPlayer(playerid, "~r~-$30000", 5000, 1); SendClientMessage(playerid, COLOR_GREEN, "You have paid $30000 for green neon. You can use /neon to toggle your neon."); Log_Write("log_property", "%s (uid: %i) purchased green neon for their %s (id: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]); } else if(!strcmp(param, "yellow", true)) { SetVehicleNeon(vehicleid, 18650); GivePlayerCash(playerid, -30000); GameTextForPlayer(playerid, "~r~-$30000", 5000, 1); SendClientMessage(playerid, COLOR_GREEN, "You have paid $30000 for yellow neon. You can use /neon to toggle your neon."); Log_Write("log_property", "%s (uid: %i) purchased yellow neon for their %s (id: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]); } else if(!strcmp(param, "pink", true)) { SetVehicleNeon(vehicleid, 18651); GivePlayerCash(playerid, -30000); GameTextForPlayer(playerid, "~r~-$30000", 5000, 1); SendClientMessage(playerid, COLOR_GREEN, "You have paid $30000 for pink neon. You can use /neon to toggle your neon."); Log_Write("log_property", "%s (uid: %i) purchased pink neon for their %s (id: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]); } else if(!strcmp(param, "white", true)) { SetVehicleNeon(vehicleid, 18652); GivePlayerCash(playerid, -30000); GameTextForPlayer(playerid, "~r~-$30000", 5000, 1); SendClientMessage(playerid, COLOR_GREEN, "You have paid $30000 for white neon. You can use /neon to toggle your neon."); Log_Write("log_property", "%s (uid: %i) purchased white neon for their %s (id: %i)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]); } } else if(!strcmp(option, "plate", true)) { if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /upgradevehicle [plate] [text] (costs $20,000)"); } if(!VehicleHasEngine(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no license plate. Therefore you can't buy this upgrade."); } strcpy(VehicleInfo[vehicleid][vPlate], param, 32); SetVehicleNumberPlate(vehicleid, param); ResyncVehicle(vehicleid); GivePlayerCash(playerid, -20000); GameTextForPlayer(playerid, "~r~-$20000", 5000, 1); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET plate = '%e' WHERE id = %i", param, VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_GREEN, "You have paid $20000 for license plate '%s'. Changes will take effect once vehicle is parked.", param); Log_Write("log_property", "%s (uid: %i) paid $20000 to set the license plate of their %s (id: %i) to %s.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID], param); } return 1; } CMD:neon(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle of yours."); } if(!IsVehicleOwner(playerid, vehicleid) && PlayerInfo[playerid][pVehicleKeys] != vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as this vehicle doesn't belong to you."); } if(!VehicleInfo[vehicleid][vNeon]) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no neon installed."); } if(!VehicleInfo[vehicleid][vNeonEnabled]) { VehicleInfo[vehicleid][vNeonEnabled] = 1; GameTextForPlayer(playerid, "~g~Neon activated", 3000, 3); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s presses a button to activate their neon tubes.", GetPlayerRPName(playerid)); //SendClientMessage(playerid, COLOR_AQUA, "** Neon enabled. The tubes appear under your vehicle."); } else { VehicleInfo[vehicleid][vNeonEnabled] = 0; GameTextForPlayer(playerid, "~r~Neon deactivated", 3000, 3); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s presses a button to deactivate their neon tubes.", GetPlayerRPName(playerid)); //SendClientMessage(playerid, COLOR_AQUA, "** Neon disabled."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET neonenabled = %i WHERE id = %i", VehicleInfo[vehicleid][vNeonEnabled], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); ReloadVehicleNeon(vehicleid); return 1; } CMD:vstash(playerid, params[]) { new vehicleid = GetNearbyVehicle(playerid); if(vehicleid != INVALID_VEHICLE_ID && IsVehicleOwner(playerid, vehicleid)) { new option[14], param[32]; if(!VehicleInfo[vehicleid][vTrunk]) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no trunk installed. /upgradevehicle to purchase one."); } if(IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command from within the vehicle."); } if(sscanf(params, "s[14]S()[32]", option, param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [balance | deposit | withdraw]"); } if(!strcmp(option, "balance", true)) { new count; for(new i = 0; i < 3; i ++) { if(VehicleInfo[vehicleid][vWeapons][i]) { count++; } } SendClientMessage(playerid, COLOR_GREEN, "|_____ Stash Balance _____|"); SendClientMessageEx(playerid, COLOR_GREY2, "Cash: $%i/$%i", VehicleInfo[vehicleid][vCash], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_CASH)); SendClientMessageEx(playerid, COLOR_GREY2, "Materials: %i/%i | Weapons: %i/%i", VehicleInfo[vehicleid][vMaterials], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_MATERIALS), count, GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEAPONS)); SendClientMessageEx(playerid, COLOR_GREY2, "Weed: %i/%i grams | Cocaine: %i/%i grams", VehicleInfo[vehicleid][vWeed], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEED), VehicleInfo[vehicleid][vCocaine], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_COCAINE)); SendClientMessageEx(playerid, COLOR_GREY2, "Meth: %i/%i grams | Painkillers: %i/%i pills", VehicleInfo[vehicleid][vMeth], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_METH), VehicleInfo[vehicleid][vPainkillers], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_PAINKILLERS)); SendClientMessage(playerid, COLOR_GREEN, "|_____ Stash Ammunition_____|"); SendClientMessageEx(playerid, COLOR_GREY2, "HP Ammo: %i/%i | Poison Ammo: %i/%i", VehicleInfo[vehicleid][vHPAmmo], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_HPAMMO), VehicleInfo[vehicleid][vPoisonAmmo], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_POISONAMMO)); SendClientMessageEx(playerid, COLOR_GREY2, "FMJ Ammo: %i/%i", VehicleInfo[vehicleid][vFMJAmmo], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_FMJAMMO)); if(count > 0) { SendClientMessage(playerid, COLOR_GREEN, "|_____ Stash Weapons _____|"); for(new i = 0; i < 3; i ++) { if(VehicleInfo[vehicleid][vWeapons][i]) { SendClientMessageEx(playerid, COLOR_GREY2, "[%i] Weapon: %s", i + 1, GetWeaponNameEx(VehicleInfo[vehicleid][vWeapons][i])); } } } } else if(!strcmp(option, "deposit", true)) { new value; if(sscanf(param, "s[14]S()[32]", option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [deposit] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Cash, Materials, Weed, Cocaine, Meth, Painkillers, Weapon"); SendClientMessage(playerid, COLOR_GREY3, "List of options: HPAmmo, PoisonAmmo, FMJAmmo"); return 1; } if(!strcmp(option, "cash", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [deposit] [cash] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pCash]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(VehicleInfo[vehicleid][vCash] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_CASH)) { return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to $%i at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_CASH)); } GivePlayerCash(playerid, -value); VehicleInfo[vehicleid][vCash] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET cash = %i WHERE id = %i", VehicleInfo[vehicleid][vCash], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored $%i in your vehicle stash.", value); } else if(!strcmp(option, "materials", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [deposit] [materials] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pMaterials]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(VehicleInfo[vehicleid][vMaterials] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_MATERIALS)) { return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i materials at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_MATERIALS)); } PlayerInfo[playerid][pMaterials] -= value; VehicleInfo[vehicleid][vMaterials] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET materials = %i WHERE id = %i", VehicleInfo[vehicleid][vMaterials], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %i materials in your vehicle stash.", value); } else if(!strcmp(option, "weed", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [deposit] [weed] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pWeed]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(VehicleInfo[vehicleid][vWeed] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEED)) { return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i grams of weed at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEED)); } PlayerInfo[playerid][pWeed] -= value; VehicleInfo[vehicleid][vWeed] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weed = %i WHERE id = %i", VehicleInfo[vehicleid][vWeed], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[playerid][pWeed], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %ig of weed in your vehicle stash.", value); } else if(!strcmp(option, "cocaine", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [deposit] [cocaine] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pCocaine]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(VehicleInfo[vehicleid][vCocaine] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_COCAINE)) { return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i grams of cocaine at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_COCAINE)); } PlayerInfo[playerid][pCocaine] -= value; VehicleInfo[vehicleid][vCocaine] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET cocaine = %i WHERE id = %i", VehicleInfo[vehicleid][vCocaine], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %ig of cocaine in your vehicle stash.", value); } else if(!strcmp(option, "meth", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [deposit] [meth] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pMeth]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(VehicleInfo[vehicleid][vMeth] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_METH)) { return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i grams of meth at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_METH)); } PlayerInfo[playerid][pMeth] -= value; VehicleInfo[vehicleid][vMeth] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET meth = %i WHERE id = %i", VehicleInfo[vehicleid][vMeth], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %ig of meth in your vehicle stash.", value); } else if(!strcmp(option, "painkillers", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [deposit] [painkillers] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pPainkillers]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(VehicleInfo[vehicleid][vPainkillers] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_PAINKILLERS)) { return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i painkillers at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_PAINKILLERS)); } PlayerInfo[playerid][pPainkillers] -= value; VehicleInfo[vehicleid][vPainkillers] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET painkillers = %i WHERE id = %i", VehicleInfo[vehicleid][vPainkillers], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", PlayerInfo[playerid][pPainkillers], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %i painkillers in your vehicle stash.", value); } else if(!strcmp(option, "weapon", true)) { new weaponid; if(sscanf(param, "i", weaponid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [deposit] [weapon] [weaponid] (/guninv for weapon IDs)"); } if(!(1 <= weaponid <= 46) || PlayerInfo[playerid][pWeapons][weaponSlotIDs[weaponid]] != weaponid) { return SendClientMessage(playerid, COLOR_GREY, "You don't have that weapon. /guninv for a list of your weapons."); } if(GetPlayerHealthEx(playerid) < 60) { return SendClientMessage(playerid, COLOR_GREY, "You can't store weapons as your health is below 60."); } for(new i = 0; i < GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEAPONS); i ++) { if(!VehicleInfo[vehicleid][vWeapons][i]) { VehicleInfo[vehicleid][vWeapons][i] = weaponid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weapon_%i = %i WHERE id = %i", i + 1, VehicleInfo[vehicleid][vWeapons][i], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); RemovePlayerWeapon(playerid, weaponid); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored a %s in slot %i of your vehicle stash.", GetWeaponNameEx(VehicleInfo[vehicleid][vWeapons][i]), i + 1); return 1; } } SendClientMessage(playerid, COLOR_GREY, "This vehicle has no more slots available for weapons."); } else if(!strcmp(option, "hpammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [deposit] [vpammo] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pHPAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(VehicleInfo[vehicleid][vHPAmmo] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_HPAMMO)) { return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i HP ammo at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_HPAMMO)); } SetWeaponAmmo(playerid, AMMO_HP, PlayerInfo[playerid][pHPAmmo] - value); VehicleInfo[vehicleid][vHPAmmo] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET hpammo = %i WHERE id = %i", VehicleInfo[vehicleid][vHPAmmo], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %i rounds of hollow point ammo in your vehicle stash.", value); } else if(!strcmp(option, "poisonammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [deposit] [poisonammo] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pPoisonAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(VehicleInfo[vehicleid][vPoisonAmmo] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_POISONAMMO)) { return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_POISONAMMO)); } SetWeaponAmmo(playerid, AMMO_POISON, PlayerInfo[playerid][pPoisonAmmo] - value); VehicleInfo[vehicleid][vPoisonAmmo] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET poisonammo = %i WHERE id = %i", VehicleInfo[vehicleid][vPoisonAmmo], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %i rounds of poison tip ammo in your vehicle stash.", value); } else if(!strcmp(option, "fmjammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [deposit] [fmjammo] [amount]"); } if(value < 1 || value > PlayerInfo[playerid][pFMJAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(VehicleInfo[vehicleid][vFMJAmmo] + value > GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_FMJAMMO)) { return SendClientMessageEx(playerid, COLOR_GREY, "Your vehicle's stash can only hold up to %i FMJ ammo at its level.", GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_FMJAMMO)); } SetWeaponAmmo(playerid, AMMO_FMJ, PlayerInfo[playerid][pFMJAmmo] - value); VehicleInfo[vehicleid][vFMJAmmo] += value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET fmjammo = %i WHERE id = %i", VehicleInfo[vehicleid][vFMJAmmo], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have stored %i rounds of full metal jacket ammo in your vehicle stash.", value); } } else if(!strcmp(option, "withdraw", true)) { new value; if(sscanf(param, "s[14]S()[32]", option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [withdraw] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Cash, Weed, Cocaine, Meth, Painkillers, Weapon"); SendClientMessage(playerid, COLOR_GREY3, "List of options: HPAmmo, PoisonAmmo, FMJAmmo"); return 1; } if(!strcmp(option, "cash", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [withdraw] [cash] [amount]"); } if(value < 1 || value > VehicleInfo[vehicleid][vCash]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } GivePlayerCash(playerid, value); VehicleInfo[vehicleid][vCash] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET cash = %i WHERE id = %i", VehicleInfo[vehicleid][vCash], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken $%i from your vehicle stash.", value); } else if(!strcmp(option, "materials", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [withdraw] [materials] [amount]"); } if(value < 1 || value > VehicleInfo[vehicleid][vMaterials]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pMaterials] + value > GetPlayerCapacity(playerid, CAPACITY_MATERIALS)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i materials. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMaterials], GetPlayerCapacity(playerid, CAPACITY_MATERIALS)); } PlayerInfo[playerid][pMaterials] += value; VehicleInfo[vehicleid][vMaterials] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET materials = %i WHERE id = %i", VehicleInfo[vehicleid][vMaterials], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = %i WHERE uid = %i", PlayerInfo[playerid][pMaterials], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %i materials from your vehicle stash.", value); } else if(!strcmp(option, "weed", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [withdraw] [weed] [amount]"); } if(value < 1 || value > VehicleInfo[vehicleid][vWeed]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pWeed] + value > GetPlayerCapacity(playerid, CAPACITY_WEED)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED)); } PlayerInfo[playerid][pWeed] += value; VehicleInfo[vehicleid][vWeed] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weed = %i WHERE id = %i", VehicleInfo[vehicleid][vWeed], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[playerid][pWeed], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %ig of weed from your vehicle stash.", value); } else if(!strcmp(option, "cocaine", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [withdraw] [cocaine] [amount]"); } if(value < 1 || value > VehicleInfo[vehicleid][vCocaine]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pCocaine] + value > GetPlayerCapacity(playerid, CAPACITY_COCAINE)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE)); } PlayerInfo[playerid][pCocaine] += value; VehicleInfo[vehicleid][vCocaine] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET cocaine = %i WHERE id = %i", VehicleInfo[vehicleid][vCocaine], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %ig of cocaine from your vehicle stash.", value); } else if(!strcmp(option, "meth", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [withdraw] [meth] [amount]"); } if(value < 1 || value > VehicleInfo[vehicleid][vMeth]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pMeth] + value > GetPlayerCapacity(playerid, CAPACITY_METH)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i meth. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pMeth], GetPlayerCapacity(playerid, CAPACITY_METH)); } PlayerInfo[playerid][pMeth] += value; VehicleInfo[vehicleid][vMeth] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET meth = %i WHERE id = %i", VehicleInfo[vehicleid][vMeth], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %ig of meth from your vehicle stash.", value); } else if(!strcmp(option, "painkillers", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [withdraw] [painkillers] [amount]"); } if(value < 1 || value > VehicleInfo[vehicleid][vPainkillers]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pPainkillers] + value > GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i painkillers. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pPainkillers], GetPlayerCapacity(playerid, CAPACITY_PAINKILLERS)); } PlayerInfo[playerid][pPainkillers] += value; VehicleInfo[vehicleid][vPainkillers] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET painkillers = %i WHERE id = %i", VehicleInfo[vehicleid][vPainkillers], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", PlayerInfo[playerid][pPainkillers], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %i painkillers from your vehicle stash.", value); } else if(!strcmp(option, "weapon", true)) { new slots = GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEAPONS); if(sscanf(param, "i", value)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /vstash [withdraw] [weapon] [slot (1-%i)]", slots); } if(!(1 <= value <= slots)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid slot, or the slot specified is locked."); } if(!VehicleInfo[vehicleid][vWeapons][value-1]) { return SendClientMessage(playerid, COLOR_GREY, "The slot specified contains no weapon which you can take."); } GivePlayerWeaponEx(playerid, VehicleInfo[vehicleid][vWeapons][value-1]); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken a %s from slot %i of your vehicle stash.", GetWeaponNameEx(VehicleInfo[vehicleid][vWeapons][value-1]), value); VehicleInfo[vehicleid][vWeapons][value-1] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weapon_%i = 0 WHERE id = %i", value, VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "hpammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [withdraw] [vpammo] [amount]"); } if(value < 1 || value > VehicleInfo[vehicleid][vHPAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pHPAmmo] + value > GetPlayerCapacity(playerid, CAPACITY_HPAMMO)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i HP ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pHPAmmo], GetPlayerCapacity(playerid, CAPACITY_HPAMMO)); } SetWeaponAmmo(playerid, AMMO_HP, PlayerInfo[playerid][pHPAmmo] + value); VehicleInfo[vehicleid][vHPAmmo] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET hpammo = %i WHERE id = %i", VehicleInfo[vehicleid][vHPAmmo], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %i rounds of hollow point ammo from your vehicle stash.", value); } else if(!strcmp(option, "poisonammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [withdraw] [poisonammo] [amount]"); } if(value < 1 || value > VehicleInfo[vehicleid][vPoisonAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pPoisonAmmo] + value > GetPlayerCapacity(playerid, CAPACITY_POISONAMMO)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i poison ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pPoisonAmmo], GetPlayerCapacity(playerid, CAPACITY_POISONAMMO)); } SetWeaponAmmo(playerid, AMMO_POISON, PlayerInfo[playerid][pPoisonAmmo] + value); VehicleInfo[vehicleid][vPoisonAmmo] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET poisonammo = %i WHERE id = %i", VehicleInfo[vehicleid][vPoisonAmmo], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %i rounds of poison tip ammo from your vehicle stash.", value); } else if(!strcmp(option, "fmjammo", true)) { if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vstash [withdraw] [fmjammo] [amount]"); } if(value < 1 || value > VehicleInfo[vehicleid][vFMJAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(PlayerInfo[playerid][pFMJAmmo] + value > GetPlayerCapacity(playerid, CAPACITY_FMJAMMO)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i FMJ ammo. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pFMJAmmo], GetPlayerCapacity(playerid, CAPACITY_FMJAMMO)); } SetWeaponAmmo(playerid, AMMO_FMJ, PlayerInfo[playerid][pFMJAmmo] + value); VehicleInfo[vehicleid][vFMJAmmo] -= value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET fmjammo = %i WHERE id = %i", VehicleInfo[vehicleid][vFMJAmmo], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "** You have taken %i rounds of full metal jacket ammo from your vehicle stash.", value); } } } else { SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle of yours."); } return 1; } CMD:unmod(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle of yours."); } if(!IsVehicleOwner(playerid, vehicleid) && PlayerInfo[playerid][pVehicleKeys] != vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as this vehicle doesn't belong to you."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /unmod [color | paintjob | mods | neon]"); } if(!strcmp(params, "color", true)) { VehicleInfo[vehicleid][vColor1] = 0; VehicleInfo[vehicleid][vColor2] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET color1 = 0, color2 = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); ChangeVehicleColor(vehicleid, 0, 0); SendClientMessage(playerid, COLOR_WHITE, "** Vehicle color has been set back to default."); } else if(!strcmp(params, "paintjob", true)) { VehicleInfo[vehicleid][vPaintjob] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET paintjob = -1 WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); ChangeVehiclePaintjob(vehicleid, -1); SendClientMessage(playerid, COLOR_WHITE, "** Vehicle paintjob has been set back to default."); } else if(!strcmp(params, "mods", true)) { for(new i = 0; i < 14; i ++) { if(VehicleInfo[vehicleid][vMods][i] >= 1000) { RemoveVehicleComponent(vehicleid, VehicleInfo[vehicleid][vMods][i]); } } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET mod_1 = 0, mod_2 = 0, mod_3 = 0, mod_4 = 0, mod_5 = 0, mod_6 = 0, mod_7 = 0, mod_8 = 0, mod_9 = 0, mod_10 = 0, mod_11 = 0, mod_12 = 0, mod_13 = 0, mod_14 = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_WHITE, "** All vehicle modifications have been removed."); } else if(!strcmp(params, "neon", true)) { if(!VehicleInfo[vehicleid][vNeon]) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no neon which you can remove."); } if(VehicleInfo[vehicleid][vNeonEnabled]) { DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][0]); DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][1]); } VehicleInfo[vehicleid][vNeon] = 0; VehicleInfo[vehicleid][vNeonEnabled] = 0; VehicleInfo[vehicleid][vObjects][0] = INVALID_OBJECT_ID; VehicleInfo[vehicleid][vObjects][1] = INVALID_OBJECT_ID; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET neon = 0, neonenabled = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_WHITE, "** Neon has been removed from vehicle."); } return 1; } CMD:colorcar(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid), color1, color2; if(sscanf(params, "ii", color1, color2)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /colorcar [color1] [color2]"); } if(PlayerInfo[playerid][pSpraycans] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "You have no spraycans left."); } if(!vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You are not sitting inside any vehicle."); } if(VehicleInfo[vehicleid][vOwnerID] > 0 && !IsVehicleOwner(playerid, vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't belong to you, therefore you can't respray it."); } if(!(0 <= color1 <= 255) || !(0 <= color2 <= 255)) { return SendClientMessage(playerid, COLOR_GREY, "The color specified must range between 0 and 255."); } if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0) { VehicleInfo[vehicleid][vColor1] = color1; VehicleInfo[vehicleid][vColor2] = color2; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET color1 = %i, color2 = %i WHERE id = %i", color1, color2, VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); } PlayerInfo[playerid][pSpraycans]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET spraycans = %i WHERE uid = %i", PlayerInfo[playerid][pSpraycans], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); ChangeVehicleColor(vehicleid, color1, color2); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their spraycan to spray their vehicle a different color.", GetPlayerRPName(playerid)); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); SendClientMessageEx(playerid, COLOR_WHITE, "** Vehicle resprayed. You have %i spraycans left.", PlayerInfo[playerid][pSpraycans]); return 1; } CMD:paintcar(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid), paintjobid; if(sscanf(params, "i", paintjobid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /paintcar [paintjobid (-1 = none)]"); } if(PlayerInfo[playerid][pSpraycans] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "You have no spraycans left."); } if(!vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You are not sitting inside any vehicle."); } if(VehicleInfo[vehicleid][vOwnerID] > 0 && !IsVehicleOwner(playerid, vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't belong to you, therefore you can't respray it."); } if(!(-1 <= paintjobid <= 5)) { return SendClientMessage(playerid, COLOR_GREY, "The paintjob specified must range between -1 and 5."); } if(VehicleInfo[vehicleid][vOwnerID] > 0 || VehicleInfo[vehicleid][vGang] >= 0) { VehicleInfo[vehicleid][vPaintjob] = paintjobid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET paintjob = %i WHERE id = %i", paintjobid, VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); } PlayerInfo[playerid][pSpraycans]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET spraycans = %i WHERE uid = %i", PlayerInfo[playerid][pSpraycans], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); ChangeVehiclePaintjob(vehicleid, paintjobid); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their spraycan to paint their vehicle a different color.", GetPlayerRPName(playerid)); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); SendClientMessageEx(playerid, COLOR_WHITE, "** Vehicle painted. You have %i spraycans left.", PlayerInfo[playerid][pSpraycans]); return 1; } CMD:sellcar(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid), targetid, amount; if(!vehicleid || !IsVehicleOwner(playerid, vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours."); } if(sscanf(params, "ui", targetid, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sellcar [playerid] [amount]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself."); } if(amount < 1) { return SendClientMessage(playerid, COLOR_GREY, "You must specify an amount above zero."); } PlayerInfo[targetid][pCarOffer] = playerid; PlayerInfo[targetid][pCarOffered] = vehicleid; PlayerInfo[targetid][pCarPrice] = amount; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered you their %s for $%i (/accept vehicle).", GetPlayerRPName(playerid), GetVehicleName(vehicleid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered %s to buy your %s for $%i.", GetPlayerRPName(targetid), GetVehicleName(vehicleid), amount); return 1; } CMD:sellmycar(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(!vehicleid || !IsVehicleOwner(playerid, vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours."); } if(!IsPlayerInRangeOfPoint(playerid, 8.0, 542.0433, -1293.5909, 17.2422)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the Grotti car dealership."); } if(strcmp(params, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sellmycar [confirm]"); SendClientMessageEx(playerid, COLOR_GREY3, "This command permanently deletes your vehicle. You will receive $%i back.", percent(VehicleInfo[vehicleid][vPrice], 75)); return 1; } GivePlayerCash(playerid, percent(VehicleInfo[vehicleid][vPrice], 75)); SendClientMessageEx(playerid, COLOR_GREEN, "You have sold your %s to the dealership and received $%i back.", GetVehicleName(vehicleid), percent(VehicleInfo[vehicleid][vPrice], 75)); Log_Write("log_property", "%s (uid: %i) sold their %s (id: %i) to the dealership for $%i", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID], percent(VehicleInfo[vehicleid][vPrice], 75)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM vehicles WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); DespawnVehicle(vehicleid, false); return 1; } CMD:mine(playerid, params[]) { if(!PlayerHasJob(playerid, JOB_MINER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Miner."); } if(PlayerInfo[playerid][pMiningTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are mining already. Wait until you are done."); } if(PlayerInfo[playerid][pMiningRock] > 0 && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY) { return SendClientMessage(playerid, COLOR_GREY, "You need to drop off your current rock first."); } if(!IsPlayerInMiningArea(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the mining area."); } if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return SendClientMessage(playerid, COLOR_GREY, "You must be onfoot in order to use this command."); } GameTextForPlayer(playerid, "~w~Mining...", 6000, 3); ApplyAnimation(playerid, "BASEBALL", "BAT_4", 4.1, 1, 0, 0, 0, 0, 1); DisablePlayerCheckpoint(playerid); SetPlayerAttachedObject(playerid, 9, 337, 6); PlayerInfo[playerid][pMiningTime] = 6; return 1; } CMD:startsweeping(playerid, params[]) { if(!PlayerHasJob(playerid, JOB_SWEEPER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Street Sweeper."); } if(PlayerInfo[playerid][pSweeping]) { return SendClientMessage(playerid, COLOR_GREY, "You are sweeping already. /stopsweeping to stop."); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 574) { return SendClientMessage(playerid, COLOR_GREY, "You are not sitting inside a Sweeper."); } PlayerInfo[playerid][pSweeping] = 1; PlayerInfo[playerid][pSweepTime] = 30; PlayerInfo[playerid][pSweepEarnings] = 0; SendClientMessage(playerid, COLOR_WHITE, "** You are now sweeping. Drive around with your sweeper to earn money towards your paycheck."); SendClientMessage(playerid, COLOR_WHITE, "** When you are finished your sweeping shift, use /stopsweeping in order to end your shift."); return 1; } CMD:stopsweeping(playerid, params[]) { if(!PlayerHasJob(playerid, JOB_SWEEPER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Street Sweeper."); } if(!PlayerInfo[playerid][pSweeping]) { return SendClientMessage(playerid, COLOR_GREY, "You are not sweeping right now."); } SendClientMessageEx(playerid, COLOR_AQUA, "** You are no longer sweeping. You earned a total of {00AA00}$%i{33CCFF} towards your paycheck during your shift.", PlayerInfo[playerid][pSweepEarnings]); PlayerInfo[playerid][pSweeping] = 0; PlayerInfo[playerid][pSweepTime] = 0; PlayerInfo[playerid][pSweepEarnings] = 0; return 1; } CMD:v(playerid, params[]) { return cmd_vip(playerid, params); } CMD:vip(playerid, params[]) { if(!PlayerInfo[playerid][pVIPPackage]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /(v)ip [vip chat]"); } if(PlayerInfo[playerid][pToggleVIP]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the VIP chat as you have it toggled."); } foreach(new i : Player) { if(PlayerInfo[i][pVIPPackage] > 0 && !PlayerInfo[i][pToggleVIP]) { SendClientMessageEx(i, COLOR_VIP, "** %s VIP %s: %s **", GetVIPRank(PlayerInfo[playerid][pVIPPackage]), GetPlayerRPName(playerid), params); } } return 1; } CMD:viptag(playerid, params[]) { if(!PlayerInfo[playerid][pVIPPackage]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription."); } if(PlayerInfo[playerid][pAcceptedHelp]) { return SendClientMessage(playerid, COLOR_GREY, "You can't enable your VIP tag until you stop assisting. (/return)"); } if(PlayerInfo[playerid][pAdminDuty]) { return SendClientMessage(playerid, COLOR_GREY, "You can't enable your VIP tag until you are off admin duty."); } if(PlayerInfo[playerid][pTagType] != TAG_VIP) { if(PlayerInfo[playerid][pAdminDuty]) { return SendClientMessage(playerid, COLOR_GREY, "You can't enable your VIP tag while on admin duty."); } if(PlayerInfo[playerid][pAcceptedHelp]) { return SendClientMessage(playerid, COLOR_GREY, "You can't enable your VIP tag while assisting someone."); } SetPlayerSpecialTag(playerid, TAG_VIP); SendClientMessage(playerid, COLOR_AQUA, "** You have enabled the VIP tag above your head."); } else { SetPlayerSpecialTag(playerid, TAG_NONE); SendClientMessage(playerid, COLOR_AQUA, "** You have removed the VIP tag from above your head."); } return 1; } CMD:vipcolor(playerid, params[]) { if(!PlayerInfo[playerid][pVIPPackage]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription."); } if(!PlayerInfo[playerid][pVIPColor]) { PlayerInfo[playerid][pVIPColor] = 1; SendClientMessage(playerid, COLOR_AQUA, "** You have enabled the VIP nametag color."); } else { PlayerInfo[playerid][pVIPColor] = 0; SendClientMessage(playerid, COLOR_AQUA, "** You have disabled the VIP nametag color."); } return 1; } CMD:vipinvite(playerid, params[]) { new targetid; if(!PlayerInfo[playerid][pVIPPackage]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription."); } if((PlayerInfo[playerid][pVIPTime] - gettime()) < 259200) { return SendClientMessage(playerid, COLOR_GREY, "Your VIP subscription expires in less than 3 days. You can't do this now."); } if(sscanf(params, "u", targetid)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vipinvite [playerid]"); SendClientMessage(playerid, COLOR_GREY3, "This command grants a temporary VIP subscription which lasts one hour to a player of your choice."); if(PlayerInfo[playerid][pVIPCooldown] > gettime()) { SendClientMessageEx(playerid, COLOR_GREY3, "You can only use this command once every 24 hours. You have %i hours left until you can use it again.", (PlayerInfo[playerid][pVIPCooldown] - gettime()) / 3600); } else { SendClientMessage(playerid, COLOR_GREY3, "You can only use this command once every 24 hours. You currently have no cooldown for this command."); } return 1; } if(PlayerInfo[playerid][pVIPCooldown] > gettime()) { return SendClientMessageEx(playerid, COLOR_GREY, "You have already used this command today. Please wait another %i hours.", (PlayerInfo[playerid][pVIPCooldown] - gettime()) / 3600); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(PlayerInfo[targetid][pVIPPackage]) { return SendClientMessage(playerid, COLOR_GREY, "That player already has a VIP subscription."); } PlayerInfo[targetid][pVIPPackage] = 1; PlayerInfo[targetid][pVIPTime] = gettime() + 3600; PlayerInfo[playerid][pVIPCooldown] = gettime() + 86400; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET vippackage = 1, viptime = 3600 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET vipcooldown = %i WHERE uid = %i", PlayerInfo[playerid][pVIPCooldown], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "** %s has given you a temporary one hour VIP package.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have given %s a temporary one hour VIP package.", GetPlayerRPName(targetid)); Log_Write("log_vip", "%s VIP %s (uid: %i) has given %s (uid: %i) a temporary one hour package.", GetVIPRank(PlayerInfo[playerid][pVIPPackage]), GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); return 1; } CMD:vipinfo(playerid, params[]) { new time = PlayerInfo[playerid][pVIPTime] - gettime(), cooldown[24] = "{33CC33}No cooldown", string[32]; if(!PlayerInfo[playerid][pVIPPackage]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription."); } SendClientMessage(playerid, COLOR_LIGHTORANGE, "|____ My Package ____|"); if(1 <= time <= 3599) { format(string, sizeof(string), "{AA3333}%i minutes", time / 60); } else if(3600 <= time <= 86399) { format(string, sizeof(string), "{FF6347}%i hours", time / 3600); } else { if(time / 86400 <= 7) { format(string, sizeof(string), "{FFD700}%i days", time / 86400); } else { format(string, sizeof(string), "{33CC33}%i days", time / 86400); } } if(PlayerInfo[playerid][pVIPCooldown] > gettime()) { time = PlayerInfo[playerid][pVIPCooldown] - gettime(); if(time > 3600) { format(cooldown, sizeof(cooldown), "{F7A763}%i hours", time / 3600); } else { format(cooldown, sizeof(cooldown), "{F7A763}%i minutes", time / 60); } } SendClientMessageEx(playerid, COLOR_GREY3, "Package: {A028AD}%s VIP", GetVIPRank(PlayerInfo[playerid][pVIPPackage])); SendClientMessageEx(playerid, COLOR_GREY3, "Expires In: %s", string); SendClientMessageEx(playerid, COLOR_GREY3, "Next Invite: %s", cooldown); return 1; } CMD:vipnumber(playerid, params[]) { new number; if(!PlayerInfo[playerid][pVIPPackage]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a VIP subscription."); } if(sscanf(params, "i", number)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vipnumber [phone number]"); SendClientMessage(playerid, COLOR_GREY3, "This command costs $10,000 and changes your phone number to your chosen one."); return 1; } if(PlayerInfo[playerid][pCash] < 10000) { return SendClientMessage(playerid, COLOR_GREY, "You need at least $10,000 for pay for this."); } if(number == 0 || number == 911 || number == 6397 || number == 6324 || number == 8294) { return SendClientMessage(playerid, COLOR_GREY, "Invalid number."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM users WHERE phone = %i", number); mysql_tquery(connectionID, queryBuffer, "OnPlayerBuyPhoneNumber", "ii", playerid, number); return 1; } CMD:setfare(playerid, params[]) { new amount; if(!PlayerHasJob(playerid, JOB_TAXIDRIVER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Taxi Driver."); } if(sscanf(params, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setfare [amount]"); } if(!(0 <= amount <= 500)) { return SendClientMessage(playerid, COLOR_GREY, "The fare must range between $0 and $500."); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 420 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 438) { return SendClientMessage(playerid, COLOR_GREY, "You are not in a taxi type vehicle."); } if(amount == 0) { if(PlayerInfo[playerid][pTaxiFare] == 0) { return SendClientMessage(playerid, COLOR_GREY, "The fare is already set to zero."); } PlayerInfo[playerid][pTaxiFare] = 0; SendClientMessage(playerid, COLOR_YELLOW, "** You have set the fare to $0 and went off duty."); } else { if(PlayerInfo[playerid][pTaxiFare] == amount) { return SendClientMessage(playerid, COLOR_GREY, "The fare is already set to this amount."); } PlayerInfo[playerid][pTaxiFare] = amount; SendClientMessageToAllEx(COLOR_YELLOW, "** Taxi driver %s is now on duty, fare: $%i. /call 8294 for a ride.", GetPlayerRPName(playerid), amount); } return 1; } CMD:createfaction(playerid, params[]) { new type[12], name[48], type_id = -1; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pFactionMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[12]s[48]", type, name)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /createfaction [type] [name]"); SendClientMessage(playerid, COLOR_GREY3, "List of types: Police, Medic, News, Government, Hitman, Federal"); return 1; } if(!strcmp(type, "police", true)) { type_id = FACTION_POLICE; } else if(!strcmp(type, "medic", true)) { type_id = FACTION_MEDIC; } else if(!strcmp(type, "news", true)) { type_id = FACTION_NEWS; } else if(!strcmp(type, "government", true)) { type_id = FACTION_GOVERNMENT; } else if(!strcmp(type, "hitman", true)) { type_id = FACTION_HITMAN; } else if(!strcmp(type, "federal", true)) { type_id = FACTION_FEDERAL; } if(type_id == -1) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } for(new i = 0; i < MAX_FACTIONS; i ++) { if(!FactionInfo[i][fType]) { SetupFaction(i, name, type_id); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has created a {F7A763}%s{FF6347} faction named '%s'.", GetPlayerRPName(playerid), factionTypes[type_id], name); SendClientMessageEx(playerid, COLOR_WHITE, "** This faction's ID is %i. /editfaction to edit.", i); return 1; } } return 1; } CMD:editfaction(playerid, params[]) { new factionid, option[12], param[48]; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pFactionMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[12]S()[48]", factionid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editfaction [factionid] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Name, Type, Color, RankCount, RankName, Skin, Paycheck, Leader, Locker, TurfTokens"); return 1; } if(!(0 <= factionid < MAX_FACTIONS) || FactionInfo[factionid][fType] == FACTION_NONE) { return SendClientMessage(playerid, COLOR_GREY, "Invalid faction."); } if(!strcmp(option, "name", true)) { if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editfaction [factionid] [name] [text]"); } strcpy(FactionInfo[factionid][fName], param, 48); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET name = '%e' WHERE id = %i", param, factionid); mysql_tquery(connectionID, queryBuffer); ReloadFaction(factionid); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the name of faction ID %i to '%s'.", GetPlayerRPName(playerid), factionid, param); } else if(!strcmp(option, "type", true)) { new type_id; if(isnull(param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editfaction [factionid] [type] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of types: Police, Medic, News, Government, Hitman, Federal"); return 1; } if(!strcmp(param, "police", true)) { type_id = FACTION_POLICE; } else if(!strcmp(param, "medic", true)) { type_id = FACTION_MEDIC; } else if(!strcmp(param, "news", true)) { type_id = FACTION_NEWS; } else if(!strcmp(param, "government", true)) { type_id = FACTION_GOVERNMENT; } else if(!strcmp(param, "hitman", true)) { type_id = FACTION_HITMAN; } else if(!strcmp(param, "federal", true)) { type_id = FACTION_FEDERAL; } if(type_id == -1) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } FactionInfo[factionid][fType] = type_id; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET type = %i WHERE id = %i", type_id, factionid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the type of faction ID %i to %s.", GetPlayerRPName(playerid), factionid, factionTypes[type_id]); } else if(!strcmp(option, "color", true)) { new color; if(sscanf(param, "h", color)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editfaction [factionid] [color] [0xRRGGBBAA]"); } FactionInfo[factionid][fColor] = color & ~0xff; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET color = %i WHERE id = %i", FactionInfo[factionid][fColor], factionid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the {%06x}color{FF6347} of faction ID %i.", GetPlayerRPName(playerid), color >>> 8, factionid); } else if(!strcmp(option, "rankcount", true)) { new ranks; if(sscanf(param, "i", ranks)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editfaction [factionid] [rankcount] [amount]"); } if(!(1 <= ranks <= MAX_FACTION_RANKS)) { return SendClientMessageEx(playerid, COLOR_GREY, "The amount of ranks must range from 1 to %i.", MAX_FACTION_RANKS); } FactionInfo[factionid][fRankCount] = ranks; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET rankcount = %i WHERE id = %i", ranks, factionid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the rank count of faction ID %i to %i.", GetPlayerRPName(playerid), factionid, ranks); } else if(!strcmp(option, "rankname", true)) { new rankid, rank[32]; if(sscanf(param, "is[32]", rankid, rank)) { SendClientMessage(playerid, COLOR_GREEN, "|_____ Rank Names _____|"); for(new i = 0; i < FactionInfo[factionid][fRankCount]; i ++) { if(isnull(FactionRanks[factionid][i])) SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: (empty)", i); else SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: %s", i, FactionRanks[factionid][i]); } return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /editfaction [factionid] [rankname] [slot (0-%i)] [name]", FactionInfo[factionid][fRankCount] - 1); } if(!(0 <= rankid < FactionInfo[factionid][fRankCount])) { return SendClientMessage(playerid, COLOR_GREY, "Invalid rank."); } strcpy(FactionRanks[factionid][rankid], rank, 32); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO factionranks VALUES(%i, %i, '%e') ON DUPLICATE KEY UPDATE name = '%e'", factionid, rankid, rank, rank); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set rank %i's name of faction ID %i to '%s'.", GetPlayerRPName(playerid), rankid, factionid, rank); } else if(!strcmp(option, "skin", true)) { new slot, skinid; if(sscanf(param, "ii", slot, skinid)) { SendClientMessage(playerid, COLOR_GREEN, "|_____ Faction Skins _____|"); for(new i = 0; i < MAX_FACTION_SKINS; i ++) { if(FactionInfo[factionid][fSkins][i] == 0) SendClientMessageEx(playerid, COLOR_GREY2, "Skin %i: (none)", i + 1); else SendClientMessageEx(playerid, COLOR_GREY2, "Skin %i: %i", i + 1, FactionInfo[factionid][fSkins][i]); } return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /editfaction [factionid] [skin] [slot (1-%i)] [skinid]", MAX_FACTION_SKINS); } if(!(1 <= slot <= MAX_FACTION_SKINS)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid slot."); } if(!(0 <= skinid <= 311)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid skin."); } slot--; FactionInfo[factionid][fSkins][slot] = skinid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO factionskins VALUES(%i, %i, %i) ON DUPLICATE KEY UPDATE skinid = %i", factionid, slot, skinid, skinid); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_WHITE, "** You have set the skin in slot %i to ID %i.", slot + 1, skinid); } else if(!strcmp(option, "paycheck", true)) { new rankid, amount; if(FactionInfo[factionid][fType] == FACTION_HITMAN) { return SendClientMessage(playerid, COLOR_GREY, "You can't set the paychecks for hitman factions."); } if(sscanf(param, "ii", rankid, amount)) { SendClientMessage(playerid, COLOR_GREEN, "|_____ Rank Paychecks _____|"); for(new i = 0; i < FactionInfo[factionid][fRankCount]; i ++) { if(isnull(FactionRanks[factionid][i])) SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: (empty)", i); else SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: %s ($%i)", i, FactionRanks[factionid][i], FactionInfo[factionid][fPaycheck][i]); } return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /editfaction [factionid] [paycheck] [slot (0-%i)] [amount]", FactionInfo[factionid][fRankCount] - 1); } if(!(0 <= rankid < FactionInfo[factionid][fRankCount])) { return SendClientMessage(playerid, COLOR_GREY, "Invalid rank."); } if(!(0 <= amount <= 100000)) { return SendClientMessage(playerid, COLOR_GREY, "The amount must range from $0 to $100000."); } FactionInfo[factionid][fPaycheck][rankid] = amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO factionpay VALUES(%i, %i, %i) ON DUPLICATE KEY UPDATE amount = %i", factionid, rankid, amount, amount); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set rank %i's paycheck of faction ID %i to $%i.", GetPlayerRPName(playerid), rankid, factionid, amount); } else if(!strcmp(option, "leader", true)) { new leader[MAX_PLAYER_NAME]; if(sscanf(param, "s[24]", leader)) { SendClientMessage(playerid, COLOR_GREY, "[Usage]: /editfaction [factionid] [leader] [name]"); SendClientMessage(playerid, COLOR_GREY, "This only updates the text for the leader's name in /factions. Use /setfaction to appoint someone as faction leader."); return 1; } strcpy(FactionInfo[factionid][fLeader], leader, MAX_PLAYER_NAME); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET leader = '%e' WHERE id = %i", leader, factionid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the leader of faction ID %i to %s.", GetPlayerRPName(playerid), factionid, leader); } else if(!strcmp(option, "locker", true)) { GetPlayerPos(playerid, FactionInfo[factionid][fLockerX], FactionInfo[factionid][fLockerY], FactionInfo[factionid][fLockerZ]); FactionInfo[factionid][fLockerInterior] = GetPlayerInterior(playerid); FactionInfo[factionid][fLockerWorld] = GetPlayerVirtualWorld(playerid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET lockerx = '%f', lockery = '%f', lockerz = '%f', lockerinterior = %i, lockerworld = %i WHERE id = %i", FactionInfo[factionid][fLockerX], FactionInfo[factionid][fLockerY], FactionInfo[factionid][fLockerZ], FactionInfo[factionid][fLockerInterior], FactionInfo[factionid][fLockerWorld], factionid); mysql_tquery(connectionID, queryBuffer); ReloadFaction(factionid); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has adjusted the locker point of faction ID %i.", GetPlayerRPName(playerid), factionid); } else if(!strcmp(option, "turftokens", true)) { new amount; if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editfaction [factionid] [turftokens] [amount]"); } if(FactionInfo[factionid][fType] != FACTION_POLICE) { return SendClientMessage(playerid, COLOR_GREY, "You can only set the turf tokens for police factions."); } FactionInfo[factionid][fTurfTokens] = amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET turftokens = %i WHERE id = %i", amount, factionid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the turf tokens of faction ID %i to %i.", GetPlayerRPName(playerid), factionid, amount); } return 1; } CMD:purgefaction(playerid, params[]) { new factionid; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pFactionMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", factionid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /purgefaction [factionid]"); } if(!(0 <= factionid < MAX_FACTIONS) || FactionInfo[factionid][fType] == FACTION_NONE) { return SendClientMessage(playerid, COLOR_GREY, "Invalid faction."); } foreach(new i : Player) { if(PlayerInfo[i][pFaction] == factionid) { ResetPlayerWeaponsEx(i); SendClientMessageEx(i, COLOR_LIGHTRED, "The faction you were apart of has been purged by an administrator."); SetPlayerSkin(i, 230); PlayerInfo[i][pFaction] = -1; PlayerInfo[i][pFactionRank] = 0; PlayerInfo[i][pDivision] = -1; PlayerInfo[i][pDuty] = 0; } } strcpy(FactionInfo[factionid][fLeader], "No-one", MAX_PLAYER_NAME); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET faction = -1, factionrank = 0, division = -1 WHERE faction = %i", factionid); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET leader = 'No-one' WHERE id = %i", factionid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has purged faction %s.", GetPlayerRPName(playerid), FactionInfo[factionid][fName]); return 1; } CMD:removefaction(playerid, params[]) { new factionid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", factionid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removefaction [factionid]"); } if(!(0 <= factionid < MAX_FACTIONS) || FactionInfo[factionid][fType] == FACTION_NONE) { return SendClientMessage(playerid, COLOR_GREY, "Invalid faction."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has deleted faction %s.", GetPlayerRPName(playerid), FactionInfo[factionid][fName]); RemoveFaction(factionid); return 1; } CMD:setfaction(playerid, params[]) { new targetid, factionid, rankid; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pFactionMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "uiI(-1)", targetid, factionid, rankid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setfaction [playerid] [factionid (-1 = none)] [rank (optional)]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(!(-1 <= factionid < MAX_FACTIONS) || (factionid >= 0 && FactionInfo[factionid][fType] == FACTION_NONE)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid faction."); } if((factionid != -1 && !(-1 <= rankid < FactionInfo[factionid][fRankCount]))) { return SendClientMessage(playerid, COLOR_GREY, "Invalid rank."); } if(factionid == -1) { ResetPlayerWeaponsEx(targetid); SetPlayerSkin(targetid, 230); PlayerInfo[targetid][pFaction] = -1; PlayerInfo[targetid][pFactionRank] = 0; PlayerInfo[targetid][pDivision] = -1; PlayerInfo[targetid][pDuty] = 0; SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed you from your faction.", GetPlayerRPName(playerid)); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s from their faction.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); } else { if(rankid == -1) { rankid = FactionInfo[factionid][fRankCount] - 1; } /*if(rankid == FactionInfo[factionid][fRankCount] - 1) { GetPlayerName(targetid, FactionInfo[factionid][fLeader], MAX_PLAYER_NAME); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET leader = '%e' WHERE id = %i", FactionInfo[factionid][fLeader], factionid); mysql_tquery(connectionID, queryBuffer); }*/ PlayerInfo[targetid][pFaction] = factionid; PlayerInfo[targetid][pFactionRank] = rankid; PlayerInfo[targetid][pDivision] = -1; SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {00AA00}%s{33CCFF} in %s.", GetPlayerRPName(playerid), FactionRanks[factionid][rankid], FactionInfo[factionid][fName]); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a %s in %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), FactionRanks[factionid][rankid], FactionInfo[factionid][fName]); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET faction = %i, factionrank = %i, division = %i WHERE uid = %i", factionid, rankid, PlayerInfo[playerid][pDivision], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); return 1; } CMD:factions(playerid, params[]) { SendClientMessage(playerid, COLOR_GREEN, "____________________________________"); for(new i = 0; i < MAX_FACTIONS; i ++) { if(FactionInfo[i][fType] != FACTION_NONE) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM users WHERE faction = %i", i); mysql_tquery(connectionID, queryBuffer, "OnPlayerListFactions", "ii", playerid, i); } } return 1; } CMD:channel(playerid, params[]) { new channel; if(!PlayerInfo[playerid][pWalkieTalkie]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have a walkie talkie."); } if(sscanf(params, "i", channel)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /channel [freq]"); } if(!(0 <= channel <= 9999999)) { return SendClientMessage(playerid, COLOR_GREY, "The channel must range from 0 to 9999999."); } PlayerInfo[playerid][pChannel] = channel; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET channel = %i WHERE uid = %i", channel, PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); if(channel == 0) { SendClientMessage(playerid, COLOR_WHITE, "** You have set the channel to 0 and disabled your walkie talkie."); } else { SendClientMessageEx(playerid, COLOR_WHITE, "** Channel set to %i, use /wt to broadcast over this channel.", channel); } return 1; } CMD:wt(playerid, params[]) { if(!PlayerInfo[playerid][pWalkieTalkie]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have a walkie talkie."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /wt [walkie talkie]"); } if(!PlayerInfo[playerid][pChannel]) { return SendClientMessage(playerid, COLOR_GREY, "Your walkie talkie is not tuned into any channel. /channel to set one."); } if(PlayerInfo[playerid][pToggleWT]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in your walkie talkie as you have it toggled."); } foreach(new i : Player) { if(PlayerInfo[i][pWalkieTalkie] && PlayerInfo[i][pChannel] == PlayerInfo[playerid][pChannel] && !PlayerInfo[i][pToggleWT]) { if(strlen(params) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, COLOR_WALKIETALKIE, "** [CH: %i] %s: %.*s... **", PlayerInfo[playerid][pChannel], GetPlayerRPName(playerid), MAX_SPLIT_LENGTH, params); SendClientMessageEx(i, COLOR_WALKIETALKIE, "** [CH: %i] %s: ...%s **", PlayerInfo[playerid][pChannel], GetPlayerRPName(playerid), params[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, COLOR_WALKIETALKIE, "** [CH: %i] %s: %s **", PlayerInfo[playerid][pChannel], GetPlayerRPName(playerid), params); } } } SetPlayerBubbleText(playerid, 20.0, COLOR_WHITE, "[WT]: %s", params); //SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s speaks into their walkie talkie.", GetPlayerRPName(playerid)); return 1; } CMD:g(playerid, params[]) { new string[64]; if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /g [global chat]"); } if(!enabledGlobal && PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "The global channel is disabled at the moment."); } if(PlayerInfo[playerid][pGlobalMuted]) { return SendClientMessage(playerid, COLOR_GREY, "You are muted from speaking in this channel."); } if(PlayerInfo[playerid][pToggleGlobal]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the global chat as you have it toggled."); } if(gettime() - PlayerInfo[playerid][pLastGlobal] < 3) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only speak in this channel every 3 seconds. Please wait %i more seconds.", 3 - (gettime() - PlayerInfo[playerid][pLastGlobal])); } if(PlayerInfo[playerid][pAdmin] > 1) { format(string, sizeof(string), "%s", GetAdminRank(playerid)); } else if(PlayerInfo[playerid][pHelper] > 0) { format(string, sizeof(string), "%s", GetHelperRank(playerid)); } else if(PlayerInfo[playerid][pVIPPackage] > 0) { format(string, sizeof(string), "{A028AD}%s VIP{FFA500}", GetVIPRank(PlayerInfo[playerid][pVIPPackage])); } else if(PlayerInfo[playerid][pLevel] >= 2) { format(string, sizeof(string), "Level %i Player", PlayerInfo[playerid][pLevel]); } else { string = "Level 1 Newbie"; } foreach(new i : Player) { if(!PlayerInfo[i][pToggleGlobal]) { if(strlen(params) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, COLOR_GLOBAL, "(( %s %s: %.*s...))", string, GetPlayerRPName(playerid), MAX_SPLIT_LENGTH, params); SendClientMessageEx(i, COLOR_GLOBAL, "(( %s %s: ...%s ))", string, GetPlayerRPName(playerid), params[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, COLOR_GLOBAL, "(( %s %s: %s ))", string, GetPlayerRPName(playerid), params); } } } if(PlayerInfo[playerid][pAdmin] < 2) { PlayerInfo[playerid][pLastGlobal] = gettime(); } return 1; } CMD:fc(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /fc [faction chat]"); } if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment."); } if(PlayerInfo[playerid][pToggleFaction]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the faction chat as you have it toggled."); } foreach(new i : Player) { if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction] && !PlayerInfo[i][pToggleFaction]) { if(strlen(params) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, COLOR_FACTIONCHAT, "(( %s %s: %.*s... ))", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), MAX_SPLIT_LENGTH, params); SendClientMessageEx(i, COLOR_FACTIONCHAT, "(( %s %s: ...%s ))", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, COLOR_FACTIONCHAT, "(( %s %s: %s ))", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params); } } } return 1; } CMD:div(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /div [division chat]"); } if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment."); } if(PlayerInfo[playerid][pDivision] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any divisions in your faction."); } foreach(new i : Player) { if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction] && PlayerInfo[i][pDivision] == PlayerInfo[playerid][pDivision]) { if(strlen(params) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, COLOR_LIGHTORANGE, "** [%s] %s %s: %.*s... **", FactionDivisions[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pDivision]], FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), MAX_SPLIT_LENGTH, params); SendClientMessageEx(i, COLOR_LIGHTORANGE, "** [%s] %s %s: ...%s **", FactionDivisions[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pDivision]], FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, COLOR_LIGHTORANGE, "** [%s] %s %s: %s **", FactionDivisions[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pDivision]], FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params); } } } return 1; } CMD:r(playerid, params[]) { return cmd_radio(playerid, params); } CMD:radio(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /(r)adio [faction radio]"); } if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment."); } if(PlayerInfo[playerid][pToggleRadio]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in your radio as you have it toggled."); } foreach(new i : Player) { if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction] && !PlayerInfo[i][pToggleRadio]) { new color = (FactionInfo[PlayerInfo[playerid][pFaction]][fType] == FACTION_MEDIC) ? (COLOR_DOCTOR) : (COLOR_ROYALBLUE); if(strlen(params) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, color, "** %s %s: %.*s... **", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), MAX_SPLIT_LENGTH, params); SendClientMessageEx(i, color, "** %s %s: ...%s **", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, color, "** %s %s: %s **", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params); } } } SetPlayerBubbleText(playerid, 20.0, COLOR_WHITE, "[Radio]: %s", params); return 1; } CMD:d(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /d [department radio]"); } if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment."); } if(PlayerInfo[playerid][pToggleRadio]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in your radio as you have it toggled."); } switch(FactionInfo[PlayerInfo[playerid][pFaction]][fType]) { case FACTION_POLICE, FACTION_MEDIC, FACTION_GOVERNMENT, FACTION_FEDERAL: { foreach(new i : Player) { if((!PlayerInfo[i][pToggleRadio]) && (GetFactionType(i) == FACTION_POLICE || GetFactionType(i) == FACTION_MEDIC || GetFactionType(i) == FACTION_GOVERNMENT || GetFactionType(i) == FACTION_FEDERAL)) { if(strlen(params) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, COLOR_YELLOW, "** [%s] %s %s: %.*s... **", FactionInfo[PlayerInfo[playerid][pFaction]][fName], FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), MAX_SPLIT_LENGTH, params); SendClientMessageEx(i, COLOR_YELLOW, "** [%s] %s %s: ...%s **", FactionInfo[PlayerInfo[playerid][pFaction]][fName], FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, COLOR_YELLOW, "** [%s] %s %s: %s **", FactionInfo[PlayerInfo[playerid][pFaction]][fName], FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params); } } } } default: { SendClientMessage(playerid, COLOR_GREY, "Your faction is not authorized to speak in department radio."); } } SetPlayerBubbleText(playerid, 20.0, COLOR_WHITE, "[Radio]: %s", params); return 1; } CMD:faction(playerid, params[]) { new targetid, option[14], param[32]; if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment."); } if(sscanf(params, "s[14]S()[32]", option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /faction [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Invite, Kick, Rank, Roster, Online, Quit, Offlinekick"); return 1; } if(!strcmp(option, "invite", true)) { if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2); } if(sscanf(param, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /faction [invite] [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pFaction] != -1) { return SendClientMessage(playerid, COLOR_GREY, "That player is already apart of a faction."); } if(PlayerInfo[targetid][pGang] >= 0) { return SendClientMessage(playerid, COLOR_GREY, "That player is apart of a gang and therefore can't join a faction."); } PlayerInfo[targetid][pFactionOffer] = playerid; PlayerInfo[targetid][pFactionOffered] = PlayerInfo[playerid][pFaction]; SendClientMessageEx(targetid, COLOR_AQUA, "** %s has invited you to join {00AA00}%s{33CCFF} (/accept faction).", GetPlayerRPName(playerid), FactionInfo[PlayerInfo[playerid][pFaction]][fName]); SendClientMessageEx(playerid, COLOR_AQUA, "** You have invited %s to join your faction.", GetPlayerRPName(targetid)); } else if(!strcmp(option, "kick", true)) { if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2); } if(sscanf(param, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /faction [kick] [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pFaction] != PlayerInfo[playerid][pFaction]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your faction."); } if(PlayerInfo[targetid][pFactionRank] > PlayerInfo[playerid][pFactionRank]) { return SendClientMessage(playerid, COLOR_GREY, "That player has a higher rank than you."); } Log_Write("log_faction", "%s (uid: %i) kicked %s (uid: %i) from %s (id: %i) as rank %s (%i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], FactionInfo[PlayerInfo[playerid][pFaction]][fName], PlayerInfo[playerid][pFaction], FactionRanks[PlayerInfo[targetid][pFaction]][PlayerInfo[targetid][pFactionRank]], PlayerInfo[targetid][pFactionRank]); ResetPlayerWeaponsEx(targetid); SetPlayerSkin(targetid, 230); PlayerInfo[targetid][pFaction] = -1; PlayerInfo[targetid][pFactionRank] = 0; PlayerInfo[targetid][pDivision] = -1; PlayerInfo[targetid][pDuty] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET faction = -1, factionrank = 0, division = -1 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has kicked you from the faction.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have kicked %s from your faction.", GetPlayerRPName(targetid)); } else if(!strcmp(option, "rank", true)) { new rankid; if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2); } if(sscanf(param, "ui", targetid, rankid)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /faction [rank] [playerid] [rankid (0-%i)]", PlayerInfo[playerid][pFactionRank]); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(rankid < 0 || rankid > PlayerInfo[playerid][pFactionRank]) { return SendClientMessage(playerid, COLOR_GREY, "The rank specified is either invalid or higher than your rank."); } if(PlayerInfo[targetid][pFaction] != PlayerInfo[playerid][pFaction]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your faction."); } if(PlayerInfo[targetid][pFactionRank] > PlayerInfo[playerid][pFactionRank]) { return SendClientMessage(playerid, COLOR_GREY, "That player has a higher rank than you."); } PlayerInfo[targetid][pFactionRank] = rankid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET factionrank = %i WHERE uid = %i", rankid, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has set your rank to {00AA00}%s{33CCFF} (%i).", GetPlayerRPName(playerid), FactionRanks[PlayerInfo[playerid][pFaction]][rankid], rankid); SendClientMessageEx(playerid, COLOR_AQUA, "You have set %s's rank to {00AA00}%s{33CCFF} (%i).", GetPlayerRPName(targetid), FactionRanks[PlayerInfo[playerid][pFaction]][rankid], rankid); Log_Write("log_faction", "%s (uid: %i) has set %s's (uid: %i) rank in %s (id: %i) to %s (%i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], FactionInfo[PlayerInfo[playerid][pFaction]][fName], PlayerInfo[playerid][pFaction], FactionRanks[PlayerInfo[playerid][pFaction]][rankid], rankid); } else if(!strcmp(option, "roster", true)) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, lastlogin, factionrank FROM users WHERE faction = %i ORDER BY factionrank DESC", PlayerInfo[playerid][pFaction]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_FACTION_ROSTER, playerid); } else if(!strcmp(option, "online", true)) { cmd_fmembers(playerid, "\1"); } else if(!strcmp(option, "quit", true)) { if(isnull(param) || strcmp(param, "confirm", true) != 0) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /faction [quit] [confirm]"); } SendClientMessageEx(playerid, COLOR_AQUA, "You have quit %s as a {00AA00}%s{33CCFF} (%i).", FactionInfo[PlayerInfo[playerid][pFaction]][fName], FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], PlayerInfo[playerid][pFactionRank]); Log_Write("log_faction", "%s (uid: %i) has quit %s (id: %i) has rank %s (%i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], FactionInfo[PlayerInfo[playerid][pFaction]][fName], PlayerInfo[playerid][pFaction], FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], PlayerInfo[playerid][pFactionRank]); ResetPlayerWeaponsEx(playerid); SetPlayerSkin(playerid, 230); PlayerInfo[playerid][pFaction] = -1; PlayerInfo[playerid][pFactionRank] = 0; PlayerInfo[playerid][pDivision] = -1; PlayerInfo[playerid][pDuty] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET faction = -1, factionrank = 0, division = -1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "offlinekick", true)) { new username[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2); } if(sscanf(param, "s[24]", username)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /faction [offlinekick] [username]"); } if(IsPlayerOnline(username)) { return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use '/faction kick' instead."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid, faction, factionrank FROM users WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer, "OnPlayerOfflineKickFaction", "is", playerid, username); } return 1; } CMD:division(playerid, params[]) { new targetid, divisionid, option[10], param[32]; if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment."); } if(FactionInfo[PlayerInfo[playerid][pFaction]][fType] == FACTION_HITMAN) { return SendClientMessage(playerid, COLOR_GREY, "Hitman factions do not have access to the division system."); } if(sscanf(params, "s[10]S()[32]", option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /division [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Create, Remove, List, Assign, Kick"); return 1; } if(!strcmp(option, "create", true)) { if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2); } if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /division [create] [name]"); } for(new i = 0; i < MAX_FACTION_DIVISIONS; i ++) { if(isnull(FactionDivisions[PlayerInfo[playerid][pFaction]][i])) { strcpy(FactionDivisions[PlayerInfo[playerid][pFaction]][i], param, 32); SendClientMessageEx(playerid, COLOR_AQUA, "You have created division {FFA763}%s{33CCFF}. The ID of this division is %i.", param, i); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO divisions VALUES(%i, %i, '%e')", PlayerInfo[playerid][pFaction], i, param); mysql_tquery(connectionID, queryBuffer); return 1; } } SendClientMessageEx(playerid, COLOR_GREY, "Your faction can only have up to %i divisions.", MAX_FACTION_DIVISIONS); } else if(!strcmp(option, "remove", true)) { if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2); } if(sscanf(param, "i", divisionid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /division [remove] [divisionid]"); } if(!(0 <= divisionid < MAX_FACTION_DIVISIONS) || isnull(FactionDivisions[PlayerInfo[playerid][pFaction]][divisionid])) { return SendClientMessage(playerid, COLOR_GREY, "Invalid division ID."); } foreach(new i : Player) { if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction] && PlayerInfo[i][pDivision] == divisionid) { PlayerInfo[i][pDivision] = -1; SendClientMessage(i, COLOR_LIGHTRED, "The division you were apart of has been deleted by the faction owner."); } } SendClientMessageEx(playerid, COLOR_AQUA, "You have deleted division {F7A763}%s{33CCFF} (%i).", FactionDivisions[PlayerInfo[playerid][pFaction]][divisionid], divisionid); FactionDivisions[PlayerInfo[playerid][pFaction]][divisionid][0] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM divisions WHERE id = %i AND divisionid = %i", PlayerInfo[playerid][pFaction], divisionid); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET division = -1 WHERE faction = %i", PlayerInfo[playerid][pFaction]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "list", true)) { SendClientMessage(playerid, COLOR_GREEN, "|____ Divisions List ____|"); for(new i = 0; i < MAX_FACTION_DIVISIONS; i ++) { if(isnull(FactionDivisions[PlayerInfo[playerid][pFaction]][i])) { SendClientMessageEx(playerid, COLOR_GREY1, "ID: %i | Name: Empty Slot", i); } else { SendClientMessageEx(playerid, COLOR_GREY1, "ID: %i | Name: %s", i, FactionDivisions[PlayerInfo[playerid][pFaction]][i]); } } } else if(!strcmp(option, "assign", true)) { if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2); } if(sscanf(param, "ui", targetid, divisionid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /division [assign] [playerid] [divisionid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pFaction] != PlayerInfo[playerid][pFaction]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your faction."); } if(!(0 <= divisionid < MAX_FACTION_DIVISIONS) || isnull(FactionDivisions[PlayerInfo[playerid][pFaction]][divisionid])) { return SendClientMessage(playerid, COLOR_GREY, "Invalid division ID."); } if(PlayerInfo[targetid][pDivision] == divisionid) { return SendClientMessage(playerid, COLOR_GREY, "That player is already apart of that division."); } if(PlayerInfo[targetid][pDivision] >= 0) { return SendClientMessage(playerid, COLOR_GREY, "That player is already apart of another division."); } PlayerInfo[targetid][pDivision] = divisionid; SendClientMessageEx(targetid, COLOR_AQUA, "%s has assigned you to the {F7A763}%s{33CCFF} division.", GetPlayerRPName(playerid), FactionDivisions[PlayerInfo[playerid][pFaction]][divisionid]); SendClientMessageEx(playerid, COLOR_AQUA, "You have assigned %s to the {F7A763}%s{33CCFF} division.", GetPlayerRPName(targetid), FactionDivisions[PlayerInfo[playerid][pFaction]][divisionid]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET division = %i WHERE uid = %i", divisionid, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "kick", true)) { if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2); } if(sscanf(param, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /division [kick] [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pFaction] != PlayerInfo[playerid][pFaction]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your faction."); } if(PlayerInfo[targetid][pDivision] == -1) { return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of any division."); } SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed you from the {F7A763}%s{33CCFF} division.", GetPlayerRPName(playerid), FactionDivisions[PlayerInfo[playerid][pFaction]][PlayerInfo[targetid][pDivision]]); SendClientMessageEx(playerid, COLOR_AQUA, "You have removed %s from the {F7A763}%s{33CCFF} division.", GetPlayerRPName(targetid), FactionDivisions[PlayerInfo[playerid][pFaction]][PlayerInfo[targetid][pDivision]]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET division = -1 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[targetid][pDivision] = -1; } return 1; } CMD:cell(playerid, params[]) { for(new i = 0; i < sizeof(gPrisonCells); i ++) { if(IsPlayerInRangeOfDynamicObject(playerid, gPrisonCells[i], 2.0)) { if(!IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to open this cell."); } if(!Streamer_GetExtraInt(gPrisonCells[i], E_OBJECT_OPENED)) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their key to open the cell door.", GetPlayerRPName(playerid)); MoveDynamicObject(gPrisonCells[i], cellPositions[i][3], cellPositions[i][4], cellPositions[i][5], 2.0); Streamer_SetExtraInt(gPrisonCells[i], E_OBJECT_OPENED, 1); } else { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s uses their key to close the cell door.", GetPlayerRPName(playerid)); MoveDynamicObject(gPrisonCells[i], cellPositions[i][0], cellPositions[i][1], cellPositions[i][2], 2.0); Streamer_SetExtraInt(gPrisonCells[i], E_OBJECT_OPENED, 0); } return 1; } } SendClientMessage(playerid, COLOR_GREY, "You are not in range of any prison cells."); return 1; } CMD:door(playerid, params[]) { if(!DoorCheck(playerid)) { SendClientMessage(playerid, COLOR_GREY, "You are not in range of any door which you can open."); } return 1; } CMD:gate(playerid, params[]) { if(!GateCheck(playerid)) { SendClientMessage(playerid, COLOR_GREY, "You are not in range of any gates which you can open."); } return 1; } CMD:locker(playerid, params[]) { if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment."); } if(!IsPlayerInRangeOfPoint(playerid, 3.0, FactionInfo[PlayerInfo[playerid][pFaction]][fLockerX], FactionInfo[PlayerInfo[playerid][pFaction]][fLockerY], FactionInfo[PlayerInfo[playerid][pFaction]][fLockerZ])) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of your faction locker."); } switch(FactionInfo[PlayerInfo[playerid][pFaction]][fType]) { case FACTION_POLICE, FACTION_MEDIC, FACTION_FEDERAL: { ShowPlayerDialog(playerid, DIALOG_FACTIONLOCKER, DIALOG_STYLE_LIST, "Locker", "Toggle duty\nEquipment\nUniforms", "Select", "Cancel"); } case FACTION_GOVERNMENT, FACTION_NEWS: { ShowPlayerDialog(playerid, DIALOG_FACTIONLOCKER, DIALOG_STYLE_LIST, "Locker", "Equipment\nUniforms", "Select", "Cancel"); } case FACTION_HITMAN: { ShowPlayerDialog(playerid, DIALOG_FACTIONLOCKER, DIALOG_STYLE_LIST, "Locker", "Order weapons\nChange clothes", "Select", "Cancel"); } } return 1; } CMD:showbadge(playerid, params[]) { new targetid, factionid, rankid; if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment."); } if(GetFactionType(playerid) == FACTION_HITMAN) { if(sscanf(params, "uii", targetid, factionid, rankid)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /showbadge [playerid] [factionid] [rankid]"); SendClientMessage(playerid, COLOR_GREY3, "Use /factions for a list of factions to use with factionid parameter."); return 1; } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(!(0 <= factionid < MAX_FACTIONS) || FactionInfo[factionid][fType] == FACTION_NONE) { return SendClientMessage(playerid, COLOR_GREY, "Invalid faction."); } if(!(0 <= rankid < FactionInfo[factionid][fRankCount])) { return SendClientMessageEx(playerid, COLOR_GREY, "Invalid rank. Valid ranks for this faction range from 0 to %i.", FactionInfo[factionid][fRankCount] - 1); } if(FactionInfo[factionid][fType] == FACTION_HITMAN) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this faction for your fake badge."); } SendClientMessageEx(targetid, COLOR_WHITE, "** %s is rank %s (%i) in %s. **", GetPlayerRPName(playerid), FactionRanks[factionid][rankid], rankid, FactionInfo[factionid][fName]); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s shows their badge to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); } else { if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /showbadge [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } SendClientMessageEx(targetid, COLOR_WHITE, "** %s is rank %s (%i) in %s. **", GetPlayerRPName(playerid), FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], PlayerInfo[playerid][pFactionRank], FactionInfo[PlayerInfo[playerid][pFaction]][fName]); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s shows their badge to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); } return 1; } CMD:m(playerid, params[]) { return cmd_megaphone(playerid, params); } CMD:megaphone(playerid, params[]) { if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment."); } if(FactionInfo[PlayerInfo[playerid][pFaction]][fType] == FACTION_HITMAN) { return SendClientMessage(playerid, COLOR_GREY, "Your faction is not authorized to use the megaphone."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /(m)egaphone [text]"); } SendProximityMessage(playerid, 50.0, COLOR_YELLOW, "[%s %s:o< %s]", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params); return 1; } CMD:tazer(playerid, params[]) { if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_GOVERNMENT) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0 || PlayerInfo[playerid][pJoinedEvent] > 0 || PlayerInfo[playerid][pPaintball]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(!PlayerInfo[playerid][pTazer]) { PlayerInfo[playerid][pTazer] = 1; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s reaches for their tazer.", GetPlayerRPName(playerid)); GivePlayerWeaponEx(playerid, 23, true); SetPlayerArmedWeapon(playerid, 23); } else { PlayerInfo[playerid][pTazer] = 0; SetPlayerWeapons(playerid); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s puts their tazer back in their duty belt.", GetPlayerRPName(playerid)); if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { SetPlayerArmedWeapon(playerid, PlayerInfo[playerid][pWeapons][2]); } } return 1; } CMD:cuff(playerid, params[]) { new targetid; if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_GOVERNMENT) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /cuff [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't cuff yourself."); } if(PlayerInfo[targetid][pCuffed]) { return SendClientMessage(playerid, COLOR_GREY, "That player is already handcuffed."); } if(PlayerInfo[targetid][pTazedTime] == 0 && GetPlayerSpecialAction(targetid) != SPECIAL_ACTION_DUCK && GetPlayerAnimationIndex(playerid) != 1437) { return SendClientMessage(playerid, COLOR_GREY, "That player must either be tazed, crouched, or hands up."); } if(PlayerInfo[targetid][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "You can't handcuff an injured player."); } if(PlayerInfo[targetid][pCallLine] != INVALID_PLAYER_ID) { HangupCall(PlayerInfo[targetid][pCallLine], HANGUP_DROPPED); } PlayerInfo[targetid][pCuffed] = 1; SetPlayerSpecialAction(targetid, SPECIAL_ACTION_CUFFED); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s tightens a pair of handcuffs around %s's wrists.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); GameTextForPlayer(targetid, "~r~Cuffed", 3000, 3); return 1; } CMD:uncuff(playerid, params[]) { new targetid; if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_GOVERNMENT && PlayerInfo[playerid][pAdminDuty] == 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /uncuff [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid && PlayerInfo[playerid][pAdminDuty] == 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't uncuff yourself."); } if(!PlayerInfo[targetid][pCuffed]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not handcuffed."); } PlayerInfo[targetid][pCuffed] = 0; PlayerInfo[targetid][pDraggedBy] = INVALID_PLAYER_ID; SetPlayerSpecialAction(targetid, SPECIAL_ACTION_NONE); TogglePlayerControllable(targetid, 1); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s loosens the pair of handcuffs from around %s's wrists.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); GameTextForPlayer(targetid, "~g~Uncuffed", 3000, 3); return 1; } CMD:drag(playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /drag [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't drag yourself."); } if(!PlayerInfo[targetid][pCuffed]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not handcuffed."); } if(PlayerInfo[targetid][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "You can't drag an injured player."); } if(PlayerInfo[targetid][pDraggedBy] == INVALID_PLAYER_ID) { PlayerInfo[targetid][pDraggedBy] = playerid; TogglePlayerControllable(targetid, 0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s grabs onto %s and begins to drag them.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); } else { PlayerInfo[targetid][pDraggedBy] = INVALID_PLAYER_ID; TogglePlayerControllable(targetid, 1); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s stops dragging %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); } return 1; } CMD:detain(playerid, params[]) { new targetid, vehicleid = GetPlayerVehicleID(playerid); if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_GOVERNMENT) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /detain [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 15.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't detain yourself."); } if(!PlayerInfo[targetid][pCuffed]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not handcuffed."); } if(IsPlayerInAnyVehicle(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "That player is already in a vehicle."); } if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle."); } for(new i = (GetVehicleSeatCount(vehicleid) == 4) ? 2 : 1; i < GetVehicleSeatCount(vehicleid); i ++) { if(!IsSeatOccupied(vehicleid, i)) { PlayerInfo[targetid][pDraggedBy] = INVALID_PLAYER_ID; PlayerInfo[targetid][pVehicleCount] = 0; TogglePlayerControllable(targetid, 0); PutPlayerInVehicle(targetid, vehicleid, i); SetPlayerSpecialAction(targetid, SPECIAL_ACTION_NONE); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws %s into their vehicle.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); return 1; } } SendClientMessage(playerid, COLOR_GREY, "There are no unoccupied back seats left. Find another vehicle."); return 1; } CMD:charge(playerid, params[]) { new targetid, reason[128]; if(!IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if(sscanf(params, "us[128]", targetid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /charge [playerid] [reason]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't charge yourself."); } if(PlayerInfo[targetid][pWantedLevel] >= 6) { return SendClientMessage(playerid, COLOR_GREY, "This player is already at the maximum wanted level (6)."); } PlayerInfo[targetid][pWantedLevel]++; PlayerInfo[targetid][pCrimes]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET wantedlevel = %i, crimes = %i WHERE uid = %i", PlayerInfo[targetid][pWantedLevel], PlayerInfo[targetid][pCrimes], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO charges VALUES(null, %i, '%s', NOW(), '%e')", PlayerInfo[targetid][pID], GetPlayerNameEx(playerid), reason); mysql_tquery(connectionID, queryBuffer); SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_ROYALBLUE, "** HQ: %s %s has charged %s with {FF6347}%s{9999FF}. **", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), GetPlayerRPName(targetid), reason); SendClientMessageEx(targetid, COLOR_LIGHTRED, "** Officer %s has charged you with %s.", GetPlayerRPName(playerid), reason); Log_Write("log_faction", "%s (uid: %i) has charged %s (uid: %i) with %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], reason); return 1; } CMD:arrest(playerid, params[]) { new targetid, minutes, fine; if(!IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /arrest [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't arrest yourself."); } if(!PlayerInfo[targetid][pCuffed]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not handcuffed."); } if(!PlayerInfo[targetid][pWantedLevel]) { return SendClientMessage(playerid, COLOR_GREY, "You can't arrest a player with no active charges. /charge to add them."); } for(new i = 0; i < sizeof(arrestPoints); i ++) { if(IsPlayerInRangeOfPoint(playerid, 5.0, arrestPoints[i][0], arrestPoints[i][1], arrestPoints[i][2])) { minutes = PlayerInfo[targetid][pWantedLevel] * 15; fine = PlayerInfo[targetid][pWantedLevel] * 1000; if(PlayerInfo[targetid][pVIPPackage] == 1) { SendClientMessageEx(targetid, COLOR_VIP, "** VIP perk: Your %i minutes of jail time has been reduced by 50 percent to %i minutes.", minutes, percent(minutes, 50)); minutes = percent(minutes, 50); } else if(PlayerInfo[targetid][pVIPPackage] >= 2) { SendClientMessageEx(targetid, COLOR_VIP, "** VIP perk: Your %i minutes of jail time has been reduced by 75 percent to %i minutes.", minutes, percent(minutes, 75)); minutes = percent(minutes, 25); } PlayerInfo[targetid][pJailType] = 3; PlayerInfo[targetid][pJailTime] = minutes * 60; PlayerInfo[targetid][pWantedLevel] = 0; PlayerInfo[targetid][pArrested]++; ResetPlayerWeaponsEx(targetid); ResetPlayer(targetid); SetPlayerInJail(targetid); GivePlayerCash(targetid, -fine); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET wantedlevel = 0, arrested = %i WHERE uid = %i", PlayerInfo[targetid][pArrested], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM charges WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageToAllEx(COLOR_LIGHTRED, "<< %s %s has completed their arrest. %s has been sent to jail for %i days. >>", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), GetPlayerRPName(targetid), minutes); //SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_ROYALBLUE, "** HQ: %s %s has arrested %s for %i minutes, fine: $%i.", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), GetPlayerRPName(targetid), minutes, fine); SendClientMessageEx(targetid, COLOR_AQUA, "** You've been arrested for %i minutes, fine: $%i.", minutes, fine); Log_Write("log_faction", "%s (uid: %i) has arrested %s (uid: %i) for %i minutes, fine: $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], minutes, fine); return 1; } } SendClientMessage(playerid, COLOR_GREY, "You are not in range of any arrest points."); return 1; } CMD:wanted(playerid, params[]) { if(!IsLawEnforcement(playerid) && !PlayerHasJob(playerid, JOB_LAWYER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement or a lawyer."); } SendClientMessage(playerid, COLOR_GREEN, "|____ Wanted Players ____|"); foreach(new i : Player) { if(PlayerInfo[i][pWantedLevel] > 0) { SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s - Wanted Level: %i", i, GetPlayerRPName(i), PlayerInfo[i][pWantedLevel]); } } return 1; } CMD:find(playerid, params[]) { new targetid; if(!PlayerHasJob(playerid, JOB_DETECTIVE)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Detective."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /find [playerid]"); } if(PlayerInfo[playerid][pDetectiveCooldown] > 0) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to wait %i more seconds to use this command again.", PlayerInfo[playerid][pDetectiveCooldown]); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself."); } if(GetPlayerInterior(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "This player is an interior. You can't find them at the moment."); } if(PlayerInfo[targetid][pAdminDuty]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on an on duty administrator."); } switch(GetJobLevel(playerid, JOB_DETECTIVE)) { case 1: { PlayerInfo[playerid][pFindTime] = 6; PlayerInfo[playerid][pDetectiveCooldown] = 120; } case 2: { PlayerInfo[playerid][pFindTime] = 8; PlayerInfo[playerid][pDetectiveCooldown] = 90; } case 3: { PlayerInfo[playerid][pFindTime] = 10; PlayerInfo[playerid][pDetectiveCooldown] = 60; } case 4: { PlayerInfo[playerid][pFindTime] = 12; PlayerInfo[playerid][pDetectiveCooldown] = 30; } case 5: { PlayerInfo[playerid][pFindTime] = 14; PlayerInfo[playerid][pDetectiveCooldown] = 15; } } SetPlayerMarkerForPlayer(playerid, targetid, 0xFF0000FF); SendClientMessageEx(playerid, COLOR_WHITE, "** %s's location marked on your radar. %i seconds remain until the marker disappears.", GetPlayerRPName(targetid), PlayerInfo[playerid][pFindTime]); IncreaseJobSkill(playerid, JOB_DETECTIVE); PlayerInfo[playerid][pFindPlayer] = targetid; return 1; } CMD:frisk(playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /frisk [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(PlayerHasJob(playerid, JOB_BODYGUARD) || IsLawEnforcement(playerid)) { FriskPlayer(playerid, targetid); } else { PlayerInfo[targetid][pFriskOffer] = playerid; SendClientMessageEx(targetid, COLOR_AQUA, "** %s is attempting to frisk you for illegal items. (/accept frisk)", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have sent a frisk offer to %s.", GetPlayerRPName(targetid)); } return 1; } CMD:take(playerid, params[]) { new targetid, option[14]; if(!IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if(sscanf(params, "us[14]", targetid, option)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /take [playerid] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Weapons, Weed, Cocaine, Meth, Painkillers, CarLicense"); SendClientMessage(playerid, COLOR_GREY3, "List of options: HPAmmo, PoisonAmmo, FMJAmmo"); return 1; } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(!strcmp(option, "weapons", true)) { ResetPlayerWeaponsEx(targetid); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes away %s's weapons.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your weapons.", GetPlayerRPName(playerid)); Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) weapons.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); } else if(!strcmp(option, "weed", true)) { if(!PlayerInfo[targetid][pWeed]) { return SendClientMessage(playerid, COLOR_GREY, "That player has no weed on them."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes away %s's weed.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your %i grams of weed.", GetPlayerRPName(playerid), PlayerInfo[targetid][pWeed]); Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) %i grams of weed.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pWeed]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = 0 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[targetid][pWeed] = 0; } else if(!strcmp(option, "cocaine", true)) { if(!PlayerInfo[targetid][pCocaine]) { return SendClientMessage(playerid, COLOR_GREY, "That player has no cocaine on them."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes away %s's cocaine.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your %i grams of cocaine.", GetPlayerRPName(playerid), PlayerInfo[targetid][pWeed]); Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) %i grams of cocaine.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pCocaine]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = 0 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[targetid][pCocaine] = 0; } else if(!strcmp(option, "meth", true)) { if(!PlayerInfo[targetid][pMeth]) { return SendClientMessage(playerid, COLOR_GREY, "That player has no meth on them."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes away %s's meth.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your %i grams of meth.", GetPlayerRPName(playerid), PlayerInfo[targetid][pWeed]); Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) %i grams of meth.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pMeth]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = 0 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[targetid][pMeth] = 0; } else if(!strcmp(option, "painkillers", true)) { if(!PlayerInfo[targetid][pPainkillers]) { return SendClientMessage(playerid, COLOR_GREY, "That player has no painkillers on them."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes away %s's painkillers.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your %i painkillers.", GetPlayerRPName(playerid), PlayerInfo[targetid][pWeed]); Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) %i painkillers.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pPainkillers]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = 0 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[targetid][pPainkillers] = 0; } else if(!strcmp(option, "carlicense", true)) { if(!PlayerInfo[targetid][pCarLicense]) { return SendClientMessage(playerid, COLOR_GREY, "That player has no driving license on them."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes away %s's drivers license.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your drivers license.", GetPlayerRPName(playerid)); Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) drivers license.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET carlicense = 0 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); PlayerInfo[targetid][pCarLicense] = 0; } else if(!strcmp(option, "hpammo", true)) { if(!PlayerInfo[targetid][pHPAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "That player has no hollow point ammo on them."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes away %s's hollow point ammo.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your %i rounds of hollow point ammo.", GetPlayerRPName(playerid), PlayerInfo[targetid][pHPAmmo]); Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) %i hollow point ammunition.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pHPAmmo]); SetWeaponAmmo(targetid, AMMO_HP, 0); } else if(!strcmp(option, "poisonammo", true)) { if(!PlayerInfo[targetid][pPoisonAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "That player has no poison tip ammo on them."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes away %s's poison tip ammo.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your %i rounds of poison tip ammo.", GetPlayerRPName(playerid), PlayerInfo[targetid][pPoisonAmmo]); Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) %i poison tip ammunition.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pPoisonAmmo]); SetWeaponAmmo(targetid, AMMO_POISON, 0); } else if(!strcmp(option, "fmjammo", true)) { if(!PlayerInfo[targetid][pFMJAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "That player has no FMJ ammo on them."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes away %s's full metal jacket ammo.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "%s has taken your %i rounds of full metal jacket ammo.", GetPlayerRPName(playerid), PlayerInfo[targetid][pFMJAmmo]); Log_Write("log_faction", "%s (uid: %i) has taken %s's (uid: %i) %i FMJ ammunition.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pFMJAmmo]); SetWeaponAmmo(targetid, AMMO_FMJ, 0); } return 1; } CMD:ticket(playerid, params[]) { new targetid, amount, reason[128]; if(!IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if(sscanf(params, "uis[128]", targetid, amount, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /ticket [playerid] [amount] [reason]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't ticket yourself."); } if(!(1000 <= amount <= 10000)) { return SendClientMessage(playerid, COLOR_GREY, "The ticket amount must range between $1000 and $10000."); } PlayerInfo[targetid][pTicketOffer] = playerid; PlayerInfo[targetid][pTicketPrice] = amount; SendClientMessageEx(targetid, COLOR_AQUA, "** %s writes you a $%i ticket for %s. (/accept ticket)", GetPlayerRPName(playerid), amount, reason); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered a $%i ticket to %s for %s.", amount, GetPlayerRPName(targetid), reason); return 1; } CMD:gov(playerid, params[]) { if(PlayerInfo[playerid][pFaction] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any faction at the moment."); } if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gov [text]"); } switch(FactionInfo[PlayerInfo[playerid][pFaction]][fType]) { case FACTION_MEDIC: { SendClientMessageToAll(COLOR_GREY1, "|___________ Public Service Announcement ___________|"); SendClientMessageToAllEx(COLOR_DOCTOR, "** %s %s: %s", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params); } case FACTION_POLICE: { SendClientMessageToAll(COLOR_GREY1, "|___________ Public Service Announcement ___________|"); SendClientMessageToAllEx(COLOR_BLUE, "** %s %s: %s", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params); } case FACTION_GOVERNMENT: { SendClientMessageToAll(COLOR_GREY1, "|___________ Government News Announcement ___________|"); SendClientMessageToAllEx(COLOR_YELLOW2, "** %s %s: %s", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params); } case FACTION_FEDERAL: { SendClientMessageToAll(COLOR_GREY1, "|___________ Public Service Announcement ___________|"); SendClientMessageToAllEx(COLOR_ROYALBLUE, "** %s %s: %s", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), params); } default: { SendClientMessage(playerid, COLOR_GREY, "Your faction is not authorized to use this command."); } } return 1; } CMD:ram(playerid, params[]) { new id; if(!IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if((id = GetNearbyHouse(playerid)) >= 0) { if(!HouseInfo[id][hLocked]) { return SendClientMessage(playerid, COLOR_GREY, "This house is unlocked. You don't need to ram the door."); } HouseInfo[id][hLocked] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE houses SET locked = 0 WHERE id = %i", HouseInfo[id][hID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s rams down %s's house door.", GetPlayerRPName(playerid), HouseInfo[id][hOwner]); } else if((id = GetNearbyBusiness(playerid)) >= 0) { if(!BusinessInfo[id][bLocked]) { return SendClientMessage(playerid, COLOR_GREY, "This business is unlocked. You don't need to ram the door."); } BusinessInfo[id][bLocked] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE businesses SET locked = 0 WHERE id = %i", BusinessInfo[id][bID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s rams down %s's business door.", GetPlayerRPName(playerid), BusinessInfo[id][bOwner]); } else if((id = GetNearbyGarage(playerid)) >= 0) { if(!GarageInfo[id][gLocked]) { return SendClientMessage(playerid, COLOR_GREY, "This garage is unlocked. You don't need to ram the door."); } GarageInfo[id][gLocked] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE garages SET locked = 0 WHERE id = %i", GarageInfo[id][gID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s rams down %s's garage door.", GetPlayerRPName(playerid), GarageInfo[id][gOwner]); } else { SendClientMessage(playerid, COLOR_GREY, "You are not in range of any door which can be rammed."); } return 1; } CMD:deploy(playerid, params[]) { new type[12], type_id = -1, Float:x, Float:y, Float:z, Float:a; if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer."); } if(sscanf(params, "s[12]", type)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /deploy [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Spikestrip, Cone, Roadblock, Barrel, Flare"); return 1; } if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't deploy objects inside."); } GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); if(!strcmp(type, "spikestrip", true)) { type_id = DEPLOY_SPIKESTRIP; } else if(!strcmp(type, "cone", true)) { type_id = DEPLOY_CONE; } else if(!strcmp(type, "roadblock", true)) { type_id = DEPLOY_ROADBLOCK; } else if(!strcmp(type, "barrel", true)) { type_id = DEPLOY_BARREL; } else if(!strcmp(type, "flare", true)) { type_id = DEPLOY_FLARE; } if(type_id == -1) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } if(DeployObject(type_id, x, y, z, a) == -1) { return SendClientMessage(playerid, COLOR_GREY, "The deployable objects pool is full. Try deleting some first."); } if(IsLawEnforcement(playerid)) SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_ROYALBLUE, "** HQ: %s %s has deployed a %s in %s.", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), deployableItems[type_id], GetZoneName(x, y, z)); else SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_DOCTOR, "** HQ: %s %s has deployed a %s in %s.", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), deployableItems[type_id], GetZoneName(x, y, z)); return 1; } CMD:undeploy(playerid, params[]) { if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer."); } for(new i = 0; i < MAX_DEPLOYABLES; i ++) { if(DeployInfo[i][dExists]) { new Float:range; if(DeployInfo[i][dType] == DEPLOY_SPIKESTRIP || DeployInfo[i][dType] == DEPLOY_BARREL || DeployInfo[i][dType] == DEPLOY_FLARE || DeployInfo[i][dType] == DEPLOY_CONE) { range = 2.0; } else if(DeployInfo[i][dType] == DEPLOY_ROADBLOCK) { range = 5.0; } if(IsPlayerInRangeOfPoint(playerid, range, DeployInfo[i][dPosX], DeployInfo[i][dPosY], DeployInfo[i][dPosZ])) { SendFactionMessage(PlayerInfo[playerid][pFaction], (IsLawEnforcement(playerid)) ? (COLOR_ROYALBLUE) : (COLOR_DOCTOR), "** HQ: %s %s has removed a %s in %s.", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), deployableItems[DeployInfo[i][dType]], GetZoneName(DeployInfo[i][dPosX], DeployInfo[i][dPosY], DeployInfo[i][dPosZ])); DestroyDynamicObject(DeployInfo[i][dObject]); DeployInfo[i][dExists] = 0; DeployInfo[i][dType] = -1; return 1; } } } SendClientMessage(playerid, COLOR_GREY, "You are not in range of any deployed objects."); return 1; } CMD:bk(playerid, params[]) { return cmd_backup(playerid, params); } CMD:backup(playerid, params[]) { if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC && GetFactionType(playerid) != FACTION_GOVERNMENT) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer."); } if(!PlayerInfo[playerid][pBackup]) { PlayerInfo[playerid][pBackup] = 1; if(GetFactionType(playerid) != FACTION_MEDIC) SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_ROYALBLUE, "** HQ: %s %s is requesting backup in %s (marked on map).", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), GetPlayerZoneName(playerid)); else SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_DOCTOR, "** HQ: %s %s is requesting backup in %s (marked on map).", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), GetPlayerZoneName(playerid)); } else { PlayerInfo[playerid][pBackup] = 0; if(GetFactionType(playerid) != FACTION_MEDIC) SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_ROYALBLUE, "** HQ: %s %s has cancelled their backup request.", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid)); else SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_DOCTOR, "** HQ: %s %s has cancelled their backup request.", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid)); } foreach(new i : Player) { switch(GetFactionType(i)) { case FACTION_POLICE, FACTION_MEDIC, FACTION_FEDERAL, FACTION_GOVERNMENT: { if(PlayerInfo[playerid][pBackup]) SetPlayerMarkerForPlayer(i, playerid, 0xFF0000FF); else SetPlayerMarkerForPlayer(i, playerid, GetPlayerColor(playerid)); } } } return 1; } CMD:mdc(playerid, params[]) { if(!IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer."); } if((!IsPlayerInRangeOfPoint(playerid, 50.0, 1229.3544, -1311.8627, 796.7859)) && !(596 <= GetVehicleModel(GetPlayerVehicleID(playerid)) <= 599) && GetVehicleModel(GetPlayerVehicleID(playerid)) != 415 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 490) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside a police car or the police station."); } ShowPlayerDialog(playerid, DIALOG_MDC, DIALOG_STYLE_LIST, "Mobile data computer", "Wanted suspects\nPlayer lookup\nVehicle lookup", "Select", "Cancel"); return 1; } CMD:clearwanted(playerid, params[]) { new targetid; if(!IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /clearwanted [playerid]"); } if((!IsPlayerInRangeOfPoint(playerid, 50.0, 1229.3544, -1311.8627, 796.7859)) && !(596 <= GetVehicleModel(GetPlayerVehicleID(playerid)) <= 599)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside a police car or the police station."); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't clear yourself."); } if(!PlayerInfo[targetid][pWantedLevel]) { return SendClientMessage(playerid, COLOR_GREY, "That player has no active charges to clear."); } PlayerInfo[targetid][pWantedLevel] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM charges WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET wantedlevel = 0 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_WHITE, "** Your crimes were cleared by %s.", GetPlayerRPName(playerid)); SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_ROYALBLUE, "** HQ: %s %s has cleared %s's charges and wanted level.", FactionRanks[PlayerInfo[playerid][pFaction]][PlayerInfo[playerid][pFactionRank]], GetPlayerRPName(playerid), GetPlayerRPName(targetid)); return 1; } CMD:vticket(playerid, params[]) { new amount, vehicleid; if(!IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if(sscanf(params, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vticket [amount]"); } if((vehicleid = GetNearbyVehicle(playerid)) == INVALID_VEHICLE_ID) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle."); } if(!VehicleInfo[vehicleid][vOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle isn't owned by any particular person."); } if(!(1000 <= amount <= 5000)) { return SendClientMessage(playerid, COLOR_GREY, "The amount must range from $1000 to $5000."); } if(VehicleInfo[vehicleid][vTickets] >= 50000) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has over $50000 in tickets. You can't add anymore."); } VehicleInfo[vehicleid][vTickets] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET tickets = %i WHERE id = %i", VehicleInfo[vehicleid][vTickets], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s writes up a $%i ticket and attaches it to the %s.", GetPlayerRPName(playerid), amount, GetVehicleName(vehicleid)); return 1; } CMD:siren(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid), Float:x, Float:y, Float:z, Float:tmp; if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC && GetFactionType(playerid) != FACTION_GOVERNMENT) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer."); } if(!vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle."); } if(!VehicleHasWindows(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle cannot have a siren attached to it."); } if(!IsValidDynamicObject(vehicleSiren[vehicleid])) { GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_SIZE, z, z, z); GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_FRONTSEAT, x, y, tmp); vehicleSiren[vehicleid] = CreateDynamicObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(vehicleSiren[vehicleid], vehicleid, -x, y, z / 1.9, 0.0, 0.0, 0.0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s places a detachable siren on the roof of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); } else { DestroyDynamicObject(vehicleSiren[vehicleid]); vehicleSiren[vehicleid] = INVALID_OBJECT_ID; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s detaches the siren from the roof of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); } return 1; } CMD:vfrisk(playerid, params[]) { new vehicleid; if(!IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if((vehicleid = GetNearbyVehicle(playerid)) == INVALID_VEHICLE_ID) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle."); } if(!VehicleInfo[vehicleid][vOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle isn't owned by any particular person."); } new count; for(new i = 0; i < 3; i ++) { if(VehicleInfo[vehicleid][vWeapons][i]) { count++; } } SendClientMessage(playerid, COLOR_GREEN, "|_____ Trunk Balance _____|"); SendClientMessageEx(playerid, COLOR_GREY2, "Cash: $%i/$%i", VehicleInfo[vehicleid][vCash], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_CASH)); SendClientMessageEx(playerid, COLOR_GREY2, "Materials: %i/%i | Weapons: %i/%i", VehicleInfo[vehicleid][vMaterials], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_MATERIALS), count, GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEAPONS)); SendClientMessageEx(playerid, COLOR_GREY2, "Weed: %i/%i grams | Cocaine: %i/%i grams", VehicleInfo[vehicleid][vWeed], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_WEED), VehicleInfo[vehicleid][vCocaine], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_COCAINE)); SendClientMessageEx(playerid, COLOR_GREY2, "Meth: %i/%i grams | Painkillers: %i/%i pills", VehicleInfo[vehicleid][vMeth], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_METH), VehicleInfo[vehicleid][vPainkillers], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_PAINKILLERS)); SendClientMessage(playerid, COLOR_GREEN, "|_____ Trunk Ammunition_____|"); SendClientMessageEx(playerid, COLOR_GREY2, "HP Ammo: %i/%i | Poison Ammo: %i/%i", VehicleInfo[vehicleid][vHPAmmo], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_HPAMMO), VehicleInfo[vehicleid][vPoisonAmmo], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_POISONAMMO)); SendClientMessageEx(playerid, COLOR_GREY2, "FMJ Ammo: %i/%i", VehicleInfo[vehicleid][vFMJAmmo], GetVehicleStashCapacity(vehicleid, STASH_CAPACITY_FMJAMMO)); if(count > 0) { SendClientMessage(playerid, COLOR_GREEN, "|_____ Trunk Weapons _____|"); for(new i = 0; i < 3; i ++) { if(VehicleInfo[vehicleid][vWeapons][i]) { SendClientMessageEx(playerid, COLOR_GREY2, "[%i] Weapon: %s", i + 1, GetWeaponNameEx(VehicleInfo[vehicleid][vWeapons][i])); } } } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s prys open the trunk of the %s and takes a look inside.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); return 1; } CMD:vtake(playerid, params[]) { new vehicleid, option[14]; if(!IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } if(sscanf(params, "s[14]", option)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /vtake [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Weapons, Ammo, Weed, Cocaine, Meth, Painkillers"); return 1; } if((vehicleid = GetNearbyVehicle(playerid)) == INVALID_VEHICLE_ID) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any vehicle."); } if(!VehicleInfo[vehicleid][vOwnerID]) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle isn't owned by any particular person."); } if(!strcmp(option, "weapons", true)) { VehicleInfo[vehicleid][vWeapons][0] = 0; VehicleInfo[vehicleid][vWeapons][1] = 0; VehicleInfo[vehicleid][vWeapons][2] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weapon_1 = 0, weapon_2 = 0, weapon_3 = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes the weapons from the trunk of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); SendClientMessage(playerid, COLOR_AQUA, "You have taken the weapons from the trunk."); Log_Write("log_faction", "%s (uid: %i) has taken the weapons from %s's (uid: %i) %s trunk (id: %i).", GetPlayerRPName(playerid), PlayerInfo[playerid][pID], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vOwnerID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]); } else if(!strcmp(option, "ammo", true)) { VehicleInfo[vehicleid][vHPAmmo] = 0; VehicleInfo[vehicleid][vPoisonAmmo] = 0; VehicleInfo[vehicleid][vFMJAmmo] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET hpammo = 0, poisonammo = 0, fmjammo = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes the ammunition from the trunk of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); SendClientMessage(playerid, COLOR_AQUA, "You have taken the ammunition from the trunk."); Log_Write("log_faction", "%s (uid: %i) has taken the ammunition from %s's (uid: %i) %s trunk (id: %i).", GetPlayerRPName(playerid), PlayerInfo[playerid][pID], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vOwnerID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]); } else if(!strcmp(option, "weed", true)) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes the weed from the trunk of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have taken the %i grams of weed from the trunk.", VehicleInfo[vehicleid][vWeed]); Log_Write("log_faction", "%s (uid: %i) has taken the %i grams of weed from %s's (uid: %i) %s trunk (id: %i).", GetPlayerRPName(playerid), PlayerInfo[playerid][pID], VehicleInfo[vehicleid][vWeed], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vOwnerID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET weed = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); VehicleInfo[vehicleid][vWeed] = 0; } else if(!strcmp(option, "cocaine", true)) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes the cocaine from the trunk of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have taken the %i grams of cocaine from the trunk.", VehicleInfo[vehicleid][vCocaine]); Log_Write("log_faction", "%s (uid: %i) has taken the %i grams of cocaine from %s's (uid: %i) %s trunk (id: %i).", GetPlayerRPName(playerid), PlayerInfo[playerid][pID], VehicleInfo[vehicleid][vCocaine], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vOwnerID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET cocaine = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); VehicleInfo[vehicleid][vCocaine] = 0; } else if(!strcmp(option, "meth", true)) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes the meth from the trunk of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have taken the %i grams of meth from the trunk.", VehicleInfo[vehicleid][vMeth]); Log_Write("log_faction", "%s (uid: %i) has taken the %i grams of meth from %s's (uid: %i) %s trunk (id: %i).", GetPlayerRPName(playerid), PlayerInfo[playerid][pID], VehicleInfo[vehicleid][vMeth], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vOwnerID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET meth = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); VehicleInfo[vehicleid][vMeth] = 0; } else if(!strcmp(option, "painkillers", true)) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s takes the painkillers from the trunk of the %s.", GetPlayerRPName(playerid), GetVehicleName(vehicleid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have taken the %i painkillers from the trunk.", VehicleInfo[vehicleid][vPainkillers]); Log_Write("log_faction", "%s (uid: %i) has taken the %i painkillers from %s's (uid: %i) %s trunk (id: %i).", GetPlayerRPName(playerid), PlayerInfo[playerid][pID], VehicleInfo[vehicleid][vPainkillers], VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vOwnerID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET painkillers = 0 WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); VehicleInfo[vehicleid][vPainkillers] = 0; } return 1; } CMD:firstaid(playerid, params[]) { new targetid; if(GetFactionType(playerid) != FACTION_MEDIC) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /firstaid [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't heal yourself."); } if(PlayerInfo[targetid][pFirstAid]) { return SendClientMessage(playerid, COLOR_GREY, "This player already has first aid effects."); } PlayerInfo[targetid][pFirstAid] = 1; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s administers first aid to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "You have received first aid from %s. Your health will now regenerate until full.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have administered first aid to %s.", GetPlayerRPName(targetid)); return 1; } CMD:stretcher(playerid, params[]) { new targetid, vehicleid = GetPlayerVehicleID(playerid); if(GetFactionType(playerid) != FACTION_MEDIC) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /stretcher [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 15.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself."); } if(!PlayerInfo[targetid][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not injured."); } if(IsPlayerInAnyVehicle(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "That player is already in a vehicle."); } if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) != 416 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 490) { return SendClientMessage(playerid, COLOR_GREY, "You need to be driving an ambulance."); } for(new i = 2; i < GetVehicleSeatCount(vehicleid); i ++) { if(!IsSeatOccupied(vehicleid, i)) { PlayerInfo[targetid][pVehicleCount] = 0; ClearAnimations(targetid, 1); ApplyAnimation(targetid, "CARRY", "crry_prtial", 4.1, 0, 0, 0, 0, 0, 1); TogglePlayerControllable(targetid, 0); PutPlayerInVehicle(targetid, vehicleid, i); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s places %s on a stretcher in the Ambulance.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); return 1; } } SendClientMessage(playerid, COLOR_GREY, "There are no unoccupied seats left. Find another vehicle."); return 1; } CMD:deliverpatient(playerid, params[]) { new targetid; if(GetFactionType(playerid) != FACTION_MEDIC) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /deliverpatient [playerid]"); } if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2007.6256, -1410.2455, 16.9922) && !IsPlayerInRangeOfPoint(playerid, 5.0, 1147.3577, -1345.3729, 13.6328)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any delivery points at the hospital."); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 7.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself."); } if(!PlayerInfo[targetid][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not injured."); } PlayerInfo[targetid][pInjured] = 0; PlayerInfo[targetid][pDelivered] = 1; SetPlayerInHospital(targetid, 5); AddToPaycheck(playerid, 2000); SendClientMessageEx(targetid, COLOR_AQUA, "%s delivered you to the hospital.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have delivered %s to the hospital and earned {00AA00}$2000{33CCFF} on your paycheck.", GetPlayerRPName(targetid)); return 1; } CMD:injuries(playerid, params[]) { new targetid; if(GetFactionType(playerid) != FACTION_MEDIC) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /injuries [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT weaponid, timestamp FROM shots WHERE hitid = %i AND hittype = 1 ORDER BY id DESC LIMIT 20", targetid); mysql_tquery(connectionID, queryBuffer, "OnPlayerListInjuries", "ii", playerid, targetid); return 1; } CMD:mrevive(playerid, params[]) { new targetid; if(GetFactionType(playerid) != FACTION_MEDIC) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /mrevive [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't revive yourself."); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(!PlayerInfo[targetid][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is not injured."); } PlayerInfo[targetid][pInjured] = 0; SetPlayerHealth(targetid, 20.0); ClearAnimations(targetid, 1); SendClientMessageEx(targetid, COLOR_AQUA, "Medic %s has revived you.", GetPlayerRPName(playerid)); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s was revived by medic %s.", GetPlayerRPName(targetid), GetPlayerRPName(playerid)); return 1; } CMD:news(playerid, params[]) { if(GetFactionType(playerid) != FACTION_NEWS) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a news reporter."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /news [text]"); } if(PlayerInfo[playerid][pToggleNews]) { return SendClientMessage(playerid, COLOR_GREY, "You can't make news broadcasts as you have it toggled."); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 488 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 582) { return SendClientMessage(playerid, COLOR_GREY, "You can only use this command from within a news van or news chopper."); } foreach(new i : Player) { if(!PlayerInfo[i][pToggleNews]) { SendClientMessageToAllEx(COLOR_ORANGE, "News Reporter %s: %s", GetPlayerRPName(playerid), params); } } return 1; } CMD:live(playerid, params[]) { new targetid; if(GetFactionType(playerid) != FACTION_NEWS) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a news reporter."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /live [playerid]"); } if(PlayerInfo[playerid][pLiveMuted]) { return SendClientMessage(playerid, COLOR_GREY, "You are banned from live interviews. Ask a higher rank to lift your ban."); } if(PlayerInfo[playerid][pLiveBroadcast] != INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You are already doing a live interview. /endlive to finish it."); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't interview yourself."); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(PlayerInfo[targetid][pLiveMuted]) { return SendClientMessage(playerid, COLOR_GREY, "That player is banned from live interviews."); } if(PlayerInfo[targetid][pCallLine] != INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "That player is on a phone call at the moment."); } PlayerInfo[targetid][pLiveOffer] = playerid; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered you a live interview. (/accept live)", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered %s a live interview.", GetPlayerRPName(targetid)); return 1; } CMD:endlive(playerid, params[]) { if(GetFactionType(playerid) != FACTION_NEWS) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a news reporter."); } if(PlayerInfo[playerid][pLiveBroadcast] == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You are currently not doing a live interview."); } SendClientMessage(playerid, COLOR_AQUA, "You have ended the live interview."); SendClientMessageEx(PlayerInfo[playerid][pLiveBroadcast], COLOR_AQUA, "%s has ended the live interview.", GetPlayerRPName(playerid)); PlayerInfo[PlayerInfo[playerid][pLiveBroadcast]][pLiveBroadcast] = INVALID_PLAYER_ID; PlayerInfo[playerid][pLiveBroadcast] = INVALID_PLAYER_ID; return 1; } CMD:liveban(playerid, params[]) { new targetid; if(GetFactionType(playerid) != FACTION_NEWS) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a news reporter."); } if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 2); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /liveban [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself."); } if(!PlayerInfo[targetid][pLiveMuted]) { if(PlayerInfo[targetid][pLiveBroadcast] != INVALID_PLAYER_ID) { PlayerInfo[PlayerInfo[targetid][pLiveBroadcast]][pLiveBroadcast] = INVALID_PLAYER_ID; PlayerInfo[targetid][pLiveBroadcast] = INVALID_PLAYER_ID; } PlayerInfo[targetid][pLiveMuted] = 1; SendClientMessageEx(targetid, COLOR_LIGHTRED, "%s has banned you from live interviews.", GetPlayerNameEx(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have banned %s from live interviews.", GetPlayerNameEx(targetid)); } else { PlayerInfo[targetid][pLiveMuted] = 0; SendClientMessageEx(targetid, COLOR_YELLOW, "%s has unbanned you from live interviews.", GetPlayerNameEx(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have unbanned %s from live interviews.", GetPlayerNameEx(targetid)); } return 1; } CMD:settax(playerid, params[]) { new amount; if(GetFactionType(playerid) != FACTION_GOVERNMENT) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of government."); } if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 1) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 1); } if(sscanf(params, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /settax [rate]"); } if(!(10 <= amount <= 50)) { return SendClientMessage(playerid, COLOR_GREY, "The tax percentage must range from 10 to 50."); } gTax = amount; SaveServerInfo(); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s has adjusted the income tax rate to %i percent.", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the income tax rate to %i percent.", amount); Log_Write("log_faction", "%s (uid: %i) set the income tax rate to %i percent.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); return 1; } CMD:factionpay(playerid, params[]) { new factionid; if(GetFactionType(playerid) != FACTION_GOVERNMENT) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of government."); } if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 1) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 1); } if(sscanf(params, "i", factionid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /factionpay [factionid] (Use /factions for list.)"); } if(!(0 <= factionid < MAX_FACTIONS) || !FactionInfo[factionid][fType]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid faction."); } if(FactionInfo[factionid][fType] == FACTION_HITMAN) { return SendClientMessage(playerid, COLOR_GREY, "You can't set the paychecks for hitman factions."); } PlayerInfo[playerid][pFactionEdit] = factionid; ShowDialogToPlayer(playerid, DIALOG_FACTIONPAY1); return 1; } CMD:taxwithdraw(playerid, params[]) { new amount, reason[64]; if(GetFactionType(playerid) != FACTION_GOVERNMENT) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of government."); } if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 1) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 1); } if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1667.4260, -972.6691, 683.6873)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank."); } if(sscanf(params, "is[64]", amount, reason)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage] /taxwithdraw [amount] [reason] ($%i available)", gVault); } if(amount < 1 || amount > gVault) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } AddToTaxVault(-amount); GivePlayerCash(playerid, amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You have withdrawn $%i from the tax vault. The new balance is $%i.", amount, gVault); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s has withdrawn $%i from the tax vault, reason: %s", GetPlayerRPName(playerid), amount, reason); Log_Write("log_faction", "%s (uid: %i) has withdrawn $%i from the tax vault, reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount, reason); return 1; } CMD:taxdeposit(playerid, params[]) { new amount; if(GetFactionType(playerid) != FACTION_GOVERNMENT) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of government."); } if(PlayerInfo[playerid][pFactionRank] < FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 1) { return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank %i+ to use this command.", FactionInfo[PlayerInfo[playerid][pFaction]][fRankCount] - 1); } if(!IsPlayerInRangeOfPoint(playerid, 10.0, 2312.5769, -8.0526, 26.7422)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank."); } if(sscanf(params, "i", amount)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage] /taxdeposit [amount] ($%i available)", gVault); } if(amount < 1 || amount > PlayerInfo[playerid][pCash]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } AddToTaxVault(amount); GivePlayerCash(playerid, -amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You have deposited $%i in the tax vault. The new balance is $%i.", amount, gVault); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s has deposited $%i in the tax vault.", GetPlayerRPName(playerid), amount); Log_Write("log_faction", "%s (uid: %i) has deposited $%i in the tax vault.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], amount); return 1; } CMD:contract(playerid, params[]) { new targetid, amount, reason[64]; if(sscanf(params, "iis[64]", targetid, amount, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /contract [playerid] [amount] [reason]"); } if(PlayerInfo[playerid][pLevel] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You must be at least level 5+ to contract players."); } if(GetFactionType(playerid) == FACTION_HITMAN) { return SendClientMessage(playerid, COLOR_GREY, "You are a hitman and therefore can't contract other players."); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't contract yourself."); } if(PlayerInfo[targetid][pLevel] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You can only contract level 5+ players."); } if(!(1000 <= amount <= 10000)) { return SendClientMessage(playerid, COLOR_GREY, "The amount must range from $1000 to $10000."); } if(PlayerInfo[playerid][pCash] < amount) { return SendClientMessage(playerid, COLOR_GREY, "You don't have that much money."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } foreach(new i : Player) { if(GetFactionType(i) == FACTION_HITMAN) { SendClientMessageEx(i, COLOR_YELLOW, "** %s has contracted %s for $%i, reason: %s [/contracts]", GetPlayerRPName(playerid), GetPlayerRPName(targetid), amount, reason); } } GivePlayerCash(playerid, -amount); PlayerInfo[targetid][pContracted] += amount; GetPlayerName(playerid, PlayerInfo[targetid][pContractBy], MAX_PLAYER_NAME); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET contracted = %i, contractby = '%e' WHERE uid = %i", PlayerInfo[targetid][pContracted], PlayerInfo[targetid][pContractBy], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have placed a contract on %s for $%i, reason: %s", GetPlayerRPName(targetid), amount, reason); SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s placed a contract on %s for $%i, reason: %s", GetPlayerRPName(playerid), GetPlayerRPName(targetid), amount, reason); Log_Write("log_contracts", "%s (uid: %i) placed a contract on %s (uid: %i) for $%i, reason: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], amount, reason); return 1; } CMD:contracts(playerid, params[]) { if(GetFactionType(playerid) != FACTION_HITMAN && PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } SendClientMessage(playerid, COLOR_GREEN, "|______ Pending Contracts ______|"); foreach(new i : Player) { if(PlayerInfo[i][pContracted] > 0) { SendClientMessageEx(playerid, COLOR_GREY2, "ID: %i | Target: %s | Bounty price: $%i | Last contracter: %s", i, GetPlayerRPName(i), PlayerInfo[i][pContracted], PlayerInfo[i][pContractBy]); } } SendClientMessage(playerid, COLOR_YELLOW, "** Use /takehit [id] or /denyhit [id] to handle contracts."); return 1; } CMD:denyhit(playerid, params[]) { new targetid; if(GetFactionType(playerid) != FACTION_HITMAN && PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /denyhit [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pContracted]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't been contracted."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has cancelled the contract on %s for $%i.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), PlayerInfo[targetid][pContracted]); if(GetFactionType(playerid) == FACTION_HITMAN) { SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_YELLOW, "** Hitman %s has cancelled the contract on %s for $%i. **", GetPlayerRPName(playerid), GetPlayerRPName(targetid), PlayerInfo[targetid][pContracted]); } PlayerInfo[targetid][pContracted] = 0; strcpy(PlayerInfo[targetid][pContractBy], "No-one", MAX_PLAYER_NAME); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET contracted = 0, contractby = 'No-one' WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); return 1; } CMD:takehit(playerid, params[]) { new targetid; if(GetFactionType(playerid) != FACTION_HITMAN) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /takehit [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself."); } if(!PlayerInfo[targetid][pContracted]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't been contracted."); } PlayerInfo[playerid][pContractTaken] = targetid; SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_YELLOW, "** Hitman %s has accepted the contract to kill %s for $%i. **", GetPlayerRPName(playerid), GetPlayerRPName(targetid), PlayerInfo[targetid][pContracted]); SendClientMessageEx(playerid, COLOR_AQUA, "You have taken the hit. You will receive $%i once you have assassinated {00AA00}%s{33CCFF}.", PlayerInfo[targetid][pContracted], GetPlayerRPName(targetid)); return 1; } CMD:profile(playerid, params[]) { new targetid; if(GetFactionType(playerid) != FACTION_HITMAN) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /profile [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } SendClientMessageEx(playerid, COLOR_GREEN, "|____ %s ____|", GetPlayerRPName(targetid)); SendClientMessageEx(playerid, COLOR_GREY2, "Gender: %s", (PlayerInfo[targetid][pGender] == 2) ? ("Female") : ("Male")); SendClientMessageEx(playerid, COLOR_GREY2, "Age: %i years old", PlayerInfo[targetid][pAge]); if(PlayerInfo[targetid][pFaction] != -1) { SendClientMessageEx(playerid, COLOR_GREY2, "Faction: %s", FactionInfo[PlayerInfo[targetid][pFaction]][fName]); SendClientMessageEx(playerid, COLOR_GREY2, "Rank: %s (%i)", FactionRanks[PlayerInfo[targetid][pFaction]][PlayerInfo[targetid][pFactionRank]], PlayerInfo[targetid][pFactionRank]); } else { SendClientMessageEx(playerid, COLOR_GREY2, "Faction: None"); } if(PlayerInfo[targetid][pContracted] > 0) { SendClientMessageEx(playerid, COLOR_GREY2, "Contract: $%i", PlayerInfo[targetid][pContracted]); SendClientMessageEx(playerid, COLOR_GREY2, "Last Contracter: %s", PlayerInfo[targetid][pContractBy]); } SendClientMessageEx(playerid, COLOR_GREY2, "Completed Hits: %i", PlayerInfo[targetid][pCompletedHits]); SendClientMessageEx(playerid, COLOR_GREY2, "Failed Hits: %i", PlayerInfo[targetid][pFailedHits]); return 1; } CMD:passport(playerid, params[]) { new name[24], level, skinid; if(GetFactionType(playerid) != FACTION_HITMAN && GetFactionType(playerid) != FACTION_FEDERAL) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman or federal agent."); } if(sscanf(params, "s[24]ii", name, level, skinid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /passport [name] [level] [skinid]"); } if(!(3 <= strlen(name) <= 20)) { return SendClientMessage(playerid, COLOR_GREY, "Your name must range from 3 to 20 characters."); } if(strfind(name, "_") == -1) { return SendClientMessage(playerid, COLOR_GREY, "Your name needs to contain at least one underscore."); } if(!IsValidName(name)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid characters. Your name may only contain letters and underscores."); } if(PlayerInfo[playerid][pAdminDuty]) { return SendClientMessage(playerid, COLOR_GREY, "You aren't allowed to change your name while on admin duty,"); } if(!(1 <= level <= 10)) { return SendClientMessage(playerid, COLOR_GREY, "Your level must range from 1 to 10."); } if(!(0 <= skinid <= 311)) { return SendClientMessage(playerid, COLOR_GREY, "The skin ID must range from 0 to 311."); } PlayerInfo[playerid][pFreeNamechange] = 1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM users WHERE username = '%e'", name); mysql_tquery(connectionID, queryBuffer, "OnHitmanPassport", "isii", playerid, name, level, skinid); return 1; } CMD:plantbomb(playerid, params[]) { if(GetFactionType(playerid) != FACTION_HITMAN) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman."); } if(!PlayerInfo[playerid][pBombs]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have any bombs."); } if(PlayerInfo[playerid][pPlantedBomb]) { return SendClientMessage(playerid, COLOR_GREY, "You have planted a bomb already."); } if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't plant a bomb inside."); } GetPlayerPos(playerid, PlayerInfo[playerid][pBombX], PlayerInfo[playerid][pBombY], PlayerInfo[playerid][pBombZ]); ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 0, 0, 0, 0, 0); PlayerInfo[playerid][pPlantedBomb] = 1; PlayerInfo[playerid][pBombObject] = CreateDynamicObject(19602, PlayerInfo[playerid][pBombX], PlayerInfo[playerid][pBombY], PlayerInfo[playerid][pBombZ] - 1.0, 0.0, 0.0, 0.0); PlayerInfo[playerid][pBombs]--; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET bombs = %i WHERE uid = %i", PlayerInfo[playerid][pBombs], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_WHITE, "** Bomb has been planted, use /detonate to make it go BOOM!"); return 1; } CMD:pickupbomb(playerid, params[]) { if(GetFactionType(playerid) != FACTION_HITMAN) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a hitman."); } if(!PlayerInfo[playerid][pPlantedBomb]) { return SendClientMessage(playerid, COLOR_GREY, "You haven't planted a bomb which you can pickup."); } if(!IsPlayerInRangeOfPoint(playerid, 3.0, PlayerInfo[playerid][pBombX], PlayerInfo[playerid][pBombY], PlayerInfo[playerid][pBombZ])) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of your planted bomb."); } ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 0, 0, 0, 0, 0); DestroyDynamicObject(PlayerInfo[playerid][pBombObject]); PlayerInfo[playerid][pBombObject] = INVALID_OBJECT_ID; PlayerInfo[playerid][pPlantedBomb] = 0; PlayerInfo[playerid][pBombs]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET bombs = %i WHERE uid = %i", PlayerInfo[playerid][pBombs], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessage(playerid, COLOR_WHITE, "** You have picked up your bomb."); return 1; } CMD:detonate(playerid, params[]) { if(!PlayerInfo[playerid][pPlantedBomb]) { return SendClientMessage(playerid, COLOR_GREY, "You haven't planted a bomb which you can detonate."); } if(!IsPlayerInRangeOfPoint(playerid, 50.0, PlayerInfo[playerid][pBombX], PlayerInfo[playerid][pBombY], PlayerInfo[playerid][pBombZ])) { return SendClientMessage(playerid, COLOR_GREY, "You are too far away from your planted bomb."); } CreateExplosion(PlayerInfo[playerid][pBombX], PlayerInfo[playerid][pBombY], PlayerInfo[playerid][pBombZ], 11, 10.0); DestroyDynamicObject(PlayerInfo[playerid][pBombObject]); if(PlayerInfo[playerid][pContractTaken] != INVALID_PLAYER_ID && IsPlayerInRangeOfPoint(PlayerInfo[playerid][pContractTaken], 5.0, PlayerInfo[playerid][pBombX], PlayerInfo[playerid][pBombY], PlayerInfo[playerid][pBombZ])) { SetPlayerHealth(PlayerInfo[playerid][pContractTaken], 0.0); HandleContract(PlayerInfo[playerid][pContractTaken], playerid); } PlayerInfo[playerid][pBombObject] = INVALID_OBJECT_ID; PlayerInfo[playerid][pPlantedBomb] = 0; SendClientMessage(playerid, COLOR_WHITE, "** You have detonated your bomb!"); return 1; } CMD:saveaccounts(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } foreach(new i : Player) { SavePlayerVariables(i); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has saved all player accounts.", GetPlayerRPName(playerid)); return 1; } CMD:adestroyboombox(playerid, params[]) { new boomboxid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if((boomboxid = GetNearbyBoombox(playerid)) == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "There is no boombox in range."); } SendClientMessageEx(playerid, COLOR_AQUA, "You have destroyed {00AA00}%s{33CCFF}'s boombox.", GetPlayerRPName(boomboxid)); DestroyBoombox(boomboxid); return 1; } CMD:setbanktimer(playerid, params[]) { new hours; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", hours)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setbanktimer [hours]"); } if(hours < 0) { return SendClientMessage(playerid, COLOR_GREY, "Hours can't be below 0."); } RobberyInfo[rTime] = hours; SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reset the bank robbery timer to %i hours.", GetPlayerRPName(playerid), hours); return 1; } CMD:resetrobbery(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } ResetRobbery(); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reset the active bank robbery.", GetPlayerRPName(playerid)); return 1; } CMD:givepayday(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /givepayday [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } SendPaycheck(targetid); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has forced a payday for %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); return 1; } CMD:givepveh(playerid, params[]) { new model[20], modelid, targetid, color1, color2, Float:x, Float:y, Float:z, Float:a; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "us[20]ii", targetid, model, color1, color2)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /givepveh [playerid] [modelid/name] [color1] [color2]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if((modelid = GetVehicleModelByName(model)) == 0) { return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle model."); } if(!(0 <= color1 <= 255) || !(0 <= color2 <= 255)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid color. Valid colors range from 0 to 255."); } GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO vehicles (ownerid, owner, modelid, pos_x, pos_y, pos_z, pos_a, color1, color2) VALUES(%i, '%s', %i, '%f', '%f', '%f', '%f', %i, %i)", PlayerInfo[targetid][pID], GetPlayerNameEx(targetid), modelid, x + 2.0 * floatsin(-a, degrees), y + 2.0 * floatcos(-a, degrees), z, a, color1, color2); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has given you your own {00AA00}%s{33CCFF}. /spawncar to spawn it.", GetPlayerRPName(playerid), vehicleNames[modelid - 400]); SendClientMessageEx(playerid, COLOR_AQUA, "You have given %s their own {00AA00}%s{33CCFF}.", GetPlayerRPName(targetid), vehicleNames[modelid - 400]); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given %s their own %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), vehicleNames[modelid - 400]); Log_Write("log_admin", "%s (uid: %i) has given %s (uid: %i) their own %s.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], vehicleNames[modelid - 400]); return 1; } CMD:givedoublexp(playerid, params[]) { new targetid, hours; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "ui", targetid, hours)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /givedoublexp [playerid] [hours]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(hours < 1 && PlayerInfo[targetid][pDoubleXP] - hours < 0) { return SendClientMessage(playerid, COLOR_GREY, "That player can't have under 0 hours of double XP."); } PlayerInfo[targetid][pDoubleXP] += hours; SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has given %i hours of double XP to %s.", GetPlayerRPName(playerid), hours, GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_YELLOW, "%s has given you %i hours of double XP.", GetPlayerRPName(playerid), hours); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET doublexp = %i WHERE uid = %i", PlayerInfo[targetid][pDoubleXP], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); return 1; } CMD:randomfire(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(IsFireActive()) { return SendClientMessage(playerid, COLOR_GREY, "There is a fire active already. /killfire to kill it!"); } new Float:x, Float:y, Float:z; RandomFire(0); GetDynamicObjectPos(gFireObjects[0], x, y, z); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has started a random fire in %s.", GetPlayerRPName(playerid), GetZoneName(x, y, z)); return 1; } CMD:killfire(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!IsFireActive()) { return SendClientMessage(playerid, COLOR_GREY, "There is currently no fire active."); } for(new i = 0; i < MAX_FIRES; i ++) { DestroyDynamicObject(gFireObjects[i]); gFireObjects[i] = INVALID_OBJECT_ID; gFireHealth[i] = 0.0; } gFires = 0; SendClientMessage(playerid, COLOR_GREY, "Active fire killed."); return 1; } CMD:spawnfire(playerid, params[]) { new Float:px, Float:py, Float:pz; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't create fires indoors."); } for(new x = 0; x < MAX_FIRES; x ++) { if(gFireObjects[x] == INVALID_OBJECT_ID) { GetPlayerPos(playerid, px, py, pz); if(!IsFireActive()) { foreach(new i : Player) { if(GetFactionType(i) == FACTION_MEDIC) { PlayerInfo[i][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(i, px, py, pz, 3.0); SendClientMessageEx(i, COLOR_DOCTOR, "** All units, a fire has been reported in %s. Please head to the beacon on your map. **", GetZoneName(px, py, pz)); } } } gFireObjects[x] = CreateDynamicObject(18691, px, py, pz - 2.4, 0.0, 0.0, 0.0, .streamdistance = 50.0); gFireHealth[x] = 50.0; gFires++; return SendClientMessage(playerid, COLOR_GREY, "Fire created!"); } } SendClientMessageEx(playerid, COLOR_GREY, "You can't create anymore fires. The limit is %i fires.", MAX_FIRES); return 1; } CMD:number(playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /number [playerid]"); } if(!PlayerInfo[playerid][pPhonebook]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a phonebook."); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } SendClientMessageEx(playerid, COLOR_GREY2, "Name: %s, Ph: %i", GetPlayerRPName(targetid), PlayerInfo[targetid][pPhone]); return 1; } /*CMD:phonebook(playerid, params[]) { new option[10], param[32]; if(!PlayerInfo[playerid][pPhonebook]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you don't have a phonebook."); } if(sscanf(params, "s[10]S()[32]", option, param)) { if(GetFactionType(playerid) == FACTION_NEWS) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /phonebook [view | add | remove]"); } else { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /phonebook [view]"); SendClientMessage(playerid, COLOR_GREY3, "Want your number shown in the phonebook? Ask the news team to add it to the directory."); } return 1; } if(!strcmp(option, "view", true)) { PlayerInfo[playerid][pPage] = 1; ShowDialogToPlayer(playerid, DIALOG_PHONEBOOK); } else if(!strcmp(option, "add", true)) { new number, name[24]; if(GetFactionType(playerid) != FACTION_NEWS) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a news reporter."); } if(sscanf(param, "is[24]", number, name)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /phonebook [add] [number] [name]"); } if(number == 0 || number == 911) { return SendClientMessage(playerid, COLOR_GREY, "Invalid number."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT number FROM phonebook WHERE number = %i", number); mysql_tquery(connectionID, queryBuffer, "OnPlayerAddToPhonebook", "iis", playerid, number, name); } else if(!strcmp(option, "remove", true)) { new number; if(GetFactionType(playerid) != FACTION_NEWS) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a news reporter."); } if(sscanf(param, "i", number)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /phonebook [remove] [number]"); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT name FROM phonebook WHERE number = %i", number); mysql_tquery(connectionID, queryBuffer, "OnPlayerRemoveFromPhonebook", "ii", playerid, number); } return 1; }*/ CMD:boombox(playerid, params[]) { new option[10], param[128]; if(!PlayerInfo[playerid][pBoombox]) { return SendClientMessage(playerid, COLOR_GREY, "You have no boombox and therefore can't use this command."); } if(sscanf(params, "s[10]S()[128]", option, param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /boombox [place | pickup | play]"); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command from within the vehicle."); } if(!strcmp(option, "place", true)) { if(PlayerInfo[playerid][pBoomboxPlaced]) { return SendClientMessage(playerid, COLOR_GREY, "You have placed down a boombox already."); } if(GetNearbyBoombox(playerid) != INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "There is already a boombox nearby. Place this one somewhere else."); } new Float:x, Float:y, Float:z, Float:a, string[128]; format(string, sizeof(string), "Boombox placed by:\n{00AA00}%s{F7A763}\n/boombox for more options.", GetPlayerNameEx(playerid)); GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); PlayerInfo[playerid][pBoomboxPlaced] = 1; PlayerInfo[playerid][pBoomboxObject] = CreateDynamicObject(2102, x, y, z - 1.0, 0.0, 0.0, a, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid)); PlayerInfo[playerid][pBoomboxText] = CreateDynamic3DTextLabel(string, COLOR_LIGHTORANGE, x, y, z - 0.8, 10.0, .worldid = GetPlayerVirtualWorld(playerid), .interiorid = GetPlayerInterior(playerid)); PlayerInfo[playerid][pBoomboxURL] = 0; ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 0, 0, 0, 0, 0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s places a boombox on the ground.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "pickup", true)) { if(!PlayerInfo[playerid][pBoomboxPlaced]) { return SendClientMessage(playerid, COLOR_GREY, "You have not placed down a boombox."); } if(!IsPlayerInRangeOfDynamicObject(playerid, PlayerInfo[playerid][pBoomboxObject], 3.0)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of your boombox."); } SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s picks up their boombox and switches it off.", GetPlayerRPName(playerid)); DestroyBoombox(playerid); } else if(!strcmp(option, "play", true)) { if(!PlayerInfo[playerid][pBoomboxPlaced]) { return SendClientMessage(playerid, COLOR_GREY, "You have not placed down a boombox."); } if(!IsPlayerInRangeOfDynamicObject(playerid, PlayerInfo[playerid][pBoomboxObject], 3.0)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of your boombox."); } PlayerInfo[playerid][pMusicType] = MUSIC_BOOMBOX; ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER); } return 1; } CMD:switchspeedo(playerid, params[]) { if(!strcmp(params, "kmh", true)) { PlayerInfo[playerid][pSpeedometer] = 1; SendClientMessage(playerid, COLOR_AQUA, "Your speedometer will now display speed as {00AA00}Kilometers per hour{33CCFF}."); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET speedometer = 1 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(params, "mph", true)) { PlayerInfo[playerid][pSpeedometer] = 2; SendClientMessage(playerid, COLOR_AQUA, "Your speedometer will now display speed as {00AA00}Miles per hour{33CCFF}."); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET speedometer = 2 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(isnull(params)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /switchspeedo [kmh/mph]"); } return 1; } CMD:shakehand(playerid, params[]) { new targetid, type; if(sscanf(params, "ui", targetid, type)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /shakehand [playerid] [type (1-6)]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't shake your own hand."); } if(!(1 <= type <= 6)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type. Valid types range from 1 to 6."); } PlayerInfo[targetid][pShakeOffer] = playerid; PlayerInfo[targetid][pShakeType] = type; SendClientMessageEx(targetid, COLOR_AQUA, "** %s has offered to shake your hand. (/accept handshake)", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have sent %s a handshake offer.", GetPlayerRPName(targetid)); return 1; } CMD:dropgun(playerid, params[]) { new weaponid = GetScriptWeapon(playerid), objectid, Float:x, Float:y, Float:z; if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return SendClientMessage(playerid, COLOR_GREY, "You need to be onfoot in order to drop weapons."); } if(!weaponid) { return SendClientMessage(playerid, COLOR_GREY, "You must be holding the weapon you're willing to drop."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0 || PlayerInfo[playerid][pJoinedEvent] > 0 || PlayerInfo[playerid][pPaintball] > 0 || PlayerInfo[playerid][pDueling] != INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(GetPlayerHealthEx(playerid) < 60) { return SendClientMessage(playerid, COLOR_GREY, "You can't drop weapons as your health is below 60."); } GetPlayerPos(playerid, x, y, z); objectid = CreateDynamicObject(weaponModelIDs[weaponid], x, y, z - 1.0, 93.7, 93.7, 120.0); Streamer_SetExtraInt(objectid, E_OBJECT_TYPE, E_OBJECT_WEAPON); Streamer_SetExtraInt(objectid, E_OBJECT_WEAPONID, weaponid); Streamer_SetExtraInt(objectid, E_OBJECT_FACTION, PlayerInfo[playerid][pFaction]); RemovePlayerWeapon(playerid, weaponid); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s drops their %s on the ground.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have dropped your {00AA00}%s{33CCFF}.", GetWeaponNameEx(weaponid)); return 1; } CMD:grabgun(playerid, params[]) { if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return SendClientMessage(playerid, COLOR_GREY, "You need to be onfoot in order to pickup weapons."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(PlayerInfo[playerid][pHours] < 2 || PlayerInfo[playerid][pWeaponRestricted] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are either weapon restricted or you played less than two playing hours."); } for(new i = 0; i <= Streamer_GetUpperBound(STREAMER_TYPE_OBJECT); i ++) { if(IsValidDynamicObject(i) && IsPlayerInRangeOfDynamicObject(playerid, i, 2.0) && Streamer_GetExtraInt(i, E_OBJECT_TYPE) == E_OBJECT_WEAPON) { if(Streamer_GetExtraInt(i, E_OBJECT_FACTION) >= 0 && PlayerInfo[playerid][pFaction] != Streamer_GetExtraInt(i, E_OBJECT_FACTION)) { return SendClientMessage(playerid, COLOR_GREY, "This weapon belongs to a specific faction. You may not pick it up."); } new weaponid = Streamer_GetExtraInt(i, E_OBJECT_WEAPONID); GivePlayerWeaponEx(playerid, weaponid); DestroyDynamicObject(i); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s picks up a %s from the ground.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have picked up a {00AA00}%s{33CCFF}.", GetWeaponNameEx(weaponid)); return 1; } } SendClientMessage(playerid, COLOR_GREY, "You are not in range of any dropped weapons."); return 1; } CMD:createland(playerid, params[]) { new price; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", price)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /createland [price]"); } if(price < 1) { return SendClientMessage(playerid, COLOR_GREY, "The price can't be below $1."); } if(GetNearbyLand(playerid) >= 0) { return SendClientMessage(playerid, COLOR_GREY, "There is a land in range. Find somewhere else to create this one."); } if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0) { return SendClientMessage(playerid, COLOR_GREY, "You cannot create lands indoors."); } PlayerInfo[playerid][pLandCost] = price; PlayerInfo[playerid][pZoneType] = ZONETYPE_LAND; ShowPlayerDialog(playerid, DIALOG_CREATEZONE, DIALOG_STYLE_MSGBOX, "Land creation system", "You have entered land creation mode. In order to create a land you need\nto mark four points around the area you want your land to be in, forming\na square. You must make a square or your outcome won't be as expected.\n\nPress {00AA00}Confirm{A9C4E4} to begin land creation.", "Confirm", "Cancel"); return 1; } CMD:confirm(playerid, params[]) { new Float:x, Float:y, Float:z; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pZoneCreation]) { return SendClientMessage(playerid, COLOR_GREY, "You are not creating any land or turf at the moment."); } if(PlayerInfo[playerid][pMinX] == 0.0) { GetPlayerPos(playerid, PlayerInfo[playerid][pMinX], y, z); PlayerInfo[playerid][pZonePickups][0] = CreateDynamicPickup(1239, 1, PlayerInfo[playerid][pMinX], y, z, .playerid = playerid); SendClientMessage(playerid, COLOR_WHITE, "** Boundary 1/4 set (min X)."); } else if(PlayerInfo[playerid][pMinY] == 0.0) { GetPlayerPos(playerid, x, PlayerInfo[playerid][pMinY], z); PlayerInfo[playerid][pZonePickups][1] = CreateDynamicPickup(1239, 1, x, PlayerInfo[playerid][pMinY], z, .playerid = playerid); SendClientMessage(playerid, COLOR_WHITE, "** Boundary 2/4 set (min Y)."); } else if(PlayerInfo[playerid][pMaxX] == 0.0) { GetPlayerPos(playerid, PlayerInfo[playerid][pMaxX], y, z); PlayerInfo[playerid][pZonePickups][2] = CreateDynamicPickup(1239, 1, PlayerInfo[playerid][pMaxX], y, z, .playerid = playerid); SendClientMessage(playerid, COLOR_WHITE, "** Boundary 3/4 set (max X)."); } else if(PlayerInfo[playerid][pMaxY] == 0.0) { GetPlayerPos(playerid, x, PlayerInfo[playerid][pMaxY], z); SendClientMessage(playerid, COLOR_WHITE, "** Boundary 4/4 set (max Y)."); PlayerInfo[playerid][pZonePickups][3] = CreateDynamicPickup(1239, 1, x, PlayerInfo[playerid][pMaxY], z, .playerid = playerid); PlayerInfo[playerid][pZoneID] = GangZoneCreate(PlayerInfo[playerid][pMinX], PlayerInfo[playerid][pMinY], PlayerInfo[playerid][pMaxX], PlayerInfo[playerid][pMaxY]); GangZoneShowForPlayer(playerid, PlayerInfo[playerid][pZoneID], 0x33CC33FF); if(PlayerInfo[playerid][pZoneCreation] == ZONETYPE_LAND) { ShowPlayerDialog(playerid, DIALOG_CONFIRMZONE, DIALOG_STYLE_MSGBOX, "Land creation system", "You have set the four boundary points. The green zone on your mini-map\nrepresents the area of your land. You can choose to start over or complete\nthe creation of your land.\n\nWhat would you like to do now?", "Create", "Restart"); } else if(PlayerInfo[playerid][pZoneCreation] == ZONETYPE_TURF) { ShowPlayerDialog(playerid, DIALOG_CONFIRMZONE, DIALOG_STYLE_MSGBOX, "Turf creation system", "You have set the four boundary points. The green zone on your mini-map\nrepresents the area of your turf. You can choose to start over or complete\nthe creation of your turf.\n\nWhat would you like to do now?", "Create", "Restart"); } } return 1; } CMD:landcancel(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(PlayerInfo[playerid][pZoneCreation] != ZONETYPE_LAND) { return SendClientMessage(playerid, COLOR_GREY, "You are not creating a land at the moment."); } CancelZoneCreation(playerid); SendClientMessage(playerid, COLOR_LIGHTRED, "** Land creation cancelled."); return 1; } CMD:gotoland(playerid, params[]) { new landid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "i", landid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gotoland [landid]"); } if(!(0 <= landid < MAX_LANDS) || !LandInfo[landid][lExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid land."); } GameTextForPlayer(playerid, "~w~Teleported", 5000, 1); SetPlayerPos(playerid, LandInfo[landid][lMinX], LandInfo[landid][lMinY], LandInfo[landid][lHeight]); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); return 1; } CMD:removelandobjects(playerid, params[]) { new landid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", landid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removelandobjects [landid]"); } if(!(0 <= landid < MAX_LANDS) || !LandInfo[landid][lExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid land."); } RemoveAllLandObjects(landid); SendClientMessageEx(playerid, COLOR_AQUA, "** You have removed all land objects for land %i.", landid); return 1; } CMD:removeland(playerid, params[]) { new landid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", landid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removeland [landid]"); } if(!(0 <= landid < MAX_LANDS) || !LandInfo[landid][lExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid land."); } RemoveAllLandObjects(landid); GangZoneDestroy(LandInfo[landid][lGangZone]); DestroyDynamicArea(LandInfo[landid][lArea]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM lands WHERE id = %i", LandInfo[landid][lID]); mysql_tquery(connectionID, queryBuffer); LandInfo[landid][lID] = 0; LandInfo[landid][lExists] = 0; LandInfo[landid][lOwnerID] = 0; SendClientMessageEx(playerid, COLOR_AQUA, "** You have removed land %i.", landid); return 1; } CMD:buyland(playerid, params[]) { new landid = GetNearbyLand(playerid); if(landid == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any lands."); } if(LandInfo[landid][lOwnerID] > 0) { return SendClientMessage(playerid, COLOR_GREY, "This land is already owned."); } if(strcmp(params, "confirm", true)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /buyland [confirm] (This land costs $%i.)", LandInfo[landid][lPrice]); } if(PlayerInfo[playerid][pCash] < LandInfo[landid][lPrice]) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to purchase this land."); } SetLandOwner(landid, playerid); GivePlayerCash(playerid, -LandInfo[landid][lPrice]); SendClientMessageEx(playerid, COLOR_GREEN, "You paid $%i for this land! /landhelp to see the available commands for your land.", LandInfo[landid][lPrice]); Log_Write("log_property", "%s (uid: %i) purchased a land (id: %i) in %s for $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], LandInfo[landid][lID], GetPlayerZoneName(playerid), LandInfo[landid][lPrice]); return 1; } CMD:sellland(playerid, params[]) { new landid = GetNearbyLand(playerid), targetid, amount; if(landid == -1 || !IsLandOwner(playerid, landid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any lands of yours."); } if(sscanf(params, "ui", targetid, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sellland [playerid] [amount]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself."); } if(amount < 1) { return SendClientMessage(playerid, COLOR_GREY, "You must specify an amount above zero."); } PlayerInfo[targetid][pLandOffer] = playerid; PlayerInfo[targetid][pLandOffered] = landid; PlayerInfo[targetid][pLandPrice] = amount; SendClientMessageEx(targetid, COLOR_AQUA, "** %s offered you to buy their land for $%i. (/accept land)", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You offered %s to buy your land for $%i.", GetPlayerRPName(targetid), amount); return 1; } CMD:sellmyland(playerid, params[]) { new landid = GetNearbyLand(playerid); if(landid == -1 || !IsLandOwner(playerid, landid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any lands of yours."); } if(strcmp(params, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /sellmyland [confirm]"); SendClientMessageEx(playerid, COLOR_GREY3, "This command sells your land back to the state. You will receive $%i back.", percent(LandInfo[landid][lPrice], 75)); return 1; } SetLandOwner(landid, INVALID_PLAYER_ID); GivePlayerCash(playerid, percent(LandInfo[landid][lPrice], 75)); SendClientMessageEx(playerid, COLOR_GREEN, "You have sold your land to the state and received $%i back.", percent(LandInfo[landid][lPrice], 75)); Log_Write("log_property", "%s (uid: %i) sold their land (id: %i) to the state for $%i", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], LandInfo[landid][lID], percent(LandInfo[landid][lPrice], 75)); return 1; } CMD:landinfo(playerid, params[]) { new landid = GetNearbyLand(playerid); if(landid == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any lands."); } if(!LandInfo[landid][lOwnerID]) { SendClientMessageEx(playerid, COLOR_WHITE, "** This land is currently not owned and is for sale, price: {00AA00}$%i{FFFFFF}.", LandInfo[landid][lPrice]); } else if(!IsLandOwner(playerid, landid)) { SendClientMessageEx(playerid, COLOR_WHITE, "** This land is owned by %s.", LandInfo[landid][lOwner]); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM landobjects WHERE landid = %i", LandInfo[landid][lID]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LAND_INFORMATION, playerid); } return 1; } CMD:land(playerid, params[]) { new landid = GetNearbyLand(playerid); if(landid == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any lands of yours."); } if(!HasLandPerms(playerid, landid)) { return SendClientMessage(playerid, COLOR_GREY, "You don't have permission to build in this land."); } ShowDialogToPlayer(playerid, DIALOG_LANDMENU); return 1; } CMD:mp3(playerid, params[]) { if(!PlayerInfo[playerid][pMP3Player]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have an MP3 player."); } PlayerInfo[playerid][pMusicType] = MUSIC_MP3PLAYER; ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER); return 1; } CMD:setradio(playerid, params[]) { if(!IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in any vehicle."); } PlayerInfo[playerid][pMusicType] = MUSIC_VEHICLE; ShowDialogToPlayer(playerid, DIALOG_MP3PLAYER); return 1; } CMD:changename(playerid, params[]) { if(!IsPlayerInRangeOfPoint(playerid, 3.0, 362.0502, 173.6520, 1008.3828)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the desk at city hall."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /changename [new name]"); } if(!(3 <= strlen(params) <= 20)) { return SendClientMessage(playerid, COLOR_GREY, "Your name must range from 3 to 20 characters."); } if(strfind(params, "_") == -1) { return SendClientMessage(playerid, COLOR_GREY, "Your name needs to contain at least one underscore."); } if(!IsValidName(params)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid characters. Your name may only contain letters and underscores."); } if(PlayerInfo[playerid][pCash] < PlayerInfo[playerid][pLevel] * 7500) { return SendClientMessageEx(playerid, COLOR_GREY, "You need at least $%i to change your name at your level.", PlayerInfo[playerid][pLevel] * 7500); } if(PlayerInfo[playerid][pAdminDuty]) { return SendClientMessage(playerid, COLOR_GREY, "You aren't allowed to change your name while on admin duty,"); } PlayerInfo[playerid][pFreeNamechange] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM users WHERE username = '%e'", params); mysql_tquery(connectionID, queryBuffer, "OnPlayerAttemptNameChange", "is", playerid, params); return 1; } CMD:acceptname(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /acceptname [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(isnull(PlayerInfo[targetid][pNameChange])) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested a namechange."); } if(PlayerInfo[targetid][pFreeNamechange] == 0 && PlayerInfo[targetid][pCash] < PlayerInfo[targetid][pLevel] * 7500) { return SendClientMessage(playerid, COLOR_GREY, "That player can't afford the namechange."); } new cost = PlayerInfo[targetid][pLevel] * 7500; if(PlayerInfo[targetid][pFreeNamechange]) { if(PlayerInfo[targetid][pFreeNamechange] == 2 && (GetFactionType(targetid) == FACTION_HITMAN || GetFactionType(targetid) == FACTION_FEDERAL)) { PlayerInfo[targetid][pLevel] = PlayerInfo[targetid][pPassportLevel]; PlayerInfo[targetid][pSkin] = PlayerInfo[targetid][pPassportSkin]; SetPlayerSkin(targetid, PlayerInfo[targetid][pSkin]); Log_Write("log_faction", "%s (uid: %i) used the /passport command to change their name to %s, level to %i and skin to %i.", GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pNameChange], PlayerInfo[targetid][pLevel], PlayerInfo[targetid][pSkin]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET level = %i, skin = %i WHERE uid = %i", PlayerInfo[targetid][pLevel], PlayerInfo[targetid][pSkin], PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); } Log_Write("log_admin", "%s (uid: %i) accepted %s's (uid: %i) free namechange to %s.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pNameChange]); Log_Write("log_namechanges", "%s (uid: %i) accepted %s's (uid: %i) free namechange to %s.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pNameChange]); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has accepted %s's free namechange to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), PlayerInfo[targetid][pNameChange]); SendClientMessageEx(targetid, COLOR_YELLOW, "Your namechange request to %s was approved for free.", PlayerInfo[targetid][pNameChange]); } else { Log_Write("log_admin", "%s (uid: %i) accepted %s's (uid: %i) namechange to %s for $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pNameChange], cost); Log_Write("log_namechanges", "%s (uid: %i) accepted %s's (uid: %i) namechange to %s for $%i.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pNameChange], cost); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has accepted %s's namechange to %s for $%i.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), PlayerInfo[targetid][pNameChange], cost); SendClientMessageEx(targetid, COLOR_YELLOW, "Your namechange request to %s was approved for $%i.", PlayerInfo[targetid][pNameChange], cost); GivePlayerCash(targetid, -cost); } Namechange(targetid, GetPlayerNameEx(targetid), PlayerInfo[targetid][pNameChange]); PlayerInfo[targetid][pNameChange] = 0; PlayerInfo[targetid][pFreeNamechange] = 0; return 1; } CMD:denyname(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /denyname [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(isnull(PlayerInfo[targetid][pNameChange])) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested a namechange."); } if(PlayerInfo[targetid][pFreeNamechange]) { ShowPlayerDialog(targetid, DIALOG_FREENAMECHANGE, DIALOG_STYLE_INPUT, "Non-RP Name", "An administrator has came to the conclusion that your name is non-RP.\nTherefore you have been given this free namechange in order to correct it.\n\nEnter a name in the Firstname_Lastname format in the box below:", "Submit", "Cancel"); } Log_Write("log_admin", "%s (uid: %i) denied %s's (uid: %i) namechange to %s.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], PlayerInfo[targetid][pNameChange]); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has denied %s's namechange to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), PlayerInfo[targetid][pNameChange]); SendClientMessageEx(targetid, COLOR_LIGHTRED, "Your namechange request to %s was denied.", PlayerInfo[targetid][pNameChange]); PlayerInfo[targetid][pNameChange] = 0; PlayerInfo[targetid][pFreeNamechange] = 0; return 1; } CMD:namechanges(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } SendClientMessage(playerid, COLOR_GREEN, "|_____ Pending Namechanges _____|"); foreach(new i : Player) { if(!isnull(PlayerInfo[i][pNameChange])) { SendClientMessageEx(playerid, COLOR_GREY1, "(ID: %i) %s - Requested name: %s", i, GetPlayerRPName(i), PlayerInfo[i][pNameChange]); } } return 1; } CMD:paytickets(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid), amount; if(!vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of any vehicle of yours."); } if(!IsVehicleOwner(playerid, vehicleid) && PlayerInfo[playerid][pVehicleKeys] != vehicleid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as this vehicle doesn't belong to you."); } if(sscanf(params, "i", amount)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /paytickets [amount] (There is $%i in unpaid tickets.)", VehicleInfo[vehicleid][vTickets]); } if(amount < 1 || amount > PlayerInfo[playerid][pCash]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(amount > VehicleInfo[vehicleid][vTickets]) { return SendClientMessage(playerid, COLOR_GREY, "There isn't that much in unpaid tickets to pay."); } VehicleInfo[vehicleid][vTickets] -= amount; GivePlayerCash(playerid, -amount); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET tickets = %i WHERE id = %i", VehicleInfo[vehicleid][vTickets], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have paid $%i in unpaid tickets. This vehicle now has $%i left in unpaid tickets.", amount, VehicleInfo[vehicleid][vTickets]); return 1; } CMD:carinfo(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(!vehicleid || !IsVehicleOwner(playerid, vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside any vehicle of yours."); } new neon[12], Float:health; GetVehicleHealth(vehicleid, health); switch(VehicleInfo[vehicleid][vNeon]) { case 18647: neon = "Red"; case 18648: neon = "Blue"; case 18649: neon = "Green"; case 18650: neon = "Yellow"; case 18651: neon = "Pink"; case 18652: neon = "White"; default: neon = "None"; } SendClientMessageEx(playerid, COLOR_GREEN, "|______ %s Stats ______|", GetVehicleName(vehicleid)); SendClientMessageEx(playerid, COLOR_GREY2, "(Owner: %s) - (Value: $%i) - (Tickets: $%i) - (Plate: %s)", VehicleInfo[vehicleid][vOwner], VehicleInfo[vehicleid][vPrice], VehicleInfo[vehicleid][vTickets], VehicleInfo[vehicleid][vPlate]); SendClientMessageEx(playerid, COLOR_GREY2, "(Neon: %s) - (Trunk: %i/3) - (Health: %.1f) - (Fuel: %i)", neon, VehicleInfo[vehicleid][vTrunk], health, vehicleFuel[vehicleid]); return 1; } CMD:smuggle(playerid, params[]) { return cmd_smuggledrugs(playerid, params); } CMD:smuggledrugs(playerid, params[]) { if(!PlayerHasJob(playerid, JOB_DRUGDEALER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Drug Dealer."); } if(!IsPlayerInRangeOfPoint(playerid, 5.0, 52.0937, -292.2513, 1.7001)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the smuggle point."); } if(PlayerInfo[playerid][pCP] != CHECKPOINT_NONE) { return SendClientMessage(playerid, COLOR_GREY, "You must cancel your active checkpoint first. /cancelcp to cancel it."); } if(PlayerInfo[playerid][pCash] < 500) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /smuggledrugs [seeds | cocaine | ephedrine]"); } if(!strcmp(params, "seeds", true)) { PlayerInfo[playerid][pSmuggleDrugs] = 1; PlayerInfo[playerid][pSmuggleTime] = gettime(); PlayerInfo[playerid][pCP] = CHECKPOINT_DRUGS; GivePlayerCash(playerid, -500); AddPointMoney(POINT_DRUGFACTORY, 500); SetPlayerCheckpoint(playerid, 2167.7371, -1670.6298, 15.0804, 3.0); SendClientMessage(playerid, COLOR_AQUA, "You have paid $500 for a package of {00AA00}marijuana seeds{33CCFF}. Deliver it to the marker."); } else if(!strcmp(params, "cocaine", true)) { PlayerInfo[playerid][pSmuggleDrugs] = 2; PlayerInfo[playerid][pSmuggleTime] = gettime(); PlayerInfo[playerid][pCP] = CHECKPOINT_DRUGS; GivePlayerCash(playerid, -500); AddPointMoney(POINT_DRUGFACTORY, 500); SetPlayerCheckpoint(playerid, 2349.7727, -1169.6304, 28.0243, 3.0); SendClientMessage(playerid, COLOR_AQUA, "You have paid $500 for a package of {00AA00}cocaine{33CCFF}. Deliver it to the marker."); } else if(!strcmp(params, "ephedrine", true)) { PlayerInfo[playerid][pSmuggleDrugs] = 3; PlayerInfo[playerid][pSmuggleTime] = gettime(); PlayerInfo[playerid][pCP] = CHECKPOINT_DRUGS; GivePlayerCash(playerid, -500); AddPointMoney(POINT_DRUGFACTORY, 500); SetPlayerCheckpoint(playerid, 2167.7371, -1670.6298, 15.0804, 3.0); SendClientMessage(playerid, COLOR_AQUA, "You have paid $500 for a package of {00AA00}raw ephedrine{33CCFF}. Deliver it to the marker."); } return 1; } CMD:buydrug(playerid, params[]) { new option[10], amount, cost; if(!PlayerHasJob(playerid, JOB_DRUGDEALER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Drug Dealer."); } if(sscanf(params, "s[10]i", option, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /buydrug [seeds | cocaine | ephedrine] [amount]"); } if(!strcmp(option, "seeds", true)) { if(!IsPlayerInRangeOfPoint(playerid, 3.0, 321.8347, 1117.1797, 1083.8828)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of the drug den."); } if(amount < 1 || amount > 10) { return SendClientMessage(playerid, COLOR_GREY, "You can't buy less than 1 or more than 10 seeds at a time."); } if(amount > gSeedsStock) { return SendClientMessage(playerid, COLOR_GREY, "There aren't that many seeds left in stock."); } if(PlayerInfo[playerid][pCash] < (cost = amount * 750)) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy that many seeds."); } if(PlayerInfo[playerid][pSeeds] + amount > GetPlayerCapacity(playerid, CAPACITY_SEEDS)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i seeds. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pSeeds], GetPlayerCapacity(playerid, CAPACITY_SEEDS)); } gSeedsStock -= amount; PlayerInfo[playerid][pSeeds] += amount; GivePlayerCash(playerid, -cost); AddPointMoney(POINT_DRUGDEN, cost); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET seeds = %i WHERE uid = %i", PlayerInfo[playerid][pSeeds], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased %i marijuana seeds for {00AA00}$%i{33CCFF}. /planthelp for more help.", amount, cost); } else if(!strcmp(option, "ephedrine", true)) { if(!IsPlayerInRangeOfPoint(playerid, 3.0, 323.7289, 1117.4187, 1083.8828)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of the drug den."); } if(amount < 1 || amount > 5) { return SendClientMessage(playerid, COLOR_GREY, "You can't buy less than 1 or more than 5 grams at a time."); } if(amount > gEphedrineStock) { return SendClientMessage(playerid, COLOR_GREY, "There isn't that much ephedrine left in stock."); } if(PlayerInfo[playerid][pCash] < (cost = amount * 2000)) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy that many grams."); } if(PlayerInfo[playerid][pEphedrine] + amount > GetPlayerCapacity(playerid, CAPACITY_EPHEDRINE)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i ephedrine. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pEphedrine], GetPlayerCapacity(playerid, CAPACITY_EPHEDRINE)); } gEphedrineStock -= amount; PlayerInfo[playerid][pEphedrine] += amount; GivePlayerCash(playerid, -cost); AddPointMoney(POINT_DRUGDEN, cost); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET ephedrine = %i WHERE uid = %i", PlayerInfo[playerid][pEphedrine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased %i grams of raw ephedrine for {00AA00}$%i{33CCFF}.", amount, cost); } else if(!strcmp(option, "cocaine", true)) { if(!IsPlayerInRangeOfPoint(playerid, 3.0, 2342.7766, -1187.0839, 1027.9766)) { return SendClientMessage(playerid, COLOR_GREY, "You are not inside of the crack house."); } if(amount < 1 || amount > 10) { return SendClientMessage(playerid, COLOR_GREY, "You can't buy less than 1 or more than 10 grams at a time."); } if(amount > gCocaineStock) { return SendClientMessage(playerid, COLOR_GREY, "There isn't that much cocaine left in stock."); } if(PlayerInfo[playerid][pCash] < (cost = amount * 1000)) { return SendClientMessage(playerid, COLOR_GREY, "You can't afford to buy that many grams."); } if(PlayerInfo[playerid][pCocaine] + amount > GetPlayerCapacity(playerid, CAPACITY_COCAINE)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i cocaine. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pCocaine], GetPlayerCapacity(playerid, CAPACITY_COCAINE)); } gCocaineStock -= amount; PlayerInfo[playerid][pCocaine] += amount; GivePlayerCash(playerid, -cost); AddPointMoney(POINT_CRACKHOUSE, cost); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have purchased %i grams of cocaine for {00AA00}$%i{33CCFF}.", amount, cost); } return 1; } CMD:plantweed(playerid, params[]) { if(PlayerInfo[playerid][pWeedPlanted]) { return SendClientMessage(playerid, COLOR_GREY, "You have an active weed plant already."); } if(PlayerInfo[playerid][pSeeds] < 10) { return SendClientMessage(playerid, COLOR_GREY, "You don't have enough seeds. You need at least 10 seeds in order to plant them."); } if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't plant indoors."); } GetPlayerPos(playerid, PlayerInfo[playerid][pWeedX], PlayerInfo[playerid][pWeedY], PlayerInfo[playerid][pWeedZ]); GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pWeedA]); PlayerInfo[playerid][pSeeds] -= 10; PlayerInfo[playerid][pWeedPlanted] = 1; PlayerInfo[playerid][pWeedTime] = 60; PlayerInfo[playerid][pWeedGrams] = 0; PlayerInfo[playerid][pWeedObject] = CreateDynamicObject(3409, PlayerInfo[playerid][pWeedX], PlayerInfo[playerid][pWeedY], PlayerInfo[playerid][pWeedZ] - 1.8, 0.0, 0.0, PlayerInfo[playerid][pWeedA]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET seeds = %i, weedplanted = 1, weedtime = %i, weedgrams = %i, weed_x = '%f', weed_y = '%f', weed_z = '%f', weed_a = '%f' WHERE uid = %i", PlayerInfo[playerid][pSeeds], PlayerInfo[playerid][pWeedTime], PlayerInfo[playerid][pWeedGrams], PlayerInfo[playerid][pWeedX], PlayerInfo[playerid][pWeedY], PlayerInfo[playerid][pWeedZ], PlayerInfo[playerid][pWeedA], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s plants some seeds into the ground.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_GREEN, "You have planted a weed plant. Every two minutes your plant will grow one gram of weed."); SendClientMessage(playerid, COLOR_GREEN, "Your plant will be ready in 60 minutes. Be careful, as anyone who sees your plant can pick it!"); return 1; } CMD:plantinfo(playerid, params[]) { foreach(new i : Player) { if(PlayerInfo[i][pWeedPlanted] && IsPlayerInRangeOfPoint(playerid, 3.0, PlayerInfo[i][pWeedX], PlayerInfo[i][pWeedY], PlayerInfo[i][pWeedZ])) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s inspects the plant.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_WHITE, "** This plant has so far grown %i grams of weed. It will be ready in %i/60 minutes.", PlayerInfo[i][pWeedGrams], PlayerInfo[i][pWeedTime]); return 1; } } SendClientMessage(playerid, COLOR_GREY, "You are not in range of any plants."); return 1; } CMD:pickplant(playerid, params[]) { foreach(new i : Player) { if(PlayerInfo[i][pWeedPlanted] && IsPlayerInRangeOfPoint(playerid, 3.0, PlayerInfo[i][pWeedX], PlayerInfo[i][pWeedY], PlayerInfo[i][pWeedZ])) { if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) { return SendClientMessage(playerid, COLOR_GREY, "You need to be crouched in order to pick a plant."); } if(PlayerInfo[i][pWeedGrams] < 2) { return SendClientMessage(playerid, COLOR_GREY, "This plant hasn't grown that much yet. Wait a little while first."); } if(PlayerInfo[playerid][pWeed] + PlayerInfo[i][pWeedGrams] > GetPlayerCapacity(playerid, CAPACITY_WEED)) { return SendClientMessageEx(playerid, COLOR_GREY, "You currently have %i/%i weed. You can't carry anymore until you upgrade your inventory skill.", PlayerInfo[playerid][pWeed], GetPlayerCapacity(playerid, CAPACITY_WEED)); } PlayerInfo[playerid][pPickPlant] = i; PlayerInfo[playerid][pPickTime] = 5; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s crouches down and starts picking at the weed plant.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_WHITE, "** Allow up to five seconds for you to pick the plant."); return 1; } } SendClientMessage(playerid, COLOR_GREY, "You are not in range of any plants."); return 1; } CMD:seizeplant(playerid, params[]) { if(!IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't apart of law enforcement."); } foreach(new i : Player) { if(PlayerInfo[i][pWeedPlanted] && IsPlayerInRangeOfPoint(playerid, 3.0, PlayerInfo[i][pWeedX], PlayerInfo[i][pWeedY], PlayerInfo[i][pWeedZ])) { SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s seizes a weed plant weighing %i grams.", GetPlayerRPName(playerid), PlayerInfo[i][pWeedGrams]); DestroyWeedPlant(i); return 1; } } SendClientMessage(playerid, COLOR_GREY, "You are not in range of any plants."); return 1; } CMD:cookmeth(playerid, params[]) { if(!PlayerHasJob(playerid, JOB_DRUGDEALER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you're not a Drug Dealer."); } if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1.2179, 2.8095, 999.4284)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in Heisenberg's trailer. You can't use this command."); } if(!PlayerInfo[playerid][pCookMeth]) { if(!PlayerInfo[playerid][pEphedrine]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have any raw ephedrine which you could turn into meth."); } if(!PlayerInfo[playerid][pMuriaticAcid]) { return SendClientMessage(playerid, COLOR_GREY, "You need muriatic acid in order to cook meth. Go buy some at 24/7."); } PlayerInfo[playerid][pCookMeth] = 1; PlayerInfo[playerid][pCookTime] = 15; PlayerInfo[playerid][pCookGrams] = 0; SendClientMessage(playerid, COLOR_GREEN, "You have started cooking meth. One gram of ephedrine will turn into 2 grams of meth every 15 seconds."); SendClientMessage(playerid, COLOR_GREEN, "Type the /cookmeth command again in order to stop cooking."); } else { SendClientMessageEx(playerid, COLOR_AQUA, "You have stopped cooking. You converted %i grams of ephedrine into %i grams of meth.", PlayerInfo[playerid][pCookGrams] / 2, PlayerInfo[playerid][pCookGrams]); ResetCooking(playerid); } return 1; } CMD:usecigar(playerid, params[]) { if(!PlayerInfo[playerid][pCigars]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have any cigars left."); } PlayerInfo[playerid][pCigars]--; SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s lights up a cigar and starts to smoke it.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cigars = %i WHERE uid = %i", PlayerInfo[playerid][pCigars], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); return 1; } CMD:usedrug(playerid, params[]) { if(gettime() - PlayerInfo[playerid][pLastDrug] < 10) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only consume drugs every 10 seconds. Please wait %i more seconds.", 10 - (gettime() - PlayerInfo[playerid][pLastDrug])); } if(PlayerInfo[playerid][pDrugsUsed] >= 4) { return SendClientMessage(playerid, COLOR_GREY, "You are stoned and therefore can't consume anymore drugs right now."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0 || PlayerInfo[playerid][pPaintball]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(PlayerInfo[playerid][pJoinedEvent] > 0 && !EventInfo[eHeal]) { return SendClientMessage(playerid, COLOR_GREY, "The administrator has chosen to disable healing in this event."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /usedrug [weed | cocaine | meth | painkillers]"); } if(!strcmp(params, "weed", true)) { if(PlayerInfo[playerid][pWeed] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You need at least two grams of weed."); } if(PlayerInfo[playerid][pAddictUpgrade] > 0) { SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Addict perk: Your level %i/3 addict perk gave you %.1f extra health.", PlayerInfo[playerid][pAddictUpgrade], (PlayerInfo[playerid][pAddictUpgrade] * 5.0)); } GivePlayerHealth(playerid, 20.0 + (PlayerInfo[playerid][pAddictUpgrade] * 5.0)); PlayerInfo[playerid][pWeed] -= 2; PlayerInfo[playerid][pDrugsUsed]++; PlayerInfo[playerid][pLastDrug] = gettime(); if(PlayerInfo[playerid][pDrugsUsed] >= 4) { GameTextForPlayer(playerid, "~p~shit... you stoned as hell duuuude...", 5000, 1); PlayerInfo[playerid][pDrugsTime] = 30; } ApplyAnimation(playerid, "SMOKING", "M_smk_in", 4.1, 0, 0, 0, 0, 0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s smokes two grams of weed.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = %i WHERE uid = %i", PlayerInfo[playerid][pWeed], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(params, "cocaine", true)) { if(PlayerInfo[playerid][pCocaine] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You need at least two grams of cocaine."); } if(PlayerInfo[playerid][pAddictUpgrade] > 0) { SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Addict perk: Your level %i/3 addict perk gave you %.1f extra armor.", PlayerInfo[playerid][pAddictUpgrade], (PlayerInfo[playerid][pAddictUpgrade] * 5.0)); } GivePlayerArmour(playerid, 10.0 + (PlayerInfo[playerid][pAddictUpgrade] * 5.0)); PlayerInfo[playerid][pCocaine] -= 2; PlayerInfo[playerid][pDrugsUsed]++; PlayerInfo[playerid][pLastDrug] = gettime(); if(PlayerInfo[playerid][pDrugsUsed] >= 4) { GameTextForPlayer(playerid, "~p~shit... you stoned as hell duuuude...", 5000, 1); PlayerInfo[playerid][pDrugsTime] = 30; } ApplyAnimation(playerid, "SMOKING", "M_smk_in", 4.1, 0, 0, 0, 0, 0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s snorts two grams of cocaine.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = %i WHERE uid = %i", PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(params, "meth", true)) { if(PlayerInfo[playerid][pMeth] < 2) { return SendClientMessage(playerid, COLOR_GREY, "You need at least two grams of meth."); } if(PlayerInfo[playerid][pAddictUpgrade] > 0) { SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Addict perk: Your level %i/3 addict perk gave you %.1f/%.1f extra health & armor.", PlayerInfo[playerid][pAddictUpgrade], (PlayerInfo[playerid][pAddictUpgrade] * 5.0), (PlayerInfo[playerid][pAddictUpgrade] * 5.0)); } GivePlayerHealth(playerid, 10.0 + (PlayerInfo[playerid][pAddictUpgrade] * 5.0)); GivePlayerArmour(playerid, 10.0 + (PlayerInfo[playerid][pAddictUpgrade] * 5.0)); PlayerInfo[playerid][pMeth] -= 2; PlayerInfo[playerid][pDrugsUsed] += 2; PlayerInfo[playerid][pLastDrug] = gettime(); if(PlayerInfo[playerid][pDrugsUsed] >= 4) { GameTextForPlayer(playerid, "~p~shit... you stoned as hell duuuude...", 5000, 1); PlayerInfo[playerid][pDrugsTime] = 30; } ApplyAnimation(playerid, "SMOKING", "M_smk_in", 4.1, 0, 0, 0, 0, 0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s smokes two grams of meth.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = %i WHERE uid = %i", PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(params, "painkillers", true)) { if(PlayerInfo[playerid][pPainkillers] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "You don't have any painkillers left."); } if(PlayerInfo[playerid][pAddictUpgrade] > 0) { SendClientMessageEx(playerid, COLOR_LIGHTORANGE, "** Addict perk: Your level %i/3 addict perk gave you %.1f extra health.", PlayerInfo[playerid][pAddictUpgrade], (PlayerInfo[playerid][pAddictUpgrade] * 5.0)); } GivePlayerHealth(playerid, 30.0 + (PlayerInfo[playerid][pAddictUpgrade] * 5.0)); PlayerInfo[playerid][pPainkillers] -= 1; PlayerInfo[playerid][pFirstAid] = 1; PlayerInfo[playerid][pDrugsUsed] += 2; PlayerInfo[playerid][pLastDrug] = gettime(); if(PlayerInfo[playerid][pDrugsUsed] >= 4) { GameTextForPlayer(playerid, "~p~shit... you stoned as hell duuuude...", 5000, 1); PlayerInfo[playerid][pDrugsTime] = 30; } ApplyAnimation(playerid, "SMOKING", "M_smk_in", 4.1, 0, 0, 0, 0, 0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s pops a painkiller in their mouth.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = %i WHERE uid = %i", PlayerInfo[playerid][pPainkillers], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } return 1; } CMD:showid(playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /showid [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } SendClientMessage(targetid, COLOR_GREEN, "|_____ ID Card _____|"); SendClientMessageEx(targetid, COLOR_GREY1, "Name: %s", GetPlayerRPName(playerid)); SendClientMessageEx(targetid, COLOR_GREY1, "Gender: %s", (PlayerInfo[playerid][pGender] == 2) ? ("Female") : ("Male")); SendClientMessageEx(targetid, COLOR_GREY1, "Age: %i years old", PlayerInfo[playerid][pAge]); SendClientMessageEx(targetid, COLOR_GREY1, "Drivers License: %s", (PlayerInfo[playerid][pCarLicense]) ? ("{00AA00}Yes") : ("{FF6347}No")); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s shows their ID card to %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); return 1; } CMD:inv(playerid, params[]) { return cmd_inventory(playerid, params); } CMD:inventory(playerid, params[]) { DisplayInventory(playerid); return 1; } CMD:drop(playerid, params[]) { new option[12], confirm[10]; if(sscanf(params, "s[12]S()[10]", option, confirm)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /drop [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Weapons, Materials, Weed, Cocaine, Meth, Painkillers, Cigars, Spraycans"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Seeds, Ephedrine, HPAmmo, PoisonAmmo, FMJAmmo"); return 1; } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0 || PlayerInfo[playerid][pPaintball]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(!strcmp(option, "weapons", true)) { if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /drop [weapons] [confirm]"); } ResetPlayerWeaponsEx(playerid); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their weapons.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "materials", true)) { if(!PlayerInfo[playerid][pMaterials]) { return SendClientMessage(playerid, COLOR_GREY, "You have no materials which you can throw away."); } if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /drop [materials] [confirm] (You have %i materials.)", PlayerInfo[playerid][pMaterials]); } PlayerInfo[playerid][pMaterials] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their materials.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET materials = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "weed", true)) { if(!PlayerInfo[playerid][pWeed]) { return SendClientMessage(playerid, COLOR_GREY, "You have no weed which you can throw away."); } if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /drop [weed] [confirm] (You have %i grams of weed.)", PlayerInfo[playerid][pWeed]); } PlayerInfo[playerid][pWeed] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their weed.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET weed = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "cocaine", true)) { if(!PlayerInfo[playerid][pCocaine]) { return SendClientMessage(playerid, COLOR_GREY, "You have no cocaine which you can throw away."); } if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /drop [cocaine] [confirm] (You have %i grams of cocaine.)", PlayerInfo[playerid][pCocaine]); } PlayerInfo[playerid][pCocaine] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their cocaine.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cocaine = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "meth", true)) { if(!PlayerInfo[playerid][pMeth]) { return SendClientMessage(playerid, COLOR_GREY, "You have no meth which you can throw away."); } if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /drop [meth] [confirm] (You have %i grams of meth.)", PlayerInfo[playerid][pMeth]); } PlayerInfo[playerid][pMeth] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their meth.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET meth = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "painkillers", true)) { if(!PlayerInfo[playerid][pPainkillers]) { return SendClientMessage(playerid, COLOR_GREY, "You have no painkillers which you can throw away."); } if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /drop [cocaine] [confirm] (You have %i painkillers.)", PlayerInfo[playerid][pPainkillers]); } PlayerInfo[playerid][pPainkillers] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their painkillers.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET painkillers = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "cigars", true)) { if(!PlayerInfo[playerid][pCigars]) { return SendClientMessage(playerid, COLOR_GREY, "You have no cigars which you can throw away."); } if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /drop [cigars] [confirm] (You have %i cigars.)", PlayerInfo[playerid][pCigars]); } PlayerInfo[playerid][pCigars] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their cigars.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET cigars = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "spraycans", true)) { if(!PlayerInfo[playerid][pSpraycans]) { return SendClientMessage(playerid, COLOR_GREY, "You have no spraycans which you can throw away."); } if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /drop [spraycans] [confirm] (You have %i spraycans.)", PlayerInfo[playerid][pSpraycans]); } PlayerInfo[playerid][pSpraycans] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their spraycanss.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET spraycans = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "seeds", true)) { if(!PlayerInfo[playerid][pSeeds]) { return SendClientMessage(playerid, COLOR_GREY, "You have no seeds which you can throw away."); } if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /drop [seeds] [confirm] (You have %i seeds.)", PlayerInfo[playerid][pSeeds]); } PlayerInfo[playerid][pSeeds] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their seeds.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET seeds = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "ephedrine", true)) { if(!PlayerInfo[playerid][pEphedrine]) { return SendClientMessage(playerid, COLOR_GREY, "You have no ephedrine which you can throw away."); } if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /drop [ephedrine] [confirm] (You have %i grams of ephedrine.)", PlayerInfo[playerid][pEphedrine]); } PlayerInfo[playerid][pEphedrine] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their ephedrine.", GetPlayerRPName(playerid)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET ephedrine = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "hpammo", true)) { if(!PlayerInfo[playerid][pHPAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "You have no hollow point ammo which you can throw away."); } if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /drop [hpammo] [confirm] (You have %i rounds of HP ammo.)", PlayerInfo[playerid][pHPAmmo]); } SetWeaponAmmo(playerid, AMMO_HP, 0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their hollow point ammo.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "poisonammo", true)) { if(!PlayerInfo[playerid][pPoisonAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "You have no poison tip ammo which you can throw away."); } if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /drop [poisonammo] [confirm] (You have %i rounds of poison ammo.)", PlayerInfo[playerid][pPoisonAmmo]); } SetWeaponAmmo(playerid, AMMO_POISON, 0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their poison tip ammo.", GetPlayerRPName(playerid)); } else if(!strcmp(option, "fmjammo", true)) { if(!PlayerInfo[playerid][pFMJAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "You have no FMJ ammo which you can throw away."); } if(isnull(confirm) || strcmp(confirm, "confirm", true) != 0) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /drop [fmjammo] [confirm] (You have %i rounds of FMJ ammo.)", PlayerInfo[playerid][pFMJAmmo]); } SetWeaponAmmo(playerid, AMMO_FMJ, 0); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s throws away their full metal jacket ammo.", GetPlayerRPName(playerid)); } return 1; } CMD:creategang(playerid, params[]) { new name[32]; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pGangMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "s[32]", name)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /creategang [name]"); } for(new i = 0; i < MAX_GANGS; i ++) { if(!GangInfo[i][gSetup]) { SetupGang(i, name); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has setup gang {F7A763}%s{FF6347} in slot ID %i.", GetPlayerRPName(playerid), name, i); SendClientMessageEx(playerid, COLOR_WHITE, "** This gang's ID is %i. /editgang to edit.", i); return 1; } } return 1; } CMD:editgang(playerid, params[]) { new gangid, option[14], param[128]; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pGangMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[14]S()[128]", gangid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgang [gangid] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Name, MOTD, Leader, Level, Color, Points, TurfTokens, RankName, Skin, Strikes"); return 1; } if(!(0 <= gangid < MAX_GANGS) || !GangInfo[gangid][gSetup]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid gang."); } if(!strcmp(option, "name", true)) { if(isnull(param) || strlen(params) > 32) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgang [gangid] [name] [text]"); } strcpy(GangInfo[gangid][gName], param, 32); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET name = '%e' WHERE id = %i", param, gangid); mysql_tquery(connectionID, queryBuffer); ReloadGang(gangid); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the name of gang ID %i to '%s'.", GetPlayerRPName(playerid), gangid, param); } else if(!strcmp(option, "motd", true)) { if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgang [gangid] [motd] [text]"); } strcpy(GangInfo[gangid][gMOTD], param, 128); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET motd = '%e' WHERE id = %i", param, gangid); mysql_tquery(connectionID, queryBuffer); ReloadGang(gangid); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has adjusted the MOTD of gang ID %i.", GetPlayerRPName(playerid), gangid); } else if(!strcmp(option, "leader", true)) { new leader[MAX_PLAYER_NAME]; if(sscanf(param, "s[24]", leader)) { SendClientMessage(playerid, COLOR_GREY, "[Usage]: /editgang [gangid] [leader] [name]"); SendClientMessage(playerid, COLOR_GREY, "This only updates the text for the leader's name in /gangs. Use /setgang to appoint someone as gang leader."); return 1; } strcpy(GangInfo[gangid][gLeader], leader, MAX_PLAYER_NAME); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET leader = '%e' WHERE id = %i", leader, gangid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the leader of gang ID %i to %s.", GetPlayerRPName(playerid), gangid, leader); } else if(!strcmp(option, "level", true)) { new value; if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgang [gangid] [level] [value (1-3)]"); } if(!(1 <= value <= 3)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid level."); } GangInfo[gangid][gLevel] = value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET level = %i WHERE id = %i", GangInfo[gangid][gLevel], gangid); mysql_tquery(connectionID, queryBuffer); ReloadGang(gangid); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the level of gang ID %i to %i/3.", GetPlayerRPName(playerid), gangid, value); } else if(!strcmp(option, "color", true)) { new color; if(sscanf(param, "h", color)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgang [gangid] [color] [0xRRGGBBAA]"); } GangInfo[gangid][gColor] = color & ~0xff; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET color = %i WHERE id = %i", GangInfo[gangid][gColor], gangid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the {%06x}color{FF6347} of gang ID %i.", GetPlayerRPName(playerid), color >>> 8, gangid); } else if(!strcmp(option, "points", true)) { new value; if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgang [gangid] [points] [value]"); } GangInfo[gangid][gPoints] = value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET points = %i WHERE id = %i", GangInfo[gangid][gPoints], gangid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the gang points of gang ID %i to %i.", GetPlayerRPName(playerid), gangid, value); } else if(!strcmp(option, "turftokens", true)) { new value; if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgang [gangid] [turftokens] [value]"); } GangInfo[gangid][gTurfTokens] = value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET turftokens = %i WHERE id = %i", GangInfo[gangid][gTurfTokens], gangid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the turf tokens of gang ID %i to %i.", GetPlayerRPName(playerid), gangid, value); } else if(!strcmp(option, "rankname", true)) { new rankid, rank[32]; if(sscanf(param, "is[32]", rankid, rank)) { SendClientMessage(playerid, COLOR_GREEN, "|_____ Rank Names _____|"); for(new i = 0; i < 7; i ++) { if(isnull(GangRanks[gangid][i])) SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: (empty)", i); else SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: %s", i, GangRanks[gangid][i]); } return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgang [gangid] [rankname] [slot (0-6)] [name]"); } if(!(0 <= rankid <= 6)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid rank."); } strcpy(GangRanks[gangid][rankid], rank, 32); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO gangranks VALUES(%i, %i, '%e') ON DUPLICATE KEY UPDATE name = '%e'", gangid, rankid, rank, rank); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set rank %i's name of gang ID %i to '%s'.", GetPlayerRPName(playerid), rankid, gangid, rank); } else if(!strcmp(option, "skin", true)) { new slot, skinid; if(sscanf(param, "ii", slot, skinid)) { SendClientMessage(playerid, COLOR_GREEN, "|_____ Gang Skins _____|"); for(new i = 0; i < MAX_GANG_SKINS; i ++) { if(GangInfo[gangid][gSkins][i] == 0) SendClientMessageEx(playerid, COLOR_GREY2, "Skin %i: (none)", i + 1); else SendClientMessageEx(playerid, COLOR_GREY2, "Skin %i: %i", i + 1, GangInfo[gangid][gSkins][i]); } return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /editgang [gangid] [skin] [slot (1-%i)] [skinid]", MAX_GANG_SKINS); } if(!(1 <= slot <= MAX_GANG_SKINS)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid slot."); } if(!(0 <= skinid <= 311)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid skin."); } slot--; GangInfo[gangid][gSkins][slot] = skinid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO gangskins VALUES(%i, %i, %i) ON DUPLICATE KEY UPDATE skinid = %i", gangid, slot, skinid, skinid); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_WHITE, "** You have set the skin in slot %i to ID %i.", slot + 1, skinid); } else if(!strcmp(option, "strikes", true)) { new amount; if(sscanf(param, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editgang [gangid] [strikes] [amount]"); } if(!(0 <= amount <= 3)) { return SendClientMessage(playerid, COLOR_GREY, "The amount must range from 0 to 3."); } GangInfo[gangid][gStrikes] = amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET strikes = %i WHERE id = %i", amount, gangid); mysql_tquery(connectionID, queryBuffer); ReloadGang(gangid); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the strikes of gang ID %i to %i.", GetPlayerRPName(playerid), gangid, amount); } return 1; } CMD:removegang(playerid, params[]) { new gangid; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pGangMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", gangid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removegang [gangid]"); } if(!(0 <= gangid < MAX_GANGS) || !GangInfo[gangid][gSetup]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid gang."); } SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has deleted gang %s.", GetPlayerRPName(playerid), GangInfo[gangid][gName]); SendClientMessageEx(playerid, COLOR_LIGHTRED, "You have permanently deleted the {F7A763}%s{FF6347} gang slot.", GangInfo[gangid][gName]); RemoveGang(gangid); return 1; } CMD:gangstrike(playerid, params[]) { new gangid, reason[128]; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pGangMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[128]", gangid, reason)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gangstrike [gangid] [reason]"); } if(!(0 <= gangid < MAX_GANGS) || !GangInfo[gangid][gSetup]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid gang."); } if(GangInfo[gangid][gStrikes] >= 3) { return SendClientMessage(playerid, COLOR_GREY, "This gang already has 3 strikes."); } GangInfo[gangid][gStrikes]++; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET strikes = %i WHERE id = %i", GangInfo[gangid][gStrikes], gangid); mysql_tquery(connectionID, queryBuffer); switch(GangInfo[gangid][gStrikes]) { case 1: SendClientMessageToAllEx(COLOR_WHITE, "(( Gang News: %s has received their 1st strike, reason: %s ))", GangInfo[gangid][gName], reason); case 2: SendClientMessageToAllEx(COLOR_WHITE, "(( Gang News: %s has received their 2nd strike, reason: %s ))", GangInfo[gangid][gName], reason); case 3: SendClientMessageToAllEx(COLOR_WHITE, "(( Gang News: %s has received their 3rd strike, reason: %s ))", GangInfo[gangid][gName], reason); } return 1; } CMD:setgang(playerid, params[]) { new targetid, gangid, rankid; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pGangMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "uiI(-1)", targetid, gangid, rankid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /setgang [playerid] [gangid (-1 = none)] [rank (optional)]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pLogged]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't logged in yet."); } if(!(-1 <= gangid < MAX_GANGS) || (gangid >= 0 && !GangInfo[gangid][gSetup])) { return SendClientMessage(playerid, COLOR_GREY, "Invalid gang."); } if((gangid != -1 && !(-1 <= rankid <= 6))) { return SendClientMessage(playerid, COLOR_GREY, "Invalid rank."); } if(gangid == -1) { PlayerInfo[targetid][pGang] = -1; PlayerInfo[targetid][pGangRank] = 0; SendClientMessageEx(targetid, COLOR_AQUA, "%s has removed you from your gang.", GetPlayerRPName(playerid)); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has removed %s from their gang.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); } else { if(rankid == -1) { rankid = 6; } /*if(rankid == 6) { GetPlayerName(targetid, GangInfo[gangid][gLeader], MAX_PLAYER_NAME); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET leader = '%e' WHERE id = %i", GangInfo[gangid][gLeader], gangid); mysql_tquery(connectionID, queryBuffer); }*/ PlayerInfo[targetid][pGang] = gangid; PlayerInfo[targetid][pGangRank] = rankid; SendClientMessageEx(targetid, COLOR_AQUA, "%s has made you a {00AA00}%s{33CCFF} in %s.", GetPlayerRPName(playerid), GangRanks[gangid][rankid], GangInfo[gangid][gName]); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has made %s a %s in %s.", GetPlayerRPName(playerid), GetPlayerRPName(targetid), GangRanks[gangid][rankid], GangInfo[gangid][gName]); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gang = %i, gangrank = %i WHERE uid = %i", gangid, rankid, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); return 1; } CMD:families(playerid, params[]) { return cmd_gangs(playerid, params); } CMD:gangs(playerid, params[]) { new gangid; if(sscanf(params, "i", gangid)) { SendClientMessage(playerid, COLOR_GREEN, "____________________________________"); for(new i = 0; i < MAX_GANGS; i ++) { if(GangInfo[i][gSetup]) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM users WHERE gang = %i", i); mysql_tquery(connectionID, queryBuffer, "OnPlayerListGangs", "ii", playerid, i); } } return 1; } if(!(0 <= gangid < MAX_GANGS) || !GangInfo[gangid][gSetup]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid gang."); } SendClientMessage(playerid, COLOR_GREEN, "|____ Members Online ____|"); foreach(new i : Player) { if(PlayerInfo[i][pLogged] && PlayerInfo[i][pGang] == gangid) { SendClientMessageEx(playerid, COLOR_GREY2, "(%i) %s %s", PlayerInfo[i][pGangRank], GangRanks[gangid][PlayerInfo[i][pGangRank]], GetPlayerRPName(i)); } } return 1; } CMD:points(playerid, params[]) { new name[32], pointid; if(sscanf(params, "i", pointid)) { SendClientMessage(playerid, COLOR_GREEN, "_______________________________________"); for(new i = 0; i < MAX_POINTS; i ++) { if(PointInfo[i][pExists]) { if(PointInfo[i][pCapturedGang] == -1) { name = "None"; } else { strcpy(name, GangInfo[PointInfo[i][pCapturedGang]][gName]); } SendClientMessageEx(playerid, COLOR_GREY2, "ID: %i | Name: %s | Owner: %s | Captured by: %s | Profits: $%i | Time: %ih", i, PointInfo[i][pName], name, PointInfo[i][pCapturedBy], PointInfo[i][pProfits], PointInfo[i][pTime]); } } SendClientMessage(playerid, COLOR_GREEN, "_______________________________________"); SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /points [pointid]"); return 1; } if(!(0 <= pointid < MAX_POINTS) || !PointInfo[pointid][pExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid point."); } if(PointInfo[pointid][pCapturedGang] >= 0) { strcpy(name, GangInfo[PointInfo[pointid][pCapturedGang]][gName]); } else { name = "None"; } SendClientMessageEx(playerid, COLOR_GREEN, "|____ %s ____|", PointInfo[pointid][pName]); SendClientMessageEx(playerid, COLOR_GREY2, "(Profits: $%i) - (Available in: %ih) - (Gang: %s) - (Captured by: %s)", PointInfo[pointid][pProfits], PointInfo[pointid][pTime], name, PointInfo[pointid][pCapturedBy]); if(PointInfo[pointid][pCapturer] != INVALID_PLAYER_ID) { SendClientMessageEx(playerid, COLOR_GREY2, "(Capturing: %s) - (Captured in: %i minutes)", GetPlayerRPName(PointInfo[pointid][pCapturer]), PointInfo[pointid][pCaptureTime]); } return 1; } CMD:turfs(playerid, params[]) { if(!PlayerInfo[playerid][pShowTurfs]) { ShowTurfsOnMap(playerid, true); SendClientMessage(playerid, COLOR_AQUA, "You will now see turfs on your mini-map."); } else { ShowTurfsOnMap(playerid, false); SendClientMessage(playerid, COLOR_AQUA, "You will no longer see any turfs on your mini-map."); } return 1; } CMD:lands(playerid, params[]) { if(!PlayerInfo[playerid][pShowLands]) { ShowLandsOnMap(playerid, true); SendClientMessage(playerid, COLOR_AQUA, "You will now see lands on your mini-map."); } else { ShowLandsOnMap(playerid, false); SendClientMessage(playerid, COLOR_AQUA, "You will no longer see any lands on your mini-map."); } return 1; } CMD:f(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /f [gang chat]"); } if(PlayerInfo[playerid][pGang] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any gang at the moment."); } if(PlayerInfo[playerid][pToggleGang]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the gang chat as you have it toggled."); } foreach(new i : Player) { if(PlayerInfo[i][pGang] == PlayerInfo[playerid][pGang] && !PlayerInfo[i][pToggleGang]) { if(strlen(params) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, COLOR_AQUA, "** [%i] %s %s: %.*s... **", PlayerInfo[playerid][pGangRank], GangRanks[PlayerInfo[playerid][pGang]][PlayerInfo[playerid][pGangRank]], GetPlayerRPName(playerid), MAX_SPLIT_LENGTH, params); SendClientMessageEx(i, COLOR_AQUA, "** [%i] %s %s: ...%s **", PlayerInfo[playerid][pGangRank], GangRanks[PlayerInfo[playerid][pGang]][PlayerInfo[playerid][pGangRank]], GetPlayerRPName(playerid), params[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, COLOR_AQUA, "** [%i] %s %s: %s **", PlayerInfo[playerid][pGangRank], GangRanks[PlayerInfo[playerid][pGang]][PlayerInfo[playerid][pGangRank]], GetPlayerRPName(playerid), params); } } } return 1; } CMD:gmembers(playerid, params[]) { if(PlayerInfo[playerid][pGang] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a gang at the moment."); } SendClientMessage(playerid, COLOR_GREEN, "|____ Members Online ____|"); foreach(new i : Player) { if(PlayerInfo[i][pGang] == PlayerInfo[playerid][pGang]) { SendClientMessageEx(playerid, COLOR_GREY2, "(%i) %s %s", PlayerInfo[i][pGangRank], GangRanks[PlayerInfo[i][pGang]][PlayerInfo[i][pGangRank]], GetPlayerRPName(i)); } } return 1; } CMD:gang(playerid, params[]) { new targetid, option[16], param[128]; if(PlayerInfo[playerid][pGang] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any gang at the moment."); } if(sscanf(params, "s[16]S()[128]", option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gang [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Invite, Kick, Rank, Roster, Online, Quit, Offlinekick"); SendClientMessage(playerid, COLOR_GREY3, "List of options: MOTD, Stash, Stats, Rankname, NPC, Upgrade"); return 1; } if(!strcmp(option, "invite", true)) { if(PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 5+ to use this command."); } if(sscanf(param, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gang [invite] [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pGang] != -1) { return SendClientMessage(playerid, COLOR_GREY, "That player is already apart of a gang."); } if(PlayerInfo[targetid][pFaction] >= 0) { return SendClientMessage(playerid, COLOR_GREY, "That player is apart of a faction and therefore can't join your gang."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM users WHERE gang = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer, "OnPlayerAttemptInviteGang", "ii", playerid, targetid); } else if(!strcmp(option, "kick", true)) { if(PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 5+ to use this command."); } if(sscanf(param, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gang [kick] [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerInfo[targetid][pGang] != PlayerInfo[playerid][pGang]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your gang."); } if(PlayerInfo[targetid][pGangRank] > PlayerInfo[playerid][pGangRank]) { return SendClientMessage(playerid, COLOR_GREY, "That player has a higher rank than you."); } Log_Write("log_gang", "%s (uid: %i) kicked %s (uid: %i) from %s (id: %i) as rank %s (%i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang], GangRanks[PlayerInfo[targetid][pGang]][PlayerInfo[targetid][pGangRank]], PlayerInfo[targetid][pGangRank]); PlayerInfo[targetid][pGang] = -1; PlayerInfo[targetid][pGangRank] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gang = -1, gangrank = 0 WHERE uid = %i", PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has kicked you from the gang.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "You have kicked %s from your gang.", GetPlayerRPName(targetid)); } else if(!strcmp(option, "rank", true)) { new rankid; if(PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 5+ to use this command."); } if(sscanf(param, "ui", targetid, rankid)) { return SendClientMessageEx(playerid, COLOR_GREY3, "[Usage]: /gang [rank] [playerid] [rankid (0-6)]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(rankid < 0 || rankid > PlayerInfo[playerid][pGangRank]) { return SendClientMessage(playerid, COLOR_GREY, "The rank specified is either invalid or higher than your rank."); } if(PlayerInfo[targetid][pGang] != PlayerInfo[playerid][pGang]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not apart of your gang."); } if(PlayerInfo[targetid][pGangRank] > PlayerInfo[playerid][pGangRank]) { return SendClientMessage(playerid, COLOR_GREY, "That player has a higher rank than you."); } PlayerInfo[targetid][pGangRank] = rankid; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gangrank = %i WHERE uid = %i", rankid, PlayerInfo[targetid][pID]); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(targetid, COLOR_AQUA, "%s has set your rank to {00AA00}%s{33CCFF} (%i).", GetPlayerRPName(playerid), GangRanks[PlayerInfo[playerid][pGang]][rankid], rankid); SendClientMessageEx(playerid, COLOR_AQUA, "You have set %s's rank to {00AA00}%s{33CCFF} (%i).", GetPlayerRPName(targetid), GangRanks[PlayerInfo[playerid][pGang]][rankid], rankid); Log_Write("log_gang", "%s (uid: %i) has set %s's (uid: %i) rank in %s (id: %i) to %s (%i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetPlayerNameEx(targetid), PlayerInfo[targetid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang], GangRanks[PlayerInfo[playerid][pGang]][rankid], rankid); } else if(!strcmp(option, "stash", true)) { if(PlayerInfo[playerid][pGangRank] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6+ to use this command."); } if(isnull(param) || strcmp(param, "confirm", true) != 0) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gang [stash] [confirm] (Moves the gang stash.)"); } GetPlayerPos(playerid, GangInfo[PlayerInfo[playerid][pGang]][gStashX], GangInfo[PlayerInfo[playerid][pGang]][gStashY], GangInfo[PlayerInfo[playerid][pGang]][gStashZ]); GangInfo[PlayerInfo[playerid][pGang]][gStashInterior] = GetPlayerInterior(playerid); GangInfo[PlayerInfo[playerid][pGang]][gStashWorld] = GetPlayerVirtualWorld(playerid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET stash_x = '%f', stash_y = '%f', stash_z = '%f', stashinterior = %i, stashworld = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gStashX], GangInfo[PlayerInfo[playerid][pGang]][gStashY], GangInfo[PlayerInfo[playerid][pGang]][gStashZ], GangInfo[PlayerInfo[playerid][pGang]][gStashInterior], GangInfo[PlayerInfo[playerid][pGang]][gStashWorld], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); ReloadGang(PlayerInfo[playerid][pGang]); SendClientMessageEx(playerid, COLOR_AQUA, "You have moved the gang stash to your location. /gstash to access your stash."); } else if(!strcmp(option, "stats", true)) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT COUNT(*) FROM users WHERE gang = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_GANG_INFORMATION, playerid); } else if(!strcmp(option, "roster", true)) { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT username, lastlogin, gangrank FROM users WHERE gang = %i ORDER BY gangrank DESC", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_GANG_ROSTER, playerid); } else if(!strcmp(option, "online", true)) { cmd_gmembers(playerid, "\1"); } else if(!strcmp(option, "quit", true)) { if(isnull(param) || strcmp(param, "confirm", true) != 0) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gang [quit] [confirm]"); } SendClientMessageEx(playerid, COLOR_AQUA, "You have quit %s as a {00AA00}%s{33CCFF} (%i).", GangInfo[PlayerInfo[playerid][pGang]][gName], GangRanks[PlayerInfo[playerid][pGang]][PlayerInfo[playerid][pGangRank]], PlayerInfo[playerid][pGangRank]); Log_Write("log_gang", "%s (uid: %i) has quit %s (id: %i) has rank %s (%i).", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GangInfo[PlayerInfo[playerid][pGang]][gName], PlayerInfo[playerid][pGang], GangRanks[PlayerInfo[playerid][pGang]][PlayerInfo[playerid][pGangRank]], PlayerInfo[playerid][pGangRank]); PlayerInfo[playerid][pGang] = -1; PlayerInfo[playerid][pGangRank] = 0; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gang = -1, gangrank = 0 WHERE uid = %i", PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); } else if(!strcmp(option, "offlinekick", true)) { new username[MAX_PLAYER_NAME]; if(PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 5+ to use this command."); } if(sscanf(param, "s[24]", username)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gang [offlinekick] [username]"); } if(IsPlayerOnline(username)) { return SendClientMessage(playerid, COLOR_GREY, "That player is already online and logged in. Use '/gang kick' instead."); } mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid, gang, gangrank FROM users WHERE username = '%e'", username); mysql_tquery(connectionID, queryBuffer, "OnPlayerOfflineKickGang", "is", playerid, username); } /* else if(!strcmp(option, "name", true)) { if(PlayerInfo[playerid][pGangRank] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6+ to use this command."); } if(isnull(param) || strlen(params) > 32) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gang [name] [text]"); } strcpy(GangInfo[PlayerInfo[playerid][pGang]][gName], param, 32); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET name = '%e' WHERE id = %i", param, PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); ReloadGang(PlayerInfo[playerid][pGang]); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the name of your gang to {00AA00}%s{33CCFF}.", param); }*/ else if(!strcmp(option, "motd", true)) { if(PlayerInfo[playerid][pGangRank] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6+ to use this command."); } if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gang [motd] [text]"); } strcpy(GangInfo[PlayerInfo[playerid][pGang]][gMOTD], param, 128); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET motd = '%e' WHERE id = %i", param, PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); ReloadGang(PlayerInfo[playerid][pGang]); SendClientMessage(playerid, COLOR_AQUA, "You have changed the MOTD for your gang."); } else if(!strcmp(option, "rankname", true)) { new rankid, rank[32]; if(PlayerInfo[playerid][pGangRank] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6+ to use this command."); } if(sscanf(param, "is[32]", rankid, rank)) { SendClientMessage(playerid, COLOR_GREEN, "|_____ Rank Names _____|"); for(new i = 0; i < 7; i ++) { if(isnull(GangRanks[PlayerInfo[playerid][pGang]][i])) SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: (empty)", i); else SendClientMessageEx(playerid, COLOR_GREY2, "Rank %i: %s", i, GangRanks[PlayerInfo[playerid][pGang]][i]); } return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gang [rankname] [slot (0-6)] [name]"); } if(!(0 <= rankid <= 6)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid rank."); } strcpy(GangRanks[PlayerInfo[playerid][pGang]][rankid], rank, 32); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO gangranks VALUES(%i, %i, '%e') ON DUPLICATE KEY UPDATE name = '%e'", PlayerInfo[playerid][pGang], rankid, rank, rank); mysql_tquery(connectionID, queryBuffer); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the name of rank %i to {00AA00}%s{33CCFF}.", rankid, rank); } else if(!strcmp(option, "npc", true)) { new type, confirm[10]; if(PlayerInfo[playerid][pGangRank] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6+ to use this command."); } if(sscanf(param, "is[10]", type, confirm)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gang [npc] [slot] [confirm]"); SendClientMessage(playerid, COLOR_GREY3, "List of slots: (1) Arms Dealer (2) Drug Dealer"); return 1; } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0 || PlayerInfo[playerid][pJoinedEvent] > 0 || PlayerInfo[playerid][pPaintball]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command from within the vehicle."); } if(!isnull(confirm) && !strcmp(confirm, "confirm", true)) { if(type == 1) { if(!GangInfo[PlayerInfo[playerid][pGang]][gArmsDealer]) { return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have the arms dealer upgrade. (/gang upgrade)"); } GetPlayerPos(playerid, GangInfo[PlayerInfo[playerid][pGang]][gArmsX], GangInfo[PlayerInfo[playerid][pGang]][gArmsY], GangInfo[PlayerInfo[playerid][pGang]][gArmsZ]); SetPlayerPos(playerid, GangInfo[PlayerInfo[playerid][pGang]][gArmsX] + 1.0, GangInfo[PlayerInfo[playerid][pGang]][gArmsY], GangInfo[PlayerInfo[playerid][pGang]][gArmsZ] + 1.0); GetPlayerFacingAngle(playerid, GangInfo[PlayerInfo[playerid][pGang]][gArmsA]); GangInfo[PlayerInfo[playerid][pGang]][gArmsWorld] = GetPlayerVirtualWorld(playerid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET arms_x = '%f', arms_y = '%f', arms_z = '%f', arms_a = '%f', armsworld = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gArmsX], GangInfo[PlayerInfo[playerid][pGang]][gArmsY], GangInfo[PlayerInfo[playerid][pGang]][gArmsZ], GangInfo[PlayerInfo[playerid][pGang]][gArmsA], GangInfo[PlayerInfo[playerid][pGang]][gArmsWorld], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); ReloadGang(PlayerInfo[playerid][pGang]); SendClientMessage(playerid, COLOR_AQUA, "You have moved the position of the arms dealer for your gang."); } else if(type == 2) { if(!GangInfo[PlayerInfo[playerid][pGang]][gDrugDealer]) { return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have the drug dealer upgrade. (/gang upgrade)"); } GetPlayerPos(playerid, GangInfo[PlayerInfo[playerid][pGang]][gDrugX], GangInfo[PlayerInfo[playerid][pGang]][gDrugY], GangInfo[PlayerInfo[playerid][pGang]][gDrugZ]); SetPlayerPos(playerid, GangInfo[PlayerInfo[playerid][pGang]][gDrugX] + 1.0, GangInfo[PlayerInfo[playerid][pGang]][gDrugY], GangInfo[PlayerInfo[playerid][pGang]][gDrugZ] + 1.0); GetPlayerFacingAngle(playerid, GangInfo[PlayerInfo[playerid][pGang]][gDrugA]); GangInfo[PlayerInfo[playerid][pGang]][gDrugWorld] = GetPlayerVirtualWorld(playerid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET drug_x = '%f', drug_y = '%f', drug_z = '%f', drug_a = '%f', drugworld = %i WHERE id = %i", GangInfo[PlayerInfo[playerid][pGang]][gDrugX], GangInfo[PlayerInfo[playerid][pGang]][gDrugY], GangInfo[PlayerInfo[playerid][pGang]][gDrugZ], GangInfo[PlayerInfo[playerid][pGang]][gDrugA], GangInfo[PlayerInfo[playerid][pGang]][gDrugWorld], PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); ReloadGang(PlayerInfo[playerid][pGang]); SendClientMessage(playerid, COLOR_AQUA, "You have moved the position of the drug dealer for your gang."); } } } else if(!strcmp(option, "upgrade", true)) { if(PlayerInfo[playerid][pGangRank] < 6) { return SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 6+ to use this command."); } new title[48], string[1024] = "Perk\tDescription\tCost"; strcat(string, "\nDrug dealer\tAn NPC which sells individually stocked drugs\t{F7A763}500 GP {FFFFFF}+{00AA00} $50,000"); strcat(string, "\nArms dealer\tAn NPC which sells individually stocked weapons\t{F7A763}500 GP {FFFFFF}+{00AA00} $50,000"); strcat(string, "\nDuel arena\tAn OOC 1v1 duel arena for your gang.\t{F7A763}400 GP {FFFFFF}+{00AA00} $75,000"); strcat(string, "\nMapping\tUp to 50 mapped objects for your gang.\t{F7A763}4500 GP {FFFFFF}+{00AA00} $100,000"); strcat(string, "\nInterior\tCustom interior exclusively for your gang.\t{F7A763}5000 GP {FFFFFF}+{00AA00} $100,000"); if(GangInfo[PlayerInfo[playerid][pGang]][gLevel] == 1) { strcat(string, "\nLevel Up\tAdvance your gang's level to 2/3.\t{F7A763}6000 GP {FFFFFF}+{00AA00} $75,000"); } else if(GangInfo[PlayerInfo[playerid][pGang]][gLevel] == 2) { strcat(string, "\nLevel Up\tAdvance your gang's level to 3/3.\t{F7A763}12000 GP {FFFFFF}+{00AA00} $100,000"); } format(title, sizeof(title), "Gang upgrades (Your gang has %i GP.)", GangInfo[PlayerInfo[playerid][pGang]][gPoints]); ShowPlayerDialog(playerid, DIALOG_GANGPOINTSHOP, DIALOG_STYLE_TABLIST_HEADERS, title, string, "Select", "Cancel"); } return 1; } CMD:gstash(playerid, params[]) { if(PlayerInfo[playerid][pGang] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a gang at the moment."); } if(!IsPlayerInRangeOfPoint(playerid, 5.0, GangInfo[PlayerInfo[playerid][pGang]][gStashX], GangInfo[PlayerInfo[playerid][pGang]][gStashY], GangInfo[PlayerInfo[playerid][pGang]][gStashZ])) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of your gang stash."); } ShowDialogToPlayer(playerid, DIALOG_GANGSTASH); return 1; } CMD:bandana(playerid, params[]) { if(PlayerInfo[playerid][pGang] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a gang at the moment."); } if(!PlayerInfo[playerid][pBandana]) { PlayerInfo[playerid][pBandana] = 1; SendClientMessage(playerid, COLOR_AQUA, "You have enabled your bandana. Your nametag color has been set to your gang color."); } else { PlayerInfo[playerid][pBandana] = 0; SendClientMessage(playerid, COLOR_AQUA, "You have disabled your bandana. Your nametag color was reset back to normal."); } return 1; } CMD:clothes(playerid, params[]) { new businessid = GetInsideBusiness(playerid); if(PlayerInfo[playerid][pGang] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a gang at the moment."); } if(businessid == -1 || BusinessInfo[businessid][bType] != BUSINESS_CLOTHES) { return SendClientMessage(playerid, COLOR_GREY, "You need to be inside of a clothing shop to do this."); } if(!GetGangSkinCount(PlayerInfo[playerid][pGang])) { return SendClientMessage(playerid, COLOR_GREY, "There are no skins setup for your gang."); } PlayerInfo[playerid][pSkinSelected] = -1; ShowPlayerDialog(playerid, DIALOG_GANGSKINS, DIALOG_STYLE_MSGBOX, "Skin selection", "Press {00AA00}>> Next{A9C4E4} to browse through available gang skins.", ">> Next", "Confirm"); return 1; } CMD:gbuyvehicle(playerid, params[]) { static string[4096]; if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not rank 5+ in any gang at the moment."); } if(!IsPlayerInRangeOfPoint(playerid, 3.0, 542.0433, -1293.5909, 17.2422)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the Grotti car dealership."); } if(GetGangVehicles(PlayerInfo[playerid][pGang]) >= GetGangVehicleLimit(PlayerInfo[playerid][pGang])) { return SendClientMessageEx(playerid, COLOR_GREY, "Your gang can't have more than %i vehicles at its level.", GetGangVehicleLimit(PlayerInfo[playerid][pGang])); } if(isnull(string)) { string = "Category\tVehicle\tPrice"; for(new i = 0; i < sizeof(vehicleArray); i ++) { format(string, sizeof(string), "%s\n%s\t%s\t{00AA00}$%i{FFFFFF}", string, vehicleArray[i][carCategory], vehicleNames[vehicleArray[i][carModel] - 400], vehicleArray[i][carPrice]); } } PlayerInfo[playerid][pGangCar] = 1; ShowPlayerDialog(playerid, DIALOG_BUYVEHICLE, DIALOG_STYLE_TABLIST_HEADERS, "Grotti Dealership", string, "Buy", "Cancel"); return 1; } CMD:gpark(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid), id = VehicleInfo[vehicleid][vID]; if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not rank 5+ in any gang at the moment."); } if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You are not driving any of your gang vehicles."); } if(VehicleInfo[vehicleid][vGang] != PlayerInfo[playerid][pGang]) { return SendClientMessage(playerid, COLOR_GREY, "You can't park this vehicle as it doesn't belong to your gang."); } // Save the vehicle's information. GetVehiclePos(vehicleid, VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ]); GetVehicleZAngle(vehicleid, VehicleInfo[vehicleid][vPosA]); VehicleInfo[vehicleid][vInterior] = GetPlayerInterior(playerid); VehicleInfo[vehicleid][vWorld] = GetPlayerVirtualWorld(playerid); SendClientMessage(playerid, COLOR_AQUA, "** Gang vehicle parked. It will now spawn here."); // Update the database record with the new information, then despawn the vehicle. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET pos_x = '%f', pos_y = '%f', pos_z = '%f', pos_a = '%f', interior = %i, world = %i WHERE id = %i", VehicleInfo[vehicleid][vPosX], VehicleInfo[vehicleid][vPosY], VehicleInfo[vehicleid][vPosZ], VehicleInfo[vehicleid][vPosA], VehicleInfo[vehicleid][vInterior], VehicleInfo[vehicleid][vWorld], VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); SaveVehicleModifications(vehicleid); DespawnVehicle(vehicleid, false); // Finally, we reload the vehicle from the database. mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT * FROM vehicles WHERE id = %i", id); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOAD_VEHICLES, -1); return 1; } CMD:gfindcar(playerid, params[]) { new string[512], count; if(PlayerInfo[playerid][pGang] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of a gang at the moment."); } string = "#\tModel\tLocation"; for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && VehicleInfo[i][vID] > 0 && VehicleInfo[i][vGang] == PlayerInfo[playerid][pGang]) { format(string, sizeof(string), "%s\n%i\t%s\t%s", string, count + 1, GetVehicleName(i), GetVehicleZoneName(i)); count++; } } if(!count) { return SendClientMessage(playerid, COLOR_GREY, "Your gang has no vehicles which you can track."); } ShowPlayerDialog(playerid, DIALOG_GANGFINDCAR, DIALOG_STYLE_TABLIST_HEADERS, "Gang vehicles", string, "Track", "Cancel"); return 1; } CMD:grespawncars(playerid, params[]) { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not rank 5+ in any gang at the moment."); } for(new i = 1; i < MAX_VEHICLES; i ++) { if(IsValidVehicle(i) && VehicleInfo[i][vID] > 0 && VehicleInfo[i][vGang] == PlayerInfo[playerid][pGang] && !IsVehicleOccupied(i)) { SetVehicleToRespawn(i); } } SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s[%i] has respawned their gang vehicles.", GetPlayerRPName(playerid), playerid); SendClientMessage(playerid, COLOR_YELLOW, "You have respawned all of your unoccupied gang vehicles."); return 1; } CMD:gsellcar(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not rank 5+ in any gang at the moment."); } if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You are not driving any of your gang vehicles."); } if(VehicleInfo[vehicleid][vGang] != PlayerInfo[playerid][pGang]) { return SendClientMessage(playerid, COLOR_GREY, "You can't sell this vehicle as it doesn't belong to your gang."); } if(!IsPlayerInRangeOfPoint(playerid, 8.0, 542.0433, -1293.5909, 17.2422)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the Grotti car dealership."); } if(strcmp(params, "confirm", true) != 0) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gsellcar [confirm]"); SendClientMessageEx(playerid, COLOR_GREY3, "This command permanently deletes your gang vehicle. You will receive $%i back.", percent(VehicleInfo[vehicleid][vPrice], 75)); return 1; } GivePlayerCash(playerid, percent(VehicleInfo[vehicleid][vPrice], 75)); SendClientMessageEx(playerid, COLOR_GREEN, "You have sold your %s to the dealership and received $%i back.", GetVehicleName(vehicleid), percent(VehicleInfo[vehicleid][vPrice], 75)); Log_Write("log_gang", "%s (uid: %i) sold their gang owned %s (id: %i) to the dealership for $%i", GetPlayerNameEx(playerid), PlayerInfo[playerid][pID], GetVehicleName(vehicleid), VehicleInfo[vehicleid][vID], percent(VehicleInfo[vehicleid][vPrice], 75)); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM vehicles WHERE id = %i", VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); DespawnVehicle(vehicleid, false); return 1; } CMD:createpoint(playerid, params[]) { new type, name[32]; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pGangMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[32]", type, name)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /createpoint [type] [name]"); SendClientMessage(playerid, COLOR_GREY3, "List of types: (1) Drug factory (2) Drug den (3) Crack house (4) Auto export (5) Fuel"); SendClientMessage(playerid, COLOR_GREY3, "List of types: (6) Mat pickup 1 (7) Mat pickup 2 (8) Mat factory 1 (9) Mat factory 2"); return 1; } if(!(0 <= type <= 9)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } for(new i = 0; i < MAX_POINTS; i ++) { if(!PointInfo[i][pExists]) { GetPlayerPos(playerid, PointInfo[i][pPointX], PointInfo[i][pPointY], PointInfo[i][pPointZ]); strcpy(PointInfo[i][pName], name, 32); strcpy(PointInfo[i][pCapturedBy], "No-one", MAX_PLAYER_NAME); PointInfo[i][pExists] = 1; PointInfo[i][pType] = type; PointInfo[i][pProfits] = 0; PointInfo[i][pCapturedGang] = -1; PointInfo[i][pTime] = 24; PointInfo[i][pPointInterior] = GetPlayerInterior(playerid); PointInfo[i][pPointWorld] = GetPlayerVirtualWorld(playerid); PointInfo[i][pCaptureTime] = 0; PointInfo[i][pCapturer] = INVALID_PLAYER_ID; PointInfo[i][pText] = Text3D:INVALID_3DTEXT_ID; PointInfo[i][pPickup] = -1; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO points (id, name, type, point_x, point_y, point_z, pointinterior, pointworld) VALUES(%i, '%e', %i, '%f', '%f', '%f', %i, %i)", i, name, type, PointInfo[i][pPointX], PointInfo[i][pPointY], PointInfo[i][pPointZ], PointInfo[i][pPointInterior], PointInfo[i][pPointWorld]); mysql_tquery(connectionID, queryBuffer); ReloadPoint(i); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has created point {F7A763}%s{FF6347}.", GetPlayerRPName(playerid), name); SendClientMessageEx(playerid, COLOR_AQUA, "You have created point {F7A763}%s{33CCFF}. /editpoint %i to edit this point.", name, i); return 1; } } return 1; } CMD:gotopoint(playerid, params[]) { new pointid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", pointid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gotopoint [pointid]"); } if(!(0 <= pointid < MAX_POINTS) || !PointInfo[pointid][pExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid point."); } GameTextForPlayer(playerid, "~w~Teleported", 5000, 1); SetPlayerPos(playerid, PointInfo[pointid][pPointX], PointInfo[pointid][pPointY], PointInfo[pointid][pPointZ]); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); return 1; } CMD:editpoint(playerid, params[]) { new pointid, option[14], param[32]; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pGangMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[14]S()[32]", pointid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editpoint [pointid] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Name, Location, CapturedBy, Gang, Type, Profits, Time"); return 1; } if(!(0 <= pointid < MAX_POINTS) || !PointInfo[pointid][pExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid point."); } if(!strcmp(option, "name", true)) { if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editpoint [pointid] [name] [text]"); } strcpy(PointInfo[pointid][pName], param, 32); ReloadPoint(pointid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET name = '%e' WHERE id = %i", PointInfo[pointid][pName], pointid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the name of point %i to %s.", GetPlayerRPName(playerid), pointid, param); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the name of point %i to {F7A763}%s{33CCFF}.", pointid, param); } else if(!strcmp(option, "location", true)) { GetPlayerPos(playerid, PointInfo[pointid][pPointX], PointInfo[pointid][pPointY], PointInfo[pointid][pPointZ]); PointInfo[pointid][pPointInterior] = GetPlayerInterior(playerid); PointInfo[pointid][pPointWorld] = GetPlayerVirtualWorld(playerid); ReloadPoint(pointid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET point_x = '%f', point_y = '%f', point_z = '%f', pointinterior = %i, pointworld = %i WHERE id = %i", PointInfo[pointid][pPointX], PointInfo[pointid][pPointY], PointInfo[pointid][pPointZ], PointInfo[pointid][pPointInterior], PointInfo[pointid][pPointWorld], pointid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has moved the location of point %i.", GetPlayerRPName(playerid), pointid); SendClientMessageEx(playerid, COLOR_AQUA, "You have moved the location of point %i.", pointid); } else if(!strcmp(option, "capturedby", true)) { if(isnull(param) || strlen(params) > 24) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editpoint [pointid] [capturedby] [name]"); } strcpy(PointInfo[pointid][pCapturedBy], param, MAX_PLAYER_NAME); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET capturedby = '%e' WHERE id = %i", PointInfo[pointid][pCapturedBy], pointid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the capturer of point %i to %s.", GetPlayerRPName(playerid), pointid, param); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the capturer of point %i to {F7A763}%s{33CCFF}.", pointid, param); } else if(!strcmp(option, "gang", true)) { new gangid; if(sscanf(param, "i", gangid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editpoint [pointid] [gang] [gangid (-1 = none)]"); } if(!(-1 <= gangid < MAX_GANGS) || (gangid >= 0 && !GangInfo[gangid][gSetup])) { return SendClientMessage(playerid, COLOR_GREY, "Invalid gang."); } PointInfo[pointid][pCapturedGang] = gangid; ReloadPoint(pointid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET capturedgang = %i WHERE id = %i", PointInfo[pointid][pCapturedBy], pointid); mysql_tquery(connectionID, queryBuffer); if(gangid == -1) { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reset the capturing gang of point %i.", GetPlayerRPName(playerid), pointid); SendClientMessageEx(playerid, COLOR_AQUA, "You have reset the capturing gang of point %i.", pointid); } else { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the capturing gang of point %i to %s.", GetPlayerRPName(playerid), pointid, GangInfo[gangid][gName]); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the capturing gang of point %i to {00AA00}%s{33CCFF}.", pointid, GangInfo[gangid][gName]); } } else if(!strcmp(option, "type", true)) { new type; if(sscanf(param, "i", type)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editpoint [pointid] [type] [value]"); SendClientMessage(playerid, COLOR_GREY3, "List of types: (1) Drug factory (2) Drug den (3) Crack house (4) Auto export (5) Fuel"); SendClientMessage(playerid, COLOR_GREY3, "List of types: (6) Mat pickup 1 (7) Mat pickup 2 (8) Mat factory 1 (9) Mat factory 2"); return 1; } if(!(0 <= type <= 9)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } PointInfo[pointid][pType] = type; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET type = %i WHERE id = %i", PointInfo[pointid][pType], pointid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the type of point %i to %i.", GetPlayerRPName(playerid), pointid, type); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the type of point %i to %i.", pointid, type); } else if(!strcmp(option, "profits", true)) { new value; if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editpoint [pointid] [profits] [value]"); } PointInfo[pointid][pProfits] = value; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET profits = %i WHERE id = %i", PointInfo[pointid][pProfits], pointid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the profits of point %i to $%i.", GetPlayerRPName(playerid), pointid, value); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the profits of point %i to $%i.", pointid, value); } else if(!strcmp(option, "time", true)) { new value; if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editpoint [pointid] [time] [hours (0-24)]"); } if(!(0 <= value <= 24)) { return SendClientMessage(playerid, COLOR_GREY, "The amount of hours must range from 0 to 24."); } PointInfo[pointid][pTime] = value; if(PointInfo[pointid][pTime] == 0) { SendClientMessageToAllEx(COLOR_YELLOW, "Point wars: %s is now available to capture.", PointInfo[pointid][pName]); } else { PointInfo[pointid][pCapturer] = INVALID_PLAYER_ID; PointInfo[pointid][pCaptureTime] = 0; } ReloadPoint(pointid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE points SET time = %i WHERE id = %i", PointInfo[pointid][pTime], pointid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the time of point %i to %i hours.", GetPlayerRPName(playerid), pointid, value); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the time of point %i to %i hours.", pointid, value); } return 1; } CMD:removepoint(playerid, params[]) { new pointid; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pGangMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", pointid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removepoint [pointid]"); } if(!(0 <= pointid < MAX_POINTS) || !PointInfo[pointid][pExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid point."); } DestroyDynamic3DTextLabel(PointInfo[pointid][pText]); DestroyDynamicPickup(PointInfo[pointid][pPickup]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM points WHERE id = %i", pointid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has deleted point %s.", GetPlayerRPName(playerid), PointInfo[pointid][pName]); SendClientMessageEx(playerid, COLOR_AQUA, "You have deleted point {F7A763}%s{33CCFF}.", PointInfo[pointid][pName]); PointInfo[pointid][pExists] = 0; PointInfo[pointid][pCapturedGang] = -1; PointInfo[pointid][pTime] = 0; return 1; } CMD:capture(playerid, params[]) { if(PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not rank 5+ in any gang at the moment."); } if(PlayerInfo[playerid][pCapturingPoint] >= 0) { return SendClientMessage(playerid, COLOR_GREY, "You are already attempting to capture the point."); } if(PlayerInfo[playerid][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "You can't capture a point while injured."); } if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return SendClientMessage(playerid, COLOR_GREY, "You must be onfoot in order to use this command."); } for(new i = 0; i < MAX_POINTS; i ++) { if(PointInfo[i][pExists] && IsPlayerInRangeOfPoint(playerid, 1.0, PointInfo[i][pPointX], PointInfo[i][pPointY], PointInfo[i][pPointZ]) && GetPlayerInterior(playerid) == PointInfo[i][pPointInterior] && GetPlayerVirtualWorld(playerid) == PointInfo[i][pPointWorld]) { if(PointInfo[i][pTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "This point is not available to capture yet."); } if(PointInfo[i][pCapturer] == playerid) { return SendClientMessage(playerid, COLOR_GREY, "This point is already being captured by you."); } if(PointInfo[i][pCapturer] != INVALID_PLAYER_ID && PlayerInfo[PointInfo[i][pCapturer]][pGang] == PlayerInfo[playerid][pGang]) { return SendClientMessage(playerid, COLOR_GREY, "This point is already being captured by your gang."); } foreach(new x : Player) { if(PlayerInfo[x][pCapturingPoint] == i && PlayerInfo[x][pCaptureTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "Someone else is already attempting to capture. Please wait until they're done."); } } PlayerInfo[playerid][pCapturingPoint] = i; PlayerInfo[playerid][pCaptureTime] = 10; GetPlayerPos(playerid, PlayerInfo[playerid][pPointX], PlayerInfo[playerid][pPointY], PlayerInfo[playerid][pPointZ]); SendProximityMessage(playerid, 20.0, COLOR_RED, "(( %s is attempting to capture %s. ))", GetPlayerRPName(playerid), PointInfo[i][pName]); return 1; } } SendClientMessage(playerid, COLOR_GREY, "You are not in range of any points."); return 1; } CMD:claim(playerid, params[]) { new turfid, count; if((PlayerInfo[playerid][pGang] == -1 || PlayerInfo[playerid][pGangRank] < 5) && GetFactionType(playerid) != FACTION_POLICE) { return SendClientMessage(playerid, COLOR_GREY, "You are not rank 5+ in a gang or apart of law enforcement."); } if((turfid = GetNearbyTurf(playerid)) == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any turfs which you can claim."); } if(GetFactionType(playerid) == FACTION_POLICE && PlayerInfo[playerid][pGang] >= 0) { return SendClientMessage(playerid, COLOR_GREY, "You're not allowed to claim turfs as a law enforcer and a gang member."); } if(PlayerInfo[playerid][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "You can't claim a turf while injured."); } if(TurfInfo[turfid][tTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "This turf is not yet available to claim."); } if(TurfInfo[turfid][tType] == 8) { return SendClientMessage(playerid, COLOR_GREY, "This is a locked turf and therefore cannot be claimed."); } if(TurfInfo[turfid][tCapturer] == playerid) { return SendClientMessage(playerid, COLOR_GREY, "This turf is already being captured by you."); } if(GetFactionType(playerid) != FACTION_POLICE && TurfInfo[turfid][tCapturer] != INVALID_PLAYER_ID && PlayerInfo[TurfInfo[turfid][tCapturer]][pGang] == PlayerInfo[playerid][pGang]) { return SendClientMessage(playerid, COLOR_GREY, "This turf is already being claimed by your gang."); } if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return SendClientMessage(playerid, COLOR_GREY, "You must be onfoot in order to use this command."); } foreach(new i : Player) { if(i != playerid && GetNearbyTurf(i) == turfid && !PlayerInfo[i][pInjured] && !PlayerInfo[i][pAdminDuty] && !PlayerInfo[i][pAcceptedHelp] && GetPlayerState(i) != PLAYER_STATE_SPECTATING) { if(GetFactionType(playerid) != FACTION_POLICE && GetFactionType(i) == FACTION_POLICE && !PlayerInfo[i][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "You are unable to claim right now. There are cops still alive in your turf."); } else if(PlayerInfo[i][pGang] >= 0 && PlayerInfo[i][pGang] != PlayerInfo[playerid][pGang] && !PlayerInfo[i][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "You are unable to claim right now. There are rival gang members still alive in your turf."); } } } if(PlayerInfo[playerid][pGang] >= 0) { if(GangInfo[PlayerInfo[playerid][pGang]][gTurfTokens] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "Your gang doesn't have any turf tokens left."); } foreach(new i : Player) { if(GetNearbyTurf(i) == turfid && PlayerInfo[i][pGang] == PlayerInfo[playerid][pGang]) { count++; } } if(count < 3) { return SendClientMessage(playerid, COLOR_GREY, "You need at least 3 members of your gang in this turf to claim it."); } else { GangInfo[PlayerInfo[playerid][pGang]][gTurfTokens]--; SendTurfMessage(turfid, COLOR_YELLOW, "Turf wars: %s has attempted to claim %s for %s. It will be their turf in 10 minutes!", GetPlayerRPName(playerid), TurfInfo[turfid][tName], GangInfo[PlayerInfo[playerid][pGang]][gName]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE gangs SET turftokens = turftokens - 1 WHERE id = %i", PlayerInfo[playerid][pGang]); mysql_tquery(connectionID, queryBuffer); } } else if(GetFactionType(playerid) == FACTION_POLICE && PlayerInfo[playerid][pGang] == -1) { if(FactionInfo[PlayerInfo[playerid][pFaction]][fTurfTokens] <= 0) { return SendClientMessage(playerid, COLOR_GREY, "Your faction doesn't have any turf tokens left."); } FactionInfo[PlayerInfo[playerid][pFaction]][fTurfTokens]--; SendTurfMessage(turfid, COLOR_YELLOW, "Turf wars: Officer %s has attempted to claim back %s. It will be civilian owned in 10 minutes!", GetPlayerRPName(playerid), TurfInfo[turfid][tName]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE factions SET turftokens = turftokens - 1 WHERE id = %i", PlayerInfo[playerid][pFaction]); mysql_tquery(connectionID, queryBuffer); } TurfInfo[turfid][tCapturer] = playerid; TurfInfo[turfid][tCaptureTime] = 10; ReloadTurf(turfid); return 1; } CMD:reclaim(playerid, params[]) { new turfid; if(PlayerInfo[playerid][pGang] == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of any gang at the moment."); } if((turfid = GetNearbyTurf(playerid)) == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any turfs."); } if(GetFactionType(playerid) == FACTION_POLICE && PlayerInfo[playerid][pGang] >= 0) { return SendClientMessage(playerid, COLOR_GREY, "You're not allowed to claim turfs as a law enforcer and a gang member."); } if(PlayerInfo[playerid][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "You can't reclaim a turf while injured."); } if(TurfInfo[turfid][tCapturedGang] != PlayerInfo[playerid][pGang]) { return SendClientMessage(playerid, COLOR_GREY, "This turf does not belong to your gang. Therefore you can't reclaim it."); } if(TurfInfo[turfid][tType] == 8) { return SendClientMessage(playerid, COLOR_GREY, "This is a locked turf and therefore cannot be claimed."); } if(TurfInfo[turfid][tCapturer] == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "This turf is not being claimed by anyone. Therefore you can't reclaim it."); } foreach(new i : Player) { if(i != playerid && GetNearbyTurf(i) == turfid) { if(GetFactionType(playerid) != FACTION_POLICE && GetFactionType(i) == FACTION_POLICE && !PlayerInfo[i][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "You are unable to claim right now. There are cops still alive in your turf."); } else if(PlayerInfo[i][pGang] >= 0 && PlayerInfo[i][pGang] != PlayerInfo[playerid][pGang] && !PlayerInfo[i][pInjured]) { return SendClientMessage(playerid, COLOR_GREY, "You are unable to claim right now. There are rival gang members still alive in your turf."); } } } SendTurfMessage(turfid, COLOR_YELLOW, "Turf wars: %s has reclaimed %s for %s and ended the turf war.", GetPlayerRPName(playerid), TurfInfo[turfid][tName], GangInfo[PlayerInfo[playerid][pGang]][gName]); TurfInfo[turfid][tCapturer] = INVALID_PLAYER_ID; TurfInfo[turfid][tCaptureTime] = 0; ReloadTurf(turfid); return 1; } CMD:guninv(playerid, params[]) { SendClientMessage(playerid, COLOR_GREEN, "|____ My Weapons ____|"); for(new i = 0; i < 13; i ++) { if(PlayerInfo[playerid][pWeapons][i] > 0) { SendClientMessageEx(playerid, COLOR_GREY2, "(ID: %i) %s", PlayerInfo[playerid][pWeapons][i], GetWeaponNameEx(PlayerInfo[playerid][pWeapons][i])); } } return 1; } CMD:armsdealer(playerid, params[]) { if(PlayerInfo[playerid][pHours] < 2 || PlayerInfo[playerid][pWeaponRestricted] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are either weapon restricted or you played less than two playing hours."); } for(new i = 0; i < MAX_GANGS; i ++) { if(GangInfo[i][gArmsDealer] && IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[i][gArmsX], GangInfo[i][gArmsY], GangInfo[i][gArmsZ]) && GetPlayerVirtualWorld(playerid) == GangInfo[i][gArmsWorld]) { PlayerInfo[playerid][pDealerGang] = i; ShowDialogToPlayer(playerid, DIALOG_GANGARMSDEALER); return 1; } } SendClientMessage(playerid, COLOR_GREY, "You are not in range of any gang owned arms dealers."); return 1; } CMD:drugdealer(playerid, params[]) { for(new i = 0; i < MAX_GANGS; i ++) { if(GangInfo[i][gDrugDealer] && IsPlayerInRangeOfPoint(playerid, 3.0, GangInfo[i][gDrugX], GangInfo[i][gDrugY], GangInfo[i][gDrugZ]) && GetPlayerVirtualWorld(playerid) == GangInfo[i][gDrugWorld]) { PlayerInfo[playerid][pDealerGang] = i; ShowDialogToPlayer(playerid, DIALOG_GANGDRUGDEALER); return 1; } } SendClientMessage(playerid, COLOR_GREY, "You are not in range of any gang owned drug dealers."); return 1; } CMD:loadammo(playerid, params[]) { new weaponid, type[14]; if(sscanf(params, "is[14]", weaponid, type)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /loadammo [weaponid] [type] (/guninv for weapon IDs)"); SendClientMessage(playerid, COLOR_GREY3, "List of types: Normal, HollowPoint, PoisonTip, FMJ"); return 1; } if(!(1 <= weaponid <= 46) || PlayerInfo[playerid][pWeapons][weaponSlotIDs[weaponid]] != weaponid) { return SendClientMessage(playerid, COLOR_GREY, "You don't have that weapon. /guninv for a list of your weapons."); } if(!(22 <= weaponid <= 34)) { return SendClientMessage(playerid, COLOR_GREY, "That weapon can't be loaded with ammunition."); } if(PlayerInfo[playerid][pJoinedEvent] > 0 || PlayerInfo[playerid][pPaintball] > 0 || PlayerInfo[playerid][pDueling] != INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(!strcmp(type, "normal", true)) { PlayerInfo[playerid][pAmmoType] = AMMOTYPE_NORMAL; PlayerInfo[playerid][pAmmoWeapon] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s loads their %s with normal ammunition.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid)); SendClientMessage(playerid, COLOR_AQUA, "You have loaded this weapon with {00AA00}Normal{33CCFF} ammunition."); ApplyAnimation(playerid, "PYTHON", "python_reload", 4.1, 0, 0, 0, 0, 0); } else if(!strcmp(type, "hollowpoint", true)) { if(!PlayerInfo[playerid][pHPAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "You have no hollow point ammunition to load this weapon with."); } PlayerInfo[playerid][pAmmoType] = AMMOTYPE_HP; PlayerInfo[playerid][pAmmoWeapon] = weaponid; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s loads their %s with hollow point ammunition.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid)); SendClientMessage(playerid, COLOR_AQUA, "You have loaded this weapon with {00AA00}Hollow point{33CCFF} ammunition."); ApplyAnimation(playerid, "PYTHON", "python_reload", 4.1, 0, 0, 0, 0, 0); } else if(!strcmp(type, "poisontip", true)) { if(!PlayerInfo[playerid][pPoisonAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "You have no poison tip ammunition to load this weapon with."); } PlayerInfo[playerid][pAmmoType] = AMMOTYPE_POISON; PlayerInfo[playerid][pAmmoWeapon] = weaponid; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s loads their %s with poison tip ammunition.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid)); SendClientMessage(playerid, COLOR_AQUA, "You have loaded this weapon with {00AA00}Poison tip{33CCFF} ammunition."); ApplyAnimation(playerid, "PYTHON", "python_reload", 4.1, 0, 0, 0, 0, 0); } else if(!strcmp(type, "fmj", true)) { if(!PlayerInfo[playerid][pFMJAmmo]) { return SendClientMessage(playerid, COLOR_GREY, "You have no full metal jacket ammunition to load this weapon with."); } PlayerInfo[playerid][pAmmoType] = AMMOTYPE_FMJ; PlayerInfo[playerid][pAmmoWeapon] = weaponid; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s loads their %s with full metal jacket ammunition.", GetPlayerRPName(playerid), GetWeaponNameEx(weaponid)); SendClientMessage(playerid, COLOR_AQUA, "You have loaded this weapon with {00AA00}Full metal jacket{33CCFF} ammunition."); ApplyAnimation(playerid, "PYTHON", "python_reload", 4.1, 0, 0, 0, 0, 0); } SetPlayerWeapons(playerid); return 1; } CMD:createturf(playerid, params[]) { new type, name[32]; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[32]", type, name)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /createturf [special type] [name]"); SendClientMessage(playerid, COLOR_GREY3, "List of types: (0) None (1) Hollow point (2) Poison tip (3) FMJ ammo (4) Weapon pipeline"); SendClientMessage(playerid, COLOR_GREY3, "List of types: (5) Traphouse (6) Crackhouse (7) Sales taxing (8) Locked"); return 1; } if(!(0 <= type <= 8)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } if(GetNearbyTurf(playerid) >= 0) { return SendClientMessage(playerid, COLOR_GREY, "There is a turf in range. Find somewhere else to create this one."); } if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0) { return SendClientMessage(playerid, COLOR_GREY, "You cannot create turfs indoors."); } PlayerInfo[playerid][pTurfType] = type; PlayerInfo[playerid][pZoneType] = ZONETYPE_TURF; strcpy(PlayerInfo[playerid][pTurfName], name, 32); ShowPlayerDialog(playerid, DIALOG_CREATEZONE, DIALOG_STYLE_MSGBOX, "Turf creation system", "You have entered turf creation mode. In order to create a turf you need\nto mark four points around the area you want your turf to be in, forming\na square. You must make a square or your outcome won't be as expected.\n\nPress {00AA00}Confirm{A9C4E4} to begin turf creation.", "Confirm", "Cancel"); return 1; } CMD:turfcancel(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(PlayerInfo[playerid][pZoneCreation] != ZONETYPE_TURF) { return SendClientMessage(playerid, COLOR_GREY, "You are not creating a turf at the moment."); } CancelZoneCreation(playerid); SendClientMessage(playerid, COLOR_LIGHTRED, "** Land creation cancelled."); return 1; } CMD:gototurf(playerid, params[]) { new turfid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "i", turfid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gototurf [turfid]"); } if(!(0 <= turfid < MAX_TURFS) || !TurfInfo[turfid][tExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid turf."); } GameTextForPlayer(playerid, "~w~Teleported", 5000, 1); SetPlayerPos(playerid, TurfInfo[turfid][tMinX], TurfInfo[turfid][tMinY], TurfInfo[turfid][tHeight]); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); return 1; } CMD:removeturf(playerid, params[]) { new turfid; if(PlayerInfo[playerid][pAdmin] < 5) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "i", turfid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /removeturf [turfid]"); } if(!(0 <= turfid < MAX_TURFS) || !TurfInfo[turfid][tExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid turf."); } GangZoneDestroy(TurfInfo[turfid][tGangZone]); DestroyDynamicArea(TurfInfo[turfid][tArea]); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "DELETE FROM turfs WHERE id = %i", turfid); mysql_tquery(connectionID, queryBuffer); TurfInfo[turfid][tExists] = 0; TurfInfo[turfid][tCapturedGang] = 0; TurfInfo[turfid][tType] = 0; SendClientMessageEx(playerid, COLOR_AQUA, "** You have removed turf %i.", turfid); return 1; } CMD:editturf(playerid, params[]) { new turfid, option[14], param[32]; if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pGangMod]) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "is[14]S()[32]", turfid, option, param)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editturf [turfid] [option]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: Name, CapturedBy, Gang, Type, Time"); return 1; } if(!(0 <= turfid < MAX_TURFS) || !TurfInfo[turfid][tExists]) { return SendClientMessage(playerid, COLOR_GREY, "Invalid turf."); } if(!strcmp(option, "name", true)) { if(isnull(param)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editturf [turfid] [name] [text]"); } strcpy(TurfInfo[turfid][tName], param, 32); ReloadTurf(turfid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET name = '%e' WHERE id = %i", TurfInfo[turfid][tName], turfid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the name of turf %i to %s.", GetPlayerRPName(playerid), turfid, param); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the name of turf %i to {F7A763}%s{33CCFF}.", turfid, param); } else if(!strcmp(option, "capturedby", true)) { if(isnull(param) || strlen(params) > 24) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editturf [turfid] [capturedby] [name]"); } strcpy(TurfInfo[turfid][tCapturedBy], param, MAX_PLAYER_NAME); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET capturedby = '%e' WHERE id = %i", TurfInfo[turfid][tCapturedBy], turfid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the capturer of turf %i to %s.", GetPlayerRPName(playerid), turfid, param); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the capturer of turf %i to {F7A763}%s{33CCFF}.", turfid, param); } else if(!strcmp(option, "gang", true)) { new gangid; if(sscanf(param, "i", gangid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editturf [turfid] [gang] [gangid (-1 = none)]"); } if(!(-1 <= gangid < MAX_GANGS) || (gangid >= 0 && !GangInfo[gangid][gSetup])) { return SendClientMessage(playerid, COLOR_GREY, "Invalid gang."); } TurfInfo[turfid][tCapturedGang] = gangid; ReloadTurf(turfid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET capturedgang = %i WHERE id = %i", TurfInfo[turfid][tCapturedGang], turfid); mysql_tquery(connectionID, queryBuffer); if(gangid == -1) { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has reset the capturing gang of turf %i.", GetPlayerRPName(playerid), turfid); SendClientMessageEx(playerid, COLOR_AQUA, "You have reset the capturing gang of turf %i.", turfid); } else { SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the capturing gang of turf %i to %s.", GetPlayerRPName(playerid), turfid, GangInfo[gangid][gName]); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the capturing gang of turf %i to {00AA00}%s{33CCFF}.", turfid, GangInfo[gangid][gName]); } } else if(!strcmp(option, "type", true)) { new type; if(sscanf(param, "i", type)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editturf [turfid] [type] [value]"); SendClientMessage(playerid, COLOR_GREY3, "List of types: (0) None (1) Hollow point (2) Poison tip (3) FMJ ammo (4) Weapon pipeline"); SendClientMessage(playerid, COLOR_GREY3, "List of types: (5) Traphouse (6) Crackhouse (7) Sales taxing (8) Locked"); return 1; } if(!(0 <= type <= 8)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid type."); } TurfInfo[turfid][tType] = type; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET type = %i WHERE id = %i", TurfInfo[turfid][tType], turfid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the type of turf %i to %i.", GetPlayerRPName(playerid), turfid, type); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the type of turf %i to %i.", turfid, type); } else if(!strcmp(option, "time", true)) { new value; if(sscanf(param, "i", value)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /editturf [turfid] [time] [hours (0-24)]"); } if(!(0 <= value <= 24)) { return SendClientMessage(playerid, COLOR_GREY, "The amount of hours must range from 0 to 24."); } TurfInfo[turfid][tTime] = value; if(TurfInfo[turfid][tTime] == 0 && TurfInfo[turfid][tType] != 8) { SendTurfMessage(turfid, COLOR_YELLOW, "Turf wars: %s is now available to capture.", TurfInfo[turfid][tName]); } else { TurfInfo[turfid][tCapturer] = INVALID_PLAYER_ID; TurfInfo[turfid][tCaptureTime] = 0; } ReloadTurf(turfid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE turfs SET time = %i WHERE id = %i", TurfInfo[turfid][tTime], turfid); mysql_tquery(connectionID, queryBuffer); SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has set the time of turf %i to %i hours.", GetPlayerRPName(playerid), turfid, value); SendClientMessageEx(playerid, COLOR_AQUA, "You have set the time of turf %i to %i hours.", turfid, value); } return 1; } CMD:turfinfo(playerid, params[]) { new turfid, name[32] = "None"; if((turfid = GetNearbyTurf(playerid)) == -1) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of any turfs."); } if(TurfInfo[turfid][tCapturedGang] >= 0) { strcpy(name, GangInfo[TurfInfo[turfid][tCapturedGang]][gName]); } SendClientMessageEx(playerid, COLOR_GREEN, "|____ %s ____|", TurfInfo[turfid][tName]); switch(TurfInfo[turfid][tType]) { case 0: SendClientMessageEx(playerid, COLOR_GREY2, "(Gang: %s) - (Captured by: %s) - (Available in: %i hours)", name, TurfInfo[turfid][tCapturedBy], TurfInfo[turfid][tTime]); case 1: SendClientMessageEx(playerid, COLOR_GREY2, "(Gang: %s) - (Captured by: %s) - (Available in: %i hours) - (Perk: Hollow point ammo)", name, TurfInfo[turfid][tCapturedBy], TurfInfo[turfid][tTime]); case 2: SendClientMessageEx(playerid, COLOR_GREY2, "(Gang: %s) - (Captured by: %s) - (Available in: %i hours) - (Perk: Poison tip ammo)", name, TurfInfo[turfid][tCapturedBy], TurfInfo[turfid][tTime]); case 3: SendClientMessageEx(playerid, COLOR_GREY2, "(Gang: %s) - (Captured by: %s) - (Available in: %i hours) - (Perk: FMJ ammo)", name, TurfInfo[turfid][tCapturedBy], TurfInfo[turfid][tTime]); case 4: SendClientMessageEx(playerid, COLOR_GREY2, "(Gang: %s) - (Captured by: %s) - (Available in: %i hours) - (Perk: Weapons)", name, TurfInfo[turfid][tCapturedBy], TurfInfo[turfid][tTime]); case 5: SendClientMessageEx(playerid, COLOR_GREY2, "(Gang: %s) - (Captured by: %s) - (Available in: %i hours) - (Perk: Traphouse)", name, TurfInfo[turfid][tCapturedBy], TurfInfo[turfid][tTime]); case 6: SendClientMessageEx(playerid, COLOR_GREY2, "(Gang: %s) - (Captured by: %s) - (Available in: %i hours) - (Perk: Crackhouse)", name, TurfInfo[turfid][tCapturedBy], TurfInfo[turfid][tTime]); case 7: SendClientMessageEx(playerid, COLOR_GREY2, "(Gang: %s) - (Captured by: %s) - (Available in: %i hours) - (Perk: Sales Tax)", name, TurfInfo[turfid][tCapturedBy], TurfInfo[turfid][tTime]); case 8: SendClientMessageEx(playerid, COLOR_GREY2, "(Gang: %s) - (Captured by: %s) - (Available in: %i hours) - (Perk: Locked)", name, TurfInfo[turfid][tCapturedBy], TurfInfo[turfid][tTime]); } if(TurfInfo[turfid][tCapturer] != INVALID_PLAYER_ID) { SendClientMessageEx(playerid, COLOR_GREY2, "(Capturing: %s) - (Captured in: %i minutes)", GetPlayerRPName(TurfInfo[turfid][tCapturer]), TurfInfo[turfid][tCaptureTime]); } return 1; } CMD:carhelp(playerid, params[]) { return cmd_vehiclehelp(playerid, params); } CMD:armbomb(playerid, params[]) { return cmd_plantbomb(playerid, params); } CMD:defend(playerid, params[]) { new targetid, amount, time = (5 - GetJobLevel(playerid, JOB_LAWYER)) * 30; if(!PlayerHasJob(playerid, JOB_LAWYER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Lawyer."); } if(gettime() - PlayerInfo[playerid][pLastDefend] < time) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only defend a player every %i seconds. Please wait %i more seconds.", time, time - (gettime() - PlayerInfo[playerid][pLastDefend])); } if(sscanf(params, "ui", targetid, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /defend [playerid] [amount]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't defend yourself."); } if(!PlayerInfo[targetid][pWantedLevel]) { return SendClientMessage(playerid, COLOR_GREY, "That player is not wanted."); } PlayerInfo[targetid][pDefendOffer] = playerid; PlayerInfo[targetid][pDefendPrice] = amount; PlayerInfo[playerid][pLastDefend] = gettime(); SendClientMessageEx(targetid, COLOR_AQUA, "** Lawyer %s has offered to defend your wanted level for $%i. (/accept lawyer)", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You have offered to defend %s's wanted level for $%i.", GetPlayerRPName(playerid), amount); return 1; } CMD:free(playerid, params[]) { new targetid, time = GetJobLevel(playerid, JOB_LAWYER); if(!PlayerHasJob(playerid, JOB_LAWYER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Lawyer."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /free [playerid]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself."); } if(PlayerInfo[targetid][pJailType] != 3) { return SendClientMessage(playerid, COLOR_GREY, "That player is not in IC jail."); } if(PlayerInfo[targetid][pJailTime] < time * 60) { return SendClientMessage(playerid, COLOR_GREY, "You can't free this player, their jail time expires soon."); } PlayerInfo[targetid][pJailTime] -= time * 60; SendClientMessageEx(targetid, COLOR_AQUA, "** Lawyer %s has reduced your jail sentence by %i minutes.", GetPlayerRPName(playerid), time); SendClientMessageEx(playerid, COLOR_AQUA, "** You have reduced %s's jail sentence by %i minutes.", GetPlayerRPName(targetid), time); return 1; } CMD:eject(playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /eject [playerid]"); } if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You are not driving any vehicle."); } if(!IsPlayerConnected(targetid) || !IsPlayerInVehicle(targetid, GetPlayerVehicleID(playerid))) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected, or is not in your vehicle."); } RemovePlayerFromVehicle(targetid); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s ejects %s from the vehicle.", GetPlayerRPName(playerid), GetPlayerRPName(targetid)); return 1; } CMD:dicebet(playerid, params[]) { new targetid, amount; if(!IsPlayerInRangeOfPoint(playerid, 50.0, 1099.8420, 20.3554, 1000.6797)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the casino."); } if(PlayerInfo[playerid][pLevel] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You need to be at least level 3+ in order to dice bet."); } if(sscanf(params, "ui", targetid, amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /dicebet [playerid] [amount]"); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself."); } if(PlayerInfo[targetid][pLevel] < 3) { return SendClientMessage(playerid, COLOR_GREY, "That player must be at least level 3+ to bet with them."); } if(amount < 1) { return SendClientMessage(playerid, COLOR_GREY, "The amount can't be below $1."); } if(PlayerInfo[playerid][pCash] < amount) { return SendClientMessage(playerid, COLOR_GREY, "You don't have that much money to bet."); } if(gettime() - PlayerInfo[playerid][pLastBet] < 10) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only use this command every 10 seconds. Please wait %i more seconds.", 10 - (gettime() - PlayerInfo[playerid][pLastBet])); } PlayerInfo[targetid][pDiceOffer] = playerid; PlayerInfo[targetid][pDiceBet] = amount; PlayerInfo[playerid][pLastBet] = gettime(); SendClientMessageEx(targetid, COLOR_AQUA, "** %s has initiated a dice bet with you for $%i (/accept dicebet).", GetPlayerRPName(playerid), amount); SendClientMessageEx(playerid, COLOR_AQUA, "** You have initiated a dice bet against %s for $%i.", GetPlayerRPName(targetid), amount); return 1; } CMD:calculate(playerid, params[]) { new option, Float:value1, Float:value2; if(sscanf(params, "fcf", value1, option, value2)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /calculate [value 1] [option] [value 2]"); SendClientMessage(playerid, COLOR_GREY3, "List of options: (+) Add (-) Subtract (*) Multiply (/) Divide"); return 1; } if(option == '/' && value2 == 0) { return SendClientMessage(playerid, COLOR_GREY, "You can't divide by zero."); } if(option == '+') { SendClientMessageEx(playerid, COLOR_GREEN, "** Result: %.2f + %.2f = %.2f", value1, value2, value1 + value2); } else if(option == '-') { SendClientMessageEx(playerid, COLOR_GREEN, "** Result: %.2f - %.2f = %.2f", value1, value2, value1 - value2); } else if(option == '*' || option == 'x') { SendClientMessageEx(playerid, COLOR_GREEN, "** Result: %.2f * %.2f = %.2f", value1, value2, value1 * value2); } else if(option == '/') { SendClientMessageEx(playerid, COLOR_GREEN, "** Result: %.2f / %.2f = %.2f", value1, value2, value1 / value2); } return 1; } CMD:serverstats(playerid, params[]) { new houses, businesses, garages, vehicles, lands, entrances, turfs, points, gangs, factions; for(new i = 0; i < MAX_HOUSES; i ++) if(HouseInfo[i][hExists]) houses++; for(new i = 0; i < MAX_BUSINESSES; i ++) if(BusinessInfo[i][bExists]) businesses++; for(new i = 0; i < MAX_GARAGES; i ++) if(GarageInfo[i][gExists]) garages++; for(new i = 0; i < MAX_VEHICLES; i ++) if(IsValidVehicle(i)) vehicles++; for(new i = 0; i < MAX_LANDS; i ++) if(LandInfo[i][lExists]) lands++; for(new i = 0; i < MAX_ENTRANCES; i ++) if(EntranceInfo[i][eExists]) entrances++; for(new i = 0; i < MAX_TURFS; i ++) if(TurfInfo[i][tExists]) turfs++; for(new i = 0; i < MAX_POINTS; i ++) if(PointInfo[i][pExists]) points++; for(new i = 0; i < MAX_GANGS; i ++) if(GangInfo[i][gSetup]) gangs++; for(new i = 0; i < MAX_FACTIONS; i ++) if(FactionInfo[i][fType]) factions++; SendClientMessage(playerid, COLOR_GREEN, "|_____ Limitless Roleplay Stats _____|"); SendClientMessageEx(playerid, COLOR_GREY2, "Connections: %i - Registered: %i - Kill Counter: %i - Death Counter: %i - Hours Played: %i", gConnections, gTotalRegistered, gTotalKills, gTotalDeaths, gTotalHours); SendClientMessageEx(playerid, COLOR_GREY2, "Houses: %i/%i - Businesses: %i/%i - Garages: %i/%i - Lands: %i/%i - Vehicles: %i/%i", houses, MAX_HOUSES, businesses, MAX_BUSINESSES, garages, MAX_GARAGES, lands, MAX_LANDS, vehicles, MAX_VEHICLES); SendClientMessageEx(playerid, COLOR_GREY2, "Entrances: %i/%i - Turfs: %i/%i - Points: %i/%i - Gangs: %i/%i - Factions: %i/%i", entrances, MAX_ENTRANCES, turfs, MAX_TURFS, points, MAX_POINTS, gangs, MAX_GANGS, factions, MAX_FACTIONS); SendClientMessageEx(playerid, COLOR_GREY2, "Players Online: %i/%i - Player Record: %i - Record Date: %s - Anticheat Bans: %i", Iter_Count(Player), MAX_PLAYERS, gPlayerRecord, gRecordDate, gAnticheatBans); return 1; } CMD:ww(playerid, params[]) { return cmd_pw(playerid, params); } CMD:watch(playerid, params[]) { return cmd_pw(playerid, params); } CMD:pw(playerid, params[]) { if(!PlayerInfo[playerid][pWatch]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have a pocket watch. You can buy one at 24/7."); } if(!PlayerInfo[playerid][pWatchOn]) { if(PlayerInfo[playerid][pToggleTextdraws]) { return SendClientMessage(playerid, COLOR_GREY, "You can't turn on your watch as you have textdraws toggled! (/toggle textdraws)"); } PlayerInfo[playerid][pWatchOn] = 1; TextDrawShowForPlayer(playerid, TimeTD); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s turns on their pocket watch.", GetPlayerRPName(playerid)); } else { PlayerInfo[playerid][pWatchOn] = 0; TextDrawHideForPlayer(playerid, TimeTD); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s turns off their pocket watch.", GetPlayerRPName(playerid)); } return 1; } CMD:gps(playerid, params[]) { if(!PlayerInfo[playerid][pGPS]) { return SendClientMessage(playerid, COLOR_GREY, "You don't have a GPS. You can buy one at 24/7."); } if(!PlayerInfo[playerid][pGPSOn]) { if(PlayerInfo[playerid][pToggleTextdraws]) { return SendClientMessage(playerid, COLOR_GREY, "You can't turn on your GPS as you have textdraws toggled! (/toggle textdraws)"); } PlayerInfo[playerid][pGPSOn] = 1; PlayerTextDrawSetString(playerid, PlayerInfo[playerid][pText][0], "Loading..."); PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][0]); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s turns on their GPS.", GetPlayerRPName(playerid)); } else { PlayerInfo[playerid][pGPSOn] = 0; PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][0]); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s turns off their GPS.", GetPlayerRPName(playerid)); } return 1; } CMD:fixvw(playerid, params[]) { if(PlayerInfo[playerid][pPaintball] || PlayerInfo[playerid][pJoinedEvent]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(GetPlayerVirtualWorld(playerid) > 0 && GetPlayerInterior(playerid) == 0) { SetPlayerVirtualWorld(playerid, 0); SendClientMessage(playerid, COLOR_GREY, "Your virtual world has been fixed."); } else { SendClientMessage(playerid, COLOR_GREY, "Your virtual world is not bugged at the moment."); } return 1; } CMD:stuck(playerid, params[]) { if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pAcceptedHelp] || PlayerInfo[playerid][pMiningTime] > 0 || PlayerInfo[playerid][pFishTime] > 0 || GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY || IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(gettime() - PlayerInfo[playerid][pLastStuck] < 5) { return SendClientMessageEx(playerid, COLOR_GREY, "You can only use this command every 5 seconds. Please wait %i more seconds.", 5 - (gettime() - PlayerInfo[playerid][pLastStuck])); } new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x, y, z + 0.5); ClearAnimations(playerid); TogglePlayerControllable(playerid, 1); ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.1, 0, 0, 0, 0, 0, 1); SendClientMessage(playerid, COLOR_GREY, "You are no longer stuck."); PlayerInfo[playerid][pLastStuck] = gettime(); return 1; } CMD:badge(playerid, params[]) { if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC && GetFactionType(playerid) != FACTION_GOVERNMENT) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer."); } if(PlayerInfo[playerid][pTazedTime] > 0 || PlayerInfo[playerid][pInjured] > 0 || PlayerInfo[playerid][pHospital] > 0 || PlayerInfo[playerid][pCuffed] > 0 || PlayerInfo[playerid][pJailTime] > 0 || PlayerInfo[playerid][pJoinedEvent] > 0 || PlayerInfo[playerid][pPaintball]) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command at the moment."); } if(!PlayerInfo[playerid][pDuty]) { PlayerInfo[playerid][pDuty] = 1; SendClientMessage(playerid, COLOR_WHITE, "You have enabled your badge. You now appear on-duty for all players."); } else { PlayerInfo[playerid][pDuty] = 0; SendClientMessage(playerid, COLOR_WHITE, "You have disabled your badge. You no longer appear on-duty for any players."); } return 1; } CMD:duel(playerid, params[]) { new target1, target2, Float:health, Float:armor, weapon1, weapon2; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!PlayerInfo[playerid][pAdminDuty] && PlayerInfo[playerid][pAdmin] < 6) { return SendClientMessage(playerid, COLOR_GREY, "This command requires you to be on admin duty. /aduty to go on duty."); } if(sscanf(params, "uuffii", target1, target2, health, armor, weapon1, weapon2)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /duel [player1] [player2] [health] [armor] [weapon1] [weapon2]"); } if(target1 == INVALID_PLAYER_ID || target2 == INVALID_PLAYER_ID) { return SendClientMessage(playerid, COLOR_GREY, "Invalid player specified."); } if(health < 1.0) { return SendClientMessage(playerid, COLOR_GREY, "Health can't be under 1.0."); } if(!(0 <= weapon1 <= 46) || !(0 <= weapon2 <= 46)) { return SendClientMessage(playerid, COLOR_GREY, "Invalid weapon. Valid weapon IDs range from 0 to 46."); } new rand = random(99999); SavePlayerVariables(target1); SavePlayerVariables(target2); ResetPlayerWeapons(target1); ResetPlayerWeapons(target2); SetPlayerPos(target1, 1413.1495, -15.9198, 1000.9246); SetPlayerPos(target2, 1367.6084, -17.7317, 1000.9219); SetPlayerInterior(target1, 1); SetPlayerInterior(target2, 1); SetPlayerVirtualWorld(target1, rand); SetPlayerVirtualWorld(target2, rand); SetPlayerHealth(target1, health); SetPlayerArmour(target1, armor); SetPlayerHealth(target2, health); SetPlayerArmour(target2, armor); GivePlayerWeaponEx(target1, weapon1, true); GivePlayerWeaponEx(target1, weapon2, true); GivePlayerWeaponEx(target2, weapon1, true); GivePlayerWeaponEx(target2, weapon2, true); GameTextForPlayer(target1, "~r~Duel time!", 3000, 3); GameTextForPlayer(target2, "~r~Duel time!", 3000, 3); PlayerInfo[target1][pDueling] = target2; PlayerInfo[target2][pDueling] = target1; SendAdminMessage(COLOR_LIGHTRED, "AdmCmd: %s has forced %s and %s into a duel.", GetPlayerRPName(playerid), GetPlayerRPName(target1), GetPlayerRPName(target2)); return 1; } CMD:mole(playerid, params[]) // Made by my boy Josh Einstein. { if(GetFactionType(playerid) != FACTION_HITMAN && PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(isnull(params)) { SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /mole [text]"); SendClientMessage(playerid, COLOR_YELLOW, "This command sends a SMS to the entire server. Abusing this command will result in heavy punishment."); return 1; } SendClientMessageToAllEx(COLOR_YELLOW, "** SMS from MOLE (0): %s **", params); return 1; } CMD:info(playerid, params[]) { return cmd_information(playerid, params); } CMD:information(playerid, params[]) { SendClientMessage(playerid, COLOR_GREEN, "|____ Server Information ____|"); SendClientMessage(playerid, COLOR_GREY2, "Website: www.limitlessrp.com | Store: www.limitlessrp.com/store"); SendClientMessage(playerid, COLOR_GREY2, "Teamspeak: ts.limitlessrp.com"); return 1; } CMD:takecall(playerid, params[]) { new targetid, Float:x, Float:y, Float:z; if(!PlayerHasJob(playerid, JOB_MECHANIC) && !PlayerHasJob(playerid, JOB_TAXIDRIVER)) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a Mechanic or Taxi Driver."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /takecall [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(PlayerHasJob(playerid, JOB_MECHANIC) && PlayerInfo[targetid][pMechanicCall] > 0) { if(GetPlayerInterior(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "That player is currently unreachable."); } PlayerInfo[targetid][pMechanicCall] = 0; PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; GetPlayerPos(targetid, x, y, z); SetPlayerCheckpoint(playerid, x, y, z, 5.0); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's mechanic call. Their location was marked on your map.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "** %s has accepted your mechanic call. Please wait patiently until they arrive.", GetPlayerRPName(playerid)); } else if(PlayerHasJob(playerid, JOB_TAXIDRIVER) && PlayerInfo[targetid][pTaxiCall] > 0) { if(GetPlayerInterior(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "That player is currently unreachable."); } PlayerInfo[targetid][pTaxiCall] = 0; PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; GetPlayerPos(targetid, x, y, z); SetPlayerCheckpoint(playerid, x, y, z, 5.0); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's taxi call. Their location was marked on your map.", GetPlayerRPName(targetid)); SendClientMessageEx(targetid, COLOR_AQUA, "** %s has accepted your taxi call. Please wait patiently until they arrive.", GetPlayerRPName(playerid)); } else { SendClientMessage(playerid, COLOR_GREY, "That player has no calls which can be taken."); } return 1; } CMD:listcallers(playerid, params[]) { if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer."); } SendClientMessage(playerid, COLOR_GREEN, "|____ Emergency Calls ____|"); foreach(new i : Player) { if((PlayerInfo[i][pEmergencyCall] > 0) && ((PlayerInfo[i][pEmergencyType] == FACTION_MEDIC && GetFactionType(playerid) == FACTION_MEDIC) || (PlayerInfo[i][pEmergencyType] == FACTION_POLICE && IsLawEnforcement(playerid)))) { SendClientMessageEx(playerid, COLOR_GREY2, "** %s[%i] - Expiry: %i seconds - Emergency: %s", GetPlayerRPName(i), i, PlayerInfo[i][pEmergencyCall], PlayerInfo[i][pEmergency]); } } return 1; } CMD:trackcall(playerid, params[]) { new targetid, Float:x, Float:y, Float:z; if(!IsLawEnforcement(playerid) && GetFactionType(playerid) != FACTION_MEDIC) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a medic or law enforcer."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /trackcall [playerid]"); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!PlayerInfo[targetid][pEmergencyCall]) { return SendClientMessage(playerid, COLOR_GREY, "That player hasn't called 911 recently or their call expired."); } if(!GetPlayerPosEx(targetid, x, y, z)) { return SendClientMessage(playerid, COLOR_GREY, "That player is currently unreachable."); } //PlayerInfo[targetid][pEmergencyCall] = 0; PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, x, y, z, 5.0); SendClientMessageEx(playerid, COLOR_AQUA, "** You have accepted %s's emergency call. Their location was marked on your map.", GetPlayerRPName(targetid)); if(PlayerInfo[targetid][pEmergencyCall] == FACTION_MEDIC) { SendClientMessageEx(targetid, COLOR_AQUA, "** %s has accepted your emergency call. Please wait patiently until they arrive.", GetPlayerRPName(playerid)); } return 1; } CMD:startchat(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /startchat [playerid]"); } if(IsPlayerChatActive(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You are already in an active chat. /invitechat to invite them."); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(IsPlayerChatActive(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "That player is in an active chat with another admin."); } chattingWith[playerid]{targetid} = true; chattingWith[targetid]{playerid} = true; SendClientMessageEx(targetid, COLOR_YELLOW, "Administrator %s has started a chat with you. /(re)ply to speak with this admin.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_YELLOW, "You have started a chat with %s (ID %i). /(re)ply to speak to the player.", GetPlayerRPName(targetid), targetid); return 1; } CMD:invitechat(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /invitechat [playerid]"); } if(!IsPlayerChatActive(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You have not started a chat yet. /startchat to start one."); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(IsPlayerChatActive(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "That player is in an active chat with another admin."); } chattingWith[playerid]{targetid} = true; chattingWith[targetid]{playerid} = true; SendClientMessageEx(targetid, COLOR_YELLOW, "Administrator %s has invited you to a chat. /(re)ply to speak with them.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_YELLOW, "You have invited %s (ID %i) to your chat.", GetPlayerRPName(targetid), targetid); return 1; } CMD:kickchat(playerid, params[]) { new targetid; if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /kickchat [playerid]"); } if(!IsPlayerChatActive(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You have not started a chat yet. /startchat to start one."); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(!chattingWith[playerid]{targetid}) { return SendClientMessage(playerid, COLOR_GREY, "That player is currently not in a chat with you."); } chattingWith[playerid]{targetid} = false; chattingWith[targetid]{playerid} = false; SendClientMessageEx(targetid, COLOR_YELLOW, "Administrator %s has removed you from the chat.", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_YELLOW, "You have removed %s (ID %i) from your chat.", GetPlayerRPName(targetid), targetid); return 1; } CMD:endchat(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 3) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(!IsPlayerChatActive(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You have not started a chat yet. /startchat to start one."); } foreach(new i : Player) { if(i == playerid || chattingWith[playerid]{i}) { chattingWith[playerid]{i} = false; SendClientMessageEx(i, COLOR_YELLOW, "Administrator %s has ended the chat.", GetPlayerRPName(playerid)); } } return 1; } CMD:re(playerid, params[]) { return cmd_reply(playerid, params); } CMD:reply(playerid, params[]) { if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage] /(re)ply [text]"); } if(!IsPlayerChatActive(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You haven't been invited to any chats by an admin."); } foreach(new i : Player) { if(i == playerid || chattingWith[i]{playerid}) { if(PlayerInfo[playerid][pAdmin] > 1) SendClientMessageEx(i, COLOR_YELLOW, "** %s %s (ID %i): %s **", GetAdminRank(playerid), GetPlayerRPName(playerid), playerid, params); else SendClientMessageEx(i, COLOR_YELLOW, "** Player %s (ID %i): %s **", GetPlayerRPName(playerid), playerid, params); } } return 1; } CMD:gascan(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid), amount; if(!vehicleid || GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { return SendClientMessage(playerid, COLOR_GREY, "You must be driving a vehicle to use this command."); } if(!VehicleHasEngine(vehicleid)) { return SendClientMessage(playerid, COLOR_GREY, "This vehicle has no engine which runs off gas."); } if(sscanf(params, "i", amount)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /gascan [amount]"); } if(amount < 1 || amount > PlayerInfo[playerid][pGasCan]) { return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount."); } if(vehicleFuel[vehicleid] + amount > 100) { return SendClientMessage(playerid, COLOR_GREY, "You can't add that much gasoline to the vehicle."); } PlayerInfo[playerid][pGasCan] -= amount; vehicleFuel[vehicleid] += amount; mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gascan = %i WHERE uid = %i", PlayerInfo[playerid][pGasCan], PlayerInfo[playerid][pID]); mysql_tquery(connectionID, queryBuffer); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s refills the %s's gas tank with %i liters of gasoline.", GetPlayerRPName(playerid), GetVehicleName(vehicleid), amount); return 1; } CMD:robbank(playerid, params[]) { new count; if(PlayerInfo[playerid][pLevel] < 7) { return SendClientMessage(playerid, COLOR_GREY, "You must be at least level 7+ to use this command."); } if(!IsPlayerInRangeOfPoint(playerid, 20.0, 1667.4260, -972.6691, 683.6873)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the bank."); } if(RobberyInfo[rTime] > 0) { return SendClientMessageEx(playerid, COLOR_GREY, "The bank can be robbed again in %i hours. You can't rob it now.", RobberyInfo[rTime]); } if(RobberyInfo[rPlanning]) { return SendClientMessage(playerid, COLOR_GREY, "There is a bank robbery being planned already. Ask the leader to join."); } if(RobberyInfo[rStarted]) { return SendClientMessage(playerid, COLOR_GREY, "You can't rob the bank as a robbery has already started."); } if(IsLawEnforcement(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't rob the bank as a law enforcer. Ask your boss for a raise."); } foreach(new i : Player) { if(IsLawEnforcement(i)) { count++; } } if(count < 3) { return SendClientMessage(playerid, COLOR_GREY, "There needs to be at least 3+ LEO online in order to rob the bank."); } RobberyInfo[rRobbers][0] = playerid; RobberyInfo[rPlanning] = 1; PlayerInfo[playerid][pCP] = CHECKPOINT_MISC; SetPlayerCheckpoint(playerid, 1677.2610, -987.6659, 671.1152, 2.0); SendClientMessage(playerid, COLOR_AQUA, "You have setup a {FF6347}bank robbery{33CCFF}. You need to /robinvite at least 2 more people in order to begin the heist."); SendClientMessage(playerid, COLOR_AQUA, "After you've found two additional heisters, you can use /bombvault at the checkpoint to blow the vault."); return 1; } CMD:robinvite(playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /robinvite [playerid]"); } if(!(RobberyInfo[rPlanning] && RobberyInfo[rRobbers][0] == playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You are currently not planning a bank robbery."); } if(!IsPlayerConnected(targetid) || !IsPlayerInRangeOfPlayer(playerid, targetid, 5.0)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected or out of range."); } if(targetid == playerid) { return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself."); } if(IsPlayerInBankRobbery(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "That player is already in the robbery with you."); } if(GetBankRobbers() >= MAX_BANK_ROBBERS) { return SendClientMessageEx(playerid, COLOR_GREY, "You can't have more than %i bank robbers in this robbery.", MAX_BANK_ROBBERS); } if(IsLawEnforcement(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "You can't invite law enforcement to rob the bank."); } PlayerInfo[targetid][pRobberyOffer] = playerid; SendClientMessageEx(targetid, COLOR_AQUA, "** %s has invited you to a bank robbery. (/accept robbery)", GetPlayerRPName(playerid)); SendClientMessageEx(playerid, COLOR_AQUA, "** You have invited %s to join your bank robbery.", GetPlayerRPName(targetid)); return 1; } CMD:bombvault(playerid, params[]) { if(RobberyInfo[rPlanning] == 0 && RobberyInfo[rRobbers][0] != playerid) { return SendClientMessage(playerid, COLOR_GREY, "You are currently not planning a bank robbery."); } if(GetBankRobbers() < 3) { return SendClientMessage(playerid, COLOR_GREY, "You need at least two other heisters in your robbery."); } if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1677.2610, -987.6659, 671.1152)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the vault."); } if(IsValidDynamicObject(RobberyInfo[rObjects][1])) { return SendClientMessage(playerid, COLOR_GREY, "The vault is already being bombed at the moment."); } RobberyInfo[rObjects][1] = CreateDynamicObject(1654, 1677.787475, -988.009765, 671.625366, 0.000000, 0.000000, 180.680709); SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s firmly plants an explosive on the vault door.", GetPlayerRPName(playerid)); SendClientMessage(playerid, COLOR_WHITE, "** Bomb planted. Shoot at the bomb to blow that sumbitch' up!"); return 1; } CMD:lootbox(playerid, params[]) { if(!RobberyInfo[rStarted] && !IsPlayerInBankRobbery(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in an active bank robbery."); } if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1680.2344, -994.6146, 671.0032) && !IsPlayerInRangeOfPoint(playerid, 3.0, 1680.2335, -998.6115, 671.0032) && !IsPlayerInRangeOfPoint(playerid, 3.0, 1680.2344, -1002.5356, 671.0032) && !IsPlayerInRangeOfPoint(playerid, 3.0, 1674.2708, -998.4954, 671.0032) && !IsPlayerInRangeOfPoint(playerid, 3.0, 1674.2708, -994.5173, 671.0032)) { return SendClientMessage(playerid, COLOR_GREY, "You are not in range of the deposit boxes."); } if(PlayerInfo[playerid][pLootTime] > 0) { return SendClientMessage(playerid, COLOR_GREY, "You are already looting a deposit box."); } if(PlayerInfo[playerid][pRobCash] >= 500000) { return SendClientMessage(playerid, COLOR_GREY, "Your pockets can't hold more than $500000 of money!"); } if(!IsPlayerInBankRobbery(playerid)) { return SendClientMessage(playerid, COLOR_GREY, "You are not apart of this bank robbery."); } PlayerInfo[playerid][pLootTime] = 5; ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Loop", 4.1, 1, 0, 0, 0, 0, 1); GameTextForPlayer(playerid, "~w~Looting deposit box...", 5000, 3); return 1; }