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

C++ How to get item ID by ClientID

sdnjaks

New Member
Joined
Apr 9, 2016
Messages
4
Solutions
1
Reaction score
1
Hi,

I made a script that sends the ClientID of an item to the server, so the server can send me info about the item, but i can't manage to get those informations through clientId.

What i am trying to do is to convert the ClientId to ServerID, but because of my lack of experience in C++, i don't know how to get to it.

There is this code that gets the clientId using the serverId, how can i make it reversed?

C++:
int LuaScriptInterface::luaItemTypeGetClientId(lua_State* L)
{
    // itemType:getClientId()
    const ItemType* itemType = getUserdata<const ItemType>(L, 1);
    if (itemType) {
        lua_pushnumber(L, itemType->clientId);
    } else {
        lua_pushnil(L);
    }
    return 1;
}

Thanks!
 
Back
Top