So, I'm going to assume that I will have to compile a custom Fougerite Core for this to work but I'll ask anyways
Im looking for a way to set run speed:
Since
I figured out how to set refill ammoclip however it glitches if you switch to a non weapon and breaks ALL plugins, my code:
Easiest way to fix this and have it set refill ammo either perm or on a timer?
Also any way to set core settings? Gravity? acceleration speeds of player/objects? Jumpspeed/height, reloadspeed? Firerate? Healrate? How about how to inflict dmg to a player? setMaxHealth? Nobleeding?
Im looking for a way to set run speed:
C#:
using UnityEngine;
public class CharacterWalkSpeedTrait : CharacterTrait
{
[SerializeField]
private float _jog = 3f;
[SerializeField]
private float _run = 6f;
[SerializeField]
private float _walk = 1.8f;
public float jog
{
get
{
return this._jog;
}
}
public float run
{
get
{
return this._run;
}
}
public float walk
{
get
{
return this._walk;
}
}
public bool IsRunningAtSpeed(float metersPerSecond)
{
if ((double) this._jog < (double) this._run)
return (double) this._run <= (double) metersPerSecond;
else
return (double) this._run > (double) metersPerSecond;
}
public bool IsJoggingOrRunningAtSpeed(float metersPerSecond)
{
if ((double) this._jog < (double) this._run)
return (double) this._jog <= (double) metersPerSecond;
else
return (double) this._run <= (double) metersPerSecond;
}
}
are private, assuming will have to set as plugin with custom Fougerite core?[SerializeField]
private float _jog = 3f;
[SerializeField]
private float _run = 6f;
[SerializeField]
private float _walk = 1.8f;
I figured out how to set refill ammoclip however it glitches if you switch to a non weapon and breaks ALL plugins, my code:
JavaScript:
function On_PluginInit(){
Plugin.CreateTimer("Timer", 5).Start();
}
function TimerCallback(){
for(var player in Server.Players){
if(player != null && player.Name){
player.Inventory.InternalInventory.activeItem.SetUses(99);
}
}
Plugin.CreateTimer("Timer", 5).Start();
}
function On_Command(Player, cmd, args) {
if(cmd == "ammo") {
var ammoamount = 99;
Player.Inventory.InternalInventory.activeItem.SetUses(ammoamount);
Player.Message("Ammo Updated to:" + ammoamount);
}
}
Also any way to set core settings? Gravity? acceleration speeds of player/objects? Jumpspeed/height, reloadspeed? Firerate? Healrate? How about how to inflict dmg to a player? setMaxHealth? Nobleeding?
Last edited: