• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Take item and unban

enriel

Big L
Joined
Dec 14, 2007
Messages
1,254
Reaction score
2
Location
Montenegro
as the topic says, if you use !unban "CHARACTER it takes a special item, anyone knows or has a script to give ? :p

btw I found this, but as Im very nooobish I don't know where to set item and 17:46 Player or account "XXXXX does not exists.
Code:
function onSay(cid, words, param)
    if(param == "") then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
        return TRUE
    end

    local tmp = getAccountIdByName(param)
    if(tmp == 0) then
        tmp = getAccountIdByAccount(param)
        if(tmp == 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player or account '" .. param .. "' does not exists.")
            return TRUE
        end
    end

    if(isAccountBanished(tmp) == TRUE and doRemoveBanishment(tmp) == TRUE) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, tmp .. " has been unbanned.")
    end

    if(isAccountDeleted(tmp) == TRUE and doRemoveDeletion(tmp) == TRUE) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, tmp .. " has been undeleted.")
    end

    if(getPlayerViolationAccess(cid) > 2) then
        local ip = getIpByName(param)
        if(isIpBanished(ip) == TRUE and doRemoveIpBanishment(ip) == TRUE) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "IpBanishment on " .. doConvertIntegerToIp(ip) .. " has been lifted.")
        end

        if(isPlayerNamelocked(param) == TRUE and doRemoveNamelock(param) == TRUE) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Namelock from " .. param .. " has been removed.")
        end
    end
    return TRUE
end
 
I ment the players, why should a GM be able to use it? lol doesn't matter but
if you use this command !unban "character . it will unbann your character. It will be used as donation.
 
I ment the players, why should a GM be able to use it? lol doesn't matter but
if you use this command !unban "character . it will unbann your character. It will be used as donation.

Why don't you make it in the phppage then ^.-. Would be much easyer:P
 
@up, I have no idea because.. the thing I posted is unban script so if someone could add so it takes 1 item and gives unban.. would be great :>
 
Ok what do you want the luascript or the php one? ;d If you want a php one people can directly be unbanned after they pressed it in the shoppa =D Also I think I saw a script like that:P
 
Try something like this:
Code:
local unbanitem = 1337

function onSay(cid, words, param)

    if(param == "") then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Character required.")
        return TRUE
    end

    local tmp = getAccountIdByName(param)
    if(tmp == 0) then
        tmp = getAccountIdByAccount(param)
        if(tmp == 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player or account '" .. param .. "' does not exists.")
            return TRUE
        end
    end

    if isAccountBanished(tmp) == TRUE then
	
		if doPlayerRemoveItem(cid, unbanitem, 1) and doRemoveBanishment(tmp) == TRUE) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, tmp .. " has been unbanned.")
		else
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You need to have atleast one ".. unbanitem .. ".")
		end
		
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"This character isn't banned.")
    end
	
    return TRUE
end
note: I didn't test it, if it didn't work please tell me what error you get.
 
Last edited:
Back
Top