Menu

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.

Show posts Menu

Topics - MRSK143

#1
Servers / An Appeal To save my server
Aug 02, 2022, 04:50 PM
Hi @AdTec_224 , I've got an appeal to ban [Sb]Hunter Hosting IP he has stolen my server files somehow and he is hosting the server with the same name as my server Battle Royal and I appeal to you to ban his IP Address soon as possible and must ban him from VCMP community(optional lol) The hosting IP Address he is using: 116.203.83.81:8192
Please ban his IP soon as possible

Regards @MRSK143
#2
Hi buddies, I created Spawn Weapon System because I just found only spawn weapon and it was bugged :/
So I decided to create my own Spawn Weapon System

Here is the code

Paste the spawn weapon class in the top of your main.nut file

class SpawnWeps
{
SpawnWepStatus = false;
SpawnWeps = null;
}

Paste this code on script load event

Spawnweps <- ConnectSQL("SpawnWep.db");
QuerySQL( Spawnweps, "CREATE TABLE IF NOT EXISTS SpawnWep(Name TEXT DEFAULT NULL, SpawnWepStatus BOOLEAN DEFAULT FALSE, Wep1 NUMERIC DEFAULT 0, Wep2 NUMERIC DEFAULT 0, Wep3 NUMERIC DEFAULT 0, Wep4 NUMERIC DEFAULT 0, Wep5 NUMERIC DEFAULT 0, Wep6 NUMERIC DEFAULT 0, Wep7 NUMERIC DEFAULT 0, Wep8 NUMERIC DEFAULT 0, Wep9 NUMERIC DEFAULT 0 )" );
spawnwep <- array(GetMaxPlayers(), null);
print("Spawn Weapon System by MR SK has been loaded successfully!");

Paste this line on player join event

GetSpawnWepData(player);
Paste this line on player spawn event

AssignSpawnWeps(player);
Now here are the commands

if(cmd == "spawnwep")
{
if(text)
{
QuerySQL( Spawnweps, "UPDATE SpawnWep SET Wep1='0',Wep2='0',Wep3='0',Wep4='0',Wep5='0',Wep6='0',Wep7='0',Wep8='0',Wep9='0' WHERE Name LIKE '" + escapeSQLString(player.Name) + "'" );
local ptext = split(text " ");
spawnwep[player.ID].SpawnWepStatus = true;
QuerySQL( Spawnweps, "UPDATE SpawnWep SET SpawnWepStatus='true' WHERE Name LIKE '" + escapeSQLString(player.Name) + "'" );
local wepnames = "";
foreach(wep in ptext)
{
local weaponId = IsNum(wep) ? wep.tointeger() : GetWeaponID(wep);
QuerySQL( Spawnweps, "UPDATE SpawnWep SET "+GetWepColumn(GetWeaponSlot(weaponId))+"='"+weaponId+"' WHERE Name LIKE '" + escapeSQLString(player.Name) + "'" );
player.GiveWeapon(weaponId, 9999);
wepnames += wepnames != "" ? format(", %s", GetWeaponName(weaponId)) : GetWeaponName(weaponId);
}
local q = QuerySQL(Spawnweps, "SELECT * FROM SpawnWep WHERE Name = '" + escapeSQLString(player.Name) + "'");
if(q != null)
{
spawnwep[player.ID].SpawnWeps = [GetSQLColumnData(q, 2).tointeger(), GetSQLColumnData(q, 3).tointeger(), GetSQLColumnData(q, 4).tointeger(), GetSQLColumnData(q, 5).tointeger(), GetSQLColumnData(q, 6).tointeger(), GetSQLColumnData(q, 7).tointeger(), GetSQLColumnData(q, 8).tointeger(), GetSQLColumnData(q, 9).tointeger(), GetSQLColumnData(q, 10).tointeger()];
}
if(wepnames != "")
{
MessagePlayer("[#00FF00][SPAWN WEP]: [#FFFFFF]You have set your spawn weapons to "+wepnames+" successfully!", player);
}
return 0;
}
else MessagePlayer("[#FFFF00]Syntax; /spawnwep <Weps Name/ID>", player);
}

else if(cmd == "spawnwepdel")
{
if(spawnwep[player.ID].SpawnWepStatus == true)
{
MessagePlayer("[#00FF00][SPAWN WEP]: [#FFFFFF]You have disabled your spawn weapons successfully!", player);
QuerySQL( Spawnweps, "UPDATE SpawnWep SET SpawnWepStatus='false', Wep1='0',Wep2='0',Wep3='0',Wep4='0',Wep5='0',Wep6='0',Wep7='0',Wep8='0',Wep9='0' WHERE Name LIKE '" + escapeSQLString(player.Name) + "'" );
spawnwep[player.ID].SpawnWepStatus = false;
spawnwep[player.ID].SpawnWeps = null;
}
else MessagePlayer("[#FF0000][ERROR]: Your spawn weapons are already disabled!", player);
return 0;
}

Now finally at last the function for this Spawn Weapons System are here

