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

Check 'if died by player'

Hmm, not really sure, but here's something along the lines.

LUA:
for i = 1, #deathList do
   if(isPlayer(cid) and isPlayer(deathList[i])) then

The deathList holds all last hit/suspect members (I think), so if it checks that its a player, then BAM.
 
Should this work?
LUA:
function onDeath(cid, corpse, deathList)
	for i = 1, #deathList do
		if(isPlayer(cid) and isPlayer(deathList[i])) then
 				if getPlayerStorageValue(cid,77777) == TRUE then
					setPlayerStorageValue(cid,88888,1)
				end
		end
	end
	return true
end
 
Back
Top