Jump to content

خطأ


Recommended Posts

Posted

السلام عليكم

عاوز الكود ده يظهر للسيرفر كله

لانه يظهر فقط للي يضغط علي البطن

outputChatBox('[C.Console]: Chat has been enabled by ' ..getPlayerName(localPlayer),255, 255, 0, true ) 

560x95_FFFFFF_FF9900_000000_000000.png
Posted

outputChatBox ( "[C.Console]: Chat has been enabled by ".. getPlayerName ( localPlayer ) .."", root, 255, 255, 0, true ) 

* There is no God but Allah, Mohammed is the Messenger Of Allah

Posted

outputChatBox("#ffff00[C.Console]: Chat has been enabled "..getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", "").." ", 255, 0, 0, true) 

 

قد تكونآمنيآتنآ حزينه !وآحلآمُنآ ملت طآبور آلإنتِظآر لكنهآ ،تتشبث بآلأمل فنفوسُنآ خُلقت لتقول غداً آجمل B-18.png 

Posted
outputChatBox("#ffff00[C.Console]: Chat has been enabled "..getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", "").." ", 255, 0, 0, true) 

ده يظهر للسيرفر كلو ؟

560x95_FFFFFF_FF9900_000000_000000.png
Posted

لا للضعط فقط !

 

قد تكونآمنيآتنآ حزينه !وآحلآمُنآ ملت طآبور آلإنتِظآر لكنهآ ،تتشبث بآلأمل فنفوسُنآ خُلقت لتقول غداً آجمل B-18.png 

Posted
function  gui () 
  
if sourrce == btn then  
  
local Nameplayer = getPlayerName(localPlayer) 
  
outputChatBox ( "[C.Console]: Chat has been enabled by "..Nameplayer.."", root, 255, 255, 0, true ) 
  
  
  
  
end 
  
  
  
  
end 
addEventHandler("onClientGUIClick",root,gui) 

76561198264399996.png

 

 

 

 

Posted

كلنت

addEventHandler("onClientGUIClick",button,function() 
triggerServerEvent("send;All",localPlayer) 
end, false) 

سيرفر

addEvent("send;All",true) 
addEventHandler("send;All",root,function()  
outputChatBox('[C.Console]: Chat has been enabled by ' ..getPlayerName(source),root,255, 255, 0, true ) 
end) 

لا اله الا انت سبحانك اني كنت من الظالمين

TehLMGN.png?1

My Group : https://www.facebook.com/groups/992678147519191/

Posted
كلنت

addEventHandler("onClientGUIClick",button,function() 
triggerServerEvent("send;All",localPlayer) 
end, false) 

سيرفر

addEvent("send;All",true) 
addEventHandler("send;All",root,function()  
outputChatBox('[C.Console]: Chat has been enabled by ' ..getPlayerName(source),root,255, 255, 0, true ) 
end) 

ما اشتغل

كلنت

  
addEventHandler("onClientGUIClick",GUIEditor.button[1],function() 
triggerServerEvent("openChat",localPlayer) 
end, false) 
  
  
  
  
  
addEventHandler("onClientGUIClick",GUIEditor.button[2],function() 
triggerServerEvent("LoockChat",localPlayer) 
end, false) 
  
  
  
  
addEventHandler("onClientGUIClick",GUIEditor.button[4],function() 
triggerServerEvent("LoockLocal",localPlayer) 
end, false) 
  
  
  
  
  
addEventHandler("onClientGUIClick",GUIEditor.button[3],function() 
triggerServerEvent("openLocal",localPlayer) 
end, false) 
  

سيرفر

  
addEvent("openChat",true) 
addEventHandler("openChat",root,function() 
outputChatBox('[C.Console]: Chat has been enabled by ' ..getPlayerName(source),root,255, 255, 0, true ) 
end) 
  
  
  
  
addEvent("LockChat",true) 
addEventHandler("LockChat",root,function() 
outputChatBox('[C.Console]: Chat has been Locked by ' ..getPlayerName(source),root,255, 0, 0, true ) 
end) 
  
  
  
addEvent("openLocal",true) 
addEventHandler("openLocal",root,function() 
outputChatBox('[C.Console]: LocalChat has been enabled by ' ..getPlayerName(source),root,255, 255, 0, true ) 
end) 
  
  
  
  
addEvent("LoockLocal",true) 
addEventHandler("LoockLocal",root,function() 
outputChatBox('[C.Console]: LocalChat has been Locked by ' ..getPlayerName(source),root,255, 0, 0, true ) 
end) 

560x95_FFFFFF_FF9900_000000_000000.png
Posted

جرب

GUIEditor = {button = {},window = {}} 
GUIEditor.window[1] = guiCreateWindow(0.35, 0.35, 0.26, 0.19, "", true) 
guiWindowSetSizable(GUIEditor.window[1], false) 
  
GUIEditor.button[1] = guiCreateButton(0.04, 0.19, 0.44, 0.34, "open chat", true, GUIEditor.window[1]) 
GUIEditor.button[2] = guiCreateButton(0.04, 0.56, 0.44, 0.34, "close chat", true, GUIEditor.window[1]) 
GUIEditor.button[3] = guiCreateButton(0.52, 0.19, 0.44, 0.34, "open Local chat", true, GUIEditor.window[1]) 
GUIEditor.button[4] = guiCreateButton(0.52, 0.56, 0.44, 0.34, "close Local chat", true, GUIEditor.window[1]) 
------- 
function Msg(Msg) 
triggerServerEvent("send;All",localPlayer,Msg) 
end 
addEventHandler("onClientGUIClick",root,function() 
if ( source == GUIEditor.button[1] ) then 
Msg('[C.Console]: Chat has been enabled by') 
elseif ( source == GUIEditor.button[2] ) then 
Msg('[C.Console]: Chat has been Locked by') 
elseif ( source == GUIEditor.button[3] ) then 
Msg('[C.Console]: LocalChat has been enabled by') 
elseif ( source == GUIEditor.button[4] ) then 
Msg('[C.Console]: LocalChat has been Locked by') 
end 
end) 

addEvent("send;All",true) 
addEventHandler("send;All",root,function(Msg)  
outputChatBox(Msg ..' ' ..getPlayerName(source),root,255, 255, 0, true ) 
end) 

لا اله الا انت سبحانك اني كنت من الظالمين

TehLMGN.png?1

My Group : https://www.facebook.com/groups/992678147519191/

Posted

تمام اخي

شكرا

دلوقتي

عاوز كود لما العب يكون في تيم يقدر يتكلم من غ

و لو مش في تيم ما يقدر يتكلم

و الكلام ما حد يقدر يشوفو غير الي في التيم

560x95_FFFFFF_FF9900_000000_000000.png
Posted

getPlayersInTeam 

 

قد تكونآمنيآتنآ حزينه !وآحلآمُنآ ملت طآبور آلإنتِظآر لكنهآ ،تتشبث بآلأمل فنفوسُنآ خُلقت لتقول غداً آجمل B-18.png 

Posted
تمام اخي

شكرا

دلوقتي

عاوز كود لما العب يكون في تيم يقدر يتكلم من غ

و لو مش في تيم ما يقدر يتكلم

و الكلام ما حد يقدر يشوفو غير الي في التيم

طلبك ذا موجود اساسا باللعبة

جرب سوي تيم من لوحة الأدمنية وضيف نفسك فيه وبتقدر تتكلم من حرف غ

getPlayersInTeam 

الفانكشن ذا ماله اي علاقه بطلبه

I'am Back MTA  sa World !

p_513w5ap31.jpg

Spoiler

p_581zud1f1.png

 

 

 

 

Posted

كور كلامك صحيح

بس لما اضيف نفسي في تيم من لوحة الادمن و اجي اتكلم الكلام يجي

في الشات العام ما يجي كده مثلا

(Team)SaedAmer: كور

560x95_FFFFFF_FF9900_000000_000000.png
Posted (edited)

هذا مثال سويته لك تعلم منه

انا سويت تيم من اللوحه وسميته بإسمي

CoR's Team

وعملت تحقق إذا كان اللاعب موجود داخل تيمي

وإذا كان يتكلم داخل شات التيمات

يكتب له اسم تيمي قبل كلامة

-- MTA Forum / Ar -- 
-- Mr.CoR -- 
-- 24 / 5 / 2016 -- 
  
function isPlayerInTeam(player, team) 
    assert(isElement(player) and getElementType(player) == "player", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]") 
    assert((not team) or type(team) == "string" or (isElement(team) and getElementType(team) == "team"), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring(team) .. "]") 
    return getPlayerTeam(player) == (type(team) == "string" and getTeamFromName(team) or (type(team) == "userdata" and team or (getPlayerTeam(player) or true))) 
end 
  
  
addEventHandler( "onPlayerChat",root, 
    function (message,messageType)  
        if messageType == 2 then 
            if isPlayerInTeam ( source , "CoR's Team" ) then 
              outputChatBox ( "#ffff00( CoR'sTeam ) " .. getPlayerName( source ).. " : " ..message.." " ,root, 255, 255, 255, true ) 
            end 
        end 
    end 
) 
bindKey ( player ,"y", "down") 

طبعاً إستخدمت يوزفل فانكشن الي هو

isPlayerInTeam 

صفحة الفانكشن

https://wiki.multitheftauto.com/wiki/IsPlayerInTeam

وفي مشكلة واجهتني في الـ

bindKey 

ماضبط معي تحديد اللاعب , ياليت الي عنده خبره اوسع من خبرتي يحل المشكلة

Edited by Guest

I'am Back MTA  sa World !

p_513w5ap31.jpg

Spoiler

p_581zud1f1.png

 

 

 

 

Posted

ابي اسوي له بند كي على شان مابيه يختلط مع الزر الأساسي حق شات التيمات

لان شوف الحين لو جربت الكود وكتبت من حرف

y

رح يتكرر كلامك مرتين

المره الاولى فيه اسمك واسم تيمك

والمره الثانيه يكون كذا

( TEAM ) -- وهذي من اللعبه الأساسية

I'am Back MTA  sa World !

p_513w5ap31.jpg

Spoiler

p_581zud1f1.png

 

 

 

 

Posted

addEventHandler( "onPlayerChat",root,function (message,messageType) 
if  messageType == 2  then  
local PTeam = getPlayerTeam(source) 
local PName = getPlayerName( source ):gsub ( '#%x%x%x%x%x%x', '' ) 
if PName then 
local r,g,b = getTeamColor(PTeam) 
local TeamColor = string.format("#%.2X%.2X%.2X",r,g,b) 
local TeamName = getTeamName(PTeam) 
outputChatBox ( "#ffff00( CoR'sTeam ) "..TeamColor.." "..TeamName.." " ..PName.. " : " ..message.." " ,root, 255, 255, 255, true ) 
cancelEvent() 
end 
end 
end) 

لا اله الا انت سبحانك اني كنت من الظالمين

TehLMGN.png?1

My Group : https://www.facebook.com/groups/992678147519191/

Posted

انا مش فاهم شئ :arrowup::arrowup:

--------------------

انا عاوز كود الي في التيم

يقدر يتكلم من غ

و الي مش في التيم

الرسالة بتاعتو ما تترسل

560x95_FFFFFF_FF9900_000000_000000.png
Posted

مساعده

---------------

دلوقتي في العبة الاساسية

لما اضيف نفسي في تيم

و اجي اتكلم

الكلام مش بيظهر للتيم

بيظهر في العام

انا عاوز اخليه يظهر في التيم

560x95_FFFFFF_FF9900_000000_000000.png

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