Posted by: Davut^
« on: January 19, 2018, 08:17:56 pm »
Hi guys there is script to check stats
Paste this at section (function onPlayerCommands)
else if ( cmd == "stats" )
{
if ( Logged == true )
{
local q = QuerySQL( accounts, "SELECT * FROM playeraccounts WHERE Name='"+player.Name+"'" );
local a = GetSQLColumnData( q, 3 )
local b = GetSQLColumnData( q, 4 )
Message( "[#ffffff][INFO]Dear [#00ff00]" + player + " [#ffffff]Your [#00CC00]Kills[#ffffff]:[#FD0F0F]" + a + "" );
MessagePlayer( "[#ffffff][INFO][PM]Dear [#00ff00]" + player + " [#ffffff]Your [#00CC00]Kills[#ffffff]:[#00CC00]" + a + " [#ffffff]Yor [#FD0F0F]Deaths:[#FD0F0F]" + b + "" , player );
}
else if ( Logged == false )
{
MessagePlayer( "[#ffffff][INFO][PM][#FD0F0F]You Need To log in My Friend if you don't your stats are wastage." , player );
}
}Next part status
else if ( cmd == "status" )
{
if ( !player.Spawned )
{
MessagePlayer( "[#fffff][INFO][PM]You need to spawn to use this cmd" , player );
}
else if ( player.Spawned )
{
local q = QuerySQL( accounts, "SELECT * FROM playeraccounts WHERE Name='"+player.Name+"'" );
local a = GetSQLColumnData( q, 2 )
local b = GetSQLColumnData( q, 3 )
local c = GetSQLColumnData( q, 4 )
local d = GetSQLColumnData( q, 5 )
Message( "[#ffffff][INFO]Status of " + player + " is:" );
Message( "[#ffffff]Health:" + player.Health + "" );
Message( "[#ffffff]Cash:" + a + "" );
Message( "[#ffffff]Kills:" + b + "" );
Message( "[#ffffff]Deaths:" + c + "" );
Message( "[#ffffff]Level:" + d + "" );
}
}