Post this script in Main.nut
If you have Commands.nut paste it in commands .nut
else if ( cmd == "ban" )
{
if ( stats[ player.ID ].Reg == false ) return MessagePlayer( "[#95fcff]WARN > [#E0E0E0]You're not registered.", player );
else if ( stats[ player.ID ].Log == false ) return MessagePlayer( "[#95fcff]WARN > [#E0E0E0]You're not Logged-In", player );
if (status[player.ID].AdminLevel >= 1)
if ( !text) MessagePlayer ( " [#95fcff]WARn > [#E0E0E0}Code, "/" + cmd + " <Name> <Reson>", player );
else
{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer ("[#95fcff]WARN > [#E0E0E0]Unkown ID/Name.", player )
else
{
local reson = GetTok( text, " ", 2 NumTok( text, " " ) );
if ( reson == null ) reson = "NO_Reson";
Ban ( plr, player, reson ) ;
}
}
}
nmm your script is not right bruh you should fix your script
bro its simple ban cmd you can put your name in
If ( Player.Name == "Put your name here" )
and try this cmd into your server its works and for admin level some one server don't have admin level so what he do its a simple ban system for simple peoples only u can use this command not all.
Quote from: husnainaligee on May 26, 2021, 02:32 PMbro its simple ban cmd you can put your name in
If ( Player.Name == "Put your name here" )
and try this cmd into your server its works and for admin level some one server don't have admin level so what he do its a simple ban system for simple peoples only u can use this command not all.
This is right code bro you can also try
else if ( cmd == "ban" )
{
if ( stats[ player.ID ].Reg == false ) return MessagePlayer( "[#95fcff]WARN > [#E0E0E0]You're not registered.", player );
else if ( stats[ player.ID ].Log == false ) return MessagePlayer( "[#95fcff]WARN > [#E0E0E0]You're not Logged-In", player );
if(status[player.ID].AdminLevel >= 1)
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else
{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer ("[#E0E0E0]Unkown ID/Name.", player )
else
{
local reson = GetTok( text, " ", 2 NumTok( text, " " ) );
if ( reason == null ) reason = "None";
Ban ( plr, player, reason ) ;
}
}
}
Good man You is right i see And i put Admin level okay Now i check its worked but you do mistake in
if(status[player.ID].AdminLevel >= 1)
if (status[player.ID].AdminLevel >= 1)
now see cmd is worked
Quote from: husnainaligee on May 26, 2021, 02:43 PMGood man You is right i see And i put Admin level okay Now i check its worked but you do mistake in
if(status[player.ID].AdminLevel >= 1)
if (status[player.ID].AdminLevel >= 1)
now see cmd is worked
No Problem Buddy 8)
you need to add the function Ban ( plr, player, reason ) ; without it your command won't work
Have a look at this: ---> " https://forum.vc-mp.org/?topic=8613.0 "