Author Topic: my player type wont change back to normal  (Read 1257 times)

this is my script hellshero helped me with it

//you can not Self Delete at all
datablock PlayerData(PlayerNoSelf Delete : PlayerStandardArmor)
{
   minJetEnergy = 0;
   jetEnergyDrain = 0;
   canJet = 1;

   uiName = "No-Self Delete Player";
   showEnergyBar = false;
};

package noSelf Delete
{
 function serverCmdSelf Delete(%cl)
 {
  if(!%cl.obj.dataBlock==PlayerNoSelf Delete)
  {
   parent::serverCmdSelf Delete(%cl);
  }
  else
  {
   messageClient(%cl,'',"You cannot Self Delete!");
  }
 }
};
activatePackage(noSelf Delete);

when you go into it and then go to go back to standed player it wont turn back to it
« Last Edit: May 01, 2010, 07:09:59 PM by deathrider »

Only way would be Invincible = 1;

You make a package and make it when you try to Self Delete it checks if you are that player and if you aren't it allows you to Self Delete.

I made this off the top of my head, should work, if you need explaining just ask.
I help people out too much, :/
Code: [Select]
datablock PlayerData(PlayerNoSelf Delete : PlayerStandardArmor)
{
   minJetEnergy = 0;
   jetEnergyDrain = 0;
   canJet = 1;

   uiName = "No-Self Delete Player";
   showEnergyBar = false;
};

package noSelf Delete
{
 function serverCmdSelf Delete(%cl)
 {
  if(!%cl.obj.dataBlock==PlayerNoSelf Delete)
  {
   parent::serverCmdSelf Delete(%cl);
  }
  else
  {
   messageClient(%cl,'',"You cannot Self Delete!");
  }
 }
};
activatePackage(noSelf Delete);


EDIT:
Only way would be Invincible = 1;
Notreally.

ok problem it wont let you change back to standed player


all i found that i think might do something is  $Self Deleteflag=0;

That's just a global variable in the Toggle Self Delete script, it won't help you at all.

Looking at the Toggle Self Delete script won't help you at all really, because it affects the entire server.


There is already a toggle Self Delete script.

Nuff said.
This is the correct way to implement this feature.  What if you want no-jet players or quake-like players to not Self Delete.  A non suiciding player type only allows for one movement possibility.

By the way, you can use code tags to identify and make scripts easier to read. (The white piece of paper with a # on it)

By the way, you can use code tags to identify and make scripts easier to read. (The white piece of paper with a # on it)
so, all i need to know is why wont my playertype wont let me change back to standed

Code: [Select]
//you can not Self Delete at all
datablock PlayerData(PlayerNoSelf Delete : PlayerStandardArmor)
{
   minJetEnergy = 0;
   jetEnergyDrain = 0;
   canJet = 1;

   uiName = "No-Self Delete Player";
   showEnergyBar = false;
};

package noSelf Delete
{
 function serverCmdSelf Delete(%cl)
 {
  if(!%cl.player.getDataBlock().getName()!$="PlayerNoSelf Delete")
  {
   parent::serverCmdSelf Delete(%cl);
  }
  else
  {
   messageClient(%cl,'',"You cannot Self Delete!");
  }
 }
};
activatePackage(noSelf Delete);
Should work. %cl.obj.datablock is nothing.

If the client's player is dead then that will cause console errors. Also what Jetz quoted pretty much makes this useless.

Code: [Select]
//you can not Self Delete at all
datablock PlayerData(PlayerNoSelf Delete : PlayerStandardArmor)
{
   minJetEnergy = 0;
   jetEnergyDrain = 0;
   canJet = 1;

   uiName = "No-Self Delete Player";
   showEnergyBar = false;
};

wont work

package noSelf Delete
{
 function serverCmdSelf Delete(%cl)
 {
  if(!%cl.player.getDataBlock().getName()!$="PlayerNoSelf Delete")
  {
   parent::serverCmdSelf Delete(%cl);
  }
  else
  {
   messageClient(%cl,'',"You cannot Self Delete!");
  }
 }
};
activatePackage(noSelf Delete);
Should work. %cl.obj.datablock is nothing.