• 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!

message on login

Larb

New Member
Joined
Nov 26, 2016
Messages
85
Reaction score
1
i need player receive message on login if mail is empty
i tried

Lua:
local mail = db.storeQuery("SELECT email from accounts where email = '';")
    if mail == true then
       player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "xx")
end

but not have success =x
sry my english
 
Solution
Lua:
local mail = db.storeQuery("SELECT `email` FROM `accounts` WHERE `id` = ".. player:getAccountId() .. ";")
if mail then
   player:sendTextMessage(MESSAGE_EVENT_ADVANCE, result.getString(mail, "email"))
end
Lua:
local mail = db.storeQuery("SELECT `email` FROM `accounts` WHERE `id` = ".. player:getAccountId() .. ";")
if mail then
   player:sendTextMessage(MESSAGE_EVENT_ADVANCE, result.getString(mail, "email"))
end
 
Solution
Lua:
local mail = db.storeQuery("SELECT `email` FROM `accounts` WHERE `id` = ".. player:getAccountId() .. ";")
if mail then
   player:sendTextMessage(MESSAGE_EVENT_ADVANCE, result.getString(mail, "email"))
end
Perfect thank you very much
 
Back
Top