-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
في الشات ولا في تاب ولا وين بالضبط + انت حاط الأعدادات في الميتا؟
-
/debugscript 3 + صورة للمشكلة لان ما فهمت وش تقصد بألوان الفريق
-
هذا لانك ما نسخت الكود بالطريقة الصحيحة الطريقة الصحيح للنسخ لأخفاء ارقام الأسطر LINE NUMBER ON/OFF اول شي اضغط على الزر لتحديد كل الكود SELECT ALL بعدين اضغط على الزر لنسخ الكود Ctrl + c بعدين اضغط على حسب لغة المتصفح عندك copy او ممكن تضغط يمين و تختار نسخ او
-
I'm confused. Unclear scripting and wiki guide?
TAPL replied to KieronWiltshire's topic in Scripting
Parameters is not hidden, they're what we put between the brackets. The hidden is the predefined variable only. So for example the event onMarkerHit: So the function is like this: function WhateverName() If you wanted to use the parameters, you will put them in the brackets: function WhateverName(hitElement, matchingDimension) If you not going to use matchingDimension you can remove it: function WhateverName(hitElement) If you not going to use hitElement you can remove it and it would look like: function WhateverName(_, matchingDimension) The name does not matter, you can do this: function WhateverName(whatever1, whatever2) Also note that you must supply all parameters before the one you wish to use. -
I'm confused. Unclear scripting and wiki guide?
TAPL replied to KieronWiltshire's topic in Scripting
Actually the event onPlayerJoin doesn't have parameters, you can see this in the wiki. https://wiki.multitheftauto.com/wiki/OnPlayerJoin source is an hidden variable, you don't need to define it. There is a list of predefined variable: https://forum.multitheftauto.com/viewtopic.php?f=91&t=39678 ----------------------------------------------- And about setCameraMatrix, the wiki say it: https://wiki.multitheftauto.com/wiki/SetCameraMatrix -
local Marker = createMarker(2971.457, -670.1, 688.1, "cylinder", 2.0, 255, 255, 0, 150) addEventHandler("onClientMarkerHit", Marker, function(hitPlayer) if (hitPlayer == localPlayer) then local _, _, Pz = getElementPosition(hitPlayer) local _, _, Mz = getElementPosition(Marker) if (Mz + 3 >= Pz) and (Pz + 3 >= Mz) then guiSetVisible(abu, true) showCursor(true) end end end) جرب هذا إذا ما ضبطت الأكواد الي فوق
-
addEventHandler("onPlayerJoin", root, function() local ValidSkins = getValidPedModels() setElementModel(source, ValidSkins[math.random(#ValidSkins)]) end)
-
أنت متأكد ان الكود الي حطيته بالموضوع هو الي يفتح اللوحه؟ لان انا مستغرب ان حجم الماركر 1.0 و الأفنت شغال و فيه نافذه تظهر لان حسب معلوماتي الماركرات إذا كان الحجم صغير بعض الأحيان تصير مشكلة الأفنت ما يشتغل او يمكن الكود هو فعلاً الي يفتح النافذه بس الأرتفاع بالكود اكثر من اللازم جرب تقلل من 5 إلى 2 او 1 اقصد في السطر هذا if Mz + 5 >= Pz then
-
السورس هذا مو شي ثابت هذا متغير مخفي و هو يعتمد على الحدث نفسه و كل حدث السورس فيه يختلف مثلاً حدث يكون السورس فيه لاعب و ممكن يكون اوبجيكت او ماركر او سيارة يعني مو شرط يكون لاعب هذا يعتمد على الحدث نفسه و تقدر تعرف من صفحة الويكي التابعة للحدث https://wiki.multitheftauto.com/wiki/OnClientGUIClick
-
هذا وش وضعه بالضبط guiSetInputEnabled(false)
-
الحين ليه كل ذي المسافات بالكود؟؟؟ رتب كودك عشان تقدر تفهمه GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Marker = {} GUIEditor_Window = {} vehicleId = {510,433,601,497,522,463,596,490,535,409,562,560} marker = createMarker(207.51126,1864.24365,12,"cylinder",2,0,100,0,220) local x,y = guiGetScreenSize() GUIEditor_Window[1] = guiCreateWindow(x/2-123,y/2-206,246,413,"Select Car",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,34,228,255,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.5) GUIEditor_Button[2] = guiCreateButton(20,308,210,41,"Select",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(20,352,210,41,"Close",false,GUIEditor_Window[1]) addEventHandler("onClientMarkerHit", marker, function(hitPlayer) if hitPlayer == localPlayer and getElementData(hitPlayer, "gang") == "[ARMY]" then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end) addEventHandler("onClientMarkerLeave", marker, function(leftPlayer) if leftPlayer == localPlayer and getElementData(leftPlayer, "gang") == "[ARMY]" then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end end)
-
تعالة سكايب و اوريك هات سكايبك tapl_93 EDIT: اخونا الحبيب طلع جايب العيد الكود هذا if (getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police")) then مسويه كذا if (getPlayerTeam(source) ~= getTeamFromName("No Team") and getPlayerTeam(attacker) == getTeamFromName("Police")) then بينما المفروض يسويه كذا if (getPlayerTeam(source) == getTeamFromName("No Team") and getPlayerTeam(attacker) == getTeamFromName("Police")) then
-
تستهبل علينا ما يشتغل ارفع المود على موقع
-
جرب هذا و قول لي وش الي يجي بالشات بالنسبة إلى الشرطي و بالنسبة إلى اللاعب الآخر الي ماعليه نجوم كلبنت addEventHandler("onClientPlayerDamage", localPlayer, function(attacker) outputChatBox("TEST Client: 1") if (attacker and getElementType(attacker) == "player" and attacker ~= source) then outputChatBox("TEST Client: 2") if (getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police")) then outputChatBox("TEST Client: 3") if (getPlayerWantedLevel() == 0) then outputChatBox("TEST Client: 4") cancelEvent() triggerServerEvent("outputAttacker", attacker) outputChatBox("TEST Client: 5") end end end end) سيرفر addEvent("outputAttacker", true) addEventHandler("outputAttacker", root, function() outputChatBox("TEST Server") outputChatBox("You Can't kill that Player, because he doesn't have 0 Wanted Level", source, 255, 255, 255) end)
-
...__... معرض اكواد الكود الي حطيته شغال مافيه اي مشكلة ما يحتاج بعد تحطون هريس
-
function enterArea10(thePlayer) if getElementType(thePlayer) == "player" then local playerTeam = getPlayerTeam(thePlayer) local Clann = getTeamFromName("GX-7") local posX, posY = getElementPosition(thePlayer) local inArea = isInsideRadarArea(radar10, posX, posY) if (inArea) then if (playerTeam) == Clann then outputChatBox("Welcome", thePlayer, 0, 255, 0, true) else triggerClientEvent(thePlayer, "displayTimerGX", thePlayer) end end end end addEventHandler("onColShapeHit", zone, enterArea10)
-
صح ذكرت شي getPlayerWantedLevel بالكلينت يعطي بس حق اللوكل بلاير Client Side: addEventHandler("onClientPlayerDamage", localPlayer, function(attacker) if (attacker and getElementType(attacker) == "player" and attacker ~= source) then if (getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police")) then if (getPlayerWantedLevel() == 0) then cancelEvent() triggerServerEvent("outputAttacker", attacker) end end end end) Server Side: addEvent("outputAttacker", true) addEventHandler("outputAttacker", root, function() outputChatBox("You Can't kill that Player, because he doesn't have 0 Wanted Level", source, 255, 255, 255) end)
-
Client Side: addEventHandler("onClientPlayerDamage", root, function(attacker) if (attacker and getElementType(attacker) == "player" and attacker ~= source) then if (getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police")) then if (getPlayerWantedLevel(source) == 0) then if (source == localPlayer) then cancelEvent() elseif (attacker == localPlayer) then outputChatBox("You Can't kill that Player, because he doesn't have 0 Wanted Level", 255, 255, 255) end end end end end)
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=54 https://community.multitheftauto.com/index.php?p=resources&s=details&id=7560
