• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua How to check if player is only in PVE and not in PVP?

newby

Active Member
Joined
Jun 11, 2016
Messages
183
Reaction score
43
I'm need to check if player is not in PVP
To make a protect script (to if player got internet down he don't die to monster... but i don't wan't nobody abusing it in PVP)

Code:
function onThink(interval, lastExecution)
   if playerGetLastPing(cid) > 2000 then
     -- if player is only in PVE (not in PVP) then
      print(playerGetLastPing(cid))
      doRemoveCreature(cid)
     end
   end
end

How to make?
 
Only thing close to this is isPlayerPzLocked(cid)
This will return true if the player has a battle sign.

It's not this:

if getCreatureCondition(cid, CONDITION_INFIGHT) then
latest


Is this:
latest


Right?

How to make this if
if isPlayerPzLocked(cid) then
 
Oh I forgot about the condition, I still think it returns regular swords rather than pvp swords but you can test it out
 
Back
Top