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.

Messages - FinchDon
1
Snippet Showroom / Random Numbers
« on September 28th, 2015, 04:18 PM »
Hello I just make a Snippet It is Easy But it will be liked by Newbies Because they don't know much about random

First Put this on ScriptLoad

Code: [Select]
tf <- [ "true", "false"];
password <- [ "mypass", "pass", "~", "password", "server", "editor", "@"];
weather <- [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ];
servername <- [ "VCCNR", "HP", "FBK's", "VU", "DM", "FF"];
maxplayers <- [ 1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 67, 77, 70, 100, 90, 80 ];
timerate <- [ 1000, 2000, 5000, 10000, 0, 1, 100000, 50000];
gm <- [ "v1.0", "VCCNR v1.2", "LW C++++ 1.2", "DM v2.0"];

Now Some Functions
Code: [Select]
function GetLevel( player )
{
   local lvl1 =  GetSQLColumnData( QuerySQL( sqliteDB, "SELECT Level FROM Accounts WHERE Name='" + player.Name+"'" ), 0 );
   if ( lvl1 ) return lvl1;
   else return 0;
}

Commands

Code: [Select]
if ( cmd == "commands")
{
PrivMessage( player, "Admin Commands");
PrivMessage( player, "timerate, friendlyfire, stuntbike, maxplayers, servername, setweather, stuntbike, serverpass, gamemode" );
}
else if (cmd == "timerate")
{
if ( GetLevel( player ) < 2 ) PrivMessage( player, "No!");
else
{
SetTimeRate(timerate[rand()% timerate.len()]);
Message( " " + player.Name + " set Time Rate : " + timerate[rand()% timerate.len()] + ".");
}
}
if ( cmd == "friendlyfire")
{
local ff = rand() % 2;
if ( GetLevel( player ) < 2 ) PrivMessage(player,"No!")
else if ( ff == 1 )
{
SetFriendlyFire(true)
Message(player.Name+" has set friendly fire true!");
}
else if ( ff == 2 )
{
SetFriendlyFire(false)
Message(player.Name+" has set friendly fire false!");
}
}
if ( cmd == "stuntbike")
{
local ff = rand() % 2;
if ( GetLevel( player ) < 2 ) PrivMessage(player,"No!")
else if ( ff == 1 )
{
SetStuntBike(true)
Message(player.Name+" has set Stunt Bike true!");
}
else if ( ff == 2 )
{
SetStuntBike(false)
Message(player.Name+" has set Stunt Bike false!");
}
}
else if (cmd == "setweather")
{
if ( GetLevel( player ) < 2 ) PrivMessage( player, "No!");
else
{
SetWeather(weather[rand()% weather.len()]);
Message( " " + player.Name + " set Weather : " + weather[rand()% weather.len()] + ".");
}
}
else if (cmd == "maxplayers")
{
if ( GetLevel( player ) < 2 ) PrivMessage( player, "No!");
else
{
SetMaxPlayers(maxplayers[rand()% maxplayers.len()]);
Message( " " + player.Name + " set Max Players : " + maxplayers[rand()% maxplayers.len()] + ".");
}
}
else if (cmd == "serverpass")
{
if ( GetLevel( player ) < 2 ) PrivMessage( player, "No!");
else
{
SetPassword(password[rand()% password.len()]);
Message( " " + player.Name + " set Server Pass : " + password[rand()% password.len()] + ".");
}
}
else if (cmd == "servername")
{
if ( GetLevel( player ) < 2 ) PrivMessage( player, "No!");
else
{
SetServerName(servername[rand()% servername.len()]);
Message( " " + player.Name + " set Server Name : " + servername[rand()% servername.len()] + ".");
}
}
else if (cmd == "gamemode")
{
if ( GetLevel( player ) < 2 ) PrivMessage( player, "No!");
else
{
SetGameModeName(gm[rand()% gm.len()]);
Message( " " + player.Name + " set Server Game Mode: " + gm[rand()% gm.len()] + ".");
}
}

Creator:FinchDon
Helper: Beztone Help in FriendlyFire

Here you go..
2
Scripting and Server Management / Re: Error GetTeam
« on September 28th, 2015, 03:55 PM »
Genius Tell me what is the problem i am facing!!!!!!!!
3
Off-Topic General / Re: FRee host
« on September 28th, 2015, 03:46 PM »
Why Did i think He can stole Script? Someone said me that i forgot who was he
4
Scripting and Server Management / Re: Error GetTeam
« on September 28th, 2015, 03:46 PM »
:/ Genius I want in DB!!!!!!! No Array
5
Off-Topic General / Re: off clan
« on September 28th, 2015, 03:45 PM »
Yeah Because I used this on my server

REMOVED
6
Scripting and Server Management / Re: Error GetTeam
« on September 28th, 2015, 03:35 PM »
Bhai Ye Fuzzie se baat kr iske bare me
7
Scripting and Server Management / Re: Error GetTeam
« on September 28th, 2015, 03:29 PM »
Wow I used sqliteDB in many places thats works but why not this?
8
Scripting and Server Management / Re: Error GetTeam
« on September 28th, 2015, 03:20 PM »
I dont have that function
9
Scripting and Server Management / Re: SetFriendlyFire
« on September 28th, 2015, 02:31 PM »
No!!! You didnt understand by me Then How can i made this

gamemode <- [ "hey", "fjs", " hd", "jd", " jd" ];



How to make now Command to Change Gamemode Randomally



[ "hey", "fjs", " hd", "jd", " jd" ]
10
Scripting and Server Management / Re: Error GetTeam
« on September 28th, 2015, 02:03 PM »
I Create Table By Opening Database I open Database and edit Accounts table and add There. Group NUMERIC
11
Snippet Showroom / Re: Race, Derby and Server name generator
« on September 28th, 2015, 01:40 PM »
Sorry For Bump but Server name generator how this code will change server name?
12
Scripting and Server Management / Re: SetFriendlyFire
« on September 28th, 2015, 01:38 PM »
Is There any other way?
13
Off-Topic General / Re: off clan
« on September 28th, 2015, 11:26 AM »
Hammad Part 2 or 3
14
Scripting and Server Management / Re: Error GetTeam
« on September 28th, 2015, 11:25 AM »
Ya I use That
Code: [Select]
if ( cmd == "a")
{
PrivMessage( player, " ahh " + GetTeam( player ) + ".");
}

But it too show Group 0 Where it is 2 in Database

Code: [Select]
function GetTeam( player )
{
   local lvl1 =  GetSQLColumnData( QuerySQL( sqliteDB, "SELECT Group FROM Accounts WHERE Name='" + player.Name+"'" ), 0 );
   if ( lvl1 ) return lvl1;
   else return 0;
}
15
Scripting and Server Management / SetFriendlyFire
« on September 28th, 2015, 11:19 AM »
Why its not working?

Code: [Select]
friendlyfire <- [ "true", "false"];

Command

Code: [Select]
if ( cmd == "friendlyfire")
{
local ff = friendlyfire[rand()% friendlyfire.len()]
if ( GetLevel( player ) < 2 ) PrivMessage( player, "No!");
else
{
   Error here >>>>> SetFriendlyFire(ff);
Message( " " + player.Name + " set Friendly Fire " + ff + ".");
}
}