Little Off-Topic: if you need help to upload big files, I can help you without problems.I will make a Rust Files Category in the Resources, could you add It there too please?
I just wanted someone to upload server files, either they are patched or not.Little Off-Topic: if you need help to upload big files, I can help you without problems.
i have problem with time vote don't work ... don't appears the written ... but the plugin was loaded and don't workLittle Off-Topic: if you need help to upload big files, I can help you without problems.
Did you modify the script?
Line 58 does not contain any OnCommand method.
OnCommand is at Line 181
Don't modify the script if you don't know how please.line 1 - __author__ = 'DreTaX'
__version__ = '1.3'
import clr
clr.AddReferenceByPartialName("Fougerite")
import Fougerite
import System
"""
Class
"""
class DestroySystem:
"""
Methods
"""
def On_PluginInit(self):
Util.ConsoleLog("DestroySystem by " + __author__ + " Version: " + __version__ + " loaded.", False)
self.DestroySys()
DataStore.Flush("DestroySystem")
def IsEligible(self, HurtEvent):
try:
Eligible = HurtEvent.Entity.Object._master.ComponentCarryingWeight(HurtEvent.Entity.Object)
return not (Eligible)
except:
return True
def TrytoGrabID(self, Player):
try:
id = Player.SteamID
return id
except:
return None
#There is an error while converting ownerid to string in C#. Hax it.
def GetIt(self, Entity):
try:
if Entity.IsDeployableObject():
return Entity.Object.ownerID
if Entity.IsStructure():
return Entity.Object._master.ownerID
except:
return None
def DestroySys(self):
if not Plugin.IniExists("DestroySys"):
ini = Plugin.CreateIni("DestroySys")
ini.AddSetting("options", "giveback", "1")
ini.Save()
return Plugin.GetIni("DestroySys")
def On_Command(self, Player, cmd, args):
if cmd == "destroy" or cmd == "crush" or cmd == "c":
if not DataStore.ContainsKey("DestroySystem", Player.SteamID):
DataStore.Add("DestroySystem", Player.SteamID, "true")
Player.Message("---DestroySystem---")
Player.Message("You are in Destroy mode")
Player.Message("If you finished, don't forget to quit from It!")
Player.Message("Shotgun cannot be used in destroy mode!")
else:
DataStore.Remove("DestroySystem", Player.SteamID)
Player.Message("---DestroySystem---")
Player.Message("You quit Destroy mode!")
Items = {
'WoodFoundation': 'Wood Foundation',
'WoodDoorFrame': 'Wood Doorway',
'WoodDoor': 'Wood Door',
'WoodWall': 'Wood Wall',
'WoodPillar': 'Wood Pillar',
'WoodCeiling': 'Wood Ceiling',
'MetalDoor': 'Metal Door',
'WoodStairs': 'Wood Stairs',
'WoodWindowFrame': 'Wood Window',
'MetalFoundation': 'Metal Foundation',
'MetalDoorFrame': 'Metal Doorway',
'MetalWall': 'Metal Wall',
'MetalPillar': 'Metal Pillar',
'MetalCeiling': 'Metal Ceiling',
'MetalStairs': 'Metal Stairs',
'MetalWindowFrame': 'Metal Window',
'Wood_Shelter': 'Wood Shelter',
'Barricade_Fence_Deployable': 'Wood Barricade',
'Wood Box': 'Wood Storage Box',
'Wood Box Large': 'Large Wood Storage',
'Metal Bars Window': 'Metal Window Bars',
'CampFire': 'Camp Fire',
'Wood Spike Wall': 'Spike Wall',
'Large Wood Spike Wall': 'Large Spike Wall',
'Workbench': 'Workbench',
'WoodGate': 'Wood Gate',
'WoodGateway': 'Wood Gateway',
'RepairBench': 'Repair Bench',
'Furnace': 'Furnace'
}
def On_EntityHurt(self, HurtEvent):
if HurtEvent.Attacker is not None and HurtEvent.Entity is not None and not HurtEvent.IsDecay:
#On Entity hurt the attacker is an NPC and a Player for somereason. We will try to grab his ID
id = self.TrytoGrabID(HurtEvent.Attacker)
if id is None:
return
gun = HurtEvent.WeaponName
if gun == "Shotgun":
return
get = DataStore.Get("DestroySystem", str(id))
#Dirty fucking hack against current bug. (Entity OWNERID request isn't working good yet, so hax it)
OwnerID = self.GetIt(HurtEvent.Entity)
if OwnerID is None:
return
if long(id) == long(OwnerID) and bool(get):
if self.IsEligible(HurtEvent):
EntityName = HurtEvent.Entity.Name
HurtEvent.Entity.Destroy()
ini = self.DestroySys()
giveback = int(ini.GetSetting("options", "giveback"))
if giveback == 1:
item = self.Items.get(EntityName, None)
if item is None:
return
line 124 - HurtEvent.Attacker.Inventory.AddItem(item)
Outdated, Redownload this pluginline 1 - __author__ = 'DreTaX'
__version__ = '1.3'
import clr
clr.AddReferenceByPartialName("Fougerite")
import Fougerite
import System
"""
Class
"""
class DestroySystem:
"""
Methods
"""
def On_PluginInit(self):
Util.ConsoleLog("DestroySystem by " + __author__ + " Version: " + __version__ + " loaded.", False)
self.DestroySys()
DataStore.Flush("DestroySystem")
def IsEligible(self, HurtEvent):
try:
Eligible = HurtEvent.Entity.Object._master.ComponentCarryingWeight(HurtEvent.Entity.Object)
return not (Eligible)
except:
return True
def TrytoGrabID(self, Player):
try:
id = Player.SteamID
return id
except:
return None
#There is an error while converting ownerid to string in C#. Hax it.
def GetIt(self, Entity):
try:
if Entity.IsDeployableObject():
return Entity.Object.ownerID
if Entity.IsStructure():
return Entity.Object._master.ownerID
except:
return None
def DestroySys(self):
if not Plugin.IniExists("DestroySys"):
ini = Plugin.CreateIni("DestroySys")
ini.AddSetting("options", "giveback", "1")
ini.Save()
return Plugin.GetIni("DestroySys")
def On_Command(self, Player, cmd, args):
if cmd == "destroy" or cmd == "crush" or cmd == "c":
if not DataStore.ContainsKey("DestroySystem", Player.SteamID):
DataStore.Add("DestroySystem", Player.SteamID, "true")
Player.Message("---DestroySystem---")
Player.Message("You are in Destroy mode")
Player.Message("If you finished, don't forget to quit from It!")
Player.Message("Shotgun cannot be used in destroy mode!")
else:
DataStore.Remove("DestroySystem", Player.SteamID)
Player.Message("---DestroySystem---")
Player.Message("You quit Destroy mode!")
Items = {
'WoodFoundation': 'Wood Foundation',
'WoodDoorFrame': 'Wood Doorway',
'WoodDoor': 'Wood Door',
'WoodWall': 'Wood Wall',
'WoodPillar': 'Wood Pillar',
'WoodCeiling': 'Wood Ceiling',
'MetalDoor': 'Metal Door',
'WoodStairs': 'Wood Stairs',
'WoodWindowFrame': 'Wood Window',
'MetalFoundation': 'Metal Foundation',
'MetalDoorFrame': 'Metal Doorway',
'MetalWall': 'Metal Wall',
'MetalPillar': 'Metal Pillar',
'MetalCeiling': 'Metal Ceiling',
'MetalStairs': 'Metal Stairs',
'MetalWindowFrame': 'Metal Window',
'Wood_Shelter': 'Wood Shelter',
'Barricade_Fence_Deployable': 'Wood Barricade',
'Wood Box': 'Wood Storage Box',
'Wood Box Large': 'Large Wood Storage',
'Metal Bars Window': 'Metal Window Bars',
'CampFire': 'Camp Fire',
'Wood Spike Wall': 'Spike Wall',
'Large Wood Spike Wall': 'Large Spike Wall',
'Workbench': 'Workbench',
'WoodGate': 'Wood Gate',
'WoodGateway': 'Wood Gateway',
'RepairBench': 'Repair Bench',
'Furnace': 'Furnace'
}
def On_EntityHurt(self, HurtEvent):
if HurtEvent.Attacker is not None and HurtEvent.Entity is not None and not HurtEvent.IsDecay:
#On Entity hurt the attacker is an NPC and a Player for somereason. We will try to grab his ID
id = self.TrytoGrabID(HurtEvent.Attacker)
if id is None:
return
gun = HurtEvent.WeaponName
if gun == "Shotgun":
return
get = DataStore.Get("DestroySystem", str(id))
#Dirty fucking hack against current bug. (Entity OWNERID request isn't working good yet, so hax it)
OwnerID = self.GetIt(HurtEvent.Entity)
if OwnerID is None:
return
if long(id) == long(OwnerID) and bool(get):
if self.IsEligible(HurtEvent):
EntityName = HurtEvent.Entity.Name
HurtEvent.Entity.Destroy()
ini = self.DestroySys()
giveback = int(ini.GetSetting("options", "giveback"))
if giveback == 1:
item = self.Items.get(EntityName, None)
if item is None:
return
line 124 - HurtEvent.Attacker.Inventory.AddItem(item)
How did you update?i update the plug-in but nothin anyway don't appears when is on/off
NoI must add " DestroySystem=DestroySystem " in fougerite?
No
Stop using FAC.