I don't need anyone Zi is already helping me for all of this :) but you can tell me what you want sure :)
❤️ 0
SafeWriting.FuncContainer:AddFunc(function(player) --gets called when player connects
printf("%s connected",player:GetName()
end,"OnClientConnect")
AddChatCommand("kick",function(self,player,msg,target)
if not target then Chat:SendToTarget(player,"Enter valid player") return; end
Kick(target) --no need for GetPlayerByName, target is automatically player already
end,{PLAYER},{AdminModOnly=true}); --automatically filling player as param into func
or
AccuracyCalc={};
function AccuracyCalc:OnShoot(hit)
if hit.shooter then
hit.shooter.shotsFired = (hit.shooter.shotsFired or 0)+1
end
end
function AccuracyCalc:OnActorHit(hit)
if hit.shooter then
hit.shooter.shotsHit = (hit.shooter.shotsHit or 0)+1
end
end
AddChatCommand("accuracy",function(self,player)
local shot=player.shotsFired or 0
local hit=player.shotsHit or 0
local ratio=hit/math.min(1,shot)
Chat:SendToTarget(player,"You fired %d shots and hit %d times, accuracy: %.2f",shot,hit,100*ratio)
end);
SafeWriting.FuncContainer:AddPlugin(AccuracyCalc) --binds all funcs (OnShoot, OnActorHit)
I think that's nice feature that other SSMs don't have, anyway, try rewriting :RevivePlayer inside InstantAction.lua or some PatriotHooks.lua or whatever there is :D
if not player.actor.OriginalGetProfileId then OverwriteProfileIdFunction(player) end
If it's overwritten, it won't do anything already :D