Postado Agosto 13, 2016 8 anos tem pra tfs 1.2? Em 18/11/2014 em 15:26, narazaky disse: Vamos lá... vai em lib 050-function.lua e adicione isso: function getPlayerResets(cid) local Info = db.getResult("SELECT `reset` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1") if Info:getID() ~= LUA_ERROR then local Resets= Info:getDataInt("reset", getPlayerGUID(cid)) Info:free() return Resets end return LUA_ERROR end depois vá em creaturescript/scrpts e cria um arquivo lookreset.lua e coloca isso dentro: function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then local string = 'You see '..getCreatureName(thing.uid)..' (Level '.. getPlayerLevel(thing.uid)..') [Reset '..getPlayerResets(thing.uid)..'].' if getPlayerFlagValue(thing.uid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then if(getPlayerSex(thing.uid)== 1) then string = string..' He is '.. getPlayerGroupName(thing.uid) ..'.' end if(getPlayerSex(thing.uid)== 0) then string = string..' She is '.. getPlayerGroupName(thing.uid) ..'.' end elseif getPlayerVocation(thing.uid) ~= 0 then if(getPlayerSex(thing.uid)== 1) then string = string..' He is '.. getPlayerVocationName(thing.uid) ..'.' end if(getPlayerSex(thing.uid)== 0) then string = string..' She is '.. getPlayerVocationName(thing.uid) ..'.' end else if(getPlayerSex(thing.uid)== 1) then string = string..' He has no vocation.' end if(getPlayerSex(thing.uid)== 0) then string = string..' She has no vocation.' end end -- if (getPlayerNameByGUID(getPlayerPartner(thing.uid), false, false) ~= nil) or (getPlayerNameByGUID(getPlayerPartner(thing.uid), false, false) == true) then -- if(getPlayerSex(thing.uid)== 1) then -- string = string..' He is '.. (getPlayerSex(thing.uid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(thing.uid)) ..'.' -- end -- if(getPlayerSex(thing.uid)== 0) then -- string = string..' She is '.. (getPlayerSex(thing.uid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(thing.uid)) ..'.' -- end -- else -- string = string -- end if getPlayerGuildId(thing.uid) > 0 then if(getPlayerSex(thing.uid)== 1) then string = string..' He is ' .. (getPlayerGuildRank(thing.uid) == '' and 'a member' or getPlayerGuildRank(thing.uid)) ..' of the '.. getPlayerGuildName(thing.uid) end if(getPlayerSex(thing.uid)== 0) then string = string..' She is ' .. (getPlayerGuildRank(thing.uid) == '' and 'a member' or getPlayerGuildRank(thing.uid)) ..' of the '.. getPlayerGuildName(thing.uid) end string = getPlayerGuildNick(thing.uid) ~= '' and string..' ('.. getPlayerGuildNick(thing.uid) ..').' or string..'.' end if (getPlayerGroupId(cid) >= 3) then if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(thing.uid) ..' / '.. getCreatureMaxHealth(thing.uid) ..'], Mana: ['.. getCreatureMana(thing.uid) ..' / '.. getCreatureMaxMana(thing.uid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(thing.uid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false ---------------------------------------------------------------------------------------------------------------------------------------- elseif thing.uid == cid then local string = 'You see yourself. (Level '.. getPlayerLevel(cid)..') [Reset '..getPlayerResets(cid)..'].' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end -- if (getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil) or (getPlayerNameByGUID(getPlayerPartner(thing.uid), false, false) == true) then -- string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' -- end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'' end if (getPlayerGroupId(cid) >= 3) then if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end depois vá em login.lua e adicione isso antes do return true: registerCreatureEvent(cid, "lookreset") depois em creaturescript.xml adicione isso: <event type="look" name="lookreset" event="script" value="lookreset.lua"/> depois só aproveitar PS: estou fazendo um sistema de reset igual 100% ao do rad, depois eu posto aqui (pode ser por talk ou pelo site, configuravel) tem pra tfs 1.2?
Postado Fevereiro 19, 2019 6 anos script funciona normal mano mas quando o propio player da look nele mesmo nao mostra os resets e tbm tenho um sistema de patentes que mostra os kill e as frags depois q add esse sistema seu nao mostra mais
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.