فاّرس Posted March 15, 2013 Share Posted March 15, 2013 (edited) بسم الله الرحمن الرحيم السلام عليكم ورحمه الله وبركاته ابي كود اذا اي احد كتب اسمي في الشات ياخذ ميوت ويطلع له كلام بالشات انه مشغول Edit : ملاحظه : ستكون مشاكلي هنا ... لعدم التكثير من المواضيع. Edited March 16, 2013 by Guest Link to comment
iPrestege Posted March 15, 2013 Share Posted March 15, 2013 onPlayerChat setPlayerMuted setTimer outputChatBox Link to comment
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 onPlayerChatsetPlayerMuted setTimer outputChatBox ياخي امثله الويكي صعبه ذذ Link to comment
iPrestege Posted March 15, 2013 Share Posted March 15, 2013 حاول؟ بس حاول عشان اقدر انك سويت معي ذذ Link to comment
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 (edited) حاول؟ بس حاول عشان اقدر انك سويت معي ذذ ايه بس يعني كيف اخليه اذا كتب اسمي !؟ Edited March 15, 2013 by Guest Link to comment
iPrestege Posted March 15, 2013 Share Posted March 15, 2013 تقدر تسوية كذا : addEventHandler("onPlayerChat",root, function (msg) if ( msg == "msg" ) then -- Func end end ) or string.find Link to comment
TD[M]ER Posted March 15, 2013 Share Posted March 15, 2013 http://www.m5zn.com/d/?0ec7f04fb807828 المود جاهز مجهز من صنع |-Mr|-Talal07| Link to comment
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 تقدر تسوية كذا : addEventHandler("onPlayerChat",root, function (msg) if ( msg == "msg" ) then -- Func end end ) or string.find صراحه انا مضيع في البرمجه طلع لي شيب ما عرفت اسويه Link to comment
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 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
TD[M]ER Posted March 15, 2013 Share Posted March 15, 2013 لو تبيه off طف المود لو تبيه on شغل المود =\ ويب بدل كلمة طلال بـ اسمكـ Link to comment
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 لو تبيه off طف المودلو تبيه on شغل المود =\ ويب بدل كلمة طلال بـ اسمكـ ياخي ما اقصد كذا ! اقصد ان عندي نافذه وفيها زر اسمه on وزر اسمه off ابيه اذا ضغط على زر on اي واحد يكتب اسمه ياكل ميوت مو يكتب اسمي انا ! اسم الي ضغط الزر يعني اللاعب Link to comment
X-SHADOW Posted March 15, 2013 Share Posted March 15, 2013 يآخي وضح لنا اكثر مافهمنا وش تبي Link to comment
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 يآخي وضح لنا اكثر مافهمنا وش تبي انا سويت نافذه وفي 2 ازرار الزر الاول اسمه on والثاني off نفترض ركبت المود بسيرفري ! جيت انت فتحت النافذه وضغطت على زر on الي يكتب اسمك بالشات يكل ميوت ! فهمت؟ Link to comment
X-SHADOW Posted March 15, 2013 Share Posted March 15, 2013 طيب حط لنا النافذه عشان نسوي لك المود Link to comment
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 طيب حط لنا النافذه عشان نسوي لك المود 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
TD[M]ER Posted March 15, 2013 Share Posted March 15, 2013 معليش كنت اصلي ذذ بس عدلت لككـ الكود -- 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
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 معليش كنت اصلي ذذبس عدلت لككـ الكود -- 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
TD[M]ER Posted March 15, 2013 Share Posted March 15, 2013 عطيته صلاحيه فـ قروب الادمن ؟ ذذ غيرت اسماء الازرار ؟ طلع لكـ كلام فـ الشات طيب ؟ Link to comment
iPrestege Posted March 15, 2013 Share Posted March 15, 2013 -- 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
TD[M]ER Posted March 15, 2013 Share Posted March 15, 2013 -- 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
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 عطيته صلاحيه فـ قروب الادمن ؟ ذذغيرت اسماء الازرار ؟ طلع لكـ كلام فـ الشات طيب ؟ عطيته صلاحيه + غيرت الاسماء + ما طلع الكلام بالشات Link to comment
iPrestege Posted March 15, 2013 Share Posted March 15, 2013 -- 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
فاّرس Posted March 15, 2013 Author Share Posted March 15, 2013 (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 March 15, 2013 by Guest Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now