•  
Welcome, Guest. Please login or register.

News:


Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Rocky

Pages: 1 ... 8 9 [10] 11 12 ... 21
136
Off Topic / Re: Le` troll
« on: November 30, 2012, 11:59:55 am »
Un-friend him, don't accept fake friend requests or of those who you don't know. problem solved?  ;)

138
Scripting Support / Re: Help camera!!
« on: November 14, 2012, 04:04:44 pm »
go ingame use /s and save the coords of :-

1. where the place should be standing.
2. where the camera should be placed.
3. where the camera should be looking at.

and use the coordinates in here

<PlayerPos x="-277.10" y="-34.30" z="7.00"/>
<CamPos x="-276.84" y="-31.42" z="7.10"/>
<CamLook x="-277.10" y="-34.30" z="7.00"/>

139
Accepted Applications / Re: MK Application - Mr.Tsubasa
« on: November 12, 2012, 02:14:20 pm »
You deserve trainee from my side from your attitude.. still haven't seen you ingame

140
Scripting Support / Re: Help camera!!
« on: November 10, 2012, 06:56:51 am »
Get the coordinates where your camera must be and replace x y z. Lo

141
Off Topic / Re: Ah! the Memories!
« on: November 08, 2012, 10:59:54 am »
It still happens to me.  WHY ALWAYS ME?

142
Off Topic / Re: Which cell phone u have???? ;)
« on: November 08, 2012, 10:57:28 am »
Mine is a Motorola 181 (2005 to 2007) version. Its the shitest one out of them all. And i admit it.


Classic one, seriously i love such phones where we can only call.

143
Off Topic / Re: Little help
« on: September 28, 2012, 08:50:07 am »
Thanks for suggestions but i bought HP pavilion G6 for 36k: 4 GB ram 2 gb graphicsl. :D
@X_94: Alienware is about 1.5 lacks if i am right.

144
Off Topic / HPD
« on: September 26, 2012, 04:48:29 pm »
Happy Birthday me.

146
Scripting / [SQUIRREL] Rocky's Ban System
« on: September 23, 2012, 05:47:44 am »
Rocky's Ban System

I made this ban system for PsyShell owned by Thomas, this script uses a new array method which is useful storing data, i have to thank X_94 for showing me this wonderful method. these functions also free query after use so no need to be afraid of memory leaks. Also date and reason will be stored on database you can take a look with SQL database browzer.

Code: [Select]
BannedIPs <- [];  //Banned IPs will be stored here
BannedNicks <- []; //Banned Nicks will be stored here

//Load up ban data into array.
function onScriptLoad( )
{
         LoadModule("sq_lite");
database <- ConnectSQL("Banlist.db");
LoadBansInMemory(); //Load ban files into array.
print( "Banlist loaded!" );
}

//Disconnect database.
function onScriptUnload( )
{
DisconnectSQL( database );
}

Ban data loading function

Code: [Select]
function LoadBansInMemory()
{
    local query = QuerySQL(database, "CREATE TABLE IF NOT EXISTS Banlist ( Nick TEXT, Reason TEXT, Date TEXT, IP TEXT)" );
FreeSQLQuery( query );

//Store data into array.
    local q = QuerySQL( database, "SELECT Nick, Reason, Date, IP FROM Banlist" );
    while ( GetSQLColumnData ( q, 0 ) )
{
BannedIPs.push( GetSQLColumnData( q, 3 ).tostring() );
BannedNicks.push( GetSQLColumnData( q, 0 ).tostring() );

GetSQLNextRow( q );
}
     FreeSQLQuery( q );
}

Ban player function

Code: [Select]
//Function to ban a player.
function BanPlayer( admin, player, reason )
{
      if( BannedIPs.find( player.IP.tostring() ) == null )
  {
             BannedIPs.push( player.IP.tostring() );
         BannedNicks.push( player.Name.tolower() );
                 local q = QuerySQL( database,"INSERT INTO Banlist ( Nick, Reason, Date, IP) VALUES ( '"+player.Name+"', '"+reason+"',  '"+GetFullTime()+"', '"+player.IP+"')" );
                 FreeSQLQuery( q );
                 Message( "[BAN] Banned: " + player + " by: " + admin + " for: " + reason);
                 KickPlayer( player );

  }
}

Unban functions

Code: [Select]

//Function to unban a player using IP.
function UnbanFromIP( ip )
{
          if( BannedIPs.find( ip.tostring() ) != null )
          {
                local query = QuerySQL( database, "SELECT Nick FROM Banlist WHERE IP='" + ip + "' COLLATE NOCASE" );
local nickname = GetSQLColumnData( query, 0 );
FreeSQLQuery( query );
query = QuerySQL( database,"DELETE FROM Banlist WHERE Nick='" +nickname+ "' COLLATE NOCASE" );
FreeSQLQuery( query );
                    BannedNicks.remove( BannedNicks.find( nickname.tostring() ) );
BannedIPs.remove( BannedIPs.find( ip.tostring() ) );
  }
}

//Function to unban a player from their nickname.
function UnbanFromNick( nickname )
{
          if( BannedNicks.find( nickname.tostring() ) != null )
          {
                local query = QuerySQL( database, "SELECT IP FROM Banlist WHERE Nick='" + nickname + "' COLLATE NOCASE" );
                    local ip = GetSQLColumnData( query, 0 );
FreeSQLQuery( query );
query = QuerySQL( database,"DELETE FROM Banlist WHERE Nick='" +nickname+ "' COLLATE NOCASE" );
FreeSQLQuery( query );
                    BannedNicks.remove( BannedNicks.find( nickname ) );
BannedIPs.remove( BannedIPs.find( ip.tostring() ) );
  }
}

Checking

Code: [Select]
function onPlayerJoin( player )
{
// Check if the name is banned
    if( ( BannedNicks.find( player.Name.tolower() ) != null ) || ( BannedIPs.find( player.IP.tostring() ) != null ) )
{
        Message("[BAN] Auto-Kicking: " + player.Name + " for Ban Evading.");
KickPlayer( player );
return;
}
}

function useful to find a string is in IP format or not, used for /c unbanip command.

Code: [Select]
function IsStringIP( string )
{
        local Format = split(string, ".");
        if( Format != 4 ) return false;
return true;
}

Version v1.0
Coded by Rocky

I have tested it and it works, if you have found any bugs for suggestions either pm me or post here.
BBC Copypaste from Squirrel forum

147
Media Related / Re: FUN
« on: September 21, 2012, 10:54:20 am »


STILL HOTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT

149
Accepted Applications / Re: Tony's appl.
« on: September 19, 2012, 09:39:18 am »
Seems like a veteran changing my vote to MKs.

150
Inactivity / Re: Inactive
« on: September 18, 2012, 06:55:05 am »
Welcome back man! :)

Pages: 1 ... 8 9 [10] 11 12 ... 21