Author Topic: Making A Command To Change Body Color  (Read 1869 times)

function serverCmdBlue(%client)
{
  %player = %client.player;
 
  %player.RLegColor("0.2 0 0.8 1");
 
  %player.client.RArmColor("0.2 0 0.8 1");
 
  %player.LArmColor("0.2 0 0.8 1");
 
  %player.PackColor("0.2 0 0.8 1");
 
  %player.ChestColor("0.2 0 0.8 1");
 
  %player.LHandColor("0.2 0 0.8 1");
 
  %player.SecondPackColor("0.2 0 0.8 1");
 
  %player.LArmColor("0.2 0 0.8 0.7");
 
  NewChatSO.addline("<color:ffffff>Your Now Set For Blue Team");
}

Am I Just Really Bad At Scripting, How Could I Make This Work To Change Those Certain Parts Of My Body That Color(Blue).

Here's a precise list of actual technical errors.

  • Player::RLegColor is not a function.
  • GameConnection::RArmColor is not a function.
  • Player::LArmColor is not a function.
  • Player::PackColor is not a function.
  • Player::ChestColor is not a function.
  • Player::LHandColor is not a function.
  • Player::SecondPackColor is not a function.
  • Player::LArmColor is not a function.
  • NewChatSO::addLine is not a function on dedicated servers.

You change the color of a part with: %client.partNameColor = "0.2 0 0.2 1";
After you set all the part colors you need to do client.applyBodyColors();

Now :

Code: [Select]
function serverCmdBlue(%client)
{
  %player = %client.player;
 
  %player.setNodeColor("ALL", "0 0 1 1");
 
  %client.chatMessage("<color:FFFFFF>You are now ready for the Blue team.");
}
« Last Edit: December 28, 2012, 09:49:09 AM by Pacnet2012³ »

Code: [Select]
function serverCmdBlue(%client)
{
  %player = %client.player;
 
  %player.setNodeColor("rshoe", "0 0 1 1");
 
  %player.setNodeColor("rarm", "0 0 1 1");
 
  %player.setNodeColor("larm", "0 0 1 1");
 
  %player.setNodeColor("pack", "0 0 1 1");
 
  %player.setNodeColor("chest", "0 0 1 1");
 
  %player.setNodeColor("lhand", "0 0 1 1");
 
  %player.setNodeColor("secondPack", "0 0 1 1");
 
  %player.setNodeColor("rhand", "0 0 1 1");
 
  %client.chatMessage("<color:FFFFFF>You are now ready for the Blue team.");
}

Also, you should make a more dynamic function.

Ok Thnx, I Got That, Now How Do I Make It Client Sided To Work On Any Server
« Last Edit: December 30, 2012, 09:38:58 AM by yankee903 »

Ok Thnx, I Got That, Now How Do I Make It Client Sided To Work On Any Server
Stop Talking Like This First

Ok Thnx, I Got That, Now How Do I Make It Client Sided To Work On Any Server
avatar_randomize();

avatar_randomize();
Put that in the command, and it works on other servers??...

Put that in the command, and it works on other servers??...

No you put that directly in your console.
Also, (not sure) maybe you have to type clientcmdupdateprefs(); after it.