Jump to content

Please help me with this script !


Recommended Posts

is it working? i don't see anything wrong atm. try this if its not working:

Edit: i think it's because u had an extra , comma in the end of the GUIEditor table.

client:

GUIEditor = { 
tab = {}, 
tabpanel = {}, 
label = {}, 
button = {}, 
window = {} 
}  
GUIEditor.window[1] = guiCreateWindow(193, 147, 521, 353, "Oil Refinery - Job", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible(GUIEditor.window[1], false) 
guiSetProperty(GUIEditor.window[1], "CloseButton", true) 
GUIEditor.label[1] = guiCreateLabel(10, 42, 129, 17, "Job's Name", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[1], "default-small") 
GUIEditor.label[2] = guiCreateLabel(10, 59, 129, 17, "Income", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[2], "default-small") 
GUIEditor.label[3] = guiCreateLabel(10, 76, 129, 17, "Rental Vehicle", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[3], "default-small") 
GUIEditor.label[4] = guiCreateLabel(139, 42, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[5] = guiCreateLabel(139, 76, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[6] = guiCreateLabel(139, 59, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[7] = guiCreateLabel(154, 42, 333, 17, "Oil Refinery", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[7], "default-bold-small") 
GUIEditor.label[8] = guiCreateLabel(154, 59, 333, 17, "Not Set", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[8], "default-bold-small") 
GUIEditor.label[9] = guiCreateLabel(154, 76, 333, 17, "Yes", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[9], "default-bold-small") 
GUIEditor.label[10] = guiCreateLabel(232, 93, 106, 16, "Help", false, GUIEditor.window[1]) 
GUIEditor.button[1] = guiCreateButton(186, 303, 145, 40, "START JOB", false, GUIEditor.window[1]) 
GUIEditor.tabpanel[1] = guiCreateTabPanel(61, 118, 387, 166, false, GUIEditor.window[1]) 
GUIEditor.tab[1] = guiCreateTab("Basic Help ", GUIEditor.tabpanel[1]) 
GUIEditor.label[11] = guiCreateLabel(10, 5, 367, 127, "Your job is to extract oil and deliver it to refiner machine. After that refine the oil and it will be automatically stored in tanks. After that collect your money ...", false, GUIEditor.tab[1]) 
guiLabelSetHorizontalAlign(GUIEditor.label[11], "left", true) 
GUIEditor.tab[2] = guiCreateTab("How to do job ?", GUIEditor.tabpanel[1]) 
GUIEditor.label[12] = guiCreateLabel(6, 7, 371, 125, "This is a complex job. Follow the steps to complete the job - 1. Turn on the electric generator. 2. Switch on the power supply for machines. 3. Wait until progress bar shows 100%. 4. Now take your vehicle to every oil drill. 5. Now unload all the oil. 6. Turn on refiner. 7. Wait until it is refined 8. Now collect the money.", false, GUIEditor.tab[2]) 
guiLabelSetHorizontalAlign(GUIEditor.label[12], "left", true) 
GUIEditor.tab[3] = guiCreateTab("Miscs.", GUIEditor.tabpanel[1]) 
GUIEditor.label[13] = guiCreateLabel(6, 5, 371, 127, "The more you work the more you will get exp. .... The more exp. you have the more you earn ....", false, GUIEditor.tab[3]) 
guiLabelSetHorizontalAlign(GUIEditor.label[13], "left", true) 
  
  
addEvent("GUIhelp", true) 
function guishow(player) 
guiSetVisible(GUIEditor.window[1], true) 
showCursor(true) 
end 
addEventHandler("GUIhelp",getRootElement(),guishow) 

server:

local marker = createMarker(2489,-1673,14, "cylinder", 1.5, 200, 150, 50, 150) 
  
function gui( hitElement ) 
if isPedInVehicle(hitElement) then return; end 
if getElementType( hitElement ) == "player" then 
triggerClientEvent(hitElement, "GUIhelp", hitElement) 
end 
end 
addEventHandler("onMarkerHit", root, gui) 

Edited by Guest
Link to comment

i edited your code check it. if it works.

make sure everything's right in meta.xml

it's because u had an extra comma in the end of the GUIEditor table.

if i were you i would make my GUI Relative, right click on your GUI via GUIEditor , click Relative, it would be better for people with other screen Resolution , that GUI will only be better / fit in your screen resolution.

client:

GUIEditor = { 
tab = {}, 
tabpanel = {}, 
label = {}, 
button = {}, 
window = {} 
}  
GUIEditor.window[1] = guiCreateWindow(193, 147, 521, 353, "Oil Refinery - Job", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible(GUIEditor.window[1], false) 
guiSetProperty(GUIEditor.window[1], "CloseButton", true) 
GUIEditor.label[1] = guiCreateLabel(10, 42, 129, 17, "Job's Name", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[1], "default-small") 
GUIEditor.label[2] = guiCreateLabel(10, 59, 129, 17, "Income", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[2], "default-small") 
GUIEditor.label[3] = guiCreateLabel(10, 76, 129, 17, "Rental Vehicle", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[3], "default-small") 
GUIEditor.label[4] = guiCreateLabel(139, 42, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[5] = guiCreateLabel(139, 76, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[6] = guiCreateLabel(139, 59, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[7] = guiCreateLabel(154, 42, 333, 17, "Oil Refinery", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[7], "default-bold-small") 
GUIEditor.label[8] = guiCreateLabel(154, 59, 333, 17, "Not Set", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[8], "default-bold-small") 
GUIEditor.label[9] = guiCreateLabel(154, 76, 333, 17, "Yes", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[9], "default-bold-small") 
GUIEditor.label[10] = guiCreateLabel(232, 93, 106, 16, "Help", false, GUIEditor.window[1]) 
GUIEditor.button[1] = guiCreateButton(186, 303, 145, 40, "START JOB", false, GUIEditor.window[1]) 
GUIEditor.tabpanel[1] = guiCreateTabPanel(61, 118, 387, 166, false, GUIEditor.window[1]) 
GUIEditor.tab[1] = guiCreateTab("Basic Help ", GUIEditor.tabpanel[1]) 
GUIEditor.label[11] = guiCreateLabel(10, 5, 367, 127, "Your job is to extract oil and deliver it to refiner machine. After that refine the oil and it will be automatically stored in tanks. After that collect your money ...", false, GUIEditor.tab[1]) 
guiLabelSetHorizontalAlign(GUIEditor.label[11], "left", true) 
GUIEditor.tab[2] = guiCreateTab("How to do job ?", GUIEditor.tabpanel[1]) 
GUIEditor.label[12] = guiCreateLabel(6, 7, 371, 125, "This is a complex job. Follow the steps to complete the job - 1. Turn on the electric generator. 2. Switch on the power supply for machines. 3. Wait until progress bar shows 100%. 4. Now take your vehicle to every oil drill. 5. Now unload all the oil. 6. Turn on refiner. 7. Wait until it is refined 8. Now collect the money.", false, GUIEditor.tab[2]) 
guiLabelSetHorizontalAlign(GUIEditor.label[12], "left", true) 
GUIEditor.tab[3] = guiCreateTab("Miscs.", GUIEditor.tabpanel[1]) 
GUIEditor.label[13] = guiCreateLabel(6, 5, 371, 127, "The more you work the more you will get exp. .... The more exp. you have the more you earn ....", false, GUIEditor.tab[3]) 
guiLabelSetHorizontalAlign(GUIEditor.label[13], "left", true) 
  
  
addEvent("GUIhelp", true) 
function guishow(player) 
guiSetVisible(GUIEditor.window[1], true) 
showCursor(true) 
end 
addEventHandler("GUIhelp",getRootElement(),guishow) 

server:

local marker = createMarker(2489,-1673,14, "cylinder", 1.5, 200, 150, 50, 150) 
  
function gui( hitElement ) 
if isPedInVehicle(hitElement) then return; end 
if getElementType( hitElement ) == "player" then 
triggerClientEvent(hitElement, "GUIhelp", hitElement) 
end 
end 
addEventHandler("onMarkerHit", root, gui) 

Edited by Guest
Link to comment
i edited your code check it. if it works.

make sure everything's right in meta.xml

it's because u had an extra comma in the end of the GUIEditor table.

client:

GUIEditor = { 
tab = {}, 
tabpanel = {}, 
label = {}, 
button = {} 
}  
GUIEditor.window[1] = guiCreateWindow(193, 147, 521, 353, "Oil Refinery - Job", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible(GUIEditor.window[1], false) 
guiSetProperty(GUIEditor.window[1], "CloseButton", true) 
GUIEditor.label[1] = guiCreateLabel(10, 42, 129, 17, "Job's Name", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[1], "default-small") 
GUIEditor.label[2] = guiCreateLabel(10, 59, 129, 17, "Income", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[2], "default-small") 
GUIEditor.label[3] = guiCreateLabel(10, 76, 129, 17, "Rental Vehicle", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[3], "default-small") 
GUIEditor.label[4] = guiCreateLabel(139, 42, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[5] = guiCreateLabel(139, 76, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[6] = guiCreateLabel(139, 59, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[7] = guiCreateLabel(154, 42, 333, 17, "Oil Refinery", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[7], "default-bold-small") 
GUIEditor.label[8] = guiCreateLabel(154, 59, 333, 17, "Not Set", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[8], "default-bold-small") 
GUIEditor.label[9] = guiCreateLabel(154, 76, 333, 17, "Yes", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[9], "default-bold-small") 
GUIEditor.label[10] = guiCreateLabel(232, 93, 106, 16, "Help", false, GUIEditor.window[1]) 
GUIEditor.button[1] = guiCreateButton(186, 303, 145, 40, "START JOB", false, GUIEditor.window[1]) 
GUIEditor.tabpanel[1] = guiCreateTabPanel(61, 118, 387, 166, false, GUIEditor.window[1]) 
GUIEditor.tab[1] = guiCreateTab("Basic Help ", GUIEditor.tabpanel[1]) 
GUIEditor.label[11] = guiCreateLabel(10, 5, 367, 127, "Your job is to extract oil and deliver it to refiner machine. After that refine the oil and it will be automatically stored in tanks. After that collect your money ...", false, GUIEditor.tab[1]) 
guiLabelSetHorizontalAlign(GUIEditor.label[11], "left", true) 
GUIEditor.tab[2] = guiCreateTab("How to do job ?", GUIEditor.tabpanel[1]) 
GUIEditor.label[12] = guiCreateLabel(6, 7, 371, 125, "This is a complex job. Follow the steps to complete the job - 1. Turn on the electric generator. 2. Switch on the power supply for machines. 3. Wait until progress bar shows 100%. 4. Now take your vehicle to every oil drill. 5. Now unload all the oil. 6. Turn on refiner. 7. Wait until it is refined 8. Now collect the money.", false, GUIEditor.tab[2]) 
guiLabelSetHorizontalAlign(GUIEditor.label[12], "left", true) 
GUIEditor.tab[3] = guiCreateTab("Miscs.", GUIEditor.tabpanel[1]) 
GUIEditor.label[13] = guiCreateLabel(6, 5, 371, 127, "The more you work the more you will get exp. .... The more exp. you have the more you earn ....", false, GUIEditor.tab[3]) 
guiLabelSetHorizontalAlign(GUIEditor.label[13], "left", true) 
  
  
addEvent("GUIhelp", true) 
function guishow(player) 
guiSetVisible(GUIEditor.window[1], true) 
showCursor(true) 
end 
addEventHandler("GUIhelp",getRootElement(),guishow) 

server:

local marker = createMarker(2489,-1673,14, "cylinder", 1.5, 200, 150, 50, 150) 
  
function gui( hitElement ) 
if isPedInVehicle(hitElement) then return; end 
if getElementType( hitElement ) == "player" then 
triggerClientEvent(hitElement, "GUIhelp", hitElement) 
end 
end 
addEventHandler("onMarkerHit", root, gui) 

my meta

Link to comment

u missed the window = {}, lol try this code now. client first code 2nd code server

Stuff u did wrong:

you missed 1 table item the window = {}

you put comma "," on the last item of the table. make sure to don't add commas in the last item of the table.

GUIEditor = { 
tab = {}, 
tabpanel = {}, 
label = {}, 
button = {}, 
window = {} 
} 
GUIEditor.window[1] = guiCreateWindow(193, 147, 521, 353, "Oil Refinery - Job", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible(GUIEditor.window[1], false) 
guiSetProperty(GUIEditor.window[1], "CloseButton", true) 
GUIEditor.label[1] = guiCreateLabel(10, 42, 129, 17, "Job's Name", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[1], "default-small") 
GUIEditor.label[2] = guiCreateLabel(10, 59, 129, 17, "Income", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[2], "default-small") 
GUIEditor.label[3] = guiCreateLabel(10, 76, 129, 17, "Rental Vehicle", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[3], "default-small") 
GUIEditor.label[4] = guiCreateLabel(139, 42, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[5] = guiCreateLabel(139, 76, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[6] = guiCreateLabel(139, 59, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[7] = guiCreateLabel(154, 42, 333, 17, "Oil Refinery", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[7], "default-bold-small") 
GUIEditor.label[8] = guiCreateLabel(154, 59, 333, 17, "Not Set", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[8], "default-bold-small") 
GUIEditor.label[9] = guiCreateLabel(154, 76, 333, 17, "Yes", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[9], "default-bold-small") 
GUIEditor.label[10] = guiCreateLabel(232, 93, 106, 16, "Help", false, GUIEditor.window[1]) 
GUIEditor.button[1] = guiCreateButton(186, 303, 145, 40, "START JOB", false, GUIEditor.window[1]) 
GUIEditor.tabpanel[1] = guiCreateTabPanel(61, 118, 387, 166, false, GUIEditor.window[1]) 
GUIEditor.tab[1] = guiCreateTab("Basic Help ", GUIEditor.tabpanel[1]) 
GUIEditor.label[11] = guiCreateLabel(10, 5, 367, 127, "Your job is to extract oil and deliver it to refiner machine. After that refine the oil and it will be automatically stored in tanks. After that collect your money ...", false, GUIEditor.tab[1]) 
guiLabelSetHorizontalAlign(GUIEditor.label[11], "left", true) 
GUIEditor.tab[2] = guiCreateTab("How to do job ?", GUIEditor.tabpanel[1]) 
GUIEditor.label[12] = guiCreateLabel(6, 7, 371, 125, "This is a complex job. Follow the steps to complete the job - 1. Turn on the electric generator. 2. Switch on the power supply for machines. 3. Wait until progress bar shows 100%. 4. Now take your vehicle to every oil drill. 5. Now unload all the oil. 6. Turn on refiner. 7. Wait until it is refined 8. Now collect the money.", false, GUIEditor.tab[2]) 
guiLabelSetHorizontalAlign(GUIEditor.label[12], "left", true) 
GUIEditor.tab[3] = guiCreateTab("Miscs.", GUIEditor.tabpanel[1]) 
GUIEditor.label[13] = guiCreateLabel(6, 5, 371, 127, "The more you work the more you will get exp. .... The more exp. you have the more you earn ....", false, GUIEditor.tab[3]) 
guiLabelSetHorizontalAlign(GUIEditor.label[13], "left", true) 
  
  
addEvent("GUIhelp", true) 
function guishow(player) 
guiSetVisible(GUIEditor.window[1], true) 
showCursor(true) 
end 
addEventHandler("GUIhelp",getRootElement(),guishow) 

local marker = createMarker(2489,-1673,14, "cylinder", 1.5, 200, 150, 50, 150) 
  
function gui( hitElement ) 
if isPedInVehicle(hitElement) then return; end 
if getElementType( hitElement ) == "player" then 
triggerClientEvent(hitElement, "GUIhelp", hitElement) 
end 
end 
addEventHandler("onMarkerHit", root, gui) 

Link to comment
u missed the window = {}, lol try this code now. client first code 2nd code server

Stuff u did wrong:

you missed 1 table item the window = {}

you put comma "," on the last item of the table. make sure to don't add commas in the last item of the table.

GUIEditor = { 
tab = {}, 
tabpanel = {}, 
label = {}, 
button = {}, 
window = {} 
} 
GUIEditor.window[1] = guiCreateWindow(193, 147, 521, 353, "Oil Refinery - Job", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible(GUIEditor.window[1], false) 
guiSetProperty(GUIEditor.window[1], "CloseButton", true) 
GUIEditor.label[1] = guiCreateLabel(10, 42, 129, 17, "Job's Name", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[1], "default-small") 
GUIEditor.label[2] = guiCreateLabel(10, 59, 129, 17, "Income", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[2], "default-small") 
GUIEditor.label[3] = guiCreateLabel(10, 76, 129, 17, "Rental Vehicle", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[3], "default-small") 
GUIEditor.label[4] = guiCreateLabel(139, 42, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[5] = guiCreateLabel(139, 76, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[6] = guiCreateLabel(139, 59, 15, 17, "-", false, GUIEditor.window[1]) 
GUIEditor.label[7] = guiCreateLabel(154, 42, 333, 17, "Oil Refinery", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[7], "default-bold-small") 
GUIEditor.label[8] = guiCreateLabel(154, 59, 333, 17, "Not Set", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[8], "default-bold-small") 
GUIEditor.label[9] = guiCreateLabel(154, 76, 333, 17, "Yes", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[9], "default-bold-small") 
GUIEditor.label[10] = guiCreateLabel(232, 93, 106, 16, "Help", false, GUIEditor.window[1]) 
GUIEditor.button[1] = guiCreateButton(186, 303, 145, 40, "START JOB", false, GUIEditor.window[1]) 
GUIEditor.tabpanel[1] = guiCreateTabPanel(61, 118, 387, 166, false, GUIEditor.window[1]) 
GUIEditor.tab[1] = guiCreateTab("Basic Help ", GUIEditor.tabpanel[1]) 
GUIEditor.label[11] = guiCreateLabel(10, 5, 367, 127, "Your job is to extract oil and deliver it to refiner machine. After that refine the oil and it will be automatically stored in tanks. After that collect your money ...", false, GUIEditor.tab[1]) 
guiLabelSetHorizontalAlign(GUIEditor.label[11], "left", true) 
GUIEditor.tab[2] = guiCreateTab("How to do job ?", GUIEditor.tabpanel[1]) 
GUIEditor.label[12] = guiCreateLabel(6, 7, 371, 125, "This is a complex job. Follow the steps to complete the job - 1. Turn on the electric generator. 2. Switch on the power supply for machines. 3. Wait until progress bar shows 100%. 4. Now take your vehicle to every oil drill. 5. Now unload all the oil. 6. Turn on refiner. 7. Wait until it is refined 8. Now collect the money.", false, GUIEditor.tab[2]) 
guiLabelSetHorizontalAlign(GUIEditor.label[12], "left", true) 
GUIEditor.tab[3] = guiCreateTab("Miscs.", GUIEditor.tabpanel[1]) 
GUIEditor.label[13] = guiCreateLabel(6, 5, 371, 127, "The more you work the more you will get exp. .... The more exp. you have the more you earn ....", false, GUIEditor.tab[3]) 
guiLabelSetHorizontalAlign(GUIEditor.label[13], "left", true) 
  
  
addEvent("GUIhelp", true) 
function guishow(player) 
guiSetVisible(GUIEditor.window[1], true) 
showCursor(true) 
end 
addEventHandler("GUIhelp",getRootElement(),guishow) 

local marker = createMarker(2489,-1673,14, "cylinder", 1.5, 200, 150, 50, 150) 
  
function gui( hitElement ) 
if isPedInVehicle(hitElement) then return; end 
if getElementType( hitElement ) == "player" then 
triggerClientEvent(hitElement, "GUIhelp", hitElement) 
end 
end 
addEventHandler("onMarkerHit", root, gui) 

Finally got it wroking .. thanks :D .. i am making an rpg server so every few minutes i will be asking something so sorry for disturbing !

Link to comment

np it's actually fun to help people , good thing you are learning. and trying something by yourself.

just learn , and you'll be fine , if you need anything search Wiki for what you need and try something by yourself, if you can't do it and made a code , post it here we will fix it for you.

https://wiki.multitheftauto.com/wiki/Sc ... troduction

learn some serverside / clientside functions.

https://wiki.multitheftauto.com/wiki/Se ... _Functions

https://wiki.multitheftauto.com/wiki/Cl ... _Functions

useful functions

https://wiki.multitheftauto.com/wiki/Useful_Functions

Link to comment
np it's actually fun to help people , good thing you are learning. and trying something by yourself.

Hey in that gui there is a start job button .. i want that if that button is pressed it changes the skin of player what to do ?

i am so sense of programming and i want to create a server , any tips ?

Link to comment
np it's actually fun to help people , good thing you are learning. and trying something by yourself.

just learn , and you'll be fine , if you need anything search Wiki for what you need and try something by yourself, if you can't do it and made a code , post it here we will fix it for you.

https://wiki.multitheftauto.com/wiki/Sc ... troduction

learn some serverside / clientside functions.

https://wiki.multitheftauto.com/wiki/Se ... _Functions

https://wiki.multitheftauto.com/wiki/Cl ... _Functions

useful functions

https://wiki.multitheftauto.com/wiki/Useful_Functions

Ok thanks ..

Link to comment
np it's actually fun to help people , good thing you are learning. and trying something by yourself.

just learn , and you'll be fine , if you need anything search Wiki for what you need and try something by yourself, if you can't do it and made a code , post it here we will fix it for you.

https://wiki.multitheftauto.com/wiki/Sc ... troduction

learn some serverside / clientside functions.

https://wiki.multitheftauto.com/wiki/Se ... _Functions

https://wiki.multitheftauto.com/wiki/Cl ... _Functions

useful functions

https://wiki.multitheftauto.com/wiki/Useful_Functions

One more thing in every gui we made there close button missing how to enable it ?

Link to comment

i don't see that you made a close button , i can only see a Start job button. you should've made a close button then?

you should make another button for the close option

addEventHandler("onClientGUIClick",resourceRoot,function() 
    if ( source == GUIEditor.button[1]) then 
           setElementModel(localPlayer, 285) 
           guiSetVisible(GUIEditor.window[1], false) 
           showCursor(false) 
       end 
   end ) 

here is example of when you click start job button changes your skin and closes GUI.

Edited by Guest
Link to comment
i don't see that you made a close button , i can only see a Start job button. you should've made a close button then?
addEventHandler("onClientGUIClick",resourceRoot,function() 
    if ( source == GUIEditor.button[1]) then 
           setElementModel(localPlayer, 285) 
           guiSetVisible(GUIEditor.window[1], false) 
           showCursor(false) 
       end 
   end ) 

here is example of when you click start job button changes your skin and closes GUI.

ok thanks i will try it later

one more question ...

Will you please become one admin my server ?

Link to comment
i don't see that you made a close button , i can only see a Start job button. you should've made a close button then?
addEventHandler("onClientGUIClick",resourceRoot,function() 
    if ( source == GUIEditor.button[1]) then 
           setElementModel(localPlayer, 285) 
           guiSetVisible(GUIEditor.window[1], false) 
           showCursor(false) 
       end 
   end ) 

here is example of when you click start job button changes your skin and closes GUI.

Now i can create close button .. i understood how to make it ! and even i can change the skin

Link to comment

if you want to add more functions to other buttons, don't add more events, just add an "elseif" for a shorter and a clean code and if you test scripts please use /debugscript 3 , it will show you errors if your script / is not working / not functioning properly. then tell us what the debugscript says.

addEventHandler("onClientGUIClick",resourceRoot,function() 
    if ( source == GUIEditor.button[1]) then 
           setElementModel(localPlayer, 285) 
           guiSetVisible(GUIEditor.window[1], false) 
           showCursor(false) 
   elseif ( source == buttonname) then 
           -- your stuff here -- 
       end 
   end ) 

we won't need mic , chat would do good. chat is easier and we can send codes easily. skype is not just for call , you can also chat there and send lua files.

Well i might wont be able to reply now since im going to sleep , didn't sleep since yesterday. good luck on your scripting and keep learning. don't hesitate to PM me on forums when you need help.

Link to comment
if you want to add more functions to other buttons, don't add more events, just add an "elseif" for a shorter and a clean code and if you test scripts please use /debugscript 3 , it will show you errors if your script / is not working / not functioning properly. then tell us what the debugscript says.
addEventHandler("onClientGUIClick",resourceRoot,function() 
    if ( source == GUIEditor.button[1]) then 
           setElementModel(localPlayer, 285) 
           guiSetVisible(GUIEditor.window[1], false) 
           showCursor(false) 
   elseif ( source == buttonname) then 
           -- your stuff here -- 
       end 
   end ) 

we won't need mic , chat would do good. chat is easier and we can send codes easily. skype is not just for call , you can also chat there and send lua files.

Well i might wont be able to reply now since im going to sleep , didn't sleep since yesterday. good luck on your scripting and keep learning. don't hesitate to PM me on forums when you need help.

Sure ....

Installing skype ... i used it long years back

Link to comment
if you want to add more functions to other buttons, don't add more events, just add an "elseif" for a shorter and a clean code and if you test scripts please use /debugscript 3 , it will show you errors if your script / is not working / not functioning properly. then tell us what the debugscript says.
addEventHandler("onClientGUIClick",resourceRoot,function() 
    if ( source == GUIEditor.button[1]) then 
           setElementModel(localPlayer, 285) 
           guiSetVisible(GUIEditor.window[1], false) 
           showCursor(false) 
   elseif ( source == buttonname) then 
           -- your stuff here -- 
       end 
   end ) 

we won't need mic , chat would do good. chat is easier and we can send codes easily. skype is not just for call , you can also chat there and send lua files.

Well i might wont be able to reply now since im going to sleep , didn't sleep since yesterday. good luck on your scripting and keep learning. don't hesitate to PM me on forums when you need help.

how to delete the whole topic now i am installing skype we will chat there !

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...