-
Posts
419 -
Joined
-
Last visited
-
Days Won
1
Everything posted by nikitafloy
-
what can i do? How can I hide for frozen F1 player?
-
user and vehicle together elseif ( action == "freeze" ) then if ( isPlayerFrozen ( player ) ) then action = "un"..action end aSetPlayerFrozen ( player, not isPlayerFrozen ( player ) )
-
Use from admin. addEvent ( "onPlayerFreeze", false ) function aSetPlayerFrozen ( player, state ) if ( toggleAllControls ( player, not state, true, false ) ) then aPlayers[player]["freeze"] = state triggerEvent ( "onPlayerFreeze", player, state ) local vehicle = getPedOccupiedVehicle( player ) if vehicle then setElementFrozen ( vehicle, state ) end return true end return false end
-
local currentFreezeStatus = isElementFrozen ( localPlayer ) -- false only If a person is frozen, it returns false. I understand that is not an element localPlayer. Then how can I disable a person to use frozen F1? thx.
-
I must check this before visible GUI.
-
Not an element. How can I disable Freeroam frozen for a player?
-
function toggleFRWindow() local currentFreezeStatus = isElementFrozen ( localPlayer ) -- false only if not skinsA[getElementModel(localPlayer)] then if not currentFreezeStatus then if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() else showCursor(true) showAllWindows() end end end end addCommandHandler('fr', toggleFRWindow)
-
Oh... thx u! I'll remember that! I'm having this problem even with some of my scripts. Now I'll know!
-
The problem is not in error. Problem: When I start any resource function is started from another resource (campolice). onResourceStart(and client) only that: function crColSp () for _,k in pairs (coorSphere) do colPay = createColSphere ( k[1], k[2], k[3], k[4] ) detect = createColSphere ( k[1], k[2], k[3], k[4]+120 ) end for _,k in pairs (cams_lamp) do createObject ( k[1], k[2], k[3], k[4], k[5], k[6], k[7] ) end end addEventHandler( 'onResourceStart', getRootElement ( ), crColSp )
-
https://wiki.multitheftauto.com/wiki/Easing with timer.
-
With each start up any resource - found errors.
-
server triggered clientside event but event is not added
nikitafloy replied to nikitafloy's topic in Scripting
del. -
Del.
-
server triggered clientside event but event is not added
nikitafloy replied to nikitafloy's topic in Scripting
Yes, yes, I came to his senses. Done, everything works, all thanks! ) -
server triggered clientside event but event is not added
nikitafloy replied to nikitafloy's topic in Scripting
That damn, sure! Thank you, I'll go to sleep. -
server triggered clientside event but event is not added
nikitafloy replied to nikitafloy's topic in Scripting
Thank you, I'm a bit mapping going crazy at night. How can I pass a group of players 'Security'? -
server triggered clientside event <...>, but event is not added. Server if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( thePlayer )), aclGetGroup ( 'Security' ) ) then i=i+1 local players = getElementsByType ( "player" ) for _, GlDetect in ipairs( players ) do if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( GlDetect )), aclGetGroup ( 'GlPolice' ) ) then GlPolicePlayer = GlDetect if GlPolicePlayer then k = 55000*i if getPlayerMoney(GlPolicePlayer) >= k then triggerClientEvent('payForJob', getRootElement(), client, k) else outputChatBox( 'Ошибка выплат: У главного нет денег.1', root, 255, 0, 0 ) end end end end if not GlPolicePlayer then local nowMoney = tonumber(getElementData(getRootElement(), "funmodev2-money-GlPolice")) k = 55000*i if nowMoney >= k then givePlayerMoney( thePlayer, 55000 ) setElementData(getRootElement(), 'funmodev2-money-GlPolice', tonumber(getElementData(getRootElement(), "funmodev2-money-GlPolice"))-55000) end end end Client: function payJob(player,k) takePlayerMoney( player, k ) local players = getElementsByType ( "player" ) for theKey, thePlayer in ipairs( players ) do if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( thePlayer )), aclGetGroup ( "Security" ) ) then givePlayerMoney( thePlayer, 55000 ) end end end addEvent( "payForJob", true ) addEventHandler( "payForJob", getRootElement(), payJob )
-
Strange that I did not find it in the search. Spent a lot of time on his stupidity. Thank you!
-
Да, расставил аргументы как у Вас. Все сработало! Спасибо!
-
Decided to remake 'curve' author code. The main problem: PoliceFrak = { gridlist = {}, window = {}, button = {}, label = {} } xS,yS = guiGetScreenSize() PoliceFrak.window[1] = guiCreateWindow(xS/2, yS/2, 344, 497, "Рабочая одежда", false) guiWindowSetSizable(PoliceFrak.window[1], false) PoliceFrak.label[1] = guiCreateLabel(38, 28, 306, 50, "Двойной клик, чтобы одеться и вооружиться.", false, PoliceFrak.window[1]) guiSetFont(PoliceFrak.label[1], "default-bold-small") PoliceFrak.gridlist[1] = guiCreateGridList(12, 56, 322, 372, false, PoliceFrak.window[1]) guiGridListAddColumn(PoliceFrak.gridlist[1], "Выбор одежды", 0.9) PoliceFrak.button[1] = guiCreateButton(22, 435, 302, 52, "Закрыть", false, PoliceFrak.window[1]) guiSetFont(PoliceFrak.button[1], "default-bold-small") guiSetProperty(PoliceFrak.button[1], "NormalTextColour", "FFAAAAAA") guiSetVisible(PoliceFrak.window[1],false) guiSetInputEnabled(false) showCursor(false) function userSkinJob( ) outputChatBox('Хер') local row, col = guiGridListGetSelectedItem(PoliceFrak.gridlist[1]) if (row and col and row ~= -1 and col ~= -1) then local model = tonumber(guiGridListGetItemData(PoliceFrak.gridlist[1], row, 1)) if model == 286 then triggerServerEvent("checkFBI", localPlayer, model) elseif model ~= "" then triggerServerEvent("useSkin1", localPlayer, model) end end end addEventHandler("onClientDoubleClick", PoliceFrak.gridlist[1], userSkinJob, false) Specifically: addEventHandler("onClientDoubleClick", PoliceFrak.gridlist[1], userSkinJob, false) Dont work, only with root.
-
Телепортирует всех игроков. --Server triggerClientEvent ( 'checkTimer', root, Psource, tonumber(timer) ) setTimer (fadeCamera, 2000, 1, Psource, true) setTimer (function() spawnPlayer ( Psource, habz[rnd][1], habz[rnd][2], 1004, 90, 299, 3, 0 ) setCameraTarget ( Psource ) end, 2000, 1 ) function fipustitIgrok() spawnPlayer( source, 2280,2432,3.3 ) end addEvent('Vipustit', true) addEventHandler( 'Vipustit', root, fipustitIgrok ) --Client function check(Psource,timer) hours, minutes = getTime() timePrison = tonumber(timer)+minutes if (tonumber(timePrison)>60) then hours=hours+1 timePrison=timePrison-minutes end local prisTimer = setTimer(function() hoursN, timeN = getTime() if ( hoursN == hours and timeN == timePrison) then triggerServerEvent( 'Vipustit', Psource ) end end, 1000, 0) end addEvent( "checkTimer", true ) addEventHandler( "checkTimer", getRootElement(), check )
-
Выходной - день щедрости в русской ветке. ) Спасибо. --- Не получается запретить доступ к F1 (isElementFrozen - всегда false): function toggleFRWindow() local currentFreezeStatus = isElementFrozen ( localPlayer ) if not skinsA[getElementModel(localPlayer)] then if not currentFreezeStatus then if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() else showCursor(true) showAllWindows() end end end end addCommandHandler('fr', toggleFRWindow)
-
THX U! 'Special thanks - Castillo'
-
Client. function playSoundNow() local x,y,z = getElementPosition(localPlayer) sound3DSound = playSound3D ( ''..link..'', x,y,z, true ) end addEvent('linkplaySound', true) addEventHandler( 'linkplaySound', root, playSound ) function onClickPlay(button) local x,y,z = getElementPosition ( localPlayer ) for _, n in ipairs (radSpis) do if button == "left" then if ( guiGetText( Radio.combobox[1] ) ~= tostring('Кликните, чтобы раскрыть') ) and ( guiGetText( Radio.edit[1] ) ~= "" ) then outputChatBox( 'Выберите что-то одно!' ) return end stopSound(sound3DSound) if ( guiGetText( Radio.edit[1] ) ~= "" ) and ( guiGetText( Radio.combobox[1] ) == tostring('Кликните, чтобы раскрыть') ) then sound3DSound = playSound3D ( guiGetText( Radio.edit[1] ), x,y,z, true ) triggerServerEvent( 'urlDim', localPlayer ) break else local dimensionPlayer = getElementDimension ( localPlayer ) if ( guiGetText( Radio.combobox[1] ) == 'Dubstep #1' ) then sound3DSound = "http://radiorecord.fm/m3u/trap320-32kbps.m3u" triggerServerEvent( 'urlDim', localPlayer ) setElementDimension( sound3DSound, dimensionPlayer ) elseif ( guiGetText( Radio.combobox[1] ) == 'Club Society' ) then sound3DSound = playSound3D ( "http://radio.freshclub.net:9000/8094", x,y,z, true ) triggerServerEvent( 'urlDim', localPlayer ) setElementDimension( sound3DSound, dimensionPlayer ) elseif ( guiGetText( Radio.combobox[1] ) == 'Trap' ) then sound3DSound = playSound3D ( "http://www.radiorecord.fm/m3u/trap320-32kbps.m3u", x,y,z, true ) triggerServerEvent( 'urlDim', localPlayer ) setElementDimension( sound3DSound, dimensionPlayer ) elseif ( guiGetText( Radio.combobox[1] ) == 'Mfm' ) then sound3DSound = playSound3D ( "http://radio.mfm.ua/online128.m3u", x,y,z, true ) triggerServerEvent( 'urlDim', localPlayer ) setElementDimension( sound3DSound, dimensionPlayer ) elseif ( guiGetText( Radio.combobox[1] ) == 'Кликните, чтобы раскрыть' ) then return end end attachElements( sound3DSound, localPlayer ) end end end Server. function link() link = "http://radiorecord.fm/m3u/trap320-32kbps.m3u" triggerClientEvent( 'linkplaySound', root, link ) end addEvent('urlDim', true) addEventHandler( 'urlDim', root, link )
-
PlaySound - Whoever chose the station and turned. Right then, what happens - one included, hears each. Must be that the source is only 1.