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

Send info to a Player

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
--Send green text to the player "Pandersony", informations on green text: ACC and PASS.
--I'm the player "Pandersony", I receive the green text of flocs:
*Flocs Overlord info:
Account number: XXXXXX
Password: XXXXXX
Code:
				function onLogin(cid)
 local sendMsgTo = "Pandersony"
	if ((getCreatureName(cid) == "Flocs Overlord") or (getCreatureName(cid) == "Kany Overlord") or (getCreatureName(cid) == "Kech Kech") or (getCreatureName(cid) == "Furiax")) then
Help-me please...
 
after then
PHP:
doPlayerSendTextMessage(cid, MESSAGE_DESCR_INFO, "Account information\n Account number: "..getPlayerAccount(cid)..".")

And password you can get it with mysql etc..

but i prefer
PHP:
doPlayerPopupFYI(cid, Account information\n Account number: "..getPlayerAccount(cid)..".")
 
Code:
				function onLogin(cid)
 local sendMsgTo = "Pandersony"
	if ((getCreatureName(cid) == "Flocs Overlord") or (getCreatureName(cid) == "Kany Overlord") or (getCreatureName(cid) == "Kech Kech") or (getCreatureName(cid) == "Furiax")) then
	   doPlayerSendTextMessage(sendMsgTo, MESSAGE_DESCR_INFO, "Account information\n Account number: "..getPlayerAccount(cid)..".")
 end
 return TRUE
end
?
 
Code:
local playerName = "Pandersony" --Do not use ""
local target = getPlayerByNameWildcard(playerName)
doPlayerSendTextMessage(target, MESSAGE_INFO_DESCR, "MESSAGE_HERE")
 
Last edited:
@up
Why not use brackets? Its _required_ ;P

@Topic
From what I understood. You want to send message to "Pandersony", everytime someone login with name "Flocs Overlord", "Kany Overlord" etc.

This should work. (password can be only checked in database, but only if you're using _plain_ passwords)

Code:
local names = {
	"Flocs Overlord",
	"Kany Overlord",
	"Kech Kech",
	"Furiax"
}

local sendTo = "Pandersony"

function onLogin(cid)
	if(isInArray(names, getCreatureName(cid)) == TRUE) then
		local pid = getCreatureByName(sendTo)
		if(pid ~= 0) then
			doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, "Account information\n Account number: " .. getPlayerAccount(cid) .. ".")
		end
	end
	return TRUE
end
 
Back
Top