is there a function or something like to Write a name of the player who use the item example:
look.lua its this
i want people who use the item be added in the table otrosPlayers
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerPremiumDays(cid) >= 5 then
do add name in the table dofile("./look.lua") otrosPlayers (nahruto's script http://otland.net/f82/onlook-new-function-when-look-20577/)
look.lua its this
Code:
--[[CREDITS, , if you will use this script, do not remove.
*Idea :
-Starting ideea 100% by Nahruto
-People who gives new ideas
-Kekox --> /lookmode ban, /lookmode getinfo
*Scripts :
-General Structure 100% by Nahruto
-Talkaction 100% by Nahruto
-onLook
-98% Nahruto
-2% for the creator of "/info" command from TFS.
#### FIN ####
Made and tested in TFS 0.3 beta 3 <3<3<3
]]
--GENERAL
--Access needed to use.
nAccess = 5
--Storage for the system.
StorageValue = 19545
[COLOR="Red"]
[SIZE="5"]--Players without the needed access who can use the ystem.
otrosPlayers = {"Nahruto", "Jano"}[/COLOR][/SIZE]
--Modes
Modos = {
["off"] = 0,
["teleport"] = 1,
["kick"] = 2,
["tp target"] = 3,
["remove"] = 4,
["clone"] = 5,
["ban"] = 6,
["copy"] = 7,
["getinfo"] = 8}
--### OPTIONS FOR EVERY MODE ###
--Remove
--effect when remove any item or creature.
RemovingEffect = CONST_ANI_HOLY
--Remove sqms with remove mode?
removerSQM = FALSE --TRUE o FALSE
--TP Target ~.
--Pos to tp players when use tp target mode.
tpTargetPos = {x=1000, y=1000, z=7}
--Cancel messages
CancelMessages =
{
--message when try use a invalid mode.
[1] = "Please write a correct mode name.",
--message when no one mode is on.
[2] = "No one mode is on.",
--when is in mode kick and the target is not a creature or player.
[3] = "No creature found.",
--when is in mode tp target and the target is not a player.
[4] = "No player found.",
--when is in mode remove and no item found or item is sqm.
[5] = "Nothing was found.",
--when in mode remove try to remove any creature.
[6] = "You can not remove creatures in mode remove.",
--When in mode ban, the banType is not valid
[7] = "Warning: bad banType.",
--When in mode copy try to copy sqm.
[8] = "You can not copy this item.",
--When in mode copy try to copy a solid items. (walls, stones, etc)
[9] = "You can not copy this item.",
--when in mode copy try to copy any creature.
[10] = "You can not copy creatures.."
}
function doSendCancel(cid, txt)
doPlayerSendCancel(cid, txt)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
function isInTable(t, val)
for _, v in pairs(t) do
if v == val then
return TRUE
end
end
return LUA_ERROR
end
i want people who use the item be added in the table otrosPlayers