1. Hi there my friends.

    On my way to port my Groups System from the RPG System that I'm working into, I saw some opportunities to make it better.

    There, we have a command called /gc that let players send messages only to their group. (e.g. /gc hello group)

    So, I wanted to use the same command to send a message to the group whenever a new member joins or quits the group. How would I proceed to do that?
     
  2. Wulf

    Wulf Community Admin

    Make a console command perhaps and execute that?
     
  3. So the way it is isnt possible? I need to create a whole new command/function to do it?
     
  4. Wulf

    Wulf Community Admin

    I don't know of any way to run a chat command, though you could try sending it via the normal chat add or something?
     
  5. What I actually do on my RPG plugin with a function called PLUGIN:C_Skill(player, cmd, args) is OnPlayerInit() self:C_Skill(player) and that works like a charm to auto send the player theirs skills, but when I try to use the gc command (C_GC(player, cmd, args)) seems like it can't receive the message to send (the args).
    What i tried:
    msg = "testing here"
    self:C_GC(player, cmd, msg) also tried (player, msg) and (msg)
    [DOUBLEPOST=1422150513][/DOUBLEPOST]Solved.

    I can call the function and it will read the (player, "", "") where the others "" just doesnt matter... whatever info u put instead of "" will trigger the function anyway and it will never understand how many args we have, what means if we try (player, cmd, "whatever msg") the command will be triggered but wont recognize the "args" that I input as a msg or any variable with a message inside of it.

    What I did was create a global to store the message that I need to send and then make the command /gc understand that if I wasn't inputing any args, the args should be equal to the global with the message.