andu
Sold 649 scripts, 25 maps and 9 events!
tfs 1.2
player:mount()
player:isMounted()
Someone can handle this? Code should also force to update new movement speed after dismounting etc.
I tried to do myself dismount. It works, tell me if it's okey:
player:mount()
player:isMounted()
Someone can handle this? Code should also force to update new movement speed after dismounting etc.
I tried to do myself dismount. It works, tell me if it's okey:
C++:
int LuaScriptInterface::luaPlayerDismount(lua_State* L) {
// player:dismount()
Player* player = getUserdata<Player>(L, 1);
if (!player) {
lua_pushnil(L);
return 1;
}
if (player->isMounted()) {
player->dismount();
g_game.internalCreatureChangeOutfit(player, player->defaultOutfit);
}
//g_game.internalCreatureChangeOutfit(player, defaultOutfit);
return 1;
}
Last edited: