Raised This Month: $ Target: $400
 0% 

[Request] So cool script . Can anyone teach ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
parerak
Junior Member
Join Date: Oct 2015
Old 12-02-2015 , 08:06   [Request] So cool script . Can anyone teach ?
Reply With Quote #1

Can anyone tell how to do it ?

Admin last seen : http://128.199.72.136/index.php

Anyone know is it a script of something else ?

I need it badly

Server IP is : 128.199.72.1363333
parerak is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 12-03-2015 , 17:16   Re: [Request] So cool script . Can anyone teach ?
Reply With Quote #2

Quote:
Originally Posted by parerak View Post
Can anyone tell how to do it ?
The plugin is most likely not public.

Anyways it saves the admins data in a SQL and prints it out in the website using basic PHP code.
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
milutinke
AlliedModders Donor
Join Date: Jun 2012
Location: Serbia
Old 12-04-2015 , 10:24   Re: [Request] So cool script . Can anyone teach ?
Reply With Quote #3

I will make it for personal usage but i will share it on forum
milutinke is offline
Send a message via Skype™ to milutinke
milutinke
AlliedModders Donor
Join Date: Jun 2012
Location: Serbia
Old 12-06-2015 , 18:00   Re: [Request] So cool script . Can anyone teach ?
Reply With Quote #4

Can someone test it, i wrote this using my mobile phone

AMXX:
PHP Code:
#include < amxmodx >
#include < sqlx >

enum _:StructPlayerInfo {
    
g_szSteamID32 ],
    
g_szName32 ],
    
g_szIp20 ],
    
    
g_iPlayerId,
    
g_iPlayedTime
}

enum _:StructCvars {
    
g_szCvarHost,
    
g_szCvarUser,
    
g_szCvarPwd,
    
g_szCvarDb
}

new 
g_szCvarsStructCvars ][ ][ ] = {
    
//  Name            Value
    
{    "aat_host",        "localhost"  },
    {     
"aat_user",        "root"        },
    {    
"aat_pwd",        "root"        },
    {     
"aat_db",        "root"        }
};

new 
g_szCvarDataStructCvars ][ 64 ];
new 
g_iCvarDataStructCvars ];
new 
Handleg_hSqlConnection;
new 
g_iMaxPlayers;

new 
g_PlayerInfo33 ][ StructPlayerInfo ];

public 
plugin_init( ) {
    
register_plugin"Admin Activity Tracker""1.0""Milutinke (ByM)" );
    
    
g_iMaxPlayers get_maxplayers( );
    
    for( new 
0sizeofg_szCvars[ ] ); i++ ) {
        
g_iCvarData] = register_cvarg_szCvars][ ], g_szCvars][ ] );
        
get_cvar_stringg_iCvarData], g_szCvarData], charsmaxg_szCvarData[ ] ) );
    }
    
    
g_hSqlConnection SQL_MakeDbTupleg_szCvarDatag_szCvarHost ], g_szCvarDatag_szCvarUser ], g_szCvarDatag_szCvarPwd ], g_szCvarDatag_szCvarDb ] );
}

public 
plugin_end( ) {
    
SQL_FreeHandleg_hSqlConnection );
}    

public 
client_putinserveriPlayer ) {
    if( 
is_user_botiPlayer ) )
        return;
        
    
get_user_authidiPlayerg_PlayerInfoiPlayer ][ g_szSteamID ], charsmaxg_PlayerInfo[ ][ g_szSteamID ] ) );
    
get_user_nameiPlayerg_PlayerInfoiPlayer ][ g_szName ], charsmaxg_PlayerInfo[ ][ g_szName ] ) );
    
get_user_ipiPlayerg_PlayerInfoiPlayer ][ g_szIp ], charsmaxg_PlayerInfo[ ][ g_szIp ] ), );
    
    
PlayerHasConnectediPlayer );
}

public 
client_disconnectiPlayer ) {
    if( 
is_user_botiPlayer ) )
        return;
        
    
PlayerHasDisconnectediPlayer );
}

public 
PlayerHasConnectediPlayer ) {
    if( !
is_user_connectediPlayer ) || !( <= iPlayer <= g_iMaxPlayers ) )
        return;
        
    new 
szQuery128 ];
    
formatexszQuerycharsmaxszQuery ), "SELECT `Id`, `PlayedTime` FROM `aatdb` WHERE `SteamID` = '%s'"g_PlayerInfoiPlayer ][ g_szSteamID ] );
    
    new 
iData];
    
iData] = iPlayer;
    
    
SQL_ThreadQueryg_hSqlConnection"HandlePlayerConnect"szQueryiData);
}

public 
HandlePlayerConnectiFailStateHandlehQueryszError[ ], iErroriData[ ], iSizeFloatflQueueTime ) {
    if( 
SQL_IsFailiFailStateiErrorszError ) ) {
        return;
    }
    
    new 
iPlayer iData];
    if( !
is_user_connectediPlayer ) || !( <= iPlayer <= g_iMaxPlayers ) )
        return;
    
    if( 
SQL_NumResultshQuery ) ) {
        
g_PlayerInfoiPlayer ][ g_iPlayerId ] = SQL_ReadResulthQuery);
        
g_PlayerInfoiPlayer ][ g_iPlayedTime ] = SQL_ReadResulthQuery);
        
        
SQL_QueryMe_"UPDATE `aatdb` SET `Online` = '1', `Nick` = '%s', `Ip` = '%s' WHERE `Id` = '%d'"g_PlayerInfoiPlayer ][ g_szName ], g_PlayerInfoiPlayer ][ g_szIp ], g_PlayerInfoiPlayer ][ g_iPlayerId ] );
    }
    else {
        new 
szQuery128 ], szDate32 ];
        
