Jump to content

Miika

Members
  • Posts

    253
  • Joined

  • Last visited

Everything posted by Miika

  1. Hi! I have again one question How to create xml child with /> end? this not works: local testChild = xmlCreateChild (testRoot,"test") xmlNodeSetAttribute (testChild,"test","test") it makes: end and i want it to make: />
  2. You can't change hot-dog's color, I don't know why. I Tested with other vehicles.
  3. Are you using mta 1.5 nightly? Because it's under developing, all services maybe not work.
  4. You can't double-click billboards in map editor, I don't know why ? But this page maybe help you: IDE_List Press CTRL + F and type "billboard"
  5. People can't steal them if you compile your script. First: https://forum.multitheftauto.com/viewtopic.php?f=93&t=62110 Then: https://luac.multitheftauto.com
  6. --------------------------------------------------------------------------------------------------------------- Thanks! It works perfectly
  7. Yeah, but your topic doesn't help me. It outputs first message from all table items. I need message and numbers from one item to chatbox.
  8. Again.. I'm having problem: how to get one item from table? If my table looks this: teams= { {"Team", 0, 255, 0}, {"Team2", 255, 0, 0}, {"Team3", 0, 0, 255}, -- I need to get all items from "Team3" and output to chatbox. {"Team4", 0, 255, 255}, } function test() outputChatBox(--[[Team3 here]], --[[Color numbers from table in here]]) end addCommandHandler("test", test) Is it possible?
  9. You need to use elseif. if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Head Staff" ) ) then -- code here elseif isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "staff L2" ) ) then -- code here elseif isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "staff L3" ) ) then -- code here end
  10. Hi! Again.. I have problem with my script. I don't know, how to get active tab or gridlist. this code doesn't work: if (guiGetVisible(gridlist[1]) == true) then id = guiGridListGetSelectedItemText(gridlist[1], 2) price = guiGridListGetSelectedItemText(gridlist[1], 3) elseif (guiGetVisible(gridlist[2]) == true) then id = guiGridListGetSelectedItemText(gridlist[2], 2) price = guiGridListGetSelectedItemText(gridlist[2], 3) elseif (guiGetVisible(gridlist[3]) == true) then id = guiGridListGetSelectedItemText(gridlist[3], 2) price = guiGridListGetSelectedItemText(gridlist[3], 3) elseif (guiGetVisible(gridlist[4]) == true) then id = guiGridListGetSelectedItemText(gridlist[4], 2) price = guiGridListGetSelectedItemText(gridlist[4], 3) end addEventHandler("onClientGUIClick", button[2], weaponFunc, false) function weaponFunc() triggerServerEvent ( "giveWp", resourceRoot, id, price ) end
  11. Thanks dude! Your script works good!
  12. setAccountData(account , "nordea-cash", amount)
  13. Hi! Anyone have ideas, how to count accounts with more than 500k money? This says all accounts, but, i want it to display only if you have more than 500k money function printAmountOfAccounts ( thePlayer ) local accountTable = getAccounts () if #accountTable == 0 then outputChatBox( "There are no accounts.", thePlayer ) else outputChatBox( "There are " .. #accountTable .. " accounts in this server!", thePlayer, 0, 255, 0 ) end end addCommandHandler( "accountcount", printAmountOfAccounts )
  14. You need to use the AttachElements function. Syntax: bool attachElements ( element theElement, element theAttachToElement, [ float xPosOffset, float yPosOffset, float zPosOffset, float xRotOffset, float yRotOffset, float zRotOffset ] ) Example: function attachObjects() -- Let's make a function local marker = createMarker ( 0, 0, 10, "cylinder", 1.5, 255, 255, 0, 170 ) -- Creating the marker local car = createVehicle(551, 0, 0, 10) -- Creating the vehicle attachElements(marker, car) -- Now we have a marker that's attached into vehicle- end -- Close the function
  15. Miika

    Map download

    Did you use the map editor?
  16. Oh! I found the problem. Wrong garage id
  17. It has to be: I tested it, but it output's else message: "Output if doesn't work"
  18. Same problem. 6: Bad Argument @'getPedOccupiedVehicle' [expected ped at argument, got vehicle' allowLeaveVehicle = true col = createColSphere(-1904.5953369141, 275.81134033203, 41.046875, 1.5 ) function openDoor(thePlayer) if getElementType ( thePlayer ) == "player" or getElementType ( thePlayer ) == "vehicle" then local vehicle = getPedOccupiedVehicle(thePlayer) if not ( source ~= vehicle ) then setGarageOpen(18, true) allowLeaveVehicle = true else return end else outputChatBox("Output if doesn't work") return end end addEventHandler("onColShapeHit", col, openDoor)
  19. allowLeaveVehicle = true col = createColSphere(-1904.5953369141, 275.81134033203, 41.046875, 1.5 ) function openDoor(thePlayer) if getElementModel ( thePlayer ) == Player then local veh = getPedOccupiedVehicle(thePlayer) if not ( source ~= vehicle ) then setGarageOpen(18, true) allowLeaveVehicle = true else return end end end addEventHandler("onColShapeHit", col, openDoor) Doesn't work
  20. Small error that need's a fix. 5: Bad Argument @'getPedOccupiedVehicle [expected ped at argument, got vehicle]' [server] allowLeaveVehicle = true col = createColSphere(-1904.5953369141, 275.81134033203, 41.046875, 1.5 ) function openDoor(thePlayer) local veh = getPedOccupiedVehicle(thePlayer) if not ( source ~= vehicle ) then setGarageOpen(18, true) allowLeaveVehicle = true else return end end addEventHandler("onColShapeHit", col, openDoor)
  21. Miika

    [HELP] Script

    function fix (playerSource) local theVehicle = getPedOccupiedVehicle (playerSource) if theVehicle and getVehicleController ( theVehicle ) == playerSource then fixVehicle (theVehicle) withvip = 100 novip = 200 if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(playerSource)),aclGetGroup("VIP")) then outputChatBox ("#FF0000[!] #FFFFFFCar fixed for #00FF00" .. withvip .." #FF0000[!]", thePlayer, 255, 255, 255, true) takePlayerMoney ( playerSource, withvip ) else outputChatBox ("#FF0000[!] #FFFFFFCar fixed for #00FF00" .. novip .." #FF0000[!]", thePlayer, 255, 255, 255, true) takePlayerMoney ( playerSource, novip ) end end end addCommandHandler ("repair" , fix) 1. It outputs message 2x, because the message was the wrong place. 2. Don't use the local function, if it is above the IF Test it
  22. I tested it but nothing happens. function hideLoginWindow() if (guiGetVisible(LoginPanel.window[1]) == true) then guiSetVisible(LoginPanel.window[1], false) showCursor(false) showChat(true) removeEventHandler("onClientResourceStart", resourceRoot, smoothMoveCamer) removeEventHandler("onClientPreRender",root,camRender) setTimer(function() setCameraTarget ( getLocalPlayer() ) end,100,1) end if (guiGetVisible(LoginPanel.window[2]) == true) then guiSetVisible(LoginPanel.window[2], false) showCursor(false) showChat(true) removeEventHandler("onClientResourceStart", resourceRoot, smoothMoveCamer) removeEventHandler("onClientPreRender",root,camRender) setTimer(function() setCameraTarget ( getLocalPlayer() ) end,100,1) end end addEvent("hideLoginWindow", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow)
×
×
  • Create New...