function GetSpawnWepData(player)
{
spawnwep[player.ID] = SpawnWeps();
local q = QuerySQL(Spawnweps, "SELECT * FROM SpawnWep WHERE Name = '" + escapeSQLString(player.Name) + "'");
if(q != null)
{
spawnwep[player.ID].SpawnWeps = [GetSQLColumnData(q, 2).tointeger(), GetSQLColumnData(q, 3).tointeger(), GetSQLColumnData(q, 4).tointeger(), GetSQLColumnData(q, 5).tointeger(), GetSQLColumnData(q, 6).tointeger(), GetSQLColumnData(q, 7).tointeger(), GetSQLColumnData(q, 8).tointeger(), GetSQLColumnData(q, 9).tointeger(), GetSQLColumnData(q, 10).tointeger()];
if(GetSQLColumnData(q, 1) == "true")
{
spawnwep[player.ID].SpawnWepStatus = true;
}
else{
spawnwep[player.ID].SpawnWepStatus = false;
}
}
else{
QuerySQL(Spawnweps, "INSERT INTO SpawnWep( Name, SpawnWepStatus, Wep1, Wep2, Wep3, Wep4, Wep5, Wep6, Wep7, Wep8, Wep9 ) VALUES ('"+escapeSQLString(player.Name)+"', 'false', '0', '0', '0', '0', '0', '0', '0', '0', '0' )" );
}
}

function AssignSpawnWeps(player)
{
if(spawnwep[player.ID].SpawnWepStatus == true)
{
player.Disarm();
foreach(weps in spawnwep[player.ID].SpawnWeps)
{
player.GiveWeapon(weps, 9999);
}
MessagePlayer("[#00FF00][SPAWN WEP]: [#FFFFFF]You've spawned with your spawn weapons!", player);
}
}

function GetWeaponSlot(weapon){
switch(weapon.tointeger())
{
case 0:
case 1:
return 0;

case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
return 1;

case 12:
case 13:
case 14:
case 15:
case 16:
return 2;

case 17:
case 18:
return 3;

case 19:
case 20:
case 21:
return 4;

case 22:
case 23:
case 24:
case 25:
return 5;

case 26:
case 27:
return 6;

case 30:
case 31:
case 32:
case 33:
return 7;

case 28:
case 29:
return 8;
}
}

function GetWepColumn(slotid)
{
switch(slotid.tointeger())
{
case 0: return "Wep1";
case 1: return "Wep2";
case 2: return "Wep3";
case 3: return "Wep4";
case 4: return "Wep5";
case 5: return "Wep6";
case 6: return "Wep7";
case 7: return "Wep8";
case 8: return "Wep9";

default: return "Unknown";
}
}

The code ends here...

NOTE: The code is tested and if you found any bug inside the code then don't hesitate to reply to this post as it can save newbies life ;D
#3
Script Showroom / [RELEASE] Vehicle System
Jun 10, 2022, 12:03 PM
 ^-^Hi buddies, Today I'm here with a vehicle system, A simple vehicle system (bug-free).
Let me introduce to the commands these 4 commands use to add vehicles in database /addcar | /insertcar | /addveh | /insertveh
This command /removecar removes a car from the database but you must be in a car to remove the car from the database
And these 4 commands /editveh | /editcar | /updateveh | /updatecar help you to modify car data you can change the car model, world, position, colour 1 and colour 2

Put these database detail on script load event

[noae]Vehicles <- ConnectSQL("Vehicles.db");
QuerySQL(Vehicles, "CREATE TABLE IF NOT EXISTS Vehicles(ID NUMERIC DEFAULT 0, Model NUMERIC DEFAULT 0, World NUMERIC DEFAULT 0, Pos_X FLOAT, Pos_Y FLOAT, Pos_Z FLOAT, Angle FLOAT, Colour_1 NUMERIC DEFAULT 0, Colour_2 NUMERIC DEFAULT 0)");
LoadVehicles();
[/noae]

Commands are here just paste them into their right place

[noae]if(cmd == "addcar" || cmd == "insertcar" || cmd == "addveh" || cmd == "insertveh")
{
if(player.Name == "MR_SK") //you can edit this line as your wish
{
if(text)
{
if(player.IsSpawned)
{
local model = GetTok(text, " ", 1), world = GetTok(text, " ", 2), col1 = GetTok(text, " ", 3), col2 = GetTok(text, " ", 4);
if(model)
{
if(world)
{
if(col1)
{
if(col2)
{
model = IsNum(model) ? model.tointeger() : pGetVehicleModelFromName(model);
CreateVehicle(model.tointeger(), world.tointeger(), Vector(player.Pos.x,player.Pos.y,player.Pos.z), player.Angle, col1.tointeger(), col2.tointeger());
QuerySQL(Vehicles, "INSERT INTO Vehicles(ID, Model, World, Pos_X, Pos_Y, Pos_Z, Angle, Colour_1, Colour_2) VALUES ('"+GetVehicleCount()+"', '"+model+"', '"+world+"', '"+player.Pos.x+"', '"+player.Pos.y+"', '"+player.Pos.z+"', '"+player.Angle+"', '"+col1+"', '"+col2+"')");
MessagePlayer("[#00FF00][SUCCESS]:[#FFFFFF] Added a vehicle into database ID: "+GetVehicleCount()+", Name: "+GetVehicleNameFromModel(model)+", Model ID: "+model+"",player);
}
else ERROR("You must specify the Colour 1 for creating vehicle!",player);
}
else ERROR("You must specify the Colour 2 for creating vehicle!",player);
}
else ERROR("You must specify the world ID for creating vehicle!",player);
}
else ERROR("You must specify the model ID for creating vehicle!",player);
}
else ERROR("You must be spawned to add a car to database!",player);
}
else MessagePlayer("[#FFFF00]Syntax; /"+cmd+" <Model ID> <World ID> <Colour 1> <Colour 2>",player);
}
else ERROR("Unknown Command!",player);
}

else if(cmd == "removecar")
{
if(player.Name == "MR_SK") //you can edit this line as your wish
{
if(player.IsSpawned)
{
local veh = player.Vehicle;
if(veh)
{
if(QuerySQL(Vehicles, "SELECT * FROM Vehicles WHERE ID='"+veh.ID+"'"))
{
QuerySQL(Vehicles, "DELETE FROM Vehicles WHERE ID='"+veh.ID+"'");
MessagePlayer("[#00FF00][SUCCESS]:[#FFFFFF] Removed Vehicle ID: "+veh.ID+"",player);
veh.Delete();
UpdateVehiclesID();
ReloadVehicles();
}
else ERROR("Server was unable to find this vehicle in database!",player);
}
else ERROR("You must be in any vehicle to edit it's data!",player);
}
else ERROR("You must be spawned to add a car to database!",player);
}
else ERROR("Unknown Command!",player);
}

else if(cmd == "editveh" ||  cmd == "updateveh" || cmd == "updatecar" || cmd == "editcar")
{
if(player.Name == "MR_SK") //you can edit this line as your wish
{
if(player.IsSpawned)
{
local veh = player.Vehicle;
if(veh)
{
local model = GetTok(text, " ", 1), world = GetTok(text, " ", 2), col1 = GetTok(text, " ", 3), col2 = GetTok(text, " ", 4);
if(model)
{
if(world)
{
if(col1)
{
if(col2)
{
model = IsNum(model) ? model.tointeger() : pGetVehicleModelFromName(model);
if(QuerySQL(Vehicles, "SELECT * FROM Vehicles WHERE ID='"+veh.ID+"'"))
{
QuerySQL(Vehicles, "UPDATE Vehicles SET Model='"+model+"', World='"+world+"', Pos_X='"+veh.Pos.x+"', Pos_Y='"+veh.Pos.y+"', Pos_Z='"+veh.Pos.z+"', Angle='"+veh.Angle+"', Colour_1='"+col1+"', Colour_2='"+col2+"' WHERE ID='"+veh.ID+"'");
MessagePlayer("[#00FF00][SUCCESS]:[#FFFFFF] Vehicle Updated ID: "+veh.ID+", Name: "+GetVehicleNameFromModel(model)+", Model ID: "+model+"",player);
ReloadVehicles();
}
else ERROR("Server was unable to find this vehicle in database!",player);
}
else ERROR("You must specify the Colour 1 for creating vehicle!",player);
}
else ERROR("You must specify the Colour 2 for creating vehicle!",player);
}
else ERROR("You must specify the world ID for creating vehicle!",player);
}
else ERROR("You must specify the model ID for creating vehicle!",player);
}
else ERROR("You must be in any vehicle to edit it's data!",player);
}
else ERROR("You must be spawned to update or edit any car data!",player);
}
else ERROR("Unknown Command!",player);
}
[/noae]

And in last some functions in the vehicle system paste these functions in your script anywhere

[noae]function UpdateVehiclesID()
{
local newID = 0, q;
for(local i = 0; i < 500; ++i)
{
if(q = QuerySQL(Vehicles, "SELECT * FROM Vehicles WHERE ID='"+i+"'"))
{
newID++;
QuerySQL(Vehicles, "UPDATE Vehicles SET ID='"+newID+"' WHERE ID LIKE '"+i+"'");
}
}
}

function LoadVehicles()
{
local totalveh = 0;
for(local i = 0; i < 500; ++i)
{
local q = QuerySQL(Vehicles, "SELECT * FROM Vehicles WHERE ID='"+i+"'");
if(q)
{
CreateVehicle(GetSQLColumnData(q, 1), GetSQLColumnData(q, 2), Vector(GetSQLColumnData(q,3),GetSQLColumnData(q,4),GetSQLColumnData(q,5)), GetSQLColumnData(q,6), GetSQLColumnData(q,7), GetSQLColumnData(q,8));
totalveh+=1;
}
}
print(""+totalveh+" Vehicles has been loaded successfuly!");
}

function ReloadVehicles()
{
for(local i = 0; i < 500; ++i)
{
local veh = FindVehicle(i);
if(veh)
{
veh.Delete();
}
}
LoadVehicles();
}

function ERROR(string, player)
{
MessagePlayer("[#FF0000][ERROR]: "+string,player);
}

function pGetVehicleModelFromName(model)
{
model = model.tolower();
if(model.find("hydra") != null) return 6420; //you can continue with adding more line to this functions if you've more custom vehicles just change the vehicle name and model ID

else{
return GetVehicleModelFromName(model);
}
}

function GetTok(string, separator, n, ...)
{
 local m = vargv.len() > 0 ? vargv[0] : n,
    tokenized = split(string, separator),
    text = "";
 
 if (n > tokenized.len() || n < 1) return null;
 for (; n <= m; n++)
 {
  text += text == "" ? tokenized[n-1] : separator + tokenized[n-1];
 }
 return text;
}
[/noae]

The code is tested yet and no bug was found if you found any bug in this code then don't hesitate to reply to this post as it can save newbies time :P
#4
Script Showroom / [RELEASE] Temp Ban System
Jun 10, 2022, 11:27 AM
Hi buddies, I've been taking a look in VC: MP community and I was unable to find the Temp Ban system, if I got some then it was old or not working properly so I decided to make my own Temp Ban System Here's the code:

Put these database detail on script load event

[noae]TempBans <- ConnectSQL("TempBans.db");
QuerySQL( TempBans, "CREATE TABLE IF NOT EXISTS TempBans( Name TEXT, UID TEXT, UID2 TEXT, IP FLOAT, Time NUMERIC, ExpireTime NUMERIC, TimeExpireRatio TEXT, Admin TEXT, Reason TEXT )" );
[/noae]

Don't forget to put this line on player join event

[noae]CheckTempBan(player);[/noae]

Commands are here You just have to paste them on player command event

[noae]if(cmd == "tempban")
{
if(text)
{
local plr = GetPlayer(GetTok(text, " ", 1)), expire = GetTok(text, " ", 2), reason = GetTok( text, " ", 3, NumTok( text, " " ) );
if(plr)
{
if(expire)
{
if(reason)
{
local ban_expire = split(expire, ":");
if(NumTok(expire, ":") == 3)
{
if(IsNum(ban_expire[0]) && IsNum(ban_expire[1]) && IsNum(ban_expire[2]))
{
local calc = ((ban_expire[ 0 ].tointeger()*24*60*60) + (ban_expire[ 1 ].tointeger()*60*60) + (ban_expire[ 2 ].tointeger()*60));
QuerySQL( TempBans, "INSERT INTO TempBans( Name, UID, UID2, IP, Time, ExpireTime, TimeExpireRatio, Admin, Reason ) VALUES ('"+plr.Name+"', '"+plr.UniqueID +"', '"+plr.UniqueID2+"', '"+plr.IP.tofloat()+"', '"+time()+"', '"+calc+"', '"+expire+"', '"+player.Name+"', '"+reason+"')");
Message("[#FF0000][PRIOR BAN]: [#FFFFFF]"+plr.Name+" is banned for Reason: "+reason+", TimeLeft: " + GetBanRemainingTime(time().tointeger(), expire.tostring())+", Admin: "+player.Name+"");
plr.Kick();
}
else MessagePlayer("[#FF0000][ERROR]: You've entered wrong values in the time, make sure you have entered numbers only!",player);
}
else MessagePlayer("[#FF0000][ERROR]: Time Format must be DAYS:HOURS:MINUTES!",player);
}
else MessagePlayer("[#FF0000][ERROR]: You must specify a reason to ban requested player!",player);
}
else MessagePlayer("[#FF0000][ERROR]: Please type the duration of the ban for the requested player!",player);
}
else MessagePlayer("[#FF0000][ERROR]: Unknown player!",player);
}
else MessagePlayer("[#FFFF00]Syntax; /tempban <player/ID> <Days:Hours:Minutes> <Reason>",player);
}

else if(cmd == "untempban")
{
if(text)
{
local plrname = GetTok(text, " ", 1);
local q = QuerySQL(TempBans, "SELECT * FROM TempBans WHERE LOWER(Name)='"+plrname.tolower()+"'");
if(q)
{
QuerySQL(TempBans, "DELETE FROM TempBans WHERE LOWER(Name)='"+plrname.tolower()+"'" );
MessagePlayer("[#00FF00][SUCCESS]: [#FFFFFF]The user: "+GetSQLColumnData(q,0)+" has been unbanned!",player);
}
else MessagePlayer("[#FF0000][ERROR]: Can't found this nickname: "+plrname+" in database!",player);
}
else MessagePlayer("[#FFFF00]Syntax; /untempban <player full name>",player);
}
[/noae]


And in Last there are some important functions paste them to anywhere in your script

[noae]function CheckTempBan(player)
{
local q = QuerySQL( TempBans, "SELECT * FROM TempBans WHERE UID='"+escapeSQLString(player.UniqueID)+"' OR UID2='"+escapeSQLString(player.UniqueID2)+"'" );
if(q)
{
if((time() - GetSQLColumnData( q, 4 ).tointeger()) >= GetSQLColumnData( q, 5 ).tointeger())
{
QuerySQL(TempBans, "DELETE FROM TempBans WHERE LOWER(Name)='" + player.Name.tolower() + "'" );
}
else
{
Message("[#FF0000][PRIOR BAN]: [#FFFFFF]"+player.Name+" is banned for Reason: "+GetSQLColumnData(q, 8)+", TimeLeft: "+GetBanRemainingTime(GetSQLColumnData( q, 4 ).tointeger(), GetSQLColumnData( q, 6 ).tostring())+", Admin: "+GetSQLColumnData(q, 7)+"");
player.Kick();
}
FreeSQLQuery( q );
}
}

function GetBanRemainingTime( bantime,  banratio )
{
  local ban_current = time()-bantime;
  local total_time = "";
  local sp = split(banratio,":");
  local ban_Days = 0, ban_Hours = 0, ban_Minutes = 0;
  local ban_Day = sp[ 0 ].tointeger();
  local ban_Hour = sp[ 1 ].tointeger();
  local 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;
  ban_Day -= ban_Days;
  ban_Hour -= ban_Hours;
  ban_Minute -= ban_Minutes;
  local mints_to_hour = ban_Minute / 60;
  ban_Minute = ban_Minute - (mints_to_hour * 60);
  ban_Hour += mints_to_hour;
  local hours_to_days = ban_Hour / 24;
  ban_Hour = ban_Hour - (hours_to_days * 24);
  ban_Day += hours_to_days;
  local months = ban_Day / 31;
  ban_Day = ban_Day - (months * 31);
  local weeks = ban_Day / 7;
  ban_Day = ban_Day - (weeks * 7);
  local years = months / 12;
  months = months - (years * 12);
  if(years > 0) total_time += ", "+years+" Years";
  if(months > 0){if(total_time != ""){total_time += ", "+months+" Months";}else{total_time += months+" Months";}}
  if(weeks > 0){if(total_time != ""){total_time += ", "+weeks+" Weeks";}else{total_time += weeks+" Weeks";}}
  if(ban_Day > 0){if(total_time != ""){total_time += ", "+ban_Day+" Days";}else{total_time += ban_Day+" Days";}}
  if(ban_Hour > 0){if(total_time != ""){total_time += ", "+ban_Hour+" Hours";}else{total_time += ban_Hour+" Hours";}}
  if(ban_Minute > 0){if(total_time != ""){total_time += ", "+ban_Minute+" Minutes";}else{total_time += ban_Minute+" Minutes";}}
  return total_time;
}

function GetTok(string, separator, n, ...)
{
 local m = vargv.len() > 0 ? vargv[0] : n,
    tokenized = split(string, separator),
    text = "";
 
 if (n > tokenized.len() || n < 1) return null;
 for (; n <= m; n++)
 {
  text += text == "" ? tokenized[n-1] : separator + tokenized[n-1];
 }
 return text;
}

function GetPlayer( plr )
{
    if ( plr )
    {
        if ( IsNum( plr ) )
        {
            plr = FindPlayer( plr.tointeger() );
            if ( plr ) return plr;
            else return false;
        }
    else
        {     
            plr = FindPlayer( plr );
            if ( plr ) return plr;
            else return false;
        }
    }
    else return false;
}

function NumTok(string, separator)
{
 local tokenized = split(string, separator);
 return tokenized.len();
}
[/noae]

The code is tested and works properly fine if you find any bug then forgive me :P and don't hesitate to reply to this post as it can save others time to kill the bug

NOTE: I've just used Rocky's Temp Ban Calculations :P and other stuff of ban system is made by me
#5
Hi, today I am going to show you the in-game class editor(AKA Skins on spawn screen).
Classes are the most important things of server we why wouldn't make it cool and easily
Don't waste your time on making class manually just use this snippet ;D
I've been working since yesterday on class editor the controls are pretty simple you just have to follow me
Download this rar file and paste the whole content into the server main directory



How to use it?:

You just have to create a class table by using /newclass <Class Table Name>
If you already have made a project then you have to use /loadclass <The Table Name That You Have Made Already>
Then You can add classes by this command /addclass <Team ID> <Skin ID> <R> <G> <B> <Weapon 1> <Weapon 2> <Weapon 3> the command have 8 params the Param Team ID Defines the team id of class and the skin ID defines The Skin(AKA Player Model) The R G B Colour codes defines player colour nametag chat colour etc and the last 3 params are the weapon of class which will be given to the player when he spawns you have to give the weapon Name Or ID. You can also delete class for example you've created an class and you want to delete it then use /deleteclass2 if you want to delete a specific one then use /deleteclass <Skin ID> and then after all adding all classes you have to use /exportclass then it will export the classes code to scripts/Exported_Classes/ folder it will create the file from the class project name and all the id you can get from here:

Weapons IDs: http://wiki.thijn.ovh/index.php?title=Weapons
Skins IDs: http://wiki.thijn.ovh/index.php?title=Skins
RGB Colour codes: https://www.rapidtables.com/web/color/RGB_Color.html
You can also make the rgb colours through the given website link

The code is tested if any errors occured then feel free to reply on this topic
#6
Off-Topic General / Need a plugin
Mar 05, 2022, 07:09 PM
Hi @Xmair , I hope you are doing well can you plz give me your vcmp email plugin?
#7
Hi guys i have made Diepos / Deathpos system that is free from bugs here the diepos.nut file download it and paste it in your server scripts folder



now you just have to paste some lines on different events

[spoiler]Paste this line in onScriptLoad
dofile("scripts/diepos.nut");
diepos.CreateDieposArray();

Paste This Line in onPlayerJoin
diepos.ConnectClassWithPlayer(player);
Paste This Line in onPlayerDeath
diepos.SaveDeathPosistion(player);
Paste This Line in onPlayerKilll
diepos.SaveDeathPosistion(player);
Paste This Line In onPlayerSpawn
diepos.LoadDeathPosition(player);
Paste This Line In onPlayerCommand
diepos.DiePosCMDS(player, cmd, text);[/spoiler]

So The Code Is Tested IF You are facing any problem in this contact me on discord MR SK#5162
#8
Script Showroom / Proper Mute System
Oct 08, 2021, 04:45 PM
Hi Guyz I have made a proper mute system

Features:
This Is An auto mute system and manual mute system you can mute anyone if you're admin and also you can mute anyone with timer mute cmd the player will be unmuted automatically after the given time and if player do spamming   the player will be muted automatically and he will be unmuted in 30 seconds so enjoy the code ;)

Here is the source code

Put This Code in the top of main.nut

class MuteClass
{
MuteIndex = 0;
Timer = 0;
Muted = false;
}

Put This Code onScriptLoad

Mute <- array(GetMaxPlayers(), null); print("Mute System has been loaded successfully by MR_SK");
Put this code in onPlayerJoin

Mute[player.ID] = MuteClass();
Put this code onPlayerChat

if(Mute[player.ID].Muted == true && Mute[player.ID].Timer == 0){MessagePlayer("You Are Currently Muted!", player);return 0;}

if(Mute[player.ID].Muted == true && Mute[player.ID].Timer >0)
{
MessagePlayer("You Are Currently Muted For "+Mute[player.ID].Timer+" Mini Seconds!", player);return 0;
}

Mute[player.ID].MuteIndex += 1;

if(Mute[player.ID].MuteIndex == 4){Message("Auto Muted "+player.Name+" Time 30 seconds Reason: spamming"); Mute[player.ID].Muted = true; Mute[player.ID].Timer =  3000; NewTimer( "Unmute", 30000, 1, player.ID ); return 0;}

NewTimer( "RemoveMuteIndex", 3000, 1, player.ID );

Here are the commands

else if(cmd == "mute")
{
if(player.Name == "MR_SK") /*You Can use any thing here like checking if you are admin or not*/
{
if(text)
{
local plr = GetPlayer( GetTok( text, " ", 1 ) ), reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if(plr)
{
if(reason)
{
if(Mute[plr.ID].Muted == false)
{
Mute[plr.ID].Muted = true;
Message("Admin: "+player.Name+" Has muted "+plr.Name+" Reason: "+reason+"");
}
else MessagePlayer("[#db0000]The player Is not muted yet!", player);
}
else MessagePlayer("[#db0000]You must the type the reason to mute the player!", player);
}
else MessagePlayer("[#db0000]The Requested User Is Not Present In Game!", player);
}
else MessagePlayer( "Syntax; /" + cmd + " <Player/ID> <Reason>", player );
}
else MessagePlayer("[#db0000]Unknown command.", player);
}

else if(cmd == "unmute")
{
if(player.Name == "MR_SK") /*You Can use any thing here like checking if you are admin or not*/
{
if(text)
{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if(plr)
{
if(Mute[plr.ID].Muted == true)
{
Mute[plr.ID].Muted = false;
Message("Admin: "+player.Name+" Has unmuted "+plr.Name+"");
}
else MessagePlayer("[#db0000]The player Is not muted yet!", player);
}
else MessagePlayer("[#db0000]the player is not present in game!", player);
}
else MessagePlayer( "Syntax; /" + cmd + " <Player/ID>", player );
}
else MessagePlayer("[#db0000]Unknown command.", player);
}

