• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Request] PVP Enabled/Disabled

Code:
function onSay(cid, words, param)
	local target = getPlayerGUID(cid)
	if param == "1" or param == "true" then
		db.executeQuery("UPDATE `players` SET pvp = 1 WHERE id = "..target..";")
	else
		db.executeQuery("UPDATE `players` SET pvp = 0 WHERE id = "..target..";")
	end
	return FALSE
end
 
adn why don't u use that function on your engine ;P?? tfs has got compiled in function ^^


Hope that you know what I'm talking about ;P

#edit

sory, missunderstood ;P
the man up is right ;))
 
nice script, but..

I need a script(or source edit),
when Database->Players->|PLAYERNAME|-> PVP = 0 , Players can't kill him...
and when Database->Players->|PLAYERNAME|-> PVP = 1 , any1 can kill him...

thanks anyway...and I know its so hard to make ;S...but if anyone want to help...
 
nice script, but..

I need a script(or source edit),
when Database->Players->|PLAYERNAME|-> PVP = 0 , Players can't kill him...
and when Database->Players->|PLAYERNAME|-> PVP = 1 , any1 can kill him...

thanks anyway...and I know its so hard to make ;S...but if anyone want to help...

Oh... ^^

Thats source :p

... Probably iologindata.cpp and player.cpp would be enough to edit, in iologindata look for loading player part and add there to load `pvp` field and declare it, lets say player->canPvP = result.getDataInt("pvp"), in player.cpp in isAttackable function you would have to add: || canPvp == 0

Im noob at C++, cant help much :(
 
Oh... ^^

Thats source :p

... Probably iologindata.cpp and player.cpp would be enough to edit, in iologindata look for loading player part and add there to load `pvp` field and declare it, lets say player->canPvP = result.getDataInt("pvp"), in player.cpp in isAttackable function you would have to add: || canPvp == 0

Im noob at C++, cant help much :(

alright! now i'll compile (:
if works or not, thanks so much.

EDIT:

I gotta error |:

SS:

erroryi1.png
 
Last edited:
lol, use the search feature man this script exists in otland.

Josejunior, i like your pets script but you put way too many credits in it.

any chance of getting a version i can use? if so message me we can talk about credit on my webpage or whatever.
 
lol, use the search feature man this script exists in otland.

Josejunior, i like your pets script but you put way too many credits in it.

any chance of getting a version i can use? if so message me we can talk about credit on my webpage or whatever.
kill yourself

6th January 2009, 16:05
 
Back
Top