• 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!

Sprawdzenie czy gracz na danej pos

Hakur

New Member
Joined
Feb 12, 2012
Messages
145
Reaction score
1
Witam, wiecie może jak sprawdzić czy gracz z danym voc id jest na danym polu?
 
getPlayerVocation(cid) zwraca id profesji o ile cid jest creature id gracza, getCreaturePosition(cid) zwraca cos takiego {x = 127, y = 7, z = 9, stackpos = 1} czyli tablice
 
Lua:
function f(pos, voc)
	local creature = getTopCreature(pos)
	if (creature.uid <= 0 or creature.type ~= 1) then
		return false
	else
		return (getPlayerVocation(creature.uid) == voc)
	end
end
 
Back
Top