Jump to content

تصحيح كود


Recommended Posts

السـلآم علــيكم ورحمةة اللهه وبرمجاتهه

يا شباب عندي مشكلة بهالكود

يعني لما المس الماركر تفتح تفتح النافذة لجميع اللاعبين الي بالسيرفر

انا ابيها لللاعب الي يلمس الماركر فقط , وياريت تساعدوني ذا كودي

GUIEditor_Button = {} 
GUIEditor_Grid = {} 
GUIEditor_Marker = {} 
GUIEditor_Window = {} 
local marker = {} 
local weapon = {} 
vehicleId = {562,560,522,487,425,520,495} 
marker[1] = createMarker(-305.89999389648,1027.8000488281,18.60000038147,"cylinder",1.5,0,0,0,0) 
marker[2] = createMarker(-305.89999389648,1032,18.60000038147,"cylinder",1.5,0,0,0,0) 
  
local x,y = guiGetScreenSize() 
local x = x - 208 
local y = y - 321 
GUIEditor_Window[1] = guiCreateWindow(500,147,246,413,"Select Car",false) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetAlpha(GUIEditor_Window[1],1) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Grid[1] = guiCreateGridList(9,34,228,255,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.5) 
GUIEditor_Button[2] = guiCreateButton(20,308,210,41,"Select",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(20,352,210,41,"Close",false,GUIEditor_Window[1]) 
local r = 'Red' 
  
addEventHandler ("onClientMarkerHit", root,  
function( player ) 
    if getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == r and not isPedInVehicle( player ) then 
        for i,v in ipairs( marker ) do 
            if ( source == v ) then 
                x999,y999,z999 = getElementPosition( localPlayer )  
                setElementFrozen ( localPlayer, true ) 
                guiSetVisible(GUIEditor_Window[1],true) 
                showCursor( true ) 
                end 
            end 
        end 
    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...