murilo2929
Members-
Posts
151 -
Joined
-
Last visited
Everything posted by murilo2929
-
unction open_log_reg_pannel() if not(isElement(wdwLogin_Pannel)) then fadeCamera(false) local sounds = {".mp3 format", ".mp3 format"} local sound = 1 local bgMusic = playSound ( ".mp3 format", true ) if sound == 1 then setSoundVolume(bgMusic, 1) else setSoundVolume(bgMusic, 0.7) end setElementData(localPlayer, "bgMusic", bgMusic ) showChat(false) showCursor(true) guiSetInputEnabled(true) local Width,Height = 350,350 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) Image = guiCreateStaticImage( 0, 0, 1920, 1200, "/login-panel/login_bg.jpeg", false ) guiSetEnabled (Image, false) Login_img = guiCreateStaticImage( X, Y + 120, 350, 350, "/login-panel/login_window.png", false ) guiSetEnabled (Login_img, false) --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! bLogin = guiCreateStaticImage( X + 23, Y + 349, 301, 44, "/login-panel/login.png", false ) addEventHandler("onClientGUIClick",bLogin,onClickBtnLogin) addEventHandler( "onClientMouseEnter",bLogin,LoginSH) addEventHandler("onClientMouseLeave",bLogin,SErem) tUsername = guiCreateEdit(X + 20,Y + 220,310,35,"",false) tPassword = guiCreateEdit(X + 20,Y + 295,310,35,"",false) guiEditSetMaxLength ( tUsername,25) guiEditSetMaxLength ( tPassword,25) guiEditSetMasked ( tPassword, true ) guiSetProperty( tPassword, 'MaskCodepoint', '8226' ) addEventHandler("onClientGUIChanged", tUsername, resetLogButtons) addEventHandler("onClientGUIChanged", tPassword, resetLogButtons) addEventHandler( "onClientGUIAccepted", tUsername, startLoggingIn) addEventHandler( "onClientGUIAccepted", tPassword, startLoggingIn) lbl_about_legth = guiCreateLabel(142,42,184,18,"",false) guiLabelSetColor(lbl_about_legth,253,255,68) guiLabelSetVerticalAlign(lbl_about_legth,"center") guiLabelSetHorizontalAlign(lbl_about_legth,"center",false) checkbox_save = guiCreateCheckBox(X + 230,Y + 275,100,20,"(Me lembre!)",false,false) guiSetFont(checkbox_save,"default-small") login_tab_error_msg = guiCreateLabel(X,Y + 325,364,31,"Error_login_tab",false) guiLabelSetColor(login_tab_error_msg,255,0,0) guiLabelSetVerticalAlign(login_tab_error_msg,"center") guiLabelSetHorizontalAlign(login_tab_error_msg,"center",false) guiSetFont(login_tab_error_msg,"default-bold-small") login_tab_authen_msg = guiCreateLabel(X,Y + 325,364,31,"Authen_login_tab",false) guiLabelSetColor(login_tab_authen_msg,0,255,0) guiLabelSetVerticalAlign(login_tab_authen_msg,"center") guiLabelSetHorizontalAlign(login_tab_authen_msg,"center",false) guiSetFont(login_tab_authen_msg,"default-bold-small") --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! shSignup = guiCreateStaticImage( X + 23, Y + 401, 301, 44, "/login-panel/signup.png", false ) -- A gomb addEventHandler("onClientGUIClick",shSignup,OnBtnRegister) addEventHandler( "onClientMouseEnter",shSignup,SignupSH) addEventHandler("onClientMouseLeave",shSignup,SErem) lbl_reg_top_info = guiCreateLabel(X - 70,Y + 388+offsetY,500,30,"",false) guiLabelSetColor(lbl_reg_top_info,255,234,55) guiLabelSetVerticalAlign(lbl_reg_top_info,"center") guiLabelSetHorizontalAlign(lbl_reg_top_info,"center",false) guiSetFont(lbl_reg_top_info,"default-bold-small") guiSetVisible(lbl_reg_top_info,false) edit_account_name = guiCreateEdit(X + 20,Y + 215,310,35,"",false) guiEditSetMaxLength ( edit_account_name,25) guiSetVisible(edit_account_name,false) addEventHandler("onClientGUIChanged", edit_account_name, resetRegButtons) edit__reg_tab_password = guiCreateEdit(X + 20,Y + 290,310,35,"",false) guiEditSetMaxLength ( edit__reg_tab_password,25) guiEditSetMasked ( edit__reg_tab_password, true ) guiSetProperty(edit__reg_tab_password, 'MaskCodepoint', '8226') guiSetVisible(edit__reg_tab_password,false) addEventHandler("onClientGUIChanged", edit__reg_tab_password, resetRegButtons) edit__reg_tab_Repassword = guiCreateEdit(X + 20,Y + 365,310,35,"",false) guiEditSetMaxLength ( edit__reg_tab_Repassword,25) guiEditSetMasked ( edit__reg_tab_Repassword, true ) guiSetProperty(edit__reg_tab_Repassword, 'MaskCodepoint', '8226') guiSetVisible(edit__reg_tab_Repassword,false) guiSetEnabled (edit__reg_tab_Repassword, true) addEventHandler("onClientGUIChanged", edit__reg_tab_Repassword, resetRegButtons) edit__reg_tab_email = guiCreateEdit(X + 20,Y + 435,310,35,"",false) guiEditSetMaxLength ( edit__reg_tab_email,100) --guiEditSetMasked ( edit__reg_tab_email, true ) guiSetVisible(edit__reg_tab_email,false) guiSetEnabled (edit__reg_tab_email, true) addEventHandler("onClientGUIChanged", edit__reg_tab_email, resetRegButtons) --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! shRegister2 = guiCreateStaticImage( X + 182, Y + 401+6+offsetY, 143, 45, "/login-panel/register.png", false )--guiCreateStaticImage( X + 23, Y + 409, 301, 44, "/login-panel/register2.png", false ) addEventHandler("onClientGUIClick",shRegister2,onClickBtnRegister) addEventHandler( "onClientMouseEnter",shRegister2,Register2SH) addEventHandler("onClientMouseLeave",shRegister2,SErem) guiSetVisible(shRegister2,false) shCancel = guiCreateStaticImage( X + 23, Y + 401+6+offsetY, 143, 45, "/login-panel/cancel.png", false ) -- A gomb addEventHandler("onClientGUIClick",shCancel,onClickCancel) addEventHandler( "onClientMouseEnter",shCancel,CancelSH) addEventHandler("onClientMouseLeave",shCancel,SErem) guiSetVisible(shCancel,false) showCursor(true) guiSetText(login_tab_error_msg, "") guiSetText(login_tab_authen_msg, "") local username, password = loadLoginFromXML() if username ~= "" then guiCheckBoxSetSelected ( checkbox_save, true ) guiSetText ( tUsername, tostring(username)) guiSetText ( tPassword, tostring(password)) else guiCheckBoxSetSelected ( checkbox_save, false ) guiSetText ( tUsername, tostring(username)) guiSetText ( tPassword, tostring(password)) end end end
-
Sim bem esse, eu adicionei e ele fica preto mesmo assim.
-
Estou usando um codigo parecido com esse, mas tipo fica essa tela preta ai
-
Cara eu tentei de um jeito aqui, mas a tela fica preta, só aparece o painel de login.
-
Eu gostaria de saber como posso fazer o background da tela de loading no estilo tipo que ele fica passando por areas do mapa do gta, tipo voando.
-
Como poderia fazer para deixar esse painelzinho mas bonito? Conseguem me dar alguma dica.
-
É possivel converter do samp mapas com objetos com textura aplicada nele tambem?
-
[AJUDA] Ver se o jogador esta em um carro
murilo2929 replied to murilo2929's topic in Programação em Lua
Muito obrigado. -
Então como faço para ver se um jogador esta no carro? e caso ele esteja não funcionar a bind.
-
[2019-10-23 18:43:17] QUIT: ADMIN_STAR left the game [Quit] [2019-10-23 18:43:17] WARNING: account\s_login.Lua:107: Bad argument @ 'getPedClothes' [Expected ped at argument 1, got nil] [2019-10-23 18:43:17] WARNING: account\s_login.Lua:108: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [2019-10-23 18:43:17] WARNING: account\s_login.Lua:108: Bad argument @ 'setAccountData' [Expected account at argument 1, got boolean] [2019-10-23 18:43:17] WARNING: account\s_login.Lua:107: Bad argument @ 'getPedClothes' [Expected ped at argument 1, got nil] [DUP x17] [2019-10-23 18:43:17] WARNING: account\s_login.Lua:108: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [DUP x17] [2019-10-23 18:43:17] WARNING: account\s_login.Lua:108: Bad argument @ 'setAccountData' [Expected account at argument 1, got boolean] [DUP x17] [2019-10-23 18:43:17] ERROR: account\s_login.Lua:139: attempt to call global 'saveNewClothing' (a nil value)
-
precisa usar esses comandos? eu estou não estou colocando eles
-
esse script que eu estava tentando usar para salvar como pode ver ali em cima, mas não funcionou aqui
-
irmão é essa loja que estou usando, e aqui no meu servidor ela não salva lol
-
me envie a loja para eu dar uma olhada fazendo favor.
-
2019-10-23 09:01:08] QUIT: ADMIN_STAR left the game [Quit] [2019-10-23 09:01:09] WARNING: account\login_s.Lua:140: Bad argument @ 'getPedClothes' [Expected ped at argument 1, got string 'Quit'] [2019-10-23 09:01:09] WARNING: account\login_s.Lua:141: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got string 'Quit'] [2019-10-23 09:01:09] WARNING: account\login_s.Lua:141: Bad argument @ 'setAccountData' [Expected account at argument 1, got boolean] [2019-10-23 09:01:15] WARNING: account\login_s.Lua:140: Bad argument @ 'getPedClothes' [Expected ped at argument 1, got string 'Quit'] [DUP x17] [2019-10-23 09:01:15] WARNING: account\login_s.Lua:141: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got string 'Quit'] [DUP x17] [2019-10-23 09:01:15] WARNING: account\login_s.Lua:141: Bad argument @ 'setAccountData' [Expected account at argument 1, got boolean] [DUP x17] that error appear when i exit
-
function saveClothes() local account = getPlayerAccount(source) if ( not isGuestAccount(account) ) and ( getElementModel(source) == 0 ) then local texture = {} local model = {} for i=0, 17, 1 do local clothesTexture, clothesModel = getPedClothes(source, i) if ( clothesTexture ~= false ) then table.insert(texture, clothesTexture) table.insert(model, clothesModel) else table.insert(texture, " ") table.insert(model, " ") end end local allTextures = table.concat(texture, ",") local allModels = table.concat(model, ",") outputDebugString("Clothessaver: Saved clothes") setAccountData(account, "Clothessaver:Texture", allTextures) setAccountData(account, "Clothessaver:Model", allModels) texture = {} model = {} end end addEventHandler("onPlayerQuit", getRootElement(), saveClothes) function setClothes() local account = getPlayerAccount(source) if ( not isGuestAccount(account) ) then local textureString = getAccountData(account, "Clothessaver:Texture") local modelString = getAccountData(account, "Clothessaver:Model") local textures = split(textureString, 44) local models = split(modelString, 44) setElementModel(source,0) for i=0, 17, 1 do if ( textures[i+1] ~= " " ) then addPedClothes(source, textures[i+1], models[i+1], i) end end outputChatBox("Clothes were added by clothessaver", source, 0, 255, 0) textures = {} models = {} end end addEventHandler("onPlayerLogin", getRootElement(), setClothes) tentei assim e não deu amigo
-
function saveClothes() local account = getPlayerAccount(source) if ( not isGuestAccount(account) ) and ( getElementModel(source) == 0 ) then local texture = {} local model = {} for i=0, 17, 1 do local clothesTexture, clothesModel = getPedClothes(source, i) if ( clothesTexture ~= false ) then table.insert(texture, clothesTexture) table.insert(model, clothesModel) else table.insert(texture, " ") table.insert(model, " ") end end local allTextures = table.concat(texture, ",") local allModels = table.concat(model, ",") outputDebugString("Clothessaver: Saved clothes") setAccountData(account, "Clothessaver:Texture", allTextures) setAccountData(account, "Clothessaver:Model", allModels) texture = {} model = {} end end addEventHandler("onPlayerQuit", getRootElement(), saveClothes) function setClothes() local account = getPlayerAccount(source) if ( not isGuestAccount(account) ) then local textureString = getAccountData(account, "Clothessaver:Texture") local modelString = getAccountData(account, "Clothessaver:Model") local textures = split(textureString, 44) local models = split(modelString, 44) setElementModel(source,0) for i=0, 17, 1 do if ( textures[i+1] ~= " " ) then addPedClothes(source, textures[i+1], models[i+1], i) end end outputChatBox("Clothes were added by clothessaver", source, 0, 255, 0) textures = {} models = {} end end addEventHandler("onPlayerLogin", getRootElement(), setClothes) i try like this and don't work
-
how can i make to clothes of CJ save when player exit of server?
-
Alguem poderia me ajudar, como posso fazer para salvar a roupa do cj para que quando o player saia e entre dnv no servidor a roupa seja a mesma que ele saiu.
-
Amigo se não me engano tem um resource de uma hud que já vem com esse estilo, o player só caminha
-
então no meu metafile eu coloquei apenas assim <export function="takeMoney" type="server" /> should i put one more line like this? <export function="takeMoney" type="server" /> <export function="takeMoney" type="client" /> remembering that all code including hasplayermoney is client-side
-
So I'm trying to change this tuning shop's money method to the one I use but I can't, can anyone help me? My money system exports.dinheiro:tDinheiro(Player, Amount) --- To see if the player has money exports.dinheiro:pDinheiro(Player, Amount) --- To take money from the player Part of the code that I think should change, but when I change it doesn't work function hasPlayerMoney(money) if getPlayerMoney(localPlayer) >= money then return true end return false end function moneyChange(amount) takePlayerMoney(loopTable[hoveredCategory]["tuningPrice"]) giveNotification("success", getLocalizedText("notification.success.purchased")) playSoundEffect("moneychange.wav") if amount > 0 then moneyChangeTable = { ["tick"] = getTickCount() + 5000, ["amount"] = amount } end end