Jump to content

تصحيح كود [Solved]


Recommended Posts

سلام عليكم

[شباب انا سويت لوحة انتقال للاعب آخر المشكلة انه بينتقل بس مو لللاعب, بينتقل في مكان كذا [مزرعة :mrgreen:

وين الخطأ ؟

Client Side

GUIEditor.window[2] = guiCreateWindow(615, 118, 175, 338, "Warp To Player", false) 
guiWindowSetSizable(GUIEditor.window[2], false) 
  
GUIEditor.gridlist[2] = guiCreateGridList(9, 25, 157, 304, false, GUIEditor.window[2]) 
column = guiGridListAddColumn(GUIEditor.gridlist[2], "PlayersList", 0.9) 
  
  
  
 function warpto(sourcePlayer, targetPlayer, who) 
 local who = guiGridListGetSelectedItem(GUIEditor.gridlist[2]) 
  if source == GUIEditor.gridlist[2] then 
    local  x,y,z =   getElementPosition (source,who) 
            setElementPosition(localPlayer,x+5, y, z+5) 
  
end 
end 
addEventHandler("onClientGUIClick",getRootElement(),warpto) 

*انا مسوي النافذة تفتح بزر في لوحة*

اي مساعدة بالله عليكم :?

Edited by Guest
Link to comment
GUIEditor.window[2] = guiCreateWindow(615, 118, 175, 338, "Warp To Player", false) 
guiWindowSetSizable(GUIEditor.window[2], false) 
  
GUIEditor.gridlist[2] = guiCreateGridList(9, 25, 157, 304, false, GUIEditor.window[2]) 
column = guiGridListAddColumn(GUIEditor.gridlist[2], "PlayersList", 0.9) 
  
  
  
function warpto( ) 
    if source == GUIEditor.gridlist[2] then 
        local who = guiGridListGetSelectedItem(GUIEditor.gridlist[2]) 
        if who ~= -1 then 
            local player = getPlayerFromName(guiGridListGetItemText(GUIEditor.gridlist[2], who, 1)) 
            if player then 
                local  x,y,z =   getElementPosition (player) 
                setElementPosition(localPlayer,x+5, y, z+5) 
            end 
        end 
    end 
end 
addEventHandler("onClientGUIClick", resourceRoot, warpto) 

Edited by Guest
Link to comment
GUIEditor.window[2] = guiCreateWindow(615, 118, 175, 338, "Warp To Player", false) 
guiWindowSetSizable(GUIEditor.window[2], false) 
  
GUIEditor.gridlist[2] = guiCreateGridList(9, 25, 157, 304, false, GUIEditor.window[2]) 
column = guiGridListAddColumn(GUIEditor.gridlist[2], "PlayersList", 0.9) 
  
  
  
function warpto( ) 
    if source == GUIEditor.gridlist[2] then 
        local who = guiGridListGetSelectedItem(GUIEditor.gridlist[2]) 
        if who ~= -1 then 
            local player = getPlayerFromName(guiGridListGetItemText(GUIEditor.gridlist[2], row, 1)) 
            if player then 
                local  x,y,z =   getElementPosition (player) 
                setElementPosition(localPlayer,x+5, y, z+5) 
            end 
        end 
    end 
end 
addEventHandler("onClientGUIClick", resourceRoot, warpto) 

ماضبط معي :(

Link to comment
GUIEditor.window[2] = guiCreateWindow(615, 118, 175, 338, "Warp To Player", false) 
guiWindowSetSizable(GUIEditor.window[2], false) 
  
GUIEditor.gridlist[2] = guiCreateGridList(9, 25, 157, 304, false, GUIEditor.window[2]) 
column = guiGridListAddColumn(GUIEditor.gridlist[2], "PlayersList", 0.9) 
  
  
  
function warpto( ) 
    if source == GUIEditor.gridlist[2] then 
        local who = guiGridListGetSelectedItem(GUIEditor.gridlist[2]) 
        if who ~= -1 then 
            local player = getPlayerFromName(guiGridListGetItemText(GUIEditor.gridlist[2], row, 1)) 
            if player then 
                local  x,y,z =   getElementPosition (player) 
                setElementPosition(localPlayer,x+5, y, z+5) 
            end 
        end 
    end 
end 
addEventHandler("onClientGUIClick", resourceRoot, warpto) 

ماضبط معي :(

مثل ماقال ضاوي + شوف الديبوق

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