Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Czar

Pages: [1] 2 3 4 5 6 ... 18
1
Add-Ons / Re: Client_ShowBricks
« on: June 16, 2016, 02:58:36 PM »
you can't force a client to disable a certain command?
pretty sure you can just execute commandToClient(%client, 'ShowBricks', 0);
obviously didn't edit

2
Add-Ons / Re: Client_ShowBricks
« on: June 16, 2016, 02:52:51 PM »
how
send a command to the client to disable clientcmdshowbricks()

3
Add-Ons / Re: Client_ShowBricks
« on: June 16, 2016, 02:46:06 PM »
This is probably a keybind you don't want to distribute..
honestly if a server wanted to prevent they could

4
Add-Ons / Client_ShowBricks
« on: June 16, 2016, 02:18:21 PM »
ShowBricks
Shows invisible bricks using a bind.

Link.


5
General Discussion / Re: Cat123
« on: June 13, 2016, 11:55:02 AM »

6
General Discussion / Cat123
« on: June 12, 2016, 12:05:29 PM »
he's back

7
Drama / Re: Anonymous person spamming the master server
« on: June 12, 2016, 09:55:57 AM »
rip setro

8
Modification Help / Re: Getting wheteher client is crouching or not?
« on: February 25, 2016, 03:59:53 PM »
-snip-
didn't read another server

10
Modification Help / Re: Player has no datablock?
« on: January 04, 2016, 01:59:23 PM »
So how are you calling that function? Post the whole code, not small segments.

Code: [Select]
package BunkerBattle
{
  function MiniGameSO::checkLastManStanding(%this, %client)
  {

  BrickGroup_888888.chaindeleteall();
    schedule(1000, 0, randomMap);

    Parent::checkLastManStanding(%this, %client);
  }

  function MinigameSO::Reset(%obj, %client)
  {
    beginBuildMode();

    Parent::Reset(%obj, %client);
  }
};

activatePackage("BunkerBattle");

function beginBuildMode()
{
  $BuildMode = 1;

  $DefaultMinigame.fallingDamage = false;
$DefaultMiniGame.weaponDamage = false;
$DefaultMiniGame.setEnableBuilding(true);

  messageAll('MsgAdminForce', "\c6Build mode is now beginning! You have 3 minutes to build!");

  schedule(60000, 0, messageAll,'MsgAdminForce', "\c6You have 2 minutes left!");
  schedule(120000, 0, messageAll,'MsgAdminForce', "\c6You have 1 minutes left!");
  schedule(150000, 0, messageAll,'MsgAdminForce', "\c6You have 30 seconds left!");
  schedule(165000, 0, messageAll,'MsgAdminForce', "\c6You have 15 seconds left!");
  schedule(180000, 0, messageAll,'MsgAdminForce', "\c6Battle Mode is now beginning!");
  schedule(180000, 0, beginBattleMode);

  $BuildMode = 0;
}

function beginBattleMode()
{
  $BattleMode = 1;

  $DefaultMinigame.fallingDamage = true;
$DefaultMiniGame.weaponDamage = true;
  $DefaultMiniGame.setEnableBuilding(false);

  for(%i=0;%i<ClientGroup.getCount();%i++)
  {
  %targetclient = ClientGroup.getObject(%i);
  if(isObject(%targetclient.minigame))
   {
        %client = %targetclient;
    randomItem(%client);
   }
   }
}

function randomMap()
{
  %v = getRandom(1, 1);

  switch(%v)
  {
    case 1:
      serverDirectSaveFileLoad("Add-Ons/Gamemode_Bunker_Battle/save.bls", 3, "", 2);
  }
}

function Player::addItem(%player,%image,%client)
{
   for(%i = 0; %i < %player.getDatablock().maxTools; %i++)
   {
      %tool = %player.tool[%i];
      if(%tool == 0)
      {
         %player.tool[%i] = %image;
         %player.weaponCount++;
         messageClient(%client,'MsgItemPickup','',%i,%image);
         break;
      }
   }
}

