• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

SetPvP(True) having a problem

Status
Not open for further replies.

Foereaper

Founder
It's not a global, it has to be called on an object, in this case the player.

plr:SetPvP(true)

Replace yours with that
 

Lightning Blade

BETA Tester
You are such a cutiepie <3

- - - Updated - - -

One last question, When i try to set the ffa to true, it works. But it just turns off again, is that because the zone is not ffa ?.
 

Foereaper

Founder
Whenever you trigger an area update, it checks the ffa flag, I have a script at home I used to prevent that, but it definitely shouldn't be done that way. It should be done through a dbc edit tbh
 

Foereaper

Founder
This is how I did it to keep FFA active when changing area. DO NOT USE THIS! Was hacky and not intended to be used at all, just for testing purposes. The correct way is DBC editing.

Code:
function KeepFFAAlive(event, player, newz, newa)
	if newz > 1 then
		CreateLuaEvent(function() SetFFAFlag(player) end, 0, 1)
	end
end

function SetFFAFlag(player)
	player:SetFFA(true)
end

RegisterServerHook(27, KeepFFAAlive);
 
Status
Not open for further replies.
Top