thanks, i actually just figured it out...
i probably should have posted the entire function, as my problem lies within it...
function servercmdUpdateADVSettings(%client,%globalVar,%value)
{
$StartingAmmoPlaceHolder = $StartingAmmo;
$UseScopePlaceHolder = $UseScope;
$UseAmmoPlaceHolder = $UseAmmo;
$FarSoundPlaceHolder = $FarSound;
$CommandReloadPlaceHolder = $CommandReload;
if(%client.isAdmin || %client.isSuperAdmin)
{
switch$(%globalVar)
{
case UseScope:
$UseScope = %value;
case UseAmmo:
$UseAmmo = %value;
case FarSound:
$FarSound = %value;
case CommandReload:
$CommandReload = %value;
case StartingAmmo:
$StartingAmmo = %value;
}
}
else
{
CommandToClient(%Client,'CenterPrint',"You are not an admin",2);
}
if($StartingAmmo != $StartingAmmoPlaceHolder)
{
messageall('MsgAdminForce', "\c2The amount of ammo players spawn with has been set to " @ $StartingAmmo @ "");
}
if($UseScope = 1 && $UseScope != $UseScopePlaceHolder)
{
messageall('MsgAdminForce', "\c2Ironsights are now OFF");
}
else if($UseScope != $UseScopePlaceHolder)
{
messageall('MsgAdminForce', "\c2Ironsights are now ON");
}
if($UseAmmo = 1 && $UseAmmo != $UseAmmoPlaceHolder)
{
messageall('MsgAdminForce', "\c2Ammo Usage is now OFF");
}
else if($UseAmmo != $UseAmmoPlaceHolder)
{
messageall('MsgAdminForce', "\c2Ammo Usage is now ON");
}
if($FarSound = 1 && $FarSound != $FarSoundPlaceHolder)
{
messageall('MsgAdminForce', "\c2Distant sounds are now OFF");
}
else if($FarSound != $FarSoundPlaceHolder)
{
messageall('MsgAdminForce', "\c2Distant sounds are now ON");
}
if($CommandReload = 1 && $CommandReload != $CommandReloadPlaceHolder)
{
messageall('MsgAdminForce', "\c2Light key reload command now is OFF");
}
else if($CommandReload != $CommandReloadPlaceHolder)
{
messageall('MsgAdminForce', "\c2Light key reload command is now ON");
}
}
the placeholders were loving stuff up, how to i replace those with a way that work?
EDIT:
so i might have figured this whole getvalue thing out...
is this acceptable?
$StartingAmmoPlaceHolder = $StartingAmmo.getValue();
$UseScopePlaceHolder = $UseScope.getValue();
$UseAmmoPlaceHolder = $UseAmmo.getValue();
$FarSoundPlaceHolder = $FarSound.getValue();
$CommandReloadPlaceHolder = $CommandReload.getValue();