Jump to content

لاهنتم حل


Recommended Posts

ابششر لاتعصب ..

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
  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

ابششر لاتعصب ..
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

ابي اسوي له تايمر لا مات ثواني وينتقل للمكان

ماظبط

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

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

سفاح معليش ابية يرسبن على حسب التيم

مثلا

انا مسوي جنب كل احداث التيم حقه

لو مات يتحقق انه بتيم بوليس لو فعلا بتيم ينقله للاحداث اللي جنب بوليس

ولو حدد بالقريد على ارمي وهو فعلا من تيم ارمي ينقله ل الاحداث اللي جنب ارمي ولو مو منها ماينتقل

يالت تصلحو اخطائي

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

جرب

  
 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
جرب
  
 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
  
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
الحين قلي لو انت بتيم شرطة مثلا وانتقلت من القريد لست ينقلك ؟

حتى اكمل لك الباقي

حاليا لا ماينقل لو بتيم واموت نفسي ماينقل

يعني اقصد لو تضغط على تيم من اللوحة وتدوس انتقال ينقلك ؟

Link to comment

سويت ترايقر لسيرفر

وجربت السباون ماينقل لو كنت بالتيم المحدد ب الاحداثيات ومافي اخطاء بالديبوق

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

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

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