-
Posts
1,028 -
Joined
-
Last visited
-
Days Won
1
Everything posted by ..:D&G:..
-
When I start my house system, I get the error attept to index local 'houseOwner' (a nil value) -- Create houses function createHouse ( houseid, ownerid, interiorid, housex, housey, housez, housesale, houseprice, housename, houselocked, boughtprice, passwordlocked, housepassword ) if ( housesale == 0 ) then _G["house"..tostring(houseid)] = createPickup ( housex, housey, housez, 3, 1272, 0) else _G["house"..tostring(houseid)] = createPickup ( housex, housey, housez, 3, 1273, 0) end local house = _G["house"..tostring(houseid)] local houseOwner = exports.DENmysql:querySingle( "SELECT * FROM accounts WHERE id = ?", tonumber(ownerid) ) setElementData(house, "houseid", houseid) setElementData(house, "ownername", houseOwner.username) setElementData(house, "ownerid", tonumber(ownerid)) setElementData(house, "interiorid", tonumber(interiorid)) setElementData(house, "housesale", tonumber(housesale)) setElementData(house, "houseprice", tonumber(houseprice)) setElementData(house, "housename", housename) setElementData(house, "houselocked", tonumber(houselocked)) setElementData(house, "boughtprice", tonumber(boughtprice)) setElementData(house, "housepassword", tonumber(housepassword)) setElementData(house, "passwordlocked", tonumber(passwordlocked)) end This is the line: setElementData(house, "ownername", houseOwner.username)
-
Doesn't work Here is what I did in the other script that triggers the event function hideInterfaceComponents() triggerEvent("hideHud", getLocalPlayer()) loadSettings() saveLanguageInformation() end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), hideInterfaceComponents)
-
How do I trigger this event: addCommandHandler("showhud", function () if handler then removeEventHandler("onClientRender",root,renderHud) handler = false else addEventHandler("onClientRender",root,renderHud) handler = true end So its handler = false like ONLY AN EXAMPLE: triggerEvent("hideHud", getLocalPlayer()) Or do I need to make an event?
-
Lol, no... Let me try it
-
Hello, I am trying to make a gui to display the admin info, but I keep getting that error (from the title). addEvent("showAdminStats",true) addEventHandler("showAdminStats",getRootElement(), function( player ) local result = mysql:query( "SELECT username, admin, lastlogin, adminreports FROM accounts WHERE admin != 0 AND admin < 10 ORDER BY admin DESC, username ASC" ) if result then local t = { } while true do local row = mysql:fetch_assoc( result ) if row then table.insert(t, { row.username, tonumber(row.admin), row.adminreports, row.lastlogin }) else break end end mysql:free_result( result ) setElementData(player,"adminStats",t) end end) The error is at line 4
-
I think u are trying to do something like this : https://community.multitheftauto.com/index.php?p= ... ls&id=6919
-
Hey, someone told me about a Roleplay server called iG. I don't really know if the gamemode was leaked or the server is up, as the guy only told me that there is a roleplay server called iG. I really like to play on high quality roleplay server, so if anyone can tell me the full name, would be grate Even an IP will do.
-
Is there any way to put a resource and the acl without restarting the server? I can put the line in the ACL, but the change doesn't make in the server itself.
-
Is there any functions or an already made function to display the players in a team in a scoreboard default team. Like changing the column 'Gang' with a team like the one made in the play admin panel.
-
Question, why have u put 2 - in there? I know why the - is there, but why 2?
-
I want to make that rectable to it doesn't look big when people have small resolutions. So it changes shape acording to the resolution of the player.
-
Hey, I need some hep on the function getScreenSize. This seems to be a really helpfull function for me, but I need a bit more help. How do I use this function for this line? : dxDrawRectangle(52, 220, 329, 351, tocolor(1, 0, 0, 170), true) I know I have to do: local x, y = guiGetScreenSize() Now how do I implement the x and y on the position of the rectangle?
-
Hey, I recently downloaded some resources from community, but they don't work as all need the resource AC_message to export whatever function. exports["AC_message"]:outputTopBar Does anyone have this resource?
-
Well, to get skype suport I need to pay 0.50 a month, and the only (co-ceo (was)) I know and helped me, quit Sane-Hosting... Hope I don't have to pay something I tried to cancel before the payment had to be due
-
Whats the point of releasing a COMPILED GAMEMODE? A gamemode isn't a resource, just a small script... You really like to see 1000 of server looking the same? If the GM was decompiled, people could make changes and such, make servers with the GM but also a bit different... Anyway, cool gamemode.
-
I don't know what to say... 2 weeks ago I wanted to cancel my 2 servers from Sane-Hosting as I have no founds to pay (I'm poor LOL) and as their website is down... I keep getting emails that I have to pay, but I can't cancel the services, now I don't know what to do...!
-
Noticed that, thanks
-
Look, onPlayerLogin is useless, is not a login like the ones on play servers, or LIKE the default /login... So this won't really work, this login is only a window where you put some details and click a button to close the window and be able to play (something like that) Doesn't matter anyway, did it which what johny46 recommended me. Thanks.
-
I recently tried to help my friend with his vehicle description system that he made, he can set the descriptions for the vehicles, but when he restarts the server the descriptions are not showing anymore, and he also gets some erros: [2013-12-28 01:12:35] WARNING: vehdescription\s_vehicle_descriptions.lua:42: Bad argument @ 'getElementData' [Expected element at argument 1, got nil] [2013-12-28 01:12:35] ERROR: s_vehicle_descriptions.lua:45: attempt to index local 'descriptions' (a userdata value) This is what we have put to load the data from the database: function loadToDescription(descriptions, theVehicle) local dbid = getElementData(theVehicle, "dbid") local acceptedQuerys = { } for i = 1, 5 do local load = exports.mysql:query_free("SELECT * FROM vehicles WHERE description" .. i .. " = '" .. mysql:escape_string( descriptions[i] ) .. "' WHERE id = '".. mysql:escape_string(dbid) .."'") --local load = exports.mysql:query_free("SELECT * FROM vehicles WHERE description1= '" .. newvalue .. "' WHERE id = '".. exports.mysql:escape_string(dbid) .."'") if load then exports['anticheat-system']:loadProtectedElementDataEx(theVehicle, "description:"..i, descriptions[i], true) acceptedQuerys[i] = true end end local counter = 0 for j = 1, #acceptedQuerys do if acceptedQuerys[j] then counter = counter + 1 end end end addEventHandler ( "onResourceStart", getRootElement(), loadToDescription )
-
Ok, now how do I use triggerEvent to add and remove the event of the hud from the login script, do I need to make a function hudComponents for each remove and add events?
-
EDITED! Found another way but I don't know how to set the alpha or to disable the dx drawn parts...
-
I don't really know why you want to see a function with some dx lines... But anyway here is the code: function hudComponents ( ) munitie = getPedTotalAmmo ( getLocalPlayer() ) clip = getPedAmmoInClip ( getLocalPlayer() ) IDarma = getPedWeapon(getLocalPlayer()) arma = getWeaponNameFromID(IDarma) viata = getElementHealth (localPlayer) armura = getPedArmor (localPlayer) bani = getPlayerMoney(thePlayer) dxDrawRectangle(15, 240, 264, 78, tocolor(0, 0, 0, 209), false) dxDrawLine(15, 260, 278, 260, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(15, 279, 278, 279, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(15, 296, 278, 296, tocolor(255, 255, 255, 255), 1, false) dxDrawText("World Gaming Roleplay Hud", 14, 213, 277, 233, tocolor(255, 255, 255, 255), 0.90, "pricedown", "left", "top", false, false, true, false, false) dxDrawText("Bani: "..bani.." Lei",21.0,244.0,474.0,272.0,tocolor(0,255,0,255),0.5,"bankgothic","left","top",false,false,false) dxDrawText("Viata: "..tostring(math.floor(viata+0.5)).." %",20.0,264.0,296.0,280.0,tocolor(0,255,0,255),0.5,"bankgothic","left","top",false,false,false) dxDrawText("Armura: "..tostring(math.floor(armura+0.5)).." %",20.0,281.0,296.0,280.0,tocolor(0,255,0,255),0.5,"bankgothic","left","top",false,false,false) dxDrawText("Arma: "..arma.." | Munitie: "..clip.." / "..munitie,20.0,296.0,296.0,301.0,tocolor(0,255,0,255),0.5,"bankgothic","left","top",false,false,false) end addEventHandler("onClientRender",getRootElement(),hudComponents) addEventHandler("onClientPlayerSpawn",getRootElement(),)
-
[quote name=..&G:..] (function hud....) The function is called hud
-
Hey, I recently made a hud, and I want to hide it while the player is on the login screen. There is already a function to hide the default hud: function hideInterfaceComponents() --triggerEvent("hideHud", getLocalPlayer()) showPlayerHudComponent("weapon", false) showPlayerHudComponent("ammo", false) showPlayerHudComponent("vehicle_name", false) showPlayerHudComponent("money", false) showPlayerHudComponent("clock", false) showPlayerHudComponent("health", false) showPlayerHudComponent("armour", false) showPlayerHudComponent("breath", false) showPlayerHudComponent("area_name", false) showPlayerHudComponent("radar", false) --triggerEvent("hideHud", getLocalPlayer()) loadSettings() saveLanguageInformation() end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), hideInterfaceComponents) But I need to hide the hud using its function (function hud....) as I can't use showPlayerHudComponent
-
Is there any function which can get the player's armour for a client side script?