-
Posts
589 -
Joined
-
Last visited
Everything posted by mjau
-
Car mod: https://community.multitheftauto.com/ind ... ls&id=3537
-
Tnx btw all suggestions are welcome cuz i have problems getting ideas right now xP
-
when inganme testing it do /debugscript 3 and tell us the errors you get...
-
Tnx for the good ratings in community Updates will be made when im done with other jobs
-
What? Many spawns ? be more specific...
-
How do i make the table start on first line again when table is finished ? i wanna make i mean im making a train system wich you drive around SA as many times you want how to do this ? i know how to create the trains money and that shit i just need help getting the table values in order and startinng on first value again whem im done with all
-
You guessed allmost right it is a train delivery system anyway Tnx
-
https://wiki.multitheftauto.com/wiki/AttachElements Just attach the sound to a vehicle sound = playSound3D blah blah blah vehicle = createVehicle(blah blah blah) attachElements(sound, vehicle)
-
function createGUI() showCursor(true) setCameraMatrix(1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) toggleAllControls(true, thePlayer, true, true) GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} rgbtn = guiCreateButton(386,360,99,20,"Inregistreaza-te",false) lgbtn = guiCreateButton(494,360,99,20,"Logheaza-te",false) un = guiCreateLabel(375,294,88,21,"Username: ",false) ps = guiCreateLabel(377,322,88,21,"Password: ",false) whatsnew = guiCreateLabel(374,405,202,19,"Ce e nou?",false) guiLabelSetHorizontalAlign(whatsnew,"center",false) thenewstuff = guiCreateLabel(384,434,191,18,"- Sistem de login/register terminat",false) uned = guiCreateEdit(443,294,103,20,"",false) psed = guiCreateEdit(443,321,103,20,"",false) upstuff = guiCreateGridList(0,0,1015,176,false) guiGridListSetSelectionMode(upstuff,2) guiSetAlpha(upstuff,0.34999999403954) downstuff = guiCreateGridList(0,592,1015,176,false) guiGridListSetSelectionMode(downstuff,2) guiSetAlpha(downstuff,0.5) addEventHandler("onClientGUIClick", rgbtn, onRegister, false) addEventHandler("onClientGUIClick", lgbtn, onLogin, false) end -- Direct X Drawing addEventHandler("onClientRender",root, function() text = dxDrawText("RDK Freeroam",277.0,162.0,411.0,219.0,tocolor(255,255,255,255),3.0,"diploma","left","top",false,false,false) end ) addEventHandler("onClientResourceStart", resourceRoot, createGUI) function onLogin() local untxt = guiGetText(uned) local pstxt = guiGetText(psed) triggerServerEvent("login", root, untxt, pstxt) end function onRegister() local untxt = guiGetText(uned) local pstxt = guiGetText(psed) triggerServerEvent("register", root, untxt, pstxt) end function logged(thePlayer) guiSetVisible(rgbtn, false) guiSetVisible(lgbtn, false) guiSetVisible(un, false) guiSetVisible(ps, false) guiSetVisible(uned, false) guiSetVisible(psed, false) guiSetVisible(upstuff, false) guiSetVisible(downstuff, false) guiSetVisible(whatsnew, false) guiSetVisible(thenewstuff, false) toggleAllControls(false, thePlayer, false, false) end addEvent("loggedin", true) addEventHandler("loggedin", root, logged) Try this
-
If i have a table stopTable{ [1]={1812.65198, -1889.86047, 13.41406}, [2]={1825.22791, -1635.03711, 13.38281}, [3]={1855.01685, -1430.47449, 13.39063}, [4]={1732.81580, -1296.87122, 13.44294}, [5]={1473.19226, -1295.77124, 13.48315}, [6]={1443.60376, -1498.26660, 13.37650}, [7]={1426.37280, -1716.12439, 13.38281}, [8]={1315.06909, -1656.43799, 13.38281}, [9]={1359.06250, -1432.39734, 13.38281}, [10]={1169.82983, -1392.34473, 13.41728}, [11]={930.76508, -1392.92627, 13.26561}, [12]={815.24756, -1317.91345, 13.44460}, [13]={585.04199, -1320.53748, 13.40609}, [14]={526.99365, -1624.20361, 16.63225},} I am creating markers on theese cordinates but i want the next marker to be created when i hit the first one like when i hit the first one in the list then the second shows up and the first goes away And this creates the first marker again when i finsihed the table and goes like this Now how to do this ?
-
function createLoginWindow() local X = 0.375 local Y = 0.385 local Width = 0.25 local Height = 0.25 wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true) -- define new X and Y positions for the first label X = 0.0825 Y = 0.2 -- define new Width and Height values for the first label Width = 0.25 Height = 0.25 -- create the first label, note the final argument passed is 'wdwLogin' meaning the window -- we created above is the parent of this label (so all the position and size values are now relative to the position of that window) guiCreateLabel(X, Y, Width, Height, "Username", true, wdwLogin) -- alter the Y value, so the second label is slightly below the first Y = 0.5 guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin) X = 0.415 Y = 0.2 Width = 0.5 Height = 0.15 edtUser = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) Y = 0.5 edtPass = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) -- set the maximum character length for the username and password fields to 50 guiEditSetMaxLength(edtUser, 50) guiEditSetMaxLength(edtPass, 50) X = 0.415 Y = 0.71 Width = 0.25 Height = 0.2 btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, wdwLogin) addEventHandler("onClientGUIClick", btnLogin, clientSubmitLogin, false) -- make the window invisible guiSetVisible(wdwLogin, false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () -- create the log in window and its components createLoginWindow() -- output a brief welcome message to the player outputChatBox("Welcome to My MTA:SA Server, please log in.") -- if the GUI was successfully created, then show the GUI to the player if (wdwLogin ~= nil) then guiSetVisible(wdwLogin, true) else -- if the GUI hasnt been properly created, tell the player outputChatBox("An unexpected error has occurred and the log in GUI has not been created.") end -- enable the players cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) end) -- create the function and define the 'button' and 'state' parameters -- (these are passed automatically by onClientGUIClick) function clientSubmitLogin(button,state) if button == "left" and state == "up" then -- get the text entered in the 'username' field local username = guiGetText(edtUser) -- get the text entered in the 'password' field local password = guiGetText(edtPass) -- if the username and password both exist if username and password then -- trigger the server event 'submitLogin' and pass the username and password to it triggerServerEvent("submitLogin", getRootElement(), username, password) -- hide the gui, hide the cursor and return control to the player guiSetInputEnabled(false) guiSetVisible(wdwLogin, false) showCursor(false) else -- otherwise, output a message to the player, do not trigger the server -- and do not hide the gui outputChatBox("Please enter a username and password.") end end end
-
Good luck and yeh we really dont know what's in the basemode by mate_
-
You forgot to close the event handler at line 42 with an ) at line 62 function createLoginWindow() local X = 0.375 local Y = 0.385 local Width = 0.25 local Height = 0.25 wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true) -- define new X and Y positions for the first label X = 0.0825 Y = 0.2 -- define new Width and Height values for the first label Width = 0.25 Height = 0.25 -- create the first label, note the final argument passed is 'wdwLogin' meaning the window -- we created above is the parent of this label (so all the position and size values are now relative to the position of that window) guiCreateLabel(X, Y, Width, Height, "Username", true, wdwLogin) -- alter the Y value, so the second label is slightly below the first Y = 0.5 guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin) X = 0.415 Y = 0.2 Width = 0.5 Height = 0.15 edtUser = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) Y = 0.5 edtPass = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) -- set the maximum character length for the username and password fields to 50 guiEditSetMaxLength(edtUser, 50) guiEditSetMaxLength(edtPass, 50) X = 0.415 Y = 0.71 Width = 0.25 Height = 0.2 btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, wdwLogin) -- make the window invisible guiSetVisible(wdwLogin, false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () -- create the log in window and its components createLoginWindow() -- output a brief welcome message to the player outputChatBox("Welcome to My MTA:SA Server, please log in.") -- if the GUI was successfully created, then show the GUI to the player if (wdwLogin ~= nil) then guiSetVisible(wdwLogin, true) else -- if the GUI hasnt been properly created, tell the player outputChatBox("An unexpected error has occurred and the log in GUI has not been created.") end -- enable the players cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) end) -- attach the event onClientGUIClick to btnLogin and set it to trigger the 'clientSubmitLogin' function addEventHandler("onClientGUIClick", btnLogin, clientSubmitLogin, false) -- create the function and define the 'button' and 'state' parameters -- (these are passed automatically by onClientGUIClick) function clientSubmitLogin(button,state) if button == "left" and state == "up" then -- get the text entered in the 'username' field local username = guiGetText(edtUser) -- get the text entered in the 'password' field local password = guiGetText(edtPass) -- if the username and password both exist if username and password then -- trigger the server event 'submitLogin' and pass the username and password to it triggerServerEvent("submitLogin", getRootElement(), username, password) -- hide the gui, hide the cursor and return control to the player guiSetInputEnabled(false) guiSetVisible(wdwLogin, false) showCursor(false) else -- otherwise, output a message to the player, do not trigger the server -- and do not hide the gui outputChatBox("Please enter a username and password.") end end end
-
https://wiki.multitheftauto.com/wiki/Key_names bind mousewheel up and down to a function to detect it
-
Well good idea because i hate searching trough all the objects to find one
-
What ? You burned your graphic card ? how did you do that ?
-
Do this instead files shouldnt have any type defined... Edit: Look at this ... https://wiki.multitheftauto.com/wiki/Meta.xml
-
lolol there is no function named guisetscreensize and why the heck would i need it here ?
-
lolz ok anyway the point was just people will most likely not do a RPG gamemode for free i dont wanna argue...
-
Hello today i was making a DX text for a script but when i tried making it fitting to every resoulotion it didnt do any difference And i can see i did it right since it still shows at the right place in 1024 x 768 wich i calculated it from But when i change resoulorion it moves .. DX code function DX() local sWidth,sHeight = guiGetScreenSize() DXText = dxDrawText(timeleft,sWidth-228,sHeight-597,sWidth-72,sHeight-545,tocolor(0,0,255,255),3.0,"default","left","top",false,false,false) end BTW the eventhandler is in a other part of the script no need for that
-
Well a fully functional spawnmenu with XML support and all that shit will be more... But really ben is your caps lock key broken or something tought u were mad lolz
-
? Lol u mad at me or something ?
-
Well the thing is a RPG gamemode isnt a simple script. That is because only a good enough spawnmenu is like 2000 lines anyway good luck ...