Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2014-08-24, 22:17


Dixers

No-Life






Wiek: 26
Na forum: 4312 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

Witam serdecznie. Mam do was pytanie. Jak zrobi?, ?eby reklamy na bilbordach by?y takie jakie ja chce. Wiem ?e tak si? da, na innych serwerach s? tam r??ne reklamy. Prosz? was o informacje, czy robi to si? za pomoc? skryptu, czy graficznie. Je?li jednak skryptu prosz? mi napisa? jaka funkcja. Jednak je?li graficznie te? prosz? opisa? gdzie to podmieni?. Za pomoc oczywi?cie :piwo: i reputacja +

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-08-25, 01:12


PafelxD







Wiek: 29
Na forum: 4302 dni
Posty: 2
Nick w MP: Pafel

Piwa: 1

Respekt: -32

chodzi ci o skrypt Baner_system tak?
Kt?ry bd wy?wietla? to co ty chcesz na bilbordzie w SF tak?

wklej to do lua Client
--Shader cinema FL
--based on nyan resource by Gamesnert

local shader_cinema
local image_list     2
local frequencyTic   5000
local numberTex      = { }
local numberId       1
local getLastTick getTickCount ( )
local getLastTock getTickCount ( )
local totalTickCount,singleTickCount 0,0
local frames,lastsec=0,0,0
local numberOd image_list
--set the rotation angle
local radian=math.rad(0)
 
addEventHandler"onClientResourceStart"getResourceRootElementgetThisResource()),
    function()
        -- Create shader
        shader_cinematec dxCreateShader "texreptransform.fx" )
        if not shader_cinema then return end
        -- If the image is too brightyou can darken it
        dxSetShaderValue shader_cinema"gBrighten", -0.25 )
        -- Set the anglegrayscaledrgb
        dxSetShaderValue shader_cinema"gRotAngle"radian )
        dxSetShaderValue shader_cinema"gGrayScale")
        dxSetShaderValue shader_cinema"gRedColor")
        dxSetShaderValue shader_cinema"gGrnColor")
        dxSetShaderValue shader_cinema"gBluColor")
        -- Set image alpha (1 max)
        dxSetShaderValue shader_cinema"gAlpha")
        -- Set scrolling (san set negative and positive values)
        dxSetShaderValue shader_cinema"gScrRig",  0)
        dxSetShaderValue shader_cinema"gScrDow"0)
        -- Scale and offset (don't need to change that)
        dxSetShaderValue ( shader_cinema, "gHScale", 1 )
        dxSetShaderValue ( shader_cinema, "gVScale", 1 )
        dxSetShaderValue ( shader_cinema, "gHOffset", 0 )
        dxSetShaderValue ( shader_cinema, "gVOffset", 0 ) 
        if not shader_cinema then
            return
        else
            engineApplyShaderToWorldTexture ( shader_cinema, "drvin_screen" )    
            if not loadCinemaTextures ( ) then
                
                destroyElement ( shader_cinema )
                return
            end
            addEventHandler ( "onClientHUDRender", getRootElement (), renderScreen )
        end
    end
)

function loadCinemaTextures ( )
    -- Textures to load
for i = 0, image_list do
  local tex = dxCreateTexture ( "shader_cinema_images/"..i..".jpg" )        
   if not tex then
    unloadTextures ( )
    return false
    end
   table.insert ( numberTex, tex )
   end
  return true
end

function unloadTextures ( )
 for index, tex in ipairs ( numberTex ) do
 destroyElement ( tex )
 end
end

-- renders and counts frames
function renderScreen ( )
    if getTickCount ( ) - getLastTick < frequencyTic  then return end
    -- Play movie sound on first frame   
    if numberId <numberOd then 
----outputChatBox('Movie cycle'..((getTickCount ( ) - getLastTock)/1000)..' s')
    getLastTock=getTickCount ( )
    --change seek position of the sound element
   
    end
    if numberOd<image_list then 
    if ((getTickCount ( ) - getLastTick))-frequencyTic>0 then
    singleTickCount=((getTickCount ( ) - getLastTick)-frequencyTic)/(frequencyTic)
    totalTickCount=totalTickCount+singleTickCount
     if totalTickCount>1 then 
     numberId = numberId + math.floor(totalTickCount) 
-----outputChatBox('First frame ommited'..numberId..' Frames total'..math.floor(totalTickCount)) 
     totalTickCount=totalTickCount-math.floor(totalTickCount)     
     end 
    end
    end
    numberOd=numberId
    numberId = numberId + 1
    if numberId > #numberTex then
        numberId = numberId - #numberTex
    end
    getLastTick = getTickCount ( )
    if not numberTex [ numberId ] then return end
    dxSetShaderValue ( shader_cinema, "gTexture", numberTex [ numberId ] )          
end

i graficznie napis JPEG i wszystko na temat ;)

Ostatnio zmieniony przez PafelxD 2014-08-25, 13:19, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-08-25, 08:49


|Mlody|

Szatan ponad Szatana






Wiek: 30
Na forum: 4375 dni
Posty: 60
Nick w MP: Akiver

Piwa: 205

Respekt: 52,5

Pafel widze z ciebie taki programista, ze jak czytam twoje posty to nie chce mi sie nawet programowac mojego serwera.. Jak piszesz kod to dawaj [lua][/lua]

Podpis

Fast Life RPG |GTA V - Misje, napady na banki, wyścigi i wiele innych atrakcji|NFS - Stwórz swoją anarchię, zostań królem wyścigów, zdobywaj osiągnięcia.. Fast Life RPG - 20%
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-08-25, 11:47


Dixers

No-Life






Wiek: 26
Na forum: 4312 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8


function loadCinemaTextures ( ) 
-- Textures to load 
for 0image_list do 
local tex dxCreateTexture "shader_cinema_images/"..i..".jpg" )    
if not tex then 
unloadTextures ( ) 
return false 
end 
table.insert numberTextex end 
return true 
end 

Mam kawa?ek tego, tam gdzie jest local tex = dxCreateTexture ( "shader_cinema_images/"..i..".jpg" ) w miesjce tych kropek i i mam wpisa? nazwe .jpg?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-08-25, 12:53


kubak14







Wiek: 24
Na forum: 5205 dni
Posty: 119
Nick w MP: Heavy

Piwa: 149

Respekt: 45,8

Ostrzeżeń: 20%
Dixers, po co si? bierzesz za skrypty jak masz 0 poj?cia o programowaniu te i to jest funkcja...

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-08-25, 15:48


Dixers

No-Life






Wiek: 26
Na forum: 4312 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

kubak14, mo?e nie naskakuj tak? To 0 to ja nie mam okej? Po prostu z tym skryptem nigdy nie mia?em do czynienie. Lukn??em szybko i od razu zapyta?em. Wi?c mo?e b?dziesz troch? milszy nast?pnym razem co?

Postaw piwo autorowi tego posta
 

 
Tagi: reklamy :: mta
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Reklamy mta Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku