Marcelo Druida
Intermediate OT User
Hello OTLanders!
I'm using TFS 1.0:
I want that when the party doesnt exist, the code auto create it
(maybe sending a table containing all members CID and random leader..)
Someone can help me?!
Thanks!
I'm using TFS 1.0:
Code:
int32_t LuaScriptInterface::luaPartyAddMember(lua_State* L)
{
// party:addMember(player)
Player* player = getPlayer(L, 2);
Party* party = getUserdata<Party>(L, 1);
if (party && player) {
pushBoolean(L, party->joinParty(*player));
} else {
lua_pushnil(L);
}
return 1;
}
I want that when the party doesnt exist, the code auto create it
(maybe sending a table containing all members CID and random leader..)
Someone can help me?!
Thanks!