Jump to content

death666machine

Members
  • Posts

    16
  • Joined

  • Last visited

Details

  • Gang
    IDK

death666machine's Achievements

Square

Square (6/54)

0

Reputation

  1. ok will do. @dwane I agree, i just get tired of all the flaming when it is unneeded.
  2. I know I have no reputation here and may be speaking out of line but seriously people, stop with the whole i am better then you thing. He made the resource for people that don't know how to script well and to take his example and learn a thing or two or even make use of it. flaming each other and bickering back and forth is ridiculous and makes no sense, and no offense Kenix but it was rude of you to steal his ten seconds of fame, even if you where suggesting a better way of scripting his resource. If he wanted suggestions he would have asked. On topic: Nice script and thanks for the time and effort you put forth. I will defiantly make use of this resource =)
  3. i second that the tab panels do not work
  4. please stop flaming i just want ideas if you have any, if you dont then dont reply.
  5. Hey i wanna practice scripting but lack the creativeness to come up with somthing to script, so i am open to all ideas. if i like your idea i will release to the community when i have finished.
  6. it was a good idea but he canceled because he got to busy
  7. ok so i am renting a server and whenever i upload a resource to the fast dl it gives me a crc error. dose anyone know how to fix this? i would ask my host but he dos not know either.
  8. So I am thinking about replacing the gta map with raccoon city for a zombie rp gamemode but i figured i would get peoples opinion on it before i did.
  9. ok thanks ffs sorry kinda a noob at this stuff for now
  10. If you don't mind me asking why did you use 20000, and what is model id 8192
  11. lol rpg file. making a server is soooo easy. not! learn to script then script the rpg gamemode.
  12. thanks so much it works now +rep
  13. well i made this script with the help of comunity resources and the wiki but the login and register buttons wont work. Client script local localPlayer = getLocalPlayer() local playerName = getPlayerName(localPlayer) function loginWindow() GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Image[1] = guiCreateStaticImage(0,0,1,1,"images/LoginBack.png",true) GUIEditor_Image[2] = guiCreateStaticImage(.2,.1,.6,.4,"images/Logo.png",true,GUIEditor_Image[1]) GUIEditor_Edit[1] = guiCreateEdit(.2,.7,.2,.05,"",true,GUIEditor_Image[1]) guiEditSetMaxLength(GUIEditor_Edit[1],25) GUIEditor_Edit[2] = guiCreateEdit(.6,.7,.2,.05,"",true,GUIEditor_Image[1]) guiEditSetMasked(GUIEditor_Edit[2],true) guiEditSetMaxLength(GUIEditor_Edit[2],25) GUIEditor_Label[1] = guiCreateLabel(.2,.6,.2,.1,"Username:",true,GUIEditor_Image[1]) guiLabelSetColor(GUIEditor_Label[1],0,0,255) guiSetFont(GUIEditor_Label[1],"sa-gothic") GUIEditor_Label[2] = guiCreateLabel(.6,.6,.2,.1,"Password:",true,GUIEditor_Image[1]) guiLabelSetColor(GUIEditor_Label[2],0,0,255) guiSetFont(GUIEditor_Label[2],"sa-gothic") GUIEditor_Button[1] = guiCreateButton(.825,.1,.1,.1,"Guest",true,GUIEditor_Image[1]) guiSetFont(GUIEditor_Button[1],"sa-header") GUIEditor_Button[2] = guiCreateButton(.45,.7,.1,.1,"Login",true,GUIEditor_Image[1]) guiSetFont(GUIEditor_Button[2],"default-bold-small") GUIEditor_Button[3] = guiCreateButton(.45,.85,.1,.1,"Register",true,GUIEditor_Image[1]) guiSetFont(GUIEditor_Button[3],"default-bold-small") guiSetVisible(GUIEditor_Image[1], false) addEventHandler("onClientGUIClick", GUIEditor_Button[1], submitGuest, false) addEventHandler("onClientGUIClick", GUIEditor_Button[2], submitLogin, false) addEventHandler("onClientGUIClick", GUIEditor_Button[3], submitRegister, false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () loginWindow() if (GUIEditor_Image[1] ~= nil) then guiSetVisible(GUIEditor_Image[1], true) else outputChatBox("An unexpected error has occurred and the log in GUI has not been created. Please reconnect and try again.") end showCursor(true) guiSetInputEnabled(true) end ) function submitGuest(button,state) if button == "left" and state == "up" then guiSetInputEnabled(false) guiSetVisible(GUIEditor_Image[1], false) showCursor(false) outputChatBox("You are playing as a guest please register.") end end function submitLogin(button,state) if button == "left" and state == "up" then local username = guiGetText(username) local password = guiGetText(password) if username and password then triggerServerEvent("submitLogin", getRootElement(), localPlayer, username, password) end end end function submitRegister(button,state) if button == "left" and state == "up" then local username = guiGetText(username) local password = guiGetText(password) if username and password then triggerServerEvent("submitRegister", getRootElement(), localPlayer, username, password) end end end function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(GUIEditor_Image[1], false) showCursor(false) end function unknownError() outputChatBox("Error 1: Please reconnect and try again.") end function loginWrong() outputChatBox("Error 2: Wrong username/password") end function registerTaken() outputChatBox("Error 3: This name is already taken.") end addEvent("hideLoginWindow", true) addEvent("unknownError", true) addEvent("loginWrong", true) addEvent("registerTaken", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) addEventHandler("unknownError", getRootElement(), unknownError) addEventHandler("loginWrong", getRootElement(), loginWrong) addEventHandler("registerTaken", getRootElement(), registerTaken) Server Script function loginHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then if (logIn(player, account, password) == true) then triggerClientEvent (player, "hideLoginWindow", getRootElement()) else triggerClientEvent (player, "unknownError", getRootElement()) end else triggerClientEvent (player, "loginWrong", getRootElement()) end end function registerHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then triggerClientEvent(player, "registerTaken", getRootElement()) else account = addAccount(username, password) if (logIn(player, account, password) == true) then triggerClientEvent(player, "hideLoginWindow", getRootElement()) else triggerClientEvent(player, "unknownError", getRootElement()) end end end addEvent("submitLogin", true) addEvent("submitRegister", true) addEventHandler("submitLogin", getRootElement(), loginHandler) addEventHandler("submitRegister", getRootElement(), registerHandler) Any help would be appreciated. Thanks
×
×
  • Create New...