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

#166
function CreateTables()
{
QuerySQL(db, "CREATE TABLE IF NOT EXISTS Accounts ( Name VARACHAR(225), LastIPUsed VARACHAR(20), Level NUMERIC, Password VARACHR(255), Kills NUMERIC, Deaths NUMERIC, Cash NUMERIC, Bank NUMERIC, Joins NUMERIC, Datereg TEXT, Randspawn TEXT, Nogoto TEXT, VIPLevel NUMERIC)" );
QuerySQL(db, "CREATE TABLE IF NOT EXISTS Bans ( Name VARCHAR(32), IP VARCHAR(25), Admin TEXT, Reason TEXT )" );
        QuerySQL(db, "CREATE TABLE IF NOT EXISTS Tempban( ban_nick TEXT, ban_ip TEXT, ban_time TEXT, ban_expire TEXT, ban_expireratio TEXT, ban_admin TEXT, ban_reason TEXT )" );
        QuerySQL(db, "CREATE TABLE IF NOT EXISTS lastjoin ( Name TEXT, Time NUMERIC )" );
QuerySQL(db, "CREATE TABLE IF NOT EXISTS Spawnwep ( Name TEXT, Wep NUMERIC, Wep2 NUMERIC, Wep3 NUMERIC, Wep4 NUMERIC )" );
QuerySQL(db, "CREATE TABLE IF NOT EXISTS Spawnloc ( Name VARACHAR(255), Position FLOAT )" );
QuerySQL(db, "CREATE TABLE IF NOT EXISTS Locations( Name VARACHAR(255), Loc TEXT, Position FLOAT)" );
QuerySQL(db, "CREATE TABLE IF NOT EXISTS Alias ( Name TEXT, IP VARCHAR(20), UID TEXT )" );
QuerySQL(vdb, "CREATE TABLE IF NOT EXISTS Vehicles ( Model INT, World INT, Posangle FLOAT, color INT)" );
QuerySQL(db, "CREATE TABLE IF NOT EXISTS ClanMembers ( Clan TEXT, Owner TEXT, Leader1 TEXT, Leader2 TEXT, Leader3 TEXT, Users TEXT  )" );
QuerySQL(db, "CREATE TABLE IF NOT EXISTS ClanStats ( Tag TEXT, Clan TEXT, Kills NUMERIC DEFAULT 0, Deaths NUMERIC DEFAULT 0, Deads NUMERIC DEFAULT 0 )" );
QuerySQL(db, "CREATE TABLE IF NOT EXISTS ClanMembersRequest ( Player TEXT, Tag TEXT, Clan TEXT, State TEXT )" );
QuerySQL(db, "CREATE TABLE IF NOT EXISTS ClanReports ( Clan TEXT, Member TEXT, Reporter TEXT, Reason TEXT, Date_Of_Report TEXT )" );
       

//Reports Table
QuerySQL(db, "CREATE TABLE IF NOT EXISTS Reports ( Reporter VARACHAR(255), Player VARACHAR(255), Reason TEXT, Date TEXT )" );

// Badges Table
QuerySQL(db, "CREATE TABLE IF NOT EXISTS Badges( Name VARACHAR(255), Badge TEXT )" );

//Alters the Accounts table.
QuerySQL(db, "ALTER TABLE Accounts ADD UID VARACHAR(255)" ); //13
QuerySQL(db, "ALTER TABLE Accounts ADD Gems VARACHAR(255)" ); //14
QuerySQL(db, "ALTER TABLE Accounts ADD GemsRange VARACHAR(255)" ); //15
QuerySQL(db, "ALTER TABLE Accounts ADD VehiclesOwned NUMERIC " ); //16
QuerySQL(db, "ALTER TABLE Accounts ADD Clan TEXT " ); //17
        QuerySQL(db, "ALTER TABLE Accounts ADD Headshots NUMERIC DEFAULT 0" ); //18
        QuerySQL(db, "ALTER TABLE Accounts ADD Timeplayed NUMERIC DEFAULT 0" ); //19
QuerySQL(db, "ALTER TABLE Accounts ADD Cskinowner TEXT DEFAULT false" ); //20
       
       

// Alters Vehicles Table
QuerySQL(vdb, "ALTER TABLE Vehicles ADD VehOwner TEXT " );
QuerySQL(vdb, "ALTER TABLE Vehicles ADD VehCost NUMERIC " );
QuerySQL(vdb, "ALTER TABLE Vehicles ADD SharedWith VARACHAR(255) " );
QuerySQL(vdb, "ALTER TABLE Vehicles ADD VehID NUMERIRC" );
}
#167
Quote from: ! on Dec 19, 2017, 01:08 PM
Quote from: umar4911 on Dec 19, 2017, 07:43 AMUse this
function Register( player, password )
{
 QuerySQL(db, "INSERT INTO Accounts ( Name, LastIPUsed, Level, Password, Kills, Deaths, Cash, Bank, Joins, Datereg, Randspawn, Nogoto, VIPLevel, UID, Gems, GemsRange, VehiclesOwned, Clan, Headshots, Timeplayed, Cskinowner ) VALUES ( '"+player.Name+"', '"+player.IP+"', '1', '"+password+"', '0', '0', '0', '0', '0', '"+GetFullTime()+"', 'off', 'off', '0', '"+player.UID+"', '0', '0', '0', 'none', '0', '0', 'false' )" );

}

