I'm sure some people have seen this script before. It's a simple Script used for Crates, when aiming for more then a certain amount of time, the scope resets. This is a script i have looked for everywhere and it seems to have vanished (Not on workshop or SFDmaps)
I already asked Sree, the creator, but he no longer has it. I would appreciate it if someone had it tucked away on some dusty external drive somewhere. I need it for hosting competitive Crates.
Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the rules.
[REQUEST] No Hardscoping (Script)
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- Mighty Spirit the 2
- Superfighter
- Posts: 187
- Joined: Mon Jun 25, 2018 5:02 pm
- Title: Wasted potential
- SFD Account: ake004
- SFD Alias: Retired SFD player
- Started SFD: When melee was good
- Location: SFD Veteran trauma hospital
- Gender:
- Age: 22
[REQUEST] No Hardscoping (Script)
0 x

I will tell your story and keep you alive the best i can
...
But I've always had the feeling we would die young
Some die young

- Mighty Spirit the 2
- Superfighter
- Posts: 187
- Joined: Mon Jun 25, 2018 5:02 pm
- Title: Wasted potential
- SFD Account: ake004
- SFD Alias: Retired SFD player
- Started SFD: When melee was good
- Location: SFD Veteran trauma hospital
- Gender:
- Age: 22
Yeah, so i decided to just post this on here anyway, in-case someone ever comes looking for this, because you are tired of hardscopes presumably.
Script was originally made by Sree, but he deleted it. Re-uploaded the original txt from "Crates - Comp" map by Sree.
If you know what your doing you could replace timer trigger with Events.UpdateCallback.Start().
Interesting script i have to say. Sad to see comp Crates was ushered away.
Script was originally made by Sree, but he deleted it. Re-uploaded the original txt from "Crates - Comp" map by Sree.
If you know what your doing you could replace timer trigger with Events.UpdateCallback.Start().
Interesting script i have to say. Sad to see comp Crates was ushered away.
Code: Select all
public void OnStartup() //script by Sree!
{
Game.RunCommand("/ia 1");
Game.RunCommand("/ie 1");
Game.RunCommand("/msg welcome to crates comp by Sree!");
foreach(IPlayer tplayer in Game.GetPlayers())
{
tplayer.GiveWeaponItem(WeaponItem.SNIPER);
tplayer.GiveWeaponItem(WeaponItem.MACHETE);
tplayer.GiveWeaponItem(WeaponItem.MAGNUM);
}
IObjectTimerTrigger exttimer = (IObjectTimerTrigger)Game.CreateObject("TimerTrigger");
exttimer.SetIntervalTime(1);
exttimer.SetRepeatCount(0); // infinite times
exttimer.SetScriptMethod("CheckManualAimers");
exttimer.Trigger();
}
public void CheckManualAimers(TriggerArgs args)
{
foreach (IPlayer tplayer in Game.GetPlayers())
{
if (!tplayer.IsDead)
{
Playertimer timer = GetPlayertimer(tplayer);
timer.Update();
}
}
}
private Dictionary<int, Playertimer> timer = new Dictionary<int, Playertimer>();
private Playertimer GetPlayertimer(IPlayer tplayer)
{
Playertimer playertimer = null;
if (!timer.TryGetValue(tplayer.UniqueID, out playertimer))
{
playertimer = new Playertimer(tplayer);
timer.Add(tplayer.UniqueID, playertimer);
}
return playertimer;
}
private class Playertimer
{
private const float timerestricted = 1000f;
private float timeelapsed = 0f;
private IPlayer tplayer;
public Playertimer(IPlayer player)
{
tplayer = player;
timeelapsed = Game.TotalElapsedGameTime;
}
public void RemoveWep()
{
if (!tplayer.IsDead)
{
tplayer.RemoveWeaponItemType(WeaponItemType.Rifle);
tplayer.RemoveWeaponItemType(WeaponItemType.Handgun);
tplayer.GiveWeaponItem(WeaponItem.SNIPER);
tplayer.GiveWeaponItem(WeaponItem.MAGNUM);
Game.PlayEffect("CFTXT",tplayer.GetWorldPosition() + new Vector2(0,4),"no hardscoping scrub");
}
}
public void Update()
{
if (tplayer.IsManualAiming)
{
if (Game.TotalElapsedGameTime - timeelapsed > timerestricted)
{
RemoveWep();
timeelapsed = Game.TotalElapsedGameTime;
}
}
else
{
timeelapsed = Game.TotalElapsedGameTime;
}
}
}
1 x

I will tell your story and keep you alive the best i can
...
But I've always had the feeling we would die young
Some die young
