for _,v in ipairs(elements["position"]) do
Marker(Vector3(v[2], v[3], v[4]-.9), "cylinder", 4.5, 255, 0, 0, 100)
local text = Element("text")
text:setData("name", "Naprawa aut fraktyjnychn ["..v[1].."]")
text.position = Vector3(v[2], v[3], v[4]+.99)
end
addEventHandler("onMarkerHit", resourceRoot, function(player, dimension)
local vehicle = player.vehicle
if vehicle then
if vehicle.health < 100 then
if vehicle:getData("vehicle:rank") then
for _,v in ipairs(elements["position"]) do
if player:getData("player:duty") == v[1] then
triggerClientEvent(player, "onClientAddNotification", player, "Pojazd zosta? naprawiony!", "success")
vehicle:fix()
end
end
else
triggerClientEvent(player, "onClientAddNotification", player, "W tym miejscu mo?na naprawi? tylko pojazdy s?u?owe!", "error")
end
else
triggerClientEvent(player, "onClientAddNotifica...
Siema mam problem z napraw? aut frakcyjnych poniewa? gdy wjad? autem naprawionym to pojawi si? napis ?e auto jest sprawne a je?eli wjad? popsutym to go nie naprawia.
for _,v in ipairs(elements["position"]) do
Marker(Vector3(v[2], v[3], v[4]-.9), "cylinder", 4.5, 255, 0, 0, 100)
local text = Element("text")
text:setData("name", "Naprawa aut frakcyjnychn ["..v[1].."]")
text.position = Vector3(v[2], v[3], v[4]+.99)
end
addEventHandler("onMarkerHit", resourceRoot, function(player, dimension)
local vehicle = player.vehicle
if vehicle then
if vehicle.health < 1000 then
if vehicle:getData("vehicle:rank") then
for _,v in ipairs(elements["position"]) do
if player:getData("player:duty") == v[1] then
triggerClientEvent(player, "onClientAddNotification", player, "Pojazd zosta? naprawiony!", "success")
vehicle:fix()
end
end
else
triggerClientEvent(player, "onClientAddNotification", player, "W tym miejscu mo?na naprawi? tylko pojazdy s?u?owe!", "error")
end
else...
for _,v in ipairs(elements["position"]) do
Marker(Vector3(v[2], v[3], v[4]-.9), "cylinder", 4.5, 255, 0, 0, 100)
local text = Element("text")
text:setData("name", "Naprawa aut fraktyjnychn ["..v[1].."]")
text.position = Vector3(v[2], v[3], v[4]+.99)
end
addEventHandler("onMarkerHit", resourceRoot, function(player, dimension)
local vehicle = player.vehicle
if vehicle then
if vehicle.health < 1000 then
if vehicle:getData("vehicle:rank") then
for _,v in ipairs(elements["position"]) do
if player:getData("player:duty") == v[2] then
triggerClientEvent(player, "onClientAddNotification", player, "Pojazd zosta? naprawiony!", "success")
vehicle:fix()
end
end
else
triggerClientEvent(player, "onClientAddNotification", player, "W tym miejscu mo?na naprawi? tylko pojazdy s?u?owe!", "error")
end
else
triggerClientEvent(player, &q...
Witam posiadam prawko z GM Your Pseudol v1-2 i jest taki problem z jak podchodz? do zdawania to wy?wietla si? "Posiadasz zawieszone licencje" W db3 jak i w konsoli nic nie ma.
Witam, Chcia?bym zrobi? skrypt na mechanika dla PD, ma to dzia?a? na zasadzie, ?e frakcja PD wchodzi w marker, a pojazd do naprawy stoi w cuboidzie, PD wy?wietla si? albo gui albo mo?e by? komenda, gdy wpisuje t? komend? to naprawia pojazd graczowi oraz zabiera graczowi kase. My?l? ?e dobrze wyja?ni?em. Nie wiem jak zacz?? skrypt, mo?e kto? mi albo podpowie albo zrobi skrypt, nie musi by? bardzo zaawansowany.
Potrzebuje funkcji z dokumentacji:
- na naprawe pojazdu gracza
- na sprawdzanie czy gracz jest w aucie
- na zabieranie pieniedzy graczowi
- pod komenda /fix
- sprawdzenie czy gracz ma odpowiednia ilosc $$$
Ewentualnie jakie? porady <333333 pozdrawiam
Witam , mam jeden problem odnosnie naprawy pojazdu , mam pliki Your Adventure i po przeniesieniu :NAPRAWY: oraz Cuboida po kliknieciu "NAPRAW WSZYSTKO" jest tylko napisane (Naprawiles wszystkie lementy w pojezdzie) a pojazd nadal stoi jak sta? , wie kto? moze czego to jest przyczyna ?
Witam mam problem z napraw? pojazd?w. Wyskakuje mi b??d
[lua]triggered serverside event montazElementu, but event is not added serverside
[/lua]
Czyta?em na forum i jeden z u?ytkownik?w zmieni? na inn? napraw? i u niego to dzia?a?o. Natomiast u mnie wgra?em ju? 4 r??ne systemy napraw i nie dzia?a.
[lua]--[[
Resource: OURGame
Developers: Split <[email protected]>
Copyright <[email protected]> 2015-2016
You have no right to use this code without my permission.
]]
local m_dostep="mechanik-sf"
local doFixed={
{"Silnik", 1, fn=function(veh) if getElementHealth(veh)>=2040 then return true end; return false end},
{"Maska", 2, fn=function(veh) if getVehicleDoorState(veh, 0)==0 then return true end; return false end},
{"Baga?nik", 3, fn=function(veh) if getVehicleDoorState(veh, 1)==0 then return true end; return false end},
{"Drzwi lewy prz?d", 4, fn=function(veh) if getVehicleDoorState(veh, 2)==0 then return true end; return false end},
{"Drzwi prawy prz?d", 5, fn=function(veh) if getVehicleDoorState(veh, 3)==0 then return true end; return false end},
{"Drzwi lewy ty?", 6, fn=function(veh) if getVehicleDoorState(veh, 4)==0 then return true end; return false end},
{"Drzwi prawy ty?", 7, fn=function(veh) if getVehicleDoorState(veh, 5)==0 then return true end; return false end},
{"Szyba przednia", 8, fn=function(veh) if getVe...
Siemka, mam taki skrypt i nie wiem jak go lekko przerobi? aby naprawia? tylko auta o danym ID, chodzi mi ?eby jak wjade w marker to tylko radiolke naprawia?o. Daje tu kod, z g?ry dzi?ki za pomoc.
[lua] local?marker?=?createMarker(-2034.6999511719,?174.60000610352,?27.89,"cylinder",?3,?255,?0,?255)
function?naprawa(thePlayer)
if?(?isPedInVehicle?(?thePlayer?)?)?then
local?theVehicle?=?getPedOccupiedVehicle?(?thePlayer)
setElementFrozen?(theVehicle,?true)
setTimer(function()
setElementFrozen(theVehicle,?false)
end,?5000,?1)
local?money?=?getPlayerMoney(thePlayer)
if?(money?>?50)?then?
takePlayerMoney(thePlayer,?50)
local?succes?=?fixVehicle?(?theVehicle?)
if?(?succes?)?then
outputConsole?("Pojazd?naprawiony",?thePlayer?)
else
outputConsole?(?"Nieudana?pr?ba?naprawy.",?thePlayer)
end
else
outputConsole?(?"Musisz?by??w?poje?dzie!",?thePlayer?)
end
end
end
addEventHandler("onMarkerHit",?marker,?naprawa)
function?fix1(thePlayer)
local?accName?=?getAccountName?(?getPlayerAccount?(?thePlayer?)?)
if?isObjectInACLGroup?("user."..accName,?aclGetGroup?(?"Admin"?)?)?then
local?theVehicle?=?getPedOccupiedVehicle?(?thePlayer)
local?succes?=?fixVehicle?(?theVehicle?)
if?(?succes?)?then
outputConsole?("Pojazd?naprawiony",?thePlayer?)
end
end
end
addCommandHandler("fix",?fix1) [/lua]
[ Dodano : 2018-02-21, 00:07 ]
Zamiast tego ?e dana grupa ACL mo?e to robic to...
Witam mam taki problem, nie dzia?a mi naprawa pojazd?w gdy? wyskakuje taki o to b??d:
ERROR: Client (NICK) triggered serverside event montazElementu, but event is not added serverside
Prosz? o pomoc.
local t = createElement('text')
setElementPosition(t,-109.45, 1043.49, 19.93-0.5)
setElementData(t,"name","Naprawa pojazdunSamoobs?uga")
local t = createElement('text')
setElementPosition(t,-109.23, 1051.13, 19.93-0.5)
setElementData(t,"name","Naprawa pojazdunSamoobs?uga")
local strefyNapraw={
-- SF
warsztatIdlewoodStanowsko11={
cuboid={-111.18, 1045.20, 19.59, 360.0, 360.0, 91.2},-- cuboid w ktorym musi znalezc sie pojazd
mpos={-109.45, 1043.49, 19.93-1}, -- pozycja markera w ktorym gracz bedzie stal aby naprawiac
faction_id=3, -- id frakcji ktora ma do tego dostep
},
warsztatIdlewoodStanowsko12={
cuboid={-110.94, 1053.95, 19.59, 360.0, 360.0, 89.9},
mpos={-109.23, 1051.13, 19.93-1},
faction_id=3,
},
}
for i,v in pairs(strefyNapraw) do
v.cs=createColCuboid(v.cuboid[1], v.cuboid[2], v.cuboid[3], v.cuboid[4], v.cuboid[5], v.cuboid[6])
v.marker=createMarker(v.mpos[1], v.mpos[2], v.mpos[3], "cylinder", 1, 0,255,255,50)
setElementData(v.marker,"cs",v.cs)
setElementData(v.marker,"faction_id",v.faction_id)
Witam, chc? si? zapyta? czy jest mo?liwo?? naprawy pojazdu za pomoc? np. Gui, cmd ze np.
Masz rozwalone cale auto ale chcesz szybe tylko to pd przyjedzie i wymieni ci tylko szybe za pomoca cmd /szyba czy jakos tak. Lub w gui. Jak w cmd da rade to w gui jakos moze ogarne. Licze na szyba pomoc oraz wytlumaczenie !
Daje repe i pifo
[center]Witam mam problem z tym skryptem chodzi o to ze pobiera mi kas? x2 to jeszcze daje na minus jak mam 0 stara?em si? to ogarn?? i nic mi nie wychodzi.[/center]
S:
[lua]local stanowiskaNaprawcze = {
stanowiskoDoherty={
mpos={1106.54602,1760.97449,10.82031}, -- marker
cpos={1094.7373, 1757.0455, 10.820313-1, 11.75, 6.75, 5}, -- cuboid
--faction_id=1, -- (id) frakcja kt?ra b?dzie mia?a dost?p
text="Naprawa pojazdu"
witam mam komend? na napraw? pojazdu w kt?rym siedzi gracz u?ywam tego:
ale chce to przerobi? ?e trzeba stac poza pojazdem ale te? blisko ?eby go naprawia?.(chodzi mi o funkcje kt?ra sprawdzi jakie id pojazdu stoi przed nami) (i jezeli bedzie to naczepa lub rower to wyskoczy Nieprawid?owa reakcja!)
z g?ry dzk za pomoc
Cze??, witajcie mam taki problem ze skryptem. Jest to skrypt na komend? kt?ra naprawia pojazd, jednak po wpisaniu komendy wyskakuje db3 i nie naprawia.
function napraw (thePlayer, seat)
if isElementWithinMarker(thePlayer, naprawa) then
local hajs = getPlayerMoney(thePlayer) local hp = setVehicleHealth(thePlayer) setVehicleHealth(source, 1000)
if (hajs < 50 ) then if hp <= 1000 then
outputChatBox("Nie masz wystarczajaco pieniedzy",thePlayer, 0, 170, 255, true) outputChatBox("Masz naprawiony samoch?d ",thePlayer, 0, 170, 255, true)
else
if isPedInVehicle ( thePlayer ) then
local car = getPedOccupiedVehicle ( thePlayer ) fixVehicle(car) takePlayerMoney(thePlayer, 50) outputChatBox("Naprawiles auto! wydales 50$", thePlayer, 0, 170, 255, true)
else outputChatBox ("nie jestes w aucie!", thePlayer, 0, 170, 255, true) end
end
end
end
end
addCommandHandler("napraw", napraw)
function wjechal (thePlayer) outputChatBox ("Wpisz /napraw ( koszt 50$ )", thePlayer, 0, 170, 255, true) end
addEventHandler("onMarkerHit",naprawa,wjechal)
Witajcie! mam problemos ;d bo tak pisa?em sobie taki skrpt ?e jak klikn? wyceluj? w auto i klikn? lewym to niszczy auto a prawym naprawia mam o to taki kod lecz nie dzia?a . wgra?em to pod suszrk? kt?r? mam podmianion? na silenced
oto kod
naprawa:
addEventHandler ( "onClientClick", root, function( button, state, _, _, _, _, _, element )
if element then if button == "right" and state == "down" and getElementType(element) == "vehicle" then if getPedWeapon ( getLocalPlayer() ) == 22 then
fixVehicle ( element ) end
end
end
end)
niszczenie:
addEventHandler ( "onClientClick", root, function( button, state, _, _, _, _, _, element )
if element then if button == "left" and state == "down" and getElementType(element) == "vehicle" then if getPedWeapon ( getLocalPlayer() ) == 22 then
destroyElement( element ) end
end
end
end)
addEventHandler ( "onMarkerHit",marker, function (gpojazd) local auto = getPedOccupiedVehicle(gpojazd)
if auto and getVehicleController(auto) == gpojazd then
setElementFrozen ( auto, true ) fixVehicle (auto) setElementFrozen ( auto, false ) end
end)
Wstawia?em wcze?niej m?j skrypt ale ci?gle wypisywa?o "U?y?e? niedozwolonego s?owa, zapoznaj si? z TYM tematem" a TEN temat nie istnieje...
[ Dodano : 2014-10-24, 19:38 ]
Witam, m?g?by mi kto? pom?c? Pr?bowa?em pisa? skrypty i wysz?o mi takie co? i nawet dzia?a?o. A teraz nie dzia?a...
Og?lnie to chodzi, o naprawianie auta poprzez marker. Ma kto? pomys?, dlaczegonie dzia?a?
[lua]
marker = createMarker (1850.090, -1856.221, 12.3, "cylinder", 5.0, 50, 204, 57, 255)
function fix(playerSource)
local theVehicle = getPedOccupiedVehicle(playerSource)
if theVehicle and getVehicleController(theVehicle) == playerSource then
if getPlayerMoney ( playerSource ) < 150 then return end
fixVehicle (theVehicle)
takePlayerMoney (playerSource, 150)
outputChatBox ("Pojazd zosta? naprawiony!" , getLocalPlayer)
end
end
addEventHandler ( "onMarkerHit", marker, fix)
marker = createMarker (1929.090, -2067.221, 12.3, "cylinder", 5.0, 50, 204, 57, 255)
function fix(playerSource)
local theVehicle = getPedOccupiedVehicle(playerSource)
if theVehicle and getVehicleController(theVehicle) == playerSource then
if getPlayerMoney ( playerSource ) < 70 then return end
fixVehicle (theVehicle)
takePlayerMoney (playerSource, 70)
outputChatBox ("Pojazd zosta? naprawiony!" , getLocalPlayer)
end
end
addEventHandler ( "onMarkerHit", marker, fix)
1. Gdy wjade w marker skrypt zabiera mi kase dop?ki z niego nie wyjade, a ma zabra? tylko raz.
2. Jak zrobi? by tylko kierowca mog? u?y? tego markeru?
Kod:
function fixCarSF(thePlayer) local car = getElementsByType("vehicle")
for k, v in ipairs(car) do fixVehicle(v) takePlayerMoney(thePlayer, 100) outputChatBox("Naprawi?e? pojazd! Tracisz $ 100!", thePlayer, 0, 170, 255, true) end
end
addEventHandler("onMarkerHit", mark1, fixCarSF)
Cze??.
M?j problem polega na tym, ?e po naci?ni?ciu klawisza 2 samoch?d jest naprawiany, ale wiadomo?? na czacie powtarza si? 2 razy. Komenda /napraw dzia?a normalnie.
Kod :
function repairVehicle(gracz, theVehicle)
if isElement(gracz) and getElementType(gracz) == "player" then if isPedInVehicle(gracz) then
local theVehicle = getPedOccupiedVehicle(gracz)
if theVehicle then
outputChatBox("* Pojazd naprawiony!", gracz, 220, 220, 0) fixVehicle(theVehicle) playSoundFrontEnd(gracz, 46) end else outputChatBox("* Musisz by? w poje?dzie!", gracz, 220, 220, 0) end
end
end
addCommandHandler("napraw", repairVehicle)
function bind()
for k,v in ipairs(getElementsByType("player")) do bindKey(v, "2", "down", repairVehicle) end
end
addEventHandler("onResourceStart", root, bind)
Witajcie, mam taki problem - jak mam naprawi? wyci?ni?cia sztangi? Chodzi mi o to, ?e jak pisze "Wyci?ni?? 0. Aby zdoby? si?? nale?y podnie?? 100 razy." to te "0" si? nie zmienia po wyciskaniu. Jak to mog? naprawi?, bardzo prosz? o pomoc.
Witam, naprawi? by ktos ten skrypt na zabawy z mapy fulldm, mianowicie:
Wgra?em ten skrypt wszystko ?adnei pieknie ale znikne?y boxy z paska na dole (0sprite te Gwiazdki) zagl?dne?em a tam jest kod do licznika z fulldm. A licznik W mapie PP jest.
DO mapy jakiej wgrywam: Polskie Party - PP
Bardzo prosze o naprawe tego skyptu. Za kazdy post w tym poscie PIWO !
Link do tych zabaw( zabawy jako skrytp, scriptfiles i pawno do tego skryptu)