Help: I need to convert this C Function to C#..

csharp Venezuela
  • 14 years ago

    Please If anybody can help me..  :)

    public cmdSayChat(id) {

      if (!(get_user_flags(id)&ADMIN_CHAT)) return PLUGIN_CONTINUE

      new saidDevil [6], i=0 


      while (said[i]=='@')


      if ( !i || i > 3 ) return PLUGIN_CONTINUE

      new message[192], a = 0



        case 'r': a = 1

        case 'g': a = 2

        case 'b': a = 3

        case 'y': a = 4

        case 'm': a = 5

        case 'c': a = 6


      new name[32], authid[32], userid



      userid = get_user_userid(id)

      log_to_file(g_logFile,"Chat: ^"%s<%d><%s><>^" tsay ^"%s^"",name,userid,authid,message[i+1])

      log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%s^")",

        name,userid,authid,message[ i+1 ],g_ColorsAngel [A])

      if (++g_msgChannel>6||g_msgChannel<3)

        g_msgChannel = 3

      new Float:verpos = g_Pos[i][1] + float(g_msgChannel) / 35.0

      set_hudmessage(g_ValuesAngel [A][0], g_ValuesAngel [A][1], g_ValuesAngel [A][2],

        g_Pos[i][0], verpos , 0, 6.0, 6.0, 0.5, 0.15, g_msgChannel ) 


    #if defined SHOW_NAMES   

      show_hudmessage(0,"%s :  %s",name,message[i+1]) 

      client_print(0,print_notify,"%s :  %s",name,message[i+1])






      return PLUGIN_HANDLED


Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“C++ : Where friends have access to your private members.” - Gavin Russell Baker