Add plr chat event
This commit is contained in:
@@ -74,7 +74,7 @@ bindEventHandler("OnResourceStart", thisResource, function(event, resource) {
|
|||||||
|
|
||||||
//createAllLocationBlips();
|
//createAllLocationBlips();
|
||||||
|
|
||||||
serverData.saveDataIntervalTimer = setInterval(saveAllServerDataToDatabase, 600000);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -124,3 +124,15 @@ addEventHandler("onEntityProcess", function(event, entity) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
addEventHandler("onPlayerChat", function(event, client, messageText) {
|
||||||
|
event.preventDefault();
|
||||||
|
if(!getClientData(client).loggedIn) {
|
||||||
|
messageClientError(client, "You need to login before you can chat!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
message(`${getClientSubAccountName(client)}: [#FFFFFF]${messageText}`, getClientChatColour(client));
|
||||||
|
});
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
Reference in New Issue
Block a user