LucasMorais
Members-
Posts
22 -
Joined
-
Last visited
Everything posted by LucasMorais
-
Now it says "Network module not compatible!"
-
Didn't work out. /\
-
Anyone can help us?
-
Hi. When I try to connect to a server that needs to download 250KB+ maps, it stops downloading and my internet disconnects. The windows XP SP3 firewall is activated, but MTA is in the exceptions. What shall i do?
-
Thank you very very very much! I'm very interested in learning this, so.. thanks! I'm learning so much, but I still think it's not enough. Anyway, thanks But.. and the player position saving? I don't have ANY ideia on how to make it.
-
Thanks! Err.. how do I verify if it's the player's first login? I know there is a variable, but I don't know how to use it. @Edit And how do I save the player position? (Get and save, I couldn't find anything in the Wiki)
-
Hi, it's me again and again.. err.. i'm trying to do a login/register system for a roleplay server. But when I click "REGISTRO", nothing happens.. help? login.lua ( GUI ) function loginWindow() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Scrollbar = {} guiSetInputEnabled(true) showCursor(true) GUIEditor_Window[1] = guiCreateWindow(284,338,483,172,"LOGUE-SE OU REGISTRE-SE!",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) LoginEdit = guiCreateLabel(13,28,118,19,"Nome de usuário:",false,GUIEditor_Window[1]) GUIEditor_Edit[1] = guiCreateEdit(9,47,143,19,"",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(11,68,118,19,"Senha:",false,GUIEditor_Window[1]) GUIEditor_Edit[2] = guiCreateEdit(9,47,143,19,"",false,GUIEditor_Window[1]) guiEditSetMaxLength(GUIEditor_Edit[2],15) PassEdit = guiCreateEdit(9,84,143,19,"",false,GUIEditor_Window[1]) guiEditSetMasked(PassEdit,true) LoginB = guiCreateButton(9,113,70,29,"Login",false,GUIEditor_Window[1]) RegB = guiCreateButton(84,114,70,29,"Registro",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(100,149,313,18,"Connect Roleplay 2011 - [url=http://www.connect-rp.com]http://www.connect-rp.com[/url]",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Label[4] = guiCreateLabel(164,22,308,18,"Atualizações:",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[4],"clear-normal") GUIEditor_Memo[1] = guiCreateMemo(164,42,298,98,"v0.1 BETA:\n- GUI @ Login feita.\n-------------------------------------------------------------------\nPróximas atualizações:\nv0.2 BETA:\n- Sistema de salvamento de contas.",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], true) local sound = playSound("sounds/mario.mp3") --Play wasted.mp3 from the sounds folder setSoundVolume(sound, 1.0) -- set the sound volume to 50% end addEventHandler("onClientResourceStart", getResourceRootElement(), loginWindow) function activateThis() triggerClientEvent("thisThing", getRootElement()) end addEventHandler("onClientResourceStart", getResourceRootElement(), loginwindow) account.lua addEvent("thisThing", true) local playerRegister = false function onPlayerRegister(username, password) onClientGUIClick(left, up, 114,70) guiGetText(LoginEdit) guiGetText(PassEdit) if(password ~= "" and password ~= nil and username ~= and username ~= nil and playerRegister = false) then triggerServerEvent("addTheAccount", getRootElement()) end addEventHandler("onClientGUIClick", RegB) contas.lua (add the account) addEvent("addTheAccount", true) function registerThePlayer(source, username, password) local accountAdded = addAccount(username, password) if(accountAdded) then outputChatBox("Obrigado por se registrar, agora logue-se.", source) playerRegister = true else outputChatBox("Ocorreu um erro enquanto estávamos criando sua conta, tente novamente.", source) end if(playerRegister == true) then outputChatBox("Este nome de usuário já está registrado, escolha outro!", source) end end addEventHandler("addTheAccount", getRootElement(), registerThePlayer) I am trying to solve, I would be happy if anyone tries to help me
-
Already did it, thanks!
-
Well, I need help again. With binding keys. This is server-side, it's correct? function keys(keyPresser, key, keyState) if(key == "m") and if(keyState == "down") and if(isCursorShowing == false) showCursor(true) end if(key == "m") and if(keyState == "down") and if(isCursorShowing == true) showCursor(false) end end function bindedKeys() bindKey("m", "down", keys) end
-
Oh, thanks a lot! Can you help me more times, but by... er... Live Messenger?
-
Hi, it's me again! I need some help with this. I already have the GUI, but I can't make it appear when the player Join. Please notice that i'm new in LUA scripting. Client-Side file: function () GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Scrollbar = {} guiSetInputEnabled(false) GUIEditor_Window[1] = guiCreateWindow(284,338,483,172,"LOGUE-SE OU REGISTRE-SE!",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(13,28,118,19,"Nome de usuário:",false,GUIEditor_Window[1]) GUIEditor_Edit[1] = guiCreateEdit(9,47,143,19,"",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(11,68,118,19,"Senha:",false,GUIEditor_Window[1]) GUIEditor_Edit[2] = guiCreateEdit(9,47,143,19,"",false,GUIEditor_Window[1]) guiEditSetMaxLength(GUIEditor_Edit[2],15) GUIEditor_Edit[3] = guiCreateEdit(9,84,143,19,"",false,GUIEditor_Window[1]) guiEditSetMasked(GUIEditor_Edit[3],true) GUIEditor_Button[1] = guiCreateButton(9,113,70,29,"Login",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(84,114,70,29,"Registro",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(100,149,313,18,"Advanced Roleplay 2011 - [url=http://www.advanced-roleplay.com]www.advanced-roleplay.com[/url]",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Label[4] = guiCreateLabel(164,22,308,18,"Atualizações:",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[4],"clear-normal") GUIEditor_Memo[1] = guiCreateMemo(164,42,298,98,"v0.1 BETA:\n- GUI @ Login feita.\n-------------------------------------------------------------------\nPróximas atualizações:\nv0.2 BETA:\n- Sistema de salvamento de contas.",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], true) end addEventHandler("onPlayerJoin", getRootElement(), loginWindow) I don't need to post the server-side file, because it has nothing related to the client-side file. I know, i have to do something in the server-side file to activate the client-side, but I don't know wich one to use and how-to. Help please!
-
Problems with bindKey + setVehicleEngineState.
LucasMorais replied to LucasMorais's topic in Scripting
No, not like that. I put it in "server\resources\guieditor", but I don't know what command I need to type to "activate" it. -
Problems with bindKey + setVehicleEngineState.
LucasMorais replied to LucasMorais's topic in Scripting
Well, I have it in my pc, but I rode the description and I didn't find the way to make it work. -
Problemas com bindKey + setVehicleEngineState
LucasMorais replied to LucasMorais's topic in Programação em Lua
Já achei ajuda no fórum em inglês, tranca aí, moderador, por favor. -
Problems with bindKey + setVehicleEngineState.
LucasMorais replied to LucasMorais's topic in Scripting
Okay, but... how do I use the guieditor and how I use it to do the GUI part of the iPhone? -
Problems with bindKey + setVehicleEngineState.
LucasMorais replied to LucasMorais's topic in Scripting
By the way, i want to make some work with GUI now. I want to start with something like... a phone system. If i want to do an iPhone, do I need a clean image, without the icons or it can be with the icons? (I'll see the topic tomorrow, gotta sleep) -
Problems with bindKey + setVehicleEngineState.
LucasMorais replied to LucasMorais's topic in Scripting
That's okay. But I hope that you answer all my questions Just kidding. -
Problems with bindKey + setVehicleEngineState.
LucasMorais replied to LucasMorais's topic in Scripting
Thanks again. Can I ask you a question? (I am already, *laughs*) Can you teach me LUA? -
Problems with bindKey + setVehicleEngineState.
LucasMorais replied to LucasMorais's topic in Scripting
Hey, thanks! It worked, but.. is there anyway to bind the keys without typing "/bindit"? -
Hello. I am new at MTA/LUA scripting and I am trying to do a system that when I press one key, the engines turns on, and when I press another key, the engine turns off. But, when I type /bindit, enter the car and press the key, there is an error at the server console. It is like this: "Bad argument @ setVehicleEngineState". This is the system, it's server-side. function engineOn(player, key, keyState, theVehicle) if(keyState == "down") then setVehicleEngineState(theVehicle, true) end end function engineOff(player, key, keyState, theVehicle) if(keyState == "down") then setVehicleEngineState(theVehicle, false) end end function bindTheKeys(player, commandName) bindKey(player, "j", "down", engineOn) bindKey(player, "k", "down", engineOff) end addCommandHandler("bindit", bindTheKeys) Thanks.
-
Oi gente. Eu estou tentando fazer um sistema de ligar/desligar o motor à base de bindKey. O código eu estou fazendo em server-side. Aí vai: function engineOn(player, key, keyState, theVehicle) if(keyState == "down") then setVehicleEngineState(theVehicle, true) end end function engineOff(player, key, keyState, theVehicle) if(keyState == "down") then setVehicleEngineState(theVehicle, false) end end function bindTheKeys(player, commandName) bindKey(player, "j", "down", engineOn) bindKey(player, "k", "down", engineOff) end addCommandHandler("bindit", bindTheKeys) Quando eu digito /bindit, aparece na janela do servidor: "Bad argument @ setVehicleEngineState". Queria saber como resolver. E outra pergunta: como eu faço pra essas keys já "bindarem" na hora que o player spawna?