• Register

Societatem is a Singleplayer & Multiplayer tactical FPS. It features infantry combat with a class system, vehicle combat which currently includes jeeps, tanks and helicopters, and specialized game modes such as Takeover and Infiltration. The infantry features advanced movement such as parkour which includes flipping and climbing over obstacles, leaning around walls and rolling in and out of cover.

Post news Report RSS Chat Commands

Hey guys, thought I would give a quick little update about what's happening in the development of Societatem right now. You can now write commands in chat!

Posted by on

Hey guys. Last night I made the in-game chat double as a command console. To type commands, just add a '/' as the first character in the chat. Currently, there are only 2 commands,

/kill [Player]

/kick [Player]
AdminKick

though more commands will be added for developers, like spawning vehicles and such. The current 2 commands can only be executed by a select number of developers, which at the moment is only me and Chris. More commands for everyone to use will be added soon.

//This is for coding nerds who wants to see how it works

That thing took a lot of splitting and grouping into lists xP. Basically, if it detects that the first char is a '/', it will run a CalculateCommand function. A string is passed into the function, and then it SubString() by 1 to remove the '/'. The resulting string is then Split() by ' ', which is passed into an array. A new string called "MasterCommand" is then set as the first index of this array, and then a new string array, which is the parameters, is set as the rest of the first array. (E.g. parameters[0] = firstArray[1]). Then I just check over the command and make sure it's a command, then checks the amount of parameters, and if everything matches, the command is successfully executed! xD

- William,
RedCrusaderGames

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: