![](https://forum.multitheftauto.com/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
yToPzz
Members-
Posts
39 -
Joined
-
Last visited
Everything posted by yToPzz
-
addEvent ( "aResource", true ) addEventHandler ( "aResource", root, function ( name, action ) if checkClient( "command."..action, source, 'aResource', action ) then return end local pname = getPlayerName ( source ) if ( hasObjectPermissionTo ( client or source, "command."..action ) ) then local text = "" if ( action == "start" ) then if ( startResource ( getResourceFromName ( name ), true ) ) then text = "started" end elseif ( action == "restart" ) then if ( getResourceState ( getResourceFromName ( name ) ) == "running" ) then if ( restartResource ( getResourceFromName ( name ) ) ) then text = "restarted" end end elseif ( action == "stop" ) then if ( stopResource ( getResourceFromName ( name ) ) ) then text = "stopped" end elseif ( action == "delete" ) then if ( deleteResource ( getResourceFromName ( name ) ) ) then text = "deleted" end elseif ( action == "stopall" ) then if ( stopAllResources ( ) ) then text = "All Stopped" end end isso tudo está acima da linha que enviei anteriormente
-
ERROR: admin\server\admin_server.lua:1282: attempt to concatenate local 'name' (a nil value) if ( text ~= "" ) then outputServerLog ( "ADMIN: Resource \'" .. name .. "\' " .. text .. " by " .. getAdminNameForLog ( source ) ) ---- Line Error for id, player in ipairs(getElementsByType("player")) do triggerClientEvent ( player, "aClientLog", root, text ) end
-
[2022-10-23 16:48:42] WARNING: Painel-Som\client\gui.lua:255: Bad argument @ 'getVehicleName' [Expected vehicle at argument 1, got boolean] addEvent ("tune.sync_objects", true); addEventHandler ("tune.sync_objects", root, function (veh, objects) local g = tune.gridlist[3]; local label_text = isPedInVehicle (localPlayer) and getVehicleName(getPedOccupiedVehicle(localPlayer)) or "none" ---- line error tune.label[5]:setText("Você deve estar em um veículo para usar este painel.\nVeículo atual: ".. label_text); guiGridListClear (g); if not isPedInVehicle (localPlayer) then return; end if not veh or not objects then return; end for i=#objects, 1, -1 do local v = objects[i]; if isElement (v) then local row = guiGridListAddRow (g); guiGridListSetItemText (g, row, 1, veh, false, false); guiGridListSetItemText (g, row, 2, getElementModel (v), false, false); guiGridListSetItemData (g, row, 1, v); end end guiGridListSetSelectedItem (g, 0, 1); end );
-
WARNING: admin\server\admin_ip2c.lua:217: Access denied @ 'fetchRemote' function fetchRemoteContent( cor, url ) local dataOut,errnoOut = nil, nil if fetchRemote( url, 2, function(data,errno) dataOut=data errnoOut=errno end ) then ---- line error while( errnoOut == nil ) do cor:sleep(50) end end return dataOut,errnoOut or -1 end
-
Do I have to configure the positions of the functions? eg level, closing option etc?
-
thanks, but there is a problem if you open the panel without being in a vehicle the panel does not close is there a way to make the panel open only when in a car?
-
I want to change the function to bindkey how do I? VEHICLE_SETTINGS = false addCommandHandler("steer", function() if VEHICLE_SETTINGS == false then openVehicleSettings() VEHICLE_SETTINGS = true else closeVehicleSettings() VEHICLE_SETTINGS = false end end)
-
happens that there are 2 scripts where this Headshot is causing problems the first is the passive mode where you cannot kill or die in it and the green areas where you cannot kill with this headshot shooting in the head even with passive mode active or being in a green area the player dies.
-
this headshot script is bugging other protections such as passive and green areas could anyone tell if there is a solution? Client-side: function sendHeadshot ( attacker, weapon, bodypart, loss ) if attacker == getLocalPlayer() then if bodypart == 9 then triggerServerEvent( "onServerHeadshot", getRootElement(), source, attacker, weapon, loss ) setElementHealth ( source, 0 ) setPedHeadless( source, true ) end end end addEventHandler ( "onClientPedDamage", getRootElement(), sendHeadshot ) addEventHandler ( "onClientPlayerDamage", getRootElement(), sendHeadshot ) Server-side: function MakePlayerHeadshot( attacker, weapon, bodypart, loss ) if bodypart == 9 then triggerEvent( "onPlayerHeadshot", source, attacker, weapon, loss ) setPedHeadless ( source, true ) killPed( source, attacker, weapon, bodypart ) setTimer( BackUp, 900, 1, source ) end end function MakeHeadshot( source, attacker, weapon, loss ) triggerEvent( "onPlayerHeadshot", source, attacker, weapon, loss ) killPed( source, attacker, weapon, 9 ) setPedHeadless ( source, true ) setTimer( BackUp, 900, 1, source ) end function BackUp( source ) if getElementType ( source ) == "player" then setPedHeadless ( source, false ) end end function outputHeadshotIcon (killer, weapon, bodypart) if bodypart == 9 then cancelEvent() local r2,g2,b2 = getTeamColor ( getPlayerTeam( killer ) ) local r1,g1,b1 = getTeamColor ( getPlayerTeam( source ) ) exports.killmessages:outputMessage ( {getPlayerName(killer),{"padding",width=3},{"icon",id=weapon},{"padding",width=3},{"icon",id=256},{"padding",width=3},{"color",r=r1,g=g1,b=b1},getPlayerName(source) }, getRootElement(),r2,g2,b2) end end addEvent ( "onServerHeadshot", true ) addEventHandler( "onPlayerDamage", getRootElement(), MakePlayerHeadshot ) addEventHandler( "onPlayerKillMessage", getRootElement(), outputHeadshotIcon ) addEventHandler( "onServerHeadshot", getRootElement(), MakeHeadshot )
-
WARNING: [SCRIPTS]\Trab3\s.lua:63: Bad argument @ 'destroyElement' [Expected element at argument 1] the error occurs when the truck's load explodes and when the player leaves when the truck is destroyed, it gives the error, so would there be a way to prevent this? function sair4 (source) if veh[source] and isElement(veh[source]) then Trabalho = false destroyElement (veh[source]) destroyElement (carga[source]) --- line 63 carga[source] = nil setElementVisibleTo ( blipfim4, source, false ) setElementVisibleTo ( entregartrab4, source, false ) setPedSkin (source,0) outputChatBox ('#000000[#ffffff Trabalho 3#000000 ]#FF0000 Você saiu do veiculo e perdeu o trabalho !',source,255,255,255,true) setElementData(source, "Trab", false) end end addEventHandler ("onVehicleExit", root, sair4)
-
[2022-07-19 01:09:53] WARNING: Dv\S.lua:2: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [2022-07-19 01:09:59] WARNING: Dv\S.lua:2: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2022-07-19 01:09:59] ERROR: Dv\S.lua:3: attempt to concatenate local 'acc' (a boolean value)
-
this is an anti disclosure and even the player being kicked the message is still sent can anyone solve it? function onPlayerChat(msg,type) if (msg:lower():find("mtasa") or msg:find("://")) and msg:find("%d") then cancelEvent() source:kick("Divulgação!") end end addEventHandler("onPlayerChat", root, onPlayerChat)
-
WARNING: bone_attach\bone_attach_c.lua:78: Bad argument @ 'setElementPosition' [Expected number, got NaN] WARNING: bone_attach\bone_attach_c.lua:79: Bad argument @ 'setElementRotation' [Expected number, got NaN] function putAttachedElementsOnBones() for element,ped in pairs(attached_ped) do if not isElement(element) then clearAttachmentData(element) elseif isElementStreamedIn(ped) then local bone = attached_bone[element] local x,y,z = getPedBonePosition(ped,bone_0[bone]) local xx,xy,xz,yx,yy,yz,zx,zy,zz = getBoneMatrix(ped,bone) local offx,offy,offz = attached_x[element],attached_y[element],attached_z[element] local offrx,offry,offrz = attached_rx[element],attached_ry[element],attached_rz[element] local objx = x+offx*xx+offy*yx+offz*zx local objy = y+offx*xy+offy*yy+offz*zy local objz = z+offx*xz+offy*yz+offz*zz local rxx,rxy,rxz,ryx,ryy,ryz,rzx,rzy,rzz = getMatrixFromEulerAngles(offrx,offry,offrz) local txx = rxx*xx+rxy*yx+rxz*zx local txy = rxx*xy+rxy*yy+rxz*zy local txz = rxx*xz+rxy*yz+rxz*zz local tyx = ryx*xx+ryy*yx+ryz*zx local tyy = ryx*xy+ryy*yy+ryz*zy local tyz = ryx*xz+ryy*yz+ryz*zz local tzx = rzx*xx+rzy*yx+rzz*zx local tzy = rzx*xy+rzy*yy+rzz*zy local tzz = rzx*xz+rzy*yz+rzz*zz offrx,offry,offrz = getEulerAnglesFromMatrix(txx,txy,txz,tyx,tyy,tyz,tzx,tzy,tzz) setElementPosition(element,objx,objy,objz) ---- Line 78 setElementRotation(element,offrx,offry,offrz,"ZXY") ---- Line 79
-
ERROR: Server triggered clientside event sonido, but event is not added clientside Client-Side: function playSonido() local sound = playSound("chat.mp3",false) setSoundVolume(sound, 0.9) end addEvent("sonido",true) addEventHandler("sonido",getRootElement(),playSonido) Server-Side: function chat (thePlayer) triggerClientEvent("sonido",getRootElement()) end addEventHandler ( "onPlayerChat", getRootElement(), chat ) the error occurs when the player sends a message in chat without being logged in so as I don't know how to block message during download I need help with the error