waqaarali Posted May 21, 2014 Share Posted May 21, 2014 Well i was wondering, is it possible to make a roleplay login without mysql so players can register with Firstname_Lastname with mysql and regularly ? Link to comment
tosfera Posted May 21, 2014 Share Posted May 21, 2014 Sure, you can store it in xml files but I wouldn't recommend it. You can also use the built in account system for that. Link to comment
waqaarali Posted May 21, 2014 Author Share Posted May 21, 2014 What do you mean built in account system ? A already made MySQL Account System Link to comment
tosfera Posted May 21, 2014 Share Posted May 21, 2014 So, if you made an account system why do you need another login system? Link to comment
waqaarali Posted May 21, 2014 Author Share Posted May 21, 2014 Well i want to learn to script more lol =D Link to comment
waqaarali Posted May 21, 2014 Author Share Posted May 21, 2014 tosfera you mind giving me an example of login-system with xml's ? with Link to comment
Chronic Posted May 21, 2014 Share Posted May 21, 2014 This login panel uses XML to store data: https://community.multitheftauto.com/in ... ls&id=6367 Link to comment
Atton Posted May 22, 2014 Share Posted May 22, 2014 I would highly recommend making use of the account system built into MTA. Using xml has massive pitfalls and can create errors not to mention is is a head f.uck. Below is the code to an xml account info storage system I retired a while ago if you really want to use it. local Loco = xmlLoadFile("regData.xml") --local Logs = fileOpen("oldData.txt") function checkXML () if Loco then -- if Logs then return true else outputChatBox("FATIAL XML ERROR",root,255,0,0) return end -- end end checkXML () addEventHandler ( "onPlayerQuit", getRootElement(), function () local x,y,z = getElementPosition(source) local account = getPlayerAccount(source) local Name = getAccountName(account) local Cash = getPlayerMoney(source) local pos = xmlFindChild(Loco,Name,0) if not pos then xmlCreateChild(Loco,Name) xmlSaveFile(Loco) return true else xmlNodeSetAttribute(pos,Name,Name..","..tostring(Cash)..","..x .. "," .. y .. "," .. z) xmlSaveFile(Loco) end end) addEventHandler ( "onPlayerLogin", getRootElement(), function () local x,y,z = getElementPosition(source) local account = getPlayerAccount(source) local Name = getAccountName(account) local Cash = getPlayerMoney(source) local pos = xmlFindChild(Loco,Name,0) if not pos then xmlCreateChild(Loco,Name) xmlSaveFile(Loco) return true else return false end end) addEventHandler("onPlayerLogout",getRootElement(), function () cancelEvent() outputChatBox("You cannot logout this is to prevent cheating!",source,255,0,0) outputChatBox("Reconnect or disconnect if you want to logout.",source,255,0,0) end) It has been known to stop working once there are to many children on the root class. Link to comment
tosfera Posted May 22, 2014 Share Posted May 22, 2014 He said he already has an account system, which comes with a login script else you won't have an account system. So idk what he's doing or what he wants. Link to comment
waqaarali Posted May 22, 2014 Author Share Posted May 22, 2014 I want to basically make a login system which allows to register with Firstname_Lastname like roleplay without using a MySQLDatabase Link to comment
Atton Posted May 24, 2014 Share Posted May 24, 2014 I want to basically make a login system which allows to register with Firstname_Lastname like roleplay without using a MySQLDatabase There are quite a few login systems that make use of what is built into mta I suggest using them. https://community.multitheftauto.com/in ... ces&s=list Link to comment
flowz Posted May 24, 2014 Share Posted May 24, 2014 I think he wants a register system like a roleplay login system which lets u play in game with Firstname_Lastname and there is none on mta community Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now