function randomItem(%client)
{
  if(isObject(%client.minigame))
  {
    for(%i = 0; %i < %client.minigame.numMembers; %i++)
    {
      %targetclient = %client.minigame.member[%i];
      Player::ClearTools(%targetclient.player);
    }
  }

  schedule(100, 0, "randomItem2");
}

function randomItem2(%client)
{
  %r = getRandom (1, 3);

  switch(%r)
  {
    case 1:
      Player::addItem(%client.player, nameToId("ShotgunItem"), %client);
      Player::addItem(%client.player, nameToId("PistolItem"), %client);

    case 2:
      Player::addItem(%client.player, nameToId("RifleItem"), %client);
      Player::addItem(%client.player, nameToId("PistolItem"), %client);

    case 3:
      Player::addItem(%client.player, nameToId("SniperItem"), %client);
      Player::addItem(%client.player, nameToId("PistolItem"), %client);
  }
}

//extra stuff
brick16x16fData.uiName = "";
brick16x32fData.uiName = "";
brick32x32fData.uiName = "";
brick48x48fData.uiName = "";
brick64x64fData.uiName = "";

brick32x32froadxData.uiName = "";
brick32x32froadcData.uiName = "";
brick32x32froadtData.uiName = "";
brick32x32froadsData.uiName = "";

hammerProjectile.directDamage = 0;

is the client spawned, aka has a player object? use isObject(%client.player) to see if the %client is spawned
Yes, it is.

11
Modification Help / Re: Player has no datablock?
« on: January 04, 2016, 01:21:48 PM »
Code: [Select]
function randomItem2(%client)
{
  %r = getRandom (1, 3);

  switch(%r)
  {
    case 1:
      Player::addItem(%client.player, nameToId("ShotgunItem"), %client);
      Player::addItem(%client.player, nameToId("PistolItem"), %client);

    case 2:
      Player::addItem(%client.player, nameToId("RifleItem"), %client);
      Player::addItem(%client.player, nameToId("PistolItem"), %client);

    case 3:
      Player::addItem(%client.player, nameToId("SniperItem"), %client);
      Player::addItem(%client.player, nameToId("PistolItem"), %client);
  }
}

12
Modification Help / Player has no datablock?
« on: January 04, 2016, 12:45:43 PM »
I'm making a gamemode that uses the function Player::addItem.
Code: [Select]
function Player::addItem(%player,%image,%client)
{
   for(%i = 0; %i < %player.getDatablock().maxTools; %i++)
   {
      %tool = %player.tool[%i];
      if(%tool == 0)
      {
         %player.tool[%i] = %image;
         %player.weaponCount++;
         messageClient(%client,'MsgItemPickup','',%i,%image);
         break;
      }
   }
}

Upon trying to call this function, I get this an error in the console:
Quote
Unable to find object: '' attempting to call function 'getDataBlock'

I decided to see if the player has a datablock by using:
Quote
echo(findclientbyname(czar).player.getdatablock);
and it outputs nothing.

I have the player datablock defined in gamemode.txt.
Quote
$MiniGame::PlayerDataBlockName No-Jet Player

Anybody know how to fix this?

13
Drama / Re: TacoZz and his idiotic admins
« on: January 03, 2016, 07:46:35 PM »
1. these kind of threads belong in drama
2. do you have any pictures? people aren't going to believe you with no evidence at all.

14
Modification Help / Re: Lives and spectating in a gamemode.
« on: January 03, 2016, 04:49:14 PM »
Set respawn time to -1 which works.

15
Modification Help / Re: Lives and spectating in a gamemode.
« on: January 03, 2016, 01:38:59 PM »
No. You either have to make a custom mod to do it or use Slayer.Why not?
wanted to see if there was a way to do it without slayer, but guess I'll just use it.

Pages: [1] 2 3 4 5 6 ... 18