tootao123 Posted January 26, 2010 Share Posted January 26, 2010 please help me how i can put password in team? Link to comment
tootao123 Posted January 26, 2010 Author Share Posted January 26, 2010 please help me how i can put password in team? Link to comment
tootao123 Posted January 26, 2010 Author Share Posted January 26, 2010 i put this code work and not spawn addEventHandler( 'onClientGUIClick', button_Open, function() if guiGetText( passwordEditField ) == 'somePassword' then triggerServerEvent( 'openDoor', getLocalPlayer() ); --open your door if password is correct else outputChatBox( 'Incorrect password' ); end; end , false ); ? Link to comment
tootao123 Posted January 26, 2010 Author Share Posted January 26, 2010 i put this code work and not spawn addEventHandler( 'onClientGUIClick', button_Open, function() if guiGetText( passwordEditField ) == 'somePassword' then triggerServerEvent( 'openDoor', getLocalPlayer() ); --open your door if password is correct else outputChatBox( 'Incorrect password' ); end; end , false ); ? Link to comment
zorrigas Posted January 26, 2010 Share Posted January 26, 2010 That is 1% of the script, missing functions. Link to comment
zorrigas Posted January 26, 2010 Share Posted January 26, 2010 That is 1% of the script, missing functions. Link to comment
Xierra Posted January 27, 2010 Share Posted January 27, 2010 Well, I guess you can use the SpawnPlayer function if the password is correct. (Tips: use [lua][/lua] if you want to put codes) Link to comment
Xierra Posted January 27, 2010 Share Posted January 27, 2010 Well, I guess you can use the SpawnPlayer function if the password is correct. (Tips: use [lua][/lua] if you want to put codes) Link to comment
tootao123 Posted January 27, 2010 Author Share Posted January 27, 2010 i not see the if the password is correct add my msn [email protected] or make this : if teamSelection == "Tunestars" then setPlayerTeam ( source, teamTune ) local x,y,z x = -1952 y = 280 z = 35 spawnPlayer ( source, x,y,z ) fadeCamera(source, true) giveWeapon ( source, 1, 1 ) giveWeapon ( source, 4, 1 ) giveWeapon ( source, 24, 500 ) giveWeapon ( source, 28, 500 ) giveWeapon ( source, 31, 500 ) giveWeapon ( source, 41, 1000 ) giveWeapon ( source, 39, 50 ) setElementHealth ( source, 100 ) setPlayerNametagColor ( source, 0,100,255 ) setPedSkin ( source, math.random(46,48) ) setPedArmor ( source, 100 ) playSoundFrontEnd ( source, 45 ) setTime ( hour, mins+1 ) end Link to comment
tootao123 Posted January 27, 2010 Author Share Posted January 27, 2010 i not see the if the password is correct add my msn [email protected] or make this : if teamSelection == "Tunestars" then setPlayerTeam ( source, teamTune ) local x,y,z x = -1952 y = 280 z = 35 spawnPlayer ( source, x,y,z ) fadeCamera(source, true) giveWeapon ( source, 1, 1 ) giveWeapon ( source, 4, 1 ) giveWeapon ( source, 24, 500 ) giveWeapon ( source, 28, 500 ) giveWeapon ( source, 31, 500 ) giveWeapon ( source, 41, 1000 ) giveWeapon ( source, 39, 50 ) setElementHealth ( source, 100 ) setPlayerNametagColor ( source, 0,100,255 ) setPedSkin ( source, math.random(46,48) ) setPedArmor ( source, 100 ) playSoundFrontEnd ( source, 45 ) setTime ( hour, mins+1 )end Link to comment
tootao123 Posted January 29, 2010 Author Share Posted January 29, 2010 help me pleaseee Link to comment
`Dmz Posted January 29, 2010 Share Posted January 29, 2010 I don't understand your script and you haven't told us how it must work so I edited it by my self. Server-side teamTune = createTeam("Tunestars",r,g,b) -- edit this function tuneTeam () setPlayerTeam ( source, teamTune ) local x,y,z local x = -1952 local y = 280 local z = 35 spawnPlayer ( source, x,y,z ) fadeCamera(source, true) giveWeapon ( source, 1, 1 ) giveWeapon ( source, 4, 1 ) giveWeapon ( source, 24, 500 ) giveWeapon ( source, 28, 500 ) giveWeapon ( source, 31, 500 ) giveWeapon ( source, 41, 1000 ) giveWeapon ( source, 39, 50 ) setElementHealth ( source, 100 ) setPlayerNametagColor ( source, 0,100,255 ) setPedSkin ( source, math.random(46,48) ) setPedArmor ( source, 100 ) playSoundFrontEnd ( source, 45 ) setTime ( hour, mins+1 ) end addEvent("setTeamTune", true) addEventHandler("setTeamTune", getRootElement(), tuneTeam) Client-side function teamWithPassword() -- create some gui elements window, button and edit window addEventHandler("onClientGUIClick", submitButton, function () local elText = guiGetText(edit_label) if (elText == "passwordForTuneTeam") then triggerServerEvent("setTeamTune", getLocalPlayer()) else outputChatBox("The password is incorrect") end end) Link to comment
Wisin Posted January 29, 2010 Share Posted January 29, 2010 well im gonna show u how must work this, client-side if campos =="Tunestars" then guiSetText(weapon1,"Weapons:") guiSetText(weapon2,"Brass Knuckles") guiSetText(weapon3,"Knife") guiSetText(weapon4,"Deagle") guiSetText(weapon5,"Uzi") guiSetText(weapon6,"M4") guiSetText(weapon7,"Spraycan") guiSetText(weapon8,"Stachel Charges") guiSetText(weapon9,"") guiSetText(info,"") setTimer ( guiStaticImageLoadImage, 500, 1, picture, "skins/tune.png" ) theta = rad(50) distance = 20 x,y,z = 2201.7375488281, 1392.9350585938, 10.8203125 end server-side if teamSelection == "Tunestars" then setPlayerTeam ( source, teamTune ) local x,y,z x = 2201.7375488281 y = 1392.9350585938 z = 10.8203125 spawnPlayer ( source, x,y,z ) fadeCamera(source, true) giveWeapon ( source, 1, 1 ) giveWeapon ( source, 4, 1 ) giveWeapon ( source, 24, 500 ) giveWeapon ( source, 28, 500 ) giveWeapon ( source, 31, 500 ) giveWeapon ( source, 41, 1000 ) setElementHealth ( source, 100 ) setPlayerNametagColor ( source, 0,100,255 ) setPedSkin ( source, math.random(46,48) ) playSoundFrontEnd ( source, 45 ) setTime ( hour, mins+1 ) end this is on scoreboard teamTune = createTeam ( "Tunestars", 255,255,15 ) local teams = { "Tunestars", if im right this must be. Link to comment
tootao Posted January 29, 2010 Share Posted January 29, 2010 if i'm right is this : if teamSelection == "Tunestars" then teamTune = createTeam("Tunestars",r,g,b) -- edit this function tuneTeam () setPlayerTeam ( source, teamTune ) local x,y,z local x = -1952 local y = 280 local z = 35 spawnPlayer ( source, x,y,z ) fadeCamera(source, true) giveWeapon ( source, 1, 1 ) giveWeapon ( source, 4, 1 ) giveWeapon ( source, 24, 500 ) giveWeapon ( source, 28, 500 ) giveWeapon ( source, 31, 500 ) giveWeapon ( source, 41, 1000 ) giveWeapon ( source, 39, 50 ) setElementHealth ( source, 100 ) setPlayerNametagColor ( source, 0,100,255 ) setPedSkin ( source, math.random(46,48) ) setPedArmor ( source, 100 ) playSoundFrontEnd ( source, 45 ) setTime ( hour, mins+1 ) end the team for put and spawn ? Link to comment
tootao123 Posted January 30, 2010 Author Share Posted January 30, 2010 not work i put in teams.lua and not work when i start server appear incorrect value addEventHandler' if teamSelection == "Tunestars" then setPlayerTeam ( source, teamTune ) local x,y,z x = -1952 y = 280 z = 35 spawnPlayer ( source, x,y,z ) fadeCamera(source, true) giveWeapon ( source, 1, 1 ) giveWeapon ( source, 4, 1 ) giveWeapon ( source, 24, 500 ) giveWeapon ( source, 28, 500 ) giveWeapon ( source, 31, 500 ) giveWeapon ( source, 41, 1000 ) giveWeapon ( source, 39, 50 ) setElementHealth ( source, 100 ) setPlayerNametagColor ( source, 0,100,255 ) setPedSkin ( source, math.random(46,48) ) setPedArmor ( source, 100 ) playSoundFrontEnd ( source, 45 ) setTime ( hour, mins+1 ) end function teamWithPassword() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(330,248,179,63,"Password",false) guiWindowSetMovable(GUIEditor_Window[1],false) GUIEditor_Edit[1] = guiCreateEdit(9,25,133,27,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(145,24,23,27,"GO",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,-133,26,63,"",false,GUIEditor_Window[1]) addEventHandler("onClientGUIClick", submitButton, function () local elText = guiGetText(edit_label) if (elText == "passwordfortuneteam") then triggerServerEvent("setTeamTune", getLocalPlayer()) else outputChatBox("The password is incorrect") end Link to comment
`Dmz Posted January 31, 2010 Share Posted January 31, 2010 Get attention where i posted script and i wrote that the script is server side and client side. And make them in two different lua files and make them client side and server side in meta.xml file. Like this <meta> <info author="Someguy" description="Counterstrike remake" type="gamemode" /> <script src="buymenu.lua" type="client" /> <script src="server.lua" type="server" /> </meta> Link to comment
tootao123 Posted February 1, 2010 Author Share Posted February 1, 2010 not work you can add my msn : [email protected] or post the files for me donwload please? Link to comment
Wisin Posted February 1, 2010 Share Posted February 1, 2010 Hi guys, i see someone its doing big problems here that part its a part of a game mode so if u dont have the other parts the game mode wont work i already tested this client-side and server-side alone and wont work, i also tested to make that on the game mode and it dont gives any warning or error but it wont work the gui dont shows. Link to comment
`Dmz Posted February 2, 2010 Share Posted February 2, 2010 Do you all have readed my client side script. In one comment I wrote that you nee to create some gui elements by yourself. So how you can see the gui window that is not created? Link to comment
tootao123 Posted February 2, 2010 Author Share Posted February 2, 2010 please send link for me donwload Link to comment
Wisin Posted February 3, 2010 Share Posted February 3, 2010 cmon u think we are idiots i created all the needed gui things and wont work dude somthing its wrong there. Link to comment
`Dmz Posted February 3, 2010 Share Posted February 3, 2010 cmon u think we are idiots i created all the needed gui things and wont work dude somthing its wrong there. You've used guiSetVisible function? Link to comment
Wisin Posted February 4, 2010 Share Posted February 4, 2010 no i dint, how should i use it and in what part of code? Link to comment
`Dmz Posted February 4, 2010 Share Posted February 4, 2010 no i dint, how should i use it and in what part of code? It depends when you want to gui window set visible for client. And if you don't know how to use this function read about it in mtasa wiki page.https://wiki.multitheftauto.com/wiki/GuiSetVisible Link to comment
Wisin Posted February 4, 2010 Share Posted February 4, 2010 i dont get it working i tested it yesterday all time and cant get it working. any help Link to comment
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