Jump to content

#RooTs

Members
  • Posts

    1,991
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by #RooTs

  1. talvez você esteja usando o setWeaponProperty de maneira incorreta, tente algo como isso: serverSide.lua function test() setWeaponProperty(23, "pro", "flags", 0x000800) -- Warning - Depends on the current flag setting setWeaponProperty(23, "pro", "flags", 0x000002) -- Warning - Depends on the current flag setting setWeaponProperty(23, "pro", "maximum_clip_ammo", 34) addCommandHandler ( "comando", test )
  2. eu andei fazendo uns testes com o setWeaponProperty e percebi que, ele é setado para todos online no server, mesmo setando ele em grupo na ACL. eu não sei se tem outra maneira de fazer isso; mais da maneira que eu fiz, não tive sucesso.
  3. tenho certeza que o script é roubado, pois ninguém é burro ao ponto de não fazer os backup do código fonte. se realmente foi você que fez/crio o script, faça novamente; se foi baixado, baixe-o novamente. NÃO VAMOS DAR SUPORTE PARA ISTO DNL291, trancar esse tópico, por favor.
  4. da uma olhada no exemplo do @FuSioN_ .... se não entender, pode voltar aqui!
  5. @raysmta, my level in DX is 7,8% of 10%
  6. é mais ou menos assim server.lua function isVip(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then --code end end addEventHandler( "onResourceStart", root, isVip ) mais informações acesse: https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup
  7. got it. the did he want to do very nice
  8. try this server.lua function togglestaffMode(thePlayer) if hasObjectPermissionTo(thePlayer,"general.adminpanel",false) then if getElementData(thePlayer,"invincible") then setElementData(thePlayer,"invincible",false) outputChatBox("member of team." .. getPlayerName(thePlayer) .. " Is unprotected!", getRootElement(), 255, 255, 255,true ) else setElementData(thePlayer,"invincible",true) outputChatBox("member of team." .. getPlayerName(thePlayer) .. " Is protected!", getRootElement(), 255, 255, 255,true ) end end end addCommandHandler("GodMode",togglestaffMode) client.lua addEventHandler ( "onClientPlayerDamage",root, function () if getElementData(source,"invincible") then cancelEvent() end end) addEventHandler("onClientPlayerStealthKill",localPlayer, function (targetPlayer) if getElementData(targetPlayer,"invincible") then cancelEvent() end end)
  9. this? function user_tag2 () local cx, cy, cz, lx, ly, lz = getCameraMatrix() if(getElementData(localPlayer, "special.event")) then drawDistance = eventDrawDistance else drawDistance = normalDrawDistance end local target = getPedTarget(localPlayer) for k, player in pairs(getElementsByType("player", root, true)) do if(player ~= localPlayer or getElementData(player, "isgod")) then local vx, vy, vz = getPedBonePosition(player, 5 ) local dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz ) if dist < drawDistance or player == target then if( isLineOfSightClear(cx, cy, cz, vx, vy, vz, true, false, false) ) then local x, y = getScreenFromWorldPosition (vx, vy, vz + 0.3) if(x and y) then local tag = getElementData(player, "gang.tag") or "" local name = (tag .. getPlayerName(player)) .. "" .. (getElementData(player, "") or "") .. "" local w = dxGetTextWidth(name, 1, "default-bold") local h = dxGetFontHeight(1, "default-bold") local color = tocolor(getPlayerNametagColor(player)) -- text add to ACL group (admin) dxDrawText("STAFF", x - 1 - w / 15,y - 55 - h - 1, w, h, tocolor(0,0,0), 0.9, "default-bold") dxDrawText("STAFF", x - 1 - w / 15,y - 56 - h - 1, w, h, tocolor(233, 137, 136, 255), 0.9, "default-bold") dxDrawText("ADMINS", x - 1 - w / 15,y - 45+3 - h - 1, w, h, tocolor(0, 0, 0, 255), 1.0, "default-bold") dxDrawText("ADMINS", x - 1 - w / 15,y - 46+3 - h - 1, w, h, tocolor(255, 255, 255, 255), 1.0, "default-bold") end end end end end end addEvent("Tag",true) addEventHandler("Tag", root, user_tag2) addEventHandler("onClientRender", root, user_tag2)
  10. the script is not working, that I did with the Spoc^
  11. @ALw7sH, sorry my friend more if not will help, please not hinder
  12. OMG do not you see that he is importing the server and client functions client.lua addEvent("Tag",true) addEventHandler("Tag", root, user_tag2)
  13. @Solidsnake14 , because delete my report ? https://community.multitheftauto.com/ind ... s&id=11333 DONE
  14. more is already added type = "client"
  15. @toni012899, you not know read, my friend ? client.lua: 1: attempt to call global 'guiGetScreenSize' ( a nil value ) client.lua: 1: attempt to call global 'guiGetScreenSize' ( a nil value ) client.lua: 1: attempt to call global 'guiGetScreenSize' ( a nil value ) client.lua: 1: attempt to call global 'guiGetScreenSize' ( a nil value ) client.lua: 1: attempt to call global 'guiGetScreenSize' ( a nil value )
  16. is this that you want? function onPlayerSpawnHandler() local account = getPlayerAccount(source) if (not account or isGuestAccount(account)) then return end if (isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("VIP"))) then setPlayerArmor(source, 100) end end addEventHandler("onPlayerSpawn", getRootElement(), onPlayerSpawnHandler)
  17. not work client.lua: 1: attempt to call global 'guiGetScreenSize' ( a nil value ) client.lua: 1: attempt to call global 'guiGetScreenSize' ( a nil value ) client.lua: 1: attempt to call global 'guiGetScreenSize' ( a nil value ) client.lua: 1: attempt to call global 'guiGetScreenSize' ( a nil value ) client.lua: 1: attempt to call global 'guiGetScreenSize' ( a nil value )
  18. #RooTs

    Not Work

    tested and working function onPlayerSpawnHandler() local account = getPlayerAccount(source) if (not account or isGuestAccount(account)) then return end if (isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("VIP"))) then setPlayerArmor(source, 100) end end addEventHandler("onPlayerSpawn", getRootElement(), onPlayerSpawnHandler)
  19. seems that not working -- Server side Resources = { "script3", -- resource name "script2", -- resource name "script1", -- resource name } Working = false Current = 1 loading = false function forceLoad() if Resources[Current] then outputDebugString("[Compiler] "..Resources[Current], 0,55,167,220) local xmlPatch = ":"..Resources[Current].."/meta.xml" local xmlFile = xmlLoadFile(xmlPatch) if xmlFile then --Map Scripts local index = 0 local scriptNode = xmlFindChild(xmlFile,'script',index) if scriptNode then repeat local scriptPath = xmlNodeGetAttribute(scriptNode,'src') or false local scriptType = xmlNodeGetAttribute(scriptNode,'type') or "server" if scriptPath and scriptType:lower() == "client" then if string.find(scriptPath:lower(), "luac") then outputDebugString("COMPILER SYSTEM: File "..scriptPath.." is already compiled",3,220,20,20) else local FROM=":"..Resources[Current].."/"..scriptPath local TO= ":"..Resources[Current].."/"..scriptPath.."c" fetchRemote( "https://luac.multitheftauto.com/?compile=1&debug=0&blockdecompile=0&encrypt=0", function(data) fileSave(TO,data) end, fileLoad(FROM), true ) xmlNodeSetAttribute(scriptNode,'src',scriptPath..'c') outputDebugString("COMPILER SYSTEM: ".. TO.." Compiled and Saved successfully",3,0,255,0) end end index = index + 1 scriptNode = xmlFindChild(xmlFile,'script',index) until not scriptNode end xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) else outputDebugString("COMPILER SYSTEM: Cant read xmlFile: meta.xml",3,220,20,20) return false end --startResource(getResourceFromName(Resources[Current])) end Current = Current + 1 setTimer(forceLoad, 1000,1) end addCommandHandler ( "compileall", forceLoad ) function fileLoad(path) local File = fileOpen(path, true) if File then local data = fileRead(File, 500000000) fileClose(File) return data end end function fileSave(path, data) local File = fileCreate(path) if File then fileWrite(File, data) fileClose(File) end end
  20. tente esse: https://community.multitheftauto.com/in ... s&id=11008
  21. User is still putting skin, please the care of him. ban the user https://community.multitheftauto.com/ind ... s&id=11338 DONE
×
×
  • Create New...