#Honda-R Posted November 4, 2012 Share Posted November 4, 2012 Hey Scripters i need some little help I need to add scoreboard collum Points When player die hes got 1 point when relog , rejoin server , loads points , could u help me ? Link to comment
Anderl Posted November 4, 2012 Share Posted November 4, 2012 Do you expect us to make it for you? You got to make it by yourself, we'll just give tips and help fixing errors. Use these functions: addScoreboardColumn --this is an exported function from 'dxscoreboard'/'scoreboard', you got to use "call" function or "exports" table to call it setElementData getElementData And these events: onPlayerWasted onPlayerLogin onPlayerJoin Link to comment
TAPL Posted November 4, 2012 Share Posted November 4, 2012 i don't think onPlayerJoin is needed. You need onPlayerQuit. Use these function to save/load the points. setAccountData getAccountData getPlayerAccount Link to comment
Anderl Posted November 4, 2012 Share Posted November 4, 2012 i don't think onPlayerJoin is needed. You need onPlayerQuit.Use these function to save/load the points. setAccountData getAccountData getPlayerAccount He wants when player rejoin server, not quit. Link to comment
TAPL Posted November 5, 2012 Share Posted November 5, 2012 i don't think onPlayerJoin is needed. You need onPlayerQuit.Use these function to save/load the points. setAccountData getAccountData getPlayerAccount He wants when player rejoin server, not quit. rejoin means (quit and join) Simply all you need is save the points in the account when the player quit, and load it from the account when the player login. There no need for onPlayerJoin unless you going make a system to save the player serial and its points in (xml, sql, mysql) then it going be a waste of time and effort. Link to comment
Anderl Posted November 5, 2012 Share Posted November 5, 2012 i don't think onPlayerJoin is needed. You need onPlayerQuit.Use these function to save/load the points. setAccountData getAccountData getPlayerAccount He wants when player rejoin server, not quit. rejoin means (quit and join) Simply all you need is save the points in the account when the player quit, and load it from the account when the player login. There no need for onPlayerJoin unless you going make a system to save the player serial and its points in (xml, sql, mysql) then it going be a waste of time and effort. Oh my god. How do you think he'll load points when player join then? Link to comment
TAPL Posted November 5, 2012 Share Posted November 5, 2012 rejoin means (quit and join) Simply all you need is save the points in the account when the player quit, and load it from the account when the player login. There no need for onPlayerJoin unless you going make a system to save the player serial and its points in (xml, sql, mysql) then it going be a waste of time and effort. Oh my god. How do you think he'll load points when player join then? you kidding me? And these events: onPlayerWasted onPlayerLogin [size=8]This event what for then?[/size] [strike]onPlayerJoin[/strike] Link to comment
Anderl Posted November 5, 2012 Share Posted November 5, 2012 rejoin means (quit and join) Simply all you need is save the points in the account when the player quit, and load it from the account when the player login. There no need for onPlayerJoin unless you going make a system to save the player serial and its points in (xml, sql, mysql) then it going be a waste of time and effort. Oh my god. How do you think he'll load points when player join then? you kidding me? And these events: onPlayerWasted onPlayerLogin [size=8]This event what for then?[/size] [strike]onPlayerJoin[/strike] That event is called when a player logs in, not join. Login and join are things very different. Link to comment
Guest Guest4401 Posted November 5, 2012 Share Posted November 5, 2012 Oh my god. How do you think he'll load points when player join then? It's not possible and does not have to be possible, if he is using MTA's default account system. When player joins, he is a guest, not logged in. How will you get his account data (points)? So I guess TAPL is right, onPlayerLogin has to be used. Link to comment
Anderl Posted November 5, 2012 Share Posted November 5, 2012 Oh my god. How do you think he'll load points when player join then? It's not possible and does not have to be possible, if he is using MTA's default account system. When player joins, he is a guest, not logged in. How will you get his account data (points)? So I guess TAPL is right, onPlayerLogin has to be used. The OP didn't say he's using default account system but did say he wants to load the points when the player joins, so I just sent him the right event for that. Link to comment
Castillo Posted November 5, 2012 Share Posted November 5, 2012 I know many people who call "login" for "join". P.S: Better stop the discussion, just wait until Honda replies. Link to comment
#Honda-R Posted November 5, 2012 Author Share Posted November 5, 2012 Sorry guys, yes i need onplayerlogin Link to comment
Anderl Posted November 5, 2012 Share Posted November 5, 2012 Ok, then use these functions: addScoreboardColumn --note that this is an exported function from scoreboard setElementData getElementData setAccountData getAccountData getPlayerAccount won't be needed here since onPlayerLogin event already sends the account as an argument. And use these events: onPlayerWasted onPlayerLogout onPlayerLogin I think I didn't forget any. 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