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

help ban players dont work

megazx

Graphic designer
Joined
Mar 4, 2013
Messages
443
Solutions
2
Reaction score
32
Location
Egypt
help fast please

www.gulfup.com
[/url][/IMG]

thats the error


PHP:
local default_comment = ""
local default_lenght = 1 -- ban time in hours

function onSay(cid, words, param)
    local parametres = string.explode(param, ",")
    if(parametres[1] ~= nil) then
        local accId = getAccountIdByName(parametres[1])
        if(accId > 0) then
            local lenght = default_lenght
            local comment = default_comment
            if(parametres[2] ~= nil and tonumber(parametres[2]) > 0) then
                lenght = tonumber(parametres[2])
            end
            if(parametres[3] ~= nil) then
                comment = parametres[3]
            end
            local player = getPlayerByNameWildcard(parametres[1])
            if(isPlayer(player) == TRUE) then
                doRemoveCreature(player)
            end
        else
            doPlayerSendCancel(cid, "Player with name " .. parametres[1] .. " doesn't exist.")
        end
    else
        doPlayerSendCancel(cid, "You must enter name.")
    end
    return true
end


and when i say /ban player name
it just kick him and he can log in again
 
Last edited:
Could you show the structure of your bans table?

Perhaps it's just the column reason which is missing then execute this query in your phpMyAdmin.
SQL:
ALTER TABLE `bans` ADD `reason` int(10) unsigned NOT NULL DEFAULT 0;
 
CTRL+Right click on the one you are banning.
Click statement stuff (long time ago xd)
Its under / over "report statement"
Then fill in all those marks how you want to ban them.
Reason and more..

REP++ please
 
Could you show the structure of your bans table?

Perhaps it's just the column reason which is missing then execute this query in your phpMyAdmin.
SQL:
ALTER TABLE `bans` ADD `reason` int(10) unsigned NOT NULL DEFAULT 0;


www.gulfup.com
[/url][/IMG]

this is the structure

and i executed this query

- - - Updated - - -

or u may fix the talkaction ban script

- - - Updated - - -

or u may fix the talkaction ban script
 
Back
Top