-
Posts
965 -
Joined
-
Last visited
Everything posted by DakiLLa
-
Well, you can trigger a server event to remove yourself from a vehicle. --client side local localPlayer = getLocalPlayer() function fuehrerschein() if isPedInVehicle(localPlayer) then local fuehrerscheinda = tostring(getElementData(localPlayer,"Scheine")) if fuehrerscheinda == "0" then outputChatBox("Du hast keinen Führerschein!",255,0,0) --removed 'thePlayer', look wiki for details triggerServerEvent( "removeMe", localPlayer ) end end end addEventHandler( "onClientPlayerVehicleEnter", localPlayer, fuehrerschein ) --SERVER side addEvent( "removeMe", true ) addEventHandler( "removeMe", getRootElement(), function() removePedFromVehicle( source ) end )
-
Notice, that this function works only in MTA 1.1 nightly's right now.
-
https://community.multitheftauto.com/index.php?p= ... ls&id=2191 kinda advertising, uh?
-
Yea, long time ago I was asking same question somewhere here..
-
Насколько я знаю, она не работает и в новых версиях админки ее просто напросто убрали. По крайней мере, сколько раз я не пытался, так и не получил от этой галочки никакого толка. По теме: автологин убирается из файла internal.db, открыть который можно SQLite Browser'ом. Таблица "settings", в поле Autologin поставить 0 (ноль).
-
Что именно не получилось? Что ты с тем кодом сделал?
-
Собственно, сам архив с пустышками и код: --Какие модельки "убираем с карты" local brokenIDs = { 11088, 11282 }; function setModelsEmpty() for i, id in ipairs( brokenIDs ) do local col = engineLoadCOL( 'empty.col' ); engineReplaceCOL( col, id ); local dff = engineLoadDFF( 'empty.dff', 0 ); engineReplaceModel( dff, id ); end; end; addEventHandler( 'onClientResourceStart', resourceRoot, setModelsEmpty );
-
можно) можно найти id этого объекта и заменить его на пустой dff. только вот когда я делал, col не заменялся на пустой, видать это работает только для созданных объектов. так что смысла нет все равно. Хм, странно, почему у тебя не вышло. Я заменял тот моргающий текстурами склад недалеко от гаража. Заменял и .dff, и .col и все прошло удачно.
-
Радио в 1.0.5 работать не будет, ибо потоковое воспроизведение звуков доступно только в 1.1.
-
Эвент onClientClick, посмотри в нем последний параметр clickedWorld. Он либо false, если ты ни по чему не тыкнул, либо userdata, ну двумя словами тот элемент, на который ты тыкнул.
-
- Написано дословно "МТА ФОРУМ врот" Как низко...
-
Модельки скинов (.DFF) в текущей версии клиента (1.0.5 и 1.1) подгрузить нельзя. Можно лишь заменить стандартные текстуры.
-
That was the only one thing I did just after I got the error. lol, there is no error in code. There is error in my .map file and what I'm asking for is how to detect what causes it. edit: strange, but after I restarted my server and re-loaded my map, no error appeared. Seems that it fixed by itself somehow.. I will leave some feedback if I get that error again.
-
Check out 1) This one 2) Or this
-
Well, this was already discussed here.
-
No, no one of them. I was just placing cars, objects and nothing more.
-
Ok so I was mapping hard last day, I saved my map and gone sleep. Today when I open my map, in debug it shows a strange error: WARNING: edf\edf.lua:1326: Attribute 'model' has an invalid type in element 'object': should be 'objectID'. I think that this problem causes some object but how do I detect which one? I'm not gonna go through all of almost one hundred lines of .map file, this is out of my possibilities. Thx in advance.
-
Вариант "тыкнуть по мертвому телу курсором" пробовал ?
-
Not sure if it helps, but try to put 'false' as the last argument of addEventHandler: addEventHandler ( "onClientGUIClick", Spawn_button, create_veh2, false ) Also it's hard to understand what causes your problem without any code snippets.
-
correct = createTeam ( "Admins", 225, 0, 0 ) function joinTeam( prev, currAcc ) local accountName = getAccountName( currAcc ) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup( "Admin" ) ) then setPlayerTeam( source, correct ) end end addEventHandler( "onPlayerLogin", getRootElement(), joinTeam ) I put the code without highlighting since setPlayerTeam is bugged a bit.
-
local row, col = guiGridListGetSelectedItem( yourGridList ) local text = guiGridListGetItemText( yourGrildList, row, col ) outputChatBox( getVehicleModelFromName( text ) )
-
You want to attach vehicles to train cargo? Then attachElements should help you.
-
No one will make something for you just for free. You have to learn everything by yourself, otherwise you would better pay for the job.
-
Lol, are you laughing? This is just ~10 lines of code I can give for free. _setPlayerNametagColor = setPlayerNametagColor; function setPlayerNametagColor( thePlayer, hex ) if isElement( thePlayer ) then _setPlayerNametagColor( thePlayer, hexToRGB( hex ) ); end; end; function hexToRGB( num ) num = string.gsub( num, "#", "" ); local r = tonumber( "0x" .. string.sub( num, 1, 2 ) ); local g = tonumber( "0x" .. string.sub( num, 3, 4 ) ); local b = tonumber( "0x" .. string.sub( num, 5, 6 ) ); return r, g, b; end; p.s.: hey Cow, how it's going on?
