Naif Posted August 15, 2015 Share Posted August 15, 2015 ابششر لاتعصب .. local Positions = { {'Name',-2371.50171 ,-673.10498 ,124.17433}, } GUIEditor = { gridlist = {}, button = {} } wnd = guiCreateWindow(324, 140, 394, 514, "الآنتقالات", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd, false ) GUIEditor.button[1] = guiCreateButton(64, 439, 244, 65, "انتقال", false, wnd) guiSetProperty(GUIEditor.button[1],"NormalTextColour", "FF00FF00") gr = guiCreateGridList(30, 72, 324, 363, false, wnd) guiGridListAddColumn(gr, "المكان", 0.9) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor( false ) else guiSetVisible ( wnd, true ) showCursor( true ) end end bindKey("F6", "down", OpenWin) for i,v in ipairs (Positions) do local row = guiGridListAddRow ( gr ) guiGridListSetItemText(gr,row,1,v[1],false,false) guiGridListSetItemData(gr,row,1,{ v[2],v[3],v[4] }) end addEventHandler('onClientGUIClick',root, function ( ) if ( source == GUIEditor.button[1] ) then if ( guiGridListGetSelectedItem ( gr ) ~= -1 ) then local x,y,z = unpack(guiGridListGetItemData(gr,guiGridListGetSelectedItem ( gr ),1)) setElementPosition(getLocalPlayer(),x,y,z) setElementData(getLocalPlayer(),'x',x) setElementData(getLocalPlayer(),'y',y) setElementData(getLocalPlayer(),'z',z) end end end) addEventHandler('onClientPlayerWasted',root, function ( ) local x,y,z = getElementData(getLocalPlayer(),'x'),getElementData(getLocalPlayer(),'y'),getElementData(getLocalPlayer(),'z') setElementPosition(localPlayer,x,y,z) end) Link to comment
khaledmhammed Posted August 15, 2015 Author Share Posted August 15, 2015 ابششر لاتعصب .. local Positions = { {'Name',-2371.50171 ,-673.10498 ,124.17433}, } GUIEditor = { gridlist = {}, button = {} } wnd = guiCreateWindow(324, 140, 394, 514, "الآنتقالات", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd, false ) GUIEditor.button[1] = guiCreateButton(64, 439, 244, 65, "انتقال", false, wnd) guiSetProperty(GUIEditor.button[1],"NormalTextColour", "FF00FF00") gr = guiCreateGridList(30, 72, 324, 363, false, wnd) guiGridListAddColumn(gr, "المكان", 0.9) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor( false ) else guiSetVisible ( wnd, true ) showCursor( true ) end end bindKey("F6", "down", OpenWin) for i,v in ipairs (Positions) do local row = guiGridListAddRow ( gr ) guiGridListSetItemText(gr,row,1,v[1],false,false) guiGridListSetItemData(gr,row,1,{ v[2],v[3],v[4] }) end addEventHandler('onClientGUIClick',root, function ( ) if ( source == GUIEditor.button[1] ) then if ( guiGridListGetSelectedItem ( gr ) ~= -1 ) then local x,y,z = unpack(guiGridListGetItemData(gr,guiGridListGetSelectedItem ( gr ),1)) setElementPosition(getLocalPlayer(),x,y,z) setElementData(getLocalPlayer(),'x',x) setElementData(getLocalPlayer(),'y',y) setElementData(getLocalPlayer(),'z',z) end end end) addEventHandler('onClientPlayerWasted',root, function ( ) local x,y,z = getElementData(getLocalPlayer(),'x'),getElementData(getLocalPlayer(),'y'),getElementData(getLocalPlayer(),'z') setElementPosition(localPlayer,x,y,z) end) تممام اخوي بس الحين لا حددت ع المكان ثم سويت كيل اموت نفسي ينقلني للمكان الثاني وانا ميت يمكن لزم تايمر Link to comment
khaledmhammed Posted August 15, 2015 Author Share Posted August 15, 2015 ابي اسوي له تايمر لا مات ثواني وينتقل للمكان ماظبط local Positions = { {'1',1154.412109375, -639.7060546875, 104.15550231934}, {'2',1236.359375, -619.701171875, 103.74805450439}, } GUIEditor = { gridlist = {}, button = {} } wnd = guiCreateWindow(324, 140, 394, 514, "الآنتقالات", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd, false ) GUIEditor.button[1] = guiCreateButton(64, 439, 244, 65, "انتقال", false, wnd) guiSetProperty(GUIEditor.button[1],"NormalTextColour", "FF00FF00") gr = guiCreateGridList(30, 72, 324, 363, false, wnd) guiGridListAddColumn(gr, "المكان", 0.9) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor( false ) else guiSetVisible ( wnd, true ) showCursor( true ) end end bindKey("F6", "down", OpenWin) for i,v in ipairs (Positions) do local row = guiGridListAddRow ( gr ) guiGridListSetItemText(gr,row,1,v[1],false,false) guiGridListSetItemData(gr,row,1,{ v[2],v[3],v[4] }) end addEventHandler('onClientPlayerWasted',root, function ( ) if ( source == GUIEditor.button[1] ) then if ( guiGridListGetSelectedItem ( gr ) ~= -1 ) then local x,y,z = unpack(guiGridListGetItemData(gr,guiGridListGetSelectedItem ( gr ),1)) setElementPosition(getLocalPlayer(),x,y,z) setElementData(getLocalPlayer(),'x',x) setElementData(getLocalPlayer(),'y',y) setElementData(getLocalPlayer(),'z',z) end end end) addEventHandler('onClientPlayerWasted',root, function ( ) local x,y,z = getElementData(getLocalPlayer(),'x'),getElementData(getLocalPlayer(),'y'),getElementData(getLocalPlayer(),'z') setTimer(function (localPlayer,x,y,z) setElementPosition (localPlayer,x,y,z) end,1900, 1 ) end) Link to comment
iMr.SFA7 Posted August 15, 2015 Share Posted August 15, 2015 addEventHandler('onClientPlayerWasted',root, function ( ) local x,y,z = getElementData(getLocalPlayer(),'x'),getElementData(getLocalPlayer(),'y'),getElementData(getLocalPlayer(),'z') setTimer(function ( ) setElementPosition (localPlayer,x,y,z) end ,2000, 1 ) end ) Link to comment
khaledmhammed Posted August 15, 2015 Author Share Posted August 15, 2015 addEventHandler('onClientPlayerWasted',root, function ( ) local x,y,z = getElementData(getLocalPlayer(),'x'),getElementData(getLocalPlayer(),'y'),getElementData(getLocalPlayer(),'z') setTimer(function ( ) setElementPosition (localPlayer,x,y,z) end ,2000, 1 ) end ) تمام اخوي يعطيكك الف عافية Link to comment
khaledmhammed Posted August 15, 2015 Author Share Posted August 15, 2015 (edited) سفاح معليش ابية يرسبن على حسب التيم مثلا انا مسوي جنب كل احداث التيم حقه لو مات يتحقق انه بتيم بوليس لو فعلا بتيم ينقله للاحداث اللي جنب بوليس ولو حدد بالقريد على ارمي وهو فعلا من تيم ارمي ينقله ل الاحداث اللي جنب ارمي ولو مو منها ماينتقل يالت تصلحو اخطائي local Team = { ["Police"] = {1154.412109375, -639.7060546875, 104.15550231934}, ["Army"] = {1236.359375, -619.701171875, 103.74805450439}, ["team"] = {x,y,z}, } GUIEditor = { gridlist = {}, button = {} } wnd = guiCreateWindow(324, 140, 394, 514, "الآنتقالات", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd, false ) GUIEditor.button[1] = guiCreateButton(64, 439, 244, 65, "انتقال", false, wnd) guiSetProperty(GUIEditor.button[1],"NormalTextColour", "FF00FF00") gr = guiCreateGridList(30, 72, 324, 363, false, wnd) guiGridListAddColumn(gr, "المكان", 0.9) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor( false ) else guiSetVisible ( wnd, true ) showCursor( true ) end end bindKey("F6", "down", OpenWin) if ( getPlayerTeam == getTeamFromName x, y, z ) then for i,v in ipairs (Team) do local row = guiGridListAddRow ( gr ) guiGridListSetItemText(gr,row,1,v[1],false,false) guiGridListSetItemData(gr,row,1,{ v[2],v[3],v[4] }) end end addEventHandler('onClientPlayerWasted',root, function ( ) if ( source == GUIEditor.button[1] ) then if ( guiGridListGetSelectedItem ( gr ) ~= -1 ) then local x,y,z = unpack(guiGridListGetItemData(gr,guiGridListGetSelectedItem ( gr ),1)) setElementPosition(getLocalPlayer(),x,y,z) setElementData(getLocalPlayer(),'x',x) setElementData(getLocalPlayer(),'y',y) setElementData(getLocalPlayer(),'z',z) end end end) addEventHandler('onClientPlayerWasted',root, function ( ) local x,y,z = getElementData(getLocalPlayer(),'x'),getElementData(getLocalPlayer(),'y'),getElementData(getLocalPlayer(),'z') setTimer(function ( ) setElementPosition (localPlayer,x,y,z) end ,6000, 1 ) end ) Edited August 16, 2015 by Guest Link to comment
khaledmhammed Posted August 15, 2015 Author Share Posted August 15, 2015 اين انتم ي ابطال Link to comment
khaledmhammed Posted August 16, 2015 Author Share Posted August 16, 2015 وينكم معليش ع تكرار الرد Link to comment
khaledmhammed Posted August 16, 2015 Author Share Posted August 16, 2015 شسالفه موضوعي انسحب عليةةةة Link to comment
MR.GRAND Posted August 17, 2015 Share Posted August 17, 2015 جرب Team = { ["Police"] = {1154.412109375, -639.7060546875, 104.15550231934}, ["Army"] = {1236.359375, -619.701171875, 103.74805450439}, } GUIEditor = { gridlist = {}, button = {} } wnd = guiCreateWindow(324, 140, 394, 514, "الآنتقالات", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd, false ) GUIEditor.button[1] = guiCreateButton(64, 439, 244, 65, "انتقال", false, wnd) guiSetProperty(GUIEditor.button[1],"NormalTextColour", "FF00FF00") gr = guiCreateGridList(30, 72, 324, 363, false, wnd) guiGridListAddColumn(gr, "المكان", 0.9) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor( false ) else guiSetVisible ( wnd, true ) showCursor( true ) end end bindKey("F6", "down", OpenWin) function Teams( ) if ( getPlayerTeam == getTeamFromName (Team) ) then for i,v in ipairs (Team) do local row = guiGridListAddRow ( gr ) guiGridListSetItemText(gr,row,1,v[1],false,false) guiGridListSetItemData(gr,row,1,{ v[2],v[3],v[4] }) end end end addEventHandler('onClientPlayerWasted',root, function ( ) if ( source == GUIEditor.button[1] ) then if ( guiGridListGetSelectedItem ( gr ) ~= -1 ) then local x,y,z = unpack(guiGridListGetItemData(gr,guiGridListGetSelectedItem ( gr ),1)) setElementPosition(getLocalPlayer(),x,y,z) setElementData(getLocalPlayer(),'x',x) setElementData(getLocalPlayer(),'y',y) setElementData(getLocalPlayer(),'z',z) end end end) addEventHandler('onClientPlayerWasted',root, function ( ) local x,y,z = getElementData(getLocalPlayer(),'x'),getElementData(getLocalPlayer(),'y'),getElementData(getLocalPlayer(),'z') setTimer(function ( ) setElementPosition (localPlayer,x,y,z) end ,6000, 1 ) end ) Link to comment
H25 Posted August 17, 2015 Share Posted August 17, 2015 اذا مات لازم تسوي في السيرفر سباون بلاير spawnPlayer Link to comment
khaledmhammed Posted August 17, 2015 Author Share Posted August 17, 2015 اذا مات لازم تسوي في السيرفرسباون بلاير spawnPlayer setElementPosition ليه اخوي ماتنفع Link to comment
iMr.SFA7 Posted August 17, 2015 Share Posted August 17, 2015 Attention: Do not use this function to spawn a ped/player. It will cause problems with other functions like warpPedIntoVehicle. Use spawnPlayer and createPed instead. Link to comment
khaledmhammed Posted August 17, 2015 Author Share Posted August 17, 2015 جرب Team = { ["Police"] = {1154.412109375, -639.7060546875, 104.15550231934}, ["Army"] = {1236.359375, -619.701171875, 103.74805450439}, } GUIEditor = { gridlist = {}, button = {} } wnd = guiCreateWindow(324, 140, 394, 514, "الآنتقالات", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd, false ) GUIEditor.button[1] = guiCreateButton(64, 439, 244, 65, "انتقال", false, wnd) guiSetProperty(GUIEditor.button[1],"NormalTextColour", "FF00FF00") gr = guiCreateGridList(30, 72, 324, 363, false, wnd) guiGridListAddColumn(gr, "المكان", 0.9) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor( false ) else guiSetVisible ( wnd, true ) showCursor( true ) end end bindKey("F6", "down", OpenWin) function Teams( ) if ( getPlayerTeam == getTeamFromName (Team) ) then for i,v in ipairs (Team) do local row = guiGridListAddRow ( gr ) guiGridListSetItemText(gr,row,1,v[1],false,false) guiGridListSetItemData(gr,row,1,{ v[2],v[3],v[4] }) end end end addEventHandler('onClientPlayerWasted',root, function ( ) if ( source == GUIEditor.button[1] ) then if ( guiGridListGetSelectedItem ( gr ) ~= -1 ) then local x,y,z = unpack(guiGridListGetItemData(gr,guiGridListGetSelectedItem ( gr ),1)) setElementPosition(getLocalPlayer(),x,y,z) setElementData(getLocalPlayer(),'x',x) setElementData(getLocalPlayer(),'y',y) setElementData(getLocalPlayer(),'z',z) end end end) addEventHandler('onClientPlayerWasted',root, function ( ) local x,y,z = getElementData(getLocalPlayer(),'x'),getElementData(getLocalPlayer(),'y'),getElementData(getLocalPlayer(),'z') setTimer(function ( ) setElementPosition (localPlayer,x,y,z) end ,6000, 1 ) end ) حبيبي والله ~ بس ماضهربالقريد ولا خيار شغاله بس طالعه فاضية Link to comment
MR.GRAND Posted August 17, 2015 Share Posted August 17, 2015 Teams = { {"Police",1154.412109375, -639.7060546875, 104.15550231934 }, {"Army",1236.359375, -619.701171875, 103.74805450439 }, } GUIEditor = { gridlist = {}, button = {} } wnd = guiCreateWindow(324, 140, 394, 514, "الآنتقالات", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd, false ) GUIEditor.button[1] = guiCreateButton(64, 439, 244, 65, "انتقال", false, wnd) guiSetProperty(GUIEditor.button[1],"NormalTextColour", "FF00FF00") gr = guiCreateGridList(30, 72, 324, 363, false, wnd) guiGridListSetSelectionMode(gr,1) guiGridListAddColumn(gr, "المكان", 0.9) addEvent("onClientGUIClick",true) addEventHandler("onClientGUIClick",root, function () local Check = guiGridListGetItemText ( gr, guiGridListGetSelectedItem ( gr ), 1 ) if ( getPlayerTeam == getTeamFromName (Check) ) then local sel = guiGridListGetSelectedItem(gr) if source == GUIEditor.button[1] then if sel ~= -1 then local x,y,z = unpack(guiGridListGetItemData(gr,sel,1)) setElementPosition(localPlayer,x,y,z) guiSetVisible ( wnd, false ) showCursor(false) guiSetInputEnabled(false) else return end end end end ) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor( false ) else guiSetVisible ( wnd, true ) showCursor( true ) end end bindKey("F6", "down", OpenWin) for i,v in ipairs(Teams) do local row = guiGridListAddRow(gr) guiGridListSetItemText(gr,row,1,v[1],false,false) guiGridListSetItemData(gr,row,1,{v[2],v[3],v[4]}) end addEventHandler('onClientPlayerWasted',root, function ( ) if ( source == GUIEditor.button[1] ) then if ( guiGridListGetSelectedItem ( gr ) ~= -1 ) then local x,y,z = unpack(guiGridListGetItemData(gr,guiGridListGetSelectedItem ( gr ),1)) setElementPosition(getLocalPlayer(),x,y,z) setElementData(getLocalPlayer(),'x',x) setElementData(getLocalPlayer(),'y',y) setElementData(getLocalPlayer(),'z',z) end end end) addEventHandler('onClientPlayerWasted',root, function ( ) local x,y,z = getElementData(getLocalPlayer(),'x'),getElementData(getLocalPlayer(),'y'),getElementData(getLocalPlayer(),'z') setTimer(function ( ) setElementPosition (localPlayer,x,y,z) end ,6000, 1 ) end ) Link to comment
khaledmhammed Posted August 17, 2015 Author Share Posted August 17, 2015 يقولي في خطاء 79 pad ar gument setelementposition Expecled vector3 argument2 got boolean لاحددت ع القريد وانا بتيم وموتت نفسي ماينقلني Link to comment
MR.GRAND Posted August 17, 2015 Share Posted August 17, 2015 الحين قلي لو انت بتيم شرطة مثلا وانتقلت من القريد لست ينقلك ؟ حتى اكمل لك الباقي Link to comment
khaledmhammed Posted August 17, 2015 Author Share Posted August 17, 2015 الحين قلي لو انت بتيم شرطة مثلا وانتقلت من القريد لست ينقلك ؟حتى اكمل لك الباقي حاليا لا ماينقل لو بتيم واموت نفسي ماينقل Link to comment
MR.GRAND Posted August 17, 2015 Share Posted August 17, 2015 الحين قلي لو انت بتيم شرطة مثلا وانتقلت من القريد لست ينقلك ؟حتى اكمل لك الباقي حاليا لا ماينقل لو بتيم واموت نفسي ماينقل يعني اقصد لو تضغط على تيم من اللوحة وتدوس انتقال ينقلك ؟ Link to comment
khaledmhammed Posted August 17, 2015 Author Share Posted August 17, 2015 لا ماينقل وهذا اللي ابيه انا ابيه ينتقل لا مات مو لاحدد ع طول .. وشكرأ جزيلأ بروح مشوار وجاي لا جيت بشوف الموضوع Link to comment
khaledmhammed Posted August 17, 2015 Author Share Posted August 17, 2015 سويت ترايقر لسيرفر وجربت السباون ماينقل لو كنت بالتيم المحدد ب الاحداثيات ومافي اخطاء بالديبوق client Teams = { {"Police",1154.412109375, -639.7060546875, 104.15550231934 }, {"Army",1236.359375, -619.701171875, 103.74805450439 }, } GUIEditor = { gridlist = {}, button = {} } wnd = guiCreateWindow(324, 140, 394, 514, "الآنتقالات", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd, false ) GUIEditor.button[1] = guiCreateButton(64, 439, 244, 65, "انتقال", false, wnd) guiSetProperty(GUIEditor.button[1],"NormalTextColour", "FF00FF00") gr = guiCreateGridList(30, 72, 324, 363, false, wnd) guiGridListSetSelectionMode(gr,1) guiGridListAddColumn(gr, "المكان", 0.9) addEvent("onClientGUIClick",true) addEventHandler("onClientGUIClick",root, function () local Check = guiGridListGetItemText ( gr, guiGridListGetSelectedItem ( gr ), 1 ) if ( getPlayerTeam == getTeamFromName (Check) ) then local sel = guiGridListGetSelectedItem(gr) if source == GUIEditor.button[1] then if sel ~= -1 then local x,y,z = unpack(guiGridListGetItemData(gr,sel,1)) setElementPosition(localPlayer,x,y,z) guiSetVisible ( wnd, false ) showCursor(false) guiSetInputEnabled(false) else return end end end end ) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor( false ) else guiSetVisible ( wnd, true ) showCursor( true ) end end bindKey("F6", "down", OpenWin) for i,v in ipairs(Teams) do local row = guiGridListAddRow(gr) guiGridListSetItemText(gr,row,1,v[1],false,false) guiGridListSetItemData(gr,row,1,{v[2],v[3],v[4]}) end addEventHandler('onClientPlayerWasted',root, function ( ) if ( source == GUIEditor.button[1] ) then if ( guiGridListGetSelectedItem ( gr ) ~= -1 ) then local x,y,z = unpack(guiGridListGetItemData(gr,guiGridListGetSelectedItem ( gr ),1)) setElementPosition(getLocalPlayer(),x,y,z) setElementData(getLocalPlayer(),'x',x) setElementData(getLocalPlayer(),'y',y) setElementData(getLocalPlayer(),'z',z) end end end) addEventHandler('onClientPlayerWasted',root, function ( ) local x,y,z = getElementData(getLocalPlayer(),'x'),getElementData(getLocalPlayer(),'y'),getElementData(getLocalPlayer(),'z') triggerServerEvent ( "spa", localPlayer ) end ) server addEvent ( "spa", true ) addEventHandler ( "spa", root, function ( ) setTimer(function ( ) spawnPlayer (localPlayer,x,y,z) end ,6000, 1) end) Link to comment
#Madara Posted August 17, 2015 Share Posted August 17, 2015 localPlayer = للكلاينت فقط + x,y,z مو معرفين أنت وش تبي تسوي بالضبط ؟ كودك يصير كذا : addEvent ( "spa", true ) addEventHandler ( "spa", root, function ( ) setTimer(function ( ) spawnPlayer (source,x,y,z) end ,6000, 1) end) Link to comment
khaledmhammed Posted August 17, 2015 Author Share Posted August 17, 2015 جريد لاست فيه تيمات لو حدد على تيم بالقريد وثم مات الاعب يتحقق لو انه بالتيم اللي مسجل بالكود ينقله للاحداث لو مو منها ماينقله 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