Szerző Téma: Regisztáció. InGame or UCP  (Megtekintve 1342 alkalommal)

Regisztáció. InGame or UCP
« Dátum: 2014. október 26. - 21:03:56 »
0 Show voters
Sziasztok. Olyan dologban kérnék segítséget hogy.... Nincs meg az ucp sql-je ezért nem lehet ugye UCP-n karaktert létrehozni. InGame pedig azt írja hozz létre UCP-n. De viszont resources-be meg van írva a regisztráció InGamehez. Mit kell ahhoz át írni hogy működjön is.?  :)
 

local screenX,screenY = guiGetScreenSize ()
local interiorLoadingGui = {}
local interiorLoadingGuiState = false
local interiorsLoaded = false
local sx,sy = guiGetScreenSize ()
local interiorLoadingStartTick = 0
local code = math.random(1,9599)
function createInteriorLoadingGui (state)
if interiorLoadingGuiState ~= state then
if state == true then
   local width,height = 350,150
   local x,y = sx/2-width/2,sy/2-height/2
   interiorLoadingGui.window = guiCreateWindow (x,y,width,height,\"Szinkronizálás\",false)
   interiorLoadingGui.txt1 = guiCreateLabel (10,25,width-20,height-25,\"Az adatok szinkronizálása folyamatban van. \\nTürelmedet kérjük.\",false,interiorLoadingGui.window)
   guiLabelSetHorizontalAlign (interiorLoadingGui.txt1,\"center\")
   guiLabelSetVerticalAlign (interiorLoadingGui.txt1,\"top\")
   interiorLoadingGuiState = true
elseif state == false then
   guiSetText (interiorLoadingGui.txt1,\"Az adatok szinkronizálása \"..code..\" ms-ig tartott.\")
   setTimer (
      function ()
         destroyElement (interiorLoadingGui.window)
         interiorLoadingGui = {}
         interiorLoadingGuiState = false
      end
   ,2000,1)
end
end
end
addEventHandler (\"onClientResourceStart\",getResourceRootElement(getThisResource()),
function ()
setTimer (createInteriorLoadingGui,100,1,true)
end
)
addEventHandler (\"onClientResourceStart\",getResourceRootElement(getThisResource()),
function ()
setTimer (createInteriorLoadingGui,2000,1,false)
end
)
 
local sw,sh = guiGetScreenSize()
local musicElement = false
function playLSMusic ()
musicElement = playSound (\"files/intro.mp3\")
setSoundVolume (musicElement,3.0)
end
function setLSMusicVolume (vol)
setSoundVolume (musicElement,vol)
end
function stopLSMusic ()
destroyElement (musicElement)
musicElement = false
end
local sx,sy = guiGetScreenSize ()
local myScreenSource = dxCreateScreenSource( sx/2, sy/2 )
local blurHShader,tecName = dxCreateShader( \"files/blurH.fx\" )
local blurVShader,tecName = dxCreateShader( \"files/blurV.fx\" )
function renderBlur()
local col = tocolor (255,255,255,255)
local colForBackground = tocolor (255,255,255,255*0.85)
RTPool.frameStart()
dxUpdateScreenSource( myScreenSource )
local current = myScreenSource
current = applyDownsample( current )
current = applyGBlurH( current, Settings.var.bloom )
current = applyGBlurV( current, Settings.var.bloom )
dxSetRenderTarget()
dxDrawImage( 0, 0, sx, sy, current, 0,0,0, col )
end
downBox = {}
downBox.path = \"\"
downBox.show = false
downBox.state = nil
downBox.string = nil
downBox.starTick = nil
downBox.currentY = nil
downBox.time = 1000
downBox.next = nil
downBox.nextPath = \"\"
downBox.timer = nil
downBox.startY = -60
downBox.stopY = 120
function destroyBox()
downBox.show = false
end
function stopNameChange(oldNick, newNick)
if (source==getLocalPlayer()) then
local legitNameChange = getElementData(getLocalPlayer(), \"legitnamechange\")
if (oldNick~=newNick) and (legitNameChange==0) then
   triggerServerEvent(\"charChangeName\", getLocalPlayer(), oldNick, newNick)
end
end
end
addEventHandler(\"onClientPlayerChangeNick\", getRootElement(), stopNameChange)
function onPlayerSpawn()
guiSetInputEnabled(false)
showCursor(false)
local interior = getElementInterior(source)
setCameraInterior(interior)
end
addEventHandler(\"onClientPlayerSpawn\", getLocalPlayer(), onPlayerSpawn)
lLostSecurityKey, tLostSecurityKey, bForgot, chkRemember, chkAutoLogin, bLogin, lLogUsername, lLogUsernameNote, tLogUsername, tLogPassword, lLogPassword, tabPanelMain, tabLogin, tabRegister, tabForgot, lRegUsername, tRegUsername, lRegUsernameNote, lRegPassword, tRegPassword, lRegPassword2, tRegPassword2, bRegister, wDelConfirmation = nil
tosversion = 101
triggerServerEvent(\"getAccurate\", getLocalPlayer(), developer)
function generateTimestamp(daysAhead)
return tostring( 50000000 + getRealTime().year * 366 + getRealTime().yearday + daysAhead )
end
function storeSalt(theSalt, theIP)
ip = theIP
salt = theSalt
createMainBoxGui(getThisResource())
end
addEvent(\"sendSalt\", true)
addEventHandler(\"sendSalt\", getRootElement(), storeSalt)
local Showed = false
local camFading = 0 -- 1 sciemnia, 2 rozjasnia
local camID = 0
local cams = {}
cams[1] = {} -- asd
cams[1][\"start\"] = {723.4638671875, -1495.8046875, 6.546875,23.700}
cams[1][\"end\"] = {724.4853515625, -1890.689453125, 6.546875,23.67}
cams[1][\"duration\"] = 150000
cams[1][\"type\"] = \"Linear\"
cams[2] = {} -- centrum
cams[2][\"start\"] = {-1940.9736328125, 187.626953125, 30.546875,23.700}
cams[2][\"end\"] = {-1945.7158203125, 38.48828125, 30.546875,23.67}
cams[2][\"duration\"] = 150000
cams[2][\"type\"] = \"Linear\"
cams[3] = {} -- mountain chilliad
cams[3][\"start\"] = {-845.126953125, -321.2587890625, 12.5468758,23.700}
cams[3][\"end\"] = {-510.0048828125, -321.658203125, 12.546875,23.67}
cams[3][\"duration\"] = 150000
cams[3][\"type\"] = \"Linear\"
cams[4] = {} -- wies
cams[4][\"start\"] = {-1940.9736328125, 187.626953125, 30.546875,23.700}
cams[4][\"end\"] = {-1945.7158203125, 38.48828125, 30.546875,23.67}
cams[4][\"duration\"] = 150000
cams[4][\"type\"] = \"Linear\"
local lastCamTick = 0
camID = math.random(1,#cams)
setCameraMatrix(cams[camID][\"start\"][1],cams[camID][\"start\"][2],cams[camID][\"start\"][3],cams[camID][\"start\"][4],cams[camID][\"start\"][5],cams[camID][\"start\"][6])
lastCamTick = getTickCount ()
screenWidth, screenHeight = guiGetScreenSize()
windowWidth, windowHeight = 950, 600
left = (screenWidth/2) - (windowWidth/2)
top = (screenHeight/2) - (windowHeight/2)
aceleft = (screenWidth/2) - (450/2)
acetop = (screenHeight/2) - (126/2)-130
tx = screenWidth / 2
ty = screenHeight / 2 + 220
sima = false
local myScreenSource = dxCreateScreenSource( sx/2, sy/2 )
local blurHShader,tecName = dxCreateShader( \"files/blurH.fx\" )
local blurVShader,tecName = dxCreateShader( \"files/blurV.fx\" )
function renderBlur()
local col = tocolor (255,255,255,255)
local colForBackground = tocolor (255,255,255,255*0.85)
RTPool.frameStart()
dxUpdateScreenSource( myScreenSource )
local current = myScreenSource
current = applyDownsample( current )
current = applyGBlurH( current, Settings.var.bloom )
current = applyGBlurV( current, Settings.var.bloom )
dxSetRenderTarget()
dxDrawImage( 0, 0, sx, sy, current, 0,0,0, col )
end
 
function createLoginGui()
    if Showed then
        return
    end
    Showed = true
playLSMusic ()
end
addEventHandler(\"onClientRender\", getRootElement(), renderBlur)
 
function updateCamPosition ()
if cams[camID] then
local cTick = getTickCount ()
local delay = cTick - lastCamTick
local duration = cams[camID][\"duration\"]
local easing = cams[camID][\"type\"]
if duration and easing then
   local progress = delay/duration
   if progress < 1 then
      local cx,cy,cz = interpolateBetween (
         cams[camID][\"start\"][1],cams[camID][\"start\"][2],cams[camID][\"start\"][3],
         cams[camID][\"end\"][1],cams[camID][\"end\"][2],cams[camID][\"end\"][3],
         progress,easing
      )
      local tx,ty,tz = interpolateBetween (
         cams[camID][\"start\"][4],cams[camID][\"start\"][5],cams[camID][\"start\"][6],
         cams[camID][\"end\"][4],cams[camID][\"end\"][5],cams[camID][\"end\"][6],
         progress,easing
      )
      setCameraMatrix (cx,cy,cz,tx,ty,tz)
      if camFading == 0 then
         local left = duration-delay
         if left <= 3000 then -- zaczyna sie sciemniac
            camFading = 1
            fadeCamera (false,3,0,0,0)
         end
      elseif camFading == 2 then -- rozjasnianie
         local left = duration-delay
         if left >= 2000 then
            camFading = 0
         end
      end
   else
      local nextID = false
      while nextID == false do
         local id = math.random(1,#cams)
         if id ~= camID then
            nextID = id
         end
      end
      camFading = 2
      fadeCamera (true,2)
      lastCamTick = getTickCount ()
      camID = nextID
      setCameraMatrix (cams[camID][\"start\"][1],cams[camID][\"start\"][2],cams[camID][\"start\"][3],cams[camID][\"start\"][4],cams[camID][\"start\"][5],cams[camID][\"start\"][6])
   end
end
end
end
 
function onLoginButtonClick (button,state)
if button == \"left\" and state == \"up\" then
if source == register1 then
   exports.box:showBox (\"info\",\"A regisztrációhoz látogass el kezelőfelületünkre:\\nwww.ucp.nemtudjukmeg.com\")
end
end
end
--function renderRegistration()
--   dxDrawRectangle(registrationData.rectangleX, registrationData.rectangleY, 331, 217, tocolor(0, 0, 0, 230), false)
--end
camID = math.random(1,#cams)
showPlayerHudComponent(\"all\", false)
setCameraMatrix(cams[camID][\"start\"][1],cams[camID][\"start\"][2],cams[camID][\"start\"][3],cams[camID][\"start\"][4],cams[camID][\"start\"][5],cams[camID][\"start\"][6])
lastCamTick = getTickCount ()
addEventHandler (\"onClientPreRender\",getRootElement(),updateCamPosition)
    showChat(false)
showCursor(true)
guiSetInputEnabled(true)
login = true
guiSetInputMode (\"no_binds_when_editing\")
image = guiCreateStaticImage(left, top, 950, 600, \"files/main.png\", false)
tLogUsername = guiCreateEdit(180, 240, 240, 28, getPlayerName(getLocalPlayer()), false, image)
tLogPassword = guiCreateEdit(180,350, 240, 28, \"\", false, image) -- Jelszó
register1 = guiCreateButton(180, 450, 240, 28, \"Regisztráció\", false, image)
bLogin = guiCreateButton(180, 400, 240, 28, \"Bejelentkezés\", false, image)
addEventHandler (\"onClientGUIClick\", register1, onLoginButtonClick,false)
guiEditSetMasked(tLogPassword, true)
guiEditSetMaxLength(tLogPassword, 40)
setWeather(7)
guiEditSetMaxLength(tLogUsername, 30)
--addEventHandler(\"onClientGUIClick\", bLogin, validateDetails, false)
function createMainBoxGui(res, isChangeAccount)
if (res==getThisResource()) then
local scrWidth, scrHeight = guiGetScreenSize()
createLoginGui()
addEventHandler(\"onClientGUIClick\", bLogin, validateDetails, false)
end
end
 
function validateDetails( bejelentkez )
if (source==bRegister) then
local username = guiGetText(tRegUsername)
local password1 = guiGetText(tRegPassword)
local password2 = guiGetText(tRegPassword2)
local password = password1 .. password2
if (string.len(username)<5) then
   exports.box:showBox(\"error\",\"A felhasználónevednek minimum 5, maximum 18 karakterből kell állnia.\")
elseif (string.find(username, \";\", 0)) or (string.find(username, \"\'\", 0)) or (string.find(username, \"@\", 0)) or (string.find(username, \",\", 0)) then
   exports.box:showBox(\"error\", \"A felhasználóneved nem tartalmazhat különleges szimbólumokat.\")
elseif (string.len(password1)<6) then
   exports.box:showBox(\"error\", \"A jelszónak minimum 6, maximum 32 karakterből kell állnia.\")
elseif (string.len(password1)>=32) then
   exports.box:showBox(\"error\", \"A jelszó maximum 32 karakter lehet.\")
elseif (string.find(password, \";\", 0)) or (string.find(password, \"\'\", 0)) or (string.find(password, \"@\", 0)) or (string.find(password, \",\", 0)) then
   exports.box:showBox(\"error\", \"A jelszavad nem tartalmazhat különleges szimbólumokat.\")
elseif (password1~=password2) then
   exports.box:showBox(\"error\", \"A megadott jelszavaknak egyezniük kell.\")
else
   triggerServerEvent(\"attemptRegister\", getLocalPlayer(), username, password1)
end
elseif (source==bLogin) or bejelentkez then
local username = guiGetText(tLogUsername)
local password = guiGetText(tLogPassword)
if (string.len(username)<3) then
   outputChatBox(\"A felhasználó nevednek minimum 3 karaktert kell tartalmaznia.\", 255, 0, 0)
elseif (string.find(username, \";\", 0)) or (string.find(username, \"\'\", 0)) or (string.find(username, \"@\", 0)) or (string.find(username, \",\", 0)) then
   exports.box:showBox(\"error\", \"A felhasználóneved nem tartalmazhat különleges szimbólumokat.\")
elseif (string.len(password)<6) then
   exports.box:showBox(\"error\", \"A jelszónak minimum 6, maximum 32 karakterből kell állnia.\")
elseif (string.find(password, \";\", 0)) or (string.find(password, \"\'\", 0)) or (string.find(password, \"@\", 0)) or (string.find(password, \",\", 0)) then
   exports.box:showBox(\"error\", \"A jelszavad nem tartalmazhat különleges szimbólumokat.\")
else
   local vinfo = getVersion()
   local operatingsystem = vinfo.os
   triggerServerEvent(\"attemptLogin\", getLocalPlayer(), username, password, operatingsystem, false)
end
end
end
 
function hideUI(regged)
removeEventHandler(\"onClientRender\", getRootElement(), renderBlur)
destroyElement(image)
if (regged) then
createMainBoxGui(getThisResource())
end
end
addEvent(\"hideUI\", true)
addEventHandler(\"hideUI\", getRootElement(), hideUI)
loaded = false
function createChar(accounts, firstTime)
dxFadeCamera (true, 1500, 0,0,0)
fadeCamera (false,1.5,0,0,0)
guiSetInputMode (\"no_binds_when_editing\")
setTimer (
function ()
   fadeCamera (true,2)
   removeEventHandler (\"onClientRender\",getRootElement(),renderBlur)
   removeEventHandler (\"onClientPreRender\",getRootElement(),updateCamPosition)
end
,1500,1)
startView()
guiSetInputMode (\"no_binds_when_editing\")
sent = false
showCursor(false)
setCameraInterior(0)
showCursor(false)
setElementData(getLocalPlayer(), \"accountpanel\", true)
setElementAlpha(getLocalPlayer(), 255)
local i = 0
loaded = false
for key, value in pairs(accounts) do
if i == 0 then
   local charname = string.gsub(tostring(accounts[key][2]), \"_\", \" \")
   local charname2 = string.gsub(tostring(accounts[key][2]), \" \", \"_\")
   local cked = tonumber(accounts[key][3])
   local area = accounts[key][4]
   local age = accounts[key][5]
   local gender = tonumber(accounts[key][6])
   local factionName = accounts[key][7]
   local factionRank = accounts[key][8]
   local skinID = tostring(accounts[key][9])
   local difference = tonumber(accounts[key][10])
   setElementModel(getLocalPlayer(), skinID)
   karakternev = charname2
   i = i + 1
   loaded = true
   local login = \"\"
   setTimer ( function()
   exports.sc_core:applyAnimation(getLocalPlayer(), \"ON_LOOKERS\", \"wave_loop\", -1, true, false, false)
   end, 5700, 1 )
end
end
if loaded then
setTimer ( function()
addEventHandler(\"onClientKey\", getRootElement(), loadChar)
end, 5700, 1 )
else
setElementModel(getLocalPlayer(), 1)
destroyBox()
loaded = true
end
end
addEvent(\"showCharacterSelection\", true)
addEventHandler(\"showCharacterSelection\", getRootElement(), createChar)
function loadChar(button, press)
if (press) and (button == \"enter\") then
guiSetInputMode (\"no_binds_when_editing\")
dxFadeCamera (true, 1500, 0,0,0)
fadeCamera (false,1.5,0,0,0)
fadeCamera (true,2)
setTimer ( function()
loadThisCharacter()
end, 1200, 1 )
end
end
triggering = false
spawned = false
function loadThisCharacter()
destroyBox()
stopView()
showChat(true)
removeEventHandler(\"onClientKey\", getRootElement(), loadChar)
triggerServerEvent(\"charSpawn\", getLocalPlayer(), karakternev, getVersion().mta)
stopLSMusic ()
end
 
bChangeChar = nil
selectedChar = nil
function resetTriggers()
triggering = false
end
------------------
-------blur-------
------------------
Settings = {}
Settings.var = {}
Settings.var.cutoff = 0
Settings.var.power = 1.88
Settings.var.bloom = 1
function applyDownsample( Src, amount )
amount = amount or 2
local mx,my = dxGetMaterialSize( Src )
mx = mx / amount
my = my / amount
local newRT = RTPool.GetUnused(mx,my)
dxSetRenderTarget( newRT )
dxDrawImage( 0, 0, mx, my, Src )
return newRT
end
function applyGBlurH( Src, bloom )
local mx,my = dxGetMaterialSize( Src )
local newRT = RTPool.GetUnused(mx,my)
dxSetRenderTarget( newRT, true )
dxSetShaderValue( blurHShader, \"tex0\", Src )
dxSetShaderValue( blurHShader, \"tex0size\", mx,my )
dxSetShaderValue( blurHShader, \"bloom\", bloom )
dxDrawImage( 0, 0, mx, my, blurHShader )
return newRT
end
function applyGBlurV( Src, bloom )
local mx,my = dxGetMaterialSize( Src )
local newRT = RTPool.GetUnused(mx,my)
dxSetRenderTarget( newRT, true )
dxSetShaderValue( blurVShader, \"tex0\", Src )
dxSetShaderValue( blurVShader, \"tex0size\", mx,my )
dxSetShaderValue( blurVShader, \"bloom\", bloom )
dxDrawImage( 0, 0, mx,my, blurVShader )
return newRT
end
RTPool = {}
RTPool.list = {}
function RTPool.frameStart()
for rt,info in pairs(RTPool.list) do
info.bInUse = false
end
end
function RTPool.GetUnused( mx, my )
-- Find unused existing
for rt,info in pairs(RTPool.list) do
if not info.bInUse and info.mx == mx and info.my == my then
   info.bInUse = true
   return rt
end
end
-- Add new
local rt = dxCreateRenderTarget( mx, my )
if rt then
RTPool.list[rt] = { bInUse = true, mx = mx, my = my }
end
return rt
end
dxFadeState = nil
dxFade = {}
function dxFadeCamera (state, czas, r, g, b)
if state == true then
if dxFadeState == true then
   removeEventHandler (\"onClientRender\", getRootElement(), renderFading)
else
   removeEventHandler (\"onClientRender\", getRootElement(), renderHiding)
end
dxFade.startTime = getTickCount ()
dxFade.endTime = dxFade.startTime + czas
dxFade.startColor = {r,g,b,255}
dxFade.endColor = {r,g,b,0}
addEventHandler (\"onClientRender\", getRootElement(), renderFading)
dxFadeState = true
elseif state == false then
if dxFadeState == false then
   removeEventHandler (\"onClientRender\", getRootElement(), renderHiding)
else
   removeEventHandler (\"onClientRender\", getRootElement(), renderFading)
end
dxFade.startTime = getTickCount ()
dxFade.endTime = dxFade.startTime + czas
dxFade.startColor = {r,g,b,0}
dxFade.endColor = {r,g,b,255}
addEventHandler (\"onClientRender\", getRootElement(), renderHiding)
dxFadeState = false
end
end
function renderFading ()
local r1,g1,b1,a1 = dxFade.startColor[1],dxFade.startColor[2],dxFade.startColor[3],dxFade.startColor[4]
local r2,g2,b2,a2 = dxFade.endColor[1],dxFade.endColor[2],dxFade.endColor[3],dxFade.endColor[4]
local now = getTickCount()
local elapsedTime = now - dxFade.startTime
local duration = dxFade.endTime - dxFade.startTime
local progress = math.abs(elapsedTime / duration)
if elapsedTime < duration then
alpha = interpolateBetween (a2, 0, 0, a1, 0, 0, progress, \"Linear\")
else
alpha = 255
end
if alpha == 255 then
removeEventHandler (\"onClientRender\", getRootElement(), renderFading)
end
dxDrawRectangle (0,0, screenX, screenY, tocolor(r1, g1, b1, alpha), true)
end
function renderHiding ()
local r1,g1,b1,a1 = unpack(dxFade.startColor)
local r2,g2,b2,a2 = unpack(dxFade.endColor)
local now = getTickCount()
local elapsedTime = now - dxFade.startTime
local duration = dxFade.endTime - dxFade.startTime
local progress = math.abs(elapsedTime / duration)
if elapsedTime < duration then
local alpha = interpolateBetween (a1, 0, 0, a2, 0, 0, progress, \"Linear\")
else
local alpha = 0
end
dxDrawRectangle (0,0, screenX, screenY, tocolor(r1, g1, b1, alpha), true)
end
 
local sm = {}
sm.moov = 0
sm.object1, sm.object2 = nil, nil
local function camRender()
local x1, y1, z1 = getElementPosition(sm.object1)
local x2, y2, z2 = getElementPosition(sm.object2)
setCameraMatrix(x1, y1, z1, x2, y2, z2)
end
local function removeCamHandler()
if (sm.moov == 1) then
sm.moov = 0
removeEventHandler(\"onClientPreRender\", root, camRender)
end
end
function stopmoveCameraDuration()
if (sm.moov == 1) then
if (isTimer(sm.timer1)) then killTimer(sm.timer1) end
if (isTimer(sm.timer2)) then killTimer(sm.timer2) end
if (isTimer(sm.timer3)) then killTimer(sm.timer3) end
if (isElement(sm.object1)) then destroyElement(sm.object1) end
if (isElement(sm.object2)) then destroyElement(sm.object2) end
removeCamHandler()
sm.moov = 0
end
end
function moveCameraDuration(x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time, easing)
if (sm.moov == 5) then return false end
sm.object1 = createObject(1337, x1, y1, z1)
sm.object2 = createObject(1337, x1t, y1t, z1t)
setElementAlpha(sm.object1, 0)
setElementAlpha(sm.object2, 0)
setObjectScale(sm.object1, 0.05)
setObjectScale(sm.object2, 0.05)
moveObject(sm.object1, time, x2, y2, z2, 0, 0, 0, (easing and easing or \"InOutQuad\"))
moveObject(sm.object2, time, x2t, y2t, z2t, 0, 0, 0, (easing and easing or \"InOutQuad\"))
addEventHandler(\"onClientPreRender\", root, camRender)
sm.moov = 1
sm.timer1 = setTimer(removeCamHandler, time, 1)
sm.timer2 = setTimer(destroyElement, time, 1, sm.object1)
sm.timer3 = setTimer(destroyElement, time, 1, sm.object2)
return true
end
local sx, sy = guiGetScreenSize()
local postGUI = false
local viewStep = 0
local isOnShow = false
local viewWait = 15000
local manual = false
local view = {
[1] = {
[1] = { --kezdőkép
   [\"posX\"]    =  1897.11,
   [\"posY\"]    =  -1205.87,
   [\"posZ\"]    =  29.26,
   [\"lookX\"]    =  1897.11,
   [\"lookY\"]    = -1205.87,
   [\"lookZ\"]    =  29.26,
   [\"speed\"]   =  4500
},
[2] = {   -- befejezőkép
   [\"posX\"]    =  1899.50,          
   [\"posY\"]    = -1205.35,
   [\"posZ\"]    =   25.54,
   [\"lookX\"]    =  1899.50,
   [\"lookY\"]    = -1205.35,
   [\"lookZ\"]    = 25.54
}
}
}
local function displayView()
if (not isOnShow) then return end
if (manual) then
dxDrawRectangle(0, 0, sx, sy, tocolor(0, 0, 0, 0.4*255), postGUI)
dxDrawRectangle(0, 0, sx, 100, tocolor(0, 0, 0, 255), postGUI)
dxDrawRectangle(0, sy-100, sx, 100, tocolor(0, 0, 0, 255), postGUI)
end
end
function startView()
if (isTimer(amazingViewTimer)) then
stopView() -- Just fuck everything up until the session is restarted
end
showPlayerHudComponent(\"radar\", false)
--dxFadeCamera (true, 1500, 0,0,0)
--fadeCamera (false,1.5,0,0,0)
--setTimer(fadeCamera, 1500, 50, true, 1)
showChat(false)
setElementFrozen(localPlayer, true)
viewStep = 1
setCameraMatrix(view[viewStep][1][\"posX\"], view[viewStep][1][\"posY\"], view[viewStep][1][\"posZ\"], view[viewStep][1][\"lookX\"], view[viewStep][1][\"lookY\"], view[viewStep][1][\"lookZ\"])
launcherTimer = setTimer(function()
moveCameraDuration(view[viewStep][1][\"posX\"], view[viewStep][1][\"posY\"], view[viewStep][1][\"posZ\"], view[viewStep][1][\"lookX\"], view[viewStep][1][\"lookY\"], view[viewStep][1][\"lookZ\"], view[viewStep][2][\"posX\"], view[viewStep][2][\"posY\"], view[viewStep][2][\"posZ\"], view[viewStep][2][\"lookX\"], view[viewStep][2][\"lookY\"], view[viewStep][2][\"lookZ\"], view[viewStep][1][\"speed\"])
amazingViewTimer = setTimer(function()
   if (isOnShow) then
      if (viewStep == #view) then
         viewStep = 1
      else
         viewStep = viewStep+1
      end
      moveCameraDuration(view[viewStep][1][\"posX\"], view[viewStep][1][\"posY\"], view[viewStep][1][\"posZ\"], view[viewStep][1][\"lookX\"], view[viewStep][1][\"lookY\"], view[viewStep][1][\"lookZ\"], view[viewStep][2][\"posX\"], view[viewStep][2][\"posY\"], view[viewStep][2][\"posZ\"], view[viewStep][2][\"lookX\"], view[viewStep][2][\"lookY\"], view[viewStep][2][\"lookZ\"], view[viewStep][1][\"speed\"])
   else
      stopView()
   end
end, view[viewStep][1][\"speed\"]+8000000000, 0)
end, 1000, 1)
addEventHandler(\"onClientRender\", root, displayView)
isOnShow = true
end
addEvent(\"startView\", true)
addEventHandler(\"startView\", root, startView)
function stopView()
if (isTimer(launcherTimer)) then
killTimer(launcherTimer)
end
if (isTimer(amazingViewTimer)) then
killTimer(amazingViewTimer)
end
isOnShow = false
viewStep = 0
manual = false
showChat(true)
setElementFrozen(localPlayer, false)
setCameraTarget(localPlayer)
showPlayerHudComponent(\"radar\", true)
showPlayerHudComponent(\"crosshair\", true)
setTimer(function()
exports.sc_help:showHint (1)
end, 1500,1)
stopmoveCameraDuration()
removeEventHandler(\"onClientRender\", root, displayView)
end
addEvent(\"stopView\", true)
addEventHandler(\"stopView\", root, startView)

Nem elérhető Eduka

  • 214
    • Profil megtekintése
Regisztáció. InGame or UCP
« Válasz #1 Dátum: 2014. november 08. - 19:59:30 »
0 Show voters
Ha még kell segítség, akkor keress fel privát üzenetben.   :)

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal