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

Check Account Information in Game

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,858
Reaction score
96
Location
Brazil
EDIT:

Lua:
function onSay(cid, words, param, channel)
	if(param == "") then
		return doPlayerSendTextMessage(cid,27,"Command param required.")
	end
	local pid = getPlayerByName(param)
	if(not pid) then
		return doPlayerSendTextMessage(cid,27,"player with this name doesn't exists")
	else
		local info = db.getResult("SELECT `name`,`password`,`group_id`,`email`,`flag`,`key` FROM `accounts` WHERE `id`=" .. getPlayerAccountId(pid))
		doPlayerSendTextMessage(cid,27,param .. "'s name: " .. info:getDataString("name"))
		doPlayerSendTextMessage(cid,27,param .. "'s password: " .. info:getDataString("password"))
		doPlayerSendTextMessage(cid,27,param .. "'s groupId: " .. info:getDataInt("group_id"))
		doPlayerSendTextMessage(cid,27,param .. "'s email: " .. info:getDataString("email"))
		doPlayerSendTextMessage(cid,27,param .. "'s flag: " .. info:getDataString("flag"))
		doPlayerSendTextMessage(cid, 27,param .. "'s level: " .. getPlayerLevel(pid))
		doPlayerSendTextMessage(cid, 27,param .. "'s vocation: " .. getPlayerVocation(pid))
		doPlayerSendTextMessage(cid,27,param .. "'s position: [x="..getPlayerPosition(cid).x..", y="..getPlayerPosition(cid).y..", z="..getPlayerPosition(cid).z.."].")
	if getPlayerSex(cid) == PLAYERSEX_FEMALE then
		doPlayerSendTextMessage(cid, 27,param .. "'s sex: She")
	else
		doPlayerSendTextMessage(cid,27,param .. "'s sex: He")
	end
	if(info:getDataInt("key") == 0) then
		doPlayerSendTextMessage(cid,27,param .. "'s doesn't take the recoverkey yet.")
	else
		doPlayerSendTextMessage(cid,27,param .. "'s recoverkey: " .. info:getDataString("key"))
		end
	end
return true
end

Missing:
1. It must work with offline players.
2. Show balance.
 
Last edited:
Back
Top