Jump to content

Dzsipszi

Members
  • Posts

    59
  • Joined

  • Last visited

Everything posted by Dzsipszi

  1. Someone tell me this script works phq1 = createObject ( 968, 1544.699, -1630.798, 13.100, 0, 88.9, 90 ) phq1col = createColCircle ( 1542.699, -1630.798, 13.100, 7 ) function openphq1(thePlayer) if getElementModel( thePlayer ) == 0 then moveObject (phq1, 968, 1544.699, -1630.798, 13.100, 0, 0, 90 ) end end addEventHandler( "onColShapeHit", phq1col, openphq1 ) function closephq1(thePlayer) if getElementModel( thePlayer ) == 0 then moveObject (phq1, 968, 1544.699, -1630.798, 13.100, 0, 88.9, 90 ) end end addEventHandler( "onColShapeLeave", phq1col, closephq1 ) Hmm, i think he is lie check this out: https://www.youtube.com/watch?v=-aWLZ2NyFeA
  2. What exactly are you planning to do (not just "a new gamemode", give more details). - I want a simple register/login panel gui with character selection/creator. You need to add these details in character creator GUI: name (ONLY RP NAMES!) like Firstname_Lastname then click next: Weight, height, age between 18-80 then click create. If you done correctly you select character and choose 2 different spawn place (arrived into city: Bus or Airplane). Accounts need to be saved into an XML file. NOT MYSQL! (I have mysql to if its the easy way) What do you already have (have you already started or does it have to be done from scratch). - I moved with nothing yet ahead actually (scratch) What do you expect the scripter that helps you to do (e.g. do you script yourself and only need someone for the GUI). - GUI, script If you are willing to pay for the work or not. - Yes, i pay for the scripter!
  3. Still nothing... but thank you for helping i try something else..
  4. [sound] -> inside enter.mp3 enter.lua meta.xml
  5. function enterVehicle ( player, seat, jacked ) local sound = playSound("sound/enter.mp3") setSoundVolume(sound, 0.5) end addEventHandler("onVehicleStartEnter", getRootElement(), enterVehicle ) still nothing..
  6. "Dzsipszi" type="script" description="Car-Sounds"/> but i fixed venter.mp3 to enter.mp3
  7. I wanna to play a sound when enter a vehicle. I write this script and it doesn't work.. function enterVehicle ( player, seat, jacked ) local sound = playSound("sound/venter.mp3") setSoundVolume(sound, 0.5) end addEventHandler("onVehicleStartEnter", getRootElement(), enterVehicle )
  8. Hello everyone! I need some help to this script, at the register function. When i start my server and the gui appears i click on register and it says: you need to register at http://www.xyz.com. (Line: 98) I wanna to when i click register another gui appears and i can register simple with a username and password. The username and password NEED to save to XML. Here is the script addEventHandler("accounts:login:request", getRootElement(), function () setElementDimension ( getLocalPlayer(), 1 ) setElementInterior( getLocalPlayer(), 0 ) setCameraMatrix( 837.90606689453, -2066.2963867188, 16.712882995605, 0, -10000, 0) fadeCamera(true) guiSetInputEnabled(true) clearChat() LoginScreen_openLoginScreen() end ); --[[ LoginScreen_openLoginScreen( ) - Open the login screen ]]-- local wLogin, lUsername, tUsername, lPassword, tPassword, chkRememberLogin, bLogin, bRegister, updateTimer = nil function LoginScreen_openLoginScreen() local width, height = guiGetScreenSize() --wLogin = guiCreateWindow(0,0, width, height, "valhallaGaming - MTA Roleplay server", true) wLogin = nil --guiWindowSetSizable(wLogin, false) --guiWindowSetMovable(wLogin, false) lUsername = guiCreateLabel(width /6, height /4, 100, 50, "Név:", false, wLogin) guiSetFont(lUsername, "default-bold-small") tUsername = guiCreateEdit(width /4, height /4, 100, 17, "Név", false, wLogin) guiSetFont(tUsername, "default-bold-small") guiEditSetMaxLength(tUsername, 32) addEventHandler("onClientGUIAccepted", tUsername, LoginScreen_validateLogin, false) lPassword = guiCreateLabel(width /6, height /3.5, 100, 50, "Jelszó:", false, wLogin) guiSetFont(lPassword, "default-bold-small") tPassword = guiCreateEdit(width /4, height /3.5, 100, 17, "Jelszó", false, wLogin) guiSetFont(tPassword, "default-bold-small") guiEditSetMasked(tPassword, true) guiEditSetMaxLength(tPassword, 64) addEventHandler("onClientGUIAccepted", tPassword, LoginScreen_validateLogin, false) chkRememberLogin = guiCreateCheckBox(width /5, height /3.2, 175, 17, "Jegyezzen meg", false, false, wLogin) guiSetFont(chkRememberLogin, "default-bold-small") bLogin = guiCreateButton(width /6, height /2.9, 75, 17, "Belép", false, wLogin) guiSetFont(bLogin, "default-bold-small") addEventHandler("onClientGUIClick", bLogin, LoginScreen_validateLogin, false) bRegister = guiCreateButton(width /4, height /2.9, 75, 17, "Regisztrál", false, wLogin) guiSetFont(bRegister, "default-bold-small") addEventHandler("onClientGUIClick", bRegister, LoginScreen_startRegister, false) guiSetText(tUsername, tostring( loadSavedData("username", "") )) local tHash = tostring( loadSavedData("hashcode", "") ) guiSetText(tPassword, tHash) if #tHash > 1 then guiCheckBoxSetSelected(chkRememberLogin, true) end addEventHandler( "onClientRender", getRootElement(), LoginScreen_RunFX ) updateTimer = setTimer(LoginScreen_RefreshIMG, 7500, 0) triggerEvent("accounts:options:settings:updated", getLocalPlayer()) end local screenX, screenY = guiGetScreenSize() local alphaAction = 3 local alphaStep = 50 local screenX, screenY = guiGetScreenSize() local alphaAction = 3 local alphaStep = 50 local totalslides = 6 local currentslide = math.random(1, totalslides) function LoginScreen_RunFX() dxDrawRectangle(0, 0, screenX, screenY, tocolor(0, 0, 0, 150), false) dxDrawText( "Köszöntünk a DAWGs RPG Szerverén!", screenX/2 - 300, screenY/10, 300, 200, tocolor ( 255, 255, 255, 255 ), 2, "default-bold" ) dxDrawText( "Kérjük jelentkezz be, hogy játszhass a szerveren", screenX/6, screenY/4.9, screenX, screenY, tocolor ( 255, 255, 255, 255 ), 1, "default-bold" ) alphaStep = alphaStep + alphaAction if (alphaStep > 200) or (alphaStep < 50) then alphaAction = alphaAction - alphaAction - alphaAction end -- Upper right dxDrawImage(screenX - 140, 10, 131, 120, "img/valhalla1.png", 0, 0, 0, tocolor(255, 255, 255, alphaStep), false) dxDrawText("Version "..scriptVersion, screenX - 130, 130, 20, 120, tocolor ( 255, 255, 255, 150 ), 1, "default-bold" ) -- Banner down dxDrawImage(startX, 500, 542, 214, "banners/".. tostring(currentslide) ..".png", 0, 0, 0, tocolor(255, 255, 255, 200), false) end function LoginScreen_RefreshIMG() currentslide = currentslide + 1 if currentslide > totalslides then currentslide = 1 end end function LoginScreen_startRegister() LoginScreen_showWarningMessage( "Please register at [url=http://www.dawgs.hu]http://www.dawgs.hu[/url]" ) end --[[ LoginScreen_closeLoginScreen() - Close the loginscreen ]] function LoginScreen_closeLoginScreen() destroyElement(lUsername) destroyElement(tUsername) destroyElement(lPassword) destroyElement(tPassword) destroyElement(chkRememberLogin) destroyElement(bLogin) destroyElement(bRegister) --destroyElement(wLogin) killTimer(updateTimer) removeEventHandler( "onClientRender", getRootElement(), LoginScreen_RunFX ) end --[[ LoginScreen_validateLogin() - Used to validate and send the contents of the login screen ]]-- function LoginScreen_validateLogin() local username = guiGetText(tUsername) local password = guiGetText(tPassword) guiSetText(tPassword, "") appendSavedData("hashcode", "") if (string.len(username)<3) then outputChatBox("A név nek legalább 3 karakter hosszúnak kell lennie", 255, 0, 0) else local saveInfo = guiCheckBoxGetSelected(chkRememberLogin) triggerServerEvent("accounts:login:attempt", getLocalPlayer(), username, password, saveInfo) if (saveInfo) then appendSavedData("username", tostring(username)) else appendSavedData("username", "") end end end local warningBox, warningMessage, warningOk = nil function LoginScreen_showWarningMessage( message ) if (isElement(warningBox)) then destroyElement(warningBox) end local x, y = guiGetScreenSize() warningBox = guiCreateWindow( x*.5-150, y*.5-65, 300, 120, "Figyelem!", false ) guiWindowSetSizable( warningBox, false ) warningMessage = guiCreateLabel( 40, 30, 220, 60, message, false, warningBox ) guiLabelSetHorizontalAlign( warningMessage, "center", true ) guiLabelSetVerticalAlign( warningMessage, "center" ) warningOk = guiCreateButton( 130, 90, 70, 20, "Ok", false, warningBox ) addEventHandler( "onClientGUIClick", warningOk, function() destroyElement(warningBox) end ) guiBringToFront( warningBox ) end addEventHandler("accounts:login:attempt", getRootElement(), function (statusCode, additionalData) if (statusCode == 0) then LoginScreen_closeLoginScreen() if (isElement(warningBox)) then destroyElement(warningBox) end -- Succesful login for _, theValue in ipairs(additionalData) do setElementData(getLocalPlayer(), theValue[1], theValue[2], false) end local newAccountHash = getElementData(getLocalPlayer(), "account:newAccountHash") appendSavedData("hashcode", newAccountHash or "") local characterList = getElementData(getLocalPlayer(), "account:characters") if #characterList == 0 then newCharacter_init() else Characters_showSelection() end elseif (statusCode > 0) and (statusCode < 5) then LoginScreen_showWarningMessage( additionalData ) elseif (statusCode == 5) then LoginScreen_showWarningMessage( additionalData ) -- TODO: show make app screen? end end ) Sorry for my bad English
×
×
  • Create New...