Memory
Members-
Posts
383 -
Joined
-
Last visited
Everything posted by Memory
-
Сделал, должно работать как надо. Делал, используя вычисления на основе resAdjust и fancyProgress. Подгонял под стандартный hud race мода. Client: Server (Сохраняет деньги через дату):
-
Это точно в race_client.lua. Напишите название сервера, где вы это видели. Может и ничего писать не придётся, а так, если что завтра напишу и скину код.
-
You can try use default hydra dff. Download and start IMG Tool --> open "...\GTA-SanAndreas\models\gta3.img" ---> found hyrda and export him.
-
На самом деле это несложно сделать, просто надо всё последовательно писать. Поставь Rectangle перед жизнями, а остально без разницы. По поводу координат и размеров, отталкивайся от того как считаются координаты и размеры тех же жизней и скорости.
-
Where found you this code? addCommandHandler ( hideme, function ( ) for id, player in ipairs( getElementsByType ( "player" ) ) do local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then destroyBlipsAttachedTo ( player ) outputChatBox ( "You are hidden.", player, 255, 255, 255, true ) end end end) function destroyBlipsAttachedTo( player ) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end or only for you: addCommandHandler ( hideme, function ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then destroyBlipsAttachedTo ( thePlayer ) outputChatBox ( "You are hidden.", thePlayer, 255, 255, 255, true ) end end) function destroyBlipsAttachedTo( player ) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end
-
onPlayerFinish used only for race. For take the hunter you must use onPlayerPickUpRacePickup and check model of pickup vehicle. addEvent("onPlayerPickUpRacePickup", true) addEventHandler( "onPlayerPickUpRacePickup", getRootElement(), function( _, pickupType, vehicleModel ) if ( pickupType == "vehiclechange" ) and ( vehicleModel == 425 ) then outputChatBox( '[HUNTER] '..getPlayerName(source)..' has reached a Hunter!',getRootElement(),255,0,0 ) end end)
-
Как сделать, чтоб Warning'и не выводились в log
Memory replied to iron015's topic in Помощь / Отчеты об ошибках
В вашем скрипте не все игроки сервера находятся в авто, поэтому и аргумент theVehicle, который используется далее, будет некорректный. Для решения подобных проблем достаточно просто добавить проверку. setTimer(function () for id, player in ipairs(getElementsByType("player")) do local theVehicle = getPedOccupiedVehicle (player) if theVehicle then local controller = getVehicleController(theVehicle) if not controller then return end if controller then local id = getElementModel ( theVehicle ) if id == 494 or id == 541 then local accName = getAccountName ( getPlayerAccount ( player ) ) local isMod = isObjectInACLGroup("user."..accName,aclGetGroup("Moderator")) local isSMod = isObjectInACLGroup("user."..accName,aclGetGroup("SuperModerator")) local isAdmin = isObjectInACLGroup("user."..accName,aclGetGroup("Admin")) if not isMod and not isSMod and not isAdmin then removePedFromVehicle ( player ) outputChatBox("#FFFF00Эта машина предназначена только для #00FF00админов#FFFF00!",player,255,255,255,true) end end end end end end,100,0) -
Хорошо, ты хочешь просто скрипт. Таких тем куча на mtasa. Особенно в английской ветке. И ответ на все темы один: посмотри тут https://community.multitheftauto.com/in ... =resources Ищи anti-spam, anti-flood.
-
[PAID] Who wants to share his multigamemode with me
Memory replied to maikel2442's topic in Resources
I already talked to him. He is suspicious man, I think he don't will pay. -
Где ты в моей фразе увидел что я кого то прошу чтоб за меня что то сделали? А что с темой не так? Ты написал "нужен скрипт" и обратился к нам. У этой фразы есть другой смысл?
-
Блин, даже не знаю, чем помочь: ошибок у тебя дебаг никаких не выдаёт, да и у меня работает скрипт, сохраняет нормально.
-
Даже не знаю. У меня всё работает. Вы ничего не изменяли в скрипте?
-
Кинь ещё клиентскую часть. На каком месте не срабатывает? Просто тут везде outputChatBox и outputDebugString, так что проследить нетрудно. А вобще, по мне, скрипт кривовато написан.
-
Посмотри debug. И по данному кусочку мы ничем не поможем тебе.
-
local timer; function open() if (guiGetVisible (helpMenu) == true) then if isTimer ( timer ) then killTimer ( timer ) end timer = setTimer(function() if not guiGetAlpha(helpMenu) <= 0 then guiSetAlpha(helpMenu, (guiGetAlpha(helpMenu)-0.05)) else guiSetVisible(helpMenu, false) showCursor(false) killTimer(timer) end end,50,0) elseif (guiGetVisible (helpMenu) == false) then if isTimer ( timer ) then killTimer ( timer ) end guiSetVisible(helpMenu, true) guiSetAlpha(helpMenu, 0) timer = setTimer(function() if not guiGetAlpha(helpMenu) >= 0.65 then -- Line 85 guiSetAlpha(helpMenu, (guiGetAlpha(helpMenu)+0.05)) else showCursor(true) killTimer(timer) end end,50,0) end end bindKey ("R", "down", open)
-
Что вы делаете? Вы куда таймер запихали? С последним кодом, что я вам дал, не надо ничего делать. А вот из предыдущего просто бинды уберите и всё. ИМХО: Если вы совсем не знаете Lua, то что вы делаете в категории "Скриптинг". Тут нужно задавать вопросы, если вы знакомы с Lua или изучаете его, и у вас возникают какие-либо вопросы. В вашем случае, вы просто нашли код и хотите, чтобы мы его доработали.
-
Try local timer; function open() if (guiGetVisible (helpMenu) == true) then if isTimer ( timer ) then killTimer ( timer ) end timer = setTimer(function() if not guiGetAlpha(helpMenu) <= 0 then guiSetAlpha(helpMenu, (guiGetAlpha(helpMenu)-5)) else guiSetVisible(helpMenu, false) showCursor(false) killTimer(timer) end end,50,0) elseif (guiGetVisible (helpMenu) == false) then if isTimer ( timer ) then killTimer ( timer ) end timer = setTimer(function() if not guiGetAlpha(helpMenu) >= 65 then guiSetAlpha(helpMenu, (guiGetAlpha(helpMenu)+5)) else guiSetVisible(helpMenu, true) showCursor(true) killTimer(timer) end end,50,0) end end bindKey ("R", "down", open)
-
function ResourceStart ( name, root ) for k,v in ipairs ( getElementsByType ( "player" ) ) do bindKey( v, "u", "down", switchAntiPas ) end end addEventHandler ( "onResourceStart", getResourceRootElement(), ResourceStart ) function PlayerJoin () bindKey( source, "u", "down", switchAntiPas ) end addEventHandler ( "onPlayerJoin", root, PlayerJoin )
-
Что дебаг выдаёт? Поставь дебаг на 3, может какой аргумент неправильно получается. Попробуй так:
-
Подобная тема https://forum.multitheftauto.com/viewtopic.php?f=141&t=75484
-
Открой файл broph.lua там всего 48 строчек. Вот функция, которая вызывается, когда игрок заходит function spawn(player) if not isElement(player) then return end if get("spawnreset") == "onSpawn" then spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) repeat until setElementModel(player,math.random(312)) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end вместо getRandomSpawnPoint() пишешь число - номер какого-либо спавнпоинта.
-
Согласен с TheNormalnij. Это никакой-нибудь чат, где сообщения летят каждую секунду, и люди печатают, не глядя на клавиатуру. Так что, можно же соблюдять хоть какие-нибудь правила русского языка и этикета. Лично я ничего не понял из твоего поста. Опиши подробней проблему, какие ресурсы используешь и т.д.
-
Первый код замени на исходный, который был до наших редактирований. Вот второй код: function removeColorCoding ( name ) return type(name)=='string' and string.gsub ( name, '#%x%x%x%x%x%x', '' ) or name end function getPlayerNameWithOutColorCode ( player ) return removeColorCoding ( getPlayerName ( player ) ) end function chatbox(text, msgtype) local root = getRootElement() local account = getAccountName(getPlayerAccount(source)) local name = getPlayerNameWithOutColorCode(source) if (msgtype == 0) then if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then cancelEvent(true) outputChatBox("#FF0000[#FF0000Хозяин#FF0000] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #FF0000[#FF0000Хозяин#FF0000] #FFFFFF" .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then cancelEvent(true) outputChatBox("#0000FF[#0000FFАдмин#0000FF] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #0000FF[#0000FFАдмин#0000FF] #FFFFFF" .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then cancelEvent(true) outputChatBox(" #00FF00[#00FF00Гл.#00FF00Админ#00FF00] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #00FF00[#00FF00Гл.#00FF00Админ#00FF00] #FFFFFF" .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then cancelEvent(true) outputChatBox(name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #FFFFFF" .. name .. ": " .. text) end end end addEventHandler("onPlayerChat", root, chatbox)
-
Скинь код из скрипта с ТЭГом
