Mike269 Posted March 8, 2015 Share Posted March 8, 2015 Hello guys, anyone know how could I save money and weapons after dying/reconnecting/restarting the server? I'm also using spawn selection but when I got timed out I have to spawn again, I would like to keep my position.. Thanks Link to comment
JR10 Posted March 8, 2015 Share Posted March 8, 2015 Take a look at the community resources, you will find a lot of save systems. https://community.multitheftauto.com/index.php?p= ... ils&id=732 https://community.multitheftauto.com/index.php?p= ... s&id=10588 https://community.multitheftauto.com/index.php?p= ... ls&id=2561 Link to comment
Mike269 Posted March 8, 2015 Author Share Posted March 8, 2015 thanks ill test it btw can you tell me what SQL is, where to get it and what I can use it for? Link to comment
JR10 Posted March 8, 2015 Share Posted March 8, 2015 Google what SQL is, this should give you a basic understanding of what it is. Check this when you're done: viewtopic.php?f=148&t=38203 Link to comment
Mike269 Posted March 8, 2015 Author Share Posted March 8, 2015 btw should i have SQL in the server? Can't I just download it? Link to comment
xeon17 Posted March 8, 2015 Share Posted March 8, 2015 Well , if you're begginer i would like to suggest you using accountData instead of SQL what would be easier for you. getAccountData setAccountData Link to comment
Mike269 Posted March 8, 2015 Author Share Posted March 8, 2015 oh guys, anyone know spawnpanel from RPG servers? I have good save system now it's save position and weapons but when I reconnect spawn panel show up anyway, there's "lua code" help me please setElementData( player, "Class", class ) if team ~= nil then spawnPlayer( player, x, y, z, 0, skin, 0, 0, getTeamFromName( team ) ) else spawnPlayer( player, x, y, z, 0, skin, 0, 0 ) end setCameraTarget( player, player ) for i, v in pairs( weapon ) do giveWeapon( player, i, v ) end triggerClientEvent( player, "systemspawn:toggle", player ) end addEvent( "systemspawn:spawnPlayer", true ) addEventHandler( "systemspawn:spawnPlayer", root, spawnPlayerSystem ) function trigger( player ) triggerClientEvent( player, "systemspawn:toggle", player ) end addEventHandler( "onPlayerLogin", root, function( ) trigger( source ) end ) addEventHandler( "onPlayerWasted", root, function( ) setTimer( trigger, 2500, 1, source ) end ) 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