Well this is a little script that im just messing around with ipairs learning etc, (By the help of Cykotitan) So basically what the script does is a GM chooses a item and a reason why every player except players with notations get the item.
function onSay(cid, words, param, channel) local t = string.explode(param, ",") local gm = getCreatureName(cid) for _, cid in ipairs(getPlayersOnline()) do local accId = getPlayerAccount(cid) if(getNotationsCount(accId) < 1) then doPlayerAddItem(cid, t, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Everyone have been rewarded a "..getItemNameById(t).." by "..gm.." for the reason: "..tostring(t)..".") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) end end return TRUE end
/reward 2160, The server crashed so everyone is rewarded a crystal coin.
19:26 Everyone have been rewarded a crystal coin by Chris for the reason: The server crashed so everyone is rewarded a crystal coin.