Sign in to follow this  
Rat32

Script

Recommended Posts

Hey! I have a problem with script. This script shows the GUI for all and I want to single player showed. What is wrong? :). This is just a sample script.

CLIENTSIDE:

addEvent("okno", true) 
  
GUIEditor = { 
        button = {}, 
        window = {}, 
        label = {} 
    } 
    GUIEditor.window[1] = guiCreateWindow(487, 295, 417, 123, "JOB / PRACA", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
  
    GUIEditor.label[1] = guiCreateLabel(75, 23, 293, 16, "Czy chcesz pracować jako pracownik urzędu?", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.label[1], "default-bold-small") 
    GUIEditor.label[2] = guiCreateLabel(71, 49, 293, 16, "Do you want to work as an employee of the office?", false, GUIEditor.window[1]) 
    guiSetFont(GUIEditor.label[2], "default-bold-small") 
    tak = guiCreateButton(9, 74, 111, 39, "YES / TAK", false, GUIEditor.window[1]) 
    GUIEditor.button[2] = guiCreateButton(296, 75, 111, 38, "NO / NIE", false, GUIEditor.window[1]) 
        guiSetVisible(GUIEditor.window[1], false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible(GUIEditor.window[1], false) 
  
function otworzgui() 
   guiSetVisible(GUIEditor.window[1], true) 
   showCursor(true) 
end 
addEventHandler("okno", getRootElement(), otworzgui) 
  
  
  
  
function zgoda() 
   blip = createBlip(1487.96643, -1727.90002, 13.38281, 6) 
end 
  

SERVERSIDE:

markerpracy = createMarker(1486.27441, -1738.05640, 13.54688, "cylinder", 1) 
  
function guji() 
   triggerClientEvent("okno", source) 
end 
addEventHandler("onMarkerHit", markerpracy, guji) 

Share this post


Link to post

Try this:

function guji ( hitElement ) 
   triggerClientEvent ( hitElement, "okno", source ) 
end 
addEventHandler("onMarkerHit", markerpracy, guji) 

Share this post


Link to post
markerpracy = createMarker(1486.27441, -1738.05640, 13.54688, "cylinder", 1) 
  
function guji(hitElement) 
   if getElementType(hitElement) == "player" then 
   triggerClientEvent(hitElement,"okno", hitElement) 
   end 
end 
addEventHandler("onMarkerHit", markerpracy, guji) 

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.