William147
Members-
Posts
41 -
Joined
-
Last visited
Everything posted by William147
-
Hey, You can use "Resource Web Access" to call serversided function from your webserver. http://<your IP>:<your port>/<resource_name>/call/<exported_function_name> https://wiki.multitheftauto.com/wiki/Resource_Web_Access
-
Version = 1.5.6-release-15932.0.000 Time = Mon Nov 19 20:20:01 2018 Module = D:\Játékok\MTASA 1.5\MTA\libcef.dll Code = 0xE0000008 Offset = 0x01522D60 EAX=6FB3F640 EBX=84767EEC ECX=00000001 EDX=00000000 ESI=00000000 EDI=00173BC3 EBP=6FB3F69C ESP=6FB3F640 EIP=73ED1812 FLG=00000212 CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B Clients from my server are always crashing. What can it cause?
-
I would like to set same volume in browser volume which the client set in the MTA settings.
-
Hi. Can I get the MTA settings in some way? I want to use the MTA volume which the users using.
-
In whitch row is the error? Melyik sorban van az error?
-
I have a same problem. Anyone can help?
-
I writed a half script, you can see the method. function getNearestVehicle(player,distance) local tempTable = {} local lastMinDis = distance-0.0001 local nearestVeh = false local px,py,pz = getElementPosition(player) local pint = getElementInterior(player) local pdim = getElementDimension(player) for _,v in pairs(getElementsByType("vehicle")) do local vint,vdim = getElementInterior(v),getElementDimension(v) if vint == pint and vdim == pdim then local vx,vy,vz = getElementPosition(v) local dis = getDistanceBetweenPoints3D(px,py,pz,vx,vy,vz) if dis < distance then if dis < lastMinDis then lastMinDis = dis nearestVeh = v end end end end return nearestVeh end bindKey("mouse2","down",function() nVeh = getNearestVehicle(localPlayer,5) door_rf_dummyX,door_rf_dummyY,door_rf_dummyZ = getVehicleComponentPosition ( nVeh, "door_rf_dummy", "world" ) door_lf_dummyX,door_lf_dummyY,door_lf_dummyZ = getVehicleComponentPosition ( nVeh, "door_lf_dummy", "world" ) door_rb_dummyX,door_rb_dummyY,door_rb_dummyZ = getVehicleComponentPosition ( nVeh, "door_rb_dummy", "world" ) or 0,0,0 door_lb_dummyX,door_lb_dummyY,door_lb_dummyZ = getVehicleComponentPosition ( nVeh, "door_lb_dummy", "world" ) or 0,0,0 px,py,pz = getElementPosition(localPlayer) distances = { {getDistanceBetweenPoints3D(px,py,pz,door_rf_dummyX,door_rf_dummyY,door_rf_dummyZ),"door_rf_dummy"}, {getDistanceBetweenPoints3D(px,py,pz,door_lf_dummyX,door_lf_dummyY,door_lf_dummyZ),"door_lf_dummy"}, {getDistanceBetweenPoints3D(px,py,pz,door_rb_dummyX,door_rb_dummyY,door_rb_dummyZ),"door_rb_dummy"}, {getDistanceBetweenPoints3D(px,py,pz,door_lb_dummyX,door_lb_dummyY,door_lb_dummyZ),"door_lb_dummy"}, } table.sort(distances,function(a, b) return a[1] < b[1] end) outputChatBox(distances[1][2]) setVehicleComponentRotation(nVeh,distances[1][2],0,0,-45) end)
-
Hi. Use bindKey and getVehicleComponentPosition with world argument.
-
local veh = getPedOccupiedVehicle ( getRandomPlayer() ) local success = setVehicleHandling ( veh, "centerOfmass", {0,0,0}) if success then outputChatBox("ok") else outputChatBox("not ok") end It outputs "not ok". What is the problem? Solved, Im blind. mass not same as Mass
-
I would like to add special characters which I can write into a box, but the problem is that if I add a special character the backspace isn't working. Who can I fix it?
-
Hi! Can I make or spawn elements with "player" elementtype? If yes how?
-
bindKey(getRandomPlayer(),"F2","down", gui)
-
Hello. My problem is this, that in my RolePlay server the traffic lamps are flashing. What can be problem? Miss something .so file?
-
only asdadadadadasdasda
-
client local x,y = guiGetScreenSize() atad = guiCreateButton( x/2+150+150,y/2+(423/2)+57,150,43, "", false ) addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == atad) then triggerServerEvent("testevent", getLocalPlayer()) outputChatBox("asdadadadadasdasda") end end ) server function test() outputChatBox("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") end addEvent("testevent", true) addEventHandler("testevent", getRootElement(), test) if i click on gui then script write "asdadadadadasdasda" but "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" not! What is the problem?
-
tempCol = createColCuboid ( 1039.5322265625, -10860.85546875, 1352.7685546875,230.0, 50000.0, 90.0 ) function base (thePlayer) outputChatBox("entered") if getElementType(thePlayer) ~= "player" then outputChatBox("you're player") if (getElementType(thePlayer) == "ped" ) then outputChatBox("you're zombie") killPed( thePlayer ) end end end addEventHandler ( "onColShapeHit", tempCol, base ) if I enter the colshape don't write "entered", and don't kill zombies
-
Hello! I would like to make a script for a DayZ server, which kill zombies in a colshape. When the zombies spawns the script make a "Zombies" team and puts into the team. tempCol = createColCuboid ( 1039.5322265625, -10860.85546875, 1352.7685546875,230.0, 50000.0, 90.0 ) function base (thePlayer) playerTeam = getPlayerTeam ( thePlayer ) if playerTeam == "Zombies" then setElementData(thePlayer, "blood", 0) end end addEventHandler ( "onColShapeHit", tempCol, base )
-
in other script works with "thePlayer" No error/warning!
-
Hello! I would like to call killer's element data and killed player's element data but it isn't works! What is the problem? function call(killer) local killername = getPlayerName ( killer ) local sourcename = getPlayerName ( source ) local killergroup = getElementData(killer,"NameGroup") local killedgroup = getElementData ( source, "NameGroup" ) if killer then outputChatBox(killername.."'s group: "..tostring(killergroup).." "..sourcename.."'s group:"..tostring(killedgroup)) end end addEventHandler("kilLDayZPlayer", getRootElement(), call)
-
I would like to write to script: only then write adminduty above player if the player has aduty elementdata
-
Hello! I would like to make a script which write above ped: AdminDuty when it has "aduty" elementdata. local x, y = guiGetScreenSize() function PlayerNameTags() local players = getElementsByType("player") for k,v in ipairs(players) do if v == getLocalPlayer() then else local r = getElementData(v,"red") local g = getElementData(v,"green") local b = getElementData(v,"blue") local x1,y1,z1 = getElementPosition (getLocalPlayer()) local x2,y2,z2 = getElementPosition (v) local visibleto = getDistanceBetweenPoints3D(x1,y1,z1,x2,y2,z2) if visibleto > 350 then else local sx,sy = getScreenFromWorldPosition ( x2,y2,z2+1.05 ) if not sx and not sy then else dxDrawText ("Adminduty:" string.gsub ( getPlayerName ( v ), "#%x%x%x%x%x%x", "" ).."", sx,sy,sx,sy, tocolor(r,g,b,255), 8-visibleto/50, "default-bold", "center","top",false,false,false ) end end end end end addEventHandler("onClientRender",getRootElement(),PlayerNameTags)
-
Error is only this: attempt to compare two boolean values
-
Today came error: attempt to compare two boolean values How can I fix it?