Leaderboard
Popular Content
Showing content with the highest reputation on 01/04/20 in all areas
-
Haha, no no! That is not what you should do Let me explain. Inside the client events you should do what you previously did inside of the vehicle_left, vehicle_right key handlers! This is how your vehicle indicator scripts is executed on every game client on the server if one of them steers the vehicle left or right. Then you have to use triggerServerEvent inside of the vehicle_left and vehicle_right key handlers to send either onVehicleTurnOnIndicator or onVehicleTurnOffIndicator events, depending on if the key is pressed down or not. Imagine it like this: So try moving around the code on the client-side. What is now inside the key handlers should be put into the onClientVehicleTurnOn/OffIndicator event handlers. Then add new code into the bind key handlers to call the server events.2 points
-
السلام عليكم ورحمة الله وبركاته كثير أشوف ناس نفسها تتعلم برمجة و إلخ , ف ببدأ بدورة تعليم إن شاء الله .. إسم الدورة : عبادي كورس .. على بركة الله : لازم تعرف أشياء أساسية باللغة بشكل عام : [1] - function [2] - if [3] - then [4] - end - function : تستخدم لإنشاء وظيفة , شو هي الوظيفة أصلاً ؟ , كثير ما نلاحظ وظائف موجودة أساسيا باللعبة مثل : setElementData , setPlayerArmor , isPedDead مثلا الأولى تُستخدم لإعطاء لاعب داتا , والثانية لإعطاء لاعب درع , و الثانية لمعرفة اللاعب ميت أو لا .. هذي كلها تسمى وظائف ( فنكشن ) ء تم إنشاء هذه الوظائف ( function ) من خلال ال توضيح أكثر ؟ function setPlayerArmor هكذا تم إنشاء الوظيفة الي نشوفها فوق ^ , طيب هسا نجي نفكر بالمنطق , وظيفة تعطي درع للاعب ؟ طب مين اللاعب الي بدي اعطيه , هل رح اعطي نفسي , ولا اعطي لاعب عشوائي ! تسويها من الفنكشن نفسه , طب كيف ؟ arguments نحط بين قوسين كلمة تدل على اللاعب الي بدي اعطيه , ونسميها هذي الكلمة . - اهم شيء تكون بين قوسين , زيادة قوس او تنقيص قوس = خطا function setPlayerArmor ( player ) -? player طب عندي سؤال هسا , شرط احط كلمة - لا مو شرط , أي كلمة تدلك ع اللاعب الي رح تعطيه مستقبلاً , مثال : function setPlayerArmor ( p ) function setPlayerArmor ( x ) function setPlayerArmor ( z ) - ! arguments طب انا ما فهمت كلمة هسا بقولك كيف تفهمها , انا بدي اعطي لاعب محدد درع , رحت اخترت لاعب من القائمة عشان اعطيه درع , يدلني على اللاعب argument يدلني على اللاعب الي بدي اعطيه , اذا لازم الوظيفة يكون فيها argument رحت ع الوظيفة , ما فيها نجي نفكر هسا , طب انا حددت اللاعب الي بدي اعطيه الدرع , بس كم كمية الدرع الي بدي اعطيه اياها !!! - مثلا انا بدي اعطيه نص درع ( 50 ) بالمئة .. جديد خاص بكمية الدرع argument إذا لازم نسوي function setPlayerArmor ( x , armor ) جديد argument وهيك سوينا argument لازم نحط فاصلة بين كل . - argument ملاحظات بسيطة : لازم فاصلة بين كل - إسم خاص فيه , ممنوع تكرر الإسم argument لكل طبعاً هذي أساسيات , نراكم ب الجزء 2 ,, راجعو الجزء 1 مرتين وافهموه و احفظوهـ , اي اسئلة على الخاص ~ - المحترفين بالبرمجةة : عارف انه لسا مو مكمله , بس اهم شيء التاسيس ~~ * ملاحظة : لمعرفة قراءة الموضوع ، اذا كنت من التلفون حط وضعية سطح مكتب ، الافضل تقراها من اللابتوب او الكمبيوتر .. إختبار : [1] - أي الآتي خاطئ : A- function newfunction ( n ) B- function NewFunction ( z , c , s ) C- function Newfunction ( n ; F ) [2] - صحح الخطأ : A- function nEwFunction ( sop ,, o ) B- function newfunction n , b C- function news ( n , n ) D- function ( newFunction , n )1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
hey The_GTA, i decided to delete the userpanel mod, and make one by myself. there was no chance that i would fix the problem, as i said i dont know a lot of scripting but i will search for tutorials and do it slowly, i found a program called Visual Studio Code that has a MTA SA Lua Code extension wich helps a lot XD, but thanks again man i hope that u can help me with the scripts if i see any problem im the process1 point
-
1 point
-
guiGetScreenSize interpolateBetween getTickCount dxDrawImage addEventHandler - 'onClientRender'1 point
-
no discord , no photos , no introduction or explaination !1 point
-
Nota: Os veículos (e outros elementos) criados no lado do cliente são vistos apenas pelo cliente que os criou, não são sincronizados e os jogadores não podem entrar neles. Eles são essencialmente apenas para exibição. Essa informação jaé mostrada em createVehicle acho que você deixou passar XD1 point
-
i will try to figure out how to do a new command to update in the server side, and try to share the information with the saving script that i have, Thank you so much by your help, God Bless you, and if i have any problem running the code i will notify here1 point
-
Fiz um básico para você saber as funções, com algumas implementações para não bugarem. Aviso, não testei. local adicione_acl_dos_recruta = "RECRUTA MAFIA" --/> Exemplo de ACL. addCommandHandler("dartagmafia", function (thePlayer, _, jogador) if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "MAFIA" )) then local player = getPlayerFromPartialName(jogador) if player then if isGuestAccount(getPlayerAccount(player)) then return outputChatBox("Jogador Não Esta Logado no Momento!", thePlayer, 255,255,255, true) end local conta_do_player = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..conta_do_player, aclGetGroup(adicione_acl_dos_recruta)) == false then aclGroupAddObject(aclGetGroup(adicione_acl_dos_recruta), "user."..conta_do_player) outputChatBox("Você Enviou a TAG Para "..getPlayerName(player)..".", thePlayer, 255,255,255, true) outputChatBox("Você Recebeu a TAG do "..getPlayerName(thePlayer)..".", player, 255,255,255, true) else outputChatBox("Jogador Já Esta Utilizando a TAG.", thePlayer, 255,255,255, true) end else outputChatBox("Jogador Não Encontrado!", thePlayer, 255,255,255, true) end else outputChatBox("Sem Permissão!", thePlayer, 255,255,255, true) end end) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end1 point
-
The solution in this topic from yesterday utilizes a method you could also use.1 point
-
Quando registrar a conta, só setar uma accountData nela com o serial do jogador. Sempre que o jogador tentar registrar uma conta, passa um loop por todas as contas verificando se alguma delas já tem o serial dele registrado. Se tiver, bloqueia o registro e pede pra ele logar naquela. Sobre setar o nick do jogador como o nome da conta, use setPlayerName. E da próxima vez, poste na seção de Programação em Lua. Veja as regras do fórum aqui:1 point
-
O client trabalha para o servidor. Creio eu que a partir do momento que o server-side desliga, o client-side é desligado primeiro que ele porque o client-side só funciona se o server-side estiver ligado. Você bem que poderia salvar essa quilometragem quando o jogador sair do veículo no client. https://wiki.multitheftauto.com/wiki/OnClientPlayerVehicleExit1 point
-
Added an update to fix those issues, plus a LOD so roads don't show as removed when you go far1 point