Jump to content

Matevsz

Members
  • Posts

    197
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Matevsz

  1. I had so after the entry did not see the marker also Help
  2. But, if I add: triggerClientEvent(player, "onSkinMarkerHit", player) triggerClientEvent(player, "onClientResourceStart", player) function TeleportDoSkinShop(player) if getElementType(player)=="player" then if source == wejscie then setElementPosition(player, 161.60000610352, -95.699996948242, 1001.799987793) setElementInterior(player, 18) setElementInterior(wyjscie, 18) setElementInterior(sprzedawca, 18) setElementInterior(markerKupnaSkina, 18) setElementFrozen(player, true) setTimer(setElementFrozen,30000,1,player,false) triggerClientEvent(player, "onSkinMarkerHit", player) triggerClientEvent(player, "onClientResourceStart", player) end end end addEventHandler("onMarkerHit", wejscie, TeleportDoSkinShop) This gui and the cursor show up immediately after entry... SS: http://imgur.com/FRxSgsn
  3. Needless to say the window before I saw Grid, I added to the client: if isElementWithinMarker(getLocalPlayer()) then addEvent("onSkinMarkerHit", true) addEventHandler("onSkinMarkerHit", getRootElement(), function() if not isPedInVehicle(getLocalPlayer()) then if isElementWithinMarker(getLocalPlayer()) then setCameraMatrix(ped, 174.46969604492, -88.212097167969, 1003.6256713867, 175.40690612793, -88.209663391113, 1003.2769165039) guiSetVisible(gridlist, true) showCursor(true) setElementInterior(ped, 18) setElementDimension(ped, 1) end end) and DebugScript shows error: ERROR: Bad argument @ "isElementWithinMarker" [expected marker at argument 2, not none] Server triggered clientside event onClientResourceStart, but event is not marked as remotly triggerable
  4. Hi, I want to make the entry into the marker "markerKupnaSkina" appeared Gui and cursor, but do not see anything. Server: Client:
  5. Hello all, I have a problem with SkinShop, I want to make the entry into the marker was selected skins from gridlist when you press "backspace" gui is shut off, and as you press "enter" to select a skin and is gui shut off. Client: Server: Console, no errors. Debugscript Error: Bad argument 'BindKey' Expected function at argument, 3 got nil. Bad argument 'BindKey' Expected function at argument, 3 got nil. Help pls
  6. Of course I use GuiEditor : ) Instead OnClientGUIClick i gave OnClientMouseEnter, but something does not work GUI: main.poleLogin = guiCreateEdit(1246, 417, 237, 34, "", false) main.poleHaslo = guiCreateEdit(1246, 468, 237, 34, "", false) main.buttonLogin = guiCreateStaticImage(1501, 407, 106, 51, "login.png", false) Client: addEventHandler("onClientResourceStart", resourceRoot, function() showChat(false) showCursor(true) end ) addEventHandler("onClientMouseEnter", main.buttonLogin, function(btn,state) if btn == "left" and state == "up" then local login = guiGetText(main.poleLogin) local haslo = guiGetText(main.poleHaslo) if login ~= "" and haslo ~= "" then triggerServerEvent("sprobujZalogowac", localPlayer, login, haslo) else setErrorStrine("Uzupełnij wszystkie pola!") end end end, false ) Server: addEvent("sprobujZalogowac",true) addEventHandler("sprobujZalogowac", root, function(login,haslo) if getAccount(login) then local acc = getAccount(login,haslo) if acc then logIn(source,acc,haslo) else triggerClientEvent(source,"onClientWrongLogin",root,"The specified account has a different password.") end else triggerClientEvent(source,"onClientWrongLogin",root,"Account with the specified login name does not exist.") end if checksave == true then triggerClientEvent(source,"ZapiszLoginXML",getRootElement(),login,haslo) else triggerClientEvent(source,"ResetZapisuXML",getRootElement(),login,haslo) end end ) addEventHandler("onPlayerLogin", root, function() setCameraTarget(source,source) showChat(source,true) showCursor(source,false) setPlayerHudComponentVisible(source,"all",true) spawnPlayer(source, 0.0, 0.0, 5.0, 90.0, 0 ) outputChatBox("Press F1 to get information about the server.", player) triggerClientEvent(source,"onClientLoginSuccess",root) end )
  7. Already did it, thanks Now how do button in the photo? OnClientGUIClick does not work
  8. how? because I do not quite understand
  9. Hello, why shows only background? addEventHandler("onClientResourceStart", resourceRoot, function() screenW, screenH = guiGetScreenSize() main = {} main.background = guiCreateWindow(1169, 416, 501, 0, "", true) guiWindowSetSizable(main.background, true) tloLogin = guiCreateStaticImage(0, 0, 1680, 1050, "Zdjecia/tlo.jpg", true) login = guiCreateStaticImage(385, 90, 102, 46, "Zdjecia/login.png", true, main.background) rejestracja = guiCreateStaticImage(385, 146, 102, 51, "Zdjecia/register.png", true, main.background) poleLogin = guiCreateEdit(106, 156, 269, 36, "Zdjecia/button.png", true, main.background) poleHaslo = guiCreateEdit(106, 96, 269, 36, "Zdjecia/button.png", true, main.background) postacLogin = guiCreateStaticImage(111, 96, 37, 36, "Zdjecia/person.png", true, main.background) kluczeHaslo = guiCreateStaticImage(110, 156, 38, 35, "Zdjecia/password.png", true, main.background) zapamietajKonto = guiCreateCheckBox(106, 202, 15, 15, "", true, true, main.background) labelzapamietajK = guiCreateLabel(131, 201, 102, 14, "Zapamiętaj Konto", true, main.background) labelError = guiCreateLabel(105, 234, 382, 15, "", true, main.background) end ) Meta:
  10. and how to do it after exiting the water in skin 97 after 5 seconds when you do not enter back into the water delete us skin and oxygen bar. After taking a skin back to us what we had. local playerData = { skinGracza = source.model } local pasekTlenu = {"breath"} addEventHandler("onResourceStart", resourceRoot, function(localPlayer) setTimer(function(localPlayer) local Skin = tonumber(getElementModel(localPlayer)) if ((not Skin) or (Skin ~= 97)) then return end if isElementInWater(localPlayer) then else setElementModel(playerData.skinGracza, 0, 0) setPlayerHudComponentVisible(pasekTlenu, false) end end, 5000, 0) end ) Error: attempt to index global 'source' > skinGracza = source.model
  11. Hi there, how do the player to slowly subtraction oxygen?
  12. Matevsz

    Gui

    I've already done, about to close
  13. Matevsz

    Gui

    C: function ShowGui(element) if element ~= getLocalPlayer() then return end guiSetVisible(okno, true) else guiSetVisible(okno, false) end addEvent("PokazPanelInfo", true) addEventHandler("PokazPanelInfo", root, ShowGui)
  14. Matevsz

    Gui

    Server side is already running, now are these errors: ERROR: Server triggered clientside event PokazPanelInfo, but event is not added clientside
  15. Matevsz

    Gui

    S: local pickup = createPickup(-1891.5, 2148.7001953125, 1.7999999523163, 3, 1239, 3000) function PokazPanelInfo(source) triggerClientEvent(source, "PokazPanelInfo", root) end addEventHandler("onPickupHit", pickup, PokazPanelInfo) C: addEventHandler("onClientResourceStart", resourceRoot, function() okno = guiCreateWindow(619, 354, 454, 260, "Praca Nurka", false) guiWindowSetSizable(okno, false) memo = guiCreateMemo(16, 32, 419, 208, "...", false, okno) guiSetVisible(okno, false) end ) function ShowGui(element) if element ~= getLocalPlayer() then return end guiSetVisible(okno, true) else guiSetVisible(okno, false) end addEvent("PokazPanelInfo", true) addEventHandler("PokazPanelInfo", root, ShowGui) And Error: Bad argument 'addEventHandler' expected element at argument 2 got nil (server side (pickup) )
  16. Matevsz

    Gui

    hello, I want the entry into pickup gui appeared and disappeared after leaving. S: function Pickup() ubranie = createPickup(-1886.7001953125, 2142.7001953125, 1.7999999523163, 3, 1275, 3000) info = createPickup(-1891.5, 2148.7001953125, 1.7999999523163, 3, 1239, 3000) butlaTlenu = createPickup(-1890.1999511719, 2145.1000976563, 1.7999999523163, 3, 2690, 3000) end addEventHandler("onResourceStart", getRootElement(), Pickup) addEventHandler("onPickupHit", info, function(hitElement, matchingDimension) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then triggerClientEvent(hitElement,"okno",hitElement) end end ) C: addEventHandler("onClientResourceStart", resourceRoot, function() okno = guiCreateWindow(619, 354, 454, 260, "Praca Nurka", false) guiWindowSetSizable(okno, false) memo = guiCreateMemo(16, 32, 419, 208, "...", false, okno) guiSetVisible(okno, false) end ) function ShowGui() guiSetVisible(okno, true) end addEvent("okno", true) addEventHandler("okno",root,ShowGui) Error: Server S. Bad argument addEventHandler expected element at argument 2 got nil (info)
  17. Bad argument @ 'addEventHandler ' expected element at argument 2 got nil -- triggerClientEvent("setObjectBreakable", source, false) addEvent("setObjectBreakable", true) addEventHandler("setObjectBreakable", resouceRoot, function(state) setObjectBreakable(source, state) end) And Attempt to call global 'bindKey' (a nil value) local function checkForklift() local v=getPedOccupedVehicle(localPlayer) if not v then return end if getElementModel(v)~=530 then return end local ap=getVehicleadjustableProperty(v) if ap>0 then return end if czyForkliftWiezieObiekty(v) then triggerServerEvent("forklift_opusc", v) else triggerServerEvent("forklift_podnies", v) end end bindKey("special_control_up", "up", checkForklift) bindKey("special_control_down", "up", checkForklift) what's wrong? : /
  18. The same : ( And so that work? function Saw(player) for _, v in ipairs(getElementsByType("player")) do if getElementType(player)=="player" then if source == chainsaw then giveWeapon(player, 9, 1) setPedWeaponSlot(player, 1) end end end end) addEventHandler("onPickupHit", getRootElement, Saw)
  19. Hi, error in console: WARNING: JobWood\wood.lua:253: Bad argument @ ' addEventHandler ' Expected element at argument 2 got boolean chainsaw = createPickup(-503.60,-77.34,60.5, 9, 3000) addEventHandler("onPickupHit", chainsaw, function(element,dim) if not (getElementType(element) == "player") then return end giveWeapon(element, 9, 1) setPedWeaponSlot(element, 1) end)
  20. I know it is not easy, I learn lua but how can I learn if you do not know what is wrong? I removed * 272 with ruler createVehicle and createVehicle swapped for CreateObject because it's probably not going to hook moveObject under createVehicle Instead of the model aircraft (592) on the object model (1683), but does not work
  21. Yes, but can not see it in the game, and do not fly straight in debugscript nothing
×
×
  • Create New...