-
Posts
1,390 -
Joined
-
Last visited
-
Days Won
1
Everything posted by HunT
-
Nice Job I tried to use createBrowser with engineApplyShaderToWorldTexture and work fine.
-
Why you no reply my old question? Anyway is a executeCommandHandler. Add this function down on racevoting_server.lua addCommandHandler('buymap', function( player, command, ... ) local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputRace( 'Next map is not set', player ) end return end local map, errormsg = findMap( query ) if not map then outputRace( errormsg, player ) return end if g_ForcedNextMap == map then outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) return end g_ForcedNextMap = map outputChatBox('' .. getPlayerName( player )..' Buy Next map ' .. getMapName( g_ForcedNextMap ) .. '', g_Root, 255, 200, 0) end )
-
All what you need is local Target = false function YourFunction() if (not Target) then return end local sX, sY, wX, wY, wZ = getCursorPosition() local oX, oY, oZ = getCameraMatrix() local hit, hitX, hitY, hitZ, hitEl = processLineOfSight(oX, oY, oZ, wX, wY, wZ) if (hit and hitEl and isElement(hitEl)) then if (getElementType(hitEl) == "object") then -- You code here elseif (getElementType(hitEl) == "ped") then -- You code here end end end addEventHandler("onClientRender", root, YourFunction) Mhh now i cant try Tnx
-
i have find that in the editor_gui/client/guiGetMouseOverElement.lua --GUI's onClientMouseMove is flawed in the fact that it does not trigger when you move your mouse without a gui element on top --this script works around that for the highlighter when the mouse is not on top of gui --it also provides a guiGetMouseOverElement to retrieve the current mouse over element. local worldDetector function createWorldDetector() worldDetector = guiCreateProgressBar ( 0,0,1,1,true ) guiSetAlpha ( worldDetector, 0 ) guiMoveToBack( worldDetector ) addEventHandler ( "onClientGUIWorldClick",worldDetector,function() if source == worldDetector or source == getRootElement() then guiMoveToBack(worldDetector) end end ) end local mouseOverElement = false addEventHandler ( "onClientMouseMove", getRootElement(), function ( cursorX, cursorY ) if not isGUICreated then return end if source == worldDetector then hideHighlighter() mouseOverElement = false else showHighlighter(source) mouseOverElement = source end end ) function guiGetMouseOverElement() return mouseOverElement end Only the PRO scripter can make the useful function mouse enter/leave like in map editor.
-
Again here about that MTAsa really need the events onMouseEnter and onMouseLeave like onClientClick. I need start the function if the cursor enter in the world objects. Any solution? Tnx
-
Upgrade Power Rangers ( Threule help)
-
Nice Before start the project i have find in the community similar project but with 0 found, this is the motive. If you want i can stop the project because i release open source. This is not "stolen" idea because i dont know you mask system in you server. Edit: anyway you project replace the cj clothes maybe. My project dont replace the clothes.
-
Sure, i have find power rangers. About the "script" i have some ideas, classic shop magazine like ammunation or slot machine (random mask). Client side : Preview scene with you skin Select the mask Move the mask Rotate the mask Resize the mask Accept Server side: Set the mask
-
Work In Progress Masks Confirmed : Power Rangers ( Threule help)
-
Can i help you with models if you want. Can you find objects in web and i can convert for MTAsa. Skype : mtasa.hunt
-
The user panel have triggerServerEvent or executeCommandHandler? Check and post the string.
-
Se il lua non riesci a capirlo puoi aprire un server samp come hanno fatto gli "scripters" di TheItalianFlop. Usando ovviamente una gamemode non fatta da loro. Che figura di merda hahaha
-
Get the relative position with gui editor easy. Ex: sx*0.1 sy*0.1
-
Per qualsiasi chiarimento sullo scripting puoi postare qui, oppure se hai skype mtasa.hunt
-
Bank System 1) The player need make the account bank for use the atm's and bank. 2) The system have 2 ATM types MasterCard and Visa. 3) The player need select the card and the segret code. 4) If the player have the Visa Card can't use the atm Mastercard and vice versa. 5) If u forget the code u can get the code with 100$ If u want this bank system (free) PM me (on steam it's better) with : Language Text and Voice (Now is italian) Bank Location (Now is only in Los Santos) ATM Location ( Now 3 Visa and 3 MasterCard on Los Santos) Status 90% (need edit the "interior" bank and other) Credits : R3mp - Gui Editor https://community.multitheftauto.com/in ... ils&id=141 HasoN - ConvertTextToSpeech https://wiki.multitheftauto.com/wiki/Co ... xtToSpeech Sorry for the quality video because i have bad setting in sony vegas
-
Dimos7 please can you stop reply in scripting section if u can't help the members? ------------------------------------------------------------------------------------------------ Client : GUIEditor = { button = {}, window = {}, edit = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(315, 125, 763, 472, "Stock Market", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(10, 28, 202, 32, "LCN Exchange", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.label[2] = guiCreateLabel(11, 66, 134, 21, "Company Names", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") GUIEditor.label[3] = guiCreateLabel(155, 66, 109, 17, "Information", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.label[4] = guiCreateLabel(11, 87, 57, 20, "Binco", false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(157, 88, 543, 21, "Sells various clothes to the people of San Andreas. Progress Rate: 10.11, Loss Rate: 5.43", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(9, 400, 93, 40, "Invest For Binco", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(19, 444, 73, 18, "", false, GUIEditor.window[1]) GUIEditor.label[6] = guiCreateLabel(10, 109, 94, 19, "AuguryInsurance", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(156, 109, 544, 19, "Life Insurance company. Progress Rate 60.2, Loss Rate: 40.7", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(112, 400, 106, 40, "Invest For AuguryInsurance", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(126, 444, 82, 18, "", false, GUIEditor.window[1]) GUIEditor.label[8] = guiCreateLabel(10, 130, 96, 15, "AirEmu", false, GUIEditor.window[1]) GUIEditor.label[9] = guiCreateLabel(155, 130, 545, 18, "Makes cargo and passenger planes. Progress Rate: 11.7, Loss Rate: 5.64", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(228, 400, 110, 40, "Invest For AirEmu", false, GUIEditor.window[1]) GUIEditor.edit[3] = guiCreateEdit(244, 444, 84, 19, "", false, GUIEditor.window[1]) GUIEditor.label[10] = guiCreateLabel(11, 153, 93, 15, "FlyUS", false, GUIEditor.window[1]) GUIEditor.label[11] = guiCreateLabel(154, 153, 546, 15, "Makes cargo and passenger planes. Progress Rate: 17.2, Loss Rate: 10.29", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(348, 400, 104, 40, "Invest For FlyUS", false, GUIEditor.window[1]) GUIEditor.edit[4] = guiCreateEdit(358, 444, 84, 19, "", false, GUIEditor.window[1]) GUIEditor.label[12] = guiCreateLabel(10, 175, 112, 15, "Los Santos Customs", false, GUIEditor.window[1]) GUIEditor.label[13] = guiCreateLabel(154, 175, 547, 18, "Tuning shops all over Los Santos. Progress Rate: 2.76, Loss Rate: 8.90", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(461, 402, 103, 38, "Invest For Los Santos Customs", false, GUIEditor.window[1]) GUIEditor.edit[5] = guiCreateEdit(471, 444, 83, 19, "", false, GUIEditor.window[1]) GUIEditor.label[14] = guiCreateLabel(573, 406, 176, 28, "Liberty City National", false, GUIEditor.window[1]) local font0_ChineseText = guiCreateFont(":guieditor/fonts/ChineseText.ttf", 16) guiSetFont(GUIEditor.label[14], font0_ChineseText) guiLabelSetColor(GUIEditor.label[14], 0, 159, 3) GUIEditor.label[15] = guiCreateLabel(621, 430, 79, 29, "Exchange", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[15], font0_ChineseText) guiLabelSetColor(GUIEditor.label[15], 0, 159, 3) GUIEditor.button[6] = guiCreateButton(710, 26,38, 28, "X", false, GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1], false) end ) function closeGui() if (source == GUIEditor.button[6]) then guiSetVisible(GUIEditor.window[1], false) removeEventHandler( "onClientRender", root, dxRectangle ) -- Hide dx elements end if (source == GUIEditor.button[1]) then local ammount = guiGetText(GUIEditor.edit[1]) local money = getPlayerMoney(localPlayer) if (money > 99) then triggerServerEvent ( "takeMoneyPlayer", getLocalPlayer(),ammount) else return outputChatBox("You must invest more than $100 or you don't have enough money!", 255, 0, 0) end end if (source == GUIEditor.button[2]) then local ammount = guiGetText(GUIEditor.edit[2]) local money = getPlayerMoney(localPlayer) if (money > 99) then triggerServerEvent ( "takeMoneyPlayer", getLocalPlayer(),ammount) end end if (source == GUIEditor.button[3]) then local cammount = guiGetText(GUIEditor.edit[3]) local money = getPlayerMoney(localPlayer) if (money > 99) then triggerServerEvent ( "takeMoneyPlayer", getLocalPlayer(),ammount) end end if (source == GUIEditor.button[4]) then local ammount = guiGetText(GUIEditor.edit[4]) local money = getPlayerMoney(localPlayer) if (money > 99) then triggerServerEvent ( "takeMoneyPlayer", getLocalPlayer(),ammount) end end if (source == GUIEditor.button[5]) then local ammount = guiGetText(GUIEditor.edit[5]) local money = getPlayerMoney(localPlayer) if (money > 99) then triggerServerEvent ( "takeMoneyPlayer", getLocalPlayer(),ammount) end end end addEventHandler("onClientGUIClick", getRootElement(), closeGui) function dxRectangle() dxDrawRectangle(323, 186, 746, 333, tocolor(0, 0, 0, 255), false) dxDrawLine(467, 188, 467, 517, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 208, 1067, 208, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(323, 230, 1068, 231, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 252, 1066, 252, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 274, 1067, 274, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 296, 1066, 297, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(321, 317, 1064, 317, tocolor(255, 255, 255, 255), 1, false) end addCommandHandler("stockexchange", function () if ( guiGetVisible ( GUIEditor.window[1]) == false )then addEventHandler("onClientRender", root, dxRectangle) -- Show dx elements guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end ) Server : addEvent("takeMoneyPlayer",true) function takeMoneyPlayer (ammount) if not (tonumber(ammount) <= 0) then player = source takePlayerMoney(player, ammount) end end addEventHandler("takeMoneyPlayer", getRootElement(), takeMoneyPlayer)
-
Some problems inside. 1) What about the position window? you have not use the guiGetScreenSize() 2) https://wiki.multitheftauto.com/wiki/TakePlayerMoney 3) About Dx u need : https://wiki.multitheftauto.com/wiki/OnClientRender https://wiki.multitheftauto.com/wiki/RemoveEventHandler
-
https://wiki.multitheftauto.com/wiki/BindKey https://wiki.multitheftauto.com/wiki/UnbindKey Depends on the project you need to make.
-
Server : local radararea = createRadarArea(1338.5789794922, -1753.3083496094, 200, 200, 255, 0, 0) local col = createColRectangle(1338.5789794922, -1753.3083496094, 100, 200) function sa() setElementAlpha(radararea, 100) end addEventHandler("onResourceStart", root, sa) function areaEnter(thePlayer, matchingDimension) if (getElementType(thePlayer) == "player") then setRadarAreaFlashing(radararea, true) triggerClientEvent(thePlayer, "colHit", thePlayer) end end addEventHandler("onColShapeHit", getRootElement(), areaEnter) function areaExit(thePlayer, matchingDimension) if (getElementType(thePlayer) == "player") then if isPedDead(thePlayer) ~= true then setRadarAreaFlashing(radararea, false) triggerClientEvent(thePlayer, "colLeave", thePlayer) end end end addEventHandler("onColShapeLeave", getRootElement(), areaExit) Client : function drawText () dxDrawText("You have entered the red zone. A hidden package (Gunbox) can be found here.", 378, 594, 1055, 680, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, false, false) end addEvent("colHit", true) addEventHandler("colHit", root, function() addEventHandler("onClientRender", root, drawText) end ) addEvent("colLeave", true) addEventHandler("colLeave", root, function() removeEventHandler( "onClientRender", root, drawText ) end ) Probably u need edit the size of createColRectangle
-
You need use : https://wiki.multitheftauto.com/wiki/OnClientRender onColShapeHit And https://wiki.multitheftauto.com/wiki/RemoveEventHandler onColShapeLeave
-
https://wiki.multitheftauto.com/index.ph ... ssiontimer Easy and Fast
-
Client : local root = getRootElement() local this = getThisResource() local resourceRoot = getResourceRootElement(this) local localPlayer = getLocalPlayer() local Marker = {} GUIEditor = { button = {}, window = {}, label = {} } -- Resource Start addEventHandler("onClientResourceStart", resourceRoot, function() createObject(1271, 201.85633850098, 1858.2962646484, 12.50, 0, 0, 0, false) Marker[1] = createMarker(202.94039916992, 1858.2836914063, 12.25,"cylinder", 1, 255, 255, 255) GUIEditor.window[1] = guiCreateWindow(567, 296, 151, 181, "Pickup Menu", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(17, 32, 77, 15, "Weapon: M4", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.label[2] = guiCreateLabel(16, 55, 113, 15, "Ammo: 1000 bullets", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") GUIEditor.button[1] = guiCreateButton(15, 81, 114, 34, "Pick Up", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(17, 127, 112, 32, "Close Menu", false, GUIEditor.window[1]) guiSetVisible (GUIEditor.window[1],false) end ) -- Marker Hit addEventHandler("onClientMarkerHit", root, function(player, matchingDimension) if not matchingDimension then return end if player == localPlayer then if source == Marker[1] then guiSetVisible (GUIEditor.window[1],true) showCursor(true) end end end ) -- Gui Click function onGuiClick () if (source == GUIEditor.button[2]) then -- Close Button guiSetVisible (GUIEditor.window[1],false) showCursor ( false ) elseif (source == GUIEditor.button[1]) then -- Pick Up Button -- Here -- like triggerServerEvent ( "eventName", getLocalPlayer()) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) -- Command Close function closeWindow () if ( guiGetVisible ( GUIEditor.window[1]) == true )then guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) end end addCommandHandler ( "close", closeWindow )
-
I hope you're kidding?