Author Topic: Dedicated Default minigame script  (Read 2097 times)

Someone made this for me, that someone is in bed now, and it didn't work.
I tried to fix it, but can't figure out what is wrong.

The only part that doesn't work is the freaking ski's dont get put in your inventory.

Code: [Select]
//--------------------
// Name: Ski Minigame
// Author: Censord
//--------------------

package skiMinigame
{
function gameConnection::onClientEnterGame(%this)
{
parent::onClientEnterGame(%this);

skiMinigame.addMember(%this);
}

function serverCmdteamMessageSent(%client, %text)
{
%minigame = %client.minigame;
%client.minigame = "";

parent::serverCmdteamMessageSent(%client, %text);

%client.minigame = %minigame;
}

function serverCmdcreateMiniGame(%client)
{
return;
}

function serverCmdleaveMiniGame(%client)
{
return;
}
};

activatePackage(skiMinigame);

new scriptObject(skiMinigame)
{
class = miniGameSO;

brickDamage = false;
brickRespawnTime = 10000;
colorIdx = -1; // minigame color, -1 for no color (default)

enableBuilding = false;
enablePainting = true;
enableWand = false;
fallingDamage = false;
inviteOnly = true;

points_plantBrick = 0;
points_breakBrick = 0;
points_die = 0;
points_killPlayer = 0;
points_killSelf = 0;

playerDatablock = PlayerStandardArmor;
respawnTime = 1000;
selfDamage = false;

playersUseOwnBricks = false;
useAllPlayersBricks = false;
useSpawnBricks = false;
VehicleDamage = false;
vehicleRespawnTime = 5000;
weaponDamage = true;

startEquip0 = "SkiItem";
StartEquip1 = " NONE";
StartEquip2 = " NONE";
StartEquip3 = " NONE";
StartEquip4 = " NONE";

numMembers = 0;
};

function gameConnection::onClientEnterGame(%this)
The problem is that you can't package onClientEnterGame
Instead, package GameConnection::autoAdminCheck(%this)


Code: [Select]
inviteOnly = true; Possibly something to do with it.

I'd package GameConnection::spawnPlayer and see if you have a variable that says they've been entered, force them to enter, and then set the variable to say they've entered to true.


Also Chrono, that'd probably force spawn them, and all around be a bad idea.

function gameConnection::onClientEnterGame(%this)
The problem is that you can't package onClientEnterGame
Instead, package GameConnection::autoAdminCheck(%this)

Yes you can? It works for me.

He probably got mixed up with the onConnect method which you can't package.

I figured that I'd better not remake a new topic and this si semi close to what I need, so yea.
And, If you post anything in suggestions, it gets ignored and thrown into the pits of oblivion.

I need a defaultminigame script for a dedicated server that works. The one I use works for a little while, but then it quits for no apparent reason.

Script would be appreciated.