Jump to content

مشكلة


SycroX

Recommended Posts

السلام عليكم الحين عندي مشكلة

اني لما ادخل الماركر

انا مسوي ان لوحة تفتح لي

المشكلة هي

ان اللوحة تفتح للكل

مو لي انا بس

function UpdatePlayers(old, new) 
    if eventName == "onClientPlayerJoin"  then 
        if getElementData(player, "Wonder") and getElementData(player, "Wonder") == 1 then 
        guiGridListSetItemText(gridlist, guiGridListAddRow(gridlist), 1, getPlayerName(source), false, false) 
        guiSetFont(gridlist, "default-bold-small") 
    elseif eventName == "onClientPlayerQuit"  then 
        for i=0, guiGridListGetRowCount(gridlist) do 
            if guiGridListGetItemText(gridlist, i, 1) == getPlayerName(source) then 
                guiGridListRemoveRow(gridlist, i) 
                guiSetFont(gridlist, "default-bold-small") 
            end 
        end 
    end 
    elseif eventName == "onClientPlayerChangeNick"  then 
        for i=0, guiGridListGetRowCount(gridlist) do 
            if guiGridListGetItemText(gridlist, i, 1) == old then 
                guiGridListSetItemText(gridlist, i, 1, new, false, false) 
                guiSetFont(gridlist, "default-bold-small") 
            end 
        end 
    end 
end 
addEventHandler("onClientPlayerJoin", root, UpdatePlayers) 
addEventHandler("onClientPlayerQuit", root, UpdatePlayers) 
addEventHandler("onClientPlayerChangeNick", root, UpdatePlayers) 
  
function loadplayer() 
guiSetVisible(baywnd, true) 
guiSetInputEnabled(true) 
for index, player in ipairs (getElementsByType("player")) do 
local row = guiGridListAddRow(gridlist) 
if getElementData(player, "Wonder") and getElementData(player, "Wonder") == 1 then 
guiGridListSetItemText(gridlist, row, 1, getPlayerName(player), false, false) 
guiGridListSetItemText(gridlist, row, 2, "HHHH", false, false) 
guiGridListSetItemColor(gridlist, row, 1, 255, 255, 0) 
guiGridListSetItemColor(gridlist, row, 2, 255, 255, 0) 
guiSetFont(gridlist, "default-bold-small") 
        end 
    end 
end 
  
addEventHandler ("onClientMarkerHit", root,  
function() 
if ( source == Marker2 ) then 
guiSetVisible(baywnd,true) 
showCursor( true ) 
loadplayer() 
    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...