Jump to content

kikos500

Members
  • Content Count

    125
  • Joined

  • Last visited

Everything posted by kikos500

  1. This is a script to help add logs in a more organized way. how it works? when someone says something in chat its saved in Date_chat.txt file when someone executes a command its saved in Date_commands.txt the third file is a debug log so if any error happen in your server in any day you can check it all these features are already in mta default logs but this is different because it makes a different file everyday so logs become more organized Download https://community.mtasa.com/index.php?p=resources&s=details&id=14794
  2. Did u try fixing it urself what did debugscript 3 say? just saying doesn't help and this section is for people willing to learn scripting if u want some one to fix ur script u gotta find someone to help u or pay for a scripter
  3. local vip = {} local minute = 60000 local hour = minute*60 local db = dbConnect("sqlite", "vip.db") function resourceStart() dbExec(db, "CREATE TABLE IF NOT EXISTS player_vip (account TEXT, vip INT)") for i,v in pairs(getElementsByType("player")) do loadVIP(v) end end addEventHandler("onResourceStart", resourceRoot, resourceStart) function resourceStop() for i,v in pairs(getElementsByType("player")) do saveVIP(v) end end addEventHandler("onResourceStop", resourceRoot, resourceStop) function login() loadVIP(source) end addEventHandler("onPlayerLogin", getRootElement(), login) func
  4. local accounts = {} local DerbyDB = dbConnect("sqlite", "DD.db") function resourceStart() dbExec(DerbyDB, "CREATE TABLE IF NOT EXISTS DerbyMission (DDname, DDserial, DDscore INT , DDban )") for i,v in pairs(getElementsByType("player")) do loadAccount(v) end end addEventHandler("onResourceStart", resourceRoot, resourceStart) function resourceStop() for i,v in pairs(getElementsByType("player")) do saveAccount(v) end end addEventHandler("onResourceStop", resourceRoot, resourceStop) function join() loadAccount(source) end addEventHandler("onPlayerJoin", getRootElement(), join) funct
  5. local DerbyDB = dbConnect("sqlite", "DD.db") local accounts = {} function resourceStart() dbExec(DerbyDB, "CREATE TABLE IF NOT EXISTS DerbyMission (DDname, DDserial, DDscore INT , DDban )") for i,v in pairs(getElementsByType("player")) loadAccount(v) end end addEventHandler("onResourceStart", resourceRoot, resourceStart) function resourceStop() for i,v in pairs(getElementsByType("player")) saveAccount(v) end end addEventHandler("onResourceStop", resourceRoot, resourceStop) function join() loadAccount(source) end addEventHandler("onPlayerJoin", getRootElement(), resourceStop) fun
  6. @Ridden DGS = exports.dgs matable = {} matable.window = DGS:dgsDxCreateWindow (0.10, 0.28, 0.78, 0.29, "VIP panel", true) matable.button = DGS:dgsDxCreateButton(0.34, 0.77, 0.31, 0.18, "set", true, window) matable.label = DGS:dgsCreateLabel(0.42, 0.31, 0.36, 0.43, "TrollSkin", true, window) function outputEditBox () if source == matable.button then setElementModel(getLocalPlayer(), 10) print("skin of"..getPlayerName(getLocalPlayer()).."has been changed to VIP Troll Skin", 10, 186, 31) else print("don't work") end end function guiToggleVisible() if (DGS:dgsDxGUIGetVi
  7. as nexus said scripting section is for people willing to learn if you want someone to make/edit a script for you, you should post at "Looking for staff" section
  8. kikos500

    dxDrawText

    local markers = { {1187,-1313,-13.5,"cylinder", 2, 0, 255, 255, 0}, --Hospital {2035,-1429,16.9,"cylinder", 2, 0, 255, 255, 0}, -- Hospital {-2192,-2291,30.6,"cylinder", 2, 0, 255, 255, 0}, --Hospital {-2654,632,14.4,"cylinder", 2, 0, 255, 255, 0}, --Hospital {-1505,2533,55.68,"cylinder", 2, 0, 255, 255, 0}, --Hospital {-326,1063,19.7,"cylinder", 2, 0, 255, 255, 0}, --Hospital {1608,1838,10.8,"cylinder", 2, 0, 255, 255, 0} --Hospital } function create() -- create a function to createMarkers on resource start for _, marker in pairs(markers) do -- looping through the table of markers
  9. --Serverside function selectMembersList ( playerSource ) local connection = dbConnect( "sqlite", "data.db" ) local qh = dbQuery( connection, "SELECT member_login FROM gang_members WHERE gang_id = ?",selectGangIDBySerial(getPlayerSerial(playerSource))) local result = dbPoll ( qh, -1 ) local group_members = {} for _, row in ipairs ( result ) do local player = getPlayerFromSerial(row["member_login"]) table.insert(group_members,getPlayerSerial(player)) end triggerClientEvent("resendValues", source, group_members) return group_members --table is ok at this
  10. local num = 0 local tick = getTickCount() addEventHandler("onClientRender", getRootElement(), function () if tick+5000 <= getTickCount() then if num >= 10 then num = 0 end tick = getTickCount() num = num + 1 outputDebugString(num) end end) local num = 0 local negative = false local tick = getTickCount() addEventHandler("onClientRender", getRootElement(), function () if tick+5000 <= getTickCount() then if num >= 10 then negative = true elseif num <= 1 then negative = false end tick = getTickCount() if not negative then num = num + 1 else
  11. showCursor(true) local screenW, screenH = guiGetScreenSize() local start = getTickCount() local positions = { {0, (screenH - 268) / 2, animation = "Linear", duration = 800, tick = getTickCount()}, -- Main Menu 1 {-200, 240, animation = "Linear", duration = 800, tick = getTickCount()}, -- Dev Label 2 {50, 284, animation = "Linear", duration = 800, tick = getTickCount()}, -- Username Label 3 {135, 356, animation = "Linear", duration = 800, tick = getTickCount()}, -- Password Label 4 {78, 306, animation = "Linear", duration = 800, tick = getTickCount()}, -- Username Editbox 5 {160, 378, animation
  12. showCursor(true) local screenW, screenH = guiGetScreenSize() outputChatBox(((screenH - 268) / 2)) local positions = { {50, (screenH - 268) / 2, animation = "Linear", duration = 800}, -- Main Menu 1 {-200, 240, animation = "Linear", duration = 800}, -- Dev Label 2 } local start = getTickCount() function draw() for i,pos in pairs(positions) do positions[i].moving = animate(pos[1], pos[2], pos.animation, pos.duration, function () end) end dxDrawRectangle((screenW - 386) / 2, positions[1].moving, 386, 268, tocolor(13, 23, 26, 178), false) dxDrawText("Welcome to the server!", 447, (positions[
  13. i just edited the animate function to work with onClientRender and the positions are an error in the code i think
  14. showCursor(true) local screenW, screenH = guiGetScreenSize() local positions = { {0, (screenH - 268) / 2, animation = "Linear", duration = 800}, -- Main Menu 1 {-200, 240, animation = "Linear", duration = 800}, -- Dev Label 2 {50, 284, animation = "Linear", duration = 800}, -- Username Label 3 {135, 356, animation = "Linear", duration = 800}, -- Password Label 4 {78, 306, animation = "Linear", duration = 800}, -- Username Editbox 5 {160, 378, animation = "Linear", duration = 800}, -- Password Editbox 6 {86, 312, animation = "Linear", duration = 800}, -- Username Text 7 {170, 384, animation =
  15. local anims, builtins = {}, {"Linear", "InQuad", "OutQuad", "InOutQuad", "OutInQuad", "InElastic", "OutElastic", "InOutElastic", "OutInElastic", "InBack", "OutBack", "InOutBack", "OutInBack", "InBounce", "OutBounce", "InOutBounce", "OutInBounce", "SineCurve", "CosineCurve"} function table.find(t, v) for k, a in ipairs(t) do if a == v then return k end end return false end function animate(f, t, easing, duration, onChange, onEnd) assert(type(f) == "number", "Bad argument @ 'animate' [expected number at argument 1, got "..type(f).."]") assert(typ
  16. <meta> <script src="s_chat.lua" type="server"/> <export function="meChat" type="server"/> </meta> -- instead of this exports["chat-system"]:meChat(localPlayer, "rolls up the windows of the "..getVehicleName(car)..".") -- use this in client triggerServerEvent("updateChat", localPlayer, "rolls up the windows of the "..getVehicleName(car)..".") -- this in server addEvent("updateChat", true) addEventHandler("updateChat", root, function(msg) exports["chat-system"]:meChat(source, msg) end ) try this im not sure tho
  17. Actually what is the problem? is the animation not working?
  18. what doesn't work and i just cleaned up your code a bit ;( and btw helpTabs = {} helphelpTabsPan = {} helpLabel = {} helpButton = {} helpWindow = {} helpMemo = {} why were u adding tables while u r not using them? from what i saw u were replacing them with variables in ur script if u need i can give u a detailed explanation about how tables work helpGUI = {} local screenW, screenH = guiGetScreenSize() function ShowHelp() -- window helpGUI.window = guiCreateWindow((screenW - 591) / 2, (screenH - 534) / 2, 591, 534, "Information", false) guiWindo
  19. helpGUI = {} local screenW, screenH = guiGetScreenSize() function ShowHelp() -- window helpGUI.window = guiCreateWindow((screenW - 591) / 2, (screenH - 534) / 2, 591, 534, "Information", false) guiWindowSetSizable(helpGUI.window, false) guiSetAlpha(helpGUI.window, 0.92) guiSetProperty(helpGUI.window, "CaptionColour", "FFD7E21C") -- close button and tab panel helpGUI.close = guiCreateButton(485, 489, 96, 35, "Close", false, helpGUI.window) guiSetProperty(helpGUI.close, "NormalTextColour", "FFFE0000") helpGUI.tabpanel = guiCreateTabPanel(9, 28, 572, 461, false, helpGUI.window) -- Rule
  20. local status = {} function nos(p, c) if status[p] and status[p].allowed then outputChatBox("You can't do this now",source) return end -- what nos does here status[p] = {} status[p].blocked = true status[p].timer = setTimer(function () timer[p].blocked = false end, 2000, 1) end try this this blocks the command for 2 secs u can increase the time if u want and if u want time to be mentioned u can use https://wiki.multitheftauto.com/wiki/GetTimerDetails https://wiki.multitheftauto.com/wiki/DxDrawImage
  21. local names = { ["Admin"] = "Tulajdonos", ["Moderator"] = "Moder√°tor" } local players = {} function adminuzi(thePlayer, commandName, ...) for i,v in pairs(aclGroupList()) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer), v) then if aclGroupGetName(v) == "Everyone" then return end players[thePlayer] = aclGroupGetName(v) end end local message = table.concat({...}, " ") outputChatBox("#0088FF["..players[thePlayer].."]#d8001f "..getPlayerName(thePlayer)..": "..message,getRootElement(),0,0,0,true) end addCommandHandler("asay", adminuzi)
  22. function Ghost() setElementCollisionsEnabled(source, true) setTimer(setElementCollisionsEnabled, 20000, 1, source, false) end addEventHandler("onClientPlayerSpawn", getRootElement(), Ghost) try this client side
  23. kikos500

    CEF problems?

    Multi Theft Auto v1.5.4-release-11528 Copyright (C) 2003 - 2016 Multi Theft Auto
  24. kikos500

    CEF problems?

    is there any chance of getting this bug fixed on the stable version of mta? i mean right now some servers have 0 chances of getting new players because they don't know that they have to update their mta to nightly
×
×
  • Create New...