Jump to content
JonSyn

admin tools menu , sorta.

Recommended Posts

and another question i cant find, how do i make colored text in a message?

 

for instance id like this to be red or green

function joinserver()    if not admin.isAdmin then    local SERVER = "[SERVER]";    local join = "Has Joined The Server.";       sendWorldMessage(SERVER .. " : " .. (getOnlineUsername() .. "  " .. join));    elseif admin.isAdmin then	    local SERVER = "[SERVER]";    local join = "Has Joined The Server.";       sendWorldMessage(SERVER .. " : Admin " .. (getOnlineUsername() .. "  " .. join));	endend

joinchat_zps64dc87ef.png

Share this post


Link to post
Share on other sites

 

got a question, is it possible to get the coordinates of a player in MP, like say i wanted someone elses coords, is there anyway to do it in a function based off username?

Would like to now this as well. Curious how this could work, testing the whole day but as of now =>no success.

 

getSpecificPlayer(int):getGridSquare():getX() .etc I'd assume. Too lazy to fact check right at the moment, and it might have to be adjusted for "world" coordiantes.

Share this post


Link to post
Share on other sites

this is what i got and it donta worka, but i really dont understand what im doing beyond the simple  getPlayer():setX(10101); .
it gets a error on the first line in tele()

function tele()                local x = getSpecificPlayer(int):getGridSquare():getX();        	local y = getSpecificPlayer(int):getGridSquare():getY();		local z = getSpecificPlayer(int):getGridSquare():getz();		local ax, ay = ISCoordConversion.ToWorld(x, y, z);		getPlayer():setX(ax);		getPlayer():setY(ay);endfunction ISScoreboard:onContext(button)    local username = self.listbox.items[self.listbox.mouseoverselected].text;    username = '"'..username..'"'    if button.internal == "KICK" then        SendCommandToServer("/kickuser " .. username);    elseif button.internal == "BAN" then        SendCommandToServer("/banuser " .. username);    elseif button.internal == "BANIP" then        SendCommandToServer("/banuser " .. username .. " ip=true");    elseif button.internal == "GODMOD" then        SendCommandToServer("/godmod " .. username);    elseif button.internal == "INVISIBLE" then        tele();    endend

Share this post


Link to post
Share on other sites

 

this is what i got and it donta worka, but i really dont understand what im doing beyond the simple  getPlayer():setX(10101); .

it gets a error on the first line in tele()

function tele()                local x = getSpecificPlayer(int):getGridSquare():getX();        	local y = getSpecificPlayer(int):getGridSquare():getY();		local z = getSpecificPlayer(int):getGridSquare():getz();		local ax, ay = ISCoordConversion.ToWorld(x, y, z);		getPlayer():setX(ax);		getPlayer():setY(ay);endfunction ISScoreboard:onContext(button)    local username = self.listbox.items[self.listbox.mouseoverselected].text;    username = '"'..username..'"'    if button.internal == "KICK" then        SendCommandToServer("/kickuser " .. username);    elseif button.internal == "BAN" then        SendCommandToServer("/banuser " .. username);    elseif button.internal == "BANIP" then        SendCommandToServer("/banuser " .. username .. " ip=true");    elseif button.internal == "GODMOD" then        SendCommandToServer("/godmod " .. username);    elseif button.internal == "INVISIBLE" then        tele();    endend

 

It breaks on the "int", you need to supply the index of the player you're trying to retrieve there afaik.

Share this post


Link to post
Share on other sites

Thought that "getSpecificPlayer" only works for local players (like splitscreen), but if it really works for MP as well then I could simply use "getNumActivePlayers()" and loop through it to use as int.

 

Thanks! Will defo test that!

Share this post


Link to post
Share on other sites

 

I´m trying to implement a different chat-system for MP, I want the default one kinda expanded with wisper, yell, ...

 

let me know if you figure it out, i been trying to find a way to make a admin only channel so only admins can see and one for if you have a radio so you can broadcast and hear only on that channel

Share this post


Link to post
Share on other sites

looking for a way to auto ban players, like in my mod so if they use a specific function from a hack and no admin is on it sends a command to server to ban that ip/player.

as of now i can rick roll a hacker, i can kill a hacker in 17 seconds, and i can tell the other players on the server that a player is a hacker.

next step is a auto ban for hacking.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...