-
Posts
749 -
Joined
-
Last visited
-
Days Won
1
Everything posted by FlyingSpoon
-
Well I have a little timer, like 10 Seconds, And when the 10 Seconds start, It adds in god mode, When 10 seconds stop, It removes god mode. My script is like this, function hundredtsixt() guiSetText ( oneMinute, "GodMode On!") setTimer ( hundredtsevt, 1000, 1) --- Starts the god mode end function hundredtsevt() guiSetText ( oneMinute, "GodMode Off!") setTimer ( hundredteht, 1000, 1) --- Stops GodMode end
-
Huh? But I dont want the onClientPlayerDamage to be on I want it to be off. You functions adds the client player damage.
-
So how do I add the event back in then? In my function two()
-
function one() guiSetText ( oneMinute, "Damage On") setTimer ( two, 1000, 1) addEventHandler ( 'onClientPlayerDamage', root, cancelEvent ); end function two() guiSetText ( oneMinute, "Damage Off") setTimer ( one, 1000, 1) setTimer ( removeEventHandler, 1000, 1, 'onClientPlayerDamage', root, cancelEvent ); end Bad argument @ 'removeEventHandler' [Expected function at argument 3, got nil]
-
function dontTryBug(element) if element == localPlayer then if ( guiGetVisible ( oneMinute ) ~= true ) then if source == injectMarker then addEventHandler ("onClientRender", root, dxMenu ) guiSetVisible ( injectBtn, true ) showCursor ( true ) addEventHandler ( "onClientPlayerDamage", root, function() cancelEvent() end) else if timeRem ~= "Time Remaining : 0 Seconds" then if source == injectMarker then showCursor ( false ) guiSetVisible ( injectBtn, false ) removeEventHandler ("onClientRender", root, dxMenu ) end end end end end end addEventHandler("onClientMarkerHit", getRootElement(), dontTryBug) See I added the cancel event, now I want to remove it !
-
How can I add the event back? addEventHandler ( "onClientPlayerDamage", root, function() cancelEvent() end) I know how to cancel but how can I add it back?
-
Help! GUI opening for everyone! function dontTryBug() if ( guiGetVisible ( oneMinute ) ~= true ) then if source == Marker[2] then guiSetVisible ( GUIEditor.window[1], true ) showCursor ( true ) else if timeRem ~= "1" then if source == Marker[2] then showCursor ( false ) destroyElement ( GUIEditor.window[1] ) end end end end end addEventHandler("onClientMarkerHit", getRootElement(), dontTryBug)
-
What about the 1 Minute label to show time remaining?
-
How can I create a 1 Minute Timer, with a label showing the time remaining, Because I dont want to make millions of labels counting down Someone please help
-
It's a bit too big the height of it when I move my cursor
-
Hi there, I am making DX, When I move my cursor over the text I want it to change colours, how can I do this? Can anyone provide me with this code so I can adjust my script and revise the code! dxDrawText("RaysMTA", 482, 330, 537, 344, tocolor(255, 255, 255, 255), 1.00, font)
-
APEX GameServers | Low-Cost, Low Ping, Anti-DDoS
FlyingSpoon replied to APEX Mark's topic in Hosting solutions
@Joanxz Hmm, I guess you were right. I had a ticket opened, the reason was I never even wanted my MTA Server to be a recurring payment, and it took out money from my PayPal Account, $5.00 altogether, and I was saving money for IRL Purposes, now I am $5.00 short took me time to save up. I even opened a ticket but no reply, but the good thing is that now PayPal has stopped recurring payment! No reply to the ticket since a week now, No refunds been taken place, and this money was taken out by mistake. Never buying another server from here again. I want my refund also, or I will be filing another PayPal Case against you, if not I will call them later on today! -
I think he said it dont work.
-
[2015-04-10 12:51:04] WARNING: 5: Bad argument @ 'getPlayerTeam' [Expected player at argument 1, got pickup] [2015-04-10 12:51:04] WARNING: Bad argument @ 'getTeamName' [Expected team at argument 1, got boolean]
-
He was saying that the getPlayerTeam function output's an error, I forgot the error Quote: @Robin... - bad argument
-
Well I need help to do that, Any specific function that I can use?
-
I did as you said : p, well as other's said haha, I had a few other resources that were as addEventHandler("onClientRender", root, [FuncName] ) and I changed root to resourceRoot simple Just needed some thought!
-
Front Minor - Remember The Name, I was using the clean version.
-
Grotti Cars (Carshop & Vehicle System) This was a very old script that I had made a while back, but sadly didn't finish. However, today I present to you the very first Development BETA of this Script. The GUI has been switched to Multi Theft Auto's Standard GUI System. However, I do plan on moving to a more advance Dx Library if it manages to reach a certain number of downloads/votes. The Script is written in plain Lua, and requires the 2 resources called 'cpicker' (Colour Picker) and 'notifications' for side-notifications that appear when toggling certain events for the vehicle. The Carshop was originally inspired from a Standard RPG Server, it includes a few features and gives the player to ability to a own a permanent car. The previous Grotti Carshop that was under development was basic, allowing you to purchase a vehicle without any standard vehicle adjustments. This however has been updated. Features • Gives you the ability to purchase a car. • Gives you the ability to set a colour of your choice. • Checks if you have the correct money amount and if you are logged in. • Generates a vehicle number plate for the car. • Allows you to toggle the engine with the command /engine - This is permanent and remains after a resource restart. • Allows you to toggle the handbrake with the command /handbrake - This is permanent and remains after a resource restart. • Allows you to park your vehicle with the command /park - This saves the location permanently and can be changed, if not parked it returns back to the carshop. Automatic Vehicle Theft Prevention • Basic feature that only lets the Owner of the Vehicle drive it, anyone else that attempts to enter as a Driver the event is cancelled. How can I install this resource? In order to install this resource, simply download it either from either the Direct Download or MTA Community's Download Link. Once download follow the steps below, 1) Download the resource. 2) Move all the contents and required resources into, MTA San Andreas (OR Your Server Directory) -> mods -> deathmatch -> resources (Place In Here) 3) Locate the mtaserver.conf that is within, MTA San Andreas (OR Your Server Directory) -> mods -> deathmatch -> mtaserver.conf 4) Add in the following lines, <resource src="cpicker" startup="1" protected="0" /> <resource src="grotticars" startup="1" protected="0" /> <resource src="notifications" startup="1" protected="0" /> Make sure the order is like above when starting the resources to prevent bugs. No special permissions are required for this resource. How can I modify this resource? In order to modify this resource locate to, vehicles.xml In here you'll find a basic XML Sheet that includes a few vehicles with their prices. Currently, you are only able to add in vehicles to the carshop as the rest of the carshop is currently compiled. To add a new vehicle all you have to do is add in this line, Example: <vehicle name="Blade" price="20000" /> The resource automatically generates the vehicle from it's name, so enter the name using Multi Theft Auto's Wikipedia. It is crucial the name is spelt correctly to prevent bugs; and enter a price that you'd wish for the player to pay in order to obtain this vehicle. You can find the correct vehicle names here, https://wiki.multitheftauto.com/wiki/Vehicle_IDs Download Resource & Components
-
I strongly suggest running then biggest server on a different machine.
-
Forgive me, I wont do that next time, I know it can help someone else, I forgot.
-
How?
-
Here's my whole code, addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) setCameraMatrix(-688, 930, 50, 1468.388671875, -918.42474365234, 99.881813049316) fadeCamera(true, 1) btnLogin = guiCreateButton(316, 469, 75, 31, "Login", false) btnRegister = guiCreateButton(662, 467, 75, 31, "Register", false) usrEdit = guiCreateEdit(436, 340, 169, 26, "", false) passEdit = guiCreateEdit(435, 394, 169, 26, "", false) guiEditSetMasked(passEdit, true) end ); function mainGUI() dxDrawLine(305 - 1, 288 - 1, 305 - 1, 506, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(744, 288 - 1, 305 - 1, 288 - 1, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(305 - 1, 506, 744, 506, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(744, 506, 744, 288 - 1, tocolor(255, 255, 255, 255), 1, false) dxDrawRectangle(305, 288, 439, 218, tocolor(0, 0, 0, 120), false) dxDrawText("Username", 488, 323, 551, 340, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Password", 488, 380, 551, 397, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, mainGUI) startX, startY = 400, 11; -- starting position endX, endY = 425, 165; -- ending position t = 1; -- time function startIt() local startTime = getTickCount ( ); local duration = t * 1000; render = function ( ) local elapsedTime = getTickCount ( ) - startTime; local progress = elapsedTime / duration; local x, y = interpolateBetween ( startX, startY, 0, endX, endY, 0, progress, "OutBounce" ); main = dxDrawImage ( x, y, 197, 105, "logo.png", 0, 0, 0, tocolor ( 255, 255, 255, 255 ), false ); end addEventHandler ( "onClientRender", root, render ); end addEventHandler ( "onClientResourceStart", resourceRoot, startIt) function resourceStart() setCamera() guiSetVisible(btnLogin, true) guiSetVisible(btnRegister, true) guiSetVisible(usrEdit, true) guiSetVisible(passEdit, true) end showCursor(true) addEventHandler("onClientResourceStart", root, resourceStart) function clientSubmitLogin(button, state) if source == btnLogin then if button == "left" and state == "up" then local username = guiGetText(usrEdit) local password = guiGetText(passEdit) if username and password then triggerServerEvent("submitLogin", getRootElement(), localPlayer, username, password) else outputChatBox("Please enter a Username and Password!", 255, 0, 0) end end end end addEventHandler("onClientGUIClick", root, clientSubmitLogin) function clientSubmitRegister(button, state) if source == btnRegister then if button == "left" and state == "up" then local username = guiGetText(usrEdit) local password = guiGetText(passEdit) if username and password then triggerServerEvent("submitRegister", getRootElement(), localPlayer, username, password) removeEventHandler ( "onClientRender", root, render ) else outputChatBox("Please enter a Username and Password!", 255, 0, 0) end end end end addEventHandler("onClientGUIClick", root, clientSubmitRegister) function hideLoginWindow() guiSetInputEnabled(false) showCursor(false) removeEventHandler ( "onClientResourceStart", root, startIt ) removeEventHandler ( "onClientRender", root, mainGUI ) removeEventHandler ( "onClientRender", root, render ) guiSetVisible(btnLogin, false) guiSetVisible(btnRegister, false) guiSetVisible(usrEdit, false) guiSetVisible(passEdit, false) end addEvent("hideLoginWindow", true) addEventHandler("hideLoginWindow", root, hideLoginWindow)