mody134 Posted December 1, 2016 Share Posted December 1, 2016 (edited) عايز لما الاعب ياخد ميوت يجيلة ميوت فى الوكال شات chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"r","down","chatbox","LocalChat") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"r","down","chatbox","LocalChat") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getTeamColor(getPlayerTeam(player)) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then end end end addCommandHandler("LocalChat",onChat) Edited December 1, 2016 by mody134 Link to comment
iPrestege Posted December 1, 2016 Share Posted December 1, 2016 isPlayerMuted - - تحقق اذا كان معه ميوت يعطيه خطا انه معه ميوت Link to comment
^iiEcoo'x_) Posted December 1, 2016 Share Posted December 1, 2016 if not isPlayerMuted(player) then cancelEvent() Link to comment
Master_MTA Posted December 3, 2016 Share Posted December 3, 2016 On ١/١٢/٢٠١٦ at 5:36 PM, [6ArH]#~Ecoo~ said: if not isPlayerMuted(player) then cancelEvent() انت مسوي تحقق اذا ما عليه ميوت يكنسل الايفينت وهو يبي العكس +_+ if isPlayerMuted(player) then cancelEvent() Link to comment
iPrestege Posted December 3, 2016 Share Posted December 3, 2016 (edited) اي حدث تكنسلونه خطأ كلها يحتاج يسوي شرط ويرجع اند اذا كان الاعب معاه ميوت ! ؟ Edited December 3, 2016 by iPrestege Link to comment
Master_MTA Posted December 3, 2016 Share Posted December 3, 2016 4 hours ago, iPrestege said: اي حدث تكنسلونه خطأ كلها يحتاج يسوي شرط ويرجع اند اذا كان الاعب معاه ميوت ! ؟ يب صحيح معليش بتستخدم كذا if isPlayerMuted(localPlayer) then return outputChatBox("You are muted",localPlayer) والله لي يومين ضايعه مني Link to comment
iPrestege Posted December 4, 2016 Share Posted December 4, 2016 ^ localPlayer = client side Link to comment
SycroX Posted December 4, 2016 Share Posted December 4, 2016 (edited) +1 iPrestege دي كومند اي حدث تكنسلوه ولا اي حاجة فيها كنسلة تستخدمو هاد ؟ + اسهل شي i if isPlayerMuted(player) then return end طبعا تنحط في اول الفانكشن او تقدر تسسويها هيك if isPlayerMuted(player) then else --Your Code end Edited December 4, 2016 by #Skrillex Link to comment
Master_MTA Posted December 4, 2016 Share Posted December 4, 2016 8 hours ago, iPrestege said: ^ localPlayer = client side بالله شف وش قايلك فوق وحالتي كرب ومعطي واحد اكواد سيرفر اقوله حطها في كلنت واعوذ بالله +_+ 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