Jump to content

استفسار


Recommended Posts

addEventHandler('onClientGUIClick',root,function ()
local sel = guiGridListGetSelectedItem(GridList)
	if ( source == warp ) then
		if sel ~= -1 then
			local x,y,z = unpack(guiGridListGetItemData(GridList,sel,1))
				setElementPosition(localPlayer,x,y,z)
	else
					outputChatBox("Select A Positon",255,0,0)
end
end
end)

addEventHandler("onClientGUIClick", root, 
function ()
	if source == create then
		local Text = guiGetText(editwarp)
			local x,y,z = getElementPosition(localPlayer)
				table.insert ( tele, { x, y, z } )
					if Text == "" or Text == " " then return end
						triggerServerEvent("send", localPlayer, Text)
end
end)

addEvent("Request", true)
addEventHandler("Request", root,
function (Text)
	local Row = guiGridListAddRow(GridList)
		local Msg = guiGetText (editwarp)
			guiGridListSetItemText(GridList, Row, 1,"=[ "..Msg.." ]=", false, false)
				guiGridListSetItemColor(GridList, Row, 1, 0, 255, 0)
end
)

 

Link to comment
tele = {
	{"=[ القفزه الخونفشاريه ]=",1541.0673828125, -1357.576171875, 329.46615600586},
	{"=[ مقر الجيش ]=",146.66674804688, 1720, 17.640625},
	{"=[ موقف الباصات ]=",1790.2674560547,-1912.0159912109 , 13.396838188171},
	{"=[ الفنادق ]=",-1739.0821533203, 940.56231689453, 24.7421875},
	{"=[ الشارع الطويل ]=",-3072.5554199219,-3000.345703125,5},
	{"=[ بيت سي جي ]=",2491.12109375, -1667.4482421875, 13.34375},
}



for i,mk in ipairs(tele) do
	local row = guiGridListAddRow(GridList)
		guiGridListSetItemText(GridList,row,1,mk[1],false,false)
			guiGridListSetItemData(GridList,row,1,{mk[2],mk[3],mk[4]})
				guiGridListSetItemColor(GridList,row,1,0,255,0)
end


addEventHandler('onClientGUIClick',root,function ()
local sel = guiGridListGetSelectedItem(GridList)
	if ( source == warp ) then
		if sel ~= -1 then
			local x,y,z = unpack(guiGridListGetItemData(GridList,sel,1))
				setElementPosition(localPlayer,x,y,z)
	else
					outputChatBox("Select A Positon",255,0,0)
end
end
end)

addEventHandler("onClientGUIClick", root, 
function ()
	if source == create then
		local Text = guiGetText(editwarp)
			local x,y,z = getElementPosition(localPlayer)
				table.insert ( tele, { x, y, z } )
					if Text == "" or Text == " " then return end
						triggerServerEvent("send", localPlayer, Text)
end
end)

addEvent("Request", true)
addEventHandler("Request", root,
function (Text)
	local Row = guiGridListAddRow(GridList)
		local Msg = guiGetText (editwarp)
			guiGridListSetItemText(GridList, Row, 1,"=[ "..Msg.." ]=", false, false)
				guiGridListSetItemColor(GridList, Row, 1, 0, 255, 0)
end
)

الكود كامل

Edited by Talis
Link to comment


addEventHandler('onClientGUIClick',root,function ()
local sel = guiGridListGetSelectedItem(GridList)
	if ( source == warp ) then
		if sel ~= -1 then
			local pos = guiGridListGetItemData(GridList,sel,1)
				setElementPosition(localPlayer,pos[1],pos[2],pos[3])
	else
					outputChatBox("Select A Positon",255,0,0)
end
end
end)

 

Link to comment
tele = {
	{"=[ القفزه الخونفشاريه ]=",1541.0673828125, -1357.576171875, 329.46615600586},
	{"=[ مقر الجيش ]=",146.66674804688, 1720, 17.640625},
	{"=[ موقف الباصات ]=",1790.2674560547,-1912.0159912109 , 13.396838188171},
	{"=[ الفنادق ]=",-1739.0821533203, 940.56231689453, 24.7421875},
	{"=[ الشارع الطويل ]=",-3072.5554199219,-3000.345703125,5},
	{"=[ بيت سي جي ]=",2491.12109375, -1667.4482421875, 13.34375}
}


function loob ( )
guiGridListClear ( GridList )
for i,mk in ipairs(tele) do
	local row = guiGridListAddRow(GridList)
	guiGridListSetItemText(GridList,row,1,mk[1],false,false)
	guiGridListSetItemData(GridList,row,1,{mk[2],mk[3],mk[4]})
	guiGridListSetItemColor(GridList,row,1,0,255,0)
end
end

loob ( )


addEventHandler('onClientGUIClick',root,function ()
local sel = guiGridListGetSelectedItem(GridList)
	if ( source == warp ) then
		if sel ~= -1 then
			local x,y,z = unpack(guiGridListGetItemData(GridList,sel,1))
				setElementPosition(localPlayer,x,y,z)
	else
					outputChatBox("Select A Positon",255,0,0)
end
end
end)

addEventHandler("onClientGUIClick", root, 
function ()
	if source == create then
		local Text = guiGetText(editwarp)
			local x,y,z = getElementPosition(localPlayer)
					if Text == "" or Text == " " then return end
					table.insert ( tele, { Text, x, y, z } )
					loob () 
						triggerServerEvent("send", localPlayer, Text)
end
end)

addEvent("Request", true)
addEventHandler("Request", root,
function (Text)
	local Row = guiGridListAddRow(GridList)
		local Msg = guiGetText (editwarp)
			guiGridListSetItemText(GridList, Row, 1,"=[ "..Msg.." ]=", false, false)
				guiGridListSetItemColor(GridList, Row, 1, 0, 255, 0)
end
)

^ جرب

Edited by iMr.WiFi..!
  • Like 1
Link to comment
2 hours ago, iMr.WiFi..! said:

tele = {
	{"=[ القفزه الخونفشاريه ]=",1541.0673828125, -1357.576171875, 329.46615600586},
	{"=[ مقر الجيش ]=",146.66674804688, 1720, 17.640625},
	{"=[ موقف الباصات ]=",1790.2674560547,-1912.0159912109 , 13.396838188171},
	{"=[ الفنادق ]=",-1739.0821533203, 940.56231689453, 24.7421875},
	{"=[ الشارع الطويل ]=",-3072.5554199219,-3000.345703125,5},
	{"=[ بيت سي جي ]=",2491.12109375, -1667.4482421875, 13.34375}
}


function loob ( )
guiGridListClear ( GridList )
for i,mk in ipairs(tele) do
	local row = guiGridListAddRow(GridList)
	guiGridListSetItemText(GridList,row,1,mk[1],false,false)
	guiGridListSetItemData(GridList,row,1,{mk[2],mk[3],mk[4]})
	guiGridListSetItemColor(GridList,row,1,0,255,0)
end
end

loob ( )


addEventHandler('onClientGUIClick',root,function ()
local sel = guiGridListGetSelectedItem(GridList)
	if ( source == warp ) then
		if sel ~= -1 then
			local x,y,z = unpack(guiGridListGetItemData(GridList,sel,1))
				setElementPosition(localPlayer,x,y,z)
	else
					outputChatBox("Select A Positon",255,0,0)
end
end
end)

addEventHandler("onClientGUIClick", root, 
function ()
	if source == create then
		local Text = guiGetText(editwarp)
			local x,y,z = getElementPosition(localPlayer)
					if Text == "" or Text == " " then return end
					table.insert ( tele, { Text, x, y, z } )
					loob () 
						triggerServerEvent("send", localPlayer, Text)
end
end)

addEvent("Request", true)
addEventHandler("Request", root,
function (Text)
	local Row = guiGridListAddRow(GridList)
		local Msg = guiGetText (editwarp)
			guiGridListSetItemText(GridList, Row, 1,"=[ "..Msg.." ]=", false, false)
				guiGridListSetItemColor(GridList, Row, 1, 0, 255, 0)
end
)

^ جرب

[2017-07-08 20:47:50] ERROR: warp\client.lua:55: bad argument #1 to 'unpack' (table expected, got nil)

Link to comment
1 hour ago, Talis said:

[2017-07-08 20:47:50] ERROR: warp\client.lua:55: bad argument #1 to 'unpack' (table expected, got nil)

tele = {
	{"=[ القفزه الخونفشاريه ]=",1541.0673828125, -1357.576171875, 329.46615600586},
	{"=[ مقر الجيش ]=",146.66674804688, 1720, 17.640625},
	{"=[ موقف الباصات ]=",1790.2674560547,-1912.0159912109 , 13.396838188171},
	{"=[ الفنادق ]=",-1739.0821533203, 940.56231689453, 24.7421875},
	{"=[ الشارع الطويل ]=",-3072.5554199219,-3000.345703125,5},
	{"=[ بيت سي جي ]=",2491.12109375, -1667.4482421875, 13.34375}
}


function loob ( )
guiGridListClear ( GridList )
for i,mk in ipairs(tele) do
	local row = guiGridListAddRow(GridList)
	guiGridListSetItemText(GridList,row,1,mk[1],false,false)
	guiGridListSetItemData(GridList,row,1,{mk[2],mk[3],mk[4]})
	guiGridListSetItemColor(GridList,row,1,0,255,0)
end
end

loob ( )


addEventHandler('onClientGUIClick',root,function ()
sel = guiGridListGetSelectedItem(GridList)
	if source == warp then
		if sel ~= -1 then
			local posi = guiGridListGetItemData(GridList, sel)
				setElementPosition(localPlayer,posi[1],posi[2],posi[3])
	else
					outputChatBox("Select A Positon",255,0,0)
end
end
end)

addEventHandler("onClientGUIClick", root, 
function ()
	if source == create then
		local Text = guiGetText(editwarp)
			local x,y,z = getElementPosition(localPlayer)
					if Text == "" or Text == " " then return end
					table.insert ( tele, { Text, x, y, z } )
					loob () 
						triggerServerEvent("send", localPlayer, Text)
end
end)

addEvent("Request", true)
addEventHandler("Request", root,
function (Text)
	local Row = guiGridListAddRow(GridList)
		local Msg = guiGetText (editwarp)
			guiGridListSetItemText(GridList, Row, 1,"=[ "..Msg.." ]=", false, false)
				guiGridListSetItemColor(GridList, Row, 1, 0, 255, 0)
end
)

اذا ما اشتغل احذف اللعبة

Link to comment
10 minutes ago, Talis said:

@#BrosS نفس المشكلة

[2017-07-08 22:40:28] ERROR: warp\client.lua:58: attempt to index local 'posi' (a boolean value)

ذذ سوري حط هيك

local posi = guiGridListGetItemData(GridList, sel,1)
setElementPosition(localPlayer,tonumber(posi[1]),tonumber(posi[2]),tonumber(posi[3]))

 

  • Like 1
Link to comment
5 minutes ago, #BrosS said:

ذذ سوري حط هيك


local posi = guiGridListGetItemData(GridList, sel,1)
setElementPosition(localPlayer,tonumber(posi[1]),tonumber(posi[2]),tonumber(posi[3]))

 

الله يعطيك العافية , بس عندي سؤالين , الحين اذا سويت مكان جديد الكل يشوفه ؟

السؤال الثاني , كيف احط قوسين في الرو بدون ما اكتب في الإديت ؟

Link to comment
4 minutes ago, Talis said:

الله يعطيك العافية , بس عندي سؤالين , الحين اذا سويت مكان جديد الكل يشوفه ؟

السؤال الثاني , كيف احط قوسين في الرو بدون ما اكتب في الإديت ؟

لا اللي يضيف يشوفه وحده

مافهمت كيف قوسين

Link to comment
1 minute ago, Talis said:

طيب كيف اخلي الكل يشوفه ؟

تريقراااات

ل74اب9ل+45بلتلب

2 minutes ago, Talis said:

طيب كيف اخلي الكل يشوفه ؟

اصبر ضض مدري يمكن الكل يشوفه وريني سيرفر

  • Like 1
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...