-
Posts
1,990 -
Joined
-
Last visited
-
Days Won
2
Everything posted by #RooTs
-
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.
-
[FECHADO] - Como descompilar um arquivo? Existe um programa?
#RooTs replied to BaseadoSWD's topic in Programação em Lua
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. -
cole seu código aqui!
-
da uma olhada no exemplo do @FuSioN_ .... se não entender, pode voltar aqui!
-
@raysmta, my level in DX is 7,8% of 10%
-
é 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
-
got it. the did he want to do very nice
-
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)
-
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)
-
the script is not working, that I did with the Spoc^
-
@ALw7sH, sorry my friend more if not will help, please not hinder
-
OMG do not you see that he is importing the server and client functions client.lua addEvent("Tag",true) addEventHandler("Tag", root, user_tag2)
-
@Solidsnake14 , because delete my report ? https://community.multitheftauto.com/ind ... s&id=11333 DONE
-
more is already added type = "client"
-
@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 )
-
I dont know what fails :( (InterpolateBetween)
#RooTs replied to MisterQuestions's topic in Scripting
paste the script here, so I can see -
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)
-
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 )
-
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)
-
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
-
tente esse: https://community.multitheftauto.com/in ... s&id=11008
-
User is still putting skin, please the care of him. ban the user https://community.multitheftauto.com/ind ... s&id=11338 DONE
-
Testado, só precisa usa as funções para tirar o dinheiro do dono do veiculo e mandar para o "Mecânico" para isso use givePlayerMoney e takePlayerMoney Roteiro testado: local myBlip = createBlip( 1611.8278808594,-2153.7219238281,0, 51, 0, 0, 0, 255, myPlayer ) theMarker = createMarker ( 1611.8278808594,-2153.7219238281,13.5546875 -0.9, "cylinder", 1.5, 255, 255, 0, 170 ) function fix (playerSource, thePlayer) if isElementWithinMarker(playerSource, theMarker) then local team = getPlayerTeam(playerSource) if team and getTeamName(team) == "Mecanico" then local theVehicle = getPedOccupiedVehicle (playerSource) setElementFrozen(theVehicle, true) setTimer(setElementFrozen, 10000, 1, theVehicle, false) if theVehicle and getVehicleController ( theVehicle ) == playerSource then setTimer( fixVehicle, 10000, 1, theVehicle ) -- função do FuSioN_ outputChatBox ("Você consertou o veículo, converse com o dono e pegue sua recompença!", thePlayer, 255, 0, 0, true ) end end end end addCommandHandler("fix",fix)