JonSyn Posted May 10, 2014 Author Share Posted May 10, 2014 cool Link to comment Share on other sites More sharing options...
JonSyn Posted May 11, 2014 Author Share Posted May 11, 2014 and another question i cant find, how do i make colored text in a message? for instance id like this to be red or greenfunction 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 Link to comment Share on other sites More sharing options...
EnigmaGrey Posted May 11, 2014 Share Posted May 11, 2014 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. Dr_Cox1911 and JonSyn 2 Link to comment Share on other sites More sharing options...
JonSyn Posted May 11, 2014 Author Share Posted May 11, 2014 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 Link to comment Share on other sites More sharing options...
turbotutone Posted May 11, 2014 Share Posted May 11, 2014 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. Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted May 11, 2014 Share Posted May 11, 2014 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! Link to comment Share on other sites More sharing options...
JonSyn Posted May 11, 2014 Author Share Posted May 11, 2014 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 Link to comment Share on other sites More sharing options...
Dr_Cox1911 Posted May 11, 2014 Share Posted May 11, 2014 So, hadn´t much time to code today, but I found out that "getNumActivePlayers" doesn´t return the real playercount in MP, only local players. Link to comment Share on other sites More sharing options...
JonSyn Posted May 17, 2014 Author Share Posted May 17, 2014 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. syfy 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now