Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.44 KB | None | 0 0
  1. function ZapiszStatystyki(playerid)
  2.  
  3.  
  4.  
  5.         local world = GetPlayerWorld(playerid);
  6.         local x, y, z = GetPlayerPos(playerid);
  7.         local angle = GetPlayerAngle(playerid);
  8.         local fatness = GetPlayerFatness(playerid);
  9.         local HP = GetPlayerHealth(playerid);
  10.         local MaxHP = GetPlayerMaxHealth(playerid);
  11.         local Mana = GetPlayerMana(playerid);
  12.         local MaxMana = GetPlayerMaxMana(playerid);
  13.         local Lvl = GetPlayerLevel(playerid);
  14.         local MagLvl = GetPlayerMagicLevel(playerid);
  15.         local LP = GetPlayerLearnPoints(playerid);
  16.         local XP = GetPlayerExperience(playerid);
  17.         local NextXP = GetPlayerExperienceNextLevel(playerid);
  18.         local Str = GetPlayerStrength(playerid);
  19.         local Dex = GetPlayerDexterity(playerid);
  20.         local OneH = GetPlayerSkillWeapon(playerid, 0);
  21.         local TwoH = GetPlayerSkillWeapon(playerid, 1);
  22.         local Bow = GetPlayerSkillWeapon(playerid, 2);
  23.         local Xbow = GetPlayerSkillWeapon(playerid, 3);
  24.         local equippedMeleeWeapon = GetEquippedMeleeWeapon(playerid);
  25.         local equippedRangedWeapon = GetEquippedRangedWeapon(playerid);
  26.         local equippedArmor = GetEquippedArmor(playerid);
  27.        
  28.  end
  29.                 local fileWrite = io.open("db/"..GetPlayerName(playerid)..".txt", "w+");
  30.                     fileWrite:write(Player[playerid].password,"\n");
  31.                 if Player[playerid].class == nil then
  32.                         Player[playerid].class = 1;
  33.                         fileWrite:write(Player[playerid].class.."\n");
  34.                 else
  35.                         fileWrite:write(Player[playerid].class.."\n");
  36.                 end
  37.         fileWrite:write(world," ",x," ",y," ",z," ",angle,"\n");
  38.         fileWrite:write(fatness,"\n");
  39.         fileWrite:write(HP," ",MaxHP," ",Mana," ",MaxMana,"\n");
  40.         fileWrite:write(Lvl," ",MagLvl," ",LP," ",XP," ",NextXP,"\n");
  41.         fileWrite:write(Str," ",Dex," ",OneH," ",TwoH," ",Bow," ",Xbow,"\n");
  42.         fileWrite:write(equippedMeleeWeapon," ",equippedRangedWeapon," ",equippedArmor,"\n");
  43.      
  44.         for i = 1, 100 do
  45.          GetPlayerItem(playerid, i);
  46.          
  47.         end
  48. function OnPlayerResponseItem(playerid, sloty, instance, ilosc, equiped)
  49.     if instance = "Null" then
  50.       return;
  51.      end
  52.     if equiped = false;
  53.        fileWrite:write("Slot:", sloty, "Instance:", instance, "Ilosc:", ilosc, "\n");
  54.       end
  55. end
  56.    fileWrite:close();
  57.  
  58.  
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement