Jump to content

Firespider

Members
  • Posts

    238
  • Joined

  • Last visited

Everything posted by Firespider

  1. Firespider

    [HELP]

    Hello! I have another problem I want to solve, if we press the arrow on the right, it goes to the other car, but for some reason it doesn't go to the fourth one. bindKey("arrow_r", "Down", function() destroyElement (Veh1) if (car == 1) then local Veh2 = createVehicle(411, 2154.45996, -1153.21362, 23.87550) bindKey("arrow_r", "Down", function() destroyElement (Veh2) car = 1+1 end ) if (car == 2) then local Veh3 = createVehicle(478, 2154.45996, -1153.21362, 23.87550) bindKey("arrow_r", "Down", function() destroyElement (Veh3) car = 1+2 end ) if (car == 3) then createVehicle(240, 2154.45996, -1153.21362, 23.87550) end end end end )
  2. Hello! I had a problem and I would like to solve it if the player presses it backspace on the keyboard, the camera view is restored, but I can't solve it. I tried Destroy Element, but it's not good. Thanks in advance if anyone can help! function OpenWindow() if (page == 1) then setPlayerHudComponentVisible("all", false) showChat(false) camera = setCameraMatrix( 2149.77148, -1148.25977, 24.41226) Veh1 = createVehicle(402, 2154.45996, -1153.21362, 23.87550) bindKey("BACKSPACE", "Down", function() destroyElement(camera) end) end end
  3. Doesn't working. But thanks for that But it works, I just didn't delete a part, thanks.
  4. Hello! This part of the script doesn't work for some reason, but I don't know why I don't need a little help. Do not issue any error codes. addEventHandler("onVehicleExit", resourceRoot, function(player, seat) if (player == client) then local vehicle = getPedOccupiedVehicle(client) if (vehicle) then if (vehicle == getElementData(client, "Jobveh")) then if (seat == 0) then outputChatBox("#1db8b5[Munka]#549c6bSikeressen leadtad a munka járművedet", client, 0, 0, 0, true) end end end end end )
  5. Hello! Need some help. I'm writing a work script and it doesn't work because if you go into the delivery spot, the car freezes. Because now the car just goes through the marker --Client side local Storage = {false, false} local deliveryspot = {false, false} local FinishJob = {false, false} local DPoint = { [1] = {1648, -2249, 13},---airport -> Repülőtér [2] = {2190, -2266, 13},---docks -> Dokkok [3] = {1369, -1889, 13},---Verdant Bluffs LS [4] = {1043, -1872, 13}, [5] = {857, -1365, 13}, } local Anyagok = { [1] = {"Fém"}, [2] = {"Deszka"}, [3] = {"Vas rúd"}, [4] = {"Nikecell"}, } function WorkStart() Storage[1] = createMarker(2784, -2455, 13, "cylinder", 10, 10, 160, 0) Storage[2] = createBlip(2784, -2455, 13, 51, 40, 160, 0, 0) outputChatBox("#1db8b5[Munka]#549c6bMenj el a raktárba és vedd fel rendelést", 0, 0, 0, true) end addEventHandler("onClientVehicleEnter", root, function (thePlayer, seat) if (source == getElementData(localPlayer, "Jobveh")) then if (seat == 0) then if not (Storage[1]) then WorkStart() end if not (FinishJob[1]) then FinishJob[1] = createMarker(2745, -2431, 13, "cylinder", 10, 20, 160, 10) FinishJob[2] = createBlip(2745, -2431, 13, 11, 2, 51, 10, 0, 0, 0, 255) end end end end ) addEventHandler("onClientMarkerHit", resourceRoot, function(hitPlayer, mDim) if (mDim) then if (source == Storage[1]) then if (hitPlayer == localPlayer) then local vehicle = getPedOccupiedVehicle(hitPlayer) if (vehicle) then if (vehicle == getElementData(hitPlayer, "Jobveh")) then setElementFrozen(localPlayer,true) setElementFrozen(vehicle, true) setTimer(function() setElementFrozen(vehicle, false) setElementFrozen(localPlayer, false) destroyElement(Storage[1]) destroyElement(Storage[2]) local index = math.random(1, #DPoint) deliveryspot[1] = createMarker(DPoint[index][1], DPoint[index][2], DPoint[index][3], "cylinder", 15, 20, 160, 0) deliveryspot[2] = createBlip(DPoint[index][1], DPoint[index][2], DPoint[index][3], 51, 10, 0, 0, 0, 255) outputChatBox("#1db8b5[Munka]#549c6bSikeressen felvetted a rendelést menj és szállítsd ki", 0, 0, 0, true) if (index == 1) then outputChatBox("#1db8b5[Munka]#549c6bHely:Reptér.", 0, 0, 0, true) end if (index == 2) then outputChatBox("#1db8b5[Munka]#549c6bHely:Dokkok.", 0, 0, 0, true) end if (index == 3) then outputChatBox("#1db8b5[Munka]#549c6bHely:Verdant Bluffs LS.", 0, 0, 0, true) end end, math.random(3000, 5000), 1) end end end if (source == deliveryspot[1]) then if (hitPlayer == localPlayer) then local vehicle = getPedOccupiedVehicle(hitPlayer) if (vehicle) then if (vehicle == getElementData(hitPlayer, "Jobveh")) then setElementFrozen(localPlayer,true) setElementFrozen(vehicle, true) setTimer(function() setElementFrozen(vehicle, false) setElementFrozen(localPlayer, false) destroyElement(deliveryspot[1]) destroyElement(deliveryspot[2]) WorkStart(); end, math.random(3000, 5000), 1) end end end end end end end )
  6. Ezt a problémát megoldottam. A másik probléma az lenne hogy akkor is ki írja hogy már van járműved amikor nincs.
  7. Sziasztok! Írnék egy munka kódot de valami baj van és nem értem mi a baj. ---Server side for i, player in ipairs(getElementsByType("player")) do setElementData(player, "Jobveh", false) end local vehpos = { [1] = {2742.76416, -2468.74683, 13.64844}, [2] = {2742.69360, -2460.06079, 13.64844}, }; local Deliverypos = { } local Marker = createMarker(2744.14453, -2453.91431, 13.86226, "cylinder", 3, 255) local VehIDJobs = {609, 499}, addEventHandler("onMarkerHit", resourceRoot, function(hitElement, mDim) if (mDim) then if (source == Marker) then if (getElementType(hitElement) == "player") then if not (getElementType(HitElement, "Jobveh")) then local Veh for i, spot in pairs(vehpos) do createVehicle(609, spot[1], spot[2], spot[3]) setElementData(hitElement, "Jobveh", Jobveh) veh = true break; end end if (veh) then end end end end end end
  8. Firespider

    [HELP]

    Isn't that the code?
  9. Firespider

    [HELP]

    He already solved that For some reason, he won't take money even if he has enough.
  10. Firespider

    [HELP]

    Why doesn't the button light up when you move the mouse over it? And if they click on him, why doesn't he take the money if he has enough. local sx,sy = guiGetScreenSize();--1920,1080 local relx,rely = sx/1920,sy/1080; local isCardShop = false local money = getPlayerMoney(localPlayer) local Cardlist = { [1] = {411, "Cég1", 100}, }; color = tocolor(41, 173, 21, 255) addEventHandler("onClientRender", root, function() if (isCardShop) then ---Rajz dxDrawRectangle(sx*.25, sy*.20, sx*.50, sy*.05, tocolor(0, 0, 0, 200))--Fejléc dxDrawRectangle(sx*.250, sy*.25, sx*.50, sy*.7, tocolor(30, 40, 50, 200))--Menű dxDrawRectangle(sx*.450, sy*.50, sx*.10, sy*.07, color1 or color)--Gomb ---Feliratok dxDrawText("Cég menű", sx*.50, sy*.090, sx*.50, sy*.36, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawText("Cégek:", sx*.50, sy*.20, sx*.50, sy*.36, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawText("Kamionos cég", sx*.50, sy*.25, sx*.50, sy*.36, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawText("Kamionos cég", sx*.50, sy*.70, sx*.50, sy*.36, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat dxDrawText("50000$", sx*.50, sy*.75, sx*.50, sy*.36, tocolor(200, 200, 200, 255), relx*2, rely*2, "default-bold", "center", "center", false, false, false)--Felirat end end ); bindKey("F5","down",function() if isCardShop == true then isCardShop = false else isCardShop = true end end) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end ---------- if isMouseInPosition(sx*.450, sy*.50, sx*.10, sy*.07) then color1 = tocolor(88, 0, 0, 50) else color1 = color end ----------- function OpenWindow() isCardShop = not isCardShop if removeEventHandler("onClientRender", root, Panel) then removeEventHandler("onClientRender", root, Panel) showCursor(false) else addEventHandler("onClientRender", root, Panel) showCursor(true) end end bindKey("F3", "down", OpenWindow) ---------- addEventHandler("onClientClick", root, function(button,state) if isCardShop == true then if ( button == "left" and state == "down" ) then if isMouseInPosition(sx*.450, sy*.50, sx*.10, sy*.07) then local yourMoney = getPlayerMoney() if ( yourMoney <= 100) then takePlayerMoney(100) else outputChatBox("Nincs elég pénzed",255,0,0,true) --outputChatBox("Menj be a Markerbe a vizsga elkezdéséhez") end end end end end) ----------
  11. Sziasztok! Az lenne a probléma van egy szerverem. És amikor feljönnek lassan tölti be a szervert. Erre van megoldás?
  12. Firespider

    [HELP]

    I don't know what the problem is with the script addEventHandler ("onPlayerCommand", getRootElement(), function (cmd ) local serial = getPlayerSerial ( source ) if not (devSerials[serial] ) then if (devCommands[cmd]) then outputChatBox (exports.fv_engine:getServerSyntax("Admin","red").."Ezt a parancsot nem használhatod!",source,255,255,255,true); cancelEvent(); end end if devSerials[serial] then if (devCommands[cmd]) then sendMessageToAdmin(source, hexColor..getAdminName(source)..white.." használta a(z) "..hexColor..cmd..white.." parancsot!", 5); exports['fv_logs']:createLog(cmd, getAdminName(source).." használta a(z) " ..cmd.." parancsot!",source); end end end);
  13. Firespider

    [HELP]

    But I think fv_logs starts sooner
  14. Firespider

    [HELP]

    I don't know why you want the log resource to start sooner, but I don't know how ACL starts it
  15. Firespider

    [HELP]

    I do not get what you want
  16. Firespider

    [HELP]

    I just don't understand what's wrong.
  17. Firespider

    [HELP]

    Doesn't working But what you wrote should be good, I can't believe it Can you help me with this?
  18. Firespider

    [HELP]

    Shall we review the meta? Anyway, here's the meta if that helps. <meta> <script src="global.lua" type="shared" /> <script src="client.lua" type="client" /> <script src="statsC.lua" type="client" /> <script src="server.lua" type="server" /> <script src="adminhelpC.lua" type="client" /> <script src="adminjail/client.lua" type="client" /> <script src="adminjail/server.lua" type="server" /> <export type="shared" function="getAdminTitle"/> <export type="shared" function="getAdminColor"/> <export type="shared" function="getAdminName"/> <export type="shared" function="getAdminDuty"/> <export type="shared" function="getAdminSyntax"/> <export type="server" function="sendMessageToAdmin"/> <export type="server" function="adminJailTimer"/> <export type="shared" function="addAdminCommand"/> <oop>true</oop> </meta>
×
×
  • Create New...