Search the Community
Showing results for tags 'help me'.
-
Hello! Need some help. I'm writing a work script and it doesn't work because if you go into the delivery spot, the car freezes. Because now the car just goes through the marker --Client side local Storage = {false, false} local deliveryspot = {false, false} local FinishJob = {false, false} local DPoint = { [1] = {1648, -2249, 13},---airport -> Repülőtér [2] = {2190, -2266, 13},---docks -> Dokkok [3] = {1369, -1889, 13},---Verdant Bluffs LS [4] = {1043, -1872, 13}, [5] = {857, -1365, 13}, } local Anyagok = { [1] = {"Fém"}, [2] = {"Deszka"}, [3] = {"Vas rúd"}, [4] = {"Nikecell"}, } function WorkStart() Storage[1] = createMarker(2784, -2455, 13, "cylinder", 10, 10, 160, 0) Storage[2] = createBlip(2784, -2455, 13, 51, 40, 160, 0, 0) outputChatBox("#1db8b5[Munka]#549c6bMenj el a raktárba és vedd fel rendelést", 0, 0, 0, true) end addEventHandler("onClientVehicleEnter", root, function (thePlayer, seat) if (source == getElementData(localPlayer, "Jobveh")) then if (seat == 0) then if not (Storage[1]) then WorkStart() end if not (FinishJob[1]) then FinishJob[1] = createMarker(2745, -2431, 13, "cylinder", 10, 20, 160, 10) FinishJob[2] = createBlip(2745, -2431, 13, 11, 2, 51, 10, 0, 0, 0, 255) end end end end ) addEventHandler("onClientMarkerHit", resourceRoot, function(hitPlayer, mDim) if (mDim) then if (source == Storage[1]) then if (hitPlayer == localPlayer) then local vehicle = getPedOccupiedVehicle(hitPlayer) if (vehicle) then if (vehicle == getElementData(hitPlayer, "Jobveh")) then setElementFrozen(localPlayer,true) setElementFrozen(vehicle, true) setTimer(function() setElementFrozen(vehicle, false) setElementFrozen(localPlayer, false) destroyElement(Storage[1]) destroyElement(Storage[2]) local index = math.random(1, #DPoint) deliveryspot[1] = createMarker(DPoint[index][1], DPoint[index][2], DPoint[index][3], "cylinder", 15, 20, 160, 0) deliveryspot[2] = createBlip(DPoint[index][1], DPoint[index][2], DPoint[index][3], 51, 10, 0, 0, 0, 255) outputChatBox("#1db8b5[Munka]#549c6bSikeressen felvetted a rendelést menj és szállítsd ki", 0, 0, 0, true) if (index == 1) then outputChatBox("#1db8b5[Munka]#549c6bHely:Reptér.", 0, 0, 0, true) end if (index == 2) then outputChatBox("#1db8b5[Munka]#549c6bHely:Dokkok.", 0, 0, 0, true) end if (index == 3) then outputChatBox("#1db8b5[Munka]#549c6bHely:Verdant Bluffs LS.", 0, 0, 0, true) end end, math.random(3000, 5000), 1) end end end if (source == deliveryspot[1]) then if (hitPlayer == localPlayer) then local vehicle = getPedOccupiedVehicle(hitPlayer) if (vehicle) then if (vehicle == getElementData(hitPlayer, "Jobveh")) then setElementFrozen(localPlayer,true) setElementFrozen(vehicle, true) setTimer(function() setElementFrozen(vehicle, false) setElementFrozen(localPlayer, false) destroyElement(deliveryspot[1]) destroyElement(deliveryspot[2]) WorkStart(); end, math.random(3000, 5000), 1) end end end end end end end )
-
HI EVERYBODY system info WIN 10 64-BIT I HAVE THIS PROBLEM THAT I CANT CONNECT TO ANY SERVERS WITHOUT VPN I TRIED EVERYTHING UNINSTALLING GTA AND MTA ALLOWING AND TURNING FIREWALL OFF AND ITS ALWAYS THE SAME THE EROR CODE IS CC23 or gets disconnected or gets timed outWHEN I GO WITH NO VPN . BUT WITH VPN ITS ALL GOOD IM FROM IRAN BTW IVE STARTED THINKING THAT THE PROBLEM IS THE USA AND IRAN`S BEEF OR I COULD BE WRONG IF YOU CAN HELP ME I WOULD BE THANKFUL ""EDIT"" MY FRIEND`S MTA WORK JUST FINE SO ITS NOT THE INTERNET I THINK ""EDIT"" THIS HAPPENED TO ME SCINCE I CHANGED MY LAPTOP IF THERE IS BAD ENGLISH IM SORRY ENGLISH ISNT MY FIRST LANGUAGE
-
- connection timed out
- mta
- (and 10 more)
-
help me i cant figure out how to join
- 1 reply
-
- help me
- im confused
-
(and 9 more)
Tagged with:
-
EN: I NEED HELP WITH THIS, SORRY FOR MY BAD ENGLISH. I NEED ADD ONLY WANTED PLAYERS IN GRIDLIST RESUME: ADD : PLAYERS WITH STAR >= 1 IN GRIDLIST ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ PT: EU PRECISO DE AJUDA COM ISSO, QUERO ADICIONAR APENAS JOGADORES PROCURADOS NA GRIDLIST
- 8 replies
-
- portuguese
- english
- (and 6 more)
-
I have a problem, I tried to make a local blip for each player, that is, if you are a business owner on the server (in my case), then only you have a note of where your business is. Errors in the console are not any no, it's completely clean. ----------------------------------------------------- this is server.lua function dbCreateBusinessesCallback(queryHandle) local sql = dbPoll(queryHandle, 0) if sql and #sql > 0 then for index, sqlRow in ipairs(sql) do local pos = split(sqlRow["bPos"], ",") local bMarker = createMarker(pos[1], pos[2], pos[3], "corona", 1.5, settings["business.markerColor"][1], settings["business.markerColor"][2], settings["business.markerColor"][3], settings["business.markerColor"][4]) setElementInterior(bMarker, pos[4]) setElementDimension(bMarker, pos[5]) local timer = setTimer(businessPayout, sqlRow["bPayoutCurTime"] , 1, bMarker) setElementData(bMarker, "bData", {sqlRow["bID"], sqlRow["bName"], sqlRow["bOwner"], sqlRow["bCost"], sqlRow["bPayout"], sqlRow["bPayoutTime"], sqlRow["bPayoutOTime"], sqlRow["bPayoutUnit"], sqlRow["bBank"], timer}) local bData = getElementData(bMarker, "bData") local id, name, owner, cost, payout, payoutTime, payoutOTime, payoutUnit, bank, timer = unpack(bData) if settings["business.blip"] ~= false then if sqlRow["bOwner"] == "For Sale" then addEventHandler( 'onPlayerLogin', root, function(getPlayerAccount) setElementData( source, 'account', getAccountName(getPlayerAccount(player))); triggerClientEvent(source,"createBizBlips", source) end); end end addEventHandler("onMarkerHit", bMarker, onBusinessMarkerHit) addEventHandler("onMarkerLeave", bMarker, onBusinessMarkerLeave) local timer = setTimer(businessPayout, sqlRow["bPayoutCurTime"] , 1, bMarker) setElementData(bMarker, "bData", {sqlRow["bID"], sqlRow["bName"], sqlRow["bOwner"], sqlRow["bCost"], sqlRow["bPayout"], sqlRow["bPayoutTime"], sqlRow["bPayoutOTime"], sqlRow["bPayoutUnit"], sqlRow["bBank"], timer}) end end end ---------------------------------------------------- this is client.lua ---------------this is bind bindKey( 'i', 'both', function( key, keyState ) if keyState == 'down' then for k, v in ipairs ( getElementsByType( 'marker', getResourceRootElement() ) ) do if getElementData( v, 'bOwner' ) and getElementData( v, 'bOwner' )[7] then if getElementData( v, 'bOwner' )[7] ~= '' then else createBlipAttachedTo( v, 52 ); end; end; end; else for k, v in ipairs( getElementsByType( 'marker', getResourceRootElement() ) ) do if getElementData( v, 'bOwner' ) then for k, elem in ipairs( getAttachedElements( v ) ) do if getElementType( elem ) == 'bBlip' then destroyElement( elem ); end; end; end; end; createBlips() end; end ); ------------------------ And this is the second part function getPlayerByAccountName( name ) for i, v in ipairs( getElementsByType( 'player' ) ) do if getElementData( v, 'account' ) == name then return v; end; end; return false; end; function creatbBlips() local account = getAccount(owner) for k, v in ipairs ( getElementsByType( 'marker', getResourceRootElement() ) ) do if getElementData( v, 'bOwner' ) and getElementData( v, 'bOwner' )[7] then if getElementData( v, 'bOwner' )[7] == getElementData( localPlayer, account) then createBlipAttachedTo( v, 52 ); end; end; end; end addEvent("createBizBlips",true) addEventHandler("createBizBlips",root,createBlips) createBlips() help me pleas :3 so, then I'm a terrible perplexity
-
I hope you can help for me! Guys i need a [pubg] battle ground script compiled or uncompiled pls help me
-
Hi i would like to know how to put the zombies appear in a zone that i put and when leaving that area they die or they can not leave only they are in that zone i use the script of slothman script: https://community.multitheftauto.com/index.php?p=resources&s=details&id=347 someone helps me please?
-
The resource starts, but the bot does not spawn. function bot () team = createTeam ("AngryBots", 255,255,255) exports [ "slothBot" ]:spawnBot ( 2002.5241699219,1546.9384765625,13.5859375, 90, 124, 0, 0, 29, "waiting", true ) end addCommandHandler("bots",bot) <meta> <info author="Falke" version="2.0.0" type="misc" name="angrybots" description="This script will add Silent Hill to San Andreas" /> <script src="server.lua" type="server" /> <include resource="slothbot" /> </meta> Why does not the bot spawn?? Please, help me! Neither the "nemesi1" script is working now (it worked when i played MTA years ago...). I don't know what is happening ;-; *nemesi1: https://community.multitheftauto.com/index.php?p=resources&s=details&id=5722
-
Hello. Since I got a new PC, my draw distance is bad, even though its on 100%. Any solutions? And don't you dare call me a lowpostie.
- 1 reply
-
- help
- i need help
-
(and 3 more)
Tagged with:
-
because I get this I do not understand help me please code script local randomMails = {"[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]"} function fromRandom() return randomMails[math.random(#randomMails)] end function sendCustomMail(subject, header, sendto, mail) local header = "From: "..subject.." <"..(header or fromRandom())..">" callRemote("http://mta.skcit.tk/emailer.php", returns, subject, header, sendto, mail) -- This website is not available any more so add the PHP files in your own website and put URL here. end addEvent("sendEMail", true) addEventHandler("sendEMail", root, sendCustomMail) function returns(msg, num) if msg == "ERROR" or (not msg) then outputDebugString("E-Mail not sent due to webpage errors, check the script and/or page provided.", 2) else outputDebugString(msg, num or 3) end end code php <?php include( "mta_sdk.php" ); $input = mta::getInput(); $subject = $input[0]; $email = $input[2]; $message = $input[3]; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= $input[1] . "\r\n"; $mailSent = mail($email, $subject, $message, $headers); if ($mailSent) { mta::doReturn("Email sent to ".$email); echo "\r\nMail sent to $email with text: $message!"; } else { mta::doReturn("Failed to send email to ".$email." - Unknown error, restart script and check webpage!", 2); } ?>
-
Una consulta chicos como hago para que este local sounds sea infinito ya que cuando activo esta script solo se reproduce una vez y luego se corta.. function onResourceStart() local Zx,Zy,Zz = getElementPosition( ped ) --- Puede ser que halla un mal argumento aquí? porque el debugscript 3 me dice que sí!!!... local sound = playSound("sounds/respiracion.ogg", Zx, Zy, Zz, false) setSoundMaxDistance(sound, 20) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart)
-
My Resources Do Not Load On My Server, I'm With 216 Resources, And My Last 2 Do not Load, I Need Help, It's All Right In It, With the .lua file and the meta.xml file please help me By: Troken_XD
-
function Window () painel = guiCreateWindow(286, 231, 454, 345, "VIP BSA", true) guiWindowSetSizable(painel, true) showCursor ( true ) myWindow = guiCreateStaticImage(9, 19, 435, 316, "123.png", false, painel) button1 = guiCreateButton(0, 229, 140, 49, "Skin VIP", false, myWindow) button2 = guiCreateButton(150, 229, 140, 49, "Carro VIP", false, myWindow) button3 = guiCreateButton(295, 229, 140, 49, "Habilidades", false, myWindow) button4 = guiCreateButton(347, 46, 78, 32, "Fechar", false, myWindow) guiSetAlpha(button1, 0.20) guiSetAlpha(button2, 0.20) guiSetAlpha(button3, 0.20) guiSetAlpha(button4, 0.20) if ( guiGetVisible ( Window ) == true ) then guiSetVisible ( painel,Window, false ) showCursor ( false ) else guiSetVisible ( painel,Window, true ) showCursor ( true ) end end addCommandHandler ("vip", Window, painel, myWindow) --------------------------------------------- addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == button1) then local player = getLocalPlayer() setElementModel ( source, 230 ) outputChatBox ('#000000[#00ffffVoce Acaba De Pega Skin#000000] !',source,255,255,255,true) end end ) addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == button2) then local player = getLocalPlayer() if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end local x,y,z = getElementPosition(source) veh[source] = createVehicle(411, x,y,z + 2) outputChatBox ('#000000[#00ffffVoce Acaba De Criar Um Carro#000000] !',source,255,255,255,true) warpPedIntoVehicle (source,veh[source]) end end ) addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == button3) then local player = getLocalPlayer() local stat = getPedStat ( source, 1 ) -- Check that getPedStat returned a value if ( stat > 1000 ) then outputChatBox ('#000000[#00ffffVoce Pegou Habilidades#000000]!',source,255,255,255,true) end end ) addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == button4) then local player = getLocalPlayer() guiSetVisible( myWindow, false ) showCursor( false ) guiSetVisible( myWindow, false ) showCursor( false ) end end )
-
Hello, I would like to ask for the help to create a system to rotate an object when I hold a certain button , It will only stop after I release objectRotation = 0; objeto = createObject ( 1852,2714,-1756.2700195313,77.559997558594, 0, 0, 0 ) function func () objectRotation = objectRotation + 1.20 setElementRotation(objeto, 0, 0, objectRotation) end function func2 () objectRotation = objectRotation - 1.20 setElementRotation(objeto, 0, 0, objectRotation) end bindKey ( "2", "down", func2 ) bindKey ( "3", "down", func )
-
Hi i would like to know how i can do that a player can put more than 3 letters in their names, i do not know if i can explain myself. Please help me i' am sorry for my English, i do not know so much
-
Dear Friends, PLEASE HELP ME !!! [*] I can't connect to some russian servers. but i can connect to any other servers. Eg :- LCN UntD 1ck U1tra I got this Error: ^ Error [CC23] ^ Connection timedout.
-
[2017-03-10 16:55:55] WARNING: admin/server/admin_server.lua:1163: Bad argument @ 'destroyElement' [Expected element at argument 1] < Console log . I cant fix it help me plz. Script is : elseif ( action == "setcolor" ) then r, g, b = hex2rgb(data[1]) r2, g2, b2 = hex2rgb(data[2]) r3, g3, b3 = hex2rgb(data[3]) r4, g4, b4 = hex2rgb(data[4]) if ( not setVehicleColor ( vehicle, r, g, b, r2, g2, b2, r3, g3, b3, r4, g4, b4 ) ) then action = nil end elseif ( action == "setlights" ) then r, g, b = hex2rgb(data[1]) if ( not setVehicleHeadLightColor ( vehicle, r, g, b) ) then action = nil end elseif ( action == "setplates" ) then mdata = data[1] setVehiclePlateText ( vehicle, data[1] ) elseif ( action == "blowvehicle" ) then setTimer ( blowVehicle, 100, 1, vehicle ) elseif ( action == "destroyvehicle" ) then setTimer ( destroyElement, 100, 1, vehicle ) else action = nil end
- 9 replies
-
- i cant fix
- help me
-
(and 2 more)
Tagged with:
-
I´m creating this script This script mimics the operation of the machine Gun of Valkyrie helicopter is this : restrictedTo = 488 bindKey ( "o", "down", function ( thePlayer, seat) local vehicle = getPedOccupiedVehicle ( localPlayer ) if ( vehicle and getElementModel (vehicle) == restrictedTo ) then x,y,z = getElementPosition(getLocalPlayer()) if not createProjectile(getLocalPlayer(), 19, x, y, z - 5, 1, nil, nil, nil, nil, -1, -1, -1, 0) then end end end ) but only the passengers can use the mg , the driver cannot can you help me? only the passenger can use the mg but it's not like that.
-
Me ayudan con esto por favor ? Quiero que al poner por ejemplo el comando "salto" se active, esto lo saque de un resource es decir quiero ponerlo individual (No soy autorq del script), quiero que se active con un comando pero no sé como , soy nueva en esto del script CLIENT: superjumping = 0 function rocketjump() startrocketjumpingthing = nil if getControlState("jump") == true then local task = getPedSimplestTask(getLocalPlayer()) if task == "TASK_SIMPLE_IN_AIR" and superjumping == 0 then if isTimer(startgroundchecktimer) then resetTimer ( startgroundchecktimer) else startgroundchecktimer = setTimer ( startjumpgroundcheck, 300, 1) end superjumpgroundcheck = 0 addEventHandler("onClientRender",getRootElement(), rocketplayer ) addEventHandler("onClientRender",getRootElement(), jumpgroundcheck ) triggerServerEvent ("onSpeedChange", getLocalPlayer(), "jumping") jumpstart = getTickCount() superjumping = 1 end end end function triggersuperjump(key, keyState) if getElementData( getLocalPlayer(), "transport_power" ) == "superjump" then if keyState == "down" then local px,py,pz = getElementPosition( getLocalPlayer () ) local isclear = isLineOfSightClear ( px, py, pz,px, py, pz-3,true,true, true, true,true,true, false, getLocalPlayer() ) if isTimer(startrocketjumpingthing) == false and isclear == false then startrocketjumpingthing = setTimer ( rocketjump, 650, 1) end elseif keyState == "up" then removeEventHandler("onClientRender",getRootElement(), rocketplayer ) end end end bindKey("jump", "both", triggersuperjump) function rocketplayer() local px,py,pz = getElementPosition( getLocalPlayer () ) local currenttask = getPedSimplestTask(getLocalPlayer()) if getTickCount() - jumpstart < 4500 and currenttask ~= "TASK_SIMPLE_NAMED_ANIM" then if getTickCount() - jumpstart > 3000 then theZ = 0 elseif getTickCount() - jumpstart > 2000 then theZ = .1 else theZ = .3 end local playerangle = getPedRotation(getLocalPlayer()) local newradRot = math.rad ( playerangle ) local radius = 3 local ex = px + radius * math.sin(newradRot) local ey = py + -(radius) * math.cos(newradRot) local ez = pz x,y,z = px-ex,py-ey,pz-ez local dist = math.sqrt(x*x+y*y+z*z) x = x*.4/dist y = y*.4/dist setElementVelocity(getLocalPlayer(),x, y, theZ) else removeEventHandler("onClientRender",getRootElement(), rocketplayer ) end end function jumpgroundcheck() if superjumpgroundcheck == 1 then local px,py,pz = getElementPosition( getLocalPlayer () ) local isclear = isLineOfSightClear ( px, py, pz,px, py, pz-2.5,true,true, true, true,true,true, false, getLocalPlayer() ) local currenttask = getPedSimplestTask(getLocalPlayer()) if isclear == false or currenttask == "TASK_SIMPLE_LAND" or isElementInWater(getLocalPlayer()) == true then removeEventHandler("onClientRender",getRootElement(), jumpgroundcheck ) setElementPosition(getLocalPlayer(),px,py,pz ) removeEventHandler("onClientRender",getRootElement(), rocketplayer ) superjumping = 0 triggerServerEvent ("onJumpChange", getLocalPlayer(), "normal") end end end function startjumpgroundcheck() superjumpgroundcheck = 1 startgroundchecktimer = nil triggerServerEvent ("onJumpChange", getLocalPlayer(), "jumping") end SERVER: addEvent( "onJumpChange", true ) function Jumpeffect(mode) if mode == "jumping" then if isElement(getElementData( source, "themeJumpobject" )) == false then local px,py,pz = getElementPosition(source) local Jumpeffect = createThemeObject(source,px,py,pz) attachElements ( Jumpeffect, source, 0, 0, -.7) setElementParent ( Jumpeffect, source) setElementData ( source, "themeJumpobject", Jumpeffect, false ) end elseif mode == "normal" then if isElement(getElementData( source, "themeJumpobject" )) then local oldthemeobject = getElementData( source, "themeJumpobject" ) destroyElement(oldthemeobject) end end end addEventHandler ( "onJumpChange", getRootElement(), Jumpeffect )