mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-10-22 16:17:40 +00:00
improvements to many aspects of plugins
This commit is contained in:
1 parent
37d7a289eb
commit
0f5d61c89b
4 files changed
+33
-16
No files matched your search
@@ -5,7 +5,7 @@ function onPluginLoaded()
|
||||
print("HI!")
|
||||
end
|
||||
|
||||
function onPlayerAuthenticated(joined_name)
|
||||
function onPlayerAuthenticated(joined_name, role, is_guest, identifiers)
|
||||
print("hi welcome mista " .. joined_name)
|
||||
|
||||
print("current players:")
|
||||
@@ -14,8 +14,15 @@ function onPlayerAuthenticated(joined_name)
|
||||
end
|
||||
print("yipee")
|
||||
|
||||
print("Player count: " .. MP.GetPlayerCount())
|
||||
|
||||
return 0 -- 0 = do not block
|
||||
end
|
||||
|
||||
MP.RegisterEventHandler("onPluginLoaded", "onPluginLoaded")
|
||||
MP.RegisterEventHandler("onPlayerAuthenticated", "onPlayerAuthenticated")
|
||||
function onPlayerDisconnect(pid)
|
||||
print("Player with PID " .. pid .. " has left!")
|
||||
end
|
||||
|
||||
MP.RegisterEventHandler("onInit", "onPluginLoaded")
|
||||
MP.RegisterEventHandler("onPlayerAuth", "onPlayerAuthenticated")
|
||||
MP.RegisterEventHandler("onPlayerDisconnect", "onPlayerDisconnect")
|
||||
Reference in new issue
Block a user