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

#166
Support / Stat
Jan 25, 2016, 02:02 AM
HI now my databse is loaded and my register login function is also working but when i reconnect my all stats money and kills are back to 0 plzz help me and thanks in advance
#167
Support / Database constructor
Jan 24, 2016, 08:31 AM
Hi everyone
                    I am creating a server and i am stuck at a point can u guys plz help me i will e thankful can u tell me how to create databse frm this code constructor( playerName, dbGlobal )
   {
local query = ::QuerySQL( dbGlobal, "SELECT Cash, Bank, Kills, Deaths, Level, LastUsedIP FROM Accounts WHERE Name='" + playerName + "' AND NameLower='" + playerName.tolower() + "'" );
if( ::GetSQLColumnData( query, 5 ) )
{
Cash = ::GetSQLColumnData( query, 0 );
Bank = ::GetSQLColumnData( query, 1 );
Kills = ::GetSQLColumnData( query, 2 );
Deaths = ::GetSQLColumnData( query, 3 );
Level = ::GetSQLColumnData( query, 4 );
LastUsedIP = ::GetSQLColumnData( query, 5 );
}
::FreeSQLQuery( query );

        local q = ::QuerySQL( dbGlobal, "SELECT Played, Won, Lost FROM LMS WHERE Name='" + playerName.tolower() + "'" );
if( ::GetSQLColumnData( q, 2 ) )
{
     Played = ::GetSQLColumnData( q, 0 );
     Wins = ::GetSQLColumnData( q, 1 );
     Lost = ::GetSQLColumnData( q, 2 );
}
::FreeSQLQuery( q );
}

function Join( player ){
if( Level == 0 ){
::MessagePlayer( "Please register to play.", player );
::MessagePlayer( "Register with /register <password>", player );
}
else if( LastUsedIP == player.IP ){
Logged = true;
player.Cash = stats[ player.ID ].Cash;
::MessagePlayer( "Welcome back!", player );
}
else{
::MessagePlayer( "Please login to play.", player );
::MessagePlayer( "Login with /login <password>", player );
}
}

function Update( player, dbGlobal ){
::QuerySQL( dbGlobal, "UPDATE Accounts SET Cash=" + Cash + ", Bank=" + Bank + ", Kills=" + Kills + ", Deaths=" + Deaths + ", Level=" + Level + ", LastUsedIP='" + LastUsedIP + "' WHERE Name='" + player.Name + "' AND NameLower='" + player.Name.tolower() + "'" );
        ::QuerySQL( dbGlobal, "UPDATE LMS SET Lost=" + Lost + ", Played=" + Played + ", Won=" + Wins + " WHERE Name='" + player.Name.tolower() + "'" );
}
#168
General Discussion / HAndling
Jan 21, 2016, 02:25 AM
I want to ask about the folder in stores handling can i create myown handling file a new one if you do, what folder it should be and what should remain in the .cfg file itself or even xml
#169
Script Showroom / Re: Manhunt
Jan 20, 2016, 02:15 AM
Can someone correct the link the download link is not working
#170
Support / Admin Command
Jan 18, 2016, 06:00 PM
Hi guys i am making a server it has all admin commands accept to spawn a vehicle can someone tell me a admin command to spawn vehicles thanks in advance
#171
Support / Register/Login System
Jan 17, 2016, 04:12 PM
I am trying many codes for register login system but everything fails can u plz tell me code for it