• 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!

Lua add days talkaction!

xubeiga

New Member
Joined
Jun 17, 2009
Messages
137
Reaction score
1
ok guys, this is driving me crazy! i'm using /adddays and /removedays by kekox and i cant use them! i tried all ways!
i used /adddays PLAYER, nº days and it didnt work
look the script of adddays:

XML:
function onSay(cid, words, param, channel)
        if(param == '') then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
                return true
        end
 
        local t = string.explode(param, ",")
        t[1] = tonumber(t[1])
        if(not t[1]) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
                return true
        end
 
        local pid = cid
        if(t[2]) then
                pid = getPlayerByNameWildcard(t[2])
                if(not pid) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
                        return true
                end
        end
 
        if(t[1] > 365) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can only add max 365 vip days.")
                return true
        end
 
        sender = getPlayerByNameWildcard(cid)
 
    doAddVipDays(pid, t[1])
    doPlayerSendTextMessage(cid, "You have added ".. t[1] .." vip days to ".. t[2])
    doPlayerSendTextMessage(pid, sender .." just added you ".. t[1] .." vip days.")    
        return true
end

what am i doing wrong? how can i use this talkaction? :S ty!
look what happens:

14:38 /adddays Player, 1
14:38 Command requires numeric param.
 
It works like this:
/adddays 10 -> will add 10 days to your ownaccount
/adddays 10, PlayerName -> add 10 days to PlayerName
 
Back
Top