Hi, I'm trying to make a random number generator for TF2 and I'm a little confused. I'm not very proficient at coding but this is what I have so far. At the start of every round I'm trying to have it input a random number 1-9 in game chat.
#include <sourcemod>
#include <tf2_stocks>
public OnPluginStart()
{
HookEvent("player_spawn", Event_Spawn);
}
public random()
{
import random
n = random.randint(1,9)
{
ServerCommand("say
}
public Action:Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (client <= 0 || client > MaxClients) return;
new teamid = GetClientTeam(client)
if(teamid == 2)
{
ServerCommand("say ")
}
}