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. function autostat(thePlayer) setPlayerStat(thePlayer, 24, 1000) setElementHealth(thePlayer, 255) end addEventHandler("onResourceStart", resourceRoot, autostat) i got this warnings: [22:09:28] WARNING: autostat\autostat.lua:2: Bad argument @ 'setPlayerStat' [Expected element at argument 1, got resource-data] [22:09:34] WARNING: autostat\autostat.lua:3: Bad argument @ 'setElementHealth' [Expected element at argument 1, got resource-data]
  2. في امر تتحقق من ان السياره مصلحه او لا ؟
  3. بدي كود انو لما الاعب يدخل يحوله لبقاله او مركز الشرطه بس بدي ألأمر
  4. i downloaded a freeroam, in wich it was missing giveweapon button, and panel, i added from the default freeroam script, but doesn't working, does not give weapons how to fix this? /sorry for my bad English:c/
  5. function payScript(player,cmd,other,amount) local money = getPlayerMoney(player) local otherPlayer = getPlayerFromName(other) if not other or not amount then outputChatBox("#00BAFF[Play] #FFffFFHelyes használat: #0088FF/pay <név> <összeg>!",player,0,255,255, true) end if ((money - amount) < 0) then outputChatBox("#00BAFF[Play] #FFffFFNincs elegendő #0088FFpénzed!",player,0,255,255, true) return else setPlayerMoney(otherPlayer,getPlayerMoney(otherPlayer) + amount) setPlayerMoney(player,money - amount) outputChatBox("#00bAFF[Play] #0088FF"..amount.."Ft-ot #FFffFFküldtél neki: #0088FF"..other.."!",player,0,255,255, true) outputChatBox("#00BAFF[Play] #FFffFFKaptál #0088FF"..amount.."Ft-ot #FFffFFtőle: #0088FF"..getPlayerName(player).."!",otherPlayer,0,255,255,true) end end addCommandHandler("pay",payScript) and i got this error: xy.lua:11: attempt to perform arithmetic on a boolean value how to fix this?
  6. local marker = createMarker ( 2459.77466,-1661.70081,12.90843 , "cylinder" ,3 , 255 , 255 , 0 , 170) function fixVehicle() getPlayerMoney ( source ) if getPlayerMoney (source ) <= 500 then fixVehicle (vehicleValue) outputChatBox ( "تم تصليح سيارتك واخذ منك 500 دولار" ) if getPlayerMoney ( source ) >= 500 then outputChatBox ( "السياره لتصليح كافي نقود يوجد معك لا" ) end end end addEventHandler ("onClientMarkerHit",marker)
  7. function aAction ( type, action, admin, player, data, more ) if ( aLogMessages[type] ) then function aStripString ( string ) string = tostring ( string ) string = string.gsub ( string, "$admin", getPlayerName ( admin ):gsub("#%x%x%x%x%x%x","") ) string = string.gsub ( string, "$by_admin_4all", isAnonAdmin4All( admin ) and "" or " by " .. getPlayerName ( admin ):gsub("#%x%x%x%x%x%x","") ) string = string.gsub ( string, "$by_admin_4plr", isAnonAdmin4Victim( admin ) and "" or " by " .. getPlayerName ( admin ):gsub("#%x%x%x%x%x%x","") ) string = string.gsub ( string, "$data2", more or "" ) if ( player ) then string = string.gsub ( string, "$player", getPlayerName ( player ) ) string = string:gsub("#%x%x%x%x%x%x","") end return tostring ( string.gsub ( string, "$data", data or "" ) ) end local node = aLogMessages[type][action] if ( node ) then local r, g, b = node["r"], node["g"], node["b"] if ( node["all"] ) then outputChatBox ( aStripString ( node["all"] ), _root, r, g, b ) end if ( node["admin"] ) and ( admin ~= player ) then outputChatBox ( aStripString ( node["admin"] ), admin, r, g, b ) end if ( node["player"] ) then outputChatBox ( aStripString ( node["player"] ), player, r, g, b ) end if ( node["log"] ) then outputServerLog ( aStripString ( node["log"] ) ) end end end end i added this lines to 'admin_server.lua', but doesn't working the script i got a lot of errors from 'admin_sync.lua':194: attempt to index global 'aPlayers' (a nil value) and rom 'admin serverjoiner.lua':48: attempt to call global 'checkClient' (a nil value) but when i add the original 'aActions' function, the errors will disappear. why? how to fix this?
  8. addEventHandler("onPlayerLogin", getRootElement(), function () local name = getPlayerName ( source ) name:gsub("#%x%x%x%x%x%x", "") if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then exports[getResourceName(resource)]:addNotification(root, name.." tulajdonos szolgálatba lépett!", "warning") elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then exports[getResourceName(resource)]:addNotification(root, name.." moderátor szolgálatba lépett!", "warning") elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then exports[getResourceName(resource)]:addNotification(root, name.." szupermoderátor szolgálatba lépett!", "warning") elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Modi")) then exports[getResourceName(resource)]:addNotification(root, name.." moderátor szolgálatba lépett!", "warning") elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Operator")) then exports[getResourceName(resource)]:addNotification(root, name.." operátor szolgálatba lépett!", "warning") elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("zuker")) then exports[getResourceName(resource)]:addNotification(root, name.." moderátor szolgálatba lépett!", "warning") elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Adminseged")) then exports[getResourceName(resource)]:addNotification(root, name.." adminsegéd szolgálatba lépett!", "warning") end end ) i added 'gsub' but the color code not disappear
  9. ممكن لو سمحتو تقولولي ايش معنى tonumber وكيف استعملها
  10. addEventHandler ( "onElementModelChange", root, function ( oldModel, newModel ) local account = getPlayerAccount ( source ) local accountName = getAccountName ( account ) if ( newModel == 60 and not isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then outputChatBox ( "Bocsi, de ez admin skin. Te nem használhatod! :(", source, r, g, b ) setElementData ( source, oldModel ) end end ) outputChatBox is working fine, but the player can change his skin to 60 no errors/warnings in debugscript How to fix this?
  11. ممكن حدا يشرحلي كيف استعمل local ومتى ؟
  12. lua كيف احدد المسافه في برمجه
  13. function createMarker () createMarker(1922.50562,-1760.24609,13.54688,"cylinder",1.5,255,255,0,170) end GUIEditor = { button = {}, window = {}, memo = {} } addEventHandler("onClientMarkerHit", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(222, 189, 610, 397, "في اي مدينه سوف تعيش", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(18, 183, 247, 110, "لاس فيغاس", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(322, 184, 248, 109, "لوس سانتوس", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(61, 38, 490, 105, "اذا كنت قد اخترت احد المدن فسوف تكون هذه هي مدينتك للأبد ", false, GUIEditor.window[1]) end ) addEventHandler("onClientGUIClick",root) function outPutChatBox() if source == GUIEditor.button[2] then setElementPosition (thePlayer , 1916.07837,-1759.90369,13.54688) if source == GUIEditor.button[1] then setElementPosition (theplayer , 1916.07837,-1759.90369,13.54688) end end end
  14. --server-- function kivesz() local accountName = getPlayerAccount(source) if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Admin" )) then aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountName) end end addCommandHandler("rangki", kivesz) function betesz() local accountName = getPlayerAccount(source) if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Admin" )) then aclGroupAddObject (aclGetGroup("Admin1"), "user."..accountName) end end addCommandHandler("rangbe", betesz) and i got this errors and warnings: http://imgur.com/a/tI7mJ how to fix this?
  15. local acl = getPlayerAcls(thePlayer) dxDrawColorText ("#00BAFF" .. getPlayerName(player) .. " " .. state .. "" .. " (" .. tostring(acl) .. ")", sx-w, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), player ~= g_Me and textscale*NAMETAG_TEXTSIZE or (textscale*NAMETAG_TEXTSIZE)/1.5, srfont, "center", "bottom", false, false, false ) local drawX = sx - NAMETAG_WIDTH*scale/2 how to fix this?
  16. i want to add afk check to my nametag, but i dont know how i tried this, but doesn't working --server function checkAFKPlayers() for index, thePlayer in ipairs(getElementsByType("player")) do if (getPlayerIdleTime(thePlayer) > 300000) then AFKCheck = "AFK" end end end setTimer(checkAFKPlayers, 30000, 0) --client (only the two line) local AFKCheck = {} dxDrawColorText ("#00BAFF" .. getPlayerName(player) .. " (" .. AFKState .. ")", sx-w, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), player ~= g_Me and textscale*NAMETAG_TEXTSIZE or (textscale*NAMETAG_TEXTSIZE)/1.5, srfont, "center", "bottom", false, false, false ) how to make this working? /sorry for my bad english:c/
  17. i added this lines to my admintag script, but...doesn't working. no errors/warnings in debugscript 3 :'s settings = { ['antiswear'] = { ['enabled'] = true, ['swears'] = { ['asshole'] = '*******', [':O'] = '****', ['slut'] = '****', ['bitch'] = '*****', [':O'] = '****', ['whore'] = '*****', ['pussy'] = '*****', [':O'] = '***', ['perro'] = '*****', ['puta'] = '****', ['joder'] = '*****' } } } if settings['antiswear']['enabled'] then for i, v in pairs(settings['swearFilter']['swears']) do while msg:lower():find(i:lower(),1,true) do local start, end_ = msg:lower():find(i:lower(),1,true) local found = msg:sub(start,end_) msg = msg:gsub(found,v) end end end what wrong? how to fix this?
  18. I wanna know how to make an area without collisions, its on a respawn and if players become afk, the others can walk without become stucked. Thanks.
  19. I've edited bonsai's script wrapper and using it, it looks like this: local env = {} local _createObject = createObject local _setTimer = setTimer local _addEventHandler = addEventHandler outputChatBox = function() end triggerServerEvent = function() end createObject = function(...) local object = _createObject(...) setElementDimension(object, dimension) table.insert(wrapper.objects, object) return object end function newClientEnvironment() env = table.copy(_G, true) local metatable = { __index = function(self, index) return rawget(_G, index) end, __newindex = function(_G, index, value) rawset(_G, index, value) end } setmetatable(env, metatable) _outputChatBox('created new Environment') end and this is how a script is loaded: function loadScript(scriptData) local loaded = loadstring(scriptData) setfenv(loaded, env) local ex = pcall(loaded) end The problem is the functions re-defined above interfere with my main script that is using this wrapper. i can just use this wrapper as a separate script but then i'll have to reload two scripts rather than 1, and i dont want that. any ideas? and thank you for reading
  20. Olá pessoal, preciso de algum site para compilar script. Pois o que eu usava não funciona mais...
  21. local blockedTags = { "[VIP]", "[UltraVIP]", "[A]", "[M]", "[SM]" }; addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), function () for i, p in ipairs ( getElementsByType ( "player" ) ) do local tempName = getPlayerName ( p ); for x = 1, #blockedTags do if ( string.find ( tempName, blockedTags [ i ], 1, true ) ~= nil ) then kickPlayer ( source, "Rang tag nem lehet a nevedben! Szedd le! Köszikee :D" ); end end end end ); addEventHandler ( "onPlayerJoin", root, function () local name = getPlayerName ( source ); for i = 1, #blockedTags do if ( string.find ( name, blockedTags [ i ], 1, true ) ~= nil ) then kickPlayer ( source, "Rang tag nem lehet a nevedben! Szedd le! Köszikee :D" ); end end end ); addEventHandler ( "onPlayerChangeNick", root, function ( _, newNick ) for i = 1, #blockedTags do if ( string.find ( newNick, blockedTags [ i ], 1, true ) ~= nil ) then kickPlayer ( source, "Rang tag nem lehet a nevedben! Szedd le! Köszikee :D" ); end end end ); server.lua:9: bad argument #2 to 'find' (string expected, got nil) why??
  22. local blockedTags = { "[VIP]", "[UltraVIP]", "[A]", "[M]", "[SM]" }; addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), function () for i, p in ipairs ( getElementsByType ( "player" ) ) do local tempName = getPlayerName ( p ); for x = 1, #blockedTags do if ( string.find ( tempName, blockedTags [ i ], 1, true ) ~= nil ) then kickPlayer ( source, "Rang tag nem lehet a nevedben! Szedd le! Köszikee :D" ); end end end end ); addEventHandler ( "onPlayerJoin", root, function () local name = getPlayerName ( source ); for i = 1, #blockedTags do if ( string.find ( name, blockedTags [ i ], 1, true ) ~= nil ) then kickPlayer ( source, "Rang tag nem lehet a nevedben! Szedd le! Köszikee :D" ); end end end ); addEventHandler ( "onPlayerChangeNick", root, function ( _, newNick ) for i = 1, #blockedTags do if ( string.find ( newNick, blockedTags [ i ], 1, true ) ~= nil ) then kickPlayer ( source, "Rang tag nem lehet a nevedben! Szedd le! Köszikee :D" ); end end end ); server.lua:9: bad argument #2 to 'find' (string expected, got nil) why??
  23. local function ujteamsay(message, messageType) if messageType == 2 then cancelEvent() outputChatBox("(CSOPORT) "..getPlayerName(source)..": #FFffFF"..message, root, red, green, blue, true ) end end addEventHandler("onPlayerChat", root, ujteamsay) how to fix this? i want just team mates see the message.. *sorry for my very bad English :c*
  24. local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function() dxDrawRectangle(screenW * 0.0021, screenH * 0.7356, screenW * 0.2104, screenH * 0.0367, tocolor(0, 0, 0, 164), false) dxDrawText(text, screenW * 0.0014, screenH * 0.7367, screenW * 0.2125, screenH * 0.7722, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, true, false) end ) addEventHandler("onClientPlayerJoin", root, function() local l_2_0 = getPlayerName(source) text = "#00ff00" .. l_2_0 .. " csatlakozott!" pic = "j" end ) addEventHandler("onClientPlayerQuit", root, function(l_3_0) local l_3_1 = getPlayerName(source) text = "#FF0000" .. l_3_1 .. " lelépett!" pic = "q" end ) addEventHandler("onClientPlayerChangeNick", root, function(l_4_0, l_4_1) text = "" .. l_4_0 .. "#00FF00 Új neve #00BAFF: " .. l_4_1 .. "" pic = "c" end ) fileDelete("client.lua") and i got this warning: : 6 : bad argument 'dxDrawText' [expected string at argument 1, got nil] how to fix this?
  25. function North () local north = createBlipAttachedTo ( north, 4 ); dxDrawImage(north, 20, 20, 'files/images/blips/north.png', 0, 0, 0, tocolor(0, 0, 0, 255), false); end i tried this, but doesn't working. how to add north blip to a radar script?
×
×
  • Create New...