Jump to content

help .. the gui is visibile for all players


golanu21

Recommended Posts

GUIEditor = { 
    label = {}, 
} 
fereastra = guiCreateWindow(684, 359, 449, 424, "Ls/Sf/Lv", false) 
guiWindowSetSizable(fereastra, false) 
guiSetAlpha(fereastra, 0.89) 
  
GUIEditor.label[1] = guiCreateLabel(8, 33, 353, 54, "Incotro sefule?", false, fereastra) 
guiSetFont(GUIEditor.label[1], "sa-header") 
LS = guiCreateButton(9, 129, 431, 99, "Los Santos", false, fereastra) 
guiSetProperty(LS, "NormalTextColour", "FFAAAAAA") 
SF = guiCreateButton(10, 228, 430, 104, "San Fierro", false, fereastra) 
guiSetProperty(SF, "NormalTextColour", "FFAAAAAA") 
LV = guiCreateButton(9, 332, 431, 83, "Las Venturas", false, fereastra) 
guiSetProperty(LV, "NormalTextColour", "FFAAAAAA") 
X = guiCreateButton(397, 23, 42, 33, "X", false, fereastra) 
guiSetProperty(X, "NormalTextColour", "FFAAAAAA") 
PI = guiCreateButton(9, 84, 431, 44, "Pirate Island", false, fereastra) 
guiSetProperty(PI, "NormalTextColour", "FFAAAAAA") 
  
guiSetVisible(fereastra, false) 
  
--script-- 
  
--GUI VISIBILE 
--*Marker1 
addEventHandler("onClientMarkerHit", Marker1, 
function () 
guiSetVisible(fereastra, true) 
showCursor(true) 
end) 

i make that, and a player enter in marker .. the gui has visibile for all players

Link to comment
GUIEditor = { 
    label = {}, 
} 
fereastra = guiCreateWindow(684, 359, 449, 424, "Ls/Sf/Lv", false) 
guiWindowSetSizable(fereastra, false) 
guiSetAlpha(fereastra, 0.89) 
  
GUIEditor.label[1] = guiCreateLabel(8, 33, 353, 54, "Incotro sefule?", false, fereastra) 
guiSetFont(GUIEditor.label[1], "sa-header") 
LS = guiCreateButton(9, 129, 431, 99, "Los Santos", false, fereastra) 
guiSetProperty(LS, "NormalTextColour", "FFAAAAAA") 
SF = guiCreateButton(10, 228, 430, 104, "San Fierro", false, fereastra) 
guiSetProperty(SF, "NormalTextColour", "FFAAAAAA") 
LV = guiCreateButton(9, 332, 431, 83, "Las Venturas", false, fereastra) 
guiSetProperty(LV, "NormalTextColour", "FFAAAAAA") 
X = guiCreateButton(397, 23, 42, 33, "X", false, fereastra) 
guiSetProperty(X, "NormalTextColour", "FFAAAAAA") 
PI = guiCreateButton(9, 84, 431, 44, "Pirate Island", false, fereastra) 
guiSetProperty(PI, "NormalTextColour", "FFAAAAAA") 
  
guiSetVisible(fereastra, false) 
  
--script-- 
  
--GUI VISIBILE 
--*Marker1 
addEventHandler("onClientMarkerHit", Marker1, 
function () 
guiSetVisible(fereastra, true) 
showCursor(true) 
end) 

i make that, and a player enter in marker .. the gui has visibile for all players

show the complete code

Link to comment

INCORRECT:

addEventHandler("onClientMarkerHit", Marker1, 
function () 
    guiSetVisible(fereastra, true) 
    showCursor(true) 
end) 

This is triggered when anyone hits the marker, so no wonder this is happening, so use this.

CORRECT:

addEventHandler("onClientMarkerHit", Marker1, 
function (hitPlayer, matchingDimension) 
    if hitPlayer == localPlayer then 
        guiSetVisible(fereastra, true) 
        showCursor(true) 
    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...