-
Posts
419 -
Joined
-
Last visited
-
Days Won
1
Everything posted by nikitafloy
-
function Superman.onJump(key, keyState) local self = Superman local task = getPedSimplestTask(localPlayer) if not isPlayerFlying(localPlayer) then if task == "TASK_SIMPLE_IN_AIR" and getElementModel(localPlayer) == 217 then setElementVelocity(localPlayer, 0, 0, TAKEOFF_VELOCITY) setTimer(Superman.startFlight, 100, 1) end end end addEvent( "startSuperman2", true ) addEventHandler( "startSuperman2", getRootElement(),Superman.onJump) replace this function
-
local ScreenSizeX,ScreenSizeY = guiGetScreenSize(); local StartTick,Duration,EndTick = nil,2000,nil; local Debounce = false; local rootElement = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() -- Get the screen resolution playerZoneName = nil text = 'nil' Alpha = 0 Progress = 0 local function RenderHandler() local playerX, playerY, playerZ = getElementPosition( getLocalPlayer() ) -- Get player's coordinates. local CurrentTick = getTickCount(); -- get the current tick; if playerZoneName == nil and Alpha ~= 255 or playerZoneName ~= getZoneName(getElementPosition( getLocalPlayer() )) then if Progress ~= 1 then Progress = Progress+0.01 else if Progress == 1 then Progress = 0 end end Alpha = interpolateBetween(0,0,0,255,0,0,Progress,"InOutQuad"); text = getZoneName(getElementPosition( getLocalPlayer() )) if playerZoneName ~= getZoneName(getElementPosition( getLocalPlayer() )) and Alpha == 255 then text = getZoneName(getElementPosition( getLocalPlayer() )) playerZoneName = text Progress = 0 end end dxDrawText(text,ScreenSizeX/2,ScreenSizeY/2,ScreenSizeX,ScreenSizeY,tocolor(255,255,255,Alpha),1,"default-bold"); if CurrentTick>=EndTick then -- if the animation is finished; StartTick,EndTick = nil,nil; -- clear variables; removeEventHandler("onClientRender",root,RenderHandler); -- remove the render handler; Debounce = false; -- we can now use /dx again; end; end; addEventHandler("onClientRender",rootElement, function() if not Debounce then -- if the text isn't already rendering; Debounce = true; StartTick = getTickCount(); -- get the current tick as the start tick of the animation; EndTick = StartTick+Duration+1000; -- calculate the end tick; addEventHandler("onClientRender",root,RenderHandler); -- add the render handler only when you type the command; end; end); Yep, 3aGl3, i check this on Lua demo, thx for support. ,) If i understand u, check this and final (local, global and extra variables) I check and create this on server and this work
-
may b temperature, lol?
-
try MED for gta sa and get id then use Lua script
-
local ScreenSizeX,ScreenSizeY = guiGetScreenSize(); local StartTick,Duration,EndTick = nil,2000,nil; local Debounce = false; local rootElement = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() -- Get the screen resolution addEventHandler("onClientRender",rootElement, function() if not Debounce then -- if the text isn't already rendering; Debounce = true; StartTick = getTickCount(); -- get the current tick as the start tick of the animation; EndTick = StartTick+Duration+1000; -- calculate the end tick; local playerX, playerY, playerZ = getElementPosition( getLocalPlayer() ) -- Get player's coordinates. local playerZoneName = getZoneName( playerX, playerY, playerZ ) -- Get name of the player's zone. local CurrentTick = getTickCount(); -- get the current tick; local Progress = (CurrentTick-StartTick)/Duration; -- calculate the progress between 0 and 1 using simple math; local Alpha = interpolateBetween(0,0,0,255,0,0,Progress,"InOutQuad"); dxDrawText(playerZoneName,ScreenSizeX/2,ScreenSizeY/2,ScreenSizeX,ScreenSizeY,tocolor(255,255,255,Alpha),1,"default-bold"); if CurrentTick>=EndTick then -- if the animation is finished; StartTick,EndTick = nil,nil; -- clear variables; removeEventHandler("onClientRender",root,RenderHandler); -- remove the render handler; Debounce = false; -- we can now use /dx again; end; end; end); fileDelete("client.lua") may b
-
addEvent("JumpVehicle",true) addEventHandler("JumpVehicle",root, function (Vehicle) local player = getVehicleOccupant(Vehicle) if isElement(player) and getElementType(player) == 'player' and isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Admin" ) ) then local speedx, speedy, speedz = getElementVelocity (Vehicle) setElementVelocity (Vehicle,speedx,speedy,0.3) end end)
-
Login yet? its ur account name? where is client-side file?
-
guieditor
-
http://mta-download.ru/ - Актуальная информация о новых версиях МТА, последние новости, обновления, ссылки для быстрого скачивания МТА 1.5 и ГТА Сан Андреас бесплатно.
-
Нет, но можно отследить 'timed out'
-
SetPlayerHudComponentVisible
-
Вроде сделал, но вот одна проблема: если игрок поставит объект, он его не сможет удалить, только после рестарта ресурса (ниже будет видео). Как это можно исправить? server.lua: setElementID getElementByID destroyElement
-
DFF, TXD файлики - как защитить от воровства?
nikitafloy replied to nikitafloy's topic in Russian / Русский
del -
I have average knowledge of English. Create how i can understand u. thx. so dont download server local dff = teaEncode('taxi.dff', 'anywords') local txd = teaEncode('taxi.txd', 'anywords') setTimer(function() triggerClientEvent('send_this_files', resourceRoot, dff, txd) end, 1000,1) client function sendIt(dff, txd) downloadFile(txd) downloadFile(dff) end addEvent('send_this_files', true) addEventHandler('send_this_files', getRootElement(), sendIt) meta
-
del
-
Hello, i need in script which can protect my DFF, TXD files from theft. I read about teaEncode/Decode, but how can i do it? My attempts failed.
-
Как в БД в существующую таблицу добавить еще одну колонку?
-
Спасибо
-
Не получается вывести ID игрока в нике Через команду выводится в чат, при вызове - ошибка. client(1) dxDrawText ( getPlayerNameR(player) .. '[' .. tostring(call(getResourceFromName("gn"), 'getitIDbyName', tostring(getPlayerName(player)))) .. ']', sx+1, sy - offset+1, sx+1, sy - offset+1, tocolor(0,0,0,255), textscale*NAMETAG_TEXTSIZE, srfont, "center", "bottom", false, false, false ) client(2) function gn ( player_name ) outputChatBox(tostring(player_name)) if ( player_name ) then local sucess, value = getNameMatches ( player_name ) local player_id = getElementData ( value, "ID" ) return player_id end end meta function="gn" type="client"/>