
[DMC]
Members-
Posts
165 -
Joined
-
Last visited
Everything posted by [DMC]
-
Thats the problem, Its not logging in but its still saying the message
-
srry this is not needed at all, i will explain my situation My friend solidsnake/castillo made a script for me that alows A player to login to his nick only not any other names But when someone does a login to an other name its still saying outPutChatbox
-
Check community and search for cockpit
-
LOOK AT 3rd Post function addPlayer() local playeraccount = getPlayerAccount(source) if not isGuestAccount(playeraccount) then local accountname = getAccountName(playeraccount) CheckPlayer = executeSQLSelect ( "PlayersData", "accountname", "accountname = '" .. accountname .. "'" ) if ( type( CheckPlayer ) == "table" and #CheckPlayer == 0 ) or not CheckPlayer then executeSQLInsert ( "PlayersData", "'".. accountname .."','0','0','0','0','FF0000','00FF00','None','None/None','I love DMC','0','0'" ) end end local playeraccount = getPlayerAccount(source) if not isGuestAccount(playeraccount) then local accountname = getAccountName(playeraccount) local data = executeSQLQuery("SELECT * FROM PlayersData where accountname = '" .. accountname .. "'") outputChatBox(getPlayerName(source).. " login and says: ".. data[1]["LoginMsg"] .."!",root,0,255,0,true) setElementData(source,"ageNsex",data[1]["AgeNSex"]) setElementData(source,"contact",data[1]["Contact"]) setElementData(source,"message",data[1]["LoginMsg"]) setElementData(source,"skin",data[1]["Skin"]) setElementData(source,"NC",data[1]["NameC"]) setElementData(source,"CC",data[1]["ChatC"]) setElementData(source,"CarColor",data[1]["CarColor"]) end end addEventHandler("onPlayerLogin",getRootElement(), addPlayer)
-
ty because of a scumbagg you can downlaod them in community
-
hmm can u post the errors its giving /debugscript 3
-
1: i know how to fix this but im not gonna help if u dont post all + buttons...
-
oh he asked this for me, the problem is when nowan is inside the server it shows everyone that joins the screen were hes looking at the sky and nothing happens, no vote for new map nothing and when i start a map and it ends everything work perfect again untill its 0 players again
-
lets give him a whole server there are over 10,000 free servers + alot pro maps here www.never-gonna-happen.com
-
this? function loginPlayer ( thePlayer, command, username, password ) local account = getAccount ( username, password ) if ( account ~= false ) then name = getPlayerName(thePlayer) if getAccountName(account) == name then logIn ( thePlayer, account, password ) outputChatBox ( "Welcome", thePlayer, 255, 255, 0 ) else outputChatBox ( "ERROR: Your Username or Password is invalid", thePlayer, 255, 255, 0 ) end else cancelEvent() outputChatBox("ERROR: You can't login to this name",thePlayer,255,0,0) end end addEventHandler( "onPlayerLogin", rootElement, loginPlayer )
-
this is what i got function loginPlayer ( thePlayer, command, username, password ) local account = getAccount ( username, password ) if ( account ~= false ) then name = getPlayerName(thePlayer) if getAccountName(account) == name then logIn ( thePlayer, account, password ) outputChatBox ( "Welcome", thePlayer, 255, 255, 0 ) else outputChatBox ( "ERROR: Your Username or Password is invalid", thePlayer, 255, 255, 0 ) end else cancelEvent() outputChatBox("ERROR: You can't login to this name",thePlayer,255,0,0) end end addCommandHandler ( "login", loginPlayer
-
function consoleSetVehicleColor ( playerSource, commandName, col1, col2, col3, col4 ) -- If a player triggered this in-game if ( playerSource ) then -- Get the player's vehicle playerVehicle = getPlayerOccupiedVehicle ( playerSource ) -- If the player is in a vehicle and we've got at least 1 parameter if ( playerVehicle and col1 ) then -- Get the vehicle's existing color and use it if fewer than 4 arguments were passed exCol1, exCol2, exCol3, exCol4 = getVehicleColor ( playerVehicle ) if not col2 then col2 = exCol2 end if not col3 then col3 = exCol3 end if not col4 then col4 = exCol4 end -- Set the vehicle's color setVehicleColor ( playerVehicle, col1, col2, col3, col4 ) else -- If we didn't get at least 1 parameter or the player doesn't have a vehicle, display some help text outputConsole ( "This function will set your current vehicle's colors. A vehicle can have up to 4 colors.", playerSource ) outputConsole ( "Syntax: set_vehicle_color color1 [ color2 color3 color4 ]", playerSource ) outputConsole ( "You must be in a vehicle to use this function.", playerSource ) end end end -- Register the command handler and attach it to the consoleSetVehicleColor function addCommandHandler ( "set_vehicle_color", consoleSetVehicleColor )
-
still lets not forget we are here to comment [DMC]Zeta's map i will say 9/10
-
I had an question on how to disable /login and make my own login code and yes i know from wiki but i wanna cancel the mta /login event function loginPlayer ( thePlayer, command, username, password ) local account = getAccount ( username, password ) -- Return the account if ( account ~= false ) then -- If the account exists. logIn ( thePlayer, account, password ) -- Log them in. else outputChatBox ( "Wrong username or password!", thePlayer, 255, 255, 0 ) end end addCommandHandler ( "login", loginPlayer ) or is it possible to example my name is dmc and i wanna login to sss it says, error you cant login to a other name so it needs to be dmc, if this is possible without the above stuff please help, tell me
-
LoginWin = guiCreateWindow(532,337,359,234,"LoGiN SySTeM v1.0",false) GUIEditor_Label[1] = guiCreateLabel(26,64,61,18,"Username:",false,LoginWin) guiLabelSetColor(GUIEditor_Label[1],255,139,0) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Label[2] = guiCreateLabel(52,181,5,5,"",false,LoginWin) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(26,108,61,18,"Password:",false,LoginWin) guiLabelSetColor(GUIEditor_Label[3],255,139,0) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) usernameEditLogin = guiCreateEdit(92,59,228,31,"",false,LoginWin) passwordEditLogin = guiCreateEdit(92,103,228,31,"",false,LoginWin) logbtn = guiCreateButton(22,171,138,22,"Log In",false,LoginWin) regbtn = guiCreateButton(197,171,138,22,"Register",false,LoginWin) guestbtn = guiCreateButton(22,199,313,23,"Guest",false,LoginWin) GUIEditor_Label[4] = guiCreateLabel(127,28,107,16,"Log in or Register.",false,LoginWin) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) guiSetFont(GUIEditor_Label[4],"default-bold-small") function receiveVars( allow, email) local playername = getPlayerName(localPlayer) guiSetText(LoginUsername, "") guiSetText(EditRegisterUsername, "") if (email == "false") then guiSetVisible(LblRegisterEmail, false) guiSetVisible(EditRegisterEmail, false) end if (allow == "false") then guiDeleteTab(TabRegister, TabPanel) end guiSetSelectedTab(TabPanel, TabLogin) guiSetText(usernameEditLogin, playername) guiSetText(usernameEditPassword, playername) guiSetVisible(LoginWin, true) guiBringToFront(LoginWin) guiSetInputEnabled(true) showCursor(true) end addEvent( "onSendVars", true ) addEventHandler( "onSendVars", getRootElement(), receiveVars ) function windowHandler() triggerServerEvent("onNeedVars", getLocalPlayer()) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), windowHandler) function onClickBtn(button, state) if(button == "left" and state == "up") then if(source == logbtn) then triggerServerEvent("onLogin", getRootElement(), localPlayer, guiGetText(usernameEditLogin), guiGetText(usernameEditPassword)) end end end addEventHandler("onClientGUIClick", logbtn, onClickBtn, false) function onClickBtn1(button, state) if(button == "left" and state == "up") then if(source == regbtn) then triggerServerEvent("onRegister", getRootElement(), localPlayer, guiGetText(usernameEditLogin), guiGetText(usernameEditPassword)) end end end addEventHandler("onClientGUIClick", regbtn, onClickBtn, false) function onClickBtn2(button, state) if(button == "left" and state == "up") then if(source == guestbtn) then guiSetInputEnabled(false) guiSetVisible(LoginWin, false) showCursor(false) end end end addEventHandler("onClientGUIClick", guestbtn, onClickBtn, false) function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(LoginWin, false) showCursor(false) end addEvent("hideLoginWindow", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) Server-Side: function onLogin ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if ( not isGuestAccount ( account ) ) then -- For every player that's logged in.... logOut ( player ) -- Log them out. end if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else outputChatBox ( "Wrong username or password!", player, 255, 255, 0 ) -- Output they got the details wrong. end end addEvent( "onLogin", true ) addEventHandler( "onLogin", getRootElement(), onLogin ) function onRegister ( player, user, pass, email ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else account = addAccount ( user, pass ) setAccountData ( account, "email", email) if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end end end addEvent( "onRegister", true ) addEventHandler( "onRegister", getRootElement(), onRegister ) function needVars() local allow_register = get("allow_register") local email_on_register = get("email_on_register") triggerClientEvent(source, "onSendVars", getRootElement(), allow_register, email_on_register) end addEvent("onNeedVars", true) addEventHandler("onNeedVars", getRootElement(), needVars)
-
i know im an idiot but you dont get it YOU ARE PASTING A LABEL ON A LABEL
-
lol ive just checked your code and just stop you are making an label on a label GUIEditor_Label[2] = guiCreateLabel(52,181,5,5,"",false,GUIEditor_Label[1])
-
your window is called LoginWin and not GUIEditor_Window[1] Example GUIEditor_Label[1] = guiCreateLabel(26,64,61,18,"Username:",false,GUIEditor_Window[1]) needs to be GUIEditor_Label[1] = guiCreateLabel(26,64,61,18,"Username:",false,LoginWin) this should work LoginWin = guiCreateWindow(532,337,359,234,"LoGiN SySTeM v1.0",false) GUIEditor_Label[1] = guiCreateLabel(26,64,61,18,"Username:",false,LoginWin) guiLabelSetColor(GUIEditor_Label[1],255,139,0) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Label[2] = guiCreateLabel(52,181,5,5,"",false,GUIEditor_Label[1]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(26,108,61,18,"Password:",false,LoginWin) guiLabelSetColor(GUIEditor_Label[3],255,139,0) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) usernameEditLogin = guiCreateEdit(92,59,228,31,"",false,LoginWin) passwordEditLogin = guiCreateEdit(92,103,228,31,"",false,LoginWin) logbtn = guiCreateButton(22,171,138,22,"Log In",false,LoginWin) regbtn = guiCreateButton(197,171,138,22,"Register",false,LoginWin) guestbtn = guiCreateButton(22,199,313,23,"Guest",false,LoginWin) GUIEditor_Label[4] = guiCreateLabel(127,28,107,16,"Log in or Register.",false,LoginWin) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) guiSetFont(GUIEditor_Label[4],"default-bold-small") function receiveVars( allow, email) local playername = getPlayerName(localPlayer) guiSetText(LoginUsername, "") guiSetText(EditRegisterUsername, "") if (email == "false") then guiSetVisible(LblRegisterEmail, false) guiSetVisible(EditRegisterEmail, false) end if (allow == "false") then guiDeleteTab(TabRegister, TabPanel) end guiSetSelectedTab(TabPanel, TabLogin) guiSetText(usernameEditLogin, playername) guiSetText(usernameEditPassword, playername) guiSetVisible(LoginWin, true) guiBringToFront(LoginWin) guiSetInputEnabled(true) showCursor(true) end addEvent( "onSendVars", true ) addEventHandler( "onSendVars", getRootElement(), receiveVars ) function windowHandler() triggerServerEvent("onNeedVars", getLocalPlayer()) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), windowHandler) function onClickBtn(button, state) if(button == "left" and state == "up") then if(source == logbtn) then triggerServerEvent("onLogin", getRootElement(), localPlayer, guiGetText(usernameEditLogin), guiGetText(usernameEditPassword)) end end end addEventHandler("onClientGUIClick", logbtn, onClickBtn, false) function onClickBtn1(button, state) if(button == "left" and state == "up") then if(source == regbtn) then triggerServerEvent("onRegister", getRootElement(), localPlayer, guiGetText(usernameEditLogin), guiGetText(usernameEditPassword)) end end end addEventHandler("onClientGUIClick", regbtn, onClickBtn, false) function onClickBtn2(button, state) if(button == "left" and state == "up") then if(source == guestbtn) then guiSetInputEnabled(false) guiSetVisible(LoginWin, false) showCursor(false) end end end addEventHandler("onClientGUIClick", guestbtn, onClickBtn, false) function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(LoginWin, false) showCursor(false) end addEvent("hideLoginWindow", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) Server-Side: function onLogin ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if ( not isGuestAccount ( account ) ) then -- For every player that's logged in.... logOut ( player ) -- Log them out. end if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else outputChatBox ( "Wrong username or password!", player, 255, 255, 0 ) -- Output they got the details wrong. end end addEvent( "onLogin", true ) addEventHandler( "onLogin", getRootElement(), onLogin ) function onRegister ( player, user, pass, email ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else account = addAccount ( user, pass ) setAccountData ( account, "email", email) if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end end end addEvent( "onRegister", true ) addEventHandler( "onRegister", getRootElement(), onRegister ) function needVars() local allow_register = get("allow_register") local email_on_register = get("email_on_register") triggerClientEvent(source, "onSendVars", getRootElement(), allow_register, email_on_register) end addEvent("onNeedVars", true) addEventHandler("onNeedVars", getRootElement(), needVars)
-
this makes sence if there werent dm maps were ur supposed to drive carefull and dont hit barrels
-
i think you should just look more, i found 1 here and It works fine Go to the right(top) Type Afk killer and GL