Menu

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 Menu

Messages - FinchDon

#1
Snippet Showroom / Random Numbers
Sep 28, 2015, 03: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

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
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

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
Genius Tell me what is the problem i am facing!!!!!!!!
#3
Off-Topic General / Re: FRee host
Sep 28, 2015, 02:46 PM
Why Did i think He can stole Script? Someone said me that i forgot who was he
#4
:/ Genius I want in DB!!!!!!! No Array
#5
Off-Topic General / Re: off clan
Sep 28, 2015, 02:45 PM
Yeah Because I used this on my server

REMOVED
#6
Bhai Ye Fuzzie se baat kr iske bare me
#7
Wow I used sqliteDB in many places thats works but why not this?
#8
I dont have that function
#9
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
I Create Table By Opening Database I open Database and edit Accounts table and add There. Group NUMERIC
#11
Sorry For Bump but Server name generator how this code will change server name?
#12
Is There any other way?
#13
Off-Topic General / Re: off clan
Sep 28, 2015, 10:26 AM
Hammad Part 2 or 3
#14
Ya I use That
if ( cmd == "a")
{
PrivMessage( player, " ahh " + GetTeam( player ) + ".");
}

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

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
Why its not working?

friendlyfire <- [ "true", "false"];
Command

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 + ".");
}
}