-
Posts
419 -
Joined
-
Last visited
-
Days Won
1
Everything posted by nikitafloy
-
function consoleGiveCash ( thePlayer, command, amount, sum ) -- amount - первый аргумент (ник игрока), sum - второй (сумма) givePlayerMoney ( getPlayerFromName(amount), sum ) takePlayerMoney ( thePlayer, sum ) end addCommandHandler ( "pay", consoleGiveCash )
-
Привет всем, комрады. Расскажите о шейдерах. Не понимаю как они используются в "engineApplyShaderToWorldTexture".
-
Do u mean it? function getRealContents ( str ) return string.sub ( str, 7, string.len ( str ) - 7 ) end local str = "dfdask" .. "data/elegy.txd" .. "fkjdsak" local str1 = "dfdask" .. "data/elegy.dff" .. "fkjdsak" function replaceModel() txd = engineLoadTXD(getRealContents(str), 562 ) engineImportTXD(txd, 562) dff = engineLoadDFF(getRealContents(str1), 562 ) engineReplaceModel(dff, 562) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel)
-
Hello. I am interested in a way to prevent theft of models (cars, skins) from the server. With what is this possible? What commands? Are there any examples? (In recent years, learned about teaEncode / Decode) Sorry for the translation. Thank you.
-
Как вариант, запретить это https://github.com/multitheftauto/mtasa ... ml#L39-L91 и отбиндить F1 Функция выполняется для локальных пользователей(гости). Не на весь сервер. Т. Е. Гость заходит, меню не открывается, но бинд работает, после входа правило убирается. Есть смысл создать условие в freeroam, но мне нужно это и на случай, если скрипт будет отключен.
-
Привет всем. Как можно проще запретить открытие GUI из Freeroam? Использую exports при вызове события, но ничего не выходит (с аргументами и без): exports.freeroam:toggleFRWindow () function="toggleFRWindow" type="client" />
-
To make WHAT ?! Do you mean a tazer ? click for images You need use a specfic gun from GTA that you will use for that. (like the silenced pistol (id 23)) Then on client, listen for onClientPlayerDamage event and check if the id of the attacker weapon is 23. If yes, then cancel the real bullet damages by calling cancelEvent() To prevent the police officer to shoot more than one shock charge like the original pistol can, you will need to use: setWeaponProperty (on server side) on weapon id 23 to set max ammo in clip to 1 (he will reload after each shot) Sorry, this is my translation inattentive. Thanks, second paragraph -- what I need.
-
I have not seen this question on the forum, which is a bit strange. A question: How to create a shot to make perezyarazhatsya? The difficulty was to understand the way to cancel the second shot. If you still do not understand what I mean: who played on RP seen as the police recharges shocker. It's like a vivid example.
-
Thanks for the quick reply. I 'conjured' and got the expected result. Thank you.
-
Thanks for your reply. Unfortunately, it did not affect my problem. The text also only rotates around its axis. And I could not test the performance of your script, it does not work for me, sorry. I noticed that on the forum wrote that the text rotation is not working.
-
Thanx. This attach relative to a point, but is not rotated so far. function selectorON() local x, y = guiGetScreenSize() local xg, yg = getScreenFromWorldPosition ( 218.19999694824, -98.5, 1005.299987793 ) if ( xg and yg ) then dxDrawText("Test", xg, yg, 746, 235, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, false, false, true, 0, 50, 50) dxDrawText("Test", xg, yg, 745, 234, tocolor(255, 255, 255, 255), 1.00, "pricedown", "center", "center", false, false, false, false, true, 0, 50, 50) end end
-
u dont understand... addEventHandler("onClientRender", root, function() local x,y,z = getElementPosition( skinEx ) dxDrawText(text, x, y, 746, 235, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, false, false, true, 0, 100, 100) dxDrawText(text, x, y, 745, 234, tocolor(255, 255, 255, 255), 1.00, "pricedown", "center", "center", false, false, false, false, true, 0, 100, 100) dxDrawText("<- " .. text .. " ->", 417, 538, 836, 567, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false) end )
-
Dont work: dxDrawText(text, x, y, 746, 235, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, false, false, false, 0, 50, 50) dxDrawText(text, x, y, 745, 234, tocolor(255, 255, 255, 255), 1.00, "pricedown", "center", "center", false, false, false, false, false, 0, 50, 50)
-
How to create 3d text on the wall? Or relatively Player - https://community.multitheftauto.com/in ... ls&id=8289
-
The last element is not removed, because the timer stops on it. This is a special case. Deleted - not deleted. Thx!
-
Not killed timer. Writes the error: bad arg-t destroyElement (setVehiclePlateText too) [Expected at arg 1] function rPlate( veh, sum ) plateSumRas = sum*60*60*1000 plateSum = getTickCount() + plateSumRas timerCheck = setTimer(function() rezoneTimer = plateSum-getTickCount() setVehiclePlateText( veh, tostring(rezoneTimer/60/60/1000) ) if rezoneTimer <= 0 then destroyElement( veh ) setTimer(function() if isTimer( timerCheck ) then killTimer( timerCheck ) end end, 5000, 1 ) end end, 1000, 0, plateSum ) end
-
addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() if chatTime[source] and chatTime[source] + tonumber(get("*chat/mainChatDelay")) > getTickCount() then outputChatBox("Stop spamming main chat!", source, 255, 0, 0) return else chatTime[source] = getTickCount() end if get("*chat/blockRepeatMessages") == "true" and lastChatMessage[source] and lastChatMessage[source] == msg then outputChatBox("Stop repeating yourself!", source, 255, 0, 0) return else lastChatMessage[source] = msg end local r, g, b = getPlayerNametagColor(source) --outputChatBox(getPlayerName(source) .. ': #FFFFFF' .. msg:gsub('#%x%x%x%x%x%x', ''), g_Root, r, g, b, true) --outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end ) Раскоментируй и замени.
-
В ресурсе freeroam ищешь файлик ''fr_server''. Ищешь строчки: addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox(getClientName(source) .. ': #FFFFFF' .. msg:gsub('#%x%x%x%x%x%x', ''), g_Root, r, g, b, true) end end ) Заменяешь на: addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox(getClientName(source) .. ': #FFFFFF' .. msg:gsub('#%x%x%x%x%x%x', ''), g_Root, r, g, b) end end )
-
Default wall with object. No more.
-
function identTarg ( targettedElement ) if getElementType ( targettedElement ) == "object" and getElementModel ( targettedElement ) == 2922 then ... end end addEventHandler ( "onPlayerTarget", getRootElement(), identTarg )
-
Попробуйте заменить 'triggerData.time' на число.
