Or maybe i can verify Them too ? I think all gercry profiles ids are values > 100000000, so if a value is not approved in crymp and not superior to this number => set a random id :D could it works ? ^^'
❤️ 0
function OverwriteProfileIdFunction(player)
player.actor.parent=player;
player.actor.GetProfileId = function(self)
if (self.parent.profile) then
return self.parent.profile
-- But the function is not completed,
-- I don't only want to return player.profile
-- But before, verify if the original "player.actor:GetProfileId()"
-- doesn't return a player ID =/= 0
-- if yes, return this ID. How to do this ?
end
end
end
function OverwriteProfileIdFunction(player)
player.actor.parent=player;
if not player.actor.OriginalGetProfileId then
player.actor.OriginalGetProfileId=player.actor.GetProfileId
end
player.actor.GetProfileId = function(self)
if self.parent.profile then
local originalId = self:OriginalGetProfileId()
if tonumber(originalId)~=0 then
--handle this however you want
return originalId
else
return self.parent.profile
end
end
end
end
Or just simply do this:
function OverwriteProfileIdFunction(player)
player.actor.parent=player;
local originalId=player.actor:GetProfileId()
if tonumber(originalId)~=0 then return originalId end --just return it right away, no rewriting needs to be done
player.actor.GetProfileId = function(self)
if self.parent.profile then
return self.parent.profile
end
end
end
But I think first way is better, it's more general :D