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
Pages: [1]
1  Scripting / Script Snippets / admin system for newbies on: April 03, 2018, 10:50:25 am
i have seen many newbies trying to make a server but they donot have an admin system so heres a little snipper for you guyzz

Code: [Select]
/*top of script*/

const AdminPassword = "adminpassword"
class PlayerInfo
{
admin = false;
}
//=================================

/*onscriptload*/

pinfo <- array(GetMaxPlayers(), null);
//===================================


/*anywhere*/

function PlayerIsAdmin(player)
{
 if(pinfo[pPlayer.ID].admin== true) return 1;
 else return 0;
}
//========================================

/*playerjoin*/

pinfo[pPlayer.ID] = PlayerInfo();
//==========================================



/*playercmd*/
else if(szCommand == "admins")
{
 {
  if ((  pPlayer.Name == "admin" ) || (  pPlayer.Name == "admin1" ))
{
 //MessagePlayer( "[#00ff00]Admins are on Duty [ " + pPlayer.Name + " ] " , pPlayer );
 Message( "Admins are on Duty [ " + pPlayer.Name + " ] ", 0, 255, 0 );
 }
else
{
MessagePlayer( "[#00ff00]Admins available [#00ffff]"+pinfo[pPlayer.ID].admin+"" , pPlayer );
}
}
}

else if (szCommand == "admin")
 {
 if(!szArgs) MessagePlayer( "-> Error: [#ffd700]Please type /admin <admin password>", pPlayer,255,0,102);
 else if ( szArgs != AdminPassword ) MessagePlayer( "-> Error: [#ffd700]Invalid PASSWORD.", pPlayer,255,0,102);
 else
 {
 MessagePlayer( "-> [#00ffff]Welcome "+pPlayer.Name+". You are logged as admin in server.", pPlayer,255,0,102); pinfo[pPlayer.ID].admin = true;
 }
 }

 else if ( szCommand == "ban" )
    {
        if ( (  pPlayer.Name == "admin" ) || (  pPlayer.Name == "admin1" ) )
        {
            if ( szArgs )
            {
           local plr = FindPlayer( szArgs );
               if ( plr )
               {
               BanPlayer( plr );
               }
               else MessagePlayer( "[#00ff00]Invalid Player " , pPlayer );
            }
            else MessagePlayer( "[#0f00f0]Type /ban <player> " , pPlayer );
        }
        else MessagePlayer( "[#F02F0F] Your are not admin. " , pPlayer )
    }

else if ( szCommand == "kick" )
    {
        if ( (  pPlayer.Name == "admin" ) || (  pPlayer.Name == "admin1" ) )
        {
            if ( szArgs )
            {
           local plr = FindPlayer( szArgs );
               if ( plr )
               {
               KickPlayer( plr );
               }
               else MessagePlayer( "[#00ff00]Invalid Player " , pPlayer );
            }
            else MessagePlayer( "[#0f00f0]Type /kick <player> " , pPlayer );
        }
        else MessagePlayer( "[#F02F0F] Your are not admin. " , pPlayer )
    }

   else if ( szCommand == "settime" )
     {
        if ( (  pPlayer.Name == "admin" ) || (  pPlayer.Name == "admin1" ) ){
          local aTime = split( szArgs, " " );
          local szHour = aTime[0], szMin = aTime[1];
         
          SetTime( szHour.tointeger(), szMin.tointeger() );
     }
}

    else if (szCommand == "setweather" )
     {
if ( (  pPlayer.Name == "admin" ) || (  pPlayer.Name == "admin1" ) ){
          SetWeather( szArgs.tointeger() );
     }
}

else if ( szCommand == "ann" )
{
if ( (  pPlayer.Name == "admin" ) || (  pPlayer.Name == "admin1" ) ){
if ( szArgs ) BigMessage( szArgs, 5000, 1 );
}
}
// ==================================
2  Liberty Unleashed / Liberty Unleashed Chat / GTA 3 LUMP.exe on: January 05, 2018, 07:18:38 pm
Current version
Releasing a Software for lu:mp
Note:-just download the setup and go on through steps
Build version 1.1997.2018
Download from : http://www.mediafire.com/file/abyqwi944674x53/GTA-LU.exe


What does it do you will know it better when you download it  ;)


