Jump to content

GUI Advanced


iFoReX

Recommended Posts

Posted

I don't understand what do you mean, please explain yourself better.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Oh, I understand, and you're asking for help or you want us to do it for you? because I think you want the second.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

This is my GUI but I need help :D

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Progress = {} 
  
GUIEditor_Window[1] = guiCreateWindow(100,191,363,551,"GUI Sistema de Warping de Casas",false) 
GUIEditor_Button[1] = guiCreateButton(11,75,228,44,"Warp a mi Primera Casa",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[1],"default-bold-small") 
GUIEditor_Button[2] = guiCreateButton(11,123,228,44,"Warp a mi Segunda Casa",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[2],"default-bold-small") 
GUIEditor_Button[3] = guiCreateButton(11,169,228,44,"Warp a mi Tercera Casa",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[3],"default-bold-small") 
GUIEditor_Button[4] = guiCreateButton(11,216,228,44,"Warp a mi Cuarta Casa",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[4],"default-bold-small") 
GUIEditor_Button[5] = guiCreateButton(11,265,228,44,"Warp a mi Quinta Casa",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[5],"default-bold-small") 
GUIEditor_Button[6] = guiCreateButton(11,314,228,44,"Warp a mi Sexta Casa",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[6],"default-bold-small") 
GUIEditor_Button[7] = guiCreateButton(12,361,228,44,"Warp a mi Septima Casa",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[7],"default-bold-small") 
GUIEditor_Button[8] = guiCreateButton(12,409,228,44,"Warp a mi Octava Casa",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[8],"default-bold-small") 
GUIEditor_Button[9] = guiCreateButton(12,457,228,44,"Warp a mi Novena Casa",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[9],"default-bold-small") 
GUIEditor_Label[1] = guiCreateLabel(15,514,339,30,"GUI Creada por ElMota (c) 2012",false,GUIEditor_Window[1]) 
guiLabelSetColor(GUIEditor_Label[1],200, 200, 0) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Progress[1] = guiCreateProgressBar(272,71,29,436,false,GUIEditor_Window[1]) 
  
  
  
  

:P

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted

No, you don't need help, you want us to do it for you, do you think with creating the interface it'll magically work?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Sometimes Solid can be a kind of rude, but he is right maybe he want to get the full script. Try making the player teleport to a interior when he clicka a button

Posted (edited)

Create a button client side

add onClientGuiClick handler to the button

make a function which triggers the server or client event for teleporting.

Done!

Edited by Guest
Posted
Create a button server side

add onClientGuiClick handler to the button

make a function which triggers the server or client event for teleporting.

Done!

GUI is client side only, how will he create a button server side?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Something like this?

Client:

  
addEventHandler("onClientGuiClick", someButton, --Change someButton to your button.. 
function () 
triggerServerEvent("iWannaTeleportNow", getLocalPlayer()) 
end) 

Server:

  
addEvent("iWannaTeleportNow", true) 
addEventHandler("iWannaTeleportNow", getRootElement(), 
function () 
setElementPosition(source, posX, posY, posZ ) --Edit 
outputChatBox("Player " .. getPlayerName(source) .. " teleported!") 
end) 

It should work, you have to edit it a little bit, but you might get the idea.

Lua Scripter

?ucet=miki_cz

Owner of mshost.cz MTA portal.

Posted
Create a button server side

add onClientGuiClick handler to the button

make a function which triggers the server or client event for teleporting.

Done!

GUI is client side only, how will he create a button server side?

I was in rush, didn't saw what am I typing.

MIKI785

setElementPosition 
outputChatBox 

can be used client side also, no need for triggers actually..

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