Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. int LuaScriptInterface::luaDoPlayerEnableSharedExperience(lua_State *L)
  2. {
  3.    
  4.     uint8_t sharedExpActive = popNumber(L);
  5.     uint32_t cid = popNumber(L);
  6.  
  7.     ScriptEnviroment* env = getScriptEnv();
  8.     Player* player = env->getPlayerByUID(cid);
  9.     if(player){
  10.         player->getParty()->setSharedExperience(player, sharedExpActive == 1);
  11.         lua_pushboolean(L, true);
  12.     }
  13.     else{
  14.         reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));
  15.         lua_pushboolean(L, false);
  16.     }  
  17.  
  18.     return 1;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement