Jump to content

Search the Community

Showing results for tags 'scripting'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Gamers Lounge
    • Announcements
    • General Discussion
  • Area 51 - Development Zone
    • silEnT Mod - Enemy Territory
    • LESM - Lua Enhanced Server Mod
    • Omnibot - Development, Discussion & Support
    • Enemy Territory Modding
  • Guides, Reviews & Support
    • A Collection of Essential Guides
    • Mod and Software Downloads
    • Game Server Hosting, Support and Reviews
    • Web Hosting, Development & Reviews
  • Help & Discussion Center
    • OS Customization, Discussion and Support
    • PC, Console & Mobile Gaming
    • Programming (C#, C++, JAVA, VB, .NET etc.)
  • Advertising Forums
    • Clans / Guilds and Gaming Communities
    • Game Server and Voice Server Offers


  • Enemy Territory
    • Software
    • Mods
    • LUA
    • Maps
    • Map Scripts
    • Soundack
  • Call of Duty 4
    • Mods


  • News
    • PC Gaming
    • Console Gaming
    • World
    • Entertainment
    • Science
    • Technology
    • Software

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 1 result

  1. I am working on teaching myself Lua for modifying ET. So far, it has been going very well, but I ran into a problem that I am having a hard time figuring out. I'm trying to use the following function... clientnum = et.G_ClientNumberFromString( string ) Here is the code that I am using... function et_ClientCommand(clientNum, command) if et.trap_Argv(0) == "listclientnumber" then if et.trap_Argc() == 2 then local targetClientNum = et.G_ClientNumberFromString(et.trap_Argv(1)) et.trap_SendServerCommand(clientNum, string.format("cpm \"%d\"", targetClientNum)) else et.trap_SendServerCommand(clientNum, "cpm \"Error: Need two arguments!\"") end return 1 end return 0 end When I execute the command to run the above code (e.g. "/listclientnumber JvI" in my game console), ET gives an unknown command error due to the G_ClientNumberFromString line. Even if I manually put a string instead of using the argument for the parameter, I still have this problem. If I remove that line and modify the line below it to just print text, it works exactly as intended. The client number function was directly from the lua.html that's located in the silent zip archive. Am I using it incorrectly, or is the documentation possibly out of date? My second question is what is the best way to print text to a clients console? I noticed cpm acts just like echo and also flashes the text on the left side of the main screen. I'd prefer if there was a way of only printing to the console instead so my custom command behaves closer to the built in admin commands. For my last question, is there any way to define standard admin commands that start with '!' instead of the console commands that start with '/' through Lua. I know you can map the admin commands to the console commands, but then I need to restrict the level in the script as well as the shrubbot.cfg file to prevent everyone from using it. Or perhaps there is another way to do this? Thanks, JvIasterMind
  • Create New...