• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Is player guest/subowner to house? getHouseAccessList code not working :(

Avalanchases

Member
Joined
Mar 8, 2016
Messages
21
Reaction score
12
Hello, I'm making a system that identify if a player is owner, subowner or guest by fetching the names of the invitations lists..

Everything worked fine.. excellent.. until I added more than 1 name to the list.. since that.. it doesn't work at all anymore..

I'm using this:
PHP:
for _, name in ipairs(getHouseAccessList(house_id, 0x100):explode("\n")) do

I tested to make debugprint and sendplayertexmessage with the getHouseAccessList code.
And in both places they split the lines for each name, but doesn't show a visible \n

But when I use the function mentioned in the quote, it doesn't seem like it run one time for each name.
it actually just run 1 time and throw all names into same place..

I tried this:
PHP:
for _, name in ipairs(getHouseAccessList(house_id, 0x100):explode("\n")) do
doPlayerSendTextMessage(cid, 22, name)
end

And I used 5 names in the guest list, this should spamm me down with 5 messages with 1 name per message.
But instead, I get 1 message with all names in it. And the message is also having split lines.. so I get 1 message that take 5 rows in default channel.

So.. What am I missing? how can I correct this?


Edit:
Expectation:
19:28 Name One
19:28 Name Two
19:28 Name Three
19:28 Name Four
19:28 Name Five

Reality: (notice that the name isn't in 1 line, but it's a split line, with new row per name)
19:28 Name One
Name Two
Name Three
Name Four
Name Five
 
Back
Top