Jump to content

ozulus

Members
  • Posts

    131
  • Joined

  • Last visited

Everything posted by ozulus

  1. https://wiki.multitheftauto.com/wiki/GetElementMatrix Take a look at first example.
  2. ozulus

    if and

    local playerTeam = getPlayerTeam(source) local teamName = "" if isElement(playerTeam) then teamName = getTeamName(playerTeam) end if exports.Xacl:isPlayerInGroup(source, "subadmin") and (teamName = "Staff") then -- do something end
  3. I don't think it's really required since it can be done with any other programming languages. Just google it, there are already a few of examples.
  4. Ah didn't see that you haven't marker2 so write marker instead of marker2 addEventHandler("onClientMarkerHit", marker, function()
  5. Try this addEventHandler("onClientMarkerHit", marker2, function() -- function() added setTimer(function() guiProgressBarSetProgress(GUIEditor.progressbar[1], 10) end, 1000, 1) setTimer(function() guiProgressBarSetProgress(GUIEditor.progressbar[1], 20) end, 2000, 1) setTimer(function() guiProgressBarSetProgress(GUIEditor.progressbar[1], 30) end, 3000, 1) setTimer(function() guiProgressBarSetProgress(GUIEditor.progressbar[1], 40) end, 4000, 1) setTimer(function() guiProgressBarSetProgress(GUIEditor.progressbar[1], 50) end, 5000, 1) setTimer(function() guiProgressBarSetProgress(GUIEditor.progressbar[1], 60) end, 6000, 1) setTimer(function() guiProgressBarSetProgress(GUIEditor.progressbar[1], 70) end, 7000, 1) setTimer(function() guiProgressBarSetProgress(GUIEditor.progressbar[1], 80) end, 8000, 1) setTimer(function() guiProgressBarSetProgress(GUIEditor.progressbar[1], 90) end, 9000, 1) setTimer(function() guiProgressBarSetProgress(GUIEditor.progressbar[1], 100) end, 10000, 1) setTimer(function() guiSetVisible (GUIEditor.progressbar[1], false) triggerServerEvent("jutalmad", getLocalPlayer(), group) end, 11000, 1) end) -- end added
  6. `felhasznalo`=?? change to `felhasznalo`=?
  7. ozulus

    SQL to gridlist

    Do you create new table for every users? If not, you are wrong. It should be like that. dbQuery(getActualVehs, {client}, con, "SELECT * FROM tableName WHERE accountNameColumn = "..accn)
  8. Maybe like this? removeEventHandler(eventName, source, handlerFunction)
  9. Here you go, not tested hope it works. You must write response data that you got it from link or somewhere else.. function returnFunction(responseData, errno) if (errno == 0) then local file = fileExists("test.xml") and fileOpen("test.xml") or fileCreate("test.xml") fileWrite(file, responseData) fileClose(file) local file = xmlLoadFile("test.xml") for i, node in pairs(xmlNodeGetChildren(file))do outputChatBox(xmlNodeGetName(node), root) end xmlUnloadFile(file) --added end end fetchRemote("http://www.w3schools.com/xml/note.xml", returnFunction)
  10. It's just easy to fix... for _,t in pairs(markers) do marker = createMarker(t.x,t.y,t.z,"cylinder",3,0,0,0,0) addEventHandler ("onMarkerHit", marker, onHit) end
  11. I managed to fix the problem thanks guys anyway
  12. It's just easy to do as you said but i can't make smooth transition between colors. The most important part it's. So it'll be more realistic. Any ideas to make that?
  13. I was thinking something like that, i'll try it asap thanks for reply
  14. What are you talking about man? CyrstalMV didn't share that script. I'll create this from strach. Don't you get what i mean guys?
  15. Yo, i am here to get some idea about 'Spraying on vehicles' script which made by CyrstalMV, if you don't know here you go, just watch that video I liked the idea, also saw on SAMP. Soo, my question is, how can i detect when a player spraying on vehicle?
  16. Have you tried encode that file with UTF-8 ?
  17. You're welcome, nice to hear that
  18. Not tested, hope it'll work -- race_client.lua function hidePickups(pickupType) -- g_Pickups defined in race_client.lua, so add this code into race_client.lua for colShape, data in pairs(g_Pickups) do if data.type == tostring(pickupType) then setElementPosition(colShape, 0, 0, -9999) -- hide colshape setElementPosition(data.object, 0, 0, -9999) -- hide object end end end addEvent("hidePickups", true) addEventHandler("hidePickups", resourceRoot, hidePickups) and for any server.lua -- SERVER.LUA -- USAGE: -- /destroypickups -- PICKUP TYPES: repair|nitro|vehiclechange -- Example usage: -- /destroypickups repair -- /destroypickups nitro -- /destroypickups vehiclechange function triggerIt(thePlayer, cmd, pickupType) if type(tostring(pickupType)) == "string" then triggerClientEvent("hidePickups", root, pickupType) end end addCommandHandler("destroypickups", triggerIt)
  19. function rocket() local x,y,z = getElementPosition(gLPlayer) local rx, _, rz = getPedCameraRotation(gLPlayer) fireRocketByRotation(x, y, z, rx, rz, 50) end bindKey("mouse1", "down", rocket)
  20. It's that easy.. function startVehicleChanging() if isTimer(vehChangeTimer) then killTimer(vehChangeTimer) end vehChangeTimer = setTimer( function() for _,plr in pairs(getElementsByType("player")) do local veh = getPedOccupiedVehicle(plr) local model = vehicleIDS[math.random(1,#vehicleIDS)] if veh and model and getPedOccupiedVehicleSeat(plr) == 0 then local x,y,z = getElementVelocity(veh) setElementVelocity(veh,x,y,z+0.05) local hp = getElementHealth(veh) setElementModel(veh,model) setElementHealth(veh,hp) end end end ,15000,0) end addEvent("onRaceStateChanging",true) addEventHandler("onRaceStateChanging",root, function (new) if (new == "Running") then startVehicleChanging() end end)
  21. Change that code, function (player, opponent, bet) to, function (player, cmdName, opponent, bet) addCommandHandler has command name (in this code it's cmdName) parameter after player parameter.
  22. Just move local languageCode = getLocalization()["code"] out of the function. I have updated my code. Try that
  23. I think it's better than yours. Check this out UPDATED local languageCode = getLocalization()["code"] function checkTheLanguage() if languageCode then if not LangTextTable[languageCode] then languageCode = "en_US" end end end addEventHandler("onClientResourceStart",root,checkTheLanguage)
  24. I have edited then shared script that you are looking for. Download* at http://mtasa-tr.com/scriptinglua/(indir)-ozulustr-scriptler/msg43039/?topicseen#new
  25. Client side function removeAFK() --there isn't player arg. in onClientMouseMove event. check wiki for available arguments of event. if getElementData(localPlayer, "AFK") then setElementAlpha(localPlayer, 255) --note: in client-side, source(player) is localPlayer. end end addEventHandler("onClientMouseMove", root, removeAFK)
×
×
  • Create New...