Jump to content

لاهنتم حل


Recommended Posts

addEventHandler("onClientGUIClick", root, 
function () 
        local Row = guiGridListGetSelectedItem(gr) 
        if (source == GUIEditor.button[1]) then 
            if (Row ~= -1) then 
                local selected = guiGridListGetItemText(gr, Row, 1) 
                 if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == selected then 
                       local x, y, z = unpack(guiGridListGetItemData(gr, Row, 1)) 
                       setElementPosition(localPlayer, x, y, z) 
                       guiSetVisible(wnd, false) 
                       showCursor(false) 
                       guiSetInputEnabled(false) 
                 end 
            end 
      end 
end 
) 

Link to comment
  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

  
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) 
  
function OpenWin() 
    if guiGetVisible ( wnd ) then   
        guiSetVisible ( wnd, false ) 
        showCursor( false ) 
else 
        guiSetVisible ( wnd, true ) 
        showCursor( true ) 
    end 
end 
bindKey("F6", "down", OpenWin) 
  
  
for k,v in pairs(Teams) do 
    local row = guiGridListAddRow(gr) 
    guiGridListSetItemText(gr,row,1, k,false,false) 
    guiGridListSetItemData(gr,row,1,{v[1],v[2],v[3]}) 
end 
  
  
addEventHandler("onClientGUIClick", root, 
function () 
        local Row = guiGridListGetSelectedItem(gr) 
        if (source == GUIEditor.button[1]) then 
            if (Row ~= -1) then 
                local selected = guiGridListGetItemText(gr, Row, 1) 
                 if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == selected then 
                       local x, y, z = unpack(guiGridListGetItemData(gr, Row, 1)) 
                       setElementPosition(localPlayer, x, y, z) 
                       guiSetVisible(wnd, false) 
                       showCursor(false) 
                       guiSetInputEnabled(false) 
                 end 
            end 
      end 
end 
) 
  
addEventHandler("onClientPlayerWasted", root, 
function ( ) 
     if getPlayerTeam(localPlayer) then 
          local x, y, z = unpack(Teams[getTeamName(getPlayerTeam(localPlayer))]) 
          triggerServerEvent("spawn", localPlayer, x, y, z) 
     end 
end 
) 
  
  
  
-- Server Side 
  
  
addEvent ( "spawn", true ) 
addEventHandler ( "spawn", root, 
function (x, y, z) 
      setTimer(spawnPlayer, 6000, 1, source, x, y, z) 
end 
) 

Edited by Guest
Link to comment

حسين الكود تمام بس هو لو الاعب بتيم وحدد على القريد لاست وضغط انتقال ينقله ع طول

انا ابيه لا ضغط انتقال ماينقله اذا مات ينقله على احداث التيم اللي حددة لو هو بالقريد

Link to comment
حسين الكود تمام بس هو لو الاعب بتيم وحدد على القريد لاست وضغط انتقال ينقله ع طول

انا ابيه لا ضغط انتقال ماينقله اذا مات ينقله على احداث التيم اللي حددة لو هو بالقريد

وضح الي تبيه بالضبط

تبيه اذا حدد على تيم وضغط الزر

ينقله لاحداثيات التيم اذا مات ؟

Link to comment
حسين الكود تمام بس هو لو الاعب بتيم وحدد على القريد لاست وضغط انتقال ينقله ع طول

انا ابيه لا ضغط انتقال ماينقله اذا مات ينقله على احداث التيم اللي حددة لو هو بالقريد

وضح الي تبيه بالضبط

تبيه اذا حدد على تيم وضغط الزر

ينقله لاحداثيات التيم اذا مات ؟

اي لو حدد على التيم وضغط الزر يتاكد لو هو بالتيم اللي حدد عليه ينقله بعد مايموت

ولو مو بالتيم اللي حدد عليه ماينقله :)

وشكراا لككك

Link to comment
  
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) 
  
