Jump to content

مشآكلي My problems


Recommended Posts

بسم الله الرحمن الرحيم

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

ابي كود اذا اي احد كتب اسمي في الشات ياخذ ميوت ويطلع له كلام بالشات انه مشغول

Edit :

ملاحظه :

ستكون مشاكلي هنا ...

لعدم التكثير من المواضيع.

Edited by Guest
Link to comment
  • Replies 110
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

http://www.m5zn.com/d/?0ec7f04fb807828 المود جاهز مجهز

من صنع |-Mr|-Talal07|

طيب ذا الكود :

name = "طلال" 
time = 30 
timer = {} 
  
addEventHandler("onPlayerChat",root, 
    function (msg,type) 
        local find = string.find(msg,name) 
        if ( type == 0 and find ) then 
            setPlayerMuted(source,true) 
            outputChatBox("* You Are Muted For " .. time .. " To Say " .. name,source,255,0,0) 
            timer[source] = setTimer(endMute,time * 1000,1,source) 
        end 
    end 
) 
  
function endMute(player) 
    setPlayerMuted(player,false) 
    outputChatBox("* You Can Talk Now",player,0,255,0) 
end 
  
addEventHandler("onPlayerQuit",root, 
    function () 
        if ( isTimer(timer[source]) ) then 
            killTimer(timer[source])  
        end 
    end 
) 
  

ابي بدل كلمه طلال مابي يكون على نفس الاسم.

مثلا عندي نافذه وازرار

مثلا انا مسوي زر اسمه on

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

وزر ثاني off يكتب اسمه عادي.

Link to comment
لو تبيه off طف المود

لو تبيه on شغل المود =\

ويب بدل كلمة طلال بـ اسمكـ

ياخي ما اقصد كذا !

اقصد ان عندي نافذه وفيها زر اسمه on وزر اسمه off

ابيه اذا ضغط على زر on

اي واحد يكتب اسمه ياكل ميوت

مو يكتب اسمي انا ! اسم الي ضغط الزر يعني اللاعب

Link to comment
يآخي وضح لنا اكثر مافهمنا وش تبي

انا سويت نافذه وفي 2 ازرار

الزر الاول اسمه on

والثاني off

نفترض ركبت المود بسيرفري !

جيت انت فتحت النافذه وضغطت على زر on

الي يكتب اسمك بالشات يكل ميوت !

فهمت؟

Link to comment
طيب حط لنا النافذه عشان نسوي لك المود
Wnd = guiCreateWindow(241,515,317,120,"No Subject",false) 
On = guiCreateButton(70,30,50,50,"On",false,Wnd) 
Off = guiCreateButton(10,30,50,50,"Off",false,Wnd) 

ابي اذا ضغط على زر On

اي واحد يكتب اسمه بالشات ياكل ميوت

واذا ضغط على off

اي واحد يكتب اسمه عادي!

Link to comment

معليش كنت اصلي ذذ

بس عدلت لككـ الكود

  
-- client side 
  
addEventHandler("onClientGUIClick",root, 
function(player) 
if source == btnOn then  
        outputChatBox(""..getPlayerName(player).." is busy",root,255,255,0,true) 
        triggerServerEvent("on",getLocalPlayer())   
     end 
end) 
  
addEventHandler("onClientGUIClick",root, 
function(player) 
if source == btnOff then  
        outputChatBox(""..getPlayerName(player).." is is Available ",root,255,255,0,true) 
triggerServerEvent("off",getLocalPlayer())   
    end 
end) 
  

-- server side 
  
addEvent("on",true)  
addEventHandler("on",root,  
function () 
addEventHandler("onPlayerChat", root, mute)     
end) 
  
addEvent("off",true)  
addEventHandler("off",root,  
function () 
 removeEventHandler("onPlayerChat", root, mute)     
end 
) 
  
name = "getPlayerName(source)" 
time = 30 
timer = {} 
  
    function mute(msg,type) 
        local find = string.find(msg,name) 
        if ( type == 0 and find ) then 
            setPlayerMuted(source,true) 
            outputChatBox("* You Are Muted For " .. time .. " " ,source,255,0,0) 
            timer[source] = setTimer(endMute,time * 1000,1,source) 
        end 
    end 
) 
  
function endMute(player) 
    setPlayerMuted(player,false) 
    outputChatBox("* You Can Talk Now",player,0,255,0) 
end 
  
addEventHandler("onPlayerQuit",root, 
    function () 
        if ( isTimer(timer[source]) ) then 
            killTimer(timer[source]) 
        end 
    end 
) 
  
  
  

1- ماجربته

2- غير اسماء الازرار

btnOn= اسم الزر اللي يسوي on

btnOff = اللي يعطل الـ خاصيه

3- جربه ورد خبر ذذ

Link to comment
معليش كنت اصلي ذذ

بس عدلت لككـ الكود

  
-- client side 
  
addEventHandler("onClientGUIClick",root, 
function(player) 
if source == btnOn then  
        outputChatBox(""..getPlayerName(player).." is busy",root,255,255,0,true) 
        triggerServerEvent("on",getLocalPlayer())   
     end 
end) 
  
addEventHandler("onClientGUIClick",root, 
function(player) 
if source == btnOff then  
        outputChatBox(""..getPlayerName(player).." is is Available ",root,255,255,0,true) 
triggerServerEvent("off",getLocalPlayer())   
    end 
end) 
  

-- server side 
  
addEvent("on",true)  
addEventHandler("on",root,  
function () 
addEventHandler("onPlayerChat", root, mute)     
end) 
  
addEvent("off",true)  
addEventHandler("off",root,  
function () 
 removeEventHandler("onPlayerChat", root, mute)     
end 
) 
  
name = "getPlayerName(source)" 
time = 30 
timer = {} 
  
    function mute(msg,type) 
        local find = string.find(msg,name) 
        if ( type == 0 and find ) then 
            setPlayerMuted(source,true) 
            outputChatBox("* You Are Muted For " .. time .. " " ,source,255,0,0) 
            timer[source] = setTimer(endMute,time * 1000,1,source) 
        end 
    end 
) 
  
function endMute(player) 
    setPlayerMuted(player,false) 
    outputChatBox("* You Can Talk Now",player,0,255,0) 
end 
  
addEventHandler("onPlayerQuit",root, 
    function () 
        if ( isTimer(timer[source]) ) then 
            killTimer(timer[source]) 
        end 
    end 
) 
  
  
  

1- ماجربته

2- غير اسماء الازرار

btnOn= اسم الزر اللي يسوي on

btnOff = اللي يعطل الـ خاصيه

3- جربه ورد خبر ذذ

ضغطت على زر on

وكتبت اسمي بالشات ما انصكيت ميوت!؟

Link to comment

-- Server --

  
  
addEvent("on",true)  
addEventHandler("on",root,  
function () 
addEventHandler("onPlayerChat", root, mute)     
end) 
  
addEvent("off",true)  
addEventHandler("off",root,  
function () 
 removeEventHandler("onPlayerChat", root, mute)     
end 
) 
  
name = "اسمك" 
time = 30 
timer = {} 
  
    function mute(msg,type) 
        local find = string.find(msg,name) 
        if ( type == 0 and find ) then 
            setPlayerMuted(source,true) 
            outputChatBox("* You Are Muted For " .. time .. " " ,source,255,0,0) 
            timer[source] = setTimer(endMute,time * 1000,1,source) 
        end 
    end 
  
  
function endMute(player) 
    setPlayerMuted(player,false) 
    outputChatBox("* You Can Talk Now",player,0,255,0) 
end 
  
addEventHandler("onPlayerQuit",root, 
    function () 
        if ( isTimer(timer[source]) ) then 
            killTimer(timer[source]) 
        end 
    end 
) 
  
  
  

-- Client --

Wnd = guiCreateWindow(241,515,317,120,"No Subject",false) 
On = guiCreateButton(70,30,50,50,"On",false,Wnd) 
Off = guiCreateButton(10,30,50,50,"Off",false,Wnd) 
  
  
  
addEventHandler("onClientGUIClick",root, 
function(player) 
if source == On then  
        outputChatBox("  Name is busy",root,255,255,0,true) 
        triggerServerEvent("on",getLocalPlayer())   
       elseif source == Off then         
       outputChatBox(" Name is is Available ",root,255,255,0,true) 
triggerServerEvent("off",getLocalPlayer())   
     end 
end) 
  
  
  
Link to comment
-- Server --

  
  
addEvent("on",true)  
addEventHandler("on",root,  
function () 
addEventHandler("onPlayerChat", root, mute)     
end) 
  
addEvent("off",true)  
addEventHandler("off",root,  
function () 
 removeEventHandler("onPlayerChat", root, mute)     
end 
) 
  
name = "اسمك" 
time = 30 
timer = {} 
  
    function mute(msg,type) 
        local find = string.find(msg,name) 
        if ( type == 0 and find ) then 
            setPlayerMuted(source,true) 
            outputChatBox("* You Are Muted For " .. time .. " " ,source,255,0,0) 
            timer[source] = setTimer(endMute,time * 1000,1,source) 
        end 
    end 
  
  
function endMute(player) 
    setPlayerMuted(player,false) 
    outputChatBox("* You Can Talk Now",player,0,255,0) 
end 
  
addEventHandler("onPlayerQuit",root, 
    function () 
        if ( isTimer(timer[source]) ) then 
            killTimer(timer[source]) 
        end 
    end 
) 
  
  
  

-- Client --

Wnd = guiCreateWindow(241,515,317,120,"No Subject",false) 
On = guiCreateButton(70,30,50,50,"On",false,Wnd) 
Off = guiCreateButton(10,30,50,50,"Off",false,Wnd) 
  
  
  
addEventHandler("onClientGUIClick",root, 
function(player) 
if source == On then  
        outputChatBox("  Name is busy",root,255,255,0,true) 
        triggerServerEvent("on",getLocalPlayer())   
       elseif source == Off then         
       outputChatBox(" Name is is Available ",root,255,255,0,true) 
triggerServerEvent("off",getLocalPlayer())   
     end 
end) 
  
  
  

هو مايبي يكتب الاسم

هو يبي يسوي لوحة يقدر اللاعب من خلالها يحط نفسه مشغول او متاح

مو خاصه فيه هو بس او لـ شخص واحد ذذ

Link to comment

-- Server --

  
  
addEvent("on",true)  
addEventHandler("on",root,  
function () 
addEventHandler("onPlayerChat", root, mute)     
end) 
  
addEvent("off",true)  
addEventHandler("off",root,  
function () 
 removeEventHandler("onPlayerChat", root, mute)     
end 
) 
  
  
time = 30 
timer = {} 
  
    function mute(msg,type) 
        local find = string.find(msg,getPlayerName(source)) 
        if ( type == 0 and find ) then 
            setPlayerMuted(source,true) 
            outputChatBox("* You Are Muted For " .. time .. " " ,source,255,0,0) 
            timer[source] = setTimer(endMute,time * 1000,1,source) 
        end 
    end 
  
  
function endMute(player) 
    setPlayerMuted(player,false) 
    outputChatBox("* You Can Talk Now",player,0,255,0) 
end 
  
addEventHandler("onPlayerQuit",root, 
    function () 
        if ( isTimer(timer[source]) ) then 
            killTimer(timer[source]) 
        end 
    end 
) 
  
  
  

-- Client --

Wnd = guiCreateWindow(241,515,317,120,"No Subject",false) 
On = guiCreateButton(70,30,50,50,"On",false,Wnd) 
Off = guiCreateButton(10,30,50,50,"Off",false,Wnd) 
  
  
-- client side 
  
addEventHandler("onClientGUIClick",root, 
function() 
PlayerName = getPlayerName(localPlayer) 
if source == On then  
        outputChatBox("  "..PlayerName.." is busy",root,255,255,0,true) 
        triggerServerEvent("on",getLocalPlayer())   
       elseif source == Off then         
       outputChatBox(" "..PlayerName.." is is Available ",root,255,255,0,true) 
triggerServerEvent("off",getLocalPlayer())   
     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...