Leaderboard
Popular Content
Showing content with the highest reputation on 16/03/19 in all areas
-
السلام عليكم ورحمة الله وبرككاتهء كيفكم شباب .؟ اليوم سويت مود جديد هو مود الراديو يفتح من زر اف7 لازم تكون راكب سيارة وتكتب رقم المحطة من 1 الى 12 طبعا المحطة رقم 12 هي المحطة المحلية المود يعني شايفه حلو لسيرفرات الحياة الواقعية الصور مع الرابط الرابط : https://community.multitheftauto.com/index.php?p=resources&s=details&id=15944 وكما بقول فى كل مرة انزل فيها مود جديد.. رأيكم يهمنيي جدااً تحياتي للكل ..♥2 points
-
MTA Script :Damage Log v 1.0.0 Roleplay SQL Add DLog.sql in localhost/phpmyadmin add Clear Table Link In Desciption Video اسف على الجودة اهداء لكل المنتدى1 point
-
1 point
-
coroutines مالي خبرة في بس جرب دا function initTraffic() last_yield = getTickCount() initTrafficMap() loadPaths() calculateNodeLaneCounts() loadZOffsets() initAI() initTrafficGenerator() traffic_initialized = true end function startTrafficInitialization() traffic_initialization = coroutine.create(initTraffic) keepLoadingTraffic() end addEventHandler("onResourceStart",resourceRoot,startTrafficInitialization) function keepLoadingTraffic() if traffic_initialized then traffic_initialized = nil last_yield = nil return end if( coroutine.status( traffic_initialization ) ~= "dead" ) then coroutine.resume(traffic_initialization) -- الديبق بهذا السطر -- cannot resume dead coroutine [string "?"] setTimer(keepLoadingTraffic,50,1) end end function checkThreadYieldTime() local this_time = getTickCount() if this_time-last_yield >= 4000 then coroutine.yield() last_yield = this_time end end1 point
-
تصحيح لاخطاءك 1 - player => وبالتالي بلاير يساوي نوع الزر اللي الاعب ضغط عليه بالماوس onClienGUIClick هنا ارقيومنت من ارقيومنتات الحدث Parameters string button, string state, int absoluteX, int absoluteY button: the name of the button which will be clicked, it can be left, right, middle. state: the state of the mouse button, will be down if the mouse button was pushed, or up if it was released. Please note currently only the up state is supported. absoluteX: the X position of the mouse cursor, in pixels, measured from the left side of the screen. absoluteY: the Y position of the mouse cursor, in pixels, measured from the top of the screen 2 - localPlayer <= ولو انتا عايز تجيب الاعب اللي ضغط علي الزر تجيبوا من خلال لان ببساطة الويكي بيقول onClientGUIClick Clientside event Note: The player who clicked the gui-element is always the localPlayer. 3 - setElementHealth لا ينصح بها بالكلنت لان نصيحة مني ليك لا تثق بالكلنت سايد 4 - Buy.Health / BuyHealth الفرق بينهم هو Buy.Health ==> هو عبارة عن قيمة في جدول يعني تشتغل تمام لو انتا عامل كدا local Buy = { } ; Buy.Health = guiCreateButton( ... ) -- or -- Buy[ "Health" ] = guiCreateButton( ... ) بينما BuyHealh مجرد قيمة عادية للزر وليست قيمة داخل جدول local BuyHealth = guiCreateButton( ... ) وبسس بالتوفيق1 point
-
اتفق معك في كل شئ الا انوا يوجد اشخاص ماتو وهم مسلمين ومو عرب مو اي عربي يعنى في ناس ماتوا شهداء وهم ليسوا عرب وماتوا من أجل الوطن والاسلام وبالنسبة انك ليبي على مااعتقد تعرف وش اقصد1 point
-
Adicione aquela mesma verificação na linha 4 desse outro.1 point
-
Você habilitou o OOP no meta.xml ? <oop>true</oop> Não interfere (no seu caso), mas não recomendo ficar misturando trechos procedural com oop, opte por um e siga até o fim. Tente: function aclpm (thePlayer) if (thePlayer.type == "player") then local acc = thePlayer.account; if acc and not acc.guest then if ACLGroup.get("PM"):doesContainObject("user."..acc.name) then thePlayer:setData("Venda:Police.Job", true); acc:setData("Venda:Police.Job", true); end end end end addEventHandler("onElementDataChange", root, function (dataName, oldValue) if (source.type == "player" and dataName == "Venda:Police.Job") then if (source:getData(dataName)) then Boxs["Markers"]["Create"]["Skins"]:setVisibleTo(source, true); source:outputChat("Parabens! Você agora é um Policial, para saber tudo sobre a profissão(como prender, viaturas, muito mais), pressione o botão 'k'"); giveWeapon(source, 31, 5000); giveWeapon(source, 24, 5000); giveWeapon(source, 3); source:triggerEvent(getThisResource():getName()..": 3DText", root, "Seleção de Skins", Boxs["Markers"]["Create"]["Skins"]); else takeWeapon(source, 31); takeWeapon(source, 24); takeWeapon(source, 3); Boxs["Markers"]["Create"]["Skins"]:setVisibleTo(source, false); end end end )1 point
-
local function checkVehicleHandling() if not isElement(vehicle) then return end local flags = getVehicleHandling(vehicle)["handlingFlags"] if (bitAnd( flags, 32 ) == 32) or (bitAnd( flags, 64 ) == 64) then return true end end1 point
-
Eu fiz algo parecido anexando um createColSphere no trem. Dai quando o vagão colidir nesse colShape, anexa nele.1 point
-
1 point
-
function aclpm (thePlayer) if thePlayer and getElementType (thePlayer) == "player" then if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (thePlayer)), aclGetGroup ("Console")) then setElementData (thePlayer, "Venda:Police.Job", true) setAccountData (getPlayerAccount (thePlayer), "Venda:Police.Job", true) end end end @GodKraken Não use OOP se você não tem conhecimento avançado o suficiente.1 point
-
theTruck = createVehicle (578, -2258, 535, 36) -- Cria o caminhão. -- O carro é criado por qualquer um, pelo painel F1 ou Admin. addCommandHandler ("guinchar", function (thePlayer, cmd) local veh = getPedOccupiedVehicle (thePlayer) -- veh = veículo onde o jogador que executou o comando está dentro. if veh then -- Se o jogador está em um veículo, então: (se não estiver, veh = false) local vx, vy, vz = getElementPosition (veh) -- coordenadas do veículo. local cx, cy, cz = getElementPosition (theTruck) -- coordenadas do caminhão. local dist = getDistanceBetweenPoints3D (vx, vy, vz, cx, cy, cz) -- dist = distância entre o veículo que o jogador está dentro e o caminhão. if dist <= 10 then -- Se a distância entre eles for 20 ou menor, então: local attachs = getAttachedElements (theTruck) -- attachs é uma table com todos os elementos anexados ao caminhão. Será uma tabela vazia se não tiver nada anexado nele. if attachs[1] then -- Se existe algo anexado no caminhão (tipo um carro), então: outputChatBox ("O caminhão já está em uso.", thePlayer, 255, 100, 0) else -- Se não existe nada anexado no caminhão, então: attachElements (veh, theTruck, 0, -2, 0.8) -- Anexa o veículo no caminhão, com offsets. outputChatBox ("Anexado com sucesso.", thePlayer, 0, 255, 0) end else -- Se a distância entre o carro e o caminhão for maior que 10, então: outputChatBox ("Seu veículo não está perto o suficiente do caminhão.", thePlayer, 255, 100, 0) end end end)1 point
-
Tente isso. function aclpm (thePlayer) local Account = getPlayerAccount (thePlayer) local accName = getAccountName (getPlayerAccount (thePlayer)) if isObjectInACLGroup("user."..accName, aclGetGroup ("Console")) then setAccountData(Account, "Venda:Police.Job", true) end end1 point
-
Blz, dai é mais fácil pra obter a posição dele. Não vai precisar nem de colShape.1 point
-
AH TA. Vc não quer guinchar. Vc quer anexar o veículo em outro. Dai é possível sim. Eu já fiz algo parecido usando um createColSphere anexado no carro. Dai ao usar o comando, ele verifica se tem um caminhão com ID específico dentro do colShape. Se tiver, anexa o carro em cima desse caminhão. Mas não sei se este é o jeito mais otimizado de fazer isso. Uma pergunta: O caminhão é criado pelo script de guincho? Ou ele é criado pelos jogadores?1 point
-
Removing the check that checks if the attacker is an element before checking if the attacker is a player will cause errors because taking fall damage will call this event which does not have an attacker. Edit: It will work as intended but will leave your debug very messy.1 point
-
Acho que tem um exemplo na wiki que faz exatamente isso. myElegy = createVehicle (562, 1591.596680, -2495.323242, 18.098244) -- Cria o carro.. local x, y, z = getElementPosition (myElegy) -- Pega posiçãodo carro.. attachElementToElement -- Use attachElementToElement para grudar o veiculo no guincho. Acho que da pra fazer assim.1 point
-
Probably a resource with commands that is attached to a database. A way to counter this, be picky: And download only resources that look a bit more professional. But where is the fun in that? ? Highly secret + being honest here: @IIYAMA ? That is something similar to what those guys did to your server. But your server was the victim, instead of the ?.1 point
-
1 point
-
-- Copy to 'server.lua' function healPlayer(player, cmd, name, price) if not name or not price then outputChatBox("/heal [Player_Name] [Price]", player, 255, 255, 255, true) else local target = getPlayerFromName(name) if target then if getPlayerMoney(target)>=tonumber(price) then takePlayerMoney(target, tonumber(price)) givePlayerMoney(player, tonumber(price)) setElementHealth(target, 100) outputChatBox(getPlayerName(player) .. " healed you!", player, 255, 255, 255, true) outputChatBox("You healed " .. getPlayerName(target), player, 255, 255, 255, true) else outputChatBox("Can't pay the healing", player, 255, 255, 255, true) end else outputChatBox("I can't find the target!", player, 255, 255, 255, true) end end addCommandHandler("heal", healPlayer) -- Copy to 'meta.xml' <meta> <script src="server.lua" type="server"/> </meta>1 point
-
addCommandHandler getPlayerFromPartialName -- custom code (must be added to your code for it to work) getPlayerMoney setPlayerMoney getPedStat -- 24 for the ped's max health setElementHealth1 point
-
It works fine for me tho Try adding the googleapis domain to your whitelist if you're fetching from client I honestly have no idea. I searched a lot before using the API ad couldn't find anything. Would probably need to enable debugging and check there.1 point
-
source = هو المصدر حق الحدث يعني مثلا حدث بالكلنت "onClientGUIClick" السورس فيه هو الزر الي ضغط عليه اللاعب ____________________________ مثال اخر هذا حدث بالسيرفر "onColShapeHit" السورس فيه هو الكول شيب الي دخل فيه الالمنت واول بارتمر هو الالمنت الي دخل الكول شيب1 point
-
1 point
-
di usually use message keys, not the message itself for translation. I don’t really like Xml so I’ll show an example on Lua Tables local __locale = { ["en"] = { ["welcome_message"] = "Hello, brother!", }, ["ru"] = { ["welcome_message"] = "Привет, брат!", } } addEventHandler("onPlayerJoin", root, function() local lang = getElementData(source, "Language") outputChatBox(__locale[lang]["welcome_message"], source, 0, 255, 0, true) end );1 point
-
هذه اللعبة عرفتنى على ناس والبرمجة عموما تفيدك فى التعرف على لغات اخرى مثل رابط شىء معين بـموقع Php يعنى استفدت من اللعبة باشياء وعلى العموم دا رائيك ودا رائي ..1 point
-
1 point