function OpenWin() 
    if guiGetVisible ( wnd ) then   
        guiSetVisible ( wnd, false ) 
        showCursor( false ) 
else 
        guiSetVisible ( wnd, true ) 
        showCursor( true ) 
    end 
end 
bindKey("F6", "down", OpenWin) 
  
  
for k,v in pairs(Teams) do 
    local row = guiGridListAddRow(gr) 
    guiGridListSetItemText(gr,row,1, k,false,false) 
    guiGridListSetItemData(gr,row,1,{v[1],v[2],v[3]}) 
end 
  
  
addEventHandler("onClientGUIClick", root, 
function () 
        local Row = guiGridListGetSelectedItem(gr) 
        if (source == GUIEditor.button[1]) then 
            if (Row ~= -1) then 
                local selected = guiGridListGetItemText(gr, Row, 1) 
                 if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == selected then 
                       --local x, y, z = unpack(guiGridListGetItemData(gr, Row, 1)) 
                       --setElementPosition(localPlayer, x, y, z) 
                       addEventHandler("onClientPlayerWasted", root, spawnOnWasted) 
                       guiSetVisible(wnd, false) 
                       showCursor(false) 
                       guiSetInputEnabled(false) 
                 end 
            end 
      end 
end 
) 
  
function spawnOnWasted( ) 
     if getPlayerTeam(localPlayer) then 
          local x, y, z = unpack(Teams[getTeamName(getPlayerTeam(localPlayer))]) 
          triggerServerEvent("spawn", localPlayer, x, y, z) 
          removeEventHandler("onClientPlayerWasted", root, spawnOnWasted) 
     end 
end 
  
  
  
  
-- Server Side 
  
  
addEvent ( "spawn", true ) 
addEventHandler ( "spawn", root, 
function (x, y, z) 
      setTimer(spawnPlayer, 6000, 1, source, x, y, z) 
end 
) 

Link to comment
  
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) 
  
function OpenWin() 
    if guiGetVisible ( wnd ) then   
        guiSetVisible ( wnd, false ) 
        showCursor( false ) 
else 
        guiSetVisible ( wnd, true ) 
        showCursor( true ) 
    end 
end 
bindKey("F6", "down", OpenWin) 
  
  
for k,v in pairs(Teams) do 
    local row = guiGridListAddRow(gr) 
    guiGridListSetItemText(gr,row,1, k,false,false) 
    guiGridListSetItemData(gr,row,1,{v[1],v[2],v[3]}) 
end 
  
  
addEventHandler("onClientGUIClick", root, 
function () 
        local Row = guiGridListGetSelectedItem(gr) 
        if (source == GUIEditor.button[1]) then 
            if (Row ~= -1) then 
                local selected = guiGridListGetItemText(gr, Row, 1) 
                 if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == selected then 
                       --local x, y, z = unpack(guiGridListGetItemData(gr, Row, 1)) 
                       --setElementPosition(localPlayer, x, y, z) 
                       addEventHandler("onClientPlayerWasted", localPlayer, spawnOnWasted) 
                       guiSetVisible(wnd, false) 
                       showCursor(false) 
                       guiSetInputEnabled(false) 
                 end 
            end 
      end 
end 
) 
  
function spawnOnWasted( ) 
     if getPlayerTeam(localPlayer) then 
          local x, y, z = unpack(Teams[getTeamName(getPlayerTeam(localPlayer))]) 
          triggerServerEvent("spawn", localPlayer, x, y, z) 
          removeEventHandler("onClientPlayerWasted", root, spawnOnWasted) 
     end 
end 
  
  
  
  
-- Server Side 
  
  
addEvent ( "spawn", true ) 
addEventHandler ( "spawn", root, 
function (x, y, z) 
      setTimer(spawnPlayer, 6000, 1, source, x, y, z) 
end 
) 

+

تأكد انك ضفت حدث الترايقر في السيرفر

