Author Topic: Changing speed, jumping, in player datablocks  (Read 2279 times)

client.player.getDatablock()
Couldn't you use client.player.datablock? (Wasn't this some kind of ID?)
I don't really understand the difference between those two but i do know that you can get data from the datablock by doing getDatablock.
i believe the normal client.player.datablock was used to compare datablocks.

client.player.getDatablock()
I tried    if(%client.player.getdatablock(PlayerStandardArmor) == true)
And    if(%client.player.getdatablock() = PlayerStandardArmor)


Nothing.


I tried    if(%client.player.getdatablock(PlayerStandardArmor) == true)
And    if(%client.player.getdatablock() = PlayerStandardArmor)


Nothing.
You are doing it wrong.

if(%client.player.getDatablock() $= "PlayerStandardArmor") is correct.

You are doing it wrong.

if(%client.player.getDatablock() $= "PlayerStandardArmor") is correct.


if(%client.player.getDatablock() == PlayerStandardArmor) works fine too.

asdf

function M4A1Image::onMount(%this,%obj,%slot)
{
   Parent::onMount(%this,%obj,%slot);

   if(%client.player.getDatablock() $= "PlayerStandardArmor")
   {
      %obj.pushDatablock(StandardAssaultArmor.getID());
   }
   else if(%client.player.getDatablock() $= "PlayerMW2Armor")
   {
      %obj.pushDatablock(MW2AssaultArmor.getID());
   }
   else
   {
      %obj.pushDatablock(AssaultArmor.getID());
   }
}

Im sorry, but what is wrong with this.


Keep in mind, I'm new to this.


Ok, got it to work, locking.