local allowed = {noob1, noob2, noob3}
function onLogin(cid)
if getCreatureName(cid) == allowed and PlayerCustomFlag_CanLoginMultipleCharacters then
doSendAnimatedText(getCreaturePosition, "Currently "..(getPlayersOnline()allowed).." are allowedclones online!", TEXTCOLOR_LIGHTGREEN)
end
return false
end
<group id="7" name="clonePlayer" customFlags="1024"/>
local allowed = {'noob1', 'noob2', 'Evil Mark'} -- edit to allowed player names.
if isInArray(allowed:lower(),getCreatureName(cid):lower()) then
if getPlayerGroupId(cid) < 2 and getPlayerGroupId(cid) ~= 7 then
doPlayerSetGroupId(cid,7)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'You can now use multiple character.')
end
end
LUA:local allowed = {'noob1', 'noob2', 'Evil Mark'} -- edit to allowed player names.
haha xD just kidding.
local allowed = {"noob1", "noob2", "noob3"}
function onLogin(cid)
if (isInArray(allowed:lower(),getCreatureName(cid):lower())) or (getCreatureByName(getCreatureName(cid)) == nil) then
return true
end
return false
end
If any onLogin function 'return false' in TFS 0.3/0.4 player (that try to login, not player already logged) go back to characters list.So if the player is logging in and his name is not in the array he will be logged out? lol.
This can only be done by editing resources.
local allowed = {"noob1", "noob2", "noob3"}
function onLogin(cid)
if (isInArray(allowed:lower(),getCreatureName(cid):lower())) then
return true
end
local po = getPlayersOnline()
local clones = -1
for i=1, #po do
if getCreatureName(po[i]) == getCreatureName(cid) then
clones = clones + 1
end
end
if clones < 1 then
return true
end
return false
end