Sucrilhex
Members-
Posts
36 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Sucrilhex
-
opa, tentei aqui e não consegui, não entendi muito bem a explicação
-
Olá, estou com uma concessionaria e nela tem uma garagem, na garagem mostra o nome dos veiculos originais, exemplo "Infernus", eu gostaria que mostrasse o nome personalizado "Ferrari", ja tentei varias vezes e todas sem sucesso, por isso vim aqui para pedir ajuda. Parte de comprar o carro local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1024), (screenH/768) local Font_1 = dxCreateFont("font/font.ttf", y*11) local Font_2 = dxCreateFont("font/font1.ttf", y*11) local Font_3 = dxCreateFont("font/fontNick.ttf", y*10) local Font_4 = dxCreateFont("font/OpenSans-Bold.ttf", y*15) triggerServerEvent("DNL:OpenInventory", localPlayer) function Dx_Concessionaria () exports["Res_blur"]:dxDrawBluredRectangle(screenW * 0.6348, screenH * 0.2786, screenW * 0.2813, screenH * 0.5846, tocolor(255, 255, 255, 255)) dxDrawRectangle(screenW * 0.6348, screenH * 0.2786, screenW * 0.2813, screenH * 0.5846, tocolor(0, 0, 0, 100), false) dxDrawRectangle(screenW * 0.6348, screenH * 0.2786, screenW * 0.2813, screenH * 0.0560, tocolor(220, 20, 60, 254), false) --dxDrawRectangle(screenW * 0.6445, screenH * 0.3581, screenW * 0.2617, screenH * 0.3099, tocolor(0, 0, 0, 254), false) dxDrawImage(screenW * 0.6445, screenH * 0.6979, screenW * 0.2607, screenH * 0.0664, "Img/botao2.png", 0, 0, 0, tocolor(23, 241, 23, 159), false) dxDrawImage(screenW * 0.6455, screenH * 0.7839, screenW * 0.2607, screenH * 0.0664, "Img/botao2.png", 0, 0, 0, tocolor(254, 9, 9, 159), false) dxDrawText("CONCESSIONARIA", screenW * 0.6348, screenH * 0.2786, screenW * 0.9160, screenH * 0.3346, tocolor(255, 255, 255, 255), 1.00, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("COMPRAR", screenW * 0.6445, screenH * 0.6979, screenW * 0.9063, screenH * 0.7643, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("FECHAR", screenW * 0.6455, screenH * 0.7839, screenW * 0.9072, screenH * 0.8503, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) --[[CorComprar = tocolor(0, 60, 160, 200) if isCursorOnElement(x*1055, y*650, x*215, y*45) then CorComprar = tocolor(0, 60, 160, 150)]] end --addEventHandler("onClientRender", root, Dx_Concessionaria) addEventHandler("onClientResourceStart", resourceRoot, function () Lista_Veiculos = dxGridW:Create(879, 260, 350, 250) Lista_Veiculos:AddColumn("Nome", 122) -- Nome veiculo Lista_Veiculos:AddColumn("Preço", 118) -- PreçoS Lista_Veiculos:AddColumn("Id", 122) -- IDS Lista_Veiculos:SetVisible(false) end) MarkesTableCarros = {} -- Tabela vazia Carros () ------------- ADICIONE AQUI OS CARROS ------------- local ShopsCarros = { ------ LOJA CARRO LS ------ [1] = {IDCarros = { {"Pop 110cc", 462, 5000}, -- Nome, Id Preço {"Honda Biz 125cc", 586, 9000}, {"XJ6", 521, 26000}, {"Ducati 999R", 522, 45000}, {"Caravan", 479, 15000}, {"Celta", 560, 19000}, {"Gol GTI", 589, 24000}, {"Fiesta", 436, 40000}, {"Civic", 585, 87000}, {"Sonata", 421, 90000}, {"Tesla", 405, 120000}, {"S10", 400, 150000}, {"Jeep Cherokee", 529, 200000}, {"BMW M3", 558, 280000}, {"Dodge Charger", 542, 320000}, {"Dodge Viper", 429, 390000}, {"Mazda RX8", 602, 465000}, {"GTR-R32", 562, 530000}, {"Porshe", 480, 850000}, {"Ferrari", 506, 1000000}, {"McLaren", 541, 1500000}, {"Lamborghini", 411, 3000000}, }, -- frente marker 1264.341, -1830.56, 13.627 -- Posição do Veiculo Quando For Comprar Veh_X = 1264.539, Veh_Y = -1821.843, Veh_Z = 13.627, -- Posição da Camera Quando For Comprar CamX = 1264.091, CamY = -1830.435, CamZ = 13.627, -- Focamento da Camera Quando For Comprar Fock_X = 1264.091, Fock_Y = -1830.435, Fock_Z = 13.627 }, } ------------- MARKERS CARROS ------------- for i, v in ipairs(ShopsCarros) do MarkerCarros = createMarker(1264.122, -1833.906, 13.627 -1, "cylinder", 3, 0, 60, 160, 60) MarkesTableCarros[MarkerCarros] = true setElementID(MarkerCarros, tostring(i)) Blip = createBlipAttachedTo(MarkerCarros, 55, 2, 255, 255, 255, 255, 0, 500) ----- $@$@ BLIP DOS CARRO AQUI setBlipVisibleDistance(Blip , 150) end ------------- COLIDIR COM MARKERS CARROS ------------- function Ativar_LojaCarro (player) if getElementType(player) ~= "player" or player ~= localPlayer or isPedInVehicle(player) then return end if MarkesTableCarros[source] then i = tonumber(getElementID(source)) Lista_Veiculos:Clear() for i, v in ipairs(ShopsCarros[i]["IDCarros"]) do Lista_Veiculos:AddItem(1, tostring(v[1])) -- Name Lista_Veiculos:AddItem(3, tostring(v[2])) -- Preço Lista_Veiculos:AddItem(2, tostring(v[3])) -- ID end Lista_Veiculos:SetSelectedItem (1) setElementData(localPlayer, "Concessionaria", "Carro") setTimer(function() local SelectCar = Lista_Veiculos:GetSelectedItem() local ID_Car = Lista_Veiculos:GetItemDetails(3, SelectCar) local x, y, z = ShopsCarros[i]["Veh_X"], ShopsCarros[i]["Veh_Y"], ShopsCarros[i]["Veh_Z"] if isElement(veh) then destroyElement(veh) end if isTimer(timer) then killTimer(timer) end showCursor(true) showChat(false) setElementFrozen(localPlayer, true) setElementAlpha(localPlayer, 0) veh = createVehicle(ID_Car, x, y, z) setVehicleColor( veh, 255, 255, 255, 255, 255, 255 ) setVehicleDamageProof(veh, true) setElementFrozen(veh, true) Lista_Veiculos:SetVisible(true) addEventHandler("onClientRender", root, Dx_Concessionaria) setCameraMatrix(ShopsCarros[i]["CamX"], ShopsCarros[i]["CamY"], ShopsCarros[i]["CamZ"], ShopsCarros[i]["Fock_X"], ShopsCarros[i]["Fock_Y"], ShopsCarros[i]["Fock_Z"]) timer = setTimer(function() local x, y, z = getElementRotation(veh) setElementRotation(veh, x, y, z+3) end, 50, 0) end, 100, 1) end end addEventHandler("onClientMarkerHit", resourceRoot, Ativar_LojaCarro) --=============================-- ------------- CLICKS ------------ --=============================-- function Clicks ( _,state ) if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Concessionaria) then if state == "down" then if isCursorOnElement ( screenW * 0.6455, screenH * 0.7839, screenW * 0.2607, screenH * 0.0664 ) then -- Close Painel if isElement(veh) then destroyElement(veh) end if isTimer(timer) then killTimer(timer) end if getElementData(localPlayer, "Concessionaria") == "Carro" then setTimer(function() setElementPosition ( localPlayer, 1264.122, -1833.906, 13.627 ) end, 1000, 1) end showChat(true) showCursor(false) setElementFrozen(localPlayer, false) fadeCamera(false, 1.0) Lista_Veiculos:SetVisible(false) setElementData(localPlayer, "Concessionaria", nil) removeEventHandler("onClientRender", root, Dx_Concessionaria) setTimer(function() fadeCamera(true, 0.5) setCameraTarget(localPlayer) end, 1000, 1) setTimer(function() setElementAlpha(localPlayer, 255) end, 1000, 1) elseif isCursorOnElement ( screenW * 0.6445, screenH * 0.6979, screenW * 0.2607, screenH * 0.0664 ) then -- Comprar Veiculo local Name_Car = Lista_Veiculos:GetItemDetails(1, Lista_Veiculos:GetSelectedItem()) local Preco = Lista_Veiculos:GetItemDetails(2, Lista_Veiculos:GetSelectedItem()) local Carro = Lista_Veiculos:GetItemDetails(3, Lista_Veiculos:GetSelectedItem()) triggerServerEvent("DNL:ComprarVeiculo", root, localPlayer, Name_Car, Preco, Carro) showChat(true) showCursor(false) setElementFrozen( localPlayer, false) fadeCamera(false, 1.0) Lista_Veiculos:SetVisible(false) setElementData (localPlayer, "Carro", nil) removeEventHandler("onClientRender", root, Dx_Concessionaria) setTimer(function() fadeCamera(true, 0.5) setCameraTarget(localPlayer) end, 1000, 1) setTimer(function() setElementAlpha(localPlayer, 255) end, 1000, 1) if isElement(veh) then destroyElement(veh) end if isTimer(timer) then killTimer(timer) end elseif (Lista_Veiculos:IsVisible()) then local SelectCar = Lista_Veiculos:GetSelectedItem() local get_ID = Lista_Veiculos:GetItemDetails(3, SelectCar) if (SelectCar ~= -1) then if isElement(veh) then setElementModel(veh, get_ID) return end local x, y, z = ShopsCarros[i]["Veh_X"], ShopsCarros[i]["Veh_Y"], ShopsCarros[i]["Veh_Z"] veh = createVehicle(get_ID, x, y, z) setVehicleDamageProof(veh, true) setElementFrozen(veh, true) timer = setTimer(function() local x, y, z = getElementRotation(veh) setElementRotation(veh, x, y, z+3) end, 50, 0) else if isElement(veh) then destroyElement(veh) end if isTimer(timer) then killTimer(timer) end end end end end end addEventHandler ( "onClientClick", root, Clicks ) --=============================-- ------------- IGNORA ------------ --=============================-- AllKeys = { "arrow_l", "arrow_u", "arrow_r", "arrow_d", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "num_0", "num_1", "num_2", "num_3", "num_4", "num_5", "num_6", "num_7", "num_8", "num_9", "num_mul", "num_add", "num_sep", "num_sub", "num_div", "num_dec", "num_enter", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "escape", "backspace", "tab", "lalt", "ralt", "enter", "space", "pgup", "pgdn", "end", "home", "insert", "delete", "lshift", "rshift", "lctrl", "rctrl", "[", "]", "pause", "capslock", "scroll", ";", ",", "-", ".", "/", "#", "\\", "=" } addEventHandler("onClientKey", root, function(button, press) for index, keys in pairs(AllKeys) do if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Concessionaria) then if button == keys then cancelEvent() end end end end ) function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text, x - 1, y, w - 1, h, color, scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y, w + 1, h, color, scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - 1, w, h - 1, color, scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + 1, w, h + 1, color, scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end function contornoRetangulo(absX, absY, sizeX, sizeY, color, ancho) dxDrawRectangle(absX, absY, sizeX, ancho, color) dxDrawRectangle(absX, absY + ancho, ancho, sizeY - ancho, color) dxDrawRectangle(absX + ancho, absY + sizeY - ancho, sizeX - ancho, ancho, color) dxDrawRectangle(absX + sizeX - ancho, absY + ancho, ancho, sizeY - ancho*2, color) end function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end local x,y = guiGetScreenSize() function isCursorOnElement(x, y, w, h) if (not isCursorShowing()) then return false end local mx, my = getCursorPosition() local fullx, fully = guiGetScreenSize() cursorx, cursory = mx*fullx, my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end parte da garagem local screenW,screenH = guiGetScreenSize() local resW,resH = 1366,768 local x,y = (screenW/resW), (screenH/resH) DGS = exports.Res_dgs local Font_1 = dxCreateFont("font/font.ttf", y*11) local Font_2 = dxCreateFont("font/font1.ttf", y*11) local Font_3 = dxCreateFont("font/fontNick.ttf", y*11) local Font_4 = dxCreateFont("font/OpenSans-Bold.ttf", y*14) function Abrir_Garagem() if getElementInterior(localPlayer) == 0 and getElementDimension(localPlayer) == 0 then if not isEventHandlerAdded("onClientRender", getRootElement(), Dx_Garagem) then showCursor(true) DGS:dgsSetVisible(SeusCarros, true) addEventHandler("onClientRender", root, Dx_Garagem) end end end addEvent("DNL:Abrir(Garagem)", true) addEventHandler("DNL:Abrir(Garagem)", root, Abrir_Garagem) function Fechar_Garagem() if getElementInterior(localPlayer) == 0 and getElementDimension(localPlayer) == 0 then if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Garagem) then showCursor(false) DGS:dgsSetVisible(SeusCarros, false) removeEventHandler("onClientRender", root, Dx_Garagem) end end end addEvent("DNL:Fechar(Garagem)", true) addEventHandler("DNL:Fechar(Garagem)", root, Fechar_Garagem) --=============================-- ---------- Dx Garagem ----------- --=============================-- function Dx_Garagem() exports["Res_blur"]:dxDrawBluredRectangle(x*500, y*193, x*366, y*450, tocolor(255, 255, 255, 255)) dxDrawRectangle(x*500, y*193, x*366, y*450, tocolor(200, 200, 200, 180), false) dxDrawRectangle(x*500, y*193, x*366, y*58, tocolor(0, 0, 0, 222), false) dxDrawLine(x*500, y*251, x*866, y*251, tocolor(0, 60, 160, 200), 2, false) dxDrawLine(x*500, y*482, x*866, y*482, tocolor(0, 60, 160, 200), 2, false) contornoRetangulo(x*500, y*193, x*366, y*450, tocolor(0, 0, 0, 222), x*1) -- Line enfeite dxDrawText("Garagem", x*643, y*210, x*724, y*234, tocolor(255, 255, 255, 255), 1, Font_4, "left", "top", false, false, false, false, false) dxDrawImage(x*602, y*493, x*162, y*40, "Img/botao.png", 0, 0, 0, CorPuxar, false) dxDrawText("Puxar", x*665, y*503, x*702, y*521, tocolor(0, 0, 0, 255), 1, Font_3, "left", "top", false, false, false, false, false) CorPuxar = tocolor(0, 60, 160, 200) if isCursorOnElement(x*602, y*493, x*162, y*40) then CorPuxar = tocolor(0, 60, 160, 255) end dxDrawImage(x*602, y*543, x*162, y*40, "Img/botao.png", 0, 0, 0, CorGuardar, false) dxDrawText("Guardar", x*658, y*553, x*710, y*571, tocolor(0, 0, 0, 255), 1, Font_3, "left", "top", false, false, false, false, false) CorGuardar = tocolor(0, 60, 160, 200) if isCursorOnElement(x*602, y*543, x*162, y*40) then CorGuardar = tocolor(0, 60, 160, 255) end dxDrawImage(x*602, y*593, x*162, y*40, "Img/botao.png", 0, 0, 0, CorSpawnar, false) dxDrawText("Spawnar", x*657, y*603, x*713, y*621, tocolor(0, 0, 0, 255), 1, Font_3, "left", "top", false, false, false, false, false) CorSpawnar = tocolor(0, 60, 160, 200) if isCursorOnElement(x*602, y*593, x*162, y*40) then CorSpawnar = tocolor(0, 60, 160, 255) end dxDrawText("X", x*835, y*210, x*724, y*234, CorClose, 1, Font_4, "left", "top", false, false, false, false, false) CorClose = tocolor(100, 100, 100, 255) if isCursorOnElement(x*835, y*210, x*17, y*17) then CorClose = tocolor(255, 0, 0, 255) end end --addEventHandler("onClientRender", root, Dx_Garagem) --=============================-- ---------- AddCar_List ---------- --=============================-- SeusCarros = DGS:dgsCreateGridList(x*500, y*231, x*366, y*232,false) DGS:dgsGridListAddColumn(SeusCarros,"", 1) DGS:dgsSetVisible(SeusCarros, false) function Refresh_Lista() local data = getElementData(localPlayer, "VehicleInfo") if data then DGS:dgsGridListClearRow(SeusCarros) for i, data in ipairs (data) do local NameCarro = getVehicleNameFromModel(data["Model"]) local ID = data["ID"] local row = DGS:dgsGridListAddRow(SeusCarros) DGS:dgsGridListSetItemText(SeusCarros, row, 1, NameCarro, false, true) DGS:dgsGridListSetItemData(SeusCarros, row, 1, ID) end end end addEventHandler("onClientElementDataChange", root, function(dd) if getElementType(source) == "player" and source == localPlayer and dd == "VehicleInfo" then local data = getElementData(source, dd) if data then Refresh_Lista() end end end) --=============================-- ---------- ClickListCar --------- --=============================-- function Clicks_Garagem ( _,state ) local id = DGS:dgsGridListGetSelectedItem(SeusCarros) local ID = DGS:dgsGridListGetItemData(SeusCarros, id, 1) if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Garagem) then if isCursorOnElement ( x*835, y*210, x*17, y*17 ) then playSoundFrontEnd(8) Fechar_Garagem () end if state == "down" then if (id ~= -1) then if isCursorOnElement ( x*602, y*493, x*162, y*40 ) then playSoundFrontEnd(2) triggerServerEvent("DNL:Trazer_Veh", root, localPlayer, ID) elseif isCursorOnElement ( x*602, y*543, x*162, y*40 ) then playSoundFrontEnd(2) triggerServerEvent("DNL:Guardar_Veh", root, localPlayer, ID) elseif isCursorOnElement ( x*602, y*593, x*162, y*40 ) then playSoundFrontEnd(2) triggerServerEvent("DNL:Spawnar_Veh", root, localPlayer, ID) end end end end end addEventHandler ( "onClientClick", root, Clicks_Garagem ) --=============================-- ------------- IGNORA ------------ --=============================-- AllKeys = { "arrow_l", "arrow_u", "arrow_r", "arrow_d", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "u", "v", "w", "x", "y", "z", "num_0", "num_1", "num_2", "num_3", "num_4", "num_5", "num_6", "num_7", "num_8", "num_9", "num_mul", "num_add", "num_sep", "num_sub", "num_div", "num_dec", "num_enter", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "escape", "backspace", "tab", "lalt", "ralt", "enter", "space", "pgup", "pgdn", "end", "home", "insert", "delete", "lshift", "rshift", "lctrl", "rctrl", "[", "]", "pause", "capslock", "scroll", ";", ",", "-", ".", "/", "#", "\\", "=" } addEventHandler("onClientKey", root, function(button, press) for index, keys in pairs(AllKeys) do if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Garagem) then if button == keys then cancelEvent() end end end end ) function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text, x - 1, y, w - 1, h, color, scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y, w + 1, h, color, scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - 1, w, h - 1, color, scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + 1, w, h + 1, color, scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end function contornoRetangulo(absX, absY, sizeX, sizeY, color, ancho) dxDrawRectangle(absX, absY, sizeX, ancho, color) dxDrawRectangle(absX, absY + ancho, ancho, sizeY - ancho, color) dxDrawRectangle(absX + ancho, absY + sizeY - ancho, sizeX - ancho, ancho, color) dxDrawRectangle(absX + sizeX - ancho, absY + ancho, ancho, sizeY - ancho*2, color) end function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end local x,y = guiGetScreenSize() function isCursorOnElement(x, y, w, h) if (not isCursorShowing()) then return false end local mx, my = getCursorPosition() local fullx, fully = guiGetScreenSize() cursorx, cursory = mx*fullx, my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end
-
Tentei por pra quando o jogador logar, automaticamente tirar o som das armas, porem eu tentei com onPlayerLogin, e sem sucesso, ajude-me : ( function toggleWeaponSounds_f ( ) local enabled = isWorldSoundEnabled ( 5 ) -- We place this variable here for checking. setWorldSoundEnabled ( 5, not enabled ) -- And here the toggling happens. end addCommandHandler ( "teste", toggleWeaponSounds_f )
-
vlw pessoal, deu certo
-
eu realmente queria dizer que funcionou, porem não foi
-
funcionou, porem quero que apareça o nome que mostra na identidade, por isso deixei o local local Nome = getElementData ( thePlayer, "AirNew_RG_NomeCompleto") or "Sem Dono"
-
Perdão se não deu pra entender muito bem o titulo, porem eu tenho uma loja de carros, e nela queria adaptar pra um sistema de rg, no caso tem um outro mod no meu servidor que é /verdono, lá aparece o nome de login do dono, queria por pra aparecer o nome que mostra na identidade : ) -- ver nome do dono do veiculo function VerDono(thePlayer) for _, group in ipairs ({"Policia"}) do if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup( group )) then local usercar = getPedOccupiedVehicle ( thePlayer ) local owner = getElementData(usercar, "ownercar") if usercar then local Nome = getElementData ( thePlayer, "AirNew_RG_NomeCompleto") or "Sem Dono" local Sobrenome = getElementData ( thePlayer, "AirNew_RG_Sobrenome") or "" outputChatBox("#ffea00═════════════════ DETRAN ERP ═════════════════", thePlayer, 0, 255, 0,true) outputChatBox("#ffea00DETRAN #ababab| #7b7b7bProprietário: #FF1493"..owner.." "..Sobrenome, thePlayer, 0, 255, 0,true) outputChatBox("#ffea00═════════════════ DETRAN ERP ═════════════════", thePlayer, 0, 255, 0,true) else outputChatBox("#ffea00═════════════════ DETRAN ERP ═════════════════", thePlayer, 0, 255, 0,true) outputChatBox("#ffea00DETRAN #ababab| #ff0000Você precisa estar em um veículo!", thePlayer, 0, 255, 0,true) outputChatBox("#ffea00═════════════════ DETRAN ERP ═════════════════", thePlayer, 0, 255, 0,true) end else outputChatBox("#ffea00DETRAN #ababab| #ff0000Apenas funcionários do DETRAN podem usar esse comando!", thePlayer, 0, 255, 0,true) end end end addCommandHandler("verdono",VerDono) Loja de Veiculos [Server] customCarNames = -- новые названия { } shopsVehSpawns = { [1] = { 2131, -1133, 25.6, 0,0,359 }, [2] = { 555, -1278, 18, 0,0,100 }, [3] = { 1941, 2097, 10.8, 0,0,350 }, [4] = { -1988, 272, 36, 0,0,259 }, [5] = { -1642, 1213, 7.17, 0,0, 227 }, [6] = { 531.64141845703, -1929.9896240234, -0.55000001192093, 0, 0, 0} } function getFreeID() local result = dbPoll(dbQuery(db, "SELECT ID FROM VehicleList ORDER BY ID ASC"), -1) newID = false for i, id in pairs (result) do if id["ID"] ~= i then newID = i break end end if newID then return newID else return #result + 1 end end function getVehicleByID(id) v = false for i, veh in ipairs (getElementsByType("vehicle")) do if getElementData(veh, "ID") == id then v = veh break end end return v end function updateVehicleInfo(player) if isElement(player) then local result = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ?", getAccountName(getPlayerAccount(player))), -1) if type(result) == "table" then setElementData(player, "VehicleInfo", result) end end end addEventHandler("onResourceStart", resourceRoot, function() db = dbConnect("sqlite", "database.db") dbExec(db, "CREATE TABLE IF NOT EXISTS VehicleList (ID, Account, Model, X, Y, Z, RotZ, Colors, Upgrades, Paintjob, Cost, HP, new_hydr)") for i, player in ipairs(getElementsByType("player")) do updateVehicleInfo(player) end end) addEvent("onOpenGui", true) addEventHandler("onOpenGui", root, function() updateVehicleInfo(source) end) function destroyVehicle(theVehicle) if isElement(theVehicle) then local Owner = getElementData(theVehicle, "Owner") if Owner then local x, y, z = getElementPosition(theVehicle) local _, _, rz = getElementRotation(theVehicle) local r1, g1, b1, r2, g2, b2 = getVehicleColor(theVehicle, true) local color = r1..","..g1..","..b1..","..r2..","..g2..","..b2 upgrade = "" for _, upgradee in ipairs (getVehicleUpgrades(theVehicle)) do if upgrade == "" then upgrade = upgradee else upgrade = upgrade..","..upgradee end end local Paintjob = getVehiclePaintjob(theVehicle) or 3 local id = getElementData(theVehicle, "ID") dbExec(db, "UPDATE VehicleList SET X = ?, Y = ?, Z = ?, RotZ = ?, HP = ?, Colors = ?, Upgrades = ?, Paintjob = ?, new_hydr = ? WHERE Account = ? AND ID = ?", x, y, z, rz, getElementHealth(theVehicle), color, upgrade, Paintjob, getElementData ( theVehicle, "NewHydr") and 1 or 0, getAccountName(getPlayerAccount(Owner)), id) updateVehicleInfo(Owner) local attached = getAttachedElements(theVehicle) if (attached) then for k,element in ipairs(attached) do if getElementType(element) == "blip" then destroyElement(element) end end end end destroyElement(theVehicle) end end addEvent("onBuyNewVehicle", true) addEventHandler("onBuyNewVehicle", root, function(Model, cost, r1, g1, b1, r2, g2, b2) abc = false local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ?", getAccountName(getPlayerAccount(source))), -1) for i, data in ipairs (data) do if data["Model"] == Model then abc = true break end end if #data >= 10 then exports.Scripts_Dxmessages:outputDx ( source, "Desculpe, mas você só pode comprar 10 veículos.","error" ) return end if abc then exports.Scripts_Dxmessages:outputDx ( source, "você já tem este veículo", "error" ) return end if getPlayerMoney(source) >= tonumber(cost) then takePlayerMoney ( source, cost ) local x, y, z = getElementPosition(source) local _, _, rz = getElementRotation(source) local shopID = getElementData ( source, "atVehShop") local color = r1..","..g1..","..b1..","..r2..","..g2..","..b2 if shopID and shopsVehSpawns[shopID] then vehicle = createVehicle(Model, shopsVehSpawns[shopID][1], shopsVehSpawns[shopID][2], shopsVehSpawns[shopID][3], shopsVehSpawns[shopID][4], shopsVehSpawns[shopID][5], shopsVehSpawns[shopID][6]) else vehicle = createVehicle(Model, x-5, y+5, z, 0, 0, rz) end setVehicleColor(vehicle, r1, g1, b1, r2, g2, b2) setElementData(vehicle, "Owner", source) local NewID = getFreeID() setElementData(vehicle, "ID", NewID) dbExec(db, "INSERT INTO VehicleList VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", NewID, getAccountName(getPlayerAccount(source)), Model, x-5, y+5, z, rz, color, "", 3, cost, 1000, 0) exports.Scripts_Dxmessages:outputDx ( source, "Comprou este carro por: R$"..cost, "success" ) updateVehicleInfo(source) setElementData(vehicle, "ownercar", getAccountName(getPlayerAccount(source))) warpPedIntoVehicle ( source, vehicle ) vv[vehicle] = setTimer(function(source) if not isElement(source) then killTimer(vv[source]) vv[source] = nil end if isElement(source) and getElementHealth(source) <= 255 then setElementHealth(source, 255.5) setVehicleDamageProof(source, true) setVehicleEngineState(source, false) end end, 150, 0, vehicle) addEventHandler("onVehicleDamage", vehicle, function(loss) local account = getAccountName(getPlayerAccount(getElementData(source, "Owner"))) setTimer(function(source) if isElement(source) then dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND Model = ?", getElementHealth(source), account, getElementModel(source)) updateVehicleInfo(getElementData(source, "Owner")) end end, 100, 1, source) end) addEventHandler("onVehicleEnter", vehicle, function(player) if getElementHealth(source) <= 255.5 then setVehicleEngineState(source, false) else if isVehicleDamageProof(source) then setVehicleDamageProof(source, false) end end end) else exports.Scripts_Dxmessages:outputDx ( source, "Você não tem grana para comprar este veiculo.", "error" ) end end) vv = {} addEvent("SpawnMyVehicle", true) addEventHandler("SpawnMyVehicle", root, function(id) local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "table" and #data ~= 0 then if getVehicleByID(id) then exports.Scripts_Dxmessages:outputDx ( source, "seu veiculo "..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." já está spawnado", "error" ) else local color = split(data[1]["Colors"], ',') r1 = color[1] or 255 g1 = color[2] or 255 b1 = color[3] or 255 r2 = color[4] or 255 g2 = color[5] or 255 b2 = color[6] or 255 vehicle = createVehicle(data[1]["Model"], data[1]["X"], data[1]["Y"], data[1]["Z"], 0, 0, data[1]["RotZ"]) setElementData(vehicle, "ID", id) local upd = split(tostring(data[1]["Upgrades"]), ',') for i, upgrade in ipairs(upd) do addVehicleUpgrade(vehicle, upgrade) end local Paintjob = data[1]["Paintjob"] or 3 setVehiclePaintjob(vehicle, Paintjob) setVehicleColor(vehicle, r1, g1, b1, r2, g2, b2) if tonumber(data[1]["HP"]) <= 255.5 then data[1]["HP"] = 255 end if data[1]["new_hydr"] and data[1]["new_hydr"] == 1 then setElementData(vehicle, "NewHydr", true) else setElementData(vehicle, "NewHydr", false) end setElementData(vehicle, "ownercar", getAccountName(getPlayerAccount(source))) setElementHealth(vehicle, data[1]["HP"]) setElementData(vehicle, "Owner", source) vv[vehicle] = setTimer(function(source) if not isElement(source) then killTimer(vv[source]) vv[source] = nil end if isElement(source) and getElementHealth(source) <= 255 then setElementHealth(source, 255.5) setVehicleDamageProof(source, true) setVehicleEngineState(source, false) end end, 50, 0, vehicle) addEventHandler("onVehicleDamage", vehicle, function(loss) local account = getAccountName(getPlayerAccount(getElementData(source, "Owner"))) setTimer(function(source) if isElement(source) then dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND Model = ?", getElementHealth(source), account, getElementModel(source)) updateVehicleInfo(getElementData(source, "Owner")) end end, 100, 1, source) end) addEventHandler("onVehicleEnter", vehicle, function(player) if getElementHealth(source) <= 255.5 then setVehicleEngineState(source, false) else if isVehicleDamageProof(source) then setVehicleDamageProof(source, false) end end end) exports.Scripts_Dxmessages:outputDx ( source, "seu veiculo "..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." foi spawnado", "success" ) end else exports.Scripts_Dxmessages:outputDx ( source, "Há um problema com o veiculo, notifique o administrador. ","error") end end) addEvent("DestroyMyVehicle", true) addEventHandler("DestroyMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "table" and #data ~= 0 then destroyVehicle(vehicle) outputMessage ("#c1c1c1O seu veiculo #00FF66"..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." #c1c1c1foi removido.", source, 38, 122, 216, true) else outputMessage("#c1c1c1Selecione um veiculo.", source, 38, 122, 216, true) end else outputMessage("#c1c1c1O seu veiculo não foi spawnado.", source, 38, 122, 216, true) end end) addEvent("LightsMyVehicle", true) addEventHandler("LightsMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then local Vehicle = getPedOccupiedVehicle(source) if Vehicle == vehicle then if getVehicleOverrideLights(vehicle) ~= 2 then setVehicleOverrideLights(vehicle, 2) exports.Scripts_Dxmessages:outputDx ( source, "seu veículo "..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).. " teve as luzes acesas.", "success" ) elseif getVehicleOverrideLights(vehicle) ~= 1 then setVehicleOverrideLights(vehicle, 1) exports.Scripts_Dxmessages:outputDx ( source, "seu veículo "..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).. " as luzes apagadas.", "success" ) end else exports.Scripts_Dxmessages:outputDx ( source, "Você não está no veiculo! ", "error" ) end else exports.Scripts_Dxmessages:outputDx ( source, "Seu veiculo não está spawnado!", "error" ) end end) addEvent("LockMyVehicle", true) addEventHandler("LockMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then if not isVehicleLocked(vehicle) then setVehicleLocked(vehicle, true) setVehicleDoorsUndamageable(vehicle, true) setVehicleDoorState(vehicle, 0, 0) setVehicleDoorState(vehicle, 1, 0) setVehicleDoorState(vehicle, 2, 0) setVehicleDoorState(vehicle, 3, 0) exports.Scripts_Dxmessages:outputDx ( source, "Seu veículo "..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." foi fechado", "success" ) elseif isVehicleLocked(vehicle) then setVehicleLocked(vehicle, false) setVehicleDoorsUndamageable(vehicle, false) exports.Scripts_Dxmessages:outputDx ( source, "Seu veículo "..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." foi aberto.", "success") end else exports.Scripts_Dxmessages:outputDx ( source, "Seu veículo não foi spawnado", "error") end end) addEvent("BlipMyVehicle", true) addEventHandler("BlipMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then if not getElementData(vehicle, "ABlip") then setElementData(vehicle, "ABlip", true) createBlipAttachedTo(vehicle, 0, 2, 255, 0, 0, 255, 0, 65535, source) exports.Scripts_Dxmessages:outputDx ( source, "seu veiculo "..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).. "foi marcado no radar/mapa para ver no mapa tecle f11.", "success" ) else local attached = getAttachedElements(vehicle) if (attached) then for k,element in ipairs(attached) do if getElementType(element) == "blip" then destroyElement(element) end end end setElementData(vehicle, "ABlip", false) exports.Scripts_Dxmessages:outputDx ( source, "Seu veículo "..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." Teve o blip removido", "success" ) end else exports.Scripts_Dxmessages:outputDx ( source, "seu veiculo não está spawnado. ", "error" ) end end) addEvent("FixMyVehicle", true) addEventHandler("FixMyVehicle", root, function(id) if getPlayerMoney(source) >= tonumber(200) then takePlayerMoney ( source, 200 ) local vehicle = getVehicleByID(id) if isElement(vehicle) then fixVehicle(vehicle) setVehicleEngineState(vehicle, true) if isVehicleDamageProof(vehicle) then setVehicleDamageProof(vehicle, false) end end dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND ID = ?", 1000, getAccountName(getPlayerAccount(source)), id) updateVehicleInfo(source) exports.Scripts_Dxmessages:outputDx ( source, "Seu veículo não foi spawnado!", "error" ) else exports.Scripts_Dxmessages:outputDx ( source, "Preço: $200", "error" ) end end) addEvent("WarpMyVehicle", true) addEventHandler("WarpMyVehicle", root, function(id) if not isPedInVehicle (source) then if getElementInterior(source) == 0 then if getPlayerMoney(source) >= tonumber(200) then local vehicle = getVehicleByID(id) if isElement(vehicle) then randomizar = math.random(1,14) takePlayerMoney ( source, 200 ) local x, y, z = getElementPosition(source) if randomizar == 1 then setElementPosition(vehicle, 1650.1873779297, -1079.98046875, 24) setVehicleRotation(vehicle, 0,0,90) elseif randomizar == 2 then setElementPosition ( vehicle, 1650, -1084.5, 24 ) setVehicleRotation(vehicle, 0,0,90) elseif randomizar == 3 then setElementPosition ( vehicle, 1650.0380859375, -1088.8176269531, 24 ) setVehicleRotation(vehicle, 0,0,90) elseif randomizar == 4 then setElementPosition ( vehicle, 1650.6478271484, -1093.6756591797, 24 ) setVehicleRotation(vehicle, 0,0,90) elseif randomizar == 5 then setElementPosition ( vehicle, 1650.2822265625, -1098.005859375, 24) setVehicleRotation(vehicle, 0,0,90) elseif randomizar == 6 then setElementPosition ( vehicle, 1650.3765869141, -1102.4530029297, 24 ) setVehicleRotation(vehicle, 0,0,90) elseif randomizar == 7 then setElementPosition ( vehicle, 1649.8811035156, -1106.9301757813, 24 ) setVehicleRotation(vehicle, 0,0,90) elseif randomizar == 8 then setElementPosition ( vehicle, 1650.0562744141, -1111.576171875, 24) setVehicleRotation(vehicle, 0,0,90) elseif randomizar == 9 then setElementPosition ( vehicle, 1629.3199462891, -1085.0458984375, 24 ) setVehicleRotation(vehicle, 0,0,270) elseif randomizar == 10 then setElementPosition ( vehicle, 1629.0223388672, -1089.7844238281, 24 ) setVehicleRotation(vehicle, 0,0,270) elseif randomizar == 11 then setElementPosition ( vehicle, 1628.6702880859, -1094.4211425781, 24 ) setVehicleRotation(vehicle, 0,0,270) elseif randomizar == 12 then setElementPosition ( vehicle, 1628.34375, -1098.7193603516, 24) setVehicleRotation(vehicle, 0,0,270) elseif randomizar == 13 then setElementPosition ( vehicle, 1628.1042480469, -1103.1959228516, 24 ) setVehicleRotation(vehicle, 0,0,270) elseif randomizar == 14 then setElementPosition ( vehicle, 1628.5856933594, -1107.6346435547, 24 ) setVehicleRotation(vehicle, 0,0,270) end exports.Scripts_Dxmessages:outputDx ( source, "Seu veículo "..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).. " foi teletransportado para o patio por $200", "success" ) else exports.Scripts_Dxmessages:outputDx ( source, "seu veiculo não está spawnado. ", "error" ) end else exports.Scripts_Dxmessages:outputDx ( source, "Você não tem dinheiro o suficiente para enviar o carro para o patio!","error" ) end else exports.Scripts_Dxmessages:outputDx ( source, "Você só poderá mudar de veículo caso saia do atual!","error" ) end else exports.Scripts_Dxmessages:outputDx ( source, "Saia do carro para conseguir mover o carro para o patio!","error" ) end end) addEvent("SellMyVehicle", true) addEventHandler("SellMyVehicle", root, function(id) local vehicle = getVehicleByID(id) local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "table" and #data ~= 0 then local Money = math.ceil((data[1]["Cost"]*.9)*math.floor(data[1]["HP"])/100/10) givePlayerMoney (source, Money) if isElement(vehicle) then destroyElement(vehicle) end dbExec(db, "DELETE FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id) updateVehicleInfo(source) exports.Scripts_Dxmessages:outputDx ( source, "Você vendeu o seu veículo por $"..Money,"success" ) end end) function getDataOnLogin(_, account) updateVehicleInfo(source) end addEventHandler("onPlayerLogin", root, getDataOnLogin) function SaveVehicleDataOnQuit() for i, veh in ipairs (getElementsByType("vehicle")) do if getElementData(veh, "Owner") == source then destroyVehicle(veh) end end end addEventHandler("onPlayerQuit", root,SaveVehicleDataOnQuit) addEvent("inviteToBuyCarSended", true) addEventHandler("inviteToBuyCarSended", root, function(player, price, veh_name, veh_id) if player and price and veh_name and veh_id then local pl = getPlayerFromName ( player ) if pl then triggerClientEvent ( pl, "recieveInviteToBuyCar", pl, getPlayerName (source), getAccountName(getPlayerAccount(source)), price, veh_name, veh_id ) else exports.Scripts_Dxmessages:outputDx ( source, "jogador não foi encontrado, a venda foi cancelada","success" ) triggerClientEvent ( source, "cleanCarInvitations", source ) end end end) addEvent("invitationBuyCarNotAccepted", true) addEventHandler("invitationBuyCarNotAccepted", root, function(player, acc, price, veh_name, veh_id) local pl = getPlayerFromName ( player ) if pl then triggerClientEvent ( pl, "cleanCarInvitations", pl ) exports.Scripts_Dxmessages:outputDx ( source, "Você não tem dinheiro suficiente!","error" ) end end) addEvent("invitationBuyCarAccepted", true) addEventHandler("invitationBuyCarAccepted", root, function(player, acc, price, veh_name, veh_id) local pl = getPlayerFromName ( player ) local avail = false local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ?", getAccountName(getPlayerAccount(source))), -1) for i, data in ipairs (data) do if data["Model"] == Model then abc = true break end end if #data >= 10 then exports.Scripts_Dxmessages:outputDx ( source, "Desculpe, mas você só pode comprar 10 veículos.","error" ) return end if pl and getAccountName ( getPlayerAccount (pl)) == acc then avail = true triggerClientEvent ( pl, "cleanCarInvitations", pl ) else for i, v in ipairs( getElementsByType ( 'player' ) ) do if getAccountName(getPlayerAccount ( v )) == acc then avail = true pl = v break end end end price = tonumber(price) or 0 if avail then if isGuestAccount ( getPlayerAccount ( source ) ) then triggerClientEvent ( pl, "cleanCarInvitations", pl ) exports.Scripts_Dxmessages:outputDx ( source, "Você não está logado em sua conta, a transação foi cancelada","error" ) return true end if getPlayerMoney ( source ) >= price then local vehicle = getVehicleByID(tonumber(veh_id)) local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(pl)), veh_id), -1) if type(data) == "table" and #data ~= 0 and isElement ( vehicle ) then givePlayerMoney ( pl, price ) takePlayerMoney ( source, price ) dbExec(db, "UPDATE VehicleList SET Account = ? WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), getAccountName(getPlayerAccount(pl)), veh_id) updateVehicleInfo(source) updateVehicleInfo(pl) setElementData(vehicle, "Owner", source) setElementData(vehicle, "ownercar", getAccountName(getPlayerAccount(source))) exports.Scripts_Dxmessages:outputDx ( source, "Você vendeu o seu veiculo por $"..price,"success" ) triggerClientEvent ( pl, "cleanCarInvitations", pl ) else exports.Scripts_Dxmessages:outputDx ( source, "Veículo não encontrado, negócio cancelado!","error" ) triggerClientEvent ( pl, "cleanCarInvitations", pl ) end else exports.Scripts_Dxmessages:outputDx ( source, "Você não tem dinheiro suficiente, a transação foi cancelada","success" ) end else exports.Scripts_Dxmessages:outputDx ( source, "O jogador não foi encontrado, a operação foi cancelada","success" ) end end)
-
obrigado : )
-
Olá, gostaria de saber como deixo um blip fixo, após um jogador atirar aparece onde ele está, eu gostaria de por pra fixar o local, pra não ter a localizacão exata do jogador tiro = 0 Acl = "Console" function test (weapon, endX, endY, endZ, hitElement, startX, startY, startZ) local x, y, z = getElementPosition(source) local loc = getZoneName ( x, y, z ) local city = getZoneName ( x, y, z, true ) for i, player in ipairs (getElementsByType ("player")) do if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (player)), aclGetGroup (Acl)) then if tiro == 0 then exports.Res_dxmessages:outputDx(player, "Denuncia de Tiros Em "..loc.." ("..city..")", "info") local blip = createBlipAttachedTo ( source, 30 ) setElementVisibleTo(blip, root, false) setElementVisibleTo(blip, player, true) setTimer ( function() destroyElement(blip) end, 60000, 1) tiro = 0 end end end end addEventHandler ("onPlayerWeaponFire", root, test )
-
Olá, Estou com um script do jogador voar (para staff's), gostaria de saber como ativo pro staff poder atirar enquanto voa, se possivel me digam como : )
-
Olá, Gostaria de saber como faço para somente staff's poder ver os nomes dos jogadores no chat anonimo, assim o staff poderá punir o jogador que está ofendendo outros ---Nome dos Chats chat1 = "Twitter" -- Nome Livre chat2 = "Anônimo" -- Nome oculto chat3 = "Fora RP" -- Nome Livre chat4 = "Local" -- Nome Livre ---------TWITTER function MensagemTwitter(source, cmd, ...) local MessagemT = table.concat ( { ... }, " " ) local name = getPlayerName(source); for _,v in ipairs(getElementsByType("player")) do outputChatBox("#00BFFF[ "..chat1.." ]#FFFFFF "..name.." #FFFFFF: #00BFFF"..MessagemT,v, 255, 255, 255, true) --efeito no chat end end addCommandHandler("twitter", MensagemTwitter) addCommandHandler("Twitter", MensagemTwitter) addCommandHandler("TWITTER", MensagemTwitter) -------------Anonimo function MensagemAnon(source, cmd, ...) local MessagemANS = table.concat ( { ... }, " " ); for _,v in ipairs(getElementsByType("player")) do outputChatBox("#000000[ #000000"..chat2.."#000000 ] #000000"..MessagemANS,v, 255, 255, 255, true) --efeito no chat end end addCommandHandler("ilegal", MensagemAnon) addCommandHandler("Ilegal", MensagemAnon) addCommandHandler("ILEGAL", MensagemAnon) ----------------Fora do RP function MensagemRP(source, cmd, ...) local MessagemFRP = table.concat ( { ... }, " " ); local name = getPlayerName(source); for _,v in ipairs(getElementsByType("player")) do outputChatBox("#FB0000[ #ffffff"..chat3.."#FB0000 ] "..name.." #ffffff"..MessagemFRP,v, 255, 255, 255, true) --efeito no chat end end addCommandHandler("forarp", MensagemRP) addCommandHandler("Forarp", MensagemRP) addCommandHandler("FORARP", MensagemRP)
