Jump to content

طريقة عمل مود انتقال الى سيرفر اخر


Recommended Posts

سلام عليكم ورحمة الله وبركاتة

لاهنتم يا رجال - كيف اعمل مود انتقال الى سيرفر اخر يكتب الشات مثلآ

!ريس

!شوتر

!حياة

وزي كذا لاهنتم يا رجال لحد يبخل علينا الي يعرف 

" معلومة مهمة "

تراني نوب برمجة لو تسوية واعطيك حقك ماعندي مشكلة

Link to comment
function n8lR(source)
    redirectPlayer(source,'ip','port')
end
addCommandHandler("ريس", n8lR)

function n8lL(source)
    redirectPlayer(source,'ip','port')
end
addCommandHandler("حياه", n8lL)

function n8lH(source)
    redirectPlayer(source,'ip','port')
end
addCommandHandler("هجوله", n8lH)

اتوقع طلبك التقصده

Link to comment

تفضل

function redirecter ( message,type)
ip1,ip2,ip3 = 'ip','ip','ip'
port1,port2,port3 = 'port','port','port'
if message == 'red' and type == 0 then
redirectPlayer(source,ip1,port1)
if message == 'blue' and type == 0 then 
redirectPlayer(source,ip2,port2) 
if message == 'green' and type == 0 then 
redirectPlayer(source,ip3,port3)
end end end end
addEventHandler('onPlayerChat',root,redirecter)

حط الاي بي الاول وغير كلمة ريد للكلمة التي تبيها ونفس الشيء للباقي ولاتنسى تضيفه قروب ادمن

Link to comment
local what = {
['race'] = {ip = 'ip', port = 'port', password = ''},
['shooter'] = {ip = 'ip', port = 'port', password = ''},
['RL'] = {ip = 'ip', port = 'port', password = ''}
}

addEventHandler('onPlayerCommand', root, function(cmd)
	if what[cmd] and tostring(what[cmd].ip) and tonumber(what[cmd].port) and tostring(what[cmd].password) then
		redirectPlayer(source, tostring(what[cmd].ip), tonumber(what[cmd].port), tostring(what[cmd].password))
	end
end)

 

Edited by #,+( _xiRoc[K]; >
  • Like 3
Link to comment
  • 2 weeks later...

مثلا زي كذا يا شباب

 

  1. local what = {
  2. ['race'] = {ip = '192.168.1.1', port = '2222', password = ''},
  3. ['shooter'] = {ip = 'ip', port = 'port', password = ''},
  4. ['RL'] = {ip = 'ip', port = 'port', password = ''}
  5. }
  6.  
  7. addEventHandler('onPlayerCommand', root, function(cmd)
  8. if what[cmd] and tostring(what[cmd].ip) and tonumber(what[cmd].port) and tostring(what[cmd].password) then
  9. redirectPlayer(source, tostring(what[cmd].ip), tonumber(what[cmd].port), tostring(what[cmd].password))
  10. end
  11. end)
Link to comment
4 hours ago, iMrKaZaNoFa said:

بالأخير ماني فاهم شي

 

حبيبي شوف وركز معي

    local what = {
    ['race'] = {ip = 'ip', port = 'port', password = ''}, -- اول فراغ الكلمه | ثاني فراغ الايبي | ثالث فراغ البورت | رابع فراغ لو موجود رمز حطه
    ['shooter'] = {ip = 'ip', port = 'port', password = ''},--
    ['RL'] = {ip = 'ip', port = 'port', password = ''}
    }

    addEventHandler('onPlayerCommand', root, function(cmd)
    	if what[cmd] and tostring(what[cmd].ip) and tonumber(what[cmd].port) and tostring(what[cmd].password) then
    		redirectPlayer(source, tostring(what[cmd].ip), tonumber(what[cmd].port), tostring(what[cmd].password))
    	end
    end)
-- مثال

    local what = {
    ['!ريس'] = {ip = '127.0.0.1', port = '5412', password = ''-- هنا لو فيه رمز حط},
    ['!شوتر'] = {ip = '127.4.3.1', port = '5413', password = ''},
    ['!حياة'] = {ip = '127.4.4.5', port = '2412', password = ''}
    }

    addEventHandler('onPlayerCommand', root, function(cmd)
    	if what[cmd] and tostring(what[cmd].ip) and tonumber(what[cmd].port) and tostring(what[cmd].password) then
    		redirectPlayer(source, tostring(what[cmd].ip), tonumber(what[cmd].port), tostring(what[cmd].password))
    	end
    end)

 

Link to comment
6 hours ago, *RayaN-Alharbi. said:

حبيبي شوف وركز معي


    local what = {
    ['race'] = {ip = 'ip', port = 'port', password = ''}, -- اول فراغ الكلمه | ثاني فراغ الايبي | ثالث فراغ البورت | رابع فراغ لو موجود رمز حطه
    ['shooter'] = {ip = 'ip', port = 'port', password = ''},--
    ['RL'] = {ip = 'ip', port = 'port', password = ''}
    }

    addEventHandler('onPlayerCommand', root, function(cmd)
    	if what[cmd] and tostring(what[cmd].ip) and tonumber(what[cmd].port) and tostring(what[cmd].password) then
    		redirectPlayer(source, tostring(what[cmd].ip), tonumber(what[cmd].port), tostring(what[cmd].password))
    	end
    end)
-- مثال

    local what = {
    ['!ريس'] = {ip = '127.0.0.1', port = '5412', password = ''-- هنا لو فيه رمز حط},
    ['!شوتر'] = {ip = '127.4.3.1', port = '5413', password = ''},
    ['!حياة'] = {ip = '127.4.4.5', port = '2412', password = ''}
    }

    addEventHandler('onPlayerCommand', root, function(cmd)
    	if what[cmd] and tostring(what[cmd].ip) and tonumber(what[cmd].port) and tostring(what[cmd].password) then
    		redirectPlayer(source, tostring(what[cmd].ip), tonumber(what[cmd].port), tostring(what[cmd].password))
    	end
    end)

 

سطر 15

فيه خطا القوس

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