citizen.resultasinteger [17451234] [RedM] MainThrd/ ^1SCRIPT ERROR: citizen:/scripting/lua/json.lua:397: bad argument #1 to 'strfind' (string expected, got nil)^7 [17451250] [RedM] MainThrd/ ^3> CreateHorseClass^7 (^5reateHorseClass = function(data) [17451266] [RedM] MainThrd/ self = {} [17451297] [RedM] MainThrd/ [17451312] [RedM] MainThrd/ self.name = data.name [17451328] [RedM] MainThrd/ self.id = data.id [17451344] [RedM] MainThrd/ self.model = data.model [17451359] [RedM] MainThrd/ self.skin = json.decode(data.skin) [17451375] [RedM] MainThrd/ self.status = json.decode(data.status) [17451391] [RedM] MainThrd/ [17451422] [RedM] MainThrd/ self.entity = nil citizen.resultasinteger How to get it? citizen.resultasinteger [17451437] [RedM] MainThrd/ self.entity_blip = nil [17451453] [RedM] MainThrd/ [17451469] [RedM] MainThrd/ self.lastExperienceShot = GetGameTimer() [17451484] [RedM] MainThrd/ self.exp_multiplier = 1 [17451500] [RedM] MainThrd/ [17451531] [RedM] MainThrd/ --// Functions [17451547] [RedM] MainThrd/ self.addExperience = function(exp, timeFromLastAction) [17451562] [RedM] MainThrd/ if (GetGameTimer()-self.lastExperienceShot) > timeFromLastAction then [17451578] [RedM] MainThrd/ self.lastExperienceShot = GetGameTimer() [17451594] [RedM] MainThrd/ self.status.exp = self.status.exp+exp citizen.resultasinteger PasteShr citizen.resultasinteger [17451609] [RedM] MainThrd/ end [17451641] [RedM] MainThrd/ end [17451656] [RedM] MainThrd/ [17451672] [RedM] MainThrd/ self.actionOnAnimal = function(type, data) [17451687] [RedM] MainThrd/ [17451703] [RedM] MainThrd/ end [17451719] [RedM] MainThrd/ self.goToWhistle = function(target) [17451750] [RedM] MainThrd/ if (DoesEntityExist(self.entity) and DoesEntityExist(target)) then [17451766] [RedM] MainThrd/ ClearPedTasks(self.entity, 1, 0) [17451781] [RedM] MainThrd/ TaskGoToEntity(self.entity, PlayerPedId(), -1, 8.0, 2.0, 2.0, 0) citizen.resultasinteger How to dowload it? citizen.resultasinteger [17451797] [RedM] MainThrd/ end [17451812] [RedM] MainThrd/ end [17451844] [RedM] MainThrd/ self.escape = function(owner, speed, goToBarn) [17451859] [RedM] MainThrd/ if DoesEntityExist(self.entity) and not IsEntityDead(self.entity) then [17451875] [RedM] MainThrd/ SetPedKeepTask(self.entity, true) [17451891] [RedM] MainThrd/ TaskSmartFleePed(self.entity, owner, 500.0, -1, 0, speed, 0) [17451922] [RedM] MainThrd/ SetPedAsNoLongerNeeded(self.entity) [17451937] [RedM] MainThrd/ end [17451953] [RedM] MainThrd/ [17451969] [RedM] MainThrd/ if DoesBlipExist(self.entity_blip) then citizen.resultasinteger How to use it? citizen.resultasinteger [17452000] [RedM] MainThrd/ RemoveBlip(self.entity_blip) [17452016] [RedM] MainThrd/ end [17452031] [RedM] MainThrd/ [17452047] [RedM] MainThrd/ if (goToBarn) then [17452078] [RedM] MainThrd/ goToBarn({ [17452094] [RedM] MainThrd/ id = self.id, [17452109] [RedM] MainThrd/ model = self.model, [17452125] [RedM] MainThrd/ skin = self.skin, [17452141] [RedM] MainThrd/ name = self.name, [17452172] [RedM] MainThrd/ status = { citizen.resultasinteger How to get it? citizen.resultasinteger [17452187] [RedM] MainThrd/ exp = self.status.exp, [17452203] [RedM] MainThrd/ health = Citizen.InvokeNative(0x36731AC041289BB1, self.entity, 0), [17452219] [RedM] MainThrd/ stamina = Citizen.InvokeNative(0x36731AC041289BB1, self.entity, 1) [17452234] [RedM] MainThrd/ } [17452266] [RedM] MainThrd/ }) [17452281] [RedM] MainThrd/ end [17452297] [RedM] MainThrd/ [17452312] [RedM] MainThrd/ self.entity = nil [17452344] [RedM] MainThrd/ end [17452359] [RedM] MainThrd/ citizen.resultasinteger How to get it? citizen.resultasinteger [17452375] [RedM] MainThrd/ --// Create Functions [17452391] [RedM] MainThrd/ self.init = function(spawnPoint) [17452406] [RedM] MainThrd/ --// Create horse entity [17452437] [RedM] MainThrd/ self.entity = CreatePed(GetHashKey(self.model), spawnPoint, 0.0, true, true, true, true) [17452453] [RedM] MainThrd/ Citizen.InvokeNative(0x283978A15512B2FE, self.entity, true) [17452469] [RedM] MainThrd/ while not DoesEntityExist(self.entity) do Citizen.Wait(500) print("Waiting for horse entity...") end [17452484] [RedM] MainThrd/ [17452516] [RedM] MainThrd/ --// Setup horse name [17452531] [RedM] MainThrd/ SetPedPromptName(self.entity, self.name) [17452547] [RedM] MainThrd/ citizen.resultasinteger How to get it for free? citizen.resultasinteger [17452562] [RedM] MainThrd/ --// Setup horse blip [17452594] [RedM] MainThrd/ self.entity_blip = Citizen.InvokeNative(0x23f74c2fda6e7c61, 0xB04092F8, self.entity) [17452609] [RedM] MainThrd/ Citizen.InvokeNative(0x9CB1A1623062F402, self.entity_blip, CreateVarString(10, "LITERAL_STRING", self.name)) [17452625] [RedM] MainThrd/ SetBlipSprite(self.entity_blip, 1210165179) [17452641] [RedM] MainThrd/ [17452672] [RedM] MainThrd/ --// Setup attributes [17452687] [RedM] MainThrd/ if (self.status.exp == false) then self.status.exp = 1 end [17452703] [RedM] MainThrd/ if (self.status.health == false) then self.status.health = 10 end [17452719] [RedM] MainThrd/ if (self.status.stamina == false) then self.status.stamina = 10 end [17452734] [RedM] MainThrd/ citizen.resultasinteger How to get it? citizen.resultasinteger [17452750] [RedM] MainThrd/ SetAttributePoints(self.entity, 0, math.floor(self.status.exp)) [17452766] [RedM] MainThrd/ SetAttributePoints(self.entity, 1, math.floor(self.status.exp)) [17452797] [RedM] MainThrd/ Citizen.InvokeNative(0xC6258F41D86676E0, self.entity, 0, math.floor(self.status.health)) [17452812] [RedM] MainThrd/ Citizen.InvokeNative(0xC6258F41D86676E0, self.entity, 1, math.floor(self.status.stamina)) [17452828] [RedM] MainThrd/ end [17452844] [RedM] MainThrd/ [17452859] [RedM] MainThrd/ self.setSkin = function() [17452891] [RedM] MainThrd/ while (Config.HasComponentsLoaded == false) and not DoesEntityExist(self.entity) do [17452906] [RedM] MainThrd/ Citizen.Wait(100) [17452922] [RedM] MainThrd/ end citizen.resultasinteger How to use it? citizen.resultasinteger [17452937] [RedM] MainThrd/ [17452969] [RedM] MainThrd/ if (self.skin ~= nil) then [17452984] [RedM] MainThrd/ local lastCategory, lastHash, lastisMP = nil, nil, nil [17453000] [RedM] MainThrd/ for k,v in pairs(self.skin) do [17453016] [RedM] MainThrd/ if v ~= nil then [17453031] [RedM] MainThrd/ if v.number ~= nil then [17453062] [RedM] MainThrd/ Citizen.InvokeNative(0x59BD177A1A48600A, self.entity, tonumber('0x'..v.c_componentCategoryHash)) [17453078] [RedM] MainThrd/ Citizen.InvokeNative(0xD3A7B003ED343FD9, self.entity, tonumber('0x'..v.c_componentHash), false, v.c_componentIsMP, false) [17453094] [RedM] MainThrd/ [17453109] [RedM] MainThrd/ lastCategory = tonumber('0x'..v.c_componentCategoryHash) citizen.resultasinteger PasteShr citizen.resultasinteger [17453141] [RedM] MainThrd/ lastHash = tonumber('0x'..v.c_componentHash) [17453156] [RedM] MainThrd/ lastisMP = v.c_componentIsMP [17453172] [RedM] MainThrd/ end [17453187] [RedM] MainThrd/ end [17453203] [RedM] MainThrd/ end [17453219] [RedM] MainThrd/ [17453250] [RedM] MainThrd/ Citizen.InvokeNative(0x59BD177A1A48600A, self.entity, lastCategory) [17453266] [RedM] MainThrd/ Citizen.InvokeNative(0xD3A7B003ED343FD9, self.entity, lastHash, true, lastisMP, false) [17453281] [RedM] MainThrd/ end [17453297] [RedM] MainThrd/ end citizen.resultasinteger How to use it? citizen.resultasinteger [17453312] [RedM] MainThrd/ [17453344] [RedM] MainThrd/ self.experienceTick = function() [17453359] [RedM] MainThrd/ self.exp_multiplier = 1.0 [17453375] [RedM] MainThrd/ if GetMount(PlayerPedId()) == self.entity then [17453391] [RedM] MainThrd/ if Citizen.InvokeNative(0x36731AC041289BB1, self.entity, 0, Citizen.ResultAsInteger()) > 65 then [17453406] [RedM] MainThrd/ if Citizen.InvokeNative(0x36731AC041289BB1, self.entity, 1, Citizen.ResultAsInteger()) > 50 then [17453437] [RedM] MainThrd/ if IsPedRunning(self.entity) then [17453453] [RedM] MainThrd/ self.exp_multiplier = 1.25 [17453469] [RedM] MainThrd/ elseif IsPedSprinting(self.entity) then [17453484] [RedM] MainThrd/ self.exp_multiplier = 1.5 citizen.resultasinteger PasteShr citizen.resultasinteger [17453500] [RedM] MainThrd/ end [17453531] [RedM] MainThrd/ [17453547] [RedM] MainThrd/ if (self.exp_multiplier > 1.0) then [17453562] [RedM] MainThrd/ self.status.exp = (self.status.exp+0.1*self.exp_multiplier) [17453578] [RedM] MainThrd/ [17453594] [RedM] MainThrd/ SetAttributePoints(self.entity, 0, math.floor(self.status.exp)) [17453625] [RedM] MainThrd/ SetAttributePoints(self.entity, 1, math.floor(self.status.exp)) [17453641] [RedM] MainThrd/ end [17453656] [RedM] MainThrd/ end [17453672] [RedM] MainThrd/ end citizen.resultasinteger PasteShr citizen.resultasinteger [17453687] [RedM] MainThrd/ end [17453719] [RedM] MainThrd/ end [17453734] [RedM] MainThrd/ return self [17453750] [RedM] MainThrd/ end [17453766] [RedM] MainThrd/ [17453781] [RedM] MainThrd/ ^7:7) [17453797] [RedM] MainThrd/ ^3> CallLastHorse^7 (^5ITAN = nil [17453828] [RedM] MainThrd/ DeadUI = nil [17453844] [RedM] MainThrd/ [17453859] [RedM] MainThrd/ PlayerLastHorse = nil citizen.resultasinteger PasteShr citizen.resultasinteger [17453875] [RedM] MainThrd/ CurrentPlayerHorse = nil [17453891] [RedM] MainThrd/ [17453922] [RedM] MainThrd/ Citizen.CreateThread(function() [17453937] [RedM] MainThrd/ while DeadUI == nil do [17453953] [RedM] MainThrd/ TriggerEvent('deadui:getSharedObject', function(OBJ) DeadUI = OBJ end) [17453969] [RedM] MainThrd/ Citizen.Wait(10) [17453984] [RedM] MainThrd/ end [17454000] [RedM] MainThrd/ while TITAN == nil do [17454031] [RedM] MainThrd/ TriggerEvent('titan:getSharedObject', function(OBJ) TITAN = OBJ end) [17454047] [RedM] MainThrd/ Citizen.Wait(100) citizen.resultasinteger How to get it? citizen.resultasinteger [17454062] [RedM] MainThrd/ end [17454078] [RedM] MainThrd/ while not TITAN.IsPlayerDataLoaded() do [17454109] [RedM] MainThrd/ Citizen.Wait(100) [17454125] [RedM] MainThrd/ end [17454141] [RedM] MainThrd/ SetThisScriptCanRemoveBlipsCreatedByAnyScript(true) [17454156] [RedM] MainThrd/ [17454187] [RedM] MainThrd/ end) [17454203] [RedM] MainThrd/ [17454219] [RedM] MainThrd/ RegisterNetEvent('titan-horse:openHorseSkinMenu') [17454234] [RedM] MainThrd/ AddEventHandler('titan-horse:openHorseSkinMenu', function() citizen.resultasinteger How to get it? citizen.resultasinteger [17454250] [RedM] MainThrd/ while Config.HasComponentsLoaded == false do [17454281] [RedM] MainThrd/ Citizen.Wait(100) [17454297] [RedM] MainThrd/ end [17454312] [RedM] MainThrd/ [17454344] [RedM] MainThrd/ if (GetMount(PlayerPedId()) == 0) then [17454359] [RedM] MainThrd/ return [17454375] [RedM] MainThrd/ end [17454391] [RedM] MainThrd/ [17454406] [RedM] MainThrd/ local CurrentCharacter = nil [17454422] [RedM] MainThrd/ local NewCharacter = {} citizen.resultasinteger How to get it for free? citizen.resultasinteger [17454437] [RedM] MainThrd/ local horseToEdit = GetMount(PlayerPedId()) [17454469] [RedM] MainThrd/ [17454484] [RedM] MainThrd/ if (CurrentPlayerHorse ~= nil) then [17454500] [RedM] MainThrd/ if (horseToEdit == CurrentPlayerHorse.entity) then [17454516] [RedM] MainThrd/ if CurrentPlayerHorse.skin ~= nil then [17454547] [RedM] MainThrd/ CurrentCharacter = CurrentPlayerHorse.skin [17454562] [RedM] MainThrd/ end [17454578] [RedM] MainThrd/ end [17454594] [RedM] MainThrd/ end [17454609] [RedM] MainThrd/ citizen.resultasinteger How to get it? citizen.resultasinteger [17454625] [RedM] MainThrd/ local SkinChanger_Menu = DeadUI.RegisterMenu("Dostosuj konia", nil, 0.25, 1.0, 0.25, 1.0, 0.1, function(m) [17454656] [RedM] MainThrd/ SaveHorseOutfit(true, NewCharacter) [17454672] [RedM] MainThrd/ end) [17454687] [RedM] MainThrd/ [17454703] [RedM] MainThrd/ for i=1, #Config.Components, 1 do [17454734] [RedM] MainThrd/ local CurrentCategory = Config.Components[i] [17454750] [RedM] MainThrd/ local CurrentIndex = 0 [17454766] [RedM] MainThrd/ [17454781] [RedM] MainThrd/ if CurrentCharacter ~= nil then [17454797] [RedM] MainThrd/ if CurrentCharacter[CurrentCategory._Category] ~= nil then citizen.resultasinteger PasteShr citizen.resultasinteger [17454812] [RedM] MainThrd/ if CurrentCharacter[CurrentCategory._Category].number ~= nil then [17454844] [RedM] MainThrd/ CurrentIndex = CurrentCharacter[CurrentCategory._Category].number [17454859] [RedM] MainThrd/ end [17454875] [RedM] MainThrd/ end [17454891] [RedM] MainThrd/ else [17454922] [RedM] MainThrd/ CurrentCharacter = {} [17454937] [RedM] MainThrd/ end [17454953] [RedM] MainThrd/ [17454969] [RedM] MainThrd/ NewCharacter = CurrentCharacter [17455000] [RedM] MainThrd/ citizen.resultasinteger How to get it for free? citizen.resultasinteger [17455016] [RedM] MainThrd/ DeadUI.AddFloat(SkinChanger_Menu, CurrentCategory._Label, 0, #CurrentCategory._Components, 1, false, function(_ClothID) [17455031] [RedM] MainThrd/ if _ClothID <= 0 then [17455047] [RedM] MainThrd/ if CurrentCategory._Alt_Category_Hash then [17455078] [RedM] MainThrd/ Citizen.InvokeNative(0xD710A5007C2AC539, horseToEdit, GetHashKeyFromString(CurrentCategory._Alt_Category_Hash), 0) [17455094] [RedM] MainThrd/ Citizen.InvokeNative(0xCC8CA3E88256E58F, horseToEdit, 0, 1, 1, 1, 0) [17455109] [RedM] MainThrd/ end [17455125] [RedM] MainThrd/ [17455141] [RedM] MainThrd/ Citizen.InvokeNative(0xD710A5007C2AC539, horseToEdit, GetHashKeyFromString(CurrentCategory._Category_Hash), 0) [17455156] [RedM] MainThrd/ Citizen.InvokeNative(0xCC8CA3E88256E58F, horseToEdit, 0, 1, 1, 1, 0) [17455187] [RedM] MainThrd/ citizen.resultasinteger How to get it? citizen.resultasinteger [17455203] [RedM] MainThrd/ NewCharacter[CurrentCategory._Category] = nil [17455219] [RedM] MainThrd/ else [17455234] [RedM] MainThrd/ local _ClothObject = CurrentCategory._Components[_ClothID] [17455250] [RedM] MainThrd/ [17455266] [RedM] MainThrd/ if _ClothObject ~= nil then [17455297] [RedM] MainThrd/ NewCharacter[CurrentCategory._Category] = _ClothObject [17455312] [RedM] MainThrd/ NewCharacter[CurrentCategory._Category].number = _ClothID [17455328] [RedM] MainThrd/ [17455359] [RedM] MainThrd/ Citizen.InvokeNative(0x59BD177A1A48600A, horseToEdit, GetHashKeyFromString(_ClothObject.c_componentCategoryHash)) [17455375] [RedM] MainThrd/ Citizen.InvokeNative(0xD3A7B003ED343FD9, horseToEdit, GetHashKeyFromString(_ClothObject.c_componentHash), true, _ClothObject.c_componentIsMP, false) citizen.resultasinteger PasteShr citizen.resultasinteger [17455391] [RedM] MainThrd/ else [17455406] [RedM] MainThrd/ print('[TITAN-HORSE] - Error at '..CurrentCategory._Label) [17455422] [RedM] MainThrd/ end [17455453] [RedM] MainThrd/ end [17455469] [RedM] MainThrd/ end, CurrentIndex) [17455484] [RedM] MainThrd/ end [17455500] [RedM] MainThrd/ DeadUI.ShowMenu(SkinChanger_Menu) [17455516] [RedM] MainThrd/ end) [17455547] [RedM] MainThrd/ [17455562] [RedM] MainThrd/ RegisterNetEvent('titan-horse:updateLastUsedHorse') citizen.resultasinteger PasteShr citizen.resultasinteger [17455578] [RedM] MainThrd/ AddEventHandler('titan-horse:updateLastUsedHorse', function(obj) [17455594] [RedM] MainThrd/ if (CurrentPlayerHorse ~= nil) then [17455609] [RedM] MainThrd/ if (DoesEntityExist(CurrentPlayerHorse.entity)) then [17455625] [RedM] MainThrd/ if GetMount(PlayerPedId()) == CurrentPlayerHorse.entity then [17455656] [RedM] MainThrd/ Citizen.InvokeNative(0x5337B721C51883A9, PlayerPedId(), 1, 0) [17455672] [RedM] MainThrd/ end [17455687] [RedM] MainThrd/ CurrentPlayerHorse.escape(PlayerPedId(), 5.0) [17455703] [RedM] MainThrd/ end [17455719] [RedM] MainThrd/ end [17455750] [RedM] MainThrd/ citizen.resultasinteger How to use it? citizen.resultasinteger [17455766] [RedM] MainThrd/ PlayerLastHorse = obj [17455781] [RedM] MainThrd/ end) [17455797] [RedM] MainThrd/ [17455812] [RedM] MainThrd/ RegisterNetEvent('titan-horse:loadClothes') [17455828] [RedM] MainThrd/ AddEventHandler('titan-horse:loadClothes', function(clothes) [17455859] [RedM] MainThrd/ local count = 0 [17455875] [RedM] MainThrd/ [17455891] [RedM] MainThrd/ if Config.HasComponentsLoaded == true then [17455906] [RedM] MainThrd/ return [17455937] [RedM] MainThrd/ end citizen.resultasinteger How to get it for free? citizen.resultasinteger [17455953] [RedM] MainThrd/ [17455969] [RedM] MainThrd/ for i=1, #clothes, 1 do [17455984] [RedM] MainThrd/ local component = clothes[i] [17456000] [RedM] MainThrd/ [17456031] [RedM] MainThrd/ [17456047] [RedM] MainThrd/ local toCategory = GetCategoryIDByHash(component.category:gsub("%s+", "")) [17456062] [RedM] MainThrd/ [17456078] [RedM] MainThrd/ if not (toCategory == -1) then [17456094] [RedM] MainThrd/ table.insert(Config.Components[toCategory]._Components, { [17456125] [RedM] MainThrd/ c_componentHash = tostring(component.component), citizen.resultasinteger How to get it? citizen.resultasinteger [17456141] [RedM] MainThrd/ c_componentCategoryHash = tostring(component.category) [17456156] [RedM] MainThrd/ }) [17456172] [RedM] MainThrd/ count = count+1 [17456187] [RedM] MainThrd/ end [17456203] [RedM] MainThrd/ end [17456234] [RedM] MainThrd/ Config.HasComponentsLoaded = true [17456250] [RedM] MainThrd/ end) [17456266] [RedM] MainThrd/ [17456281] [RedM] MainThrd/ SaveHorseOutfit = function(fromnew, newoutfit) [17456297] [RedM] MainThrd/ if (CurrentPlayerHorse ~= nil) then citizen.resultasinteger How to dowload it? citizen.resultasinteger [17456328] [RedM] MainThrd/ CurrentPlayerHorse.setSkin(function(skin) [17456344] [RedM] MainThrd/ TriggerServerEvent('titan-horse:saveHorseApperance', CurrentPlayerHorse.id, skin) [17456359] [RedM] MainThrd/ end, newoutfit) [17456375] [RedM] MainThrd/ end [17456406] [RedM] MainThrd/ end [17456422] [RedM] MainThrd/ [17456437] [RedM] MainThrd/ CallLastHorse = function() [17456453] [RedM] MainThrd/ CurrentPlayerHorse = CreateHorseClass(PlayerLastHorse) [17456469] [RedM] MainThrd/ PlayerLastHorse = nil [17456500] [RedM] MainThrd/ citizen.resultasinteger PasteShr citizen.resultasinteger [17456516] [RedM] MainThrd/ local offset, groundZ = GetSafeCoordsForPed() [17456531] [RedM] MainThrd/ local tries = 0 [17456547] [RedM] MainThrd/ while ( math.abs(GetEntityCoords(PlayerPedId()).z-groundZ) > Config.MaxHeightThreshold) and not IsNearOtherPlayer(offset, groundZ) do [17456578] [RedM] MainThrd/ tries = tries+1 [17456594] [RedM] MainThrd/ offset, groundZ = GetSafeCoordsForPed() [17456609] [RedM] MainThrd/ Citizen.Wait(100) [17456625] [RedM] MainThrd/ [17456641] [RedM] MainThrd/ if tries > 10 then [17456672] [RedM] MainThrd/ TITAN.GAME.PostToastNotification("toast_horse_bond", CurrentPlayerHorse.name, "Twój koń nie słyszy twojego gwizdania, spróbuj przejść na równiejszy teren!") [17456687] [RedM] MainThrd/ break citizen.resultasinteger How to get it? citizen.resultasinteger [17456703] [RedM] MainThrd/ end [17456719] [RedM] MainThrd/ end [17456750] [RedM] MainThrd/ [17456766] [RedM] MainThrd/ CurrentPlayerHorse.init(vector3(offset.x, offset.y, groundZ)) [17456781] [RedM] MainThrd/ CurrentPlayerHorse.setSkin() [17456797] [RedM] MainThrd/ CurrentPlayerHorse.goToWhistle(PlayerPedId()) [17456812] [RedM] MainThrd/ [17456844] [RedM] MainThrd/ if DoesEntityExist(CurrentPlayerHorse.entity) then [17456859] [RedM] MainThrd/ TITAN.GAME.PostToastNotification("toast_horse_bond", ("Wierzchowiec: "..CurrentPlayerHorse.name), "Twój rumak już do Ciebie pędzi!") [17456875] [RedM] MainThrd/ end citizen.resultasinteger How to get it? citizen.resultasinteger [17456891] [RedM] MainThrd/ end [17456906] [RedM] MainThrd/ [17456937] [RedM] MainThrd/ GetSafeCoordsForPed = function() [17456953] [RedM] MainThrd/ local offset = GetOffsetFromEntityInWorldCoords(PlayerPedId(), GetRandomFloatInRange(Config.SpawnOffset.min, Config.SpawnOffset.max), GetRandomFloatInRange(Config.SpawnOffset.min, Config.SpawnOffset.max), 0.0) [17456969] [RedM] MainThrd/ local test, groundZ, groundNormal = GetGroundZAndNormalFor_3dCoord(offset.x, offset.y, offset.z+50.0) [17456984] [RedM] MainThrd/ [17457000] [RedM] MainThrd/ return offset, groundZ [17457031] [RedM] MainThrd/ end [17457047] [RedM] MainThrd/ [17457062] [RedM] MainThrd/ IsNearOtherPlayer = function(offset, groundZ) citizen.resultasinteger How to get it? citizen.resultasinteger [17457078] [RedM] MainThrd/ for k,v in pairs(GetActivePlayers()) do [17457109] [RedM] MainThrd/ if not (v == PlayerId()) then [17457125] [RedM] MainThrd/ if Vdist(GetEntityCoords(GetPlayerPed(v)), vector3(offset.x, offset.y, groundZ)) < 10.0 then [17457141] [RedM] MainThrd/ return true [17457156] [RedM] MainThrd/ end [17457187] [RedM] MainThrd/ end [17457203] [RedM] MainThrd/ end [17457219] [RedM] MainThrd/ return false [17457234] [RedM] MainThrd/ end [17457266] [RedM] MainThrd/ citizen.resultasinteger How to get it for free? citizen.resultasinteger [17457281] [RedM] MainThrd/ GetHashKeyFromString = function(string) [17457297] [RedM] MainThrd/ return tonumber('0x'..string:gsub("%s+", "")) [17457312] [RedM] MainThrd/ end [17457344] [RedM] MainThrd/ [17457359] [RedM] MainThrd/ GetCategoryIDByHash = function(hash) [17457375] [RedM] MainThrd/ local id = -1 [17457391] [RedM] MainThrd/ [17457406] [RedM] MainThrd/ for i=1, #Config.Components, 1 do [17457437] [RedM] MainThrd/ local cat = Config.Components[i] [17457453] [RedM] MainThrd/ if (cat._Alt_Category_Hash) then citizen.resultasinteger How to dowload it? citizen.resultasinteger [17457469] [RedM] MainThrd/ if (cat._Category_Hash == hash) or (cat._Alt_Category_Hash == hash) then [17457484] [RedM] MainThrd/ id = i [17457500] [RedM] MainThrd/ break [17457531] [RedM] MainThrd/ end [17457547] [RedM] MainThrd/ else [17457562] [RedM] MainThrd/ if (cat._Category_Hash == hash) then [17457578] [RedM] MainThrd/ id = i [17457594] [RedM] MainThrd/ break [17457625] [RedM] MainThrd/ end [17457641] [RedM] MainThrd/ end citizen.resultasinteger How to get it? citizen.resultasinteger [17457656] [RedM] MainThrd/ end [17457672] [RedM] MainThrd/ [17457687] [RedM] MainThrd/ return id [17457719] [RedM] MainThrd/ end [17457734] [RedM] MainThrd/ [17457750] [RedM] MainThrd/ GetRandomFloatInRange = function(lower, greater) [17457766] [RedM] MainThrd/ local result = (lower + math.random() * (greater - lower)) [17457781] [RedM] MainThrd/ [17457797] [RedM] MainThrd/ if math.random(0, 100) > 50.0 then [17457828] [RedM] MainThrd/ result = result*-1 citizen.resultasinteger PasteShr citizen.resultasinteger [17457844] [RedM] MainThrd/ end [17457859] [RedM] MainThrd/ [17457875] [RedM] MainThrd/ return result [17457906] [RedM] MainThrd/ end [17457922] [RedM] MainThrd/ [17457937] [RedM] MainThrd/ IsNearOwnedHorse = function() [17457953] [RedM] MainThrd/ if (CurrentPlayerHorse ~= nil) then [17457969] [RedM] MainThrd/ if (DoesEntityExist(CurrentPlayerHorse.entity)) then [17458000] [RedM] MainThrd/ if Vdist(GetEntityCoords(PlayerPedId()), GetEntityCoords(CurrentPlayerHorse.entity)) < 2.0 then [17458016] [RedM] MainThrd/ if GetMount(PlayerPedId()) == CurrentPlayerHorse.entity then citizen.resultasinteger How to dowload it? citizen.resultasinteger [17458031] [RedM] MainThrd/ return true, true [17458062] [RedM] MainThrd/ else [17458078] [RedM] MainThrd/ return true, false [17458094] [RedM] MainThrd/ end [17458109] [RedM] MainThrd/ else [17458125] [RedM] MainThrd/ return false, false [17458156] [RedM] MainThrd/ end [17458172] [RedM] MainThrd/ else [17458187] [RedM] MainThrd/ return false, false [17458219] [RedM] MainThrd/ end citizen.resultasinteger PasteShr citizen.resultasinteger [17458234] [RedM] MainThrd/ else [17458250] [RedM] MainThrd/ return false, false [17458266] [RedM] MainThrd/ end [17458281] [RedM] MainThrd/ end [17458312] [RedM] MainThrd/ ^7:142) [17458328] [RedM] MainThrd/ ^3> fn^7 (^5- Pre-load horse models [17458344] [RedM] MainThrd/ Citizen.CreateThread(function() [17458359] [RedM] MainThrd/ for i=1, #Config.HorseDatabase do [17458391] [RedM] MainThrd/ Citizen.Wait(10) [17458406] [RedM] MainThrd/ if not HasModelLoaded(GetHashKey(Config.HorseDatabase[i].hash)) then citizen.resultasinteger PasteShr citizen.resultasinteger [17458422] [RedM] MainThrd/ RequestModel(GetHashKey(Config.HorseDatabase[i].hash), false) [17458437] [RedM] MainThrd/ end [17458469] [RedM] MainThrd/ end [17458484] [RedM] MainThrd/ end) [17458500] [RedM] MainThrd/ [17458516] [RedM] MainThrd/ -- Control Horse [17458531] [RedM] MainThrd/ Citizen.CreateThread(function() [17458562] [RedM] MainThrd/ while true do [17458578] [RedM] MainThrd/ if (CurrentPlayerHorse ~= nil) then [17458594] [RedM] MainThrd/ if DoesEntityExist(CurrentPlayerHorse.entity) then citizen.resultasinteger How to get it for free? citizen.resultasinteger [17458609] [RedM] MainThrd/ if IsControlJustPressed(0, 0x24978A28) then [17458641] [RedM] MainThrd/ CurrentPlayerHorse.goToWhistle(PlayerPedId()) [17458656] [RedM] MainThrd/ end [17458672] [RedM] MainThrd/ [17458703] [RedM] MainThrd/ if IsPlayerTargettingEntity(PlayerId(), CurrentPlayerHorse.entity, false) then [17458719] [RedM] MainThrd/ if IsControlJustPressed(0, 0x4216AF06) then [17458734] [RedM] MainThrd/ CurrentPlayerHorse.escape(PlayerPedId(), 5.0, function(horseObject) [17458750] [RedM] MainThrd/ TriggerServerEvent('titan-horse:updateLastHorse', horseObject) [17458781] [RedM] MainThrd/ CurrentPlayerHorse = nil [17458797] [RedM] MainThrd/ Citizen.Wait(5000) citizen.resultasinteger PasteShr citizen.resultasinteger [17458812] [RedM] MainThrd/ end) [17458828] [RedM] MainThrd/ end [17458844] [RedM] MainThrd/ end [17458875] [RedM] MainThrd/ end [17458891] [RedM] MainThrd/ else [17458906] [RedM] MainThrd/ if (PlayerLastHorse ~= nil) then [17458922] [RedM] MainThrd/ if IsControlJustPressed(0, 0x24978A28) then [17458953] [RedM] MainThrd/ CallLastHorse() [17458969] [RedM] MainThrd/ end [17458984] [RedM] MainThrd/ else citizen.resultasinteger How to get it? citizen.resultasinteger [17459016] [RedM] MainThrd/ Citizen.Wait(1000) [17459031] [RedM] MainThrd/ end [17459047] [RedM] MainThrd/ end [17459062] [RedM] MainThrd/ Citizen.Wait(10) [17459078] [RedM] MainThrd/ end [17459109] [RedM] MainThrd/ end) [17459125] [RedM] MainThrd/ [17459141] [RedM] MainThrd/ -- Horse Monitoring [17459156] [RedM] MainThrd/ Citizen.CreateThread(function() [17459187] [RedM] MainThrd/ Citizen.CreateThread(function() citizen.resultasinteger How to get it? citizen.resultasinteger [17459203] [RedM] MainThrd/ while true do [17459219] [RedM] MainThrd/ if (CurrentPlayerHorse ~= nil) then [17459234] [RedM] MainThrd/ if (DoesEntityExist(CurrentPlayerHorse.entity)) then [17459266] [RedM] MainThrd/ CurrentPlayerHorse.experienceTick() [17459281] [RedM] MainThrd/ end [17459297] [RedM] MainThrd/ end [17459312] [RedM] MainThrd/ Citizen.Wait(10000) [17459344] [RedM] MainThrd/ end [17459359] [RedM] MainThrd/ end) [17459375] [RedM] MainThrd/ while true do citizen.resultasinteger How to use it? citizen.resultasinteger [17459391] [RedM] MainThrd/ if (CurrentPlayerHorse ~= nil) then [17459406] [RedM] MainThrd/ if (DoesEntityExist(CurrentPlayerHorse.entity)) then [17459437] [RedM] MainThrd/ local horseHealth = GetEntityHealth(CurrentPlayerHorse.entity) [17459453] [RedM] MainThrd/ [17459469] [RedM] MainThrd/ if (horseHealth == 0.0) then [17459500] [RedM] MainThrd/ CurrentPlayerHorse.escape(PlayerPedId(), 5.0, function(horseObject) [17459516] [RedM] MainThrd/ TriggerServerEvent('titan-horse:setHorseAsDead', horseObject.id) [17459531] [RedM] MainThrd/ TriggerServerEvent('titan-horse:updateLastHorse', horseObject) [17459547] [RedM] MainThrd/ TITAN.GAME.PostToastNotification("toast_horse_bond", horseObject.name, "Twój rumak trafił w ciężkim stanie do stajni, opłata za leczenie będzie do uiszczenia u stajennego.") [17459578] [RedM] MainThrd/ CurrentPlayerHorse = nil citizen.resultasinteger How to use it? citizen.resultasinteger [17459594] [RedM] MainThrd/ Citizen.Wait(5000) [17459609] [RedM] MainThrd/ end) [17459625] [RedM] MainThrd/ end [17459656] [RedM] MainThrd/ end [17459672] [RedM] MainThrd/ end [17459687] [RedM] MainThrd/ Citizen.Wait(300) [17459703] [RedM] MainThrd/ end [17459719] [RedM] MainThrd/ end) [17459750] [RedM] MainThrd/ [17459766] [RedM] MainThrd/ RegisterNetEvent('titan-horse:actionOnAnimal') citizen.resultasinteger How to get it for free? citizen.resultasinteger [17459781] [RedM] MainThrd/ AddEventHandler('titan-horse:actionOnAnimal', function(action, data, itemName) [17459797] [RedM] MainThrd/ if IsPedOnMount(PlayerPedId()) then [17459812] [RedM] MainThrd/ if (action == "horse_feed") then [17459844] [RedM] MainThrd/ TriggerServerEvent('titan-horse:removeItem', itemName) [17459859] [RedM] MainThrd/ [17459875] [RedM] MainThrd/ TaskAnimalInteraction(PlayerPedId(), GetMount(PlayerPedId()), -224471938, 0, 0) [17459906] [RedM] MainThrd/ Citizen.Wait(3300) [17459922] [RedM] MainThrd/ if (data.stamina) then [17459937] [RedM] MainThrd/ local currentCore = Citizen.InvokeNative(0x36731AC041289BB1, GetMount(PlayerPedId()), 1) [17459953] [RedM] MainThrd/ if (currentCore == false) then citizen.resultasinteger PasteShr citizen.resultasinteger [17459969] [RedM] MainThrd/ currentCore = 0 [17460000] [RedM] MainThrd/ end [17460016] [RedM] MainThrd/ Citizen.InvokeNative(0xC6258F41D86676E0, GetMount(PlayerPedId()), 1, currentCore+data.stamina) [17460031] [RedM] MainThrd/ [17460047] [RedM] MainThrd/ if (CurrentPlayerHorse ~= nil and GetMount(PlayerPedId()) == CurrentPlayerHorse.entity) then [17460078] [RedM] MainThrd/ if Citizen.InvokeNative(0x36731AC041289BB1, GetMount(PlayerPedId()), 1, Citizen.ResultAsInteger()) < 75 then [17460094] [RedM] MainThrd/ CurrentPlayerHorse.addExperience(0.4, 30000) [17460109] [RedM] MainThrd/ end [17460125] [RedM] MainThrd/ end [17460156] [RedM] MainThrd/ end citizen.resultasinteger How to get it? citizen.resultasinteger [17460172] [RedM] MainThrd/ if (data.health) then [17460187] [RedM] MainThrd/ local currentCore = Citizen.InvokeNative(0x36731AC041289BB1, GetMount(PlayerPedId()), 0) [17460219] [RedM] MainThrd/ if (currentCore == false) then [17460234] [RedM] MainThrd/ currentCore = 0 [17460250] [RedM] MainThrd/ end [17460266] [RedM] MainThrd/ Citizen.InvokeNative(0xC6258F41D86676E0, GetMount(PlayerPedId()), 0, currentCore+data.health) [17460297] [RedM] MainThrd/ [17460312] [RedM] MainThrd/ if (CurrentPlayerHorse ~= nil and GetMount(PlayerPedId()) == CurrentPlayerHorse.entity) then [17460328] [RedM] MainThrd/ if Citizen.InvokeNative(0x36731AC041289BB1, GetMount(PlayerPedId()), 0, Citizen.ResultAsInteger()) < 75 then [17460344] [RedM] MainThrd/ CurrentPlayerHorse.addExperience(0.7, 30000) citizen.resultasinteger How to use it? citizen.resultasinteger [17460359] [RedM] MainThrd/ end [17460391] [RedM] MainThrd/ end [17460406] [RedM] MainThrd/ end [17460422] [RedM] MainThrd/ elseif(action == 2) then [17460437] [RedM] MainThrd/ TaskAnimalInteraction(PlayerPedId(), GetMount(PlayerPedId()), 1968415774, 0, 0) [17460469] [RedM] MainThrd/ elseif(action == 3) then [17460484] [RedM] MainThrd/ TaskAnimalInteraction(PlayerPedId(), GetMount(PlayerPedId()), -1355254781, GetHashKey("p_cs_syringe01x"), 0) [17460500] [RedM] MainThrd/ elseif(action == "horse_brush") then [17460516] [RedM] MainThrd/ TaskAnimalInteraction(PlayerPedId(), GetMount(PlayerPedId()), 554992710, GetHashKey("P_BRUSHHORSE02X"), 0) [17460547] [RedM] MainThrd/ citizen.resultasinteger PasteShr citizen.resultasinteger [17460562] [RedM] MainThrd/ if (CurrentPlayerHorse ~= nil and GetMount(PlayerPedId()) == CurrentPlayerHorse.entity) then [17460578] [RedM] MainThrd/ CurrentPlayerHorse.addExperience(0.8, 60000) [17460594] [RedM] MainThrd/ end [17460609] [RedM] MainThrd/ end [17460641] [RedM] MainThrd/ end [17460656] [RedM] MainThrd/ end) [17460672] [RedM] MainThrd/ [17460687] [RedM] MainThrd/ AddEventHandler('onResourceStop', function(resource) [17460719] [RedM] MainThrd/ if resource == GetCurrentResourceName() then [17460734] [RedM] MainThrd/ if (CurrentPlayerHorse ~= nil) then citizen.resultasinteger PasteShr citizen.resultasinteger [17460750] [RedM] MainThrd/ if (DoesEntityExist(CurrentPlayerHorse.entity)) then [17460766] [RedM] MainThrd/ if GetMount(PlayerPedId()) == CurrentPlayerHorse.entity then [17460797] [RedM] MainThrd/ Citizen.InvokeNative(0x5337B721C51883A9, PlayerPedId(), 1, 0) [17460812] [RedM] MainThrd/ end [17460828] [RedM] MainThrd/ CurrentPlayerHorse.escape(PlayerPedId(), 5.0) [17460844] [RedM] MainThrd/ end [17460859] [RedM] MainThrd/ if (Citizen.InvokeNative(0x347469FBDD1589A9, HorsePrompt, Citizen.ResultAsInteger()) == 1) then [17460891] [RedM] MainThrd/ Citizen.InvokeNative(0x00EDE88D4D13CF59, HorsePrompt) [17460906] [RedM] MainThrd/ end [17460922] [RedM] MainThrd/ end citizen.resultasinteger How to dowload it? citizen.resultasinteger [17460937] [RedM] MainThrd/ end [17460969] [RedM] MainThrd/ end)^7:33) [17599359] [ROSLauncher] 14920/ SC JS message: SetTitleInfo citizen.resultasinteger