Author Topic: bottomprint not showing up in game...  (Read 1134 times)

i have kind of exhausted myself and my resources here, and was wondering if anybody out there knows what is wrong with this package...

Code: [Select]
//support for multiple types of ammo
package ADV_SingleShotgun_AmmoTypeSwitch
{
function servercmdLight(%client,%this,%obj,%slot)
{
if(isObject(%client.player) && isObject(%client.player.getMountedImage(0)))
{
%p = %client.player;
%im = %p.getMountedImage(0);
if(%im == ADV_SingleShotgunimage.getID())
{
if(%im.item.CanSwapAmmo == 1)
{
switch$ (%p.UseAmmotype)
{
case "":
%p.UseAmmotype = 2;
commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:CDAD00> Standerd Slugs " @ %obj.client.quantity["Shotgun_Slugs"] @ "", 1, 2, 3, 4);
echo("DebugA");
case "3":
%p.UseAmmotype = 1;
commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:CDAD00>Standerd Shells " @ %obj.client.quantity["Shotgun_Shells"] @ "", 1, 2, 3, 4);
echo("DebugB");
case "1":
%p.UseAmmotype = 2;
commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:CDAD00> Standerd Slugs " @ %obj.client.quantity["Shotgun_Slugs"] @ "", 1, 2, 3, 4);
echo("DebugA");
case "2":
%p.UseAmmotype = 3;
commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:CDAD00> Exploive Shells " @ %obj.client.quantity["Shotgun_Frags"] @ "", 1, 2, 3, 4);
echo("DebugC");
}
%p.updateArm(ADV_SingleShotgunEMPTYImage);
%p.mountImage(ADV_SingleShotgunEMPTYImage,0);
}
}
}
Parent::servercmdLight(%client);
}
};
activatePackage(ADV_SingleShotgun_AmmoTypeSwitch);

as the title states, for now i just need to know why the bottomprints aren't showing, then if i need more help ill refer back to this topic...

Did you try %client.bottomPrint(%message,%seconds,%noBox); ?

Why did you give serverCmdLight three extra arguments? The bottom print does not work because %obj does not exist, so %obj.client also does not exist. And why did you put a 1, 2, 3, 4 as arguments in the command to client?

Also, in case you didn't know. You can do if(isObject(%p = %client.player) && isObject(%client.player.getMountedImage(0))). So you can define %p while checking if it is an object.

And you don't need to do @ if it just connects to a blank "".
« Last Edit: July 07, 2014, 08:16:22 AM by jes00 »

k, ill try this, thanks..

it worked, Locking :P

thanks guys, im awful at that kind of stuff