Jump to content

مشآكلي My problems


Recommended Posts

Posted (edited)

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

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

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

Edit :

ملاحظه :

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

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

Edited by Guest
  • Replies 110
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted (edited)
حاول؟ بس حاول عشان اقدر انك سويت معي ذذ

ايه بس يعني كيف اخليه اذا كتب اسمي !؟

Edited by Guest
Posted
تقدر تسوية كذا :

addEventHandler("onPlayerChat",root, 
function (msg) 
if ( msg == "msg" ) then 
-- Func 
     end 
end 
) 

or

string.find 

صراحه انا مضيع في البرمجه :cry:

طلع لي شيب ما عرفت اسويه

Posted
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 يكتب اسمه عادي.

Posted
لو تبيه off طف المود

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

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

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

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

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

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

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

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

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

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

والثاني off

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

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

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

فهمت؟

Posted
طيب حط لنا النافذه عشان نسوي لك المود
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

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

Posted

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

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

  
-- 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- جربه ورد خبر ذذ

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

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

  
-- 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

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

Posted

عطيته صلاحيه فـ قروب الادمن ؟ ذذ

غيرت اسماء الازرار ؟

طلع لكـ كلام فـ الشات طيب ؟

Posted

-- 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) 
  
  
  
Posted
-- 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) 
  
  
  

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

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

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

Posted
عطيته صلاحيه فـ قروب الادمن ؟ ذذ

غيرت اسماء الازرار ؟

طلع لكـ كلام فـ الشات طيب ؟

عطيته صلاحيه

+ غيرت الاسماء

+ ما طلع الكلام بالشات

Posted

-- 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) 
  
  
  
Posted (edited)
:|

/debugscript 3

warning: MyFolder\client.lua:13: Bad argument @ 'getPlayerName'[Expected player at argument1, got string 'left']

ERROR: MyFolder\client.lua:13: attempt to concatenate a boolean value

Edited by Guest

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...