Old version
Download it from : http://www.mediafire.com/file/c6feh61xa6h24u5/GTA+3-LU+MULTIPLAYER+GUIDE.exe
3  Liberty Unleashed / Liberty Unleashed Chat / GTA-3 LU:MP setup on: January 05, 2018, 06:57:36 pm
Current version
Releasing a Software for lu:mp
Note:-just download the setup and go on through steps
Build version 1.1997.2018
Download from : http://www.mediafire.com/file/abyqwi944674x53/GTA-LU.exe


What does it do you will know it better when you download it  ;)


Old version
Download it from : http://www.mediafire.com/file/c6feh61xa6h24u5/GTA+3-LU+MULTIPLAYER+GUIDE.exe
4  Liberty Unleashed / LU Clans / TDK Clan ->The Dark Knights on: July 09, 2017, 11:27:44 pm
So , The clan TDK = The Dark Knights was established on June 2016 and the Clan TDK well be known well very soon.

The Dark Knights forum : http://tdkclan.smfnew2.com
You can look after  the information below about the TDKs.
Leaders: [TDK]MEGAMIND
 Co-Leaders: =TDK=MDK^
5  Liberty Unleashed / Suggestions / Gta 3 Lu Multipayer Guide on: June 19, 2017, 04:11:06 am
Hi guyyz i wanted to share my software with u
it is called as GTA 3-LU MULTIPLAYER GUIDE
it makes LU more easy to acces.......
sorry for less description when u will download it u can have its benefits
 heres the pic



download link:watch tutorial on how to use  GTA 3-LU MULTIPLAYER GUIDE

https://www.youtube.com/watch?v=1eUHz1ts4CY

Note: the 2nd option (open client browser) will only work if ur destination is like this C:\GTA 3\lu.exe

+it plays a  theme song too if ur game is present in local drive C:

One more important Note: if ur antivirus detects it like a virus so it will be a false positive alarm downt worry its not a virus...
it has been tested through many antivirus programs mostly did not detected it like a virus just avg does idk why?
maube avg is not updated :p....

so plzz enjoy...

i would be very sorry to Developers of lu if they mind my work i was just being freindly so that lu can get more excellent....
6  Scripting / Script Snippets / saving a player position on: June 11, 2017, 11:03:32 pm
Quote
function onPlayerCommand(player, cmd, text)
{
  if ( cmd == "print")
  {
    if (player.Spawned)
    {
     
      local pos = player.Pos, x = pos.x, y = pos.y, z = pos.z;

      print("Vector( " + x + ", " + y + ", " + z +");" );

      return true
    }
    else MessagePlayer("You never spawned", player, 255, 0, 0);
  }
}

or
save it to ur commands onplayercommands and when in game do /s the positons or values will be displayed on the console..
Quote
else if( szCommand == "s" )
{
 print( pPlayer.Pos );
 }


in game printing pos

Quote
Player_Pos <- array(GetMaxPlayers());

class Player_Stores_Pos
{
  /* No true reason to set these as floats */
 
  X = 0;
  Y = 0;
  Z = 0;

  Position_Exist = false;
 
}

