Welcome to Soldier of Fortune Community Forums
28 May 2022, 06:21


View unanswered postsView active topics



Reply to topic  [ 1 post ] 
acdcmd: 6 extra game command 
Author Message
Canada

User avatar

Joined:
Wed Nov 23rd, 2011
Posts: 666
Reply with quote
Author: Acadie
Description: Add 6 command to the game.
Commands:
    cls
  • Alternative to the clear command on client sided. || 50 blank echo on server sided.
     [There is no clear command for server thus, 50 is based on the full screen text mode in a command shell prior to Windows 10. Echoing too many time will result some processing and penalties to the players connected in your server. The command is useless if you are remotely managing the server.]
    ver
  • Display the current game and sofplus version.
    time
  • Display the current time.
    date
  • Display the current date.
    call
  • Call (execute) either a script .cfg file or a function .func file.
  • The extension is required.
  • CALL <filename.func> /i switch will parse for the initialization function using the filename and _init suffix as function name. The initialization function accepts arguments.
    chdir/cdir
  • List files and directories, similarly to the dir /b command from cmd.exe.
  • The CHDIR command is used to Change Directory.
  • 'CHDIR ..' change to the parent directory.
  • 'CHDIR /' or \ change to the root directory of the game.
  • If a directory name contains a space, the whole path must be enclosed in quotes (e.g. chdir "user/new folder/myfolder" || chdir "new folder/myfolder")
  • The CDIR command is used to list files and directories.
  • CDIR /d switch prints how many sub directories and files the selected directory has.
  • CDIR /s switch will display files and all sub directories.
  • The CHDIR alternative CD can be used only if the value of cd_nocd cvar is set to 1 on the command line --> SoF.exe +set cd_nocd "1"

Setup:
- Unzip and place the two files in SOF PLATINUM/user/sofplus
- In autoexec.cfg (located in your base directory. Create one if the file doesn't exist.) or user/sofplus/sofplus.cfg for server, add exec sofplus/acdcmd.cfg on the first line of statement. This will make sure that the new commands will be loaded first for usage in a script file while initializing the game.

Spoiler:


Attachments:
acdcmd.zip [6.17 KiB]
Downloaded 2 times

07 May 2022, 06:53
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 
Topic Views: 59


Who is online

Users browsing this forum: No registered users and 1 guest


Top
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group
www.sof1.org