Jump to content

StateSway

Members
  • Posts

    5
  • Joined

  • Last visited

StateSway's Achievements

Vic

Vic (3/54)

0

Reputation

  1. Alright i have understood how make the panel but how to make a data ? well if there is a tutorial or anyscript that has a login panel with an example with this can you just give me it ? and what does that line means ? if username == "user" and password == "apple" then apple ? Thx Castillo
  2. Well, i just want someone to give me some functions wish i should use to make a login panel and how to get if player if it's his first time to login ? i don't need any codes just if someone can give me a list with the functions wish i should use
  3. Well, the marker is showed and when i hit the marker the gui shows up but when i click on "get job" Button it only destroy the gui without making the following fuctions addEvent("Get.job", true) addEventHandler("Get.job", root, function(thePlayer) if getTeamName(getPlayerTeam(thePlayer)) == "Police" then exports["guimessages"]:outputServer(root, "Error: You are already working as a police", 255, 0, 0) else exports["guimessages"]:outputServer(root, "You are now working as a police", 0, 0, 255) setPlayerTeam(thePlayer, Policeteam) setPlayerNametagColor(thePlayer, 100, 149, 237) setElementModel(thePlayer, 280) giveWeapon(thePlayer, 3) end end ) Thanks, for the help Edit: Just a question is it good for my first script i have ever made ?
  4. Well, I made a script wich was working without gui when i made the gui i was needed to make some events and trigger them and i am begginer with this things Server.lua local theMarker1 = createMarker ( 1542.35608, -1682.45471, 12.55434, "cylinder", 2, 0, 0, 255, 150 ) function createPoliceTeam () Policeteam = createTeam ("Police", 100, 149, 237) end addEventHandler ("onResourceStart", resourceRoot, createPoliceTeam) function joinTeam(thePlayer) if (getTeamName(getPlayerTeam(thePlayer)) == "Police" or getTeamName(getPlayerTeam(thePlayer)) == "Police") then exports ["guimessages"] : outputServer (root, "Error: You are already working as a police" , 255, 0, 0) else exports ["guimessages"] : outputServer (root, "You are now working as a police" , 0, 0, 255) setPlayerTeam(thePlayer,Policeteam) setPlayerNametagColor ( thePlayer, 100, 149, 237 ) setElementModel(thePlayer, 280) giveWeapon (thePlayer, 3 ) end end addEvent("Get.job", true) addEventHandler("Get.job", getRootElement(), joinTeam) funtion showgui() triggerClientEvent ( "onShowgui", getRootElement() ) end addEventHandler( "onMarkerHit", theMarker1, showgui ) Client.lua local player = getLocalPlayer () ~~~~~~~~GUI~~~~~~~~~ Window = guiCreateWindow(544,186,456,422,"Police test",false) Getjob = guiCreateButton(34,283,145,92,"Get job",false,Window) Cancel = guiCreateButton(247,287,144,85,"Cancel",false,Window) Label = guiCreateLabel(69,46,321,206,"Test",false,Window) ~~~~~~~~JobButton~~~~~~~ function getjob() triggerServerEvent("Get.job", player) guiSetVisible(Window, false) end addEventHandler ( "onClientGUIClick", Getjob, getjob, false ) ~~~~~~~Show~~~~~~~~~~~ function showgui1() guiSetVisible(Window, true) showCursor(true) end addEvent ( "onShowgui", true ) addEventHandler ( "onShowgui", getRootElement(), showgui1 ) Well, I will be glad if someone Fixed me it, Thanks
×
×
  • Create New...