Adham Posted June 28, 2016 Share Posted June 28, 2016 سلام عليكم انا مسوي سبورت سيستم و في سرفر مجاني شغاله تمام لاكن جربتها في سرفر عالمي م يبعت رساله لاكن مجاني بعت وتمام الكود addEvent("refresh",true) addEventHandler("refresh",root,function () for k,v in ipairs (getElementsByType("player")) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)),aclGetGroup("Support")) ) then triggerClientEvent("online",source,getPlayerName(v)) end end end) addEvent("support",true) addEventHandler("support",root,function (text) if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Support")) ) then triggerClientEvent("sendmessage2",source,getPlayerName(source),text) else triggerClientEvent("sendmessage2",source,getPlayerName(source),text) end end) addEventHandler("onClientGUIClick",GUIEditor.button[2],function () if guiGetText(GUIEditor.edit[1]) ~= '' then triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) guiSetText (GUIEditor.edit[1], "" ) else guiSetEnabled(GUIEditor.button[2], false) setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[2], true) end end, false) addEvent("sendmessage2",true) addEventHandler("sendmessage2",root, function(Name,Text) local hour = getRealTime().hour local minute = getRealTime().minute local second = getRealTime().second+1 local gg = guiGridListAddRow(GUIEditor.gridlist[2]) if ( guiCheckBoxGetSelected( GUIEditor.checkbox[2] ) == true ) then guiGridListSetItemText(GUIEditor.gridlist[2],gg, 1, "["..tostring(hour)..":"..tostring(minute)..":" ..tostring(second).."] [support] "..Name:gsub("#%x%x%x%x%x%x", "") ..": " .. Text , false, false) guiGridListSetItemColor(GUIEditor.gridlist[2],gg, 1, 0, 255, 0, 255) elseif ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then guiGridListSetItemText(GUIEditor.gridlist[2],gg, 1, "["..tostring(hour)..":"..tostring(minute)..":" ..tostring(second).."] [Player] "..Name:gsub("#%x%x%x%x%x%x", "") ..": " .. Text , false, false) guiGridListSetItemColor(GUIEditor.gridlist[2],gg, 1, 255, 136, 0) end end) Link to comment
فاّرس Posted June 28, 2016 Share Posted June 28, 2016 سطر 14 سيرفر وش الفايده منه اذا انت اصلاً مرسل نفس التريقر بكل الحالتين؟, وثاني شي ليه مرسل التريقر للسورس؟ مو انت تبيه للكل؟ واكوادك حوسه رتبها شوي Link to comment
Adham Posted June 28, 2016 Author Share Posted June 28, 2016 addEvent("support",true) addEventHandler("support",root,function (text) if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Support")) ) then triggerClientEvent("sendmessage2",root,getPlayerName(sourve,text) end end) كذا Link to comment
iPrestege Posted June 28, 2016 Share Posted June 28, 2016 addEvent("support",true) addEventHandler("support",root,function (text) if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Support")) ) then triggerClientEvent("sendmessage2",root,getPlayerName(sourve,text) end end) كذا عندك فنكشن الـ getPlayerName فية خطأ مافية الا ارقمنت واحد اللي هو الاعب اللي يجيب اسمة كيف حاط اثنين؟ Wiki : Required Arguments thePlayer: the Player that you want to get his name اظنك تبي ترسل الكلام لذلك المفروض يكون getPlayerName ( source ) , text وعندك قوس ناقص كودك حوسة Link to comment
Adham Posted June 28, 2016 Author Share Posted June 28, 2016 تمام كذا؟ addEvent("support",true) addEventHandler("support",root,function (text) if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Support")) ) then triggerClientEvent("sendmessage2",root,getPlayerName(source) , text end end) Link to comment
iPrestege Posted June 28, 2016 Share Posted June 28, 2016 addEvent("support",true) addEventHandler("support",root, function ( text ) if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount (source) ),aclGetGroup ( "Support") ) ) then triggerClientEvent ( root,"sendmessage2",root,getPlayerName ( source ),text ) end end ) الان في الكلاينت تستقبل اسم الاعب ارقمنت اول والتيكست ارقمنت ثاني بالتوفيق . Link to comment
Adham Posted June 28, 2016 Author Share Posted June 28, 2016 م يبعت في القريد كلنت addEventHandler("onClientGUIClick",GUIEditor.button[2],function () if guiGetText(GUIEditor.edit[1]) ~= '' then triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) guiSetText (GUIEditor.edit[1], "" ) else guiSetEnabled(GUIEditor.button[2], false) setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[2], true) end end, false) addEvent("sendmessage2",true) addEventHandler("sendmessage2",root, function(Name,Text) local hour = getRealTime().hour local minute = getRealTime().minute local second = getRealTime().second+1 local gg = guiGridListAddRow(GUIEditor.gridlist[2]) if ( guiCheckBoxGetSelected( GUIEditor.checkbox[2] ) == true ) then guiGridListSetItemText(GUIEditor.gridlist[2],gg, 1, "["..tostring(hour)..":"..tostring(minute)..":" ..tostring(second).."] [support] "..Name:gsub("#%x%x%x%x%x%x", "") ..": " .. Text , false, false) guiGridListSetItemColor(GUIEditor.gridlist[2],gg, 1, 0, 255, 0, 255) elseif ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then guiGridListSetItemText(GUIEditor.gridlist[2],gg, 1, "["..tostring(hour)..":"..tostring(minute)..":" ..tostring(second).."] [Player] "..Name:gsub("#%x%x%x%x%x%x", "") ..": " .. Text , false, false) guiGridListSetItemColor(GUIEditor.gridlist[2],gg, 1, 255, 136, 0) end end) سرفر addEvent("support",true) addEventHandler("support",root, function ( text ) if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount (source) ),aclGetGroup ( "Support") ) ) then triggerClientEvent ( root,"sendmessage2",root,getPlayerName ( source ),text ) end end ) Link to comment
iPrestege Posted June 28, 2016 Share Posted June 28, 2016 addEventHandler("onClientGUIClick",GUIEditor.button[2], function ( ) if guiGetText(GUIEditor.edit[1]) ~= '' then triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) guiSetText (GUIEditor.edit[1], "" ) end end,false ) addEvent("sendmessage2",true) addEventHandler("sendmessage2",root, function ( Name,Text ) local hour = getRealTime().hour local minute = getRealTime().minute local second = getRealTime().second+1 local gg = guiGridListAddRow(GUIEditor.gridlist[2]) if ( guiCheckBoxGetSelected( GUIEditor.checkbox[2] ) == true ) then guiGridListSetItemText ( GUIEditor.gridlist[2],gg,1,"["..tostring(hour)..":"..tostring(minute)..":" ..tostring(second).."] [support] "..Name:gsub("#%x%x%x%x%x%x", "") ..": " .. Text , false, false ) guiGridListSetItemColor ( GUIEditor.gridlist[2],gg, 1, 255, 0, 255 ) elseif ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then guiGridListSetItemText ( GUIEditor.gridlist[2],gg, 2, "["..tostring(hour)..":"..tostring(minute)..":" ..tostring(second).."] [Player] "..Name:gsub("#%x%x%x%x%x%x", "") ..": " .. Text , false, false ) guiGridListSetItemColor ( GUIEditor.gridlist[2],gg, 2, 255, 136, 0 ) end end ) Link to comment
Adham Posted June 28, 2016 Author Share Posted June 28, 2016 الوحه شغاله تمام وبتفتح المشكله مش بيبعت لما حطيط الكود كدا addEvent("support",true) addEventHandler("support",root,function (text) if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Support")) ) then triggerClientEvent("sendmessage2",source,getPlayerName(source),text) else triggerClientEvent("sendmessage2",source,getPlayerName(source),text) end end) يبعت في المحلي فقط Link to comment
iPrestege Posted June 28, 2016 Share Posted June 28, 2016 addEvent("support",true) addEventHandler("support",root, function ( player,text ) if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player ) ),aclGetGroup ( "Support") ) ) then triggerClientEvent ( root,"sendmessage2",root,getPlayerName ( player),text ) end end ) Link to comment
N3xT Posted June 28, 2016 Share Posted June 28, 2016 لا شاطر ممكن تقولي كيف تبيه يظبط ، وأنت مسوي تحقق أنه الرتبه ذي لازم تكون معك ؟ Link to comment
N3xT Posted June 28, 2016 Share Posted June 28, 2016 شاطر؟حطيت نفسي م بعت أجل المشكلة ممكن من عندك ، تأكد من الميتا وأيضاً من أسم الرتبة ممكن تكون غلطت بحرف Link to comment
Adham Posted June 28, 2016 Author Share Posted June 28, 2016 االوحه شعاله تمام لاكن مش بتعت والرتبه تمام اسمها Link to comment
N3xT Posted June 28, 2016 Share Posted June 28, 2016 ["..tostring(hour)..": tostring = للـ أحرف " الكلمات " كيف مستخدمها مع ارقام Link to comment
N3xT Posted June 28, 2016 Share Posted June 28, 2016 Client : addEventHandler("onClientGUIClick",GUIEditor.button[2], function () if guiGetText( GUIEditor.edit[1] ) ~= '' then triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) guiSetText ( GUIEditor.edit[1] , "" ) guiSetEnabled( GUIEditor.button[2] , false) setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[2], true) end end) addEvent("sendmessage2",true) addEventHandler("sendmessage2",root, function(text,name) local hour = getRealTime().hour local minute = getRealTime().minute local second = getRealTime().second+1 local gg = guiGridListAddRow(GUIEditor.gridlist[2]) if ( guiCheckBoxGetSelected( GUIEditor.checkbox[2] ) == true ) then guiGridListSetItemText(GUIEditor.gridlist[2],gg, 1, "["..tonumber(hour)..":"..tonumber(minute)..":" ..tonumber(second).."] [support] "..name:gsub("#%x%x%x%x%x%x", "") ..": " .. text , false, false) guiGridListSetItemColor(GUIEditor.gridlist[2],gg, 1, 0, 255, 0, 255) elseif ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then guiGridListSetItemText(GUIEditor.gridlist[2],gg, 1, "["..tonumber(hour)..":"..tonumber(minute)..":" ..tonumber(second).."] [Player] "..name:gsub("#%x%x%x%x%x%x", "") ..": " .. text , false, false) guiGridListSetItemColor(GUIEditor.gridlist[2],gg, 1, 255, 136, 0) end end) Server : addEvent("support",true) addEventHandler("support",root, function ( text ) if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ),aclGetGroup ( "Support") ) ) then triggerClientEvent ( root,"sendmessage2",root,getPlayerName ( source), text ) end end) 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