itHyperoX Posted April 11, 2017 Share Posted April 11, 2017 (edited) Hi, how can i get the player account name by serial? (I need account name, not account numbers) Edited April 11, 2017 by TheMOG Link to comment
*RaCeR^ Posted April 11, 2017 Share Posted April 11, 2017 https://community.multitheftauto.com/index.php?p=resources&s=list Link to comment
*RaCeR^ Posted April 11, 2017 Share Posted April 11, 2017 https://community.multitheftauto.com/index.php?p=resources&s=details&id=12707 Link to comment
itHyperoX Posted April 11, 2017 Author Share Posted April 11, 2017 dont comment here if you stupid, ty. Link to comment
*RaCeR^ Posted April 11, 2017 Share Posted April 11, 2017 why u don't download the Resource and pick up the codes ? Link to comment
itHyperoX Posted April 11, 2017 Author Share Posted April 11, 2017 (edited) Quote player account name by serial? I want something this GetAccountsBySerial , but not numbers, i need the target player account name by serial Edited April 11, 2017 by TheMOG Link to comment
quindo Posted April 11, 2017 Share Posted April 11, 2017 function GetAccountNameFromSerial(serial) local accounts = getAccountsBySerial(serial) if accounts then for _,v in pairs(accounts) do outputChatBox(getAccountName(v)) end end end Something like that should work. Link to comment
itHyperoX Posted April 11, 2017 Author Share Posted April 11, 2017 want to make something like this but i want the player account name by serial , not the serial addCommandHandler("getaccserial", function (player, cmd, accountName) if accountName then local account = getAccount(accountName) if (account) then outputChatBox("The serial is " .. getAccountSerial(account),player,255,255,255,true) else outputChatBox("Account not found") end end end) Link to comment
quindo Posted April 11, 2017 Share Posted April 11, 2017 I can't understand what do you want exactly. You want to give function serial and get back account names? That's what my script does. Link to comment
itHyperoX Posted April 11, 2017 Author Share Posted April 11, 2017 oh yes, i didn't see that. So i tried to make command for that error getAccountsBySerial expected string at argument 1 got nil function GetAccountNameFromSerial(serial) local accounts = getAccountsBySerial(serial) if accounts then for _,v in pairs(accounts) do outputChatBox(getAccountName(v)) end end end addCommandHandler("tes",GetAccountNameFromSerial) Link to comment
quindo Posted April 11, 2017 Share Posted April 11, 2017 function GetAccountNameFromSerial(player, serial) local accounts = getAccountsBySerial(serial) if accounts then for _,v in pairs(accounts) do outputChatBox(getAccountName(v)) end end end addCommandHandler("tes",GetAccountNameFromSerial) Link to comment
Anubhav Posted April 11, 2017 Share Posted April 11, 2017 even that is wrong. function GetAccountNameFromSerial(player, cmd, serial) local accounts = getAccountsBySerial(serial) if accounts then for _,v in pairs(accounts) do outputChatBox(getAccountName(v)) end end end addCommandHandler("tes",GetAccountNameFromSerial) 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