Jump to content

arciCZ

Members
  • Posts

    22
  • Joined

  • Last visited

Posts posted by arciCZ

  1. Hello, i need help i now trying to make Discord Webhook Embeds, but when i do it i only get response code 400 and Response data: " {"embeds": ["0"]} "

    sendOptions={
    		formFields = {
    			embeds = {
    				title = "Hi",
    				description = " S6066 authored & committed",
    				fields={
    					{name="1",value="2"},
    					{name="3",value="4"}
    				},
    				footer = {
    					text = "Woah! So cool! :smirk:",
    					icon_url = "https://i.imgur.com/fKL31aD.jpg"
    				}
    			}
    		}
    	}
    	fetchRemote(Webhook1URL, sendOptions,callback)

     

    And Response with Iprint is

    --Response Data:
    {"embeds": ["0"]}
    
    --Errno
    {
    	headers = {
    		["Alt-Svc"] = "clear",
    		["CF-Cache-Status"] = "DYNAMIC",
    		["CF-RAY"] = "53535a16ba733e0c-PRG",
    		Connection = "keep-alive",
    		["Content-Length"] = "17",
    		["Content-Type"] = "application/json",
    		Date = "Wed, 13 Nov 2019 20:03:56 GMT",
    		["Expect-CT"] = 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
    		Server = "cloudflare",
    		["Set-Cookie"] = "__cfduid=da477b12fac9e577fb9c4965f1d100e001573675436; expires=Thu, 12-Nov-20 20:03:56 GMT; path=/; domain=.discordapp.com; HttpOnly",
    		["Strict-Transport-Security"] = "max-age=31536000; includeSubDomains",
    		Via = "1.1 google",
    		["X-RateLimit-Bucket"] = "3cd1f278bd0ecaf11e0d2391374c011d",
    		["X-RateLimit-Limit"] = "5",
    		["X-RateLimit-Remaining"] = "4",
    		["X-RateLimit-Reset"] = "1573675439",
    		["X-RateLimit-Reset-After"] = "2"
    	},
    	statusCode = 400,
    	success = false
    }

     

  2. Hello is there everyone way to add new block with table.insert or etc.

    local Ankety = {
            [0] = {
                ["nazev"] = "ABC",
                ["obsah"] = " Yeah your car",
                ["hlasoval"] = 1,
                ["Ano"] = 24,
                ["Ne"] = 20,
            },
            [1] = {
                ["nazev"] = "ASC",
                ["obsah"] = ' Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer rutrum quam mauris, sed \n commodo odio auctor malesuada. Sed lacus lacus, \n semper a nisi nec, condimentum tincidunt sem. \n Aliquam et odio nulla.',
                ["hlasoval"] = 0,
                ["Ano"] = 31,
                ["Ne"] = 50,
            }
        }

    and i need with table.insert or anything make that:

    local Ankety = {
            [0] = {
                ["nazev"] = "ABC",
                ["obsah"] = " :O your :O",
                ["hlasoval"] = 1,
                ["Ano"] = 24,
                ["Ne"] = 20,
            },
            [1] = {
                ["nazev"] = "ASC",
                ["obsah"] = ' Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer rutrum quam mauris, sed \n commodo odio auctor malesuada. Sed lacus lacus, \n semper a nisi nec, condimentum tincidunt sem. \n Aliquam et odio nulla.',
                ["hlasoval"] = 0,
                ["Ano"] = 31,
                ["Ne"] = 50,
            },
            [2] = {
                ["nazev"] = "And",
                ["obsah"] = ' Yeah ipsum dolor sit amet, consectetur adipiscing elit. Integer rutrum quam mauris, sed \n commodo odio auctor malesuada. Sed lacus lacus, \n semper a nisi nec, condimentum tincidunt sem. \n Aliquam et odio nulla.',
                ["hlasoval"] = 0,
                ["Ano"] = 10,
                ["Ne"] = 15,
            }
        }

    Thank for help.

  3. Yes but you have opened xml file in variable NODE and then you getting value id and name from varible subnode but you doenst opening xml and you dont have variable subnode

     

    //EDIT: Sorry i now see you have variable subnode.

  4. createMarker
    destroyElement
    setTimer

     

    You can make marker into variable and start timer when your timer maked then you can destroyelement on variable with marker then you create new marker.

  5. Hello, i have one problem but that doesn´t say anything errors / warnings. If i send mysql command to SQL Form in phpmyadmin then that give me values of i need and same values give into game but condition if tip == 1 then doens´t called can they help me ? (Variable tip = 1)

    function test(thePlayer, cmd)
    	local tip = 0
    	local plat = 0
    	local id = getElementData(thePlayer, "dbid")
    	local query = mysql:query('SELECT * FROM `PojistitVeh` WHERE `Enabled`=1 AND `Character`="'.. id ..'"')
    	while true do
    		local row = mysql:fetch_assoc(query)
    		if not row then return end
    		tip = row["Tip"]
    		outputDebugString(plat .. "|" .. tip)
    		if tip == 1 then plat = plat + 200 end
    		if tip == 2 then plat = plat + 500 end
    		if tip == 3 then plat = plat + 800 end
    		if tip == 4 then plat = plat + 1000 end
    		if tip == 5 then plat = plat + 1500 end
    	end
    end
    addCommandHandler("testvyplata", test, false, true)

    Thank for help.

×
×
  • Create New...