get_time"%m.%d.%Y - %H:%M"szDatecharsmaxszDate ) );
        
        
formatexszQuerycharsmaxszQuery ), "INSERT INTO `aatdb` (`SteamID`, `LastConnection`, `Nick`, `Ip`, `Online`, `PlayedTime`) VALUES ('%s', '%s', '%s', '%s', '1', '0')"g_PlayerInfoiPlayer ][ g_szSteamID ], szDateg_PlayerInfoiPlayer ][ g_szName ], g_PlayerInfoiPlayer ][ g_szIp ] );
        
        
SQL_ThreadQueryg_hSqlConnection"HandlePlayerInsert"szQueryiData);
    }
}

public 
HandlePlayerInsertiFailStateHandlehQueryszError[ ], iErroriData[ ], iSizeFloatflQueueTime ) {
    if( 
SQL_IsFailiFailStateiErrorszError ) ) {
        return;
    }
    
    new 
iPlayer iData];
    if( !
is_user_connectediPlayer ) || !( <= iPlayer <= g_iMaxPlayers ) )
        return;
        
    
g_PlayerInfoiPlayer ][ g_iPlayerId ] = SQL_GetInsertIdhQuery );
    
g_PlayerInfoiPlayer ][ g_iPlayedTime ] = 0;
}

public 
PlayerHasDisconnectediPlayer ) {
    
SQL_QueryMe_"UPDATE `aatdb` SET `PlayedTime` = '%d', `Score` = '%d', `Online` = '0' WHERE `Id` = '%d'"get_user_timeiPlayer ) + g_PlayerInfoiPlayer ][ g_iPlayedTime ], get_user_fragsiPlayer ), g_PlayerInfoiPlayer ][ g_iPlayerId ] );
}

//Following code is taken from xPawn plugins (Saved 5 minute of work xD)
public HandleQueryiFailStateHandlehQueryszError[ ], iErrorszData[ ], iSizeFloatflQueueTime ) {
    
SQL_IsFailiFailStateiErrorszError );
}

SQL_QueryMeszHandle[ ] = "HandleQuery", const szQuery[ ], any:... ) {
    new 
szMessage256 ];
    
vformatszMessage255szQuery);
    
    
SQL_ThreadQueryg_hSqlConnectionszHandleszMessage );
}

stock boolSQL_IsFail( const iFailState, const iError, const szError[ ] ) {
    if( 
iFailState == TQUERY_CONNECT_FAILED ) {
        
server_print"[ByM] Could not connect to SQL database: %s"szError );
        
log_to_file"SQL_Error.txt""[ByM] Could not connect to SQL database: %s"szError );
        return 
true;
    }
    else if( 
iFailState == TQUERY_QUERY_FAILED ) {
        
server_print"[ByM] Query failed: (%i) %s"iErrorszError );
        
log_to_file"SQL_Error.txt""[ByM] Could not connect to SQL database: %s"szError );
        return 
true;
    }
    
    return 
false;

SQL:
Code:
CREATE TABLE IF NOT EXISTS `aatdb` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `SteamID` varchar(32) NOT NULL DEFAULT '',
  `Nick` varchar(64) NOT NULL DEFAULT '',
  `Ip` varchar(32) NOT NULL DEFAULT '',
  `Online` int(11) NOT NULL DEFAULT '0',
  `PlayedTime` int(11) NOT NULL DEFAULT '0',
  `LastConnection` varchar(64) NOT NULL DEFAULT '',
  `Score` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`Id`),
  UNIQUE KEY `SteamID` (`SteamID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Last edited by milutinke; 12-07-2015 at 14:51.
milutinke is offline
Send a message via Skype™ to milutinke
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-06-2015 , 18:32   Re: [Request] So cool script . Can anyone teach ?
Reply With Quote #5

Wrote that on your phone? Why would you bother, just wait until you get behind a pc lol
__________________

Last edited by Bugsy; 12-06-2015 at 18:32.
Bugsy is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-06-2015 , 22:21   Re: [Request] So cool script . Can anyone teach ?
Reply With Quote #6

I don't believe the claim unless it took hours to do it.
__________________
fysiks is offline
Darkness_
Veteran Member
Join Date: Nov 2014
Old 12-07-2015 , 03:15   Re: [Request] So cool script . Can anyone teach ?
Reply With Quote #7

I'd rather take 2 consecutive SAT's than type all of that on my phone - there's just no way anyone would do that for someone on the forums.
Darkness_ is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 12-07-2015 , 05:09   Re: [Request] So cool script . Can anyone teach ?
Reply With Quote #8

lol, when the crazinnes will stop on this forum...
Depresie is offline
milutinke
AlliedModders Donor
Join Date: Jun 2012
Location: Serbia
Old 12-07-2015 , 14:40   Re: [Request] So cool script . Can anyone teach ?
Reply With Quote #9



Most of the time I am bored at school, so i usualy write plugins.
Half of my plugins are written on my phone xD
By the way credits to xPawn for stocks: SQL_QueryMe and SQL_IsFail (Saved me 5 minutes of work xD)

@Darkness_: I need tis plugin too so i wrote it

Last edited by milutinke; 12-07-2015 at 14:50.
milutinke is offline
Send a message via Skype™ to milutinke
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 12-07-2015 , 16:17   Re: [Request] So cool script . Can anyone teach ?
Reply With Quote #10

What's the app are you using?

Anyways, I think you need help for web script, right?
baneado is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode