Boreg
03.07.2009, 14:21
GELÖßT
ich hab mit folgfendem script folgendes poblem
sobald ich weiter als 1 instanz (1 Zelle) entfernt bin, hört das script auf zu arbeiten, sobald ich wieder "in Range" bin gehts weiter
scn ABR1ScriptMunitionsgewicht
long Counter
long Summe
short Gewichtalt
short Gewichtfinal
float timer
Short Aktiviert
Short Differenz
begin OnActivate
;AN
if (ABR1MunGewAN.GetDisabled == 1) && ( IsActionRef Player == 1 )
ABR1MunGewAN.enable
ABR1MunGewAUS.disable
activate
set Aktiviert to 1
;AUS
else (ABR1MunGewAN.GetDisabled == 0) && ( IsActionRef Player == 1 )
ABR1MunGewAN.disable
ABR1MunGewAUS.enable
activate
set Aktiviert to 0
endif
end
begin gamemode
if ( Aktiviert == 1 )
if timer < 3
set timer to timer + GetSecondsPassed
else
set timer to 0
set Counter to 0
set Counter to ( ((Player.getItemcount ABR1Munition460WeatherbyMagnum) * 40) + ((Player.getItemcount ABR1Munition10mmMagnum ) * 15) + ((Player.getItemcount AmmoMesmetronPowerCell) * 10) + ((Player.getItemcount AmmoSmallEnergyCell ) * 10) )
set Counter to (counter + ((Player.getItemcount AmmoAlienPowerCell ) * 10 ) + ((Player.getItemcount AmmoElectronChargePack ) * 10 ) + ((Player.getItemcount AmmoMicroFusionCell ) * 10 ) + ((Player.getItemcount AmmoFlamerFuel ) * 8 ) + ((Player.getItemcount Ammo44magnum ) * 30 ) )
set Counter to (counter + ((Player.getItemcount AmmoShotgunShell) * 32) + ((Player.getItemcount Ammo556mm ) * 12 ) + ((Player.getItemcount Ammo10mm) * 14) + ((Player.getItemcount Ammo32Caliber) * 13) + ((Player.getItemcount AmmoDart ) * 15) + ((Player.getItemcount Ammo5mm ) * 10) )
set Counter to (counter + ((Player.getItemcount AmmoBB ) * 2) + ((Player.getItemcount Ammo308Caliber ) * 24) + ((Player.getItemcount AmmoRailwaySpikes ) * 30) + ((Player.getItemcount AmmoMissile ) * 3000) + ((Player.getItemcount ammoFatMan ) * 5000) +((Player.getItemcount ABR1MunitionWerfergranate ) * 500) )
set Gewichtalt to (player.getitemcount ABR1WaffeMunitionsgewicht)
set Gewichtfinal to ( Counter * 0.002 )
if ( Gewichtfinal != Gewichtalt )
set Differenz to ( Gewichtfinal - Gewichtalt )
player.additem ABR1WaffeMunitionsgewicht Differenz 1
endif
endif
endif
end
ich hab mit folgfendem script folgendes poblem
sobald ich weiter als 1 instanz (1 Zelle) entfernt bin, hört das script auf zu arbeiten, sobald ich wieder "in Range" bin gehts weiter
scn ABR1ScriptMunitionsgewicht
long Counter
long Summe
short Gewichtalt
short Gewichtfinal
float timer
Short Aktiviert
Short Differenz
begin OnActivate
;AN
if (ABR1MunGewAN.GetDisabled == 1) && ( IsActionRef Player == 1 )
ABR1MunGewAN.enable
ABR1MunGewAUS.disable
activate
set Aktiviert to 1
;AUS
else (ABR1MunGewAN.GetDisabled == 0) && ( IsActionRef Player == 1 )
ABR1MunGewAN.disable
ABR1MunGewAUS.enable
activate
set Aktiviert to 0
endif
end
begin gamemode
if ( Aktiviert == 1 )
if timer < 3
set timer to timer + GetSecondsPassed
else
set timer to 0
set Counter to 0
set Counter to ( ((Player.getItemcount ABR1Munition460WeatherbyMagnum) * 40) + ((Player.getItemcount ABR1Munition10mmMagnum ) * 15) + ((Player.getItemcount AmmoMesmetronPowerCell) * 10) + ((Player.getItemcount AmmoSmallEnergyCell ) * 10) )
set Counter to (counter + ((Player.getItemcount AmmoAlienPowerCell ) * 10 ) + ((Player.getItemcount AmmoElectronChargePack ) * 10 ) + ((Player.getItemcount AmmoMicroFusionCell ) * 10 ) + ((Player.getItemcount AmmoFlamerFuel ) * 8 ) + ((Player.getItemcount Ammo44magnum ) * 30 ) )
set Counter to (counter + ((Player.getItemcount AmmoShotgunShell) * 32) + ((Player.getItemcount Ammo556mm ) * 12 ) + ((Player.getItemcount Ammo10mm) * 14) + ((Player.getItemcount Ammo32Caliber) * 13) + ((Player.getItemcount AmmoDart ) * 15) + ((Player.getItemcount Ammo5mm ) * 10) )
set Counter to (counter + ((Player.getItemcount AmmoBB ) * 2) + ((Player.getItemcount Ammo308Caliber ) * 24) + ((Player.getItemcount AmmoRailwaySpikes ) * 30) + ((Player.getItemcount AmmoMissile ) * 3000) + ((Player.getItemcount ammoFatMan ) * 5000) +((Player.getItemcount ABR1MunitionWerfergranate ) * 500) )
set Gewichtalt to (player.getitemcount ABR1WaffeMunitionsgewicht)
set Gewichtfinal to ( Counter * 0.002 )
if ( Gewichtfinal != Gewichtalt )
set Differenz to ( Gewichtfinal - Gewichtalt )
player.additem ABR1WaffeMunitionsgewicht Differenz 1
endif
endif
endif
end