Jailbreak

Full Version: Help with scripting please
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Tragen47

Hello, I have started hosting one server and I want to make some scripts for it.
I made folder, put there server.cs, namecheck.txt and description.txt.
I wanted to make script that player when spawns (not connects) automatically inputs console command.
I do script like this:

function Client::GameConnection::onClientEnterGame()
{
    echo(%client, "AWS_bindtexture()");
}

But, unfortunately it doesn't work. What did I do wrong and how to make script always running when someone spawns in game?????????
You can't directly run eval on clients that connect to your server. The only way to run functions on the client from the server is if it's a clientCmd. AWS_bindTexutre(); is from the cinema mod I'm assuming, and is not a clientCmd so they have to enter it manually.

This won't work eitherway though as the client class is called GameConnection so it would be function GameConnection::onClientEnterGame(%client). You didn't include the %client variable so it would be nothing in this case.