Jump to content

مساعدة في شيئ بسيط


Recommended Posts

السلام عليكم ورحمة الله وبركاته

انا معي عدلت مهمة للهجولة

لكن صارت عندي مشكلة ان اي شخص من داخل المهمة يضغط اف1 ويغش بالفري روم

ومنهم يستخدم لوحة الادمنية وباقي اللوحات

كيف امنع استخدام اي لوحة داخل المهمة؟

Link to comment

السلام عليكم ورحمة الله وبركاته

انا معي عدلت مهمة للهجولة

لكن صارت عندي مشكلة ان اي شخص من داخل المهمة يضغط اف1 ويغش بالفري روم

ومنهم يستخدم لوحة الادمنية وباقي اللوحات

كيف امنع استخدام اي لوحة داخل المهمة؟

Link to comment
السلام عليكم ورحمة الله وبركاته

انا معي عدلت مهمة للهجولة

لكن صارت عندي مشكلة ان اي شخص من داخل المهمة يضغط اف1 ويغش بالفري روم

ومنهم يستخدم لوحة الادمنية وباقي اللوحات

كيف امنع استخدام اي لوحة داخل المهمة؟

https://forum.multitheftauto.com/viewtopic.php?f ... 8A#p777080

Link to comment
السلام عليكم ورحمة الله وبركاته

انا معي عدلت مهمة للهجولة

لكن صارت عندي مشكلة ان اي شخص من داخل المهمة يضغط اف1 ويغش بالفري روم

ومنهم يستخدم لوحة الادمنية وباقي اللوحات

كيف امنع استخدام اي لوحة داخل المهمة؟

https://forum.multitheftauto.com/viewtopic.php?f ... 8A#p777080

Link to comment
السلام عليكم ورحمة الله وبركاته

انا معي عدلت مهمة للهجولة

لكن صارت عندي مشكلة ان اي شخص من داخل المهمة يضغط اف1 ويغش بالفري روم

ومنهم يستخدم لوحة الادمنية وباقي اللوحات

كيف امنع استخدام اي لوحة داخل المهمة؟

https://forum.multitheftauto.com/viewtopic.php?f ... 8A#p777080

شكراً لك اخي

انا سويت لوحة

وضعت بها ايديت + زر

وسويت عند الضغط على زر يجيب الكلام الذي باللوحة ويخرجه بالشات

لكن ابي الكلام يخرج لتيم محدد فقط كيف؟

Link to comment
السلام عليكم ورحمة الله وبركاته

انا معي عدلت مهمة للهجولة

لكن صارت عندي مشكلة ان اي شخص من داخل المهمة يضغط اف1 ويغش بالفري روم

ومنهم يستخدم لوحة الادمنية وباقي اللوحات

كيف امنع استخدام اي لوحة داخل المهمة؟

https://forum.multitheftauto.com/viewtopic.php?f ... 8A#p777080

شكراً لك اخي

انا سويت لوحة

وضعت بها ايديت + زر

وسويت عند الضغط على زر يجيب الكلام الذي باللوحة ويخرجه بالشات

لكن ابي الكلام يخرج لتيم محدد فقط كيف؟

Link to comment

محاولتي

function team1(playersteam) 
    for k,v in ipairs (getTeamFromName("Police")) do 
        if (v == playersteam) then 
        outputChatBox("The Player "..getPlayerName(localPlayer).." Was Called The Police",playersteam,0,255,0) 
        end 
    end 
end 
  
addEventHandler("onClientGUIClick",root,function() 
    if (source == button2) then 
        outputChatBox("You Was Called By Police",localPlayer,0,255,0) 
        team1() 
    end 
end) 

Link to comment

ماجربته

addEventHandler("onClientGUIClick",GUIEditor.button[1],function() 
if guiGetText (GUIEditor.edit[1]) ~='' then 
triggerServerEvent("send",localPlayer,guiGetText(GUIEditor.edit[1])) 
else 
outputChatBox ( 'Please write anything for team', 255,0,0) 
end 
end,false) 

addEvent("send",true) 
addEventHandler("send",root,function(msg)  
if getPlayerTeam (source) and getPlayerTeam (source) == getTeamFromName ('Team' ) then 
outputChatBox ('Player ' ..getPlayerName(source).. ' Send Message ' .. msg,root, 255, 255, 0) 
end 
end) 
Link to comment

# Client

addEventHandler("onClientGUIClick",root,function() 
  
if ( source == button2 ) then 
     
outputChatBox("You Was Called By Police",0,255,0) 
         
triggerServerEvent("Team_Msg",localPlayer ) 
    end 
end      
    ) ; 

# Server

local TheTeam = "Police" 
  
addEvent("Team_Msg",true) 
addEventHandler("Team_Msg",root, 
function (  ) 
  
local Team = getTeamFromName ( TheTeam ) 
  
if ( Team ) then 
  
for i, PlayerTeam in ipairs ( getPlayersInTeam ( Team ) ) do 
  
outputChatBox("The Player "..getPlayerName(source).." Was Called The Police",PlayerTeam,0,255,0) 
  
        end 
    end 
end 
    ) ; 
Link to comment

اضفت له تحقق ان كان بالتيم يسوي ريتورن

addEventHandler("onClientGUIClick",root,function() 
  
if ( source == button2 ) then 
  
if getPlayerTeam(localPlayer) == "Police" then 
    outputChatBox("You Was Allred In Police Team",localPlayer,255,0,0) 
    return 
 end 
    
outputChatBox("You Was Called By Police",0,0,255) 
        
triggerServerEvent("Team_Msg",localPlayer ) 
    end 
end     
    ) ; 

ودخلت نفسي التيم وضغط على الزر اشتغل عادي كأني لاعب بتيم اخر

Link to comment

حاولت اسوي الرسائل جوي مسج اجاني خطأ

addEventHandler("onClientGUIClick",root,function() 
  
if ( source == button2 ) then 
  
if getPlayerTeam ( localPlayer ) == getTeamFromName ( "Police" ) then return  
exports["guimessages"]:outputServer(localPlayer,"You Was Allred In Police Team", 255 ,0 ,0 ) end 
    
exports["guimessages"]:outputServer(localPlayer,"You Was Called By Police",0,0,255) 
        
triggerServerEvent("Team_Msg",localPlayer ) 
    end 
end     
    ) ; 

Link to comment

انا سويت ماركر لوحة اسلحة

لكن بها مشاكل

  
--client 
  
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(159, 52, 528, 477, "[PS]Weapon Marker[PS]", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetAlpha(GUIEditor.window[1], 1.00) 
        guiSetVisible(GUIEditor.window[1],false) 
        GUIEditor.button[1] = guiCreateButton(14, 47, 123, 32, "Buy 100 M4", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF") 
        GUIEditor.button[2] = guiCreateButton(189, 47, 123, 32, "Buy 100 AK47", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF") 
        GUIEditor.button[3] = guiCreateButton(383, 47, 123, 32, "Buy 100 MP5", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF") 
        GUIEditor.button[4] = guiCreateButton(14, 110, 123, 32, "Buy 100 Sniper", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFFFF") 
        GUIEditor.button[5] = guiCreateButton(189, 110, 123, 32, "Buy 100 Uzi", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFFFFFF") 
        GUIEditor.button[6] = guiCreateButton(383, 110, 123, 32, "Buy 100 Sawed-off", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF") 
        GUIEditor.button[7] = guiCreateButton(14, 175, 123, 32, "Buy 100 Combat SG", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFFFFFFF") 
        GUIEditor.button[8] = guiCreateButton(189, 175, 123, 32, "Buy 100 Deagle", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFFFFFFF") 
        GUIEditor.button[9] = guiCreateButton(383, 175, 123, 32, "Buy 100 Tec-9", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF") 
        GUIEditor.label[1] = guiCreateLabel(205, 244, 91, 32, "$10000", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-header") 
        GUIEditor.label[2] = guiCreateLabel(3, 283, 525, 15, "_______________________________________________________________________________________________________", false, GUIEditor.window[1]) 
        GUIEditor.button[10] = guiCreateButton(22, 352, 125, 47, "شراء 4 قنابل", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FFFFFFFF") 
        GUIEditor.label[3] = guiCreateLabel(41, 414, 86, 33, "$10000", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[3], "sa-header") 
        GUIEditor.button[11] = guiCreateButton(189, 352, 125, 47, "شراء 100 خلاط", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[11], "NormalTextColour", "FFFFFFFF") 
        GUIEditor.label[4] = guiCreateLabel(208, 414, 96, 27, "$100000", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[4], "sa-header") 
        GUIEditor.button[12] = guiCreateButton(381, 352, 125, 47, "شراء 10 ار بي جي", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[12], "NormalTextColour", "FFFFFFFF") 
        GUIEditor.label[5] = guiCreateLabel(400, 414, 96, 27, "$50000", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[5], "sa-header")     
        GUIEditor.button[13] = guiCreateButton(14, 250, 21, 23, "x", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[13], "NormalTextColour", "FFFE0E0E")     
    end 
) 
  
  
  
local markerweapon = createMarker (784.06311,-2114.36377,12.00000, "cylinder", 1.5, 255, 255, 0, 170 ) 
local markervehilce = createMarker(784.06427,-2120.47461,12.00000, "cylinder", 1.5, 255, 255, 0, 170 ) 
  
  
  
addEventHandler("onClientMarkerHit",markerweapon,function() 
    guiSetVisible(GUIEditor.window[1],true) 
    showCursor(true) 
end) 
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[1]) then 
        triggerServerEvent("ak47",localPlayer) 
    end 
end) 
  
  
  
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[2]) then 
        triggerServerEvent("m4",localPlayer) 
    end 
end) 
  
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[3]) then 
        triggerServerEvent("mp5",localPlayer) 
    end 
end) 
  
  
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[4]) then 
        triggerServerEvent("sniper",localPlayer) 
    end 
end) 
  
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[5]) then 
        triggerServerEvent("uzi",localPlayer) 
    end 
end) 
  
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[6]) then 
        triggerServerEvent("sof",localPlayer) 
    end 
end) 
  
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[7]) then 
        triggerServerEvent("sc",localPlayer) 
    end 
end) 
  
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[8]) then 
        triggerServerEvent("deagle",localPlayer) 
    end 
end) 
  
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[9]) then 
        triggerServerEvent("tc9",localPlayer) 
    end 
end) 
  
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[10]) then 
        triggerServerEvent("b1",localPlayer) 
    end 
end) 
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[11]) then 
        triggerServerEvent("b2",localPlayer) 
    end 
end) 
  
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[12]) then 
        triggerServerEvent("b3",localPlayer) 
    end 
end) 
  
addEventHandler("onClientGUIClick",root,function() 
    if (GUIEditor.button[13]) then 
        guiSetVisible(GUIEditor.window[1],false) 
        showCursor(false) 
     
    end 
end) 

احد اكبر المشاكل عندما شخص يلمس الماركر تفتح للجميع

وعندما شخص يقفل اللوحة تقفل للجميع

وما يشتري سلاح

--server 
addEvent("m4",true) 
addEventHandler("m4",root,function() 
    if getPlayerMoney(source) >=  10000 then 
        takePlayerMoney(source,10000) 
        giveWeapon(source,31,100) 
            outputChatBox("مبروك السلاح",source,0,255,0) 
        else 
            outputChatBox("لا تملك النقود الكافية",source,255,0,0) 
    end 
end) 
  
  
addEvent("ak47",true) 
addEventHandler("ak47",root,function() 
    if getPlayerMoney(source) >=  10000 then 
        takePlayerMoney(source,10000) 
        giveWeapon(source,30,100) 
            outputChatBox("مبروك السلاح",source,0,255,0) 
        else 
            outputChatBox("لا تملك النقود الكافية",source,255,0,0) 
    end 
end) 
  
  
addEvent("mp5",true) 
addEventHandler("mp5",root,function() 
    if getPlayerMoney(source) >=  10000 then 
        takePlayerMoney(source,10000) 
        giveWeapon(source,29,100) 
                    outputChatBox("مبروك السلاح",source,0,255,0) 
        else 
            outputChatBox("لا تملك النقود الكافية",source,255,0,0) 
    end 
end) 
  
addEvent("sniper",true) 
addEventHandler("sniper",root,function() 
    if getPlayerMoney(source) >=  10000 then 
        takePlayerMoney(source,10000) 
        giveWeapon(source,34,100) 
                    outputChatBox("مبروك السلاح",source,0,255,0) 
        else 
            outputChatBox("لا تملك النقود الكافية",source,255,0,0) 
    end 
end) 
  
  
addEvent("uzi",true) 
addEventHandler("uzi",root,function() 
    if getPlayerMoney(source) >=  10000 then 
        takePlayerMoney(source,10000) 
        giveWeapon(source,28,100) 
                    outputChatBox("مبروك السلاح",source,0,255,0) 
        else 
            outputChatBox("لا تملك النقود الكافية",source,255,0,0) 
    end 
end) 
  
  
addEvent("sof",true) 
addEventHandler("sof",root,function() 
    if getPlayerMoney(source) >=  10000 then 
        takePlayerMoney(source,10000) 
        giveWeapon(source,26,100) 
                    outputChatBox("مبروك السلاح",source,0,255,0) 
        else 
            outputChatBox("لا تملك النقود الكافية",source,255,0,0) 
    end 
end) 
  
