Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. You can use the event i give you to block them
  2. guiSetInputMode You can use this https://wiki.multitheftauto.com/wiki/onClientKey and block them
  3. yes its possible you can make the bind key on serverside and check if player how press it is vip then open it
  4. addEvent("syncSong", true) addEventHandler("syncSong", root, function( ) local x,y,z = getElementPosition(localPlayer) local song = playSound3D("data/sound.mp3", x, y, z, false) setSoundVolume(song, 0.9) setSoundMaxDistance( song, 100 ) end)
  5. fuction replaceWeapon() txd = engineLoadTXD("models/ak47.txd") dff = engineLoadDFF("models/ak47.dff") engineImportTXD(txd, 356) engineReplaceModel(dff, 356) end addEventHandler("onClientResourceStart", resourceRoot, replaceWeapon)
  6. afk model id iss 355 https://wiki.multitheftauto.com/wiki/Weapons check it and id is 30 not 31 31 and 356 is for m4
  7. function wczytaj() txd = engineLoadTXD ( "models/ak47.txd" ) dff = engineLoadDFF ( "models/ak47.dff" ) outputChatBox ( "wczytano podmianki" ) end addEventHandler( "onClientResourceStart", getRootElement(), wczytaj ) function podmiankibronki () local bronka = getPlayerWeapon ( localPlayer ) if(getElementData(localPlayer,"currentweapon_1") == "AK47" and bronka == 30) then engineImportTXD ( txd, 355 ) engineReplaceModel ( dff, 355) outputChatBox ( "wczytano ak47" ) end end addEventHandler( "onClientPlayerWeaponSwitch", localPlayer, podmiankibronki )
  8. isObjectInACLGroup aclGetGroup getAccountName getPlayerAccount
  9. Dimos7

    Deleted

    Nvm fixed
  10. function blockWindow() local muted =getElementData(localPlayer, "muted") if muted == true then guiSetVisible(panel, false) end end function noOpengui(thePlayer) if isPlayerMuted(thePlayer) then setElementData(thePlayer, "muted", true) else setElementData(thePlayer, "muted", false) end end Try that
  11. You can blog command register and login on default in acl and that it
  12. ID = {} exports["scoreboard"]:addScoreboardColumn("id", root, 20, "id", 1) ------------------------ [ Events ] -------------------------- addEventHandler("onPlayerJoin", root, function() for i = 0 , getMaxPlayers() do if not ID[i] then ID[i] = source setElementData(source, "id", i) break end end end) -- addEventHandler("onPlayerQuit", root, function() ID[getPlayerID(source)] = nil end) -- addEventHandler("onResourceStart", resourceRoot, function() for _, v in ipairs(getElementsByType("player")) do for i = 0, getMaxPlayers() do if not ID[i] then ID[i] = v setElementData(v, "id", i) break end end end end) ---------------------------------- [ Fnctions ] ------------------------------------ function getPlayerID(player) if player and isElement(player) and getElementType(player) == "player" and getElementData(player, "id") then return getElementData(player, "id") end return false end -- function getPlayerFromID(id) if id and tonumber(id) and ID[tonumber(id)] then return ID[tonumber(id)] end return false end
  13. ID = {} exports["scoreboard"]:addScoreboardColumn("id", root, 20, "id", 2) ------------------------ [ Events ] -------------------------- addEventHandler("onPlayerJoin", root, function() for i = 0 , getMaxPlayers() do if not ID[i] then ID[i] = source setElementData(source, "id", i) break end end end) -- addEventHandler("onPlayerQuit", root, function() ID[getPlayerID(source)] = nil end) -- addEventHandler("onResourceStart", resourceRoot, function() for _, v in ipairs(getElementsByType("player")) do for i = 0, getMaxPlayers() do if not ID[i] then ID[i] = v setElementData(v, "id", i) break end end end end) ---------------------------------- [ Fnctions ] ------------------------------------ function getPlayerID(player) if player and isElement(player) and getElementType(player) == "player" and getElementData(player, "id") then return getElementData(player, "id") end return false end -- function getPlayerFromID(id) if id and tonumber(id) and ID[tonumber(id)] then return ID[tonumber(id)] end return false end Save it restart the resource and after change it 2 to 1
  14. You have orginal scoreboard or dx one?
  15. That is impossible for me that code put the id before name
  16. yes it is possible make commands for people check elementData
  17. ID = {} exports["scoreboard"]:addScoreboardColumn("ID", root, 20, "ID", 1) ------------------------ [ Events ] -------------------------- addEventHandler("onPlayerJoin", root, function() for i = 0 , getMaxPlayers() do if not ID[i] then ID[i] = source setElementData(source, "id", i) break end end end) -- addEventHandler("onPlayerQuit", root, function() ID[getPlayerID(source)] = nil end) -- addEventHandler("onResourceStart", resourceRoot, function() for _, v in ipairs(getElementsByType("player")) do for i = 0, getMaxPlayers() do if not ID[i] then ID[i] = v setElementData(v, "id", i) break end end end end) ---------------------------------- [ Fnctions ] ------------------------------------ function getPlayerID(player) if player and isElement(player) and getElementType(player) == "player" and getElementData(player, "id") then return getElementData(player, "id") end return false end -- function getPlayerFromID(id) if id and tonumber(id) and ID[tonumber(id)] then return ID[tonumber(id)] end return false end
  18. https://wiki.multitheftauto.com/wiki/Client_Scripting_Functions#GUI_functions_2
  19. local sWidth,sHeight = guiGetScreenSize() -- The variables addEventHandler("onClientRender", root, function() local r, g, b = getPlayerNametagColor (localPlayer) local name = getPlayerName(getLocalPlayer()) if (getElementData(localPlayer,"loggedin") == true) then dxDrawLine(sWidth*671 - 1, sHeight*73 - 1, sWidth*671 - 1, sHeight*90, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*790, sHeight*73 - 1, sWidth*671 - 1, sHeight*73 - 1, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*671 - 1, sHeight*90, sWidth*790, sHeight*90, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*790, sHeight*90, sWidth*790, sHeight*73 - 1, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*671 - 1, sHeight*73 - 1, sWidth*671 - 1, sHeight*90, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*790, sHeight*73 - 1, sWidth*671 - 1, sHeight*73 - 1, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*671 - 1, sHeight*90, sWidth*790, sHeight*90, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawLine(sWidth*790, sHeight*90, sWidth*790, sHeight*73 - 1, tocolor(0, 0, 0, 255), sWidth*1, false) dxDrawRectangle(sWidth*1.310, sHeight*0.142, sWidth*0.309, sHeight*0.044, tocolor(123, 112, 120, 160), false) dxDrawRectangle(sWidth*1.310, sHeight*0.142,(getElementData(getLocalPlayer(), "kill.level") or 0)*(119/100), sHeight*0.044, tocolor(0, 0, 0, 160), false) dxDrawText("Level : "..(getElementData(getLocalPlayer(),"Level")), sWidth*635, sHeight*94, sWidth*676, sHeight*114, tocolor(255, 255, 255, 255), sWidth*0.50, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText((getElementData(getLocalPlayer(),"kill.level")).." / 100",sWidth* 698, sHeight*73, sWidth*804, sHeight*89, tocolor(255, 255, 255, 255), sWidth*0.50, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("XP : ", sWidth*635, sHeight*74, sWidth*676, sHeight*94, tocolor(255, 255, 255, 255),sWidth*0.50, "bankgothic", "left", "top", false, false, false, false, false) end end )
  20. function giveRandomName( ) local newName -- Create a variable to store the name that is only visible within the function. repeat newName = math.random(1000,9999) -- Generate random number. until not getPlayerFromName( "Guess_"..newName ) -- Repeat the line above until if player with this name is found. setPlayerName( source, "Guess_"..tostring(newName) ) -- Give the player the new name. end addEventHandler( "onPlayerJoin", root, giveRandomName ) function Restorenick(_, acc) local accountName = getAccountName(acc) -- get the name of the account they logged in with setPlayerName( source, accountName ) -- Set the player's name to his account name. end addEventHandler( "onPlayerLogin", root, Restorenick )
×
×
  • Create New...