
xXMADEXx
Members-
Posts
2,718 -
Joined
-
Last visited
Everything posted by xXMADEXx
-
It is returning an element.. function create3DText ( str, pos, color, parent, settings ) if str and pos and color then local text = createElement ( '3DText' ) local settings = settings or { } setElementData ( text, "text", str ) setElementData ( text, "position", pos ) setElementData ( text, "color", color ) if ( not parent ) then parent = nil else if ( isElement ( parent ) ) then parent = parent else parent = nil end end setElementData ( text, "Settings", settings ) setElementData ( text, "parentElement", parent ) return text end return false end For some reason, it's only not deleting in the onPlayerUnmute event, but the rest work fine..
-
K, i changed it to this, but it still does the same thing: addEventHandler ( 'onPlayerUnmute', root, function ( ) if ( isElement ( playerTag[source] ) ) then destroyElement ( playerTag[source] ) playerTag[source] = nil end end )
-
Looks like Woovie almost got wet from that jeep in the puddle ._.
-
Hello everbody. So, i've got this problem. When I use isElement, it returns true but when I use destroyElement it does absolutly nothing. local playerTag = { } addEventHandler ( "onPlayerMute", root, function ( ) if ( isElement ( playerTag[source] ) ) then destroyElement ( playerTag[source] ) end playerTag[source] = exports['NGJobs']:create3DText ( "[MUTED]", { 0, 0, 0 }, { 255, 0, 0 }, source, { 5 } ) end ) addEventHandler ( 'onPlayerUnmute', root, function ( ) if ( isElement ( playerTag[source] ) ) then destroyElement ( playerTag[source] ) end end ) addEventHandler ( "onPlayerQuit", root, function ( ) if ( isElement ( playerTag[source] ) ) then destroyElement ( playerTag[source] ) end end ) addEventHandler ( "onResourceStop", resourceRoot, function ( ) for i, v in pairs ( playerTag ) do if ( isElement ( v ) ) then destroyElement ( v ) end end end ) addEventHandler ( "onResourceStart", resourceRoot, function ( ) for i, v in ipairs ( getElementsByType ( 'player' ) ) do if ( isPlayerMuted ( v ) ) then playerTag[v] = exports['NGJobs']:create3DText ( "[MUTED]", { 0, 0, 0 }, { 255, 0, 0 }, source, { 5 } ) end end end ) It is only doing it for the "onPlayerUnmuted" event, the rest work fine, this has be absolutely confused... (Note: "exports['NGJobs']:create3DText " returns an element)
-
I'm not sure if there's a function to respawn a vehicle to it originally was, i haven't really checked for it. Although, if there isn't you can just store the original coordinates in setElementData, then once an hour loop threw the vehicles and use getElementData and setElementPosition to put them where they originally were.
-
You need to set a timer of 1 hour to loop threw all of the vehicles and respawn them with respawnVehicle.
-
You'd be lucky to find someone who would make an entire but gamemode, but multi-gamemode..? Crazy.
-
onPlayerLogin is a server event, you need to use onClientResourceStart. If you want it to open when the panel opens, you need to use onPlayerLogin @ server side, then use triggerClientEvent.
-
Great idea BUT i don't have any idea how to connect a Lua with an XML File. (exept of Meta) A table would work just as good.
-
These functions should get it done. getPlayerIdleTime triggerClientEvent addEvent addEventHandler dxDrawText
-
use this code, your time variables were global and never updated. --Values GUIEditor = {} local rRoot = resourceRoot local doRender = false function drawUserpanel() GUIEditor.sidebar = guiCreateStaticImage(0.84, 0.00, 0.16, 1.00, "img/sidebar.png", true) GUIEditor.clockHoursLabel = guiCreateLabel(0.00, 0.00, 0.797, 0.12, "Hours", true, GUIEditor.sidebar) GUIEditor.clockMinutesLabel = guiCreateLabel(0.00, 0.00, 1.197, 0.12, "Minutes", true, GUIEditor.sidebar) GUIEditor.dateLabel = guiCreateLabel(0.08, 0.09, 0.89, 0.03, "monthday.month.year", true, GUIEditor.sidebar) doRender = true addEventHandler ( "onClientRender", root, executeRender ) end addEventHandler("onClientResourceStart", rRoot,drawUserpanel) function executeRender ( ) if ( doRender ) then local time = getRealTime() local hours = time.hour local minutes = time.minute local monthday = time.monthday local month = time.month local year = time.year guiSetText ( GUIEditor.clockHoursLabel, hours..":" ) guiSetText ( GUIEditor.clockMinutesLabel, minutes..":" ) guiSetText ( GUIEditor.dateLabel, table.concat ( { monthday, month, year }, "." ) ) else removeEventHandler ( 'onClientRender', root, executeRender ) end end
-
I'd recommend posting pictures or videos of scripts you've done in the past.
-
It's possible to get binds of course, but not set them to the client's settings. You can only set them for inside your server with bindKey.
-
You can just do: Right click -> New -> Short cut in the address bar you get, just type "mtasa://serverIP:serverPort" boom, same thing.
-
No, you cannot, as far as I know.
-
The width/height are part of the arguments for dxDrawImage & guiCreateStaticImage
-
Best way to save it would be to use an SQLite Databse. functions: -- Database Functions -- dbConnect dbQuery dbExec dbPoll -- Vehicles -- getElementPosition getElementModel getVehicleColor getVehicleUpgrades
-
http://revolution-scripts.com/?page=scr ... n=download
-
IT means that there is a "=" that isn't suppose to be there.
-
These: showChat showPlayerHudComponent