SycroX Posted February 11, 2016 Share Posted February 11, 2016 السلام عليكم الحين عندي مشكلة اني لما ادخل الماركر انا مسوي ان لوحة تفتح لي المشكلة هي ان اللوحة تفتح للكل مو لي انا بس 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
Jupi Posted February 11, 2016 Share Posted February 11, 2016 addEventHandler ("onClientMarkerHit", root, function(el) if source == Marker2 and el == localPlayer then guiSetVisible(baywnd,true) showCursor( true ) loadplayer() end end ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now