Vcmp Snippy

Started by Tajammul, Sep 28, 2018, 06:56 AM

Previous topic - Next topic

Tajammul

Drunk , Undrunk System
else if ( cmd == "drunk" )
{
MessagePlayer(LBLUE+" "+player.Name+" Is Drunk Mode.  .", player );
player.IsDrunk=true;
}

else if ( cmd == "undrunk" )
{
MessagePlayer(LBLUE+" "+player.Name+" Exit Drunk Mode.  .", player );
player.IsDrunk=false;
}

Tajammul

#1
Admin Health System
else if( cmd == "sethp" )
{
       if ( player.Name == "Name" || player.Name == "Name" || player.Name == "Name" )
{
      if( !text )
      MessagePlayer("Use /sethp <plr> <hp>", player);
      local params = split( text, " " );
      if( params.len() < 1 ) MessagePlayer("Wrong no. of parameters.", player);
      else if( !IsNum( params[1] ) ) return MessagePlayer("HP must be an integer.", player);
      else if( params[1].tointeger() >250 || params[1].tointeger() < 0 ) return MessagePlayer("It can't be more than 250 or less than 0.", player);
      local plr = IsNum( params[0] ) ? FindPlayer( params[0].tointeger() ) : FindPlayer( params[0] );
      if( !plr ) return MessagePlayer( "Wrong player.", player );
     

else plr.Health = params[1].tointeger();

MessagePlayer(RED+""+player.Name+" Set Health :[ "+plr.Name+" ]  .", player );


}
        else MessagePlayer( "[#00ff00] YOU ARE NOT ADMIN. " , player )


}

Tajammul

#2
Admin Armour System
else if ( cmd == "setarmour" )
{
     
 if ( player.Name == "Name" || player.Name == "Name" || player.Name == "Name" )
{
      if( !text )
      MessagePlayer("Use /setarmour <plr> <hp>", player);
      local params = split( text, " " );
      if( params.len() < 1 ) MessagePlayer("Wrong no. of parameters.", player);
      else if( !IsNum( params[1] ) ) return MessagePlayer("Armour must be an integer.", player);
      else if( params[1].tointeger() > 250 || params[1].tointeger() < 0 ) return MessagePlayer("It can't be more than 250 or less than 0.", player);
      local plr = IsNum( params[0] ) ? FindPlayer( params[0].tointeger() ) : FindPlayer( params[0] );
      if( !plr ) return MessagePlayer( "Wrong player.", player );
     






 else plr.Armour = params[1].tointeger();


MessagePlayer(RED+""+player.Name+" Set Armour :[ "+plr.Name+" ]  .", player );

}
        else MessagePlayer( "[#00ff00] YOU ARE NOT ADMIN. " , player )
}

Tajammul

