Jump to content

Search the Community

Showing results for tags 'script'.

  • 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 want create a nametag script,but i don't know, how. How to place the dxdrawrectangle on my head?
  2. 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?
  3. [2017-04-20 14:36:40] ERROR: [DayZ]\DayZ\bone_attach\attach_func.lua:117: cannot resume dead coroutine [string "?"] [DUP x5] [2017-04-20 14:36:40] ERROR: [DayZ]\DayZ\bone_attach\attach_func.lua:117: cannot resume dead coroutine [string "?"]
  4. [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:160: Bad argument @ 'setElementData' [Expected element at argument 1] [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:163: Bad argument @ 'spawnPlayer' [Expected player at argument 1] [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:164: Bad argument @ 'fadeCamera' [Expected element at argument 1] [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:165: Bad argument @ 'setCameraTarget' [Expected element at argument 1] [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:167: Bad argument @ 'setElementData' [Expected element at argument 1] [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:168: Bad argument @ 'attachElements' [Expected element at argument 2] [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:171: Bad argument @ 'getPlayerAccount' [Expected element at argument 1] [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:172: Bad argument @ 'setAccountData' [Expected account at argument 1, got boolean] [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:173: Bad argument @ 'setElementData' [Expected element at argument 1] [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:174: Bad argument @ 'setElementData' [Expected element at argument 1] [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:176: Bad argument @ 'setElementData' [Expected element at argument 1] [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:176: Bad argument @ 'setElementData' [Expected element at argument 1] [2017-04-16 01:56:39] WARNING: [DayZ]\DayZ\spawn.lua:179: Bad argument @ 'setElementData' [Expected element at argument 1] [2017-04-16 01:56:45] WARNING: [DayZ]\DayZ\spawn.lua:179: Bad argument @ 'setElementData' [Expected element at argument 1] function spawnDayZPlayer(player) setElementData(player,"killed",false) local number = math.random(table.size(spawnPositions)) local x,y,z = spawnPositions[number][1],spawnPositions[number][2],spawnPositions[number][3] spawnPlayer (player, x,y,z+0.5, math.random(0,360),math.random(71,73), 0, 0) fadeCamera (player, true) setCameraTarget (player, player) playerCol = createColSphere(x,y,z,1.5) setElementData(player,"playerCol",playerCol) attachElements ( playerCol, player, 0, 0, 0 ) setElementData(playerCol,"parent",player) setElementData(playerCol,"player",true) local account = getPlayerAccount(player) setAccountData(account,"isDead",false) setElementData(player,"isDead",false) setElementData(player,"logedin",true) for i,itens in ipairs(playerDataTable) do setElementData(player,itens[1],0) end for _,item in pairs(spawnItems)do setElementData(player,item[1],item[2]) end end
  5. addCommandHandler("tent",function(thePlayer) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("Admin"))then local x,y,z = getElementPosition(thePlayer) local xr,yr,zr = getElementRotation(thePlayer) px,py,pz = getElementPosition(thePlayer) prot = getPedRotation(thePlayer) local offsetRot = math.rad(prot+90) local vx = px+1.5*math.cos(offsetRot) local vy = py+1.5*math.sin(offsetRot) local vz = pz+2 local vrot = prot+180 tent = createObject(964,vx,vy,z-1,0,0,vrot) setObjectScale(tent,1.0) tentCol = createColSphere(x,y,z,4) attachElements(tentCol,tent,0,0,0) setElementData(tentCol,"parent",tent) setElementData(tent,"parent",tentCol) setElementData(tentCol,"tent",true) setElementData(tentCol,"vehicle",true) ------------------------------------------------// setElementData(tentCol,"M4A1 CCO",5000) ------------------------------------------------// outputChatBox("[TENT]#FFFFFFTent Spawned!",source,46,255,46,true) else outputChatBox("[TENT]#FFFFFFYou are not admin!",source,255,0,0,true) end end) Can anyone help me with the admin only script remove this tent And players can not remove
  6. addEventHandler("onResourceStart",getRootElement(),function(thePlayer) if(getElementData(thePlayer,"Group")== "Testing" )then blip = createBlip(100,20,0,31) setBlipVisibleDistance(blip,1000) end end) error getElementData
  7. 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?
  8. Gain double experience over the weekend, Only at the weekend. setElementData(killer,"murders",getElementData(killer,"murders")+1) local experiences = math.random(200,300) setElementData(killer,"experience",getElementData(killer,"experience") + experiences) Ex: [INFO] You Killed: ^NewYork || Weapon: Sniper || Distance: 200m || Exp: 286 x2
  9. 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?
  10. local screenX, screenY local drawTimer local isDrawing = false local sound function drawHitMarker() dxDrawImage(screenX-16,screenY-16,32,32,"hitmarker.png") end addEventHandler("onClientPlayerWeaponFire",localPlayer, function(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if hitElement then if getElementType(hitElement)== "vehicle" or getElementType(hitElement)== "player" then screenX, screenY = getScreenFromWorldPosition(hitX, hitY, hitZ) if not screenX then return end if isDrawing then return end isDrawing = true local sound = playSound("hitmarker-sound.wav") setSoundVolume( sound , 1) addEventHandler("onClientRender", root,drawHitMarker) if drawTimer and isTimer(drawTimer) then killTimer(drawTimer) end drawTimer = setTimer(function() isDrawing = false removeEventHandler("onClientRender",root,drawHitMarker) end, 500, 1) end end end) addEventHandler("onClientPlayerDamage",getLocalPlayer(),function() fadeCamera(false,1,255,0,0) local hit_sound = playSound("hitmarker-sound.wav") setSoundVolume(hit_sound,0.5) function cam() fadeCamera(true,1) end setTimer(cam,150,1) end) I explain ... when I shoot it runs "onClientPlayerWeaponFire" And if that bullet hits a ped, user or auto it generates this image at the point of impact " dxDrawImage(screenX-16, screenY-16, 32, 32, "hitmarker.png")" There is a problem with ping. I can shoot you but you do not get the bullet, the script does not verify that, what I want is that something like an IF asks you if you received damage before Which generates the image ... osea syncronize the 2 parts. This because in users occasions they shoot others and when they see the X they think that they did and it is not true then they complain of hack or abuse.
  11. 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..:|
  12. Anyone know any pvp system, without delay 0.003ms per shot.
  13. Hello all.... I have question for you all.I play MTA 6 years and i want to learn scripting... I am looking on forums and i don t understund nothing,When i look all this cods i get lost in all this.. So who can help me with this... Then i am looking on youtube and everything is more or less the same... I want to create Userpanel for [DM] server...But i can't find tutorial for Userpanel on forums,Youtbe and other... So if you want to help me add me on Skype:EMillion
  14. 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)
  15. rablashelye = createMarker ( 252.3,-54.6,0.9, "cylinder", 1, 255, 255, 255, 170 ) function beleallas(thePlayer) outputChatBox("test",thePlayer,r,g,b,true) setPedAnimation ( thePlayer, "DANCING", "dnce_m_b") end addEventHandler( "onMarkerHit", rablashelye, beleallas ) setTimer( function(thePlayer) setPedAnimation(thePlayer,false) end,1000,0)
  16. Fala galera! então como sabem estive afastado do mta e me dediquei ao samp por um tempo, acabei esquecendo todo meu conhecimento sobre programação .lua e agora como estou de volta vou precisar da ajuda de vocês mais que nunca vamos lá! Então eu preciso setar uma animação no servidor pra que quando alguém entre já esteja com a animação,tentei fazer sozinho aqui,mas como eu já falei não lembro de quase nada: function sa(player) setPedWalkingStyle (source, 128) end end addEventHandler("onResourceStart", root, sa)
  17. exports["rangos_bejelentkezes"]:addNotification(player, "Megnyerted a reakció tesztet!", "success") i added this line to a script, but the notification show everyone how to fix this? |Sorry for my very bad English:c|
  18. I know its really stupid to ask because i know the problem. But i put that right on ACL and it stills give me that message, why ?? it is happening in a host WARNING: anti-spam\anti_flood.lua:45: Access denied @ 'setPlayerMuted'
  19. I need a help in this script that I had saved only that it's half bugged and I can not adjust it and it's set rate for MTA DAYZ that you put a number Ex: (I put number 55, all with number 55 will appear on the GPS) Appears in the GPS only to disable the GPS does not work I wanted to put the number 0 to deactivate the set rate. Thank you in advance - Open the window SetGPSRateWindow = guiCreateWindow(0.42,0.45,0.08,0.13,"Set GPS Rate",true) guiWindowSetSizable(SetGPSRateWindow,false) guiSetVisible(SetGPSRateWindow,false) GPSRate = guiCreateEdit(0.10,0.25,0.81,0.25,"",true,SetGPSRateWindow) SetGPSRate = guiCreateButton(0.10,0.61,0.81,0.29,"Set",true,SetGPSRateWindow) guiSetFont(SetGPSRate,"default-bold-small") guiSetProperty(SetGPSRateWindow,"AlwaysOnTop","True") - Function setting rate addEventHandler("onClientGUIClick",getResourceRootElement(getThisResource()),function() if source == SetGPSRate then rate = guiGetText(GPSRate) if rate ~= "" and tonumber(rate) then guiSetVisible(SetGPSRateWindow,false) setElementData(getLocalPlayer(),"GPSChannel",rate) else outputChatBox("Type a number!") end end end) Att ~ Baido
  20. x,y = guiGetScreenSize() image = guiCreateStaticImage( x*0.05, y*0.1, x*0.9, y*0.7, "border.png", false) local browser = guiCreateBrowser(x*0.113, y*0.045, x*0.673, y*0.605, false, false, false, image) guiSetVisible ( image, false ) local theBrowser = guiGetBrowser(browser) addEventHandler("onClientBrowserCreated", theBrowser, function() loadBrowserURL(source, "http://tinyurl.com/lysqs6y") end ) function funct() if guiGetVisible ( image ) == false then showCursor ( true ) guiSetVisible ( image, true) else showCursor ( false) guiSetVisible ( image, false) end end addCommandHandler("honfoglalo", funct) why not working? when i change the URL to "http://youtube.com" the YT is working, but this why not?
  21. ERROR: [DayZ]\DayZ\menu_client.lua:12: attempt to call global 'guiCreateStaticImage' (a nil value) http://prntscr.com/ejv5hq Alguem pode tá me ajudando
  22. function dependent(player) local accountName = getAccountName ( getPlayerAccount ( player ) ) local hour = getAccountData ( playeraccount, "Játszott idő-hours") if hour = 30 then aclGroupAddObject (aclGetGroup("Dependent"), "user."..accountName) end end i got this error: [22:44:11] ERROR: Loading script failed: jatszottido\ji.lua:86: 'then' expected near '=' how to fix this?
  23. i downloaded this script: https://community.multitheftauto.com/index.php?p=resources&s=details&id=11102 and added to my server, but some player doesn't want to raise, and i want create a /antigg script, that they could not lift players, but i don't know how. anyone can help? /sorry for my bad English/
  24. في كود يعطي الاعب مخدرات ؟؟؟؟
×
×
  • Create New...