Whats this commands ability?
If you say for example !info "Nikolas1994
It will write a book in your backpack with the players skills,level,access,how much money he has his position,his vocation etc
save this as info.lua in data/talkactions/scripts
in talkactions.xml
Comments please
If you say for example !info "Nikolas1994
It will write a book in your backpack with the players skills,level,access,how much money he has his position,his vocation etc
save this as info.lua in data/talkactions/scripts
Code:
function onSay(cid,words,param)
local player = getPlayerByName(param)
if getPlayerAccess(cid) >= 3 then
if isPlayer(player) == 1 then
book = doPlayerAddItem(cid,1986,1)
doSetItemText(book,'Information about '..getPlayerName(player)..' : nLevel: '..getPlayerLevel(player)..';nMagic Level: '..getPlayerMagLevel(player)..'.nnSkills: nFist: '..getPlayerSkill(player,0)..';nClub: '..getPlayerSkill(player,1)..';nSword: '..getPlayerSkill(player,2)..';nAxe: '..getPlayerSkill(player,3)..';nDistance: '..getPlayerSkill(player,4)..';nShield: '..getPlayerSkill(player,5)..';nFishing: '..getPlayerSkill(player,6)..'.nnCurrent Position:nX='..getPlayerPosition(player).x..' Y='..getPlayerPosition(player).y..' Z='..getPlayerPosition(player).z..'nAccess= '..getPlayerAccess(player)..'nCurrent Health= '..getPlayerHealth(player)..'nCurrent Mana= '..getPlayerMana(player)..'nPlayer Vocation Id = '..getPlayerVocation(player)..'nnMoney:nCrystal Coins= '..getPlayerItemCount(player,2160)..'nPlatinum Coins= '..getPlayerItemCount(player,2152)..'nGold Coins= '..getPlayerItemCount(player,2148)..'n----End Here----')
else
doPlayerSendTextMessage(cid,22,'A player with this name is not online')
end
else
return 0
end
end
in talkactions.xml
Code:
<talkaction words="!info" script="info.lua" />
Comments please