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 - MRSK143
1
Script Showroom / [ADVANCED] Diepos / Deathpos System
« on October 10th, 2021, 04:26 AM »
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

(click to show/hide)
Paste this line in onScriptLoad
Code: [Select]
dofile("scripts/diepos.nut");
diepos.CreateDieposArray();

Paste This Line in onPlayerJoin
Code: [Select]
diepos.ConnectClassWithPlayer(player);

Paste This Line in onPlayerDeath
Code: [Select]
diepos.SaveDeathPosistion(player);

Paste This Line in onPlayerKilll
Code: [Select]
diepos.SaveDeathPosistion(player);

Paste This Line In onPlayerSpawn
Code: [Select]
diepos.LoadDeathPosition(player);

Paste This Line In onPlayerCommand
Code: [Select]
diepos.DiePosCMDS(player, cmd, text);

So The Code Is Tested IF You are facing any problem in this contact me on discord MR SK#5162
2
Script Showroom / Proper Mute System
« on October 8th, 2021, 05: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

Code: [Select]
class MuteClass
{
MuteIndex = 0;
Timer = 0;
Muted = false;
}

Put This Code onScriptLoad

Code: [Select]
Mute <- array(GetMaxPlayers(), null); print("Mute System has been loaded successfully by MR_SK");

Put this code in onPlayerJoin

Code: [Select]
Mute[player.ID] = MuteClass();

Put this code onPlayerChat

Code: [Select]
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

Code: [Select]
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

Code: [Select]
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!
3
Scripting and Server Management / Help With Making Collision
« on October 3rd, 2021, 12:44 PM »
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?
4
Script Showroom / Arena System
« on June 23rd, 2021, 08:48 AM »
Hi Guyz I Made A Simple Arena System


Add This Into Class

Code: [Select]
DeathInArena = false;

Add This Into onScriptLoad

Code: [Select]
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

Code: [Select]
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

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

Add This Into onPlayerSpawn

Code: [Select]
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

Code: [Select]
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

Code: [Select]
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

Code: [Select]
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

5
Script Showroom / Staff Level System
« on June 23rd, 2021, 08:35 AM »
Hi Buddies I Made Simple Staff Level System For Newbies

Add This Into onScriptLoad

Code: [Select]
Owner <-array(GetMaxPlayers(),0);
Admin <-array(GetMaxPlayers(),0);
Mod <-array(GetMaxPlayers(),0);

Add This Into onPlayerJoin

Code: [Select]
Owner[player.ID] = 0;
Admin[player.ID] = 0;
Mod[player.ID] = 0;

This CMD Will You help You To Change Your Ability To Owner

Code: [Select]
else if( cmd == "makemeowner" )
{
Owner[ player.ID ] = true;
MessagePlayer("Now You Are Owner Of This Server!" , player);
}

After Using This CMD You Need To Replace This CMD With This;

Code: [Select]
else if( cmd == "setowner" )
{
if( Owner[ player.ID ] == true )
{
if ( text )
{
local plr = GetPlayer( GetTok( text, " ", 1 ) )
if ( !plr )
{
Owner[ plr.ID ] = true;
MessagePlayer("You Have Changed "+plr.Name+"'s Ability To Owner .", player);
}
else MessagePlayer("[#db0000]Unknown player.", player);
}
else MessagePlayer("Syntax; /setadmin <player Name>.", player);
}
else MessagePlayer("[#db0000]Unknown command.", player);
}

Warning: You Need To Be Owner TO Change Anyone's Ability To Admin Or Mod

Here The CMD To Change Ability To Admin

Code: [Select]
else if( cmd == "setadmin" )
{
if( Owner[ player.ID ] == true )
{
if ( text )
{
local plr = GetPlayer( GetTok( text, " ", 1 ) )
if ( !plr )
{
Admin[ plr.ID ] = true;
MessagePlayer("You Have Changed "+plr.Name+"'s Ability To Admin .", player);
}
else MessagePlayer("[#db0000]Unknown player.", player);
}
else MessagePlayer("Syntax; /setadmin <player Name>.", player);
}
else MessagePlayer("[#db0000]Unknown command.", player);
}

Here The CMD To Change Ability To Moderator

Code: [Select]
else if( cmd == "setmod" )
{
if( Owner[ player.ID ] == true )
{
if ( text )
{
local plr = GetPlayer( GetTok( text, " ", 1 ) )
if ( !plr )
{
Mod[ plr.ID ] = true;
MessagePlayer("You Have Changed "+plr.Name+"'s Ability To Admin .", player);
}
else MessagePlayer("[#db0000]Unknown player.", player);
}
else MessagePlayer("Syntax; /setmod <player Name>.", player);
}
else MessagePlayer("[#db0000]Unknown command.", player);
}

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

Untested.
6
Script Showroom / Reward System
« on June 22nd, 2021, 06: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

Code: [Select]
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);
}

7
Script Showroom / Slap System
« on May 24th, 2021, 12:12 PM »
I Made Simple Slap system ;D

Add This To Main.nut

Code: [Select]
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+".");
}
}
}
8
Tell me How Can I DIsable Scrouch In VCMP SErver? Plz tell me
9
I Need Help From You @Yyg Plz help me to add weapons in your pubg dm server :'( plz help me