Jump to content

Trust aka Tiffergan

Members
  • Posts

    143
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Trust aka Tiffergan

  1. Hello i have train script but so far i have only train and this train is driving around map i want to do that when train is on station in LS/LV/SF train stopped and people can enter train on passager and be transported to another city help
  2. client local window1 = guiCreateWindow(0.22, 0.22, 0.57, 0.61, "bla", true) guiWindowSetSizable(window1, false) guiSetVisible(window1,false) local button1 = guiCreateButton(0.03, 0.83, 0.94, 0.15, "123", true, window1) local text1 = guiCreateLabel(0.03, 0.07, 0.94, 0.75, "321", true, window1) guiLabelSetHorizontalAlign(text1, "center", false) addEvent("showGUI",true) addEventHandler("showGUI",getRootElement(), function () if ( guiGetVisible(window1) == false ) then guiSetVisible(window1,true) showCursor(true) end end) local function guzik() guiSetVisible(window1, false) showCursor(false, false) end addEventHandler("onClientGUIClick", button1, guzik, false) server addEventHandler("onResourceStart",resourceRoot, function () local marker = createMarker(1542.67529, -1448.50500, 12.54688, "cylinder", 1.5, 0, 255, 0, 180) -- USE YOUR OWN X/Y/Z --local blip = createBlipAttachedTo(marker, 1) -- pokazuje naam marker na gps i mapie setElementInterior(marker, 0) setElementDimension(marker, 0) addEventHandler("onMarkerHit",marker,onMarkerHit) end) function onMarkerHit(hitPlayer, matchingDimension) if not matchingDimension then return end if ( getElementType (hitPlayer) == 'player' ) then triggerClientEvent(hitPlayer,"showGUI",hitPlayer) end end just change X/Y/Z and shloud working @Andrew75t
  3. hello i found on internet that script that makes your vehicle more damage proof but when i start this script my tires wont pops out so how i can add or delete sth to be able to shoot and flat tire? local weapon_table = { -- model, id [30] = { [422]=10, --Bobcat [596]=9, --PoliceLS }, } function getElementSpeed(theElement, unit) -- Check arguments for errors assert(isElement(theElement), "Bad argument 1 @ getElementSpeed (element expected, got " .. type(theElement) .. ")") local elementType = getElementType(theElement) assert(elementType == "player" or elementType == "ped" or elementType == "object" or elementType == "vehicle" or elementType == "projectile", "Invalid element type @ getElementSpeed (player/ped/object/vehicle/projectile expected, got " .. elementType .. ")") assert((unit == nil or type(unit) == "string" or type(unit) == "number") and (unit == nil or (tonumber(unit) and (tonumber(unit) == 0 or tonumber(unit) == 1 or tonumber(unit) == 2)) or unit == "m/s" or unit == "km/h" or unit == "mph"), "Bad argument 2 @ getElementSpeed (invalid speed unit)") -- Default to m/s if no unit specified and 'ignore' argument type if the string contains a number unit = unit == nil and 0 or ((not tonumber(unit)) and unit or tonumber(unit)) -- Setup our multiplier to convert the velocity to the specified unit local mult = (unit == 0 or unit == "m/s") and 50 or ((unit == 1 or unit == "km/h") and 180 or 111.84681456) -- Return the speed by calculating the length of the velocity vector, after converting the velocity to the specified unit return (Vector3(getElementVelocity(theElement)) * mult).length end addEventHandler("onClientVehicleDamage",root,function(attacker,weapon,loss,dmgx,dmgy,dmgz,tireid) if getElementData(source,'god-mode') then return end if isVehicleDamageProof(source) then return end if attacker and getElementType(attacker)=='player' then if dmg_table[getElementModel(source)] then cancelEvent() setElementHealth(source,getElementHealth(source)-(dmg_table[getElementModel(source)]+weapon_table[weapon][getElementModel(source)])) print(getElementHealth(source)) end --elseif attacker~=('vehicle' or 'ped') then --setElementHealth(source,getElementHealth(source)-(getElementSpeed(source,1)/30*10)) end end)
  4. what are you talking about i have panel in panel in panel and then in this panel is panel xd
  5. if I remember correctly this is an old gamemode 0.5 in which there was no m4 / ak split ammunition only as assalut ammo I think it is https://www.moddb.com/mods/mtadayz/downloads/server-files-056-stable http://dayzsa.comunidades.net/mta-dayz-055-full-version
  6. i dont think you can delete this bars, but you can change resolution of crosshair.png and you shloud get nice crosshair
  7. but text scale is not a problem, the problem is that I'm 15 meters away from my opponent and he shows me 2031
  8. Hello i want to do script that when player aim, you will see player nick and distance between you and player that you aiming at ( sorry for english ) i did something like this if playerTarget then local x,y,z = getElementPosition(playerTarget) local x,y,distance = getScreenFromWorldPosition (x,y,z+0.5) distance = 30 if getElementData(playerTarget,"bandit") then text = string.gsub(getPlayerName(playerTarget), '#%x%x%x%x%x%x', '' ) else text = string.gsub(getPlayerName(playerTarget), '#%x%x%x%x%x%x', '' ) end local w = dxGetTextWidth(text,distance*0.033,"default-bold") if w and x and y and text and distance then dxDrawText ( text.."("..(getDistanceBetweenPoints3D( x,y,z, getElementPosition ( localPlayer )))..")",x-(w/5),y,x-(w/5),y,tocolor(100, 255, 100, 200),distance*0.033,"bankgothic") end end end); that line is the showing name and distance dxDrawText text.."("..(getDistanceBetweenPoints3D( x,y,z, getElementPosition ( localPlayer )))..")",x-(w/5),y,x-(w/5),y,tocolor(100, 255, 100, 200),distance*0.033,"bankgothic") but i dont know why i have so damn large output
  9. I have a question, how can I make a script in which I create a vehicle for a command, and if someone takes it from me, then I type this command and he returns to my cords x / y / z, I hope you understand, I just have one vehicle someone will take it from me then I will enter the command and the vehicle is taken from them and he comes back to me i hope you understand sorry for bad english
  10. I not sure why i need getPedOccupiedVehicle look on video repairing car look like that : and i want just to have oportunity to stop it ( SORRY FOR ENGLISH :V ) and the thing i want to do is when i have this animation i want to have text on chat to stop repair press K and when im pressing K my ped is stoping repairing. https://streamable.com/a4eosn
  11. addEventHandler("repairVehicle", root, function(veh) if repairTimer[veh] then triggerClientEvent(source, "displayClientInfo", source, getVehicleName(veh).." is already in repair!", 255, 22, 0) return; end repairTimer[veh] = setTimer(fixDayZVehicle, (1000-(math.floor(getElementHealth(veh))))*120, 1, veh, source); setElementFrozen(veh, true); setElementFrozen(source, true); setPedWeaponSlot(source, 0); setElementData(veh, "repairer", source); setElementData(source, "repairingvehicle", veh); setElementData(source, "repairvehicle", true); setPedAnimation(source, "SCRATCHING", "sclng_r", nil, true, false); triggerClientEvent(source, "displayClientInfo", source, "Started to repair "..getVehicleName(veh), 22, 255, 0); end); This is a code that repairs your vehicle, works well, but I want to add something that I have the option of pressing a button, e.g. "k", and stop repairing the vehicle, but I don't know how I can do it: V
  12. o i got it thanks for help man if soemone wanna now how this is it : function stopDrown () skin = getPedSkin(localPlayer) if skin == 200 then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopDrown )
  13. No there is no erros as i said that script is working on freeroam/play but on dayz isn't when i was searching getPedOxygenLevel there is 0 hits but when i was searching isElementInWater was 1 hit with that addEventHandler("onPlayerRefillWaterBottle", root, function(itemName) if isElementInWater(source) then if getElementData(source,itemName)<=0 then return end setElementData(source, "Water Bottle", getElementData(source, "Water Bottle") + 1); setElementData(source, itemName, getElementData(source, itemName) - 1); triggerClientEvent(source, "displayClientInfo", source, "You filled 1 x "..itemName, 22, 255, 0); triggerClientEvent(source, "refreshInventoryManual", source); else triggerClientEvent(source, "displayClientInfo", source, "You must be in water!", 255, 22, 0); end end);
  14. I want to do something that if we have a skin id == 200, we can swim as much as we want, and I did something that works for freeroam, but I do DayZ server and on DayZ server i get damage function stopDrown ( attacker, damage_type) if ( getElementType(source) == "player" ) then skin = getPedSkin(localPlayer) if skin == 200 and damage_type == 53 then cancelEvent() end end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopDrown )
  15. Witajcie. W imieniu zespołu World-DayZ chciałbym Was serdecznie zaprosić na nasz serwer. Brak doświadczenia w charakterze administratorów serwera MTA nadrabiamy doświadczeniami zdobytymi z perspektywy wieloletnich graczy trybu DayZ. Myślą przewodnią naszego serwera jest stwierdzenie: ,,Od graczy dla graczy". Serwer jest tworzony z myślą o funkcjonowaniu przez długi okres i został opłacony na jeden rok, także angażując się w grę na naszym serwerze możecie być pewni, że Wasze osiągnięcia nie pójdą na marne. Wszystkie zrzuty ekranu znajdziecie poniżej. NOWOŚCI - System, który rozwiązuje problem campienia pojazdów w bazach przez nieaktywne grupy, dzięki teleportowaniu nieużywanych przez dłuższy okres pojazdów poza obręb bazy jego właścicieli, z dodatkiem licznika informującego o 48 godzinnym odliczaniu i pozostałym czasie, - System poziomów zintegrowany z systemem nagród za osiągnięcie kolejnych progów poziomów, - System armorów, mający za zadanie między innymi uczynienie pojedynków car versus car ciekawszymi, dzięki wydłużeniu ich czasu trwania, - Występujący w trzydziestominutowych interwałach zrzut cennego zaopatrzenia, - Ranking graczy, - Szybki wybór broni, - Oraz wiele, wiele innych. CZEGO MOŻECIE SPODZIEWAĆ SIĘ PO NASZYM SERWERZE - Czynnego udziału administracji w życiu serwera, - Różnorodnych, ciekawie prowadzonych eventów, - Sympatycznej atmosfery, - Możliwości wyrażania swojej opinii odnośnie serwera, która nie zostanie zignorowana, - Możliwości brania udziału w rozwijaniu się nowej społeczności w świecie MTA DayZ, - Aktywnego Discorda i Teamspeaka, na których zawsze możecie zasięgnąć porady, poprosić o pomoc, czy też po prostu sobie po towarzysku pogadać Rzeczy do kupna Jak każdy wie, bazy stanowią nierozłączny element systemem trybu DayZ, toteż nie może go zabraknąć i na naszym serwerze. Będą się na nim znajdować 3 rodzaje baz z podziałem na rozmiar, czyli baza mała, baza średnia i baza duża. Ceny nie są wygórowane, także wydaje nam się, że każdy gracz będzie w stanie pozwolić sobie na jedną z nich, jeśli jednak masz swoją własną ekipę, która liczy minimum 5 osób i każdy z jej członków będzie miał przegrane 20 godzin na serwerze, to mamy dla Was dobrą wiadomość - będziecie mogli zgłosić się po darmową bazę! Wystarczy tylko, że napiszecie podanie na Discordzie o darmową, małą bazę na okres jednego miesiąca. Będzie także możliwość zakupu skina grupowego, przypisanego do Waszej ekipy. Na chwilę obecną nie planujemy dodawać boxów z amunicją ani spawnów pojazdów, gdyż naszym zdaniem nie tak powinno wyglądać DayZ. Nie chodzi nam o wyzysk, a o to, żebyście się dobrze na naszym serwerze bawili i chcieli w niego zaangażować. Baza mała Baza średnia Baza duża Porównanie baz System "Anty Kampienia Pojazdów" Poziomy Nazwa Serwera: World-DayZ IP Serwera: mtasa://54.38.202.159:20152 TeamSpeak:lol.mtasa.eu Discord: https://discord.gg/7wqeW72 Sloty: 40 | Gamemode: DayZ Przewidywalna data startu serwera 16.05.2020 godzina 16:00 - Czekamy na Was.
  16. o thanks it works, i was trying using OnPlayerSpawn and that was not working
  17. So i have this code, and this code work great, but when i will die and i will respawn i have still animations even if my ID skin is not 78 or 76 so what i need add there that will set my player animation on 0 when im respawning? function informPlayerOnModelChange(oldModel, newModel) if ( getElementType(source) == "player" ) then skin = getPedSkin(localPlayer) if skin == 78 or skin == 76 then setPedWalkingStyle(localPlayer,59) else setPedWalkingStyle(localPlayer,0) end end return end addEventHandler("onClientElementModelChange", root, informPlayerOnModelChange)
  18. try with that create a folder and give there a .Lua and xml file and a sounds folder, and in sounds give your sound file and make a path sounds / name.mp3
  19. yes client side but maybe i did something wrong look all c-side function informPlayerOnModelChange(oldModel, newModel) if ( getElementType(source) == "player" ) then skin = getPedSkin(localPlayer) if skin == 285 setPedWalkingStyle(localPlayer,59) else setPedWalkingStyle(localPlayer,0) end end end addEventHandler("onClientElementModelChange", root, informPlayerOnModelChange) addEventHandler("onClientPlayerDamagr",root,function() if ( getElementModel ( source ) == 285 ) then cancelEvent() end end );
  20. Not working and there is no erros in DB video if you not belive https://streamable.com/7uiygz
  21. Hello so as you can see in topic, I trying to do bullet proof skin and i was trying something like this but it not working function dmg ( attacker ) skin = getPedSkin(localPlayer) if skin == 285 cancelEvent() end addEventHandler ( "onClientDamage", getRootElement(), dmg )
×
×
  • Create New...