Hello everyone! I need help modding this script from Basic Admin Essentials 2.0! This script below is the script that sends a PM (Private Message) to a user.
Is ‘Admin’ a variable initiated previously? If it is then you would need to place quotation marks before and after where it says Admin as it isn’t calling the variable, it’s just continuing the string.
Unfortunately, it is not. I need help with trying to state the admin level, then placing it within the line of code. All though on the bright side, I know this is possible because other groups are currently doing it/using it.
Personally, I would initiate the variable first as a blank variable, like so
local Admin
After that I would then set the Admin variable based on whether the player has ranks in a group, is in a group, or etc.
This would become something like:
local Admin
if Player:GetRankInGroup(GroupId) => 100 then
Admin = "Admin"
elseif Player:IsInGroup(GroupId) then
Admin = "Member"
else
Admin = "Guest"
end
I have the source code already, it’s just that the admin levels are defined in the module script but the action of the PM being sent is done in another script “Essentials Code”. Therefore I’m confused on how to define the admin level, because it’s supposed to vary between which admin level the player is. There are multiple admin levels and they are given upon joining based on your rank. I think it would require under standing of Basic Admin Essentials to make it work.
Check the player rank and determine whether to add “[Admin]” next to the name or not.
local SenderStr = player.Name
if not (playerRank < 1) then
SenderStr = "[Admin] " .. SenderStr
end
It would be easier to create your own admin system so you’d know what you were doing, rather than editing someone else’s previously written system and trying to decipher what they wrote.
The only thing about this is that it gets the rank of the player when its supposed to be getting the rank of the sender and displaying it to the other player.
I am not familiar with “Basic Admin Essentials” but, I think if you can get the rank of that user you can set it up with rich text doing something like this.
local rank = "rank you got from the system"
pendNotif("Private Message","From "..Sender.. '<font transparency="0.65"><font face="Gotham">'..rank..'</font></font>',{"Receive",Sender,Data,true,ID}