GM Exploze
Member
- Joined
- Aug 6, 2014
- Messages
- 90
- Reaction score
- 8
@Ezzz - How would I go about getting the message "New record: 1 players are logged in."
function onLogin(cid)
local PlayersStorage = 14301
local i = 1
for _, pid in ipairs(getPlayersOnlineList()) do
i = i + 1
end
local current = i - 1
if getGlobalStorageValue(PlayersStorage) == nil then
setGlobalStorageValue(PlayersStorage, 0)
end
oldRecord = getGlobalStorageValue(PlayersStorage)
if current > oldRecord then
addEvent(doBroadcastMessage, 150, "New record: " .. current .. " players are logged in.", MESSAGE_STATUS_DEFAULT)
setGlobalStorageValue(PlayersStorage, current)
end
return true
end
<event name="PlayerRecord" type="login" script="record.lua"/>
function doBroadcastMessage(message, class)
local messageClass = class or MESSAGE_STATUS_WARNING
for i, cid in ipairs(getPlayersOnlineList()) do
doPlayerSendTextMessage(cid, messageClass, message)
end
return true
end
check if your broadcast function in .../data/functions.lua looks like that@Peonso, Are ya sure? I did what you said to do and it still doesn't work :\
function doBroadcastMessage(message, class)
local messageClass = class or MESSAGE_STATUS_WARNING
for i, cid in ipairs(getPlayersOnlineList()) do
doPlayerSendTextMessage(cid, messageClass, message)
end
return true
end
@Peonso, Hello again; my teleport aren't working on my server. I set the coordination in the map editor but it doesn't teleport me anywhere. It just let's me stand on top of it. I checked items.xml and it says type="teleport", so I have no idea what's going on.
Thanks to you or anyone who can help me out.
@Peonso
I think you're testing OTHire a lot. So can you post, what's wrong with this engine? I mean bugs that only be fixed via sources.
Regards~
@Peonso
I think you're testing OTHire a lot. So can you post, what's wrong with this engine? I mean bugs that only be fixed via sources.
Regards~
You dont have to , I converted gesior latest to work with otserv and this is otserv so :https://github.com/TwistedScorpio/OTHire/wiki/How-to-use-RME-for-this-OTServer
I don't know any bugs, still not tested files Ezzz posted a page ago. I run into some issues, like this record one, because I'm converting ZnoteAAC to work with it.
You dont have to , I converted gesior latest to work with otserv and this is otserv so :
http://otland.net/threads/gesior-2012-version-1-0-2-for-otserv-0-6-3-and-older.186242/
@Peonso - This is what I already use..
There is global.lua and functions.lua in data folder.@Nottinghster - There is no lib folder, how would we go about that?
And what about bugs instead of this that have fixes in this thread? Is there some to fix in sources?I've tested OTHire alot too, and posted some fixes here on thread, check it