function onPlayerCommand(player, cmd, text)
{
  if ( cmd == "print")
  {
    if (player.Spawned)
    {
     
      local pos = player.Pos, x = pos.x, y = pos.y, z = pos.z;

      /* This print will return a vector that can be copied and pasted via in scripting */
      print("Vector( " + x + ", " + y + ", " + z +");" );

      return true
    }
    else MessagePlayer("You never spawned", player, 255, 0, 0);
  }

  //--------------------------------------------------------------------------

  if ( cmd == "setclass")
  {
     /* You should add this on player join instead */
     Player_Pos[player.ID] = Player_Stores_Pos();

     MessagePlayer("You have set the position class", player, 100, 0, 115);

     return true;
  }

  if ( cmd == "endclass")
  {
     /* You should add this on player part instead */
     Player_Pos[player.ID] = null;

     MessagePlayer("You have cleared the position array", player, 100, 0, 115);

     return true;
  }

  //--------------------------------------------------------------------------

  if ( cmd == "save")
  {
    if (player.Spawned)
    {
     
      local pos = player.Pos, x = pos.x, y = pos.y, z = pos.z;
     
      /* Now store the positions */
      Player_Pos[player.ID].X = x;
      Player_Pos[player.ID].Y = y;
      Player_Pos[player.ID].Z = z;

      Player_Pos[player.ID].Position_Exist = true;

      local District = GetDistrictName(Player_Pos[player.ID].X, Player_Pos[player.ID].Y);
      MessagePlayer("Position Saved in: " + District, player, 100, 0, 115);

      return true
    }
    else MessagePlayer("You never spawned", player, 255, 0, 0);
  }

  if ( cmd == "load")
  {
    if (player.Spawned)
    {
      if (Position_Exist == true)
      {
        player.Pos = Vector(Player_Pos[player.ID].X, Player_Pos[player.ID].Y, Player_Pos[player.ID].Z);
      }
      else MessagePlayer("I think you forgot to save a position ? :P xD", player, 255, 255, 33);

      return true
    }
    else MessagePlayer("You never spawned", player, 255, 0, 0);
  }

  //--------------------------------------------------------------------------
 
  return 1;
}
7  Scripting / Script Snippets / news system! on: June 11, 2017, 10:59:15 pm
Quote
function onPlayerJoin( pPlayer )
{
        NewTimer( "MessagePlayer", 24000, 0, "NEWS:- [#ed9121]Dont forget to add this server to your favourities!", pPlayer );
        NewTimer( "MessagePlayer", 20000, 0, "NEWS:- [#76ff7a]gta 3 multiplayer!", pPlayer );
        NewTimer( "MessagePlayer", 30000, 0, "NEWS:- [#ff033e]dont forget to register and login!", pPlayer );
        NewTimer( "MessagePlayer", 40000, 0, "NEWS:- [#e32636]go through cmds before playing!", pPlayer );
}

hope it will be helpfull..
8  Scripting / Script Snippets / /cd system on: June 11, 2017, 10:55:15 pm
Quote
else if ( szCommand == "cd" )
   {
   NewTimer( "BigMessage", 1000, 1, pPlayer ,"=3=" , 5000, 3 );
   NewTimer( "BigMessage", 2000, 1, pPlayer ,"=2=" , 5000, 3 );
   NewTimer( "BigMessage", 3000, 1, pPlayer ,"=1=" , 5000, 3 );
   NewTimer( "BigMessage", 4000, 1, pPlayer ,"=GO!=" , 5000, 3 );
   }
9  Scripting / Script Snippets / new wep system easy way on: June 11, 2017, 10:51:23 pm
Quote
function onPlayerCommand( pPlayer, szCommand, szArgs )
{
if ( szCommand == "cmds" )
   {
      MessagePlayer( "Current server commands are the following", pPlayer );
                MessagePlayer( "------------------wepcmds-------------------", pPlayer );
}
else if ( szCommand == "wepcmds" )
   {
       MessagePlayer( "------------Wepon Commands---------------", pPlayer );
                 MessagePlayer( "Syntax:-(/)use before wep name", pPlayer );
                 MessagePlayer( "Example:- /name of wep here", pPlayer );
                 MessagePlayer( "(/):- m16 colt shot gre uzi", pPlayer );
                 MessagePlayer( "----------------------------------------", pPlayer );
   }
else if ( szCommand == "m16" )
   {
      pPlayer.SetWeapon( 6 );
   }
   else if ( szCommand == "colt" )
   {
      pPlayer.SetWeapon( 2 );
   }
   else if ( szCommand == "shot" )
   {
      pPlayer.SetWeapon( 4 );
   }
   else if ( szCommand == "gre" )
   {
      pPlayer.SetWeapon( 11 );
   }
else if ( szCommand == "uzi" )
   {
      pPlayer.SetWeapon( 3 );
   }
}

Modify message
10  Servers / Advertise your server! / [0.1]Top Down City LC-MP Server on: March 20, 2017, 09:04:54 am


Server Name : TOP DOWN CITY LU-SERVER
Server Port : 2301
Current version: TDC
Owner : MRDK
Gamemode : ---DM---
Uptime :24hrs


COMMANDS:
register rules info wepcmds
login cd vcmds admins forum
script



REAL NAME: MEGA MIND
ingame nick: MRDK(OWNER)

OUR Website: https://sites.google.com/view/tdcs-org/home
OUR CLAN: http://tdkclan.smfnew2.com
OUR FACEBOOK PAGE: https://www.facebook.com/TDCVSMP/   
YOUTUBE: https://www.youtube.com/channel/UC2eTGoGsnz0sg7VDcBZggNQ

let me know in the forums if there are any bugs
Pages: [1]
© Liberty Unleashed Team.