46
Suggestions & Requests / Re: Fixed Tier+Tactical?
« on: June 16, 2017, 11:03:30 PM »
you have to enable the default gun and itll work
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.
if(%level < 20)
%rank = "youngling";
else if(%level < 50)
%rank = "initiate";
//other ranks here
else if(%level >= 750)
%rank = "grand master";
etc etc
if(%team $="jedi")
{
if %level>=750:
%rank = "Grand Master";
The switch is wrong and that's not going to work. You'd probably want to use an if statement for what you're trying to do here.What would be the correct way to do that
if(%team $="jedi")
{
switch (1)
{
case %level>=0:
%rank = "Youngling";
case %level>=20:
%rank = "Initiate";
case %level>=50:
%rank = "Padawan";
case %level>=250:
%rank = "Knight";
case %level>=500:
%rank = "Master";
case %level>=750:
%rank = "Grand Master";
colorshifting requires transmitdatablocks and/or server restart in order to work
datablock ShapeBaseImageData(GreenImage)Some snippets of what I did. Im beginner at code so might look very inefficient but worked
{
shapeFile = "./blade.dts";
emap = true;
mountPoint = 0;
offset = "0 0 -0.43751";
eyeOffset = "0 0 0";
doColorShift = true;
colorShiftColor = "0 1 0 1";
hasLight = true;
lightType = "ConstantLight";
lightRadius = 50;
lightColor = "0 1 0 1";
correctMuzzleVector = false;
};
datablock ShapeBaseImageData(BlueImage)
{
shapeFile = "./blade.dts";
emap = true;
mountPoint = 0;
offset = "0 0 -0.43751";
eyeOffset = "0 0 0";
doColorShift = true;
colorShiftColor = "0 0 1 1";
hasLight = true;
lightType = "ConstantLight";
lightRadius = 50;
lightColor = "0 0 1 1";
correctMuzzleVector = false;
};
datablock ShapeBaseImageData(RedImage)
{
shapeFile = "./blade.dts";
emap = true;
mountPoint = 0;
offset = "0 0 -0.43751";
eyeOffset = "0 0 0";
doColorShift = true;
colorShiftColor = "1 0 0 1";
hasLight = true;
lightType = "ConstantLight";
lightRadius = 50;
lightColor = "1 0 0 1.00";
function normaljedistyle1Image::onMount(%this, %obj, %slot)
{
parent::onMount(%this, %obj, %slot);
if (%obj.meleeStance)
%obj.playthread(2, "2hswing" @ (%obj.swingPhase + 1) % 2 + 1);
else
%obj.playthread(2, tswing @ (%obj.swingPhase + 1) % 2 + 1);
%obj.schedule(32, stopThread, 2);
%obj.setImageAmmo(%slot, !%obj.meleeStance);
%obj.playAudio(2, lightSaberHumSound);
%client = %obj.client;
if(%user.Idle)
{
return;
}
if(%client.player.Idle == 1)
{
serverPlay3D(EquipVest, %obj.position);
%client.player.unmountimage(2);
%client.player.Idle = 0;
if(%user.color)
{
return;
}
if(%client.player.color == 1)
%client.player.mountimage(Greenimage, 3);
if(%client.player.color == 2)
%client.player.mountimage(Blueimage, 3);
if(%client.player.color == 3)
%client.player.mountimage(Redimage, 3);
}
}
//1 is green
//2 is blue
//3 is red
function serverCmdcolorgreen(%client)
{
%client.player.color = 1;
commandtoclient(%client, 'centerprint', "<font:impact:20>\c3Reqeuip for effects to take place", 5);
}
function serverCmdcolorblue(%client)
{
%client.player.color = 2;
commandtoclient(%client, 'centerprint', "<font:impact:20>\c3Reqeuip for effects to take place", 5);
}
function serverCmdcolorred(%client)
{
%client.player.color = 3;
commandtoclient(%client, 'centerprint', "<font:impact:20>\c3Reqeuip for effects to take place", 5);
}
Swap the word 'homoloveual' out for 'blacks' and you'll have your answer.A better example would be: