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

getCreatureName(cid)

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
Code:
				function onLogin(cid)
	if ((getCreatureName(cid) == Kinha da Elit) or (getCreatureName(cid) == Pandersony) or (getCreatureName(cid) == Vacilao) and (getPlayerLevel(cid) < 150)) then
	   addEvent(autoExp, 60 * 1000)
 end
 return TRUE
end
				function autoExp()
	if getPlayerLevel(cid) < 150 then
	   addEvent(autoExp, 1800 * 1000)
	   doSendAnimatedText(playerPos, '1134918', TEXTCOLOR_WHITE)
	   doPlayerAddExp(cid, 1134918)
 end
 return TRUE
end

My metod for use 'getCreatureName(cid)' are correct?
ex: if getCreatureName(cid) == PLAYER then
 
getCreatureName() returns string so:
PHP:
(getCreatureName(cid) == "Kinha da Elit") or (getCreatureName(cid) == "Pandersony") or (getCreatureName(cid) == "Vacilao")
or:
PHP:
isInArea({"Kinha da Elit", "Pandersony", "Vacilao"}, getCreatureName(cid)) == TRUE
 
Back
Top