Author Topic: Help (Dont worry, its made)  (Read 1368 times)

This time i stirred up a script, even though, its just an edit of what iban did
Its the build minigame script, tellme if i failed, its in its own little script
buildminigame.cs
Tell me now, how baddly did i fail?:
Code: [Select]
function TribalRP_BuildMinigame()
{  
   if(isObject(TribalRPMini))
   {      
      for(%i = 0;%i < ClientGroup.getCount();%i++)
      {
         %subClient = ClientGroup.getObject(%i);
         TribalRPMini.removeMember(%subClient);
      }
      
      TribalRPMini.delete();
   }
   else
   {
      for(%i = 0;%i < ClientGroup.getCount();%i++)
      {
         %subClient = ClientGroup.getObject(%i);
         %subClient.minigame = NULL;
      }
   }
  
   new scriptObject(TribalRPMini)
   {
      class = miniGameSO;
      
      brickDamage = true;
      brickRespawnTime = 15000;
      colorIdx = -1;
      
      enableBuilding = false;
      enablePainting = false;
      enableWand = false;
      fallingDamage = false;
      inviteOnly = false;
      
      points_plantBrick = 0;
      points_breakBrick = 0;
      points_die = 0;
      points_killPlayer = 0;
      points_killSelf = 0;
      
      playerDatablock = PlayerTribalRPArmor;
      respawnTime = 0;
      selfDamage = false;
      
      playersUseOwnBricks = false;
      useAllPlayersBricks = false;
      useSpawnBricks = false;
      VehicleDamage = false;
      vehicleRespawnTime = 10;
      weaponDamage = false;
      
      numMembers = 0;
      
      // Special:
      vehicleRunOverDamage = false;
   };
  
   TribalRPMini.playerDatablock.maxTools = 9;
  
   for(%i = 0;%i < ClientGroup.getCount();%i++)
   {
      %subClient = ClientGroup.getObject(%i);
      
      if(%subClient.hasSpawnedOnce && isObject(%subClient.getDatum()))
      {
         TribalRPMini.addMember(%subClient);
      }
   }
}
« Last Edit: March 25, 2010, 02:44:26 PM by Light And Day »

Don't worry, the actual script isn't all false and 0, its the NOT real valves, i just made sure nobody would steal it  :cookieMonster:
« Last Edit: March 25, 2010, 02:45:12 PM by Light And Day »

Nobody's going to steal your script, it's nowhere near what an entire mod would be.

Just force the clients to use the commands endminigame, joinminigame, leaveminigame, etc. It'd be a lot simpler. Do you have the function getDatum() or is that left over from when you "converted" it (which is generally a bad idea, by the way)?

Left out. Btw... i did just write some stuff, tell me how i failed?
package EventedBricks1
{
   function fxDtsBrick::onPlant(%brick)
   {
      Parent::onPlant(%brick);
      if(%brick.getDatablock() != SMALLBASELAND)
         return;
      %oldWrenchBrick = %brick.client.wrenchBrick;
      %brick.client.wrenchBrick = %brick;

      %onPlayerTouchIndex = inputEvent_GetInputEventIdx("onPlayerTouch");
      %centerPrintIndex = outputEvent_GetOutputEventIdx("Client","centerPrint");
      %ClientIndex = inputEvent_GetTargetIndex("fxDTSBrick",%onPlayerTouchIndex,"Client");

      serverCmdAddEvent(%brick.client,1,%onPlayerTouchIndex,0,%ClientIndex,-1,%centerPrintIndex,-%<color:eeeeee>You are on <color:ffff00><var:brick:landlord><color:eeeeee>'s Land.);

      %brick.client.wrenchBrick = %oldWrenchBrick;
   }
};
activatePackage(EventedBricks1);

If you worry about people stealing things you won't get any help usually.

If you worry about people stealing things you won't get any help usually.
^_^, thats just being lazy

^_^, thats just being lazy
Yes, I'm too lazy to fix code that I don't have access to. You got me.

Yes, I'm too lazy to fix code that I don't have access to. You got me.
Do not interact with a handicap. You will not win.

Do not interact with a handicap. You will not win.
Bold = Kalphiter To most normal people

Bold = Kalphiter To most normal people
I take it you don't believe most people are normal?

I take it you don't believe most people are normal?
Lets start a pole about how people think of kalphiter.
In of topic, no creativity, defently offtopic? drama? drama...