Wysłany: 2014-08-24, 22:17
Dixers
No-Life
Wiek: 26 Na forum: 4312 dni Posty: 549
Nick w MP: Dixers
Piwa : 412
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 i reputacja +
Wysłany: 2014-08-25, 01:12
PafelxD
Wiek: 29 Na forum: 4302 dni Posty: 2
Nick w MP: Pafel
Piwa : 1
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" , getResourceRootElement ( getThisResource ()),
function()
-- Create shader
shader_cinema , tec = dxCreateShader ( "texreptransform.fx" )
if not shader_cinema then return end
-- If the image is too bright , you can darken it
dxSetShaderValue ( shader_cinema , "gBrighten" , - 0.25 )
-- Set the angle , grayscaled , rgb
dxSetShaderValue ( shader_cinema , "gRotAngle" , radian )
dxSetShaderValue ( shader_cinema , "gGrayScale" , 0 )
dxSetShaderValue ( shader_cinema , "gRedColor" , 0 )
dxSetShaderValue ( shader_cinema , "gGrnColor" , 0 )
dxSetShaderValue ( shader_cinema , "gBluColor" , 0 )
-- Set image alpha ( 1 max )
dxSetShaderValue ( shader_cinema , "gAlpha" , 1 )
-- 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
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
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%
Wysłany: 2014-08-25, 11:47
Dixers
No-Life
Wiek: 26 Na forum: 4312 dni Posty: 549
Nick w MP: Dixers
Piwa : 412
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
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?
Wysłany: 2014-08-25, 12:53
kubak14
Wiek: 24 Na forum: 5205 dni Posty: 119
Nick w MP: Heavy
Piwa : 149
Dixers , po co si? bierzesz za skrypty jak masz 0 poj?cia o programowaniu te i to jest funkcja...
Wysłany: 2014-08-25, 15:48
Dixers
No-Life
Wiek: 26 Na forum: 4312 dni Posty: 549
Nick w MP: Dixers
Piwa : 412
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?
Tagi: reklamy :: mta
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: