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 - Inferno
1
Snippet Showroom / Aligned Random Messages ( without Newtimer )
« on November 19th, 2020, 03:57 AM »
Features
Quote
• Shows random messages after every 60 seconds without using a timer.
• Will show different message every minute.
• Message #1 will be repeated once it reaches last recorded message i.e Message #10. And so on.
• This snippet doesn't require Random(min,max) function.
OnScriptLoad
Code: [Select]
MSGTick <- 0;
tCount <- 0;


OnTimeChange
Code: [Select]
if(MSGTick < 61) { //check to increase
MSGTick++; // INCREASES EVERY SECOND
}
else if(MSGTick > 59) {  // checks when 1min passes
MSGTick = 0;
tCount ++;
local m1 = "[#ffff00]Add the server to favourites", m2 = "please read /rules",  m3 = "[#FFFFFF]Server made by : YOURNAME";  // You can edit these and add even more messages here make sure to tCount = 0; on last msg.
if(tCount == 1) {
 Message(" "+m1+" ");
}
else if(tCount == 2) {
 Message(" "+m2+" ");
}
else if(tCount == 3) { // 3rd and last msg
 Message(" "+m3+" ");
tCount = 1; // to return to message #1


}
2
Snippet Showroom / Basic Quote System.
« on October 27th, 2020, 02:17 AM »
 

Features
Quote
-You can Add Quotes
-You can read quotes using their IDs
-You can check quotes made by yourself
-You can view a random quote
OnScriptLoad
Code: [Select]
qCount <- 0;

dbQuotes <- ConnectSQL("Databases/quotes.db");
QuerySQL( dbQuotes, "CREATE TABLE IF NOT EXISTS Quotes ( ID NUMERIC, Quote TEXT, Creator TEXT )" );

LoadQuotes();

Anywhere in main.nut

Code: [Select]
function LoadQuotes()
{
local q = QuerySQL( dbQuotes, "SELECT * FROM Quotes" ), i = 0;
while( GetSQLColumnData( q, 0 ) )
{
GetSQLNextRow( q );
i++;
}
print("Quotes Count ("+i+")");
qCount = i;
     FreeSQLQuery(q);
}

function random( min, max ) // incase you don't have the random(a,b) function
{
        if ( min < max )
                return rand() % (max - min + 1) + min.tointeger();
        else if ( min > max )
                return rand() % (min - max + 1) + max.tointeger();
        else if ( min == max )
                return min.tointeger();
}

 

OnPlayerCommand
Code: [Select]
else if(cmd == "randomquote") {
if(qCount == 0) return MessagePlayer(""+RED+" There are no quotes in the database ",player);
else if(text) return 0;
else {
local rr = random(1,qCount);
 local gg = QuerySQL(dbQuotes, "SELECT * FROM Quotes WHERE ID='" + rr + "'");
local tq = GetSQLColumnData( gg, 1 );
local tc = GetSQLColumnData( gg, 2 );

Message("[#ffff00]"+player.Name+" [#ffffff]has viewed a random quote ID :[#ffff00]["+rr+"],[#ffffff] Quote:[#ffff00] [ "+tq+" ], [#ffffff]Creator:[#ffff00][ "+tc+" ] ");
}
return 0;
}

else if ( cmd == "myquotes" )
{
 local q = QuerySQL(dbQuotes, "SELECT * FROM Quotes WHERE Creator='" + player.Name + "'"), i = 0;
if(q) {
MessagePlayer("[#ffffff]Your "+ORANGE+"[Quotes]: ", player);
while (GetSQLColumnData(q, 2) == player.Name) {
MessagePlayer(""+ORANGE+"ID:[#ffffff]["+GetSQLColumnData( q , 0)+"], "+ORANGE+"Quote:[#ffffff]["+GetSQLColumnData( q, 1 )+"] ",player);       
GetSQLNextRow(q);
i++;
}
}
else if(!q) {

MessagePlayer("[#ffffff][Your] "+ORANGE+"[Quotes]:[#ffffff] None ", player);

}



     FreeSQLQuery(q);
return 0;
}

  else if (cmd == "addquote")
{
if(!text) return MessagePlayer(""+RED+"/addquote [message]",player);
else {
qCount++;
QuerySQL( dbQuotes, "INSERT INTO Quotes ( ID, Quote, Creator ) VALUES ( '" + qCount + "', '"+text+"', '"+player.Name+"' )" );
MessagePlayer("[#ffff00]You have added a quote ID : "+qCount+" ",player);

}
return 0;
}

  else if (cmd == "quote")
{
if(!text) return MessagePlayer(""+RED+"/quote [id]",player);
else if(!IsNum(text)) return MessagePlayer(""+RED+"Use numbers for IDs",player);
else {
 local ak = QuerySQL(dbQuotes, "SELECT * FROM Quotes WHERE ID='" + text.tointeger() + "'");
if(!ak) return MessagePlayer(""+RED+" Invalid Quote ID ",player);
local aqw = GetSQLColumnData( ak, 1 );
local ao = GetSQLColumnData( ak, 2 );

Message("[#ffffff] "+player.Name+" "+RED+"has viewed a quote ID:[#ffffff]["+text.tointeger()+"], "+RED+"Creator:[#ffffff][ "+ao+" ] , "+RED+"Context:[#ffffff][ "+aqw+" ] ");
}
return 0;
}

else if(cmd == "quotecmds") {
MessagePlayer("[#ffff00] ~ Quote Commands ~ ",player);
MessagePlayer("[#ffff00] ~ /randomquote, /quote, /addquote, /myquotes ~ ",player);
return 0;
}




Commands

/addquote
(to add a quote)
/quote [id](to check a quote)
/randomquote(to view a random quote)
/myquotes(to view the quotes written by yourself)

Update: Added a fix suggested by Mashreq



3
Snippet Showroom / Cooldown Function ( with db & examples )
« on October 9th, 2020, 09:13 PM »

Intro
Quote
Cooldown functions have become a must in any server nowadays in order to prevent any spam/abuse by any player. So, here i would like to post a cooldown function I made for my server and is effective for me.
Requirement:
Quote
OnScriptLoad

// timer callback
Code: [Select]
DecreaseCooldown <- _Timer.Create(this, DecreaseCooldown, 1000, 0);

// db to be created
dbCooldown <- ConnectSQL("Databases/Cooldown.db");
QuerySQL( dbCooldown, "CREATE TABLE IF NOT EXISTS Cooldown ( Cmd TEXT, Name TEXT, Time NUMERIC )" );




Any where in main.nut
Code: [Select]
  // Timer
 function DecreaseCooldown()
    {
        QuerySQL( dbCooldown, "UPDATE Cooldown SET Time= (Time - 1) WHERE Time > 0" );
        local q = QuerySQL( dbCooldown, "SELECT Cmd FROM Cooldown WHERE Time='0'" );
        local cmd = GetSQLColumnData( q , 0);
        local name = GetSQLColumnData( q , 1);
        if( q && cmd && name )
        {
        QuerySQL( dbCooldown, "DELETE FROM Cooldown WHERE Cmd='" + cmd + "' AND Name='"+name+"' " );
       }
    }
// checks if cooldown for a cmd for a player is set or not
function CheckCooldown( command, player )
 {
local q = QuerySQL( dbCooldown, "SELECT* FROM Cooldown WHERE Cmd='"+command+"' AND Name='"+player.Name+"' AND Time > 0" );
local atime = GetSQLColumnData( q , 2);
local name = GetSQLColumnData( q, 1 );
local cmda = GetSQLColumnData( q, 0 );
    if ( name && atime && cmda ) return 1;
    else return 0;
  }
// adds cooldown
function AddCooldown( cmd, player, time ) {
if(player) {
QuerySQL( dbCooldown, "INSERT INTO Cooldown ( Cmd, Name, Time) VALUES ( '" + cmd + "', '" + player.Name + "', '"+time+"'  )" );
}

// checks time remaining for cooldown
function CooldownTime( cmd, player ) {
local q = QuerySQL( dbCooldown, "SELECT* FROM Cooldown WHERE Cmd='"+cmd+"' AND Name='"+player.Name+"' AND Time > 0" );
local atime = GetSQLColumnData( q , 2);
local name = GetSQLColumnData( q, 1 );
local cmda = GetSQLColumnData( q, 0 );
    if ( name && atime && cmda ) return atime;
    else return 0;
}




Functions to use in commands/any other event
Code: [Select]
// add in command to return if cooldown is set
else if(CheckCooldown(cmd,player)) return MessagePlayer(""+RED+"[Cooldown] You can use this command again after "+CooldownTime(cmd,player)+" seconds ",player);

// add when command can be executed after all checks
AddCooldown( cmd, player, 5 ); // this will add cmd, player and 5 seconds cooldown, these parameters can be edited


Examples
Example 1
Code: [Select]
// Used in Keybind
function OnKeyDown(player, key) {


if(key == HKEY && player.Vehicle)
{
// by pressing H, it will flip a vehicle and add a cooldown of 2 seconds
if(CheckCooldown(key,player)) return MessagePlayer("[#ffff00][Cooldown] You can use this command again after "+CooldownTime(key,player)+" seconds ",player);
AddCooldown( key, player, 2 );
player.Vehicle.Rotation = Quaternion(0.0, 0.0, player.Vehicle.Rotation.z, player.Vehicle.Rotation.w);
ClientMessage("Flipped.", player, 176, 176, 176);
}

return 1;
}

Example 2
Code: [Select]

OnPlayerCommand(player, cmd) {


// this cmd will flip the car and add a 2s cooldown
 if ( cmd == "flip" )
{
if ( !player.Vehicle ) MessagePlayer( "[#ff1111]Error: [#FF7092]You need to be in a Vehicle to use this command." , player )
else if(CheckCooldown(cmd,player)) return MessagePlayer("[#ffff00][Cooldown] You can use this command again after "+CooldownTime(cmd,player)+" seconds ",player);
else
{
AddCooldown( cmd, player, 2 );
player.Vehicle.Rotation = Quaternion(0.0, 0.0, player.Vehicle.Rotation.z, player.Vehicle.Rotation.w);
ClientMessage("Flipped.", player, 176, 176, 176);
}
return 0;
}

// Command to set manually Cooldown to any value for a player when its existing. Added for Testing Purpose

  else if (cmd == "setcool")
{
// add your admin function here
if(!text) return MessagePlayer("[#ffff00]/setcool [player] [cmd/arg] [cooldown]",player);
else {
local plr = GetTok(text, " ", 1);
local acmd = GetTok(text, " ", 2);
local acd = GetTok(text, " ", 3);
local q = QuerySQL( dbCooldown, "SELECT* FROM Cooldown WHERE Cmd='"+acmd+"' AND Name='"+plr+"' AND Time > 0" );
if(!q) return MessagePlayer(""+RED+" That argument is not set to cooldown for that player ",player);
else if(!plr) return MessagePlayer(""+RED+" Please specify a player name ",player);
else if(!acmd) return MessagePlayer(""+RED+" Please specify a command for cd ",player);
else if(!acd) return MessagePlayer(""+RED+" Please specify a cd ",player);
else if(!IsNum(acd)) return MessagePlayer(" "+RED+" CD Values must be in numbers ",player);
else {
QuerySQL(dbCooldown, "UPDATE Cooldown SET Time = '"+acd.tointeger()+"' WHERE Name = '" + plr + "' AND Cmd='"+acmd+"'");
MessagePlayer("[#ffff00] You have set "+acd+" seconds cooldown for "+acmd+" command for player "+plr+" ",player);
}
}
return 0;


return 1;
}


Functions
Quote
This snippet can be used for any event which require Cooldown as explained in Examples
Credits
Quote
Inferno , S.L.C ( for extended timers ), Xmair ( flip command used in Examples )
4

Credits : Inferno

File Introduction
Quote
I have tried my best to fix out some of known collision bugs i know or found during gameplay.
No custom objects were used.
The mod includes many collision fixes details of which are as below

North Point Mall 4 Walls
https://ibb.co/LZgQTwx
https://ibb.co/HV9hxfC
https://ibb.co/f84Mw5c
https://ibb.co/2KVgTz4
Quote
You might have come across the mall walls collision bug where players are able to shoot through it whether wall glitch is enabled or disabled, this mod fixes those 4 walls and hence prevents players from shooting through it.
Government Office Fixes
https://ibb.co/KcZpLLF
https://ibb.co/hHv1MtT
https://ibb.co/rkdf7pR
Quote
There is a very unknown glitch at government office downtown which allows players to enter the glitched reflected office aren in downtown. This mod adds a collision to that area to prevent players from accessing it. Moreover, it adds a collision to the one of 4 pillars at the office with missing collision.
Bank Fixes
https://ibb.co/xGQVxsr
https://ibb.co/ZHxVgRw
https://ibb.co/h9yHPb5
https://ibb.co/xHJx0MX
Quote
There are 2 glitched windows inside bank which allow players to see through underground, so this mod adds 2 proper windows to prevent that. Moreover, there is an abandoned balcony area above the door of bank which can be accessed but has no stairs so this mod adds stairs and a complete balcony to that area
Prawn Mansion Fixes + Objects
https://ibb.co/hYySR0y
https://ibb.co/r5cQ3RM
https://ibb.co/4t1bJrF
https://ibb.co/N3bSctC
https://ibb.co/nfhD6Lf
https://ibb.co/P4sZ191
https://ibb.co/jWR9fTh
Quote
This mod adds a proper collision to roof of prawn mansion , hence prevents players from shooting through it to a player on roof, its a very well known bug/glitch, this mod completely fixes that glitch/bug and prevents players from doing so. There is a another file (optional) using which you can have rest of collision fixes without prawn mansion objects, added so people who might feel the prawn mansion objects ugly can use the collision fixes without them. This also fixes the 2 Walls missing Collision outside 3rd Prawn Mansion
Prawn Bridge Missing Collision
https://ibb.co/FqqMbGk
https://ibb.co/DLSVM3q
Quote
This mod adds the missing collision to prawn bridge side to prevent players from falling into it.
Prawn Studio Roof Collision Fix
https://ibb.co/8b7RpmT
Quote
It is one of very less noticed collision bugs, where players can hide in the collisionless roof of prawn studios, this mod fixes the collision and adds proper one to prevent players from entering it
Abandoned Wooden Location on Water
https://ibb.co/K9dqvr0
https://ibb.co/nkQtqML
Quote
This mod not only fixes the broken mechanism of that location but improves it and add a complete square of it with double boat parking locations
Installation
Quote
Put the infix2.xml inside your server directory / store / maps
Note
Quote
There are 2 Mod packs in it with details, so if you dont want to use the prawn mansion objects, use the other folder file included
Download Link
http://www.mediafire.com/file/wrh1gn063c73e1e/mod.rar/file
http://www.mediafire.com/file/s9aovqe90xt09mm/policea.xml/file ( Police Station Fix )

Code ( for Mall Wall Fix )
Code: [Select]
// Mall Wall Fix
CreateObject( 381, 1, Vector( 372.96, 1093.82, 20.2486), 255 ).RotateByEuler( Vector( 3.14159, 3.14159, 1.55841), 0);

CreateObject( 381, 1, Vector( 378.66, 1093.82, 20.2486), 255 ).RotateByEuler( Vector( -3.14159, -3.14159, 1.55841), 0);

CreateObject( 381, 1, Vector( 383.16, 1094.12, 20.2486), 255 ).RotateByEuler( Vector( -3.14159, -3.14159, 1.55841), 0);

CreateObject( 381, 1, Vector( 400.153, 1111.65, 20.1276), 255 ).RotateByEuler( Vector( 3.14159, 3.14159, -1.16159), 0);

CreateObject( 381, 1, Vector( 388.019, 1095.93, 20.2486), 255 ).RotateByEuler( Vector( -3.14159, -3.14159, 0.778414), 0);

CreateObject( 381, 1, Vector( 391.909, 1099.83, 20.2486), 255 ).RotateByEuler( Vector( 3.14159, -3.14159, 0.778414), 0);

CreateObject( 381, 1, Vector( 396.008, 1103.83, 20.2486), 255 ).RotateByEuler( Vector( 3.14159, -3.14159, 0.778414), 0);

CreateObject( 381, 1, Vector( 399.608, 1107.43, 20.2486), 255 ).RotateByEuler( Vector( 3.14159, -3.14159, 0.778414), 0);

CreateObject( 381, 1, Vector( 454.926, 1154.06, 20.0644), 255 ).RotateByEuler( Vector( 0, 0, -1.54), 0);

CreateObject( 381, 1, Vector( 449.626, 1154.06, 20.0644), 255 ).RotateByEuler( Vector( 0, 0, -1.54001), 0);

CreateObject( 381, 1, Vector( 444.526, 1154.06, 20.0644), 255 ).RotateByEuler( Vector( 0, 0, -1.54001), 0);

CreateObject( 381, 1, Vector( 427.586, 1136.64, 19.6441), 255 ).RotateByEuler( Vector( 0, 0, 1.13), 0);

CreateObject( 381, 1, Vector( 439.632, 1152.26, 19.8419), 255 ).RotateByEuler( Vector( 0, 0, -0.79), 0);

CreateObject( 381, 1, Vector( 435.432, 1148.06, 19.8419), 255 ).RotateByEuler( Vector( 0, 0, -0.79), 0);

CreateObject( 381, 1, Vector( 431.532, 1144.16, 19.8419), 255 ).RotateByEuler( Vector( 0, 0, -0.79), 0);

CreateObject( 381, 1, Vector( 427.632, 1140.26, 19.8419), 255 ).RotateByEuler( Vector( 0, 0, -0.79), 0);

CreateObject( 381, 1, Vector( 455.372, 1092.5, 19.72), 255 ).RotateByEuler( Vector( 0, 0, 1.55999), 0);

CreateObject( 381, 1, Vector( 449.533, 1092.5, 19.72), 255 ).RotateByEuler( Vector( 0, 0, 1.55999), 0);

CreateObject( 381, 1, Vector( 444.613, 1092.53, 19.72), 255 ).RotateByEuler( Vector( 0, 0, 1.55999), 0);

CreateObject( 381, 1, Vector( 427.486, 1110.33, 19.5685), 255 ).RotateByEuler( Vector( 0, 0, -1.16), 0);

CreateObject( 381, 1, Vector( 426.918, 1107.27, 19.3316), 255 ).RotateByEuler( Vector( 0, 0, 0.78), 0);

CreateObject( 381, 1, Vector( 430.748, 1103.73, 19.3316), 255 ).RotateByEuler( Vector( 0, 0, 0.78), 0);

CreateObject( 381, 1, Vector( 435.848, 1098.63, 19.3316), 255 ).RotateByEuler( Vector( 0, 0, 0.78), 0);

CreateObject( 381, 1, Vector( 439.448, 1095.03, 19.3316), 255 ).RotateByEuler( Vector( 0, 0, 0.78), 0);

CreateObject( 381, 1, Vector( 372.895, 1155.5, 20.4569), 255 ).RotateByEuler( Vector( 0, 0, -1.55999), 0);

CreateObject( 381, 1, Vector( 378.394, 1155.2, 20.4569), 255 ).RotateByEuler( Vector( 0, 0, -1.55999), 0);

CreateObject( 381, 1, Vector( 383.494, 1155.2, 20.4569), 255 ).RotateByEuler( Vector( 0, 0, -1.55999), 0);

CreateObject( 381, 1, Vector( 400.179, 1137.82, 20.1515), 255 ).RotateByEuler( Vector( 3.14159, 3.14159, 1.16159), 0);

CreateObject( 381, 1, Vector( 400.659, 1141.02, 20.0364), 255 ).RotateByEuler( Vector( -3.11009, -3.09942, -0.781121), 0);

CreateObject( 381, 1, Vector( 396.369, 1145.04, 20.0364), 255 ).RotateByEuler( Vector( -3.11009, -3.09942, -0.781121), 0);

CreateObject( 381, 1, Vector( 392.169, 1149.24, 20.0364), 255 ).RotateByEuler( Vector( -3.11009, -3.09942, -0.781121), 0);

CreateObject( 381, 1, Vector( 387.669, 1153.74, 20.0364), 255 ).RotateByEuler( Vector( -3.11009, -3.09942, -0.781121), 0);

CreateObject( 381, 1, Vector( 363.32, 1074.59, 22.0306), 255 ).RotateByEuler( Vector( 1.56, 0, 0), 0);
 // mall wall end
Quote
Currently , the objects making mall walls collision are in world 1, you can set their world by modifying manually, place the code in OnScriptLoad
Edit
Quote
Update : Added missing Collision to doors of VCPD at Washington Beach
Mall Wall Fix in xml might not work since objects being added in mall interior are getting disappeared for an unknown bug, so you will have to use the object creation code instead and set the world you want to add the object in manually.
5

File Introduction
Quote
This file includes a fix pack and some other added stuff, details are as below
Raxor International Building Downtown
Quote
This file will fix the missing/broken rooftop collision of Raxor International Building at Downtown




Pay and Spray Garage Doors Washington Beach & Vice Point
Quote
This file fixes the pay and spray garage door glitch which allowed players to enter garage by its door sides



Yellow Tower Building Near NPM, Vice Point
Quote
This file adds a roof to the missing collision of Yellow Tower building near NPM, Vice Point



VicePoint-Golf Walk Bridges
Quote
This file adds 2 walk bridges near Dacum Inn to access golf Club



Installation:
Quote
Place either the file infix.xml in your server/store/maps folder or copy the store folder and paste in your server folder
Note
Quote
No custom objects were used, only ingame existing objects were used for this mod
Download Link :  http://www.mediafire.com/file/izp79ixxwfi1u48/Minor_Fix.rar/file   



6
Clans and Families / R2x - ReAssassinatives 2x (Closed)
« on February 6th, 2020, 07:27 AM »



Clan Title ; Re-Assassinatives 2x
Founder ; Spider/Inferno
Forum : http://Unavailable currently
Discord :   https://discord.gg/XMjBy9T  http://
Founded ; June, 2013
Clan Ranks ;
( Trial )
(Rookie)
  (Professional)
(Full Member)
(professional assasin)
Clan Tags; (R2x), [R2x], =R2x=,
R2x_ , |R2x|


Clan has been officially closed on 1st September 2020.