How to use:
/giveitem playername, itemid, amount
:blink:
/giveitem playername, itemid, amount
Lua:
function onSay(cid, words, param)
local param = param.explode(param, ',')
if param then
if isPlayer(getCreatureByName(param[1])) == TRUE then
doPlayerSendTextMessage(getCreatureByName(param[1]), 22, "You recieved an item from an admin!")
doPlayerAddItem(getCreatureByName(param[1]), param[2], param[3])
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
end
return TRUE
end
PHP:
<talkaction log="yes" access="5" words="/giveitem" event="script" value="giveitem.lua"/>
:blink: