Jump to content

Fonseca Games

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Fonseca Games

  • Rank
    On the Coast

Profile Information

  • Gender
    Male

Contact Methods

  • Discord
    fonseca7809
  1. Fonseca Games

    Console Admin Tool

    If you mean for checking if that player could type that cmd, I already do this, I have a list of SteamID like 'Admins', only them have the hability to execute the cmds. The point is, I don't want other players see the cmd when the adms execute the command near, on this case they even don't know that the adms are online. I already tried this, to return without call the super function, didn't work as well. I think this isn't possible without a mod on client side. Do you know if I can detect a key press on server side? because this is could be an option to 'hide' cmds.
  2. Fonseca Games

    Console Admin Tool

    The same, I'm still able to see the cmds close. I don't know how the messages are sent from the sender to the server and other players, but looks like they aren't managed by this event.
  3. Fonseca Games

    Console Admin Tool

    Not sure if I did correct, but on the way I tried didn't worked. class AdmMissionServer : MissionServer { override void OnEvent(EventType eventTypeId, Param params) { if (eventTypeId == ChatMessageEventTypeID) { ChatMessageEventParams chat_params = ChatMessageEventParams.Cast( params ); if (chat_params.param2 == "") return ; PlayerBase player = GetPlayer(chat_params.param2); if(player == NULL) return ; string message = chat_params.param3, prefix, param0, command; TStringArray tokens = new TStringArray; message.Split(" ", tokens); int count = tokens.Count(); param0 = tokens.Get(0); param0.ParseStringEx(prefix); if(prefix != "!") return ; param0.ParseStringEx(command); bool isValidCmd = true; switch (command) { case "heal": { /*Do Heal function*/ break;} case "tp": { /*Teleport function */ break;} default :{ isValidCmd = false; } } if (isValidCmd) { ChatMessageEventParams chat_params = ChatMessageEventParams.Cast(params); Param new_params = new Param4<int, string, string, string>( chat_params.param1, chat_params.param2, "", chat_params.param4 ); super.OnEvent(eventTypeId, new_params); } else { super.OnEvent(eventTypeId, params); } } else { super.OnEvent(eventTypeId, params); } } } Basically the change is this, here I tested make the user empty as well, but still see the messages around. ChatMessageEventParams chat_params = ChatMessageEventParams.Cast(params); Param new_params = new Param4<int, string, string, string>( chat_params.param1, "", "", chat_params.param4 ); super.OnEvent(eventTypeId,new_params);
  4. Fonseca Games

    Console Admin Tool

    When you say 'call with a special way' you mean by RPC the OnChat? Oh, I've tested changed the channel but didn't think to make the message empty, I'll try and let you know. tnks
  5. Fonseca Games

    Console Admin Tool

    Ok, so sorry. Follow an example of my code, it's very simple. Basically I keep monitoring the onEvent on mission server for the ChatMessageEventTypeID, and then check if is a valid command and execute it. The only difference to the original code, is that I splited in other files to keep organized, but this is the concept, follow the same principle of the older versions of admin chat commands. I've tried to don't call the super function when received a valid command, but didn't worked. class AdmMissionServer : MissionServer { override void OnEvent(EventType eventTypeId, Param params) { super.OnEvent(eventTypeId,params); if (eventTypeId == ChatMessageEventTypeID) { ChatMessageEventParams chat_params = ChatMessageEventParams.Cast( params ); if (chat_params.param2 == "") return ; PlayerBase player = GetPlayer(chat_params.param2); if(player == NULL) return ; string message = chat_params.param3, prefix, param0, command; TStringArray tokens = new TStringArray; message.Split(" ", tokens); int count = tokens.Count(); param0 = tokens.Get(0); param0.ParseStringEx(prefix); if(prefix != "!") return ; param0.ParseStringEx(command); switch (command) { case "heal": { /*Do Heal function*/ break;} case "tp": { /*Teleport function */ break;} } } } }
  6. Fonseca Games

    Console Admin Tool

    Don't understand this unnecessary sarcasm and this kind of comments, I'm just trying to get help to finish a tool for my server, if exists some tool that make what I need, share to me please. And never took any 'medals'. But OK. I've tried modded the chat and/or chat input, but only on server side made no effect.
  7. Fonseca Games

    Admin Freecam

    There is any way to enable freecam for admin without mods on client side?
  8. Fonseca Games

    Console Admin Tool

    I have created a console admin tool, don't have any mods on client side. But every time I type a command, everyone near knows can see on the chat the commands. There is any way to hide those commands, or show just for who type it?
×