else if(cmd == "timermute")
{
if(player.Name == "MR_SK") /*You Can use any thing here like checking if you are admin or not*/
{
if(text)
{
local plr = GetPlayer( GetTok( text, " ", 1 ) ), time = GetTok( text, " ", 2 ), reason = GetTok( text, " ", 3, NumTok( text, " " ) );
if(plr)
{
if(time)
{
if(IsNum(time))
{
if(reason)
{
if(Mute[plr.ID].Muted == false)
{
Mute[plr.ID].Muted = true;
Message("Admin: "+player.Name+" Has muted "+plr.Name+" Time: "+time.tointeger()+" Mini Seconds Reason: "+reason+"");
NewTimer( "Unmute", time.tointeger(), 1, player.ID );
Mute[player.ID].Timer = time.tointeger();
}
else MessagePlayer("[#db0000]The player Is not muted yet!", player);
}
else MessagePlayer("[#db0000]You must the type the reason to mute the player!", player);
}
else MessagePlayer("[#db0000]The time must be in numbers!", player);
}
else MessagePlayer("[#db0000]You must type the time for muting player!", player);
}
else MessagePlayer("[#db0000]The Requested User Is Not Present In Game!", player);
}
else MessagePlayer( "Syntax; /" + cmd + " <Player/ID> <Time> <Reason>", player );
}
else MessagePlayer("[#db0000]Unknown command.", player);
}

And Here Are the functions

function RemoveMuteIndex(plr)
{
local player = FindPlayer(plr);
if(player){Mute[player.ID].MuteIndex = 0;}
}

function Unmute(plr)
{
local player = FindPlayer(plr);
if(player){Message("Auto Unmuted "+player.Name+""); Mute[player.ID].Muted = false; Mute[player.ID].Timer = 0;}
}

function GetPlayer( plr )
{
    if ( plr )
    {
        if ( IsNum( plr ) )
        {
            plr = FindPlayer( plr.tointeger() );
            if ( plr ) return plr;
            else return false;
        }
    else
        {     
            plr = FindPlayer( plr );
            if ( plr ) return plr;
            else return false;
        }
    }
    else return false;
}

function GetTok(string, separator, n, ...)
{
local m = vargv.len() > 0 ? vargv[0] : n,
  tokenized = split(string, separator),
  text = "";

if (n > tokenized.len() || n < 1) return null;
for (; n <= m; n++)
{
text += text == "" ? tokenized[n-1] : separator + tokenized[n-1];
}
return text;
}

function NumTok(string, separator)
{
    local tokenized = split(string, separator);
    return tokenized.len();
}

Tested!
#9
Hi buddies i am getting some problem with creating col file of custom object now here I created this object as well



but.. now I have created col file too by getting motivated from devil jin's creating custom object tutorial but its giving me error like this



now here how I made col file

https://youtu.be/Du2tDMrDPcg

now anyone can help me to fix it?
#10
Script Showroom / Arena System
Jun 23, 2021, 07:48 AM
Hi Guyz I Made A Simple Arena System


Add This Into Class

DeathInArena = false;
Add This Into onScriptLoad

DeathInArena <- array( GetMaxPlayers(), null );
PlayerInArena <-array(GetMaxPlayers(),0);
ArenaPermit <-array(GetMaxPlayers(),0);
arenawall1 <- CreateObject(310,1,Vector(-1342.81, 1289.21, 83.043),255).RotateToEuler(Vector(0.0000000000, 0.0000000000, 0.0000000000),1);
arenawall2 <- CreateObject(310,1,Vector(-1351.61, 1306.81, 83.043),255).RotateToEuler(Vector(0.0000000000, 0.0000000000, 0.0000000000),1);
arenawall3 <- CreateObject(310,1,Vector(-1342.81, 1306.81, 83.043),255).RotateToEuler(Vector(0.0000000000, 0.0000000000, 0.0000000000),1);
arenawall4 <- CreateObject(310,1,Vector(-1351.71, 1306.71, 83.043),255).RotateToEuler(Vector(0.0000000000, 0.0000000000, 0.7071063121),1);
arenawall5 <- CreateObject(310,1,Vector(-1334.01, 1297.91, 83.043),255).RotateToEuler(Vector(0.0000000000, 0.0000000000, 0.7071063121),1);
arenawall6 <- CreateObject(310,1,Vector(-1351.71, 1297.91, 83.043),255).RotateToEuler(Vector(0.0000000000, 0.0000000000, 0.7071063121),1);
arenawall7 <- CreateObject(310,1,Vector(-1351.61, 1289.21, 83.043),255).RotateToEuler(Vector(0.0000000000, 0.0000000000, 0.0000000000),1);
arenawall8 <- CreateObject(310,1,Vector(-1334.08, 1306.67, 83.043),255).RotateToEuler(Vector(0.0000000000, 0.0000000000, 0.7071063121),1);

Add This Into onPlayerJoin

ArenaPermit[player.ID] = 0;
PlayerInArena[player.ID] = 0;
DeathInArena[player.ID] = 0;
arena1.World = 2;
arena2.World = 2;
arena3.World = 2;
arena4.World = 2;
arena5.World = 2;
arena6.World = 2;
arena7.World = 2;
arena8.World = 2;

Add This Into onPlayerDeath

if ( status[ player.ID ].DeathInArena )
{
DeathInArena[ player.ID ] = player.Pos;
}

Add This Into onPlayerSpawn

if ( status[ player.ID ].DeathInArena )
{
player.Pos = DeathInArena[ player.ID ];
}

Here The CMD That Admin Would BE Able To Start Arena Event
Add This Into onPlayerCommand

