Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Interesting, I'll check AIO - that's an addon module right?

[DiscordArchive] Interesting, I'll check AIO - that's an addon module right?

[DiscordArchive] Interesting, I'll check AIO - that's an addon module right?

Pages (2): Previous 1 2
rektbyfaith
Administrator
0
06-09-2023, 07:23 AM
#11
Archived author: Honey • Posted: 2023-06-09T07:23:13.935000+00:00
Original source

That looks like it can do what you need
rektbyfaith
06-09-2023, 07:23 AM #11

Archived author: Honey • Posted: 2023-06-09T07:23:13.935000+00:00
Original source

That looks like it can do what you need

rektbyfaith
Administrator
0
06-09-2023, 07:23 AM
#12
Archived author: ritzmenardi • Posted: 2023-06-09T07:23:30.938000+00:00
Original source

Found it, thanks!
rektbyfaith
06-09-2023, 07:23 AM #12

Archived author: ritzmenardi • Posted: 2023-06-09T07:23:30.938000+00:00
Original source

Found it, thanks!

rektbyfaith
Administrator
0
06-09-2023, 07:40 AM
#13
Archived author: Foe • Posted: 2023-06-09T07:40:30.590000+00:00
Original source

Don't use CreateLuaEvent, use RegisterEvent on the player object from the OnLogin hook
rektbyfaith
06-09-2023, 07:40 AM #13

Archived author: Foe • Posted: 2023-06-09T07:40:30.590000+00:00
Original source

Don't use CreateLuaEvent, use RegisterEvent on the player object from the OnLogin hook

rektbyfaith
Administrator
0
06-09-2023, 07:41 AM
#14
Archived author: Foe • Posted: 2023-06-09T07:41:37.734000+00:00
Original source

CreateLuaEvent is a global, if you're doing it on a per player basis then RegisterEvent runs in the player context
rektbyfaith
06-09-2023, 07:41 AM #14

Archived author: Foe • Posted: 2023-06-09T07:41:37.734000+00:00
Original source

CreateLuaEvent is a global, if you're doing it on a per player basis then RegisterEvent runs in the player context

rektbyfaith
Administrator
0
06-09-2023, 07:50 AM
#15
Archived author: ritzmenardi • Posted: 2023-06-09T07:50:09.712000+00:00
Original source

I see. That makes sense. Thank you!
rektbyfaith
06-09-2023, 07:50 AM #15

Archived author: ritzmenardi • Posted: 2023-06-09T07:50:09.712000+00:00
Original source

I see. That makes sense. Thank you!

rektbyfaith
Administrator
0
06-09-2023, 08:01 AM
#16
Archived author: ritzmenardi • Posted: 2023-06-09T08:01:00.920000+00:00
Original source

Managed to crash my server by setting the periodic events to never expire:

```lua
local function PeriodicSendMessage(eventID, delay, repeats)
-- loop through all players
for _, player in pairs(GetPlayersInWorld()) do
-- Send a chat message to the player.
player:SendBroadcastMessage("This is a periodic message!")
player:RegisterEvent(PeriodicSendMessage, 5000, 1)
end
end

local PLAYER_EVENT_ON_LOGIN = 3

RegisterPlayerEvent(PLAYER_EVENT_ON_LOGIN, PeriodicSendMessage)
```
note the 1 in player:RegisterEvent(PeriodicSendMessage, 5000, 1)

I had that set to 0 originally LOL
rektbyfaith
06-09-2023, 08:01 AM #16

Archived author: ritzmenardi • Posted: 2023-06-09T08:01:00.920000+00:00
Original source

Managed to crash my server by setting the periodic events to never expire:

```lua
local function PeriodicSendMessage(eventID, delay, repeats)
-- loop through all players
for _, player in pairs(GetPlayersInWorld()) do
-- Send a chat message to the player.
player:SendBroadcastMessage("This is a periodic message!")
player:RegisterEvent(PeriodicSendMessage, 5000, 1)
end
end

local PLAYER_EVENT_ON_LOGIN = 3

RegisterPlayerEvent(PLAYER_EVENT_ON_LOGIN, PeriodicSendMessage)
```
note the 1 in player:RegisterEvent(PeriodicSendMessage, 5000, 1)

I had that set to 0 originally LOL

Pages (2): Previous 1 2
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)