#3
Admin Commands Idea
[noae][noae][noae][noae]else if ( ( cmd == "admincmds" ) || ( cmd == "acmds" ) )
{
local lvl = GetLevel(player);
if ( lvl.tointeger() == 2 )
{
MessagePlayer(RED+"========== "+YELLOW+"Traner Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+"  "+LGREEN+"admininfo, ann, setweather, clear, kick",player);
}
else if ( lvl.tointeger() == 3 )
{
MessagePlayer(RED+"========== "+YELLOW+"Moderator Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+"  "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, taxijump,",player);
MessagePlayer(RED+"  "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip",player);
}
else if ( lvl.tointeger() == 4 )
{
MessagePlayer(RED+"========== "+YELLOW+"Admin Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+"  "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, stuntbike",player);
MessagePlayer(RED+"  "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip, taxijump,",player);
MessagePlayer(RED+"  "+LGREEN+"drown, ban, unban, baninfo, healall, playerip, alias, jail,",player);
MessagePlayer(RED+"  "+LGREEN+"unjail, waterdrive",player);
}
else if ( lvl.tointeger() == 5 )
{
MessagePlayer(RED+"========== "+YELLOW+"Management Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+"  "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, carfly, get,",player);
MessagePlayer(RED+"  "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip, taxijump,",player);
MessagePlayer(RED+"  "+LGREEN+"drown, ban, unban, baninfo, healall, playerip, alias, jail,",player);
MessagePlayer(RED+"  "+LGREEN+"unjail, waterdrive, stuntbike, slap, setskin, macban, unmacban,",player);
MessagePlayer(RED+"  "+LGREEN+"freezeall, unfreezeall, resetstats, shootinair",player);
}
else if ( lvl.tointeger() == 6 )
{
MessagePlayer(RED+"========== "+YELLOW+"Co-Owner Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+"  "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, carfly, get,",player);
MessagePlayer(RED+"  "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip, taxijump,",player);
MessagePlayer(RED+"  "+LGREEN+"drown, ban, unban, baninfo, healall, playerip, alias, jail,",player);
MessagePlayer(RED+"  "+LGREEN+"unjail, waterdrive, stuntbike, slap, setskin, macban, unmacban,",player);
MessagePlayer(RED+"  "+LGREEN+"freezeall, unfreezeall, resetstats, shootinair, killplayer, setmon,",player);
MessagePlayer(RED+"  "+LGREEN+"getall, spawncar, macban2, unmacban2",player);
}
else if ( lvl.tointeger() == 7 )
{
MessagePlayer(RED+"========== "+YELLOW+"Server Owner Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+"  "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, carfly, get,",player);
MessagePlayer(RED+"  "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip, taxijump,",player);
MessagePlayer(RED+"  "+LGREEN+"drown, ban, unban, baninfo, healall, playerip, alias, jail,",player);
MessagePlayer(RED+"  "+LGREEN+"unjail, waterdrive, stuntbike, slap, setskin, macban, unmacban,",player);
MessagePlayer(RED+"  "+LGREEN+"freezeall, unfreezeall, resetstats, shootinair, killplayer, setmon,",player);
MessagePlayer(RED+"  "+LGREEN+"getall, spawncar, macban2, unmacban2, addadmin, deladmin, setlevel,",player);
MessagePlayer(RED+"  "+LGREEN+"setkills, setkilleds, setdeaths, exec, setwlevel, playerimmunity, vehimmunity,disarmall,sethp,setarmour,pcg,chee",player);
}
}

}
[/noae][/noae][/noae][/noae]

Xhefri

First of all this is not a system is just a simple command for admins and also use "Insert code" when you post any script in forum.

DizzasTeR

Moved to snippets, even though this and the rest of the topics created by you deserve a delete.

QuoteVerify that the script is working properly.
Take your script, extract it, and start fresh with the latest Squirrel server available. If you are using a database, erase it and start from scratch. Make absolutely sure that all functions and commands are working as they should.

If your script uses a database, make sure that you either add a bare-bones Database file with all unnecessary entries removed, or that you include a file with the CREATE TABLE/INSERT statements that need to be run.

If this doesn't happen, consider these topics gone.

MatheuS

You should only create one topic and post all your simple scripts. You don't need to be creating multiple topics.
if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

Humzasajjad

[noae]
Quote from: Tajammul on Sep 28, 2018, 07:05 AMelse if ( ( cmd == "admincmds" ) || ( cmd == "acmds" ) )
{
local lvl = GetLevel(player);
if ( lvl.tointeger() == 2 )
{
MessagePlayer(RED+"========== "+YELLOW+"Traner Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+"  "+LGREEN+"admininfo, ann, setweather, clear, kick",player);
}
else if ( lvl.tointeger() == 3 )
{
MessagePlayer(RED+"========== "+YELLOW+"Moderator Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+"  "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, taxijump,",player);
MessagePlayer(RED+"  "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip",player);
}
else if ( lvl.tointeger() == 4 )
{
MessagePlayer(RED+"========== "+YELLOW+"Admin Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+"  "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, stuntbike",player);
MessagePlayer(RED+"  "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip, taxijump,",player);
MessagePlayer(RED+"  "+LGREEN+"drown, ban, unban, baninfo, healall, playerip, alias, jail,",player);
MessagePlayer(RED+"  "+LGREEN+"unjail, waterdrive",player);
}
else if ( lvl.tointeger() == 5 )
{
MessagePlayer(RED+"========== "+YELLOW+"Management Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+"  "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, carfly, get,",player);
MessagePlayer(RED+"  "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip, taxijump,",player);
MessagePlayer(RED+"  "+LGREEN+"drown, ban, unban, baninfo, healall, playerip, alias, jail,",player);
MessagePlayer(RED+"  "+LGREEN+"unjail, waterdrive, stuntbike, slap, setskin, macban, unmacban,",player);
MessagePlayer(RED+"  "+LGREEN+"freezeall, unfreezeall, resetstats, shootinair",player);
}
else if ( lvl.tointeger() == 6 )
{
MessagePlayer(RED+"========== "+YELLOW+"Co-Owner Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+"  "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, carfly, get,",player);
MessagePlayer(RED+"  "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip, taxijump,",player);
MessagePlayer(RED+"  "+LGREEN+"drown, ban, unban, baninfo, healall, playerip, alias, jail,",player);
MessagePlayer(RED+"  "+LGREEN+"unjail, waterdrive, stuntbike, slap, setskin, macban, unmacban,",player);
MessagePlayer(RED+"  "+LGREEN+"freezeall, unfreezeall, resetstats, shootinair, killplayer, setmon,",player);
MessagePlayer(RED+"  "+LGREEN+"getall, spawncar, macban2, unmacban2",player);
}
else if ( lvl.tointeger() == 7 )
{
MessagePlayer(RED+"========== "+YELLOW+"Server Owner Commands Prefix To "+WHITE+"(/) "+RED+"<<==========", player );
MessagePlayer(RED+"  "+LGREEN+"admininfo, ann, setweather, clear, hideadmin, carfly, get,",player);
MessagePlayer(RED+"  "+LGREEN+"kick, mute, unmute, warn, freeze, unfreeze, getip, taxijump,",player);
MessagePlayer(RED+"  "+LGREEN+"drown, ban, unban, baninfo, healall, playerip, alias, jail,",player);
MessagePlayer(RED+"  "+LGREEN+"unjail, waterdrive, stuntbike, slap, setskin, macban, unmacban,",player);
MessagePlayer(RED+"  "+LGREEN+"freezeall, unfreezeall, resetstats, shootinair, killplayer, setmon,",player);
MessagePlayer(RED+"  "+LGREEN+"getall, spawncar, macban2, unmacban2, addadmin, deladmin, setlevel,",player);
MessagePlayer(RED+"  "+LGREEN+"setkills, setkilleds, setdeaths, exec, setwlevel, playerimmunity, vehimmunity,disarmall,sethp,setarmour,pcg,chee",player);
}
}

}
[/noae]it gets onscriptload error..what to do?