Scripting/Squirrel/Functions/UnbanIP

From Vice City Multiplayer
Revision as of 17:52, 6 December 2015 by Skbyt (talk | contribs) (→‎Example)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

This function will unban an IP from the server.

Syntax

UnbanIP( ip )

Arguments

  • string ip - The IP to be unbanned

Example

function onPlayerCommand( player, cmd, text )
{
    if ( cmd == "unbanip" )
    {
        if ( !IsIPBanned( text ) == true )  MessagePlayer( "Provided IP '" + text + "' was not banned previously", player );
        else
        UnbanIP( text );
        MessagePlayer( "IP: " + text + " has been unbanned", player );
    }
}

Notes

Checks if IsIPBanned( ..provided ip.. ), if returns true then triggers UnbanIP( ..provided ip.. ) when on event onPlayerCommand.

Related Functions