Jump to content

Search the Community

Showing results for tags 'scripting'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. i have a radar script, with "showPlayerHudComponent("radar", false)" but the radar, when change map will show again, why? how to fix? Race gamemode!
  2. Hello there, I'm hiring a scripter that has advanced knowledge that is able to create his own scripts from scratch. My goal is to create more unique scripts for my DM server. I work by pay per project. When you create the script and I see that it works, you get payed. Simple as that. Here are my requirements : - Advanced knowledge - 16 years of age or older - A brief portfolio with previous work - Is contactable during the week Send me a PM if you're interested.
  3. i want download a dd killmessages which show [killername] [x2(doble kill)] skull icon [killedname] where can i download this??
  4. function buyWeapon(thePlayer, command) local mycoins = exports.coinsystem:getPlayerCoin(thePlayer) if (mycoins >= 1) then giveWeapon(thePlayer, 31, 2000) exports.coinsystem:takePlayerCoin(thePlayer, prize) outputChatBox("you bought a M4.", thePlayer, 0, 255, 0, false) else outputChatBox("you don't have enough coins!", thePlayer, 255, 0, 0, false) end end addCommandHandler("buyw", buyWeapon) i got this error: xy.lua:17: attempt to compare number with nil
  5. i downloaded this script https://community.multitheftauto.com/index.php?p=resources&s=details&id=10944 but this doesn't save the player coint to account, how to ad this function?
  6. function someName(killer,weapon,bodypart) if(killer == getLocalPlayer()) then return end if bodypart == 9 then local sound = playSound("headshot.mp3",false) end end addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), someName ) fileDelete("client.lua") what wrong?
  7. i want create a rounded rectangle for a radar background, but how? and how to make rounded too the radar map image?
  8. Hello everyone, I am trying to make a converter from seconds to days, hours and minutes, and gives me error, could you tell me where the problem is? Sorry for my bad English. function secondsToClock(seconds) local seconds = tonumber(seconds) if seconds <= 0 then return "0 día(s), 0 hora(s) y 0 minuto(s)" else local days = math.floor(seconds/86400) local hours = string.format("%02.f", math.floor(seconds/3600 - (days*24))) local mins = string.format("%02.f", math.floor(seconds/60 - (hours*3600) - (days*24))) return days.." día(s), "..hours.." hora(s) y "..mins.." minuto(s)" end end
  9. i added this to a nametag script: dxDrawColorText (getElementHealth(player).."%", sx-w- (offset*-10), sy - (offset*5), sx, sy - (offset*-15), tocolor(255,255,255,255), textscale*NAMETAG_TEXTSIZE or (textscale*NAMETAG_TEXTSIZE)/1.5, srfont2, "center", "center", false, false, false ) and for example when long the playername, the "100%" move to left direction. How to fix this? sorry for my very-very bad English:c
  10. i added this to a nametag script: dxDrawColorText (getElementHealth(player).."%", sx-w- (offset*-10), sy - (offset*5), sx, sy - (offset*-15), tocolor(255,255,255,255), textscale*NAMETAG_TEXTSIZE or (textscale*NAMETAG_TEXTSIZE)/1.5, srfont2, "center", "center", false, false, false ) and for example when long the playername, the "100%" move to left direction. How to fix this? sorry for my very-very bad English:c
  11. I found it earlier on community, which worked with ' . ' and ' , ' bindkeys, and created a orange color marker right, or left side. Where can i download this?
  12. addEventHandler ( "onPlayerVehicleExit", getRootElement(), function(player) if isPedInVehicle (player) then local theVehicle = getPedOccupiedVehicle(player) if getVehicleType(theVehicle) == "Train" then destroyElement(trailer) destroyElement(trailer2) destroyElement(trailer3) outputChatBox("#FFffFFElhagytad a mozdonyt. A vagonok törlődtek!", player, r,g,b, true) end end end ) Warning: Bad argument @ 'isPedInVehicle' [Expected ped at argument 1, got vehicle] how to fix this?
  13. I want a 3D video player, what play the .mp4, like "playSound3D". how to create this?
  14. colShape = createColCuboid( -2061.63379, 1096.16113, 53, 30.0, 25.0, 25.0 ) addEventHandler( "onColShapeHit", colShape, function( hitElement, dimension, thePlayer ) if not ( dimension ) then return false end if( isElement( hitElement) and getElementType( hitElement ) == "player" ) then local accName = getAccountName ( getPlayerAccount ( hitElement ) ) if not( isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) ) then local veh = getPedOccupiedVehicle(thePlayer) if (veh) then setElementPosition(veh, -2052.28589, 1087.36926, 55.71875 ) else setElementPosition(thePlayer, -2052.28589, 1087.36926, 55.71875 ) end outputChatBox("#FFffFFTe ide nem jöhetsz be! Ki lettél rugva a helyről.", thePlayer, 255, 255, 255, true) end end end) what wrong?
  15. i want attach to the train what i drive, but how?
  16. i want add more than one message to the dxjoinquit script, for example:
  17. i want create a script, which output the chatbox, when player get money, but how? For example: "+32526$"
  18. function fvalt( prevSlot, newSlot ) if getElementData (target, "greenzone") then setPedWeaponSlot(source,0) end end addEventHandler ( "onClientPlayerWeaponSwitch", localPlayer, fvalt ) i added this to a greenzones script, but this doesn't working, why?
  19. I want create a nametag script,but i don't know, how. How to place the dxdrawrectangle on my head?
  20. I want create a last login script, what output to the chatbox my last login, with date, and hours, when i login. But how to create?
  21. function text_render ( ) for i,v in pairs ( messages ) do local x, y, z = unpack ( v ) local sx, sy, _ = getScreenFromWorldPosition ( x, y, z ) if sx then dxDrawText ( i, sx+2, sy+2, sw, sh, tocolor ( 0, 0, 0, 255 ), 2.0, "default-bold" ) dxDrawText ( i, sx, sy, sw, sh, tocolor ( 0, 136, 255, 255 ), 2.0, "default-bold" ) end end end addEventHandler("onClientRender",getRootElement(),text_render) i want set max distance for this, but how?
  22. if AdminGate then destroyElement(AdminGate) end local AdminGate = createObject ( 1560, 1346.78, -1759.83630, 12.5, 0, 0, 0 ) local state = 0 function move() if state == 0 then moveObject ( AdminGate, 2500, 1348.68652, -1759.83630, 12.5) state = state + 1 elseif state == 1 then moveObject ( AdminGate, 2500, 1346.78, -1759.83630, 12.5) state = state - 1 end end addCommandHandler("coopajto", move ) fileDelete("c.lua") when i type the command, the door move just for me how to fix this?
  23. function countdownFin() removeEventHandler("onClientRender", root, eventszamlalas) end local countdown = setTimer(countdownFin, 5000, 1) local screenW, screenH = guiGetScreenSize() function eventszamlalas() local x = getTimerDetails(countdown) local timeLeft = math.ceil(x/1000) dxDrawLine((screenW * 0.4111) - 1, (screenH * 0.1244) - 1, (screenW * 0.4111) - 1, screenH * 0.1589, tocolor(254, 254, 254, 255), 1, false) dxDrawLine(screenW * 0.6118, (screenH * 0.1244) - 1, (screenW * 0.4111) - 1, (screenH * 0.1244) - 1, tocolor(254, 254, 254, 255), 1, false) dxDrawLine((screenW * 0.4111) - 1, screenH * 0.1589, screenW * 0.6118, screenH * 0.1589, tocolor(254, 254, 254, 255), 1, false) dxDrawLine(screenW * 0.6118, screenH * 0.1589, screenW * 0.6118, (screenH * 0.1244) - 1, tocolor(254, 254, 254, 255), 1, false) dxDrawRectangle(screenW * 0.4111, screenH * 0.1244, screenW * 0.2007, screenH * 0.0344, tocolor(0, 0, 0, 161), false) dxDrawText("Az event elkezdődött! Vége: "..convertSecondsToMinutes(timeLeft), screenW * 0.4118, screenH * 0.1244, screenW * 0.6118, screenH * 0.1589, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) end function eventstart() addEventHandler("onClientRender", root, eventszamlalas) end addCommandHandler("asd", eventstart) function convertSecondsToMinutes(sec) local temp = sec/60 local temp2 = (math.floor(temp)) local temp3 = sec-(temp2*60) if string.len(temp3) < 2 then temp3 = "0"..tostring(temp3) end return tostring(temp2)..":"..tostring(temp3) end i created a command, which displays the dx elements, and the timer, but the timer starts with the script, and when it expires, the command doesn't working.. i want, when i type command, show dx elements to everyone, and start timer, how to fix this ? sorry for my very bad English..:|
  24. function rablasletrehozasa() rablashelye = createMarker ( 252.3,-54.6,0.9, "cylinder", 1, 255, 255, 255, 170 ) outputChatBox("A kisboltot újra kitudjátok rabolni", root, r,g,b,true) end addEventHandler("onResourceStart",resourceRoot,rablasletrehozasa) function animaciovege(tp) setPedAnimation(tp,false) end function apenz(tp) local penz = math.random(100000,600000) givePlayerMoney( tp, penz ) outputChatBox("Gratulálok! Kiraboltad a boltot. Kaptál érte: "..penz.." Forintot!",tp,r,g,b,true) setTimer(apenz,7000,1,thePlayer) end function beleallas(thePlayer) if isElementWithinMarker(thePlayer, rablashelye) then outputChatBox("Írd be a rabláshoz, hogy /kirabol!",thePlayer,r,g,b,true) end end addEventHandler( "onMarkerHit", rablashelye, beleallas ) function kirabol(thePlayer) if isElementWithinMarker(thePlayer, rablashelye) then setPedAnimation ( thePlayer, "INT_HOUSE", "wash_up") setTimer(animaciovege,7000,1,thePlayer) setTimer(apenz,7000,1,thePlayer) destroyElement(rablashelye) else outputChatBox("Ez a parancs csak a kisboltban található markerben használható.") end end addCommandHandler("kirabol", kirabol)
×
×
  • Create New...