Jump to content

Search the Community

Showing results for tags 'Lua'.

  • 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 this: addEventHandler('onPlayerQuit', root, function(reason) Reasons = { ["Unknown"] = "Nem tudni", ["Quit"] = "kilépett.", ["Kicked"] = "kirúgva a szerverről.", ["Banned"] = "kibanolva a szerverről.", ["Timed Out"] = "kifagyott.", ["Bad Connection"] = "rossz internetkapcsolat" } local name = getPlayerName(source) triggerClientEvent(root, "createNotification", root, "#FFffFF"..Reasons[reason], "simple", name) end ) and the "Quit", "Kicked", and "Banned" msg working fine, but the "Timed Out" no.. does not show the timed out notification, but why? yeah, and i got this error: S.lua:12: attempt to concatenate field '?' (a nil value) thanks the help!
  2. Why not working this notification system? Client side: local notifications = {} function createNotification(text2, typ, name1, name2) if typ == "simple" then text = name1.." "..text2 data = { text = text, startTime = getTickCount(), endTime = getTickCount() + 10000 } elseif typ == "duble" then text = name1.." "..text2.." "..name2 data = { text = text, startTime = getTickCount(), endTime = getTickCount() + 10000 } end table.insert(notifications, data) end addEvent( "createNotification", true ) addEventHandler( "createNotification", localPlayer, createNotification ) Server side: addEventHandler('onClientPlayerChangeNick', root, function(oldNick, newNick, text2, typ, name1, name2) triggerServerEvent ("createNotification", root, text2, typ, name1, name2) end ) How to fix this problem in this script? Thanks the help!
  3. I want a good radar to my server, but i cannot find. And I searched on community, but i cannot find good too.. Anyone can send me a website, or anything from where can i download good radar(s)? Thank you!
  4. Is it possible to make crypt function from php in lua? I connected IPS 4 by php script using PHP SDK but on Linux it returns array not JSON (so weird, returns JSON on Windows and array on Linux). It makes few casualities in my script so i decided to ask here. Is it possible to make php crypt function in MTA?
  5. i created a 'circle-hud' but it does not work well this is the problem: (when my Health = 14hp) and when my Health = 100hp the 100hp is fine, but the 14 hp not... i want something like that when my hp <100 how to fix this?
  6. Приветствую, нужен скриптер для дрифт проекта, который готов работать за идею. Работы не много, работа не трудная, работать не долго(в начале осени планируется открытие). Основная работа: написать коробку передач для автомобиля и сделать трафик автомобилей.
  7. local countdown = 120 G3 = guiCreateLabel(0.49, 0.67, 0.03, 0.02, tostring(countdown).." mp", true) guiSetFont(G3, "default-bold-small") guiSetVisible(G3,false) addEventHandler("onClientGUIClick",root, function () if source == buttonGuest then removeEventHandler("onClientRender",root,a123) addEventHandler("onClientRender", root, dxhavendeg) guiSetVisible(buttonLogin,false) guiSetVisible(buttonRegister,false) guiSetVisible(buttonGuest,false) guiSetVisible(editPassword,false) guiSetVisible(editUsername,false) setTimer(function () countdown = countdown - 1 if countdown >= 0 then guiSetText(G3, tostring(countdown)) else outputChatBox("asd") end end, 120000, 1000) end end ) what wrong?
  8. Нам нужен толковый луа программист, для помощи в разработке не сложных плагинов. Умение работать с базами данных обязательно. Так как толковых людей мало, платить будем много. Skype : batya_vend
  9. 001

    question

    addEventHandler( "onClientPlayerSpawn", root, function () outputChatBox( getPlayerName(source).." Has Spawned " ) end ) This is the script i want ask about something nothing will occur if i Repaced "End" with ")" like this and why the codes in this arrangement ? ) end addEventHandler( "onClientPlayerSpawn", root, function () outputChatBox( getPlayerName(source).." Has Spawned " ) ) end instead of this end ) addEventHandler( "onClientPlayerSpawn", root, function () outputChatBox( getPlayerName(source).." Has Spawned " ) end )
  10. i have a radar script, with "showPlayerHudComponent("radar", false)" but the radar, when change map will show again, why? how to fix? Race gamemode!
  11. i want download a dd killmessages which show [killername] [x2(doble kill)] skull icon [killedname] where can i download this??
  12. 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
  13. 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?
  14. 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?
  15. when i try this code it's never insert datas into database pls help me... ) -- root = getElementRoot() addEventHandler("onPlayerLogin", root, function(_, account) outputChatBox(getPlayerName(source).." Giriş yapti.", root) local oyuncu = getPlayerName(source) local ip = getPlayerIP(source) local serial = getPlayerSerial(source) local username = getAccountName(account) local result = dbPoll( dbQuery( userdata_db, "SELECT * FROM masterdata WHERE username = ?", username ), -1 ) if type(result) ~= 0 then outputChatBox("#afafaf[#f9a52fSA:MP#afafaf] #f9a52fVeritabanina bir veri eklenmedi.",root, 255, 255, 255, true ) else dbQuery( userdata_db, "INSERT INTO masterdata VALUES (?,?,?,?,?)",username,serial,ip, '',oyuncu) end end) Console Log : Username = Asokanta WARNING: mysql/serverside.lua:22: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got nil] WARNING: mysql/serverside.lua:22: Bad argument @ 'dbPoll' [Expected dbquery at argument 1, got boolean] Username = deneme WARNING: mysql/serverside.lua:22: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got nil] WARNING: mysql/serverside.lua:22: Bad argument @ 'dbPoll' [Expected dbquery at argument 1, got boolean] I Fixed Here* It's giving only login logs but it still don't insert data in database when result isn't 0 New Console Log : LOGIN: (Everyone, Console) Asokanta successfully logged in as 'Asokanta' LOGIN: (Everyone) Asokanta successfully logged in as 'deneme' Database Screenshot :
  16. i want create a rounded rectangle for a radar background, but how? and how to make rounded too the radar map image?
  17. Attention I have created this topic to tell you everyone that I am going to freelance in MTA:SA. As you don't know I am working with MTA:SA since 2013 and I have a lot of experience. If you are interested in any of MTA:SA (like DayZ) resouces, scripts or other things, just tell me what you want and I will sell it to you. Also I can teach you how to make some kind of scripts/resources/models/etc. by yourself, how to add it to the server. I can be your server scripter/mapper/hacker/etc., just hire me. Don't be shy You can contact me via e-mail ([email protected]) or skype (herokileris), or here in the forum (this topic or pm). For example, some of the scripts I have made and I can sell you: Vip - (in DayZ) gets more blood, restorations when eating, using medics, drinking... Also gets more stats after each spawning in the map. Animals in the map spawning and has an inventory in which they drop randomly Raw Meat after death. Respawn timer works perfectly. Zombies changed their status from walking or running, how they walk like randomly in the game, they scream, moan, bite your neck, infect you. Also I have a lot of DAYZ zombie models and sounds. Weapons system - each weapon has own model and shooting sound, inventory space slots, the name, the spawning chances, damage, ammo use, crosshire (including and snipers). Hold your breath system - when you aim, your crosshire moves, you can hold your breath and stop moving crosshire by holding a key like for example: for a 5 seconds. There are sounds added also for it. Sounds for you and others when you use medics, food, drinks, etc. like in the real life depending on the distance. Armour, hats, helmets, masks, caps and other clothing systems. MORE AND MORE. Group system. Scoreboard system. Give/Set items system. Map bugs fixer. Radiators, engines, tires, rotors, scrap metals, tank parts, etc. system for vehicles. AND MORE. I have all .lua files.
  18. 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
  19. 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?
  20. I want a 3D video player, what play the .mp4, like "playSound3D". how to create this?
  21. 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?
  22. i want attach to the train what i drive, but how?
  23. function findPlayer(name) local matches = {} for i,v in ipairs(getElementsByType("player")) do if getPlayerName(v) == name then return v end local playerName = getPlayerName(v):gsub("#%x%x%x%x%x%x", "") playerName = playerName:lower() if playerName:find(name:lower(), 0) then table.insert(matches, v) end end if #matches == 1 then return matches[1] end return false end addCommandHandler("pay", function(player, cmd, name, amount) local amount = tonumber(amount) if name and amount then local target = findPlayer(name) local money = getPlayerMoney(target) if money >= amount then takePlayerMoney(player, amount) givePlayerMoney(target, amount) outputChatBox("#FFffFF Átutaltál neki: #c8c8c8" .. getPlayerName(target) .. " #0088ff" .. amount .. " Forintot.", player, 0, 255, 0, true) outputChatBox("#c8c8c8 " .. getPlayerName(player) .. " #FFffFFutalt neked #0088ff" .. amount .. " Forintot.", target, 0, 255, 0, true) else outputChatBox("#FFffFF Nincs elég pénzed.", target, 255, 0, 0, true) end end end ) why can i 'pay' minus amount? how to fix this?
  24. i want add more than one message to the dxjoinquit script, for example:
  25. i want create a script, which output the chatbox, when player get money, but how? For example: "+32526$"
×
×
  • Create New...