Jump to content

Kpds

Members
  • Posts

    7
  • Joined

  • Last visited

Details

  • Gang
    MTA:SA BR
  • Location
    Brasil
  • Occupation
    novato
  • Interests
    scripts

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Kpds's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. Não estou conseguindo colocar apenas para a ACL "Superior" conseguir mandar anuncio na tela com um Script que peguei na internet alguém ajuda?? Arquivos que contém dentro da pasta, todos os scripts fazem parte do mesmo mod, mas veem em arquivos .lua diferentes. SCR 1 addCommandHandler( global.Comando, function(playerSource, cmd, ...) local text = table.concat({...}, " ") if text then local namePlayer = getPlayerName(playerSource) triggerClientEvent(root, "KKZinho:AnunciarStaff", playerSource, namePlayer, text) end end) SCR 2 global = { ["Duracao"] = 3, -- Duração na tela em segundos. ["Comando"] = "anuncio", -- Comando utilizado. } SCR 3 local screenW,screenH = guiGetScreenSize() local resW,resH = 1366,768 local x,y = (screenW/resW), (screenH/resH) local font = dxCreateFont( "assets/font.ttf", 10 ) local pos_x = x*0 local pos_x2 = x*0 local pos_x3 = x*0 local painelAnuncio = false function drawDx() dxDrawImage(x*20, y*284, x*280, y*200, "assets/main.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(sendMessage, pos_x2, y*329, x*282, y*468, tocolor(255, 255, 255, 255), 1.00, font, "left", "top", false, true, false, false, false) dxDrawText("@"..nameSender.." #ffffffanunciou:", pos_x3, y*298, x*232, y*317, tocolor(255, 255, 255, 255), 1.00, font, "left", "top", false, true, false, true, false) end function animateDraw() local initialTime = getTickCount() local duration = 1500 function animateInitial() local currentTime = getTickCount() local passedTime = currentTime - initialTime if passedTime >= global.Duracao*1000 then removeEventHandler("onClientRender", root, animateInitial) removeEventHandler("onClientRender", root, drawDx) painelAnuncio = false end local progress = passedTime / duration pos_x = interpolateBetween(0, 0, 0, 20, 0, 0, progress, "OutElastic") pos_x2 = interpolateBetween(0, 0, 0, 33, 0, 0, progress, "OutElastic") pos_x3 = interpolateBetween(0, 0, 0, 89, 0, 0, progress, "OutElastic") setTimer( function() pos_x = interpolateBetween(20, 0, 0, 0, 0, 0, progress, "InElastic") pos_x2 = interpolateBetween(33, 0, 0, 0, 0, 0, progress, "InElastic") pos_x3 = interpolateBetween(89, 0, 0, 0, 0, 0, progress, "InElastic") end, global.Duracao*1000, 1) end if not painelAnuncio then addEventHandler("onClientRender", root, animateInitial) addEventHandler("onClientRender", root, drawDx) painelAnuncio = true end end function callAll(senderName, messageSend) if senderName then if messageSend then nameSender = senderName sendMessage = messageSend animateDraw() playSoundFrontEnd(4) end end end addEvent("KKZinho:AnunciarStaff", true) addEventHandler("KKZinho:AnunciarStaff", getRootElement(), callAll) meta <meta> <script src="KakaG.lua" type="shared"/> <script src="KakaC.lua" type="client"/> <script src="KakaS.lua" type="server"/> <file src="assets/main.png"/> <file src="assets/font.ttf"/> </meta>
  2. Estou tentando criar um script que deixa o tempo do servidor sempre de noite, mas estou tendo dificuldades, alguém me ajuda??
  3. assim?? addEventHandler("onResourceStart", resourceRoot, function() setWeaponProperty(31, "pro", "weapon_range", 600) setWeaponProperty(31, "std", "weapon_range", 600) setWeaponProperty(31, "poor", "weapon_range", 600) setWeaponProperty(31, "pro", "maximum_clip_ammo", 35) setWeaponProperty(31,"std", "maximum_clip_ammo", 35) setWeaponProperty(31,"poor", "maximum_clip_ammo", 35) setWeaponProperty(31, "pro", "target_range", 600) setWeaponProperty(31, "std", "target_range", 600) setWeaponProperty(31, "poor", "target_range", 600)
  4. ESTOU COLOCANDO ISSO NO server.lua mas parece que não ta funcionando, ajuda pfv!! addEventHandler("onResourceStart", resourceRoot, function() setWeaponProperty("31", "pro", "weapon_range", 400) setWeaponProperty("31", "std", "weapon_range", 400) setWeaponProperty("31", "poor", "weapon_range", 400) setWeaponProperty("31", "pro", "maximum_clip_ammo", 35) setWeaponProperty("31","std", "maximum_clip_ammo", 35) setWeaponProperty("31","poor", "maximum_clip_ammo", 35) setWeaponProperty("31", "pro", "target_range", 400) setWeaponProperty("31", "std", "target_range", 400) setWeaponProperty("31", "poor", "target_range", 400) end )
×
×
  • Create New...