Jump to content

x[ تعديل ]x سبورت سيستم


Recommended Posts

سلام عليكم

انا مسوي سبورت سيستم

و في سرفر مجاني شغاله تمام

لاكن جربتها في سرفر عالمي

م يبعت رساله

لاكن مجاني بعت وتمام الكود

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

سطر 14 سيرفر وش الفايده منه اذا انت اصلاً مرسل نفس التريقر بكل الحالتين؟, وثاني شي ليه مرسل التريقر للسورس؟ مو انت تبيه للكل؟ واكوادك حوسه رتبها شوي :)

Link to comment
    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
    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

تمام كذا؟

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

م يبعت في القريد

كلنت

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

الوحه شغاله تمام وبتفتح

المشكله مش بيبعت

لما حطيط الكود كدا

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

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

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