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

doKickPlayerFromParty()

Status
Not open for further replies.

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,984
Solutions
2
Reaction score
119
Location
Germany
GitHub
Shawak
I request as the title says, this function: doKickPlayerFromParty(cid)

Thanks! ^_^
 
Heres the function for that, this goes in luascript.cpp

PHP:
int32_t LuaScriptInterface::luaDoKickPlayerFromParty(lua_State* L)
{
	ScriptEnviroment* env = getScriptEnv();

	Player* player = env->getPlayerByUID(popNumber(L));
	if(!player)
	{
		reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));
		lua_pushboolean(L, false);
	}

	g_game.playerLeaveParty(player->getID());
	lua_pushboolean(L, true);
	return 1;
}

Note: I just gave you the funcion you need to add it to luascript.h and decalre the function at the top of the luascript.cpp
 
I know how to decalre it.

PS: Thanks + Rep++ (The function should be added to tfs!)

Edit:

What the fuck it dont work?

No Errors,
Nothinkg.
 
Last edited:
Status
Not open for further replies.
Back
Top