else if ( cmd == "arena" )
{
if( Admin[ player.ID ] == true )
{
if (!text)
{
if ( text == "on" )
{
if( ArenaPermit[ player.ID ] == true )
{
ArenaPermit[ player.ID ] = true;
Message( "[#FFbb00] Admin " + player.Name + " Has Started Arena Event.);
}
else MessagePlayer("[#db0000]Arena Event IS Already Started.", player);
}
else if ( text == "off" )
{
if( ArenaPermit[ player.ID ] == false )
{
ArenaPermit[ player.ID ] = false;
for(local i = 0; i < GetMaxPlayers(); ++i)
local plr = GetPlayer(i)
if( PlayerInArena[ plr.ID ] == true )
plr.Pos = Vector( -1341.79 1334.71 103.043 );
Message( "[#FFbb00] Admin " + player.Name + " Has Stopped Arena Event.);
}
else MessagePlayer("[#db0000]Arena Event IS Already Closed.", player);
}
}
else MessagePlayer("Syntax; /arena <on/off>.", player);
}
else MessagePlayer("[#db0000]Unknown command.", player);
}

Warning: You Need To Use My Staff Level System To Use Start Arena CMD
Staff Level System Link:
https://forum.vc-mp.org/?topic=8560.msg51316#msg51316


You Can Only Join The Arena Event When Any Admin Has Started Arena Event
Here The CMD That Normal Player Will Be Able To Join Arena Event
Add This Into onPlayerCommand

else if ( cmd == "joinarena" )
{
for(local i = 0; i < GetMaxPlayers(); ++i)
local plr = GetPlayer(i)
if( ArenaPermit[ plr.ID ] == true )
{
if( PlayerInArena[ player.ID ] == true )
{
PlayerInArena[ player.ID ] = true;
player.World = arenawall1.World;
player.Pos = Vector( -1341.79 1320.71 103.043 );
status[ player.ID ].DeathInArena = true;
Message( "[#FFbb00]** "+player.Name+" Has Joined Arena Event);
}
else MessagePlayer("[#db0000]Unknown command.", player);
}
else MessagePlayer("[#db0000]Unknown command.", player);
}

Here The CMD That Player WIll Be Able TO Leave Arena If The Player Is IN Arena
Add This Into onPlayerCommand

else if ( cmd == "leavearena" )
{
for(local i = 0; i < GetMaxPlayers(); ++i)
local plr = GetPlayer(i)
if( ArenaPermit[ plr.ID ] == true )
{
if( PlayerInArena[ player.ID ] == false )
{
player.Pos = Vector( -1341.79 1334.71 103.043 );
status[ player.ID ].DeathInArena = false;
PlayerInArena[ player.ID ] = false;
player.World = 1;
Message( "[#FFbb00]** "+player.Name+" Has Leaved The Arena Event);
}
else MessagePlayer("[#db0000]You Already Leaved Arena Event.", player);
}
else MessagePlayer("[#db0000]Unknown command.", player);
}

Untested It But It Will Work If You Find A Bug Dont Hesitate To PM On Discord Or Either You Can PM Me Here Also Discord: SK#6304

#11
Script Showroom / Reward System
Jun 22, 2021, 05:23 PM
Hi Guyz I Made Simple Reward System ;D

Warning You Can Use This CMD Only Using My Staff Level System
Staff Level System Link:
https://forum.vc-mp.org/?topic=8560.new#new

Here The Cmd Add This Into onPlayerCommand

else if( cmd == "reward" )
{
if( Admin[ player.ID ] == true )
{
if ( text )
{
local plr = GetPlayer( GetTok( text, " ", 1 ) ), ammount = GetTok( text, " ", 2 );
ammount = ammount.tointeger();
if ( !plr )
{
if( !IsNum( ammount ) )
{
plr.GiveMoney(ammount.tointeger());
Message( "[#FFbb00]** Admin " + player.Name + " Has Rewarded "+plr.Name+" Ammount "+ammount  ");
}
else MessagePlayer( "[#db0000]Money Must Be Integer.", player );
}
else MessagePlayer("[#db0000]Unknown player.", player);
}
else MessagePlayer("Syntax; /reward <player Name> <ammount>.", player);
}
else MessagePlayer("[#db0000]Unknown command.", player);
}

#12
Script Showroom / Slap System
May 24, 2021, 11:12 AM
I Made Simple Slap system ;D

Add This To Main.nut

else if ( cmd=="slap")
{
if(status[player.ID].AdminLevel >= 1)
{
 if (!text) MessagePlayer("[#db0000]Usage :[#FFFFFF] /slap <Name/ID>",player);
else
{
local plr = FindPlayer(text);
plr.Pos.z += 10;
Announce( "~y~Slapped!", player, 6 );
Message("[#db0000]Admin[#FFFFFF] "+player.Name+"[#db0000] has slapped [#FFFFFF]"+plr.Name+".");
}
}
}
#13
Tell me How Can I DIsable Scrouch In VCMP SErver? Plz tell me
#14
I Need Help From You @Yyg Plz help me to add weapons in your pubg dm server :'( plz help me