Mσнαмα∂ Hєℓιѕн Posted August 28, 2018 Posted August 28, 2018 Hello How to write a code to get a referral ID when players enter the server and save it in the database! I do not want this code from you, I just want the functions of this code! Thanks
Mσнαмα∂ Hєℓιѕн Posted August 29, 2018 Author Posted August 29, 2018 3 hours ago, Dimos7 said: Id on database or game id? on Game ID! But save this ID on Database
Dimos7 Posted August 29, 2018 Posted August 29, 2018 (edited) ID = {} exports.scoreboard:addScoreboardColumn("id",root, 20, "id", 1) addEventHandler("onPlayerJoin", root, function () for i=0, getMaxPlayers() do if not ID[i] then ID[i] = source setElementData(source, "id", i) end end end) Edited August 29, 2018 by Dimos7
JeViCo Posted August 29, 2018 Posted August 29, 2018 (edited) saving with in-game id is a bad idea. Try getAccountID to get id of referal account and getAccountByID to give this guy a reward @Mσнαмα∂ Hєℓιѕн Edited August 29, 2018 by JeViCo
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