Jump to content

HunT

Retired Staff
  • Posts

    1,383
  • Joined

  • Last visited

Everything posted by HunT

  1. HunT

    [WIP] Mask Shop

    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
  2. HunT

    [WIP] Mask Shop

    Thank you guys, bit upgrade.
  3. HunT

    [WIP] Mask Shop

    Work In Progress Masks Confirmed : Power Rangers ( Threule help)
  4. HunT

    [WIP] DayZ

    Can i help you with models if you want. Can you find objects in web and i can convert for MTAsa. Skype : mtasa.hunt
  5. The user panel have triggerServerEvent or executeCommandHandler? Check and post the string.
  6. HunT

    Salve

    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
  7. Get the relative position with gui editor easy. Ex: sx*0.1 sy*0.1
  8. HunT

    Salve

    Per qualsiasi chiarimento sullo scripting puoi postare qui, oppure se hai skype mtasa.hunt
  9. 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
  10. HunT

    GUI Problem

    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)
  11. HunT

    GUI Problem

    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
  12. https://wiki.multitheftauto.com/wiki/BindKey https://wiki.multitheftauto.com/wiki/UnbindKey Depends on the project you need to make.
  13. 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
  14. You need use : https://wiki.multitheftauto.com/wiki/OnClientRender onColShapeHit And https://wiki.multitheftauto.com/wiki/RemoveEventHandler onColShapeLeave
  15. https://wiki.multitheftauto.com/index.ph ... ssiontimer Easy and Fast
  16. 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 )
  17. HunT

    [Help] Decompose

    Thank you really helpful.
  18. Hi guys. How can I Decompose a value from the gui edit? Example : i have the value in the gui edit 12345 but i need 1 2 3 4 5 text = guiGetText ( guiEdit ) -- get the text v1, v2, v3, v4, v5 = using the text ? -- the gui edit have max 5 Length Tnx
  19. I have solved but only with client events and trigger server. Probably the events onMarkerHit / onPlayerMarkerHit server side are bugged.
  20. With latest version of MTAsa 1.4.1 my local - the host server - and other 2 players no work.
  21. I used the examples in the wiki but the player is not recognized. What happens? Examples from the wiki. onMarkerHit : local myMarker = createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) -- create myMarker function MarkerHit( hitElement, matchingDimension ) -- define MarkerHit function for the handler local elementType = getElementType( hitElement ) -- get the hit element's type outputChatBox( elementType.." inside myMarker", getRootElement(), 255, 255, 0 ) -- attach the element's type with the text, and output it end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) -- attach onMarkerHit event to MarkerHit function onPlayerMarkerHit : function markerAlert(markerHit,matchingDimension) if (matchingDimension) then -- Make sure the player is in the same dimension as the marker (so they're actually going into it). outputChatBox("You have just entered a marker.",source,255,255,0) -- Output that they are. end end addEventHandler("onPlayerMarkerHit",getRootElement(),markerAlert) Before reply please try in local.
×
×
  • Create New...