Jump to content

buba123

Members
  • Posts

    15
  • Joined

  • Last visited

buba123's Achievements

Square

Square (6/54)

0

Reputation

  1. Solved TAPL help me on pm
  2. i have add this but skin selector doesn't appear after login on account addEventHandler ( "onPlayerJoin", getRootElement(), selectorenable )
  3. i don't double post it's just another question ^^. I want to run skin selector when you login whit login script. Somethink like you are join on the server now appear login/register window you are create then login and now appear skin selector ; )
  4. i have skin selector but how to run this resource when you login to game?
  5. buba123

    Timer

    ok i found other script with save money pos wep and skin ; P now i just trying add to it money update like zombie kills ; D
  6. buba123

    Timer

    attemp to index global 'tWep' <a nil value>
  7. buba123

    Timer

    i find now weapons but it dont save couse have erros. function table.empty( t ) if type( t ) ~= "table" then return false end return not next( t ) end addEventHandler( "onPlayerLogin",root, function( ) local acc = getPlayerAccount( source ) if acc then local weap = getAccountData( acc,'weapons' ) if weap then loadstring( "t = { "..weap.." } ".. "for _,v in pairs( t ) do ".. "giveWeapon( "..source..",v[1],v[2],false ) ".. "end" )( ) end end end ) addEventHandler( "onPlayerQuit",root, function( ) local acc = getPlayerAccount( source ) if acc and not isGuestAccount( acc ) then if not table.empty( tWeap[ source ] ) then local eStr = "" for _,v in pairs( tWeap[ source ] ) do eStr = eStr.."{"..v[1]..","..v[2].."}," end setAccountData( acc,"weapons",eStr:sub( 0,#eStr-1 ) ) end end end ) ?
  8. buba123

    Timer

    Thank you it works and have one question do you have resource what save pos, money ,wpns and ammo like my save zombie kills? couse i cant find any ;c
  9. buba123

    Timer

    it work thank ; ) but for one kill zombie i get warrning and error warning:bad argument @ 'getelementdata' [expected element at argument 1, got boolean] this line local zombieKills = getElementData(killer,"Zabite Zombie") and error:attempt to perform arithmetic on local 'zombieKills' this line setElementData(killer,"Zabite Zombie",(zombieKills)+1)
  10. buba123

    Timer

    i make somethnk like this function updatePlayersZKILLS ( ) for index, player in ipairs ( getElementsByType "player" ) do setElementData ( player, "Zabite Zombie", tonumber(zombieKills)+1 ) end end setTimer ( updatePlayersZKILLS, 1000, 0 ) but in console it write i cant arthmetic to nill... what is wrong?
  11. buba123

    Timer

    i have colum in scoreboard what show how many zombie you kill but if you join server first time you have 0 zombie kill then you kill some zombies but in scoreboard it show 0. you are doing relogin and now it show how many zombie you kill to that time when you relogin. i want to update that zombie kills ingame without player must relogin to see it
  12. buba123

    Timer

    and dont work i try with loops and still doesnt work i dont know how to do if someone kill zombie it add to scoreboard not only to account data -.-
  13. buba123

    Timer

    Ok sorry for that ; P and thank i try this
  14. buba123

    Timer

    Hi i have code what show in scoreboard how many zombies you have killed and save it to account file but in scoreboard zombie kills is only update when you relogin it doesnt in game when you kill, i add timer but it still doesnt work what is wrong here? exports.scoreboard:addScoreboardColumn('Zabite Zombie') addEvent("onZombieWasted",true) addEventHandler("onZombieWasted",root, function (killer) givePlayerMoney(killer, 2) addPlayerZombieKills(killer) end) function addPlayerZombieKills(killer) local account = getPlayerAccount(killer) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zabite Zombie") if not zombieKills then setAccountData(account,"Zabite Zombie",0) end setAccountData(account,"Zabite Zombie",tonumber(zombieKills)+1) end addEventHandler("onPlayerLogin",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zabite Zombie") if zombieKills then setElementData(source,"Zabite Zombie",tostring(zombieKills)) else setElementData(source,"Zabite Zombie",0) end end) function timer() setTimer( addPlayerZombieKills, 1000, 1, source ) end
  15. Siemka mam taki problem, że mam score board żeby pokazywało ile gracz zabił zombie i żeby zapisywało je do pliku gracza niby działa ale dajmy że gracz ma zabite 3 zombi gra i zabije 5 to na score board nadal jest 3 a jak zrobi re login to dopiero mu doda i będzie miał 8. jak dodać do tego timer.. i czemu nie działa na kasę z timerem? nie wyświetla w ogóle kasy i nie zapisuje ale w tym od zwykłego gta kasa jest dodawana -.- nie potrafię sam w lua pisać i potrzebuje pomocy ; P aa i jeszcze jedno używam simple login system i niby operuje to na pliku accounts.xml stworzyłem konto jest działa wczytuje po zalogowaniu ilość zabitych zombie ale w plikach serwera nie mam nigdzie pliku z kontem.... tutaj jest kod tej tablicy: exports.scoreboard:addScoreboardColumn('Zabite Zombie') addEvent("onZombieWasted",true) addEventHandler("onZombieWasted",root, function (killer) givePlayerMoney(killer, 2) addPlayerZombieKills(killer) end) function addPlayerZombieKills(killer) local account = getPlayerAccount(killer) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zabite Zombie") if not zombieKills then setAccountData(account,"Zabite Zombie",0) end setAccountData(account,"Zabite Zombie",tonumber(zombieKills)+1) end addEventHandler("onPlayerLogin",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zabite Zombie") if zombieKills then setElementData(source,"Zabite Zombie",tostring(zombieKills)) else setElementData(source,"Zabite Zombie",0) end end) exports [ "scoreboard" ]:addScoreboardColumn ( "Kasa", 3 ) -- Add the "Money" column to the scoreboard. function updatePlayersMoney ( ) -- Create "updatePlayersMoney" function. for index, player in ipairs ( getElementsByType "player" ) do -- Loop through all online players. setElementData ( player, "Money", getPlayerMoney ( player ) ) -- Set "Money" element data to the player money. end -- End our loop. end -- End our function. setTimer ( updatePlayersMoney, 2500, 0 ) -- Set a infinite 2.5 seconds timer to execute "updatePlayersMoney" function.
×
×
  • Create New...