Raised This Month: $32 Target: $400
 8% 

Solved [L4D] Help ordering text.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
monkaS
Junior Member
Join Date: Feb 2021
Old 02-25-2021 , 07:55   [L4D] Help ordering text.
Reply With Quote #1

Currently attempting to make a simple command that when typed, all commands people can use are printed to console. The issue is it's not printing it in order. I'm completely new to coding in general and any help is appreciated. Sorry if it's an easy fix.

This is what I've got so far:


Code:
#include <sourcemod>

public OnPluginStart()
{
RegConsoleCmd("sm_commands", Command_commands);
}

public Action Command_commands(int client,int args)
{
PrintToChat(client, "List printing to console....");
PrintToConsole(client, "|------------------------------------------------------------------------------------------------------|");
PrintToConsole(client, "|                                             Join Commands                                            |");
PrintToConsole(client, "|------------------------------------------------------------------------------------------------------|");
PrintToConsole(client, "|  - !join - Join a survivor slot.                                                                     |");
PrintToConsole(client, "|  - !js - Join a survivor slot.                                                                       |");
PrintToConsole(client, "|  - !spec - Join spectators.                                                                          |");
PrintToConsole(client, "|------------------------------------------------------------------------------------------------------|");
PrintToConsole(client, "|                                             Kill Commands                                            |");
PrintToConsole(client, "|------------------------------------------------------------------------------------------------------|");
PrintToConsole(client, "|  - !kill - Kills the survivor you're currently playing as.                                           |");
PrintToConsole(client, "|  - !killbots - Kills all the bots.                                                                   |");
PrintToConsole(client, "|  - !sb - Teleports all bots to your location and then they're killed a few seconds later.            |");
PrintToConsole(client, "|------------------------------------------------------------------------------------------------------|");
}
EDIT: I'm dumb.

Last edited by monkaS; 02-25-2021 at 11:24. Reason: Fixed
monkaS is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 02-25-2021 , 17:15   Re: [L4D] Help ordering text.
Reply With Quote #2

Seem that you solved, but I don't think you are "dumb"
Sometimes I notice that the prints to console / chat in L4D can have a random order, but if you type the command again, it goes back to normal.
__________________
Marttt is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode