Haze Posted September 10, 2011 Posted September 10, 2011 Hello EveryOne Today i Have this script and i Try to Make The Words on the OutputChatBox Look On Small GUI Announce I use a lot of Commands and Functions but it didnt Work i dont Know why Im going to Post the Code Plz Help me to Make the Words on OutputChatBox Look Us GUI Text And Thank you local vehicle1 =createVehicle ( 520, 302.74, 1818.85, 17.64) ArmyVehicles ={[vehicle1]=true} ArmyTeam = { ["Army"]=true } function ArmyenterVehicle ( player, seat, jacked ) local team = getPlayerTeam(player) if ( ArmyVehicles[source] ) and ( not ArmyTeam[getTeamName ( team )] ) then cancelEvent() outputChatBox ( "You aren't an Army Member , you mayn't drive this.", player ) --and tell the player why end end addEventHandler ( "onVehicleStartEnter", getRootElement(), ArmyenterVehicle ) Ingame nick: FWC>Haze Server I play: FWCentral Job: FWCentral Developer Website: fwcentral.net
Jaysds1 Posted September 10, 2011 Posted September 10, 2011 so instead of outputing it to the Chat box, you want it to be in a GUI Text with no gui showing? My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
bandi94 Posted September 10, 2011 Posted September 10, 2011 guiCreateWindow guiCreateMemo guiMemoSetReadOnly guiCreateButton showCursor guiSetVisible "onClientGUIClick" Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
Haze Posted September 10, 2011 Author Posted September 10, 2011 Yeh instead of outPutChatBox i want it Us GUI Text Ingame nick: FWC>Haze Server I play: FWCentral Job: FWCentral Developer Website: fwcentral.net
Jaysds1 Posted September 10, 2011 Posted September 10, 2011 use: guiCreateLabel( float x, float y, float width, float height, "You aren't an Army Member , you mayn't drive this.", bool relative) this is how it should look: local vehicle1 =createVehicle ( 520, 302.74, 1818.85, 17.64) ArmyVehicles ={[vehicle1]=true} ArmyTeam = { ["Army"]=true } function ArmyenterVehicle ( player, seat, jacked ) local team = getPlayerTeam(player) if ( ArmyVehicles[source] ) and ( not ArmyTeam[getTeamName ( team )] ) then cancelEvent() guiCreateLabel( float x, float y, float width, float height, "You aren't an Army Member , you mayn't drive this.", bool relative) --and tell the player why end end addEventHandler ( "onVehicleStartEnter", getRootElement(), ArmyenterVehicle ) My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Haze Posted September 10, 2011 Author Posted September 10, 2011 Thank u Ingame nick: FWC>Haze Server I play: FWCentral Job: FWCentral Developer Website: fwcentral.net
Jaysds1 Posted September 10, 2011 Posted September 10, 2011 np (your welcome) My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Haze Posted September 10, 2011 Author Posted September 10, 2011 HI ALL I TRY TO MAKE THIS ONE GUI THINK And its not working the An For Hydra in GUI its not working local vehicle1 =createVehicle ( 520, 302.74, 1818.85, 17.64) ArmyVehicles ={[vehicle1]=true} ArmyTeam = { ["Army"]=true } function ArmyenterVehicle ( player, seat, jacked ) local team = getPlayerTeam(player) if ( ArmyVehicles[source] ) and ( not ArmyTeam[getTeamName ( team )] ) then cancelEvent() guiCreateLabel( 402, 271, 255, 47, "You aren't an Army Member , you mayn't drive this.", false) --and tell the player why end end addEventHandler ( "onVehicleStartEnter", getRootElement(), ArmyenterVehicle ) Ingame nick: FWC>Haze Server I play: FWCentral Job: FWCentral Developer Website: fwcentral.net
Castillo Posted September 10, 2011 Posted September 10, 2011 Firstly, use the LUA tags. Second, guiCreateLabel is client side ONLY, and your event handler is server side, so, you need a event triggered to client. -- server side local vehicle1 =createVehicle ( 520, 302.74, 1818.85, 17.64) ArmyVehicles ={[vehicle1]=true} ArmyTeam = { ["Army"]=true } function ArmyenterVehicle ( player, seat, jacked ) local team = getPlayerTeam(player) if ( ArmyVehicles[source] ) and ( not ArmyTeam[getTeamName ( team )] ) then triggerClientEvent(player,"showErrorLabel",player) cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), ArmyenterVehicle ) -- client side addEvent("showErrorLabel",true) addEventHandler("showErrorLabel",root, function () if errorLabel then destroyElement(errorLabel) end errorLabel = guiCreateLabel( 402, 271, 255, 47, "You aren't an Army Member , you mayn't drive this.", false) end) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Benevolence Posted September 10, 2011 Posted September 10, 2011 Haze use [ lua]code[/lua] not [ code]code[/code] Can other people connect to your server? Use this tool to check: http://nightly.mtasa.com/ports/ Formerly known as Tank07.
JR10 Posted September 10, 2011 Posted September 10, 2011 Kinda like exactly what Cast said, right? No need for useless posts. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Haze Posted September 10, 2011 Author Posted September 10, 2011 Thank everyone and this Forum is Really Good If i have Problem i will always ask for your Help And Ty For LUA i will Use the LUA Tags Next Ingame nick: FWC>Haze Server I play: FWCentral Job: FWCentral Developer Website: fwcentral.net
Haze Posted September 10, 2011 Author Posted September 10, 2011 Hey Solide The im going to Set Timer for Script its Clinet or Server Side Ingame nick: FWC>Haze Server I play: FWCentral Job: FWCentral Developer Website: fwcentral.net
Castillo Posted September 10, 2011 Posted September 10, 2011 What? the one which says client side has to be type="client" in meta.xml, and the one which says server side has to be type="server". San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Haze Posted September 10, 2011 Author Posted September 10, 2011 no dud i just asked u about SetTimer Function is it A Client or Server dud Ingame nick: FWC>Haze Server I play: FWCentral Job: FWCentral Developer Website: fwcentral.net
Castillo Posted September 10, 2011 Posted September 10, 2011 setTimer can be used in client and server side, if you would take a look in the wiki before asking, it's very understable. https://wiki.multitheftauto.com/wiki/SetTimer Says: Client And Server function. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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