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


Topics - Rocky

Pages: [1] 2
1
Clan Chat / Just came to say hello.
« on: November 29, 2017, 09:58:18 am »
Its been like 5 or 6 years since i touched VC:MP. Been playing CS:GO and other games lately... Just felt like saying hello to all those old VC-MP veterans whose names i don't even remember expect X_94, Kelvin, Wildrose lol. Even forgot most of the players who i used to regularly play back in those days. So how is vc-mp now a days? With the new 0.4 or 0.5 update n all. What are the chances of having the old fun back?


2
Inactivity / Just a note.
« on: November 06, 2014, 11:19:46 am »
I'm not leaving and all but i haven't played vc-mp for last few months (four or five months) and i don't feel like playing it in the future either. So just saying that i'm not useful to the clan other than just a name in the roster. Its up to you guys to kick me or not.

3
Off Topic / Mafia II multiplayer
« on: March 26, 2014, 03:43:36 pm »

4
Inactivity / my turn
« on: February 02, 2014, 03:15:15 pm »
Guess what? Its my turn to go away from keyboard for a month. I have exams coming up and i have to work hard. Bye guys i'll see ya later. :)

5
Scripting / [SQUIRREL][Bubble sort]Get Top 3 Players
« on: December 07, 2013, 02:48:46 pm »
Get Top 3 Players according to their score, kills, K/D ratio, money.

This is one of the thousand ways to get top players according to their Kills, Cash etc.. This example will print the top three richest player in the server, I am sure with minor edits you can use this method to find best killers online. I used Bubble sorting in this code to sort.

Code: [Select]
Plr <- { };
function GetTop3( player )
{
local t, ta,i,j,k=0;
for(i=0;i<GetMaxPlayers();i++)
{
     if( FindPlayer( i ) )
{
        Plr[ i ] <- { };
        Plr[ i ].Nick <- player.Name.tostring();
        Plr[ i ].Money <- FindPlayer( i ).Cash;
k++;
         }
}
  //Player1: 2 p2: 3 p3: 4
  for(j=0;j<GetMaxPlayers();j++)
  {
    for(i=0;i<GetMaxPlayers()-1-j;i++)
{
    if( Plr.rawin( i ) && Plr.rawin( i + 1 ) && Plr[ i ].Money < Plr[ i + 1 ].Money )
{
     t = Plr[ i + 1 ].Nick;
ta = Plr[ i + 1 ].Money;
Plr[ i + 1 ].Nick <- Plr[ i ].Nick;
Plr[ i + 1 ].Money <- Plr[ i ].Money;
Plr[ i ].Nick <- t;
Plr[ i ].Money <- ta;
         }
    }
}
PrivMessage("Richest Players Online:",player );
for(i=0,j=1;i<k;i++,j++)
PrivMessage( j + ". " + Plr[ i ].Nick + " - " + Plr[ i ].Money,player );
}

To use this in your script paste the above code in your script files and add a command to call the function. Please report if you find any bugs.  ;)

6
Scripting / [SQUIRREL]Rocky's Temp-Ban system
« on: December 07, 2013, 02:48:15 pm »
Rocky's Temporary Ban System
Some people have been asking me for a Temp-Ban system so here it is, To use it simple log in as admin and type /c tempban <player> <days:hours:mins>
Here's the code:

Code: [Select]
/*
        [RBG] Rocky's Temp-Ban system (v0.1)
This is completly made by me,
You are free to use, modify it for your own use.
Put my name on credits list only if you like my work.
*/
//Events ->
function onScriptLoad()
{
     LoadModule( "sq_lite" );
database <- ConnectSQL( "Data.sqlite" );
     QuerySQL( database, "CREATE TABLE IF NOT EXISTS Banned( ban_nick TEXT, ban_ip TEXT, ban_time TEXT, ban_expire TEXT, ban_expireratio TEXT, ban_admin TEXT, ban_reason TEXT )" );
print("[RBAN] Rocky's Ban system Loaded (v0.1)");
}        

function onPlayerCommand( player, cmd, text )
{
     cmd = cmd.tolower();
     if ( cmd == "tempban" )
     {
      local txt_Split;
          if( !player.IsAdmin ) PrivMessage("[RBAN] You are not a admin.", player );
          else if( !text ) PrivMessage("[RBAN] /c tempban <player> <day:hour:min> <reason>", player);
          else
          {
                if( NumTok( text, " " ) == 2 )
{
     txt_Split = split( text, " " );
local plr = FindPlayer( txt_Split[ 0 ] ), expire = txt_Split[ 1 ];
if( plr ) AddBan( player, plr, expire );
else PrivMessage("[RBAN] No such player.", player );
}
else if( NumTok( text, " " ) >= 3 )
{
     txt_Split = split( text, " " );
                     local plr = FindPlayer( txt_Split[ 0 ] ), expire = txt_Split[ 1 ], reason = txt_Split[ 2 ];
if( plr ) AddBan( player, plr, expire, reason );
else PrivMessage("[RBAN] No such player.", player );
}
else PrivMessage("[RBAN] /c tempban <player> <day:hour:min> <reason>", player);
  }
     }
}

function onPlayerJoin( player )
{
     Banned( player );
}

//Functions ->
//Everyone is familiar with this function. :P
function NumTok(string, separator)
{
local tokenized = split(string, separator);
return tokenized.len();
}
//This basically stores the ban info into database reason for ban is optional.
function AddBan( admin, player, expire, reason = "Not Specified" )
{
     //Equation = (DAYS*24*60*60) + (HOUR*60*60) + (MIN*60)
     local ban_Expire = split( expire, ":" ); //days:hours:minutes
if( NumTok( expire, ":" ) == 3 )
{
if( IsNum( ban_Expire[ 0 ] ) &&  IsNum( ban_Expire[ 1 ] ) && IsNum( ban_Expire[ 2 ] ) )
{
         if( ban_Expire[ 0 ].tointeger() <= 31 && ban_Expire[ 1 ].tointeger() <= 24 && ban_Expire[ 2 ].tointeger() <= 60 )
{
        local ban_Expires = ( (ban_Expire[ 0 ].tointeger()*24*60*60) + (ban_Expire[ 1 ].tointeger()*60*60) + (ban_Expire[ 2 ].tointeger()*60) ), 
                    Calc = ban_Expire[ 0 ] + " Day(s), " + ban_Expire[ 1 ] + " Hour(s), " + ban_Expire[ 2 ] + " Minute(s).",
                    query = QuerySQL( database, "INSERT INTO Banned( ban_nick, ban_ip, ban_time, ban_expire, ban_expireratio, ban_admin, ban_reason ) VALUES ( '"+ player.Name.tostring() +"','"+ player.IP.tostring() +"','"+ time().tostring() +"', '"+ ban_Expires.tostring() +"', '" + expire.tostring() + "', '"+ admin.Name.tostring() +"', '"+ reason.tostring() +"')");
FreeSQLQuery( query );
PrivMessage("[RBAN] You have been temporarily banned by " + admin.Name, player);
PrivMessage("[RBAN] Your ban is set to expire in: " + Calc, player);
KickPlayer( player );
}
}
else PrivMessage("[RBAN] Time should be numeric (day:hour:min)", admin );
}
else PrivMessage("[RBAN] Wrong format, day:hour:min (Numeric)", admin );
}
//Check if player is banned and Kick him/her.
function Banned( player )
{
      local query = QuerySQL( database, "SELECT * FROM Banned WHERE ban_nick='" + player.Name + "' COLLATE NOCASE" ), Ip = player.IP.tostring();
  if( GetSQLColumnData( query, 0 )  )
  {
        if( ( time() - GetSQLColumnData( query, 2 ).tointeger() ) >= GetSQLColumnData( query, 3 ).tointeger() )
{
    local query2 = QuerySQL( database, "DELETE FROM Banned WHERE ban_nick='" + player.Name.tostring() + "'" );
FreeSQLQuery( query2 );
    PrivMessage("[RBAN] Your ban has been expired.", player );
PrivMessage("[RBAN] Stick to the rules or you will get permanently banned.", player );
}
else
{
     local Time_Left = TimeRem( GetSQLColumnData( query, 2 ).tointeger(), GetSQLColumnData( query, 4 ) );
     //local splitban = split(  GetSQLColumnData( query, 4 ), ":"  ), Calc = splitban[ 0 ] + " Day(s), " + splitban[ 1 ] + " Hour(s), " + splitban[ 2 ] + " Minute(s).";
     PrivMessage("[RBAN] Your ban has not expired.", player );
PrivMessage("[RBAN] Your ban is set to expire in. " + Time_Left, player );
KickPlayer( player );
}
  }
  else if( GetSQLColumnData( QuerySQL( database, "SELECT * FROM Banned WHERE ban_ip='" + Ip + "'" ), 0 ) )
  {
        local query = QuerySQL( database, "SELECT * FROM Banned WHERE ban_ip='" + Ip + "'" );
        if( ( time() - GetSQLColumnData( query, 2 ).tointeger() ) >= GetSQLColumnData( query, 3 ).tointeger() )
{
    local query2 = QuerySQL( database, "DELETE FROM Banned WHERE ban_ip='" + player.IP.tostring() + "'" );
FreeSQLQuery( query2 );
    PrivMessage("[RBAN] Your ban has been expired.", player );
PrivMessage("[RBAN] Stick to the rules or you will get permanently banned.", player );
}
else
{
     local Time_Left = TimeRem( GetSQLColumnData( query, 2 ).tointeger(), GetSQLColumnData( query, 4 ).tostring() );
     //local splitban = split(  GetSQLColumnData( query, 4 ), ":"  ), Calc = splitban[ 0 ] + " Day(s), " + splitban[ 1 ] + " Hour(s), " + splitban[ 2 ] + " Minute(s).";
     PrivMessage("[RBAN] Your ban has not expired.", player );
PrivMessage("[RBAN] Your ban is set to expire in. " + Time_Left , player );
KickPlayer( player );
}
  }
  FreeSQLQuery( query );
}

//This returns the time left for ban in Day:hour:minute format.
function TimeRem( bantime,  banratio )
{
        local ban_current = time()-bantime, sp = split(banratio,":"), ban_Days, ban_Hours, ban_Minutes,
ban_Day = sp[ 0 ].tointeger(),
ban_Hour = sp[ 1 ].tointeger(),
ban_Minute = sp[ 2 ].tointeger();
ban_Days = ban_current/86400;
ban_current = ban_current%86400;
ban_Hours = ban_current/3600;
ban_current = ban_current%3600;
ban_Minutes = ban_current/60;
ban_current = ban_current%60;
print( ban_Days + ":" + ban_Hours + ":" + ban_Minutes );
ban_Day -= ban_Days;
ban_Hour -= ban_Hours;
ban_Minute -= ban_Minutes;
return ban_Day + " Day(s), " + ban_Hour + " Hour(s), " + ban_Minute + " Minutes.";
}

/*
  ~End of the code~
*/

Version: 0.1
Edits made: 0

If you find any help or if you find any bugs in the code, Post here.

7
Off Topic / Dis girl <3
« on: December 06, 2013, 04:42:45 pm »

8
Off Topic / lol
« on: September 26, 2013, 11:06:06 am »


Shoutbox ->

9
Off Topic / GTA V Map
« on: September 10, 2013, 05:38:14 pm »

10
Off Topic / Whats going on - IV:MP?
« on: September 09, 2013, 04:16:32 pm »
http://forum.iv-multiplayer.com/index.php/topic,7287.0.html

lol its fun to read the topic. Must read guys.

11
Inactivity / Back
« on: August 09, 2013, 01:19:40 pm »
Yeh i am back after veeeeeeeeeeeery long inactivity! :)

12
Off Topic / Results Fuck!!
« on: May 23, 2013, 08:39:29 am »
My results are going to be announced tomorrow! If i don't get good grade/marks in all subjects i won't be using computer until i finish my studies (maybe only on Sundays). Damn i am so fucked up!!! I am writing this because as i said if i get bad grades i won't be able to use computer again so i won't be able to post a away message in future.

Bye or not?  :-X

13
Media Related / Does Girls watch porn? ROFL Video
« on: April 06, 2013, 10:59:45 am »

14
Off Topic / Happy April Fools day
« on: April 01, 2013, 01:21:22 pm »
Hello mates good luck trolling friends.. ITS APRIL 1st  :D

15
Media Related / <3
« on: March 28, 2013, 11:12:21 am »

Pages: [1] 2