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

Fix getClientVersion(cid)..

kkk111

Member
Joined
Sep 20, 2008
Messages
175
Reaction score
5
Location
exiva "kkk~
Pls fix the function.

HTML:
int32_t LuaInterface::luaGetClientVersion(lua_State* L)
{
	//getClientVersion(cid)
	ScriptEnviroment* env = getEnv();
	if(Creature* creature = env->getClientVersion(popNumber(L)))
		lua_pushnumber(L, creature->clientVersion());
	else
	{
		errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND));
		lua_pushboolean(L, false);
	}

	return 1;
}

HTML:
static int32_t luaGetClientVersion(lua_State* L);

Ex:

HTML:
function onStepIn(cid, item, frompos, item2, topos)

   if(getClientVersion(cid) == 900) then
       doTeleportThing(cid,{x=1403, y=3054, z=13})
   else
       doCreatureSay(cid, "You are not using custum client ...", TALKTYPE_ORANGE_1)
   end
   return true
end

9.00 = custum client

 
Back
Top