http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/Player.UniqueID
Its strange in Alias its showing the Clear Uniqe ID ( not null0xx ) but in accounts its bug
anyways iam using the same
+ player.UniqueID
#168
Well its seems hard for me to learn about GUI. Become more better if someone made a video and guide newbies
Like i don't really understand about these some lines
When i change ""Gems: 0"; " to "Gems: 1"; It shows the value 1  which mean GUI is not reading value from DB.


Look at the bottom what's the use of

Gems: " + ::sClientGems ;
#169
Quote from: umar4911 on Dec 19, 2017, 07:43 AMUse this
function Register( player, password )
{
 QuerySQL(db, "INSERT INTO Accounts ( Name, LastIPUsed, Level, Password, Kills, Deaths, Cash, Bank, Joins, Datereg, Randspawn, Nogoto, VIPLevel, UID, Gems, GemsRange, VehiclesOwned, Clan, Headshots, Timeplayed, Cskinowner ) VALUES ( '"+player.Name+"', '"+player.IP+"', '1', '"+password+"', '0', '0', '0', '0', '0', '"+GetFullTime()+"', 'off', 'off', '0', '"+player.UID+"', '0', '0', '0', 'none', '0', '0', 'false' )" );

}
Sorry not Work
#170
When i register it shows Null on uniqid



here's the functio

function Register( player, password )
{
QuerySQL(db, "INSERT INTO Accounts ( Name, LastIPUsed, Level, Password, Kills, Deaths, Cash, Bank, Joins, Datereg, Randspawn, Nogoto, VIPLevel, UID, Gems, GemsRange, VehiclesOwned, Clan, Headshots, Timeplayed, Cskinowner ) VALUES ( '"+player.Name+"', '"+player.IP+"', '1', '"+password+"', '0', '0', '0', '0', '0', '"+GetFullTime()+"', 'off', 'off', '0', '"+player.UniqueID+"', '0', '0', '0', 'none', '0', '0', 'false' )" );

}
#171
Hello one of my friend put a function name GUI. Most of you guys aware about it . So the problem is its not showing the value in server
Like if i have 1 Gems on my db. It won't show 1 the value remain 0 nor it update.

/*
Scripted by: Doom_Kill3R
P.S: Hello Wireshark users!
*/

// Screen
sW <- GUI.GetScreenSize().X;
sH <- GUI.GetScreenSize().Y;

// Constants
const C_SERVER_NAME = "Grand Theft Auto San Fierro";

// Globals
sClientLevel <- "Rank: Member";
sClientGems <- null;
LabelGems_ClientLabel <- null;
Label_ClientLabel <- null;
Label_ServerName <- null;

function Script::ScriptLoad()
{


::LabelGems_ClientLabel <- GUILabel( VectorScreen( 0, sH * 0.95 ), Colour( 221, 17, 0 ), "Gems: 0");
local TextWidth = ::LabelGems_ClientLabel.Size.X * 6;
::LabelGems_ClientLabel.Position.X = sW - TextWidth;
::LabelGems_ClientLabel.FontFlags = GUI_FFLAG_BOLD;
::LabelGems_ClientLabel.TextAlignment = GUI_ALIGN_LEFT;
::LabelGems_ClientLabel.FontSize = 15;


::Label_ClientLabel <- GUILabel( VectorScreen( 0, sH * 0.95 ), Colour( 0, 255, 22 ), "Rank: Member" );
local TextWidth = ::Label_ClientLabel.Size.X * 2;
::Label_ClientLabel.Position.X = sW - TextWidth;
::Label_ClientLabel.FontFlags = GUI_FFLAG_BOLD;
::Label_ClientLabel.TextAlignment = GUI_ALIGN_LEFT;
::Label_ClientLabel.FontSize = 15;

        Label_ServerName <- GUILabel( VectorScreen( 0, sH * 0.95 ), Colour( 255, 255, 0 ), C_SERVER_NAME );
Label_ServerName.FontFlags = GUI_FFLAG_BOLD;
Label_ServerName.TextAlignment = GUI_ALIGN_LEFT;
Label_ServerName.FontSize = 16;


}


function Server::ServerData( stream ) {
switch( stream.ReadInt() ) {
case 0:
{
::sClientLevel = stream.ReadString();
::Label_ClientLabel.Text = "Rank: " + ::sClientLevel;

local TextWidth = ::Label_ClientLabel.Size.X * 2;
::Label_ClientLabel.Position.X = sW - TextWidth;
break;
}
case 1:
{
::sClientGems = stream.ReadInt();
::LabelGems_ClientLabel.Text = "Gems: " + ::sClientGems ;

local TextWidth = ::LabelGems_ClientLabel.Size.X * 6;
::LabelGems_ClientLabel.Position.X = sW - TextWidth;
      break;
}
}
}
#172
Support / Re: script not updating DATABASE
Dec 06, 2017, 05:06 AM
Quote from: Mohamed on Dec 05, 2017, 06:30 PMP.S Your English RAPED.
Like You did master in inglish
#173
Support / Re: script not updating DATABASE
Dec 05, 2017, 02:23 PM
Rip this forum man nobodys helping me
#174
Support / script not updating DATABASE
Dec 05, 2017, 09:31 AM
Hello iam trying to add gems on my script

ok to save gems stats my friend use savestats function which mean if the player left the server, script store his info ( gems ) into database
Quotefunction SaveStatus( player )
{
   QuerySQL(db, "UPDATE Accounts SET Gems = '"+status[ player.ID ].Gems+"', GemsRange = '"+status[ player.ID ].GemsRange+ "' WHERE Name = '"+ player.Name +"'");
   print( "saved status of player: "+player.Name+"." );
}

but i remove the savestats function and add this

Quotefunction IncGems( player )
{
   
        local Calc = PlayerGems( player ) + 1;
        local query1 = format( "UPDATE Account SET Gems=%i WHERE Name='" + player.Name +"'", Calc );
        QuerySQL( db, query1 );
   
}
function PlayerGems( player )
{
    local name = player.Name;
    local Answer = QuerySQL( db, "SELECT Kills, Deaths, Joins, Gems FROM Account WHERE Name='" + player.Name +"' COLLATE NOCASE" );
    local Gems = GetSQLColumnData( Answer, 0 );
    if ( !Gems ) return 0;
    else return Gems;
    FreeSQLQuery( Answer );
}

But the script is not updating the gems value in db also what is the use of this value

Quotelocal Gems = GetSQLColumnData( Answer, 0 );

why we put the 0 ?. I saw on my cash function it was 2

#175
Support / Re: IRC Suggest kindly help FBS
Dec 02, 2017, 01:10 PM
nop
Quote from: Xmair on Dec 02, 2017, 12:41 PMDoes it show any error?
NO it just not loading the irc
#176
Support / Re: IRC Suggest kindly help FBS
Dec 01, 2017, 06:34 PM
Hello ?
#177
Support / IRC Suggest kindly help FBS
Dec 01, 2017, 12:39 PM
Hi my friend script a server for me and he put irc which i dunno. Its not FBS i had FBS IRC Script with many admins command and i want to add it.Direct copy paste not work for me i mean dont conenct to irc. Script is loading but not connecting to IRC
so please suggest me about it

IRc coding something like
Quoteconst BotName       =   "blaht";         // The Botname

const NickServ      =   "";            // The NickServ Password

const server      =   "91.121.134.5";         // Server Ip
const port      =    6667;            // Server port

const chan      =   "#blah";         // Home channel
const pass      =   "";            // Channel password

const PREFIX      =   "!";            // The command prefix.

and i want this whic is FBS

Quote// IRC
const FBS_NICK = "blah"; // The name of the echo bot
const FBS_BPASS = "123123"; // The NickServ password of the echo bot
const FBS_SERVER = "94.23.157.172"; // The numerical ip of the irc server - this will join irc.nl.project-apollo.co.uk
const FBS_PORT = 6667;   // The port for that irc server
const FBS_CHAN = "#blah"; // The channel that you wont your echo bot to join
const FBS_CPASS = ""; // The password for that channel, if there isnt one leave it as "".
const FBS_ACHAN = "#blah";
const FBS_APASS = "blah";
Actlly its connecting to my other script ( previous one ) but not connecting to new one ( script by my friend )
#178
Bugs and Crashes / Login system bugged
Nov 26, 2017, 07:31 PM
Hello i an facing some problem with login cmd
when i give my passwords it gives this error



and here's the line 55

#179
Support / Re: screen is terminating help ?
Nov 20, 2017, 05:13 PM
Quote from: Cool on Nov 20, 2017, 04:15 PMkillall screen
then try to run again
Not work
#180
Support / Re: Two problems with Linux VPS.
Nov 20, 2017, 04:55 PM
Quote from: EK.IceFlake on Nov 18, 2017, 06:54 AMType these commands in the server's directory to not use root

adduser vcmp
(use anything secure for password, you can leave everything else blank)
chown vcmp ./* -R
echo 'sudo -u vcmp ./mpsvrrel64' > start.sh
chmod 770 start.sh

Type this command to shut down all instances of VCMP (do this only once) so that your current server closes and does not use port 5192
pkill mpsvrrel64

To start the server:

tmux

cd server-dir
Replace server-dir with the location of your server
./start.sh
Press CTRL+B D (CTRL+B first, release all keys, D)

To close the server:
tmux attach
Press CTRL+C
exit
At least tell me to install "tmux". i got fu*(& and reinstall my vps and lose my script -.

anyways its not work its says screen is terminating