Still can't get it working really though.. Having some problems here. What am i doing wrong? I'm only getting "Player not found" message
PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < colorchat >
new const File[ ] = "addons/amxmodx/Reportlog.txt"
new const szPREFIX[ ] = "[AMXX]"
public plugin_init( )
{
register_plugin( "Report Player", "1.0", "BuckShot" )
register_clcmd( "say ", "PlayerReport" )
}
public PlayerReport( id )
{
new String[ 192 ], Command[ 10 ]
read_args( String, 191 )
remove_quotes( String )
strbreak( String, Command, 9, String, 191 )
if( !equali( Command, "/report" ) )
{
return;
}
new Name[ 32 ], Reason[ 154 ]
strbreak( String, Name, sizeof( Name ), Reason, 153 )
if(strlen(Name) == 0)
{
ColorChat( id, GREEN, "%s^x01 Example Usage:^x04 /Report ^"Michael^" ^"He is using Aimbot^"", szPREFIX )
return;
}
new Player = cmd_target( id, Name )
if( !Player )
{
ColorChat( id, GREEN, "%s^x01 Player not found", szPREFIX )
return;
}
if( strlen( Reason ) < 6)
{
ColorChat( id, GREEN, "%s^x01 Please supply more information about the player", szPREFIX )
return;
}
ColorChat( id, GREEN, "%s^x01 Thank you! Your abuse report has been recieved", szPREFIX )
new szName[ 32 ], szAuthid[ 32 ], szOutput[ 300 ]
get_user_name( Player, szName, 31 )
get_user_authid( Player, szAuthid, 31 )
formatex( szOutput, 299, "Name: %s^n SteamID: %s^n Reason: %s^n", szName, szAuthid, Reason )
write_file( File, szOutput, -1 )
}
__________________