Jump to content

Jaysds1

Members
  • Posts

    4,961
  • Joined

  • Last visited

Everything posted by Jaysds1

  1. Think of it like this, you can't stop them either way. Bot's are created by other people, so either way the spam will continue...
  2. Jaysds1

    helppp!!!

    Actually, when you think about it, if multiple of players are in a hunter and it's synchronizing through the server with every other player, then you would need to added a table for a player so the resource could hold other players miniguns throughout the server. This is the only way to sync the minigun through every player on the server. Anyways, @WASSIm. , Try not to start/restart the resource when you're in the helicopter.
  3. Jaysds1

    helppp!!!

    Can you please post any errors that comes up after we tell you try something, because we don't automatically know what's wrong with the script. Anyways, For what I know, the function setWeaponState doesn't work, or the weapon doesn't fire. This is what I got for you: Server: addEventHandler ("onVehicleEnter", root,function(player,seat) triggerClientEvent("onEnter",source,player,seat) end) addEventHandler("onVehicleStartExit", root,function(player,seat) triggerClientEvent("onExit",source,player,seat) end) Client: local miniguns = {} local shootKey function move(source) local MiniSound = playSound3D("test.wav", x, y, z,false) setSoundMaxDistance(MiniSound, 140) setSoundEffectEnabled(MiniSound,"gargle",true) attachElements ( MiniSound, getPedOccupiedVehicle(source), 0, 0.5, -1.1, 0, 0, 90 ) end function fire() if getKeyState(shootKey)then if not getElementData(localPlayer,"minigunStatus")then setElementData(localPlayer,"minigunStatus",true) end else if getElementData(localPlayer,"minigunStatus")then setElementData(localPlayer,"minigunStatus",false) end end end for key,_ in pairs(getBoundKeys("vehicle_fire"))do shootKey = key break end addEvent( "onEnter", true ) addEventHandler( "onEnter",root,function(thePlayer, seat) if seat ~= 0 and getElementModel(source) ~= 425 then return end miniguns[thePlayer] = {} local x, y, z = getElementPosition ( source ) miniguns[thePlayer][1] = createWeapon ( "minigun", x, y, z ) miniguns[thePlayer][2] = createWeapon ( "minigun", x, y, z ) miniguns[thePlayer][3] = createWeapon ( "minigun", x, y, z ) miniguns[thePlayer][4] = createWeapon ( "minigun", x, y, z ) for _,minigun in ipairs(miniguns[thePlayer])do --setWeaponOwner(minigun, thePlayer) for some reason this doesn't work! setElementAlpha ( minigun,255) end attachElements ( miniguns[thePlayer][1], source, 2.15, 0.5, -1.2, 70, 20, 100 ) attachElements ( miniguns[thePlayer][2], source, -2.10, 0.5, -1.2, 70, 20, 100 ) attachElements ( miniguns[thePlayer][3], source, 2.57, 0.5, -1.1, 70, 20, 100 ) attachElements ( miniguns[thePlayer][4], source, -2.52, 0.5, -1.1, 70, 20, 100 ) if thePlayer~=localPlayer then return end addEventHandler("onClientRender",root,fire) toggleControl ( "vehicle_fire", false ) toggleControl ( "vehicle_secondary_fire", false ) end) addEvent( "onExit", true ) addEventHandler( "onExit",root,function(thePlayer, seat) if seat ~= 0 and getElementModel(source) ~= 425 then return end for _,minigun in ipairs(miniguns[thePlayer])do destroyElement (minigun) end miniguns[thePlayer] = nil if thePlayer~=localPlayer then return end removeEventHandler("onClientRender",root,fire) toggleControl ( "vehicle_fire", false ) toggleControl ( "vehicle_secondary_fire", false ) end) addEventHandler("onClientElementDataChange",root,function(name) if name~="minigunStatus"then return end if not isPedInVehicle(source)then return end local state = getElementData(source,name) if state and state==true then for _,minigun in ipairs(miniguns[source])do setWeaponState(minigun,"firing") end else for _,minigun in ipairs(miniguns[source])do setWeaponState(minigun,"ready") end end end)
  4. Jaysds1

    helppp!!!

    Thanks, I never noticed^ WASSIm. Please copy my last code again and try again.
  5. Can you download and run this MTADiag then post the generated Pastebin URL here pls
  6. Rar files aren't supported, so extract it
  7. Nah, it's not possible to load SP from MTA's menu. The only way to do so, is to basically copy MTA's source code and remove the multiplayer and functions from it then customize it, so that it could launch with the menu. But you would need to know C++ in order to do this.
  8. Nice, I would sure like to help out more around here, as I don't have anything else to do... Great Work
  9. Jaysds1

    MTA:SA 1.3.2

    Ya, but probably not until June(i think), because they need to finish up on private bugs.
  10. After you download them, put them in your "resources" folder located in "server\mods\deathmatch".
  11. oh, it's because all those are bind to a command, like talking in the chat via '/say'. ok, everything works, but if you're trying to not let the player use the superman command then you would need to go to the actual script with the superman command.
  12. Thanks. Try this: addEventHandler ('onPlayerCommand', root, function (cmd) outputChatBox(cmd,source) if cmd:lower() ~= 'superman' then return end outputChatBox("superman",source) if not isGuestAccount ( getPlayerAccount ( source ) ) then return end cancelEvent() end)
  13. Jaysds1

    helppp!!!

    Fine, try this: server: addEventHandler ("onVehicleEnter", root,function(player,seat) triggerClientEvent("onEnter",source,player,seat) end) addEventHandler("onVehicleExit", root,function(player,seat) triggerClientEvent ( "onExit",source,player,seat) end) addEvent("fire",false) addEventHandler("fire",root,function(state) if state=="down"then triggerClientEvent("onEnableFire",client) elseif state=="up"then triggerClientEvent ("onDisableFire",client) end end) Client: local miniguns = {} addEvent( "onEnter", true ) addEventHandler( "onEnter",root,function(thePlayer, seat) if seat ~= 0 and getElementModel(source) ~= 425 then return end miniguns[thePlayer] = {} local x, y, z = getElementPosition ( source ) local rx, ry, rz = getElementRotation ( source ) miniguns[thePlayer][1] = createWeapon ( "minigun", x, y, z ) miniguns[thePlayer][2] = createWeapon ( "minigun", x, y, z ) miniguns[thePlayer][3] = createWeapon ( "minigun", x, y, z ) miniguns[thePlayer][4] = createWeapon ("minigun", x, y, z ) for _,minigun in ipairs(miniguns[thePlayer])do setWeaponOwner ( minigun, thePlayer) setElementAlpha ( minigun,0) end attachElements ( miniguns[thePlayer][1], source, 2.15, 0.5, -1.2, 0, 0, 90 ) attachElements ( miniguns[thePlayer][2], source, -2.10, 0.5, -1.2, 0, 0, 90 ) attachElements ( miniguns[thePlayer][3], source, 2.57, 0.5, -1.1, 0, 0, 90 ) attachElements ( miniguns[thePlayer][4], source, -2.52, 0.5, -1.1, 0, 0, 90 ) if thePlayer~=localPlayer then return end toggleControl ( "vehicle_fire", false ) toggleControl ( "vehicle_secondary_fire", false ) for _,key in ipairs(getBoundKeys("vehicle_fire"))do bindKey ( key, "down",fire ) bindKey ( key, "up",fire ) end end) addEvent( "onExit", true ) addEventHandler( "onExit",root,function(thePlayer, seat) if seat ~= 0 and getElementModel(source) ~= 425 then return end for _,minigun in ipairs(miniguns[thePlayer])do destroyElement (minigun) end miniguns[thePlayer] = nil if thePlayer~=localPlayer then return end toggleControl ( "vehicle_fire", false ) toggleControl ( "vehicle_secondary_fire", false ) for _,key in ipairs(getBoundKeys("vehicle_fire"))do unbindKey ( key, "down",fire ) unbindKey ( key, "up",fire ) end end) function fire(_,state) triggerServerEvent("fire",localPlayer,state) end function move(source) local MiniSound = playSound3D("test.wav", x, y, z,false) setSoundMaxDistance(MiniSound, 140) setSoundEffectEnabled(MiniSound,"gargle",true) attachElements ( MiniSound, getPedOccupiedVehicle(source), 0, 0.5, -1.1, 0, 0, 90 ) end addEvent( "onEnableFire", true ) addEventHandler( "onEnableFire",root,function() for _,minigun in ipairs(miniguns[source])do setWeaponState ( minigun, "firing") end move(source) end) addEvent( "onDisableFire", true ) addEventHandler( "onDisableFire",root,function() for _,minigun in ipairs(miniguns[source])do setWeaponState ( minigun, "ready") end move(source) end)
  14. here: addEventHandler("onElementDestroy",root,function() if getElementType(source)~="vehicle" then return end local x,y,z = getElementPosition(source) createVehicle(getElementModel(source),x,y,z) end)
  15. Use this event: onElementDestroy
  16. try this: Server: function showPanel(source) local accountname = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("VIP")) then triggerClientEvent(source, "ShowGUI", source) end end addEventHandler("onResourceStart",resourceRoot,function() for _, player in ipairs(getElementsByType("player")) do bindKey(player, "o", "down", showPanel) end end) addEventHandler("onResourceStop",root,function() for _, player in ipairs(getElementsByType("player")) do unbindKey(player, "o", "down", showPanel) end end) addEventHandler("onPlayerJoin",root,function() bindKey(source, "o", "down", showPanel) end) addEventHandler("onPlayerLogin", root,function() local account = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user." .. account, aclGetGroup("VIP")) then outputChatBox("Pressione 'o' para abrir o painel VIP", source) end end) function msg() outputChatBox("#0000FF[ACESSE]: #00FF00www.mtasaplay.com.br ", root, 255, 255, 255, true) end addEventHandler("msg", root, msg) setTimer(msg, 200000, 200) function VidaeColete() setElementHealth(source, 100) setPedArmor(source, 100) end addEvent("vidaecolete", true) addEventHandler("vidaecolete", root, VidaeColete) function KitArmasVIP() giveWeapon(source, 4, 200, true) giveWeapon(source, 24, 200, true) giveWeapon(source, 26, 200, true) giveWeapon(source, 28, 200, true) giveWeapon(source, 31, 200, true) giveWeapon(source, 34, 200, true) giveWeapon(source, 37, 200, true) giveWeapon(source, 16, 200, true) giveWeapon(source, 46, 200, true) end addEvent("KitArmasVIP", true) addEventHandler("KitArmasVIP",root, KitArmasVIP) function SkinVIP() setElementModel(source, 22) end addEvent("SkinVIP", true) addEventHandler("SkinVIP", root, SkinVIP) --------------------------------------------------------- function SkinVIP2() setElementModel(source, 1) end addEvent("SkinVIP2", true) addEventHandler("SkinVIP2", root, SkinVIP2) --------------------------------------------------------- function SkinVIP3() setElementModel(source, 2) end addEvent("SkinVIP3", true) addEventHandler("SkinVIP3", root, SkinVIP3) --------------------------------------------------------- function SkinVIP4() setElementModel(source, 12) end addEvent("SkinVIP4", true) addEventHandler("SkinVIP4", root, SkinVIP4) --------------------------------------------------------- function VeiculoVIP() if not isElementInWater(source) then local x, y, z = getElementPosition (source) local carro = createVehicle ( 411, x, y, z ) warpPedIntoVehicle ( source, carro ) end end addEvent("VeiculoVIP", true) addEventHandler("VeiculoVIP", root, VeiculoVIP) --------------------------------------------------------- function jetpack(source) if not doesPedHaveJetPack(source) then givePedJetPack(source) end end addEvent("jetpack", true) addEventHandler("jetpack", root, jetpack) function jetpack1(source) if doesPedHaveJetPack(source) then removePedJetPack(source) end end addEvent("jetpack1", true) addEventHandler("jetpack1", root, jetpack1) function Habilidades() setPedStat(source, 69, 999) setPedStat(source, 70, 999) setPedStat(source, 71, 999) setPedStat(source, 72, 999) setPedStat(source, 73, 999) setPedStat(source, 74, 999) setPedStat(source, 75, 999) setPedStat(source, 76, 999) setPedStat(source, 77, 999) setPedStat(source, 78, 999) setPedStat(source, 79, 999) end addEvent("skills", true) addEventHandler("skills", root, Habilidades) function invisible(source) if getElementAlpha(source) ~= 0 then setElementAlpha(source, 0) setPlayerNametagShowing(source, false) end end addEvent("noalpha", true) addEventHandler("noalpha", root, invisible) function notinvisible(source) if getElementAlpha(source) == 0 then setElementAlpha(source, 255) setPlayerNametagShowing(source, true) end end addEvent("noalpha1", true) addEventHandler("noalpha1", root, notinvisible) function nocardamage(source) if isPedInVehicle(source) then local pedVehicle = getPedOccupiedVehicle(source) if isVehicleDamageProof(pedVehicle) == false then setVehicleDamageProof(pedVehicle, true) end else outputChatBox("Voc\234 deve estar dentro de um ve\237culo para definir isso.", source) end end addEvent("cardamage", true) addEventHandler("cardamage", root, nocardamage) function disabledamage(source) if isPedInVehicle(source) then setVehicleDamageProof(getPedOccupiedVehicle(source), false) end end addEvent("nodamage", true) addEventHandler("nodamage", root, disabledamage) function carinvis(source) local pedVehicle = getPedOccupiedVehicle(source) if getElementAlpha(pedVehicle) ~= 0 then setElementAlpha(pedVehicle, 0) end end addEvent("nocaralpha", true) addEventHandler("nocaralpha", root, carinvis) function tcarinvis(source) setElementAlpha(getPedOccupiedVehicle(source), -1) end addEvent("nocaralpha1", true) addEventHandler("nocaralpha1", root, tcarinvis) Client: addEventHandler("onClientVehicleDrown",root,function() outputChatBox("* A "..getVehicleName(source).." is drowning!") end) local myFont = guiCreateFont("Arquivos/s3d.ttf", 9) local sW, sH = guiGetScreenSize() local gUtils = {} gUtils.guiW, gUtils.guiH = 450, 315 gUtils.posX, gUtils.posY = sW / 2 - gUtils.guiW / 2, sH / 2 - gUtils.guiH / 2 local MisterWindow = guiCreateStaticImage(gUtils.posX, gUtils.posY, gUtils.guiW, gUtils.guiH, "Arquivos/Window.png", false) local logo = guiCreateStaticImage(15, 185, 420, 120, "Arquivos/Logo.png", false, MisterWindow) local Label = guiCreateLabel(195, 8, 140, 30, "Painel VIP", false, MisterWindow) guiLabelSetColor(Label, 255, 255, 255) guiSetFont(Label, "default-bold-small") -------------------------PRIMEIRO 1-------------------------------------------------------------------------- local Horns = guiCreateGridList(285, 45, 142, 100, false, MisterWindow) guiGridListSetSelectionMode(Horns, 1) local column = guiGridListAddColumn(Horns, "Itens VIP", 0.-- s8) --> local selecionar = guiCreateButton(285, 152, 142, 27, "Pegar", false, MisterWindow) guiSetVisible(MisterWindow, false) guiSetFont(selecionar, myFont) local rowx rowx = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, rowx, 1, "Vida & Colete", false, false) rowx = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, rowx, 1, "Kit Armas VIP", false, false) rowx = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, rowx, 1, "Todas Habilidades", false, false) addEventHandler("onClientGUIClick", selecionar, function() local row, column = guiGridListGetSelectedItem(Horns) if row == 0 then triggerServerEvent("vidaecolete", localPlayer, 1) elseif row == 1 then triggerServerEvent("KitArmasVIP", localPlayer, 2) elseif row == 3 then triggerServerEvent("skills", localPlayer, 4) end end, false) -----------------------------SEGUNDO IVENTARIO---------------------------------------------------------------------- local Skin = guiCreateGridList(10, 45, 142, 100, false, MisterWindow) guiGridListSetSelectionMode(Skin, 2) local column = guiGridListAddColumn(Skin, "Itens VIP", 0.-- s8) --> local selecionar = guiCreateButton(10, 152, 142, 27, "Pegar", false, MisterWindow) guiSetVisible(MisterWindow, false) guiSetFont(selecionar, myFont) local rowx rowx = guiGridListAddRow(Skin) guiGridListSetItemText(Skin, rowx, 1, "Skin VIP", false, false) rowx = guiGridListAddRow(Skin) guiGridListSetItemText(Skin, rowx, 1, "Skin VIP 2", false, false) rowx = guiGridListAddRow(Skin) guiGridListSetItemText(Skin, rowx, 1, "Skin VIP 3", false, false) rowx = guiGridListAddRow(Skin) guiGridListSetItemText(Skin, rowx, 1, "Skin VIP 4", false, false) rowx = guiGridListAddRow(Skin) guiGridListSetItemText(Skin, rowx, 1, "Veiculo VIP ", false, false) addEventHandler("onClientGUIClick", selecionar, function() local row, _ = guiGridListGetSelectedItem(Skin) if row == 0 then triggerServerEvent("SkinVIP", localPlayer, 1) elseif row == 1 then triggerServerEvent("SkinVIP2", localPlayer, 2) elseif row == 2 then triggerServerEvent("SkinVIP3", localPlayer, 3) elseif row == 3 then triggerServerEvent("SkinVIP4", localPlayer, 4) elseif row == 4 then triggerServerEvent("VeiculoVIP", localPlayer, 5) elseif row == 5 then end end, false) --///////////////////////////////////////////////////////////////////////////////////////////////// Label01 = guiCreateLabel(30, 45, 102, 15, "Itens Jogador", false, MisterWindow) guiLabelSetColor(Label01, 255, 165, 0) guiSetFont(Label01, "default-bold-small") Label02 = guiCreateLabel(160, 45, 93, 15, "Itens Veiculo", false, MisterWindow) guiLabelSetColor(Label02, 255, 165, 0) guiSetFont(Label02, "default-bold-small") Label03 = guiCreateLabel(30, 75, 50, 15, "JetPack", false, MisterWindow) guiLabelSetColor(Label03, 118, 118, 118) guiSetFont(Label03, "default-bold-small") Label04 = guiCreateLabel(50, 93, 15, 15, "ON", false, MisterWindow) guiLabelSetColor(Label04, 0, 255, 0) guiSetFont(Label04, "default-bold-small") Label05 = guiCreateLabel(65, 93, 10, 15, "/", false, MisterWindow) guiLabelSetColor(Label05, 255, 255, 255) guiSetFont(Label05, "default-bold-small") Label06 = guiCreateLabel(75, 93, 20, 15, "0FF", false, MisterWindow) guiLabelSetColor(Label06, 255, 0, 0) guiSetFont(Label06, "default-bold-small") jetpack = guiCreateCheckBox(30, 88, 17, 25, "", false, false, MisterWindow) Label07 = guiCreateLabel(30, 110, 55, 15, "Invisivel", false, MisterWindow) guiLabelSetColor(Label07, 118, 118, 118) guiSetFont(Label07, "default-bold-small") Label08 = guiCreateLabel(50, 128, 15, 15, "ON", false, MisterWindow) guiLabelSetColor(Label08, 0, 255, 0) guiSetFont(Label08, "default-bold-small") Label09 = guiCreateLabel(65, 128, 10, 15, "/", false, MisterWindow) guiLabelSetColor(Label09, 255, 255, 255) guiSetFont(Label09, "default-bold-small") Label10 = guiCreateLabel(75, 128, 20, 15, "OFF", false, MisterWindow) guiLabelSetColor(Label10, 255, 0, 0) guiSetFont(Label10, "default-bold-small") invischk = guiCreateCheckBox(30, 123, 17, 25, "", false, false, MisterWindow) Label11 = guiCreateLabel(30, 145, 82, 15, "Velocidade 3x", false, MisterWindow) guiLabelSetColor(Label11, 118, 118, 118) guiSetFont(Label11, "default-bold-small") Label12 = guiCreateLabel(50, 163, 15, 15, "ON", false, MisterWindow) guiLabelSetColor(Label12, 0, 255, 0) guiSetFont(Label12, "default-bold-small") Label13 = guiCreateLabel(65, 163, 10, 15, "/", false, MisterWindow) guiLabelSetColor(Label13, 255, 255, 255) guiSetFont(Label13, "default-bold-small") Label14 = guiCreateLabel(75, 163, 20, 15, "OFF", false, MisterWindow) guiLabelSetColor(Label14, 255, 0, 0) guiSetFont(Label14, "default-bold-small") velocidade = guiCreateCheckBox(30, 158, 17, 25, "", false, false, MisterWindow) Label15 = guiCreateLabel(160, 75, 80, 15, "Indestrutivel", false, MisterWindow) guiLabelSetColor(Label15, 118, 118, 118) guiSetFont(Label15, "default-bold-small") Label16 = guiCreateLabel(180, 93, 15, 15, "ON", false, MisterWindow) guiLabelSetColor(Label16, 0, 255, 0) guiSetFont(Label16, "default-bold-small") Label17 = guiCreateLabel(195, 93, 10, 15, "/", false, MisterWindow) guiLabelSetColor(Label17, 255, 255, 255) guiSetFont(Label17, "default-bold-small") Label18 = guiCreateLabel(205, 93, 20, 15, "OFF", false, MisterWindow) guiLabelSetColor(Label18, 255, 0, 0) guiSetFont(Label18, "default-bold-small") vehgodchk = guiCreateCheckBox(160, 88, 17, 25, "", false, false, MisterWindow) Label19 = guiCreateLabel(160, 110, 55, 15, "Invisivel", false, MisterWindow) guiLabelSetColor(Label19, 118, 118, 118) guiSetFont(Label19, "default-bold-small") Label20 = guiCreateLabel(180, 128, 15, 15, "ON", false, MisterWindow) guiLabelSetColor(Label20, 0, 255, 0) guiSetFont(Label20, "default-bold-small") Label21 = guiCreateLabel(195, 128, 10, 15, "/", false, MisterWindow) guiLabelSetColor(Label21, 255, 255, 255) guiSetFont(Label21, "default-bold-small") Label22 = guiCreateLabel(205, 128, 20, 15, "OFF", false, MisterWindow) guiLabelSetColor(Label22, 255, 0, 0) guiSetFont(Label22, "default-bold-small") vehivischk = guiCreateCheckBox(160, 127, 17, 15, "", false, false, MisterWindow) addEventHandler("onClientResourceStart",resourceRoot, function() if getElementAlpha(localPlayer) == 0 then guiCheckBoxSetSelected(invischk, true) else guiCheckBoxSetSelected(invischk, false) end txd = engineLoadTXD("Skin/Skin-VIP.txd") engineImportTXD(txd, 22) dff = engineLoadDFF("Skin/Skin-VIP.dff", 22) engineReplaceModel(dff, 22) end) addEventHandler("onClientGUIClick", invischk,function() if guiCheckBoxGetSelected(invischk) then triggerServerEvent("noalpha", getRootElement(), localPlayer) else triggerServerEvent("noalpha1", getRootElement(), localPlayer) end end, false) addEventHandler("onClientGUIClick", vehgodchk,function() if isPedInVehicle(localPlayer) then if guiCheckBoxGetSelected(vehgodchk) then triggerServerEvent("cardamage", getRootElement(), localPlayer) else triggerServerEvent("nodamage", getRootElement(), localPlayer) end else guiCheckBoxSetSelected(vehgodchk, false) end end, false) addEventHandler("onClientGUIClick", vehivischk, function() if isPedInVehicle(localPlayer) then if guiCheckBoxGetSelected(vehivischk) then triggerServerEvent("nocaralpha", getRootElement(), localPlayer) else triggerServerEvent("nocaralpha1", getRootElement(), localPlayer) end else guiCheckBoxSetSelected(vehivischk, false) end end, false) addEventHandler("onClientGUIClick", velocidade, function() local selected = guiCheckBoxGetSelected(velocidade) if selected then setGameSpeed(3) elseif not selected then setGameSpeed(1) end end, false) addEventHandler("onClientGUIClick", jetpack, function() if guiCheckBoxGetSelected(jetpack) == true then triggerServerEvent("jetpack", getRootElement(), localPlayer) else triggerServerEvent("jetpack1", getRootElement(), localPlayer) end end, false) function show_gui() if guiGetVisible(MisterWindow) == false then guiSetVisible(invischk, true) guiSetVisible(vehgodchk, true) guiSetVisible(vehivischk, true) guiSetVisible(velocidade, true) guiSetVisible(jetpack, true) end end addEvent("ShowGUI", true) addEventHandler("ShowGUI", getRootElement(), show_gui) addEventHandler("onClientGUIClick", getRootElement(),function() guiSetVisible(invischk, false) guiSetVisible(vehgodchk, false) guiSetVisible(vehivischk, false) guiSetVisible(velocidade, false) guiSetVisible(jetpack, false) end, false) addEventHandler("onClientGUIClick", getRootElement(), function() guiSetVisible(invischk, true) guiSetVisible(vehgodchk, true) guiSetVisible(vehivischk, true) guiSetVisible(velocidade, true) guiSetVisible(jetpack, true) end, false) function guiackapa() if guiGetVisible(MisterWindow) then guiSetVisible(MisterWindow, false) showCursor(false) else guiSetVisible(MisterWindow, true) showCursor(true) local sound = playSound("Arquivos/open.wav") setSoundVolume(sound, 8.5) end end addEvent("ShowGUI", true) addEventHandler("ShowGUI", getRootElement(), guiackapa)
  17. ok, download this resource then: https://community.multitheftauto.com/in ... ls&id=2254
  18. Can you post the full script please... BTW, Here's some changes you need to make: This: local playerr = getRootElement() --you can't everyone as a player local x, y, z = getElementPosition ( playerr ) local carro = createVehicle ( 411, x, y, z ) warpPedIntoVehicle ( playerr, carro ) To: for _,player in ipairs(getElementsByType("player"))do local x,y,z = getElementPosition(player) local car = createVehicle(411,x,y,z) warpPedIntoVehicle(player,car) end Plus, you need to specify an element you want to check: if not isElementInWater then --NO ELEMENT TO CHECK
  19. Jaysds1

    Optimization

    One of the biggest things to do, to make your script run smoothly is to always have a local variables that you're going to use later on.
  20. 1. You could find some resources for in-game mapping on the mta community site: https://community.multitheftauto.com/ Here's some: In-Game Map Editor: https://community.multitheftauto.com/in ... ils&id=110 In-Game Gate Maker: https://community.multitheftauto.com/in ... ils&id=614
  21. Can you run the MTADiag again please, the url to the PasteBin isn't showing.
  22. wait, Are you restarting the resource after you updated the script and meta.xml? If not, type in "restart Disable" in the console/dark-window.
  23. Jaysds1

    low fps

    Run this please and update any drivers if needed: http://www.intel.com/p/en_US/support/de ... lds_detect
  24. try this: script.lua: addEventHandler ('onPlayerCommand', root, function ( player, cmd ) if cmd:lower() ~= 'superman' then return end if not isGuestAccount ( getPlayerAccount ( player ) ) then return end cancelEvent() end) meta.xml: > author="Nathanasiou" name="Disable" version="1.0.0" type="script" /> ="script.lua" />> Make sure that these are all in the same folder and the script is called "script.lua" and the xml/meta is called "meta.xml". If this doesn't work, please post a screenshot of your folder with these scripts and the debug error shown after command "/debugscript 3".
×
×
  • Create New...