Link to comment

نفس الخطاء ذي الاكواد

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) 
  
function OpenWin() 
    if guiGetVisible ( wnd ) then   
        guiSetVisible ( wnd, false ) 
        showCursor( false ) 
else 
        guiSetVisible ( wnd, true ) 
        showCursor( true ) 
    end 
end 
bindKey("F6", "down", OpenWin) 
  
  
for k,v in pairs(Teams) do 
    local row = guiGridListAddRow(gr) 
    guiGridListSetItemText(gr,row,1, k,false,false) 
    guiGridListSetItemData(gr,row,1,{v[1],v[2],v[3]}) 
end 
  
  
addEventHandler("onClientGUIClick", root, 
function () 
        local Row = guiGridListGetSelectedItem(gr) 
        if (source == GUIEditor.button[1]) then 
            if (Row ~= -1) then 
                local selected = guiGridListGetItemText(gr, Row, 1) 
                 if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == selected then 
                       --local x, y, z = unpack(guiGridListGetItemData(gr, Row, 1)) 
                       --setElementPosition(localPlayer, x, y, z) 
                       addEventHandler("onClientPlayerWasted", localPlayer, spawnOnWasted) 
                       guiSetVisible(wnd, false) 
                       showCursor(false) 
                       guiSetInputEnabled(false) 
                 end 
            end 
      end 
end 
) 
  
function spawnOnWasted( ) 
     if getPlayerTeam(localPlayer) then 
          local x, y, z = unpack(Teams[getTeamName(getPlayerTeam(localPlayer))]) 
          triggerServerEvent("spawn", localPlayer, x, y, z) 
          removeEventHandler("onClientPlayerWasted", root, spawnOnWasted) 
     end 
end 
  
  
  

addEvent ( "spawn", true ) 
addEventHandler ( "spawn", root, 
function (x, y, z) 
      setTimer(spawnPlayer, 6000, 1, source, x, y, z) 
end 
) 

Link to comment
  
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) 
  
function OpenWin() 
    if guiGetVisible ( wnd ) then   
        guiSetVisible ( wnd, false ) 
        showCursor( false ) 
else 
        guiSetVisible ( wnd, true ) 
        showCursor( true ) 
    end 
end 
bindKey("F6", "down", OpenWin) 
  
  
for k,v in pairs(Teams) do 
    local row = guiGridListAddRow(gr) 
    guiGridListSetItemText(gr,row,1, k,false,false) 
    guiGridListSetItemData(gr,row,1,{v[1],v[2],v[3]}) 
end 
  
local SpawnState = false 
addEventHandler("onClientGUIClick", root, 
function () 
        local Row = guiGridListGetSelectedItem(gr) 
        if (source == GUIEditor.button[1]) then 
            if (Row ~= -1) then 
                local selected = guiGridListGetItemText(gr, Row, 1) 
                 if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == selected then 
                       --local x, y, z = unpack(guiGridListGetItemData(gr, Row, 1)) 
                       --setElementPosition(localPlayer, x, y, z) 
                       SpawnState = true 
                       guiSetVisible(wnd, false) 
                       showCursor(false) 
                       guiSetInputEnabled(false) 
                 end 
            end 
      end 
end 
) 
  
function spawnOnWasted( ) 
     if SpawnState == false then return end 
     if getPlayerTeam(localPlayer) then 
          local x, y, z = unpack(Teams[getTeamName(getPlayerTeam(localPlayer))]) 
          triggerServerEvent("spawn", localPlayer, x, y, z) 
          SpawnState = false 
     end 
end 
addEventHandler("onClientPlayerWasted", root, spawnOnWasted) 
  
  
  
  
-- Server Side 
  
  
addEvent ( "spawn", true ) 
addEventHandler ( "spawn", root, 
function (x, y, z) 
      setTimer(spawnPlayer, 6000, 1, source, x, y, z) 
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...