addEvent("sc",true) 
addEventHandler("sc",root,function() 
    if getPlayerMoney(source) >=  10000 then 
        takePlayerMoney(source,10000) 
        giveWeapon(source,27,100) 
                    outputChatBox("مبروك السلاح",source,0,255,0) 
        else 
            outputChatBox("لا تملك النقود الكافية",source,255,0,0) 
    end 
end) 
  
  
addEvent("deagle",true) 
addEventHandler("deagle",root,function() 
    if getPlayerMoney(source) >=  10000 then 
        takePlayerMoney(source,10000) 
        giveWeapon(source,24,100) 
                    outputChatBox("مبروك السلاح",source,0,255,0) 
        else 
            outputChatBox("لا تملك النقود الكافية",source,255,0,0) 
    end 
end) 
  
addEvent("tc9",true) 
addEventHandler("tc9",root,function() 
    if getPlayerMoney(source) >=  10000 then 
        takePlayerMoney(source,10000) 
        giveWeapon(source,32,100) 
                    outputChatBox("مبروك السلاح",source,0,255,0) 
        else 
            outputChatBox("لا تملك النقود الكافية",source,255,0,0) 
    end 
end)) 
  
addEvent("b1",true) 
addEventHandler("b1",root,function() 
    if getPlayerMoney(source) >=  10000 then 
        takePlayerMoney(source,10000) 
        giveWeapon(source,16,4) 
                    outputChatBox("مبروك السلاح",source,0,255,0) 
        else 
            outputChatBox("لا تملك النقود الكافية",source,255,0,0) 
    end 
end) 
  
addEvent("b2",true) 
addEventHandler("b2",root,function() 
    if getPlayerMoney(source) >=  100000 then 
        takePlayerMoney(source,100000) 
        giveWeapon(source,38,100) 
                    outputChatBox("مبروك السلاح",source,0,255,0) 
        else 
            outputChatBox("لا تملك النقود الكافية",source,255,0,0) 
    end 
end) 
  
addEvent("b3",true) 
addEventHandler("b3",root,function() 
    if getPlayerMoney(source) >=  50000 then 
        takePlayerMoney(source,50000) 
        giveWeapon(source,35,10) 
                    outputChatBox("مبروك السلاح",source,0,255,0) 
        else 
            outputChatBox("لا تملك النقود الكافية",source,255,0,0) 
    end 
end 
) 
         
         
         
addEvent("armor",true) 
addEventHandler("armor",root,function() 
            setPedArmor(source,100) 
            setElementHealth (source,100) 
            outputChatBox("تم اعطائك دم ودرع!!",source,255,255,0) 
end) 
         
         

ERROR: Client (Jaer[x]Pro) triggered serverside event m4, but event is not added serverside

هذا الديبوق يجي

وعند m4

يجي مكانها اسماء كل الترايقرات

Link to comment

  
 addEventHandler("onClientMarkerHit",markerweapon,function(player) 
    if player == localPlayer then 
        guiSetVisible(GUIEditor.window[1],true) 
        showCursor(true) 
   end 
end) 

وفي حدث الضغط على الازرار تأكد ان الزر اللي انضغط هو السورس

addEventHandler("onClientGUIClick",root,function()
 
    if (source == GUIEditor.button[3]) then
 
        triggerServerEvent("mp5",localPlayer)
 
    end
 
end)
 
 

+ تحقق انه مافي غلط في السيرفر مخرب الملف بالكامل

Link to comment

  
 addEventHandler("onClientMarkerHit",markerweapon,function(player) 
    if player == localPlayer then 
        guiSetVisible(GUIEditor.window[1],true) 
        showCursor(true) 
   end 
end) 

وفي حدث الضغط على الازرار تأكد ان الزر اللي انضغط هو السورس

addEventHandler("onClientGUIClick",root,function()
 
    if (source == GUIEditor.button[3]) then
 
        triggerServerEvent("mp5",localPlayer)
 
    end
 
end)
 
 

+ تحقق انه مافي غلط في السيرفر مخرب الملف بالكامل

شكراًً لك اخي تم حل المشكلة

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...