• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Reward commands, without mc

Hernest

New Member
Joined
Jul 26, 2010
Messages
152
Reaction score
3
Location
poland
Hello,
i am looking for reward commands, something like
!reward magic sword
and everyone on server get item, but one item for one ip, not item for every multiclient character.

Yes, i used search tool.
 
Code:
function onSay(cid, words, param)

     if param == "" then
         return doPlayerSendCancel(cid, "Command param required.")
     end

     local t = string.explode(param, ",")
     local item, ips = tonumber(t[1]), {}
     if not item then
         item = getItemIdByName(t[1], false)
         if not item then
             return doPlayerSendCancel(cid, "An item with the name "..t[1].." doesn't exist.")
         end
     end
     local count = tonumber(t[2])
     if not count then
         count = 1
     end     
     local info = getItemInfo(item)
     for _, pid in pairs(getPlayersOnline()) do
         if not isInArray(ips, getPlayerIp(pid)) and pid ~= cid then
             doPlayerAddItem(pid, item, count)
             doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, "You received "..(count > 1 and count or info.article).." "..(count > 1 and info.plural or info.name)..".")
             table.insert(ips, getPlayerIp(pid))
         end
     end
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You gave "..(count > 1 and count or info.article).." "..(count > 1 and info.plural or info.name).." to all online players.")
     return true
end
 
someone fix that for tfs 0.3.6
and only i need that give reward with id i can edit it please? :)
or Just for any items i want !!

/reward double exp medal
 
Back
Top