hi works perfectly for me... but i wish to chance the colours of the chatsau with multiple colours in one string
i have change it for my liking and recomplie it with the newest complier...
can any1 say me where is the error?
Code:
#include <sourcemod>
#include <sdktools>
#define PLUGIN_AUTHOR "tuty"
#define PLUGIN_VERSION "1.1"
#pragma semicolon 1
new Handle:gPluginEnabled = INVALID_HANDLE;
public Plugin:myinfo =
{
name = "Resetscore",
author = PLUGIN_AUTHOR,
description = "Type !resetscore in chat to reset your score.",
version = PLUGIN_VERSION,
url = "www.ligs.us"
};
public OnPluginStart()
{
RegConsoleCmd( "say", CommandSay );
RegConsoleCmd( "say_team", CommandSay );
gPluginEnabled = CreateConVar( "sm_resetscore", "1" );
CreateConVar( "resetscore_version", PLUGIN_VERSION, "Reset Score", FCVAR_PLUGIN | FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY );
}
public Action:CommandSay( id, args )
{
decl String:Said[ 128 ];
GetCmdArgString( Said, sizeof( Said ) - 1 );
StripQuotes( Said );
TrimString( Said );
if( StrEqual( Said, "!retry" ) || StrEqual( Said, "!resetmyscore" ) )
{
if( GetConVarInt( gPluginEnabled ) == 0 )
{
PrintToChat( id, "\x03[SM Resetscore] The plugin is disabled." );
PrintToConsole( id, "[SM Resetscore] You can't use this command when plugin is disabled!" );
return Plugin_Continue;
}
if( !IsPlayerAlive( id ) )
{
PrintToChat( id, "\x05[\x01ResetMyScore\x05]\x01: \x04Du kannst diesen Befehl nicht benutzen wenn du tot bist." );
PrintToConsole( id, "[ResetMyScore]: Du kannst diesen Befehl nicht benutzen wenn du tot bist." );
return Plugin_Continue;
}
if( GetClientDeaths( id ) == 0 && GetClientFrags( id ) == 0 )
{
PrintToChat( id, "\x05[\x01ResetMyScore\x05]\x01: \x04Dein Score ist bereits auf 0!" );
PrintToConsole( id, "[ResetMyScore]: Dein Score ist bereits auf 0!" );
return Plugin_Continue;
}
SetClientFrags( id, 0 );
SetClientDeaths( id, 0 );
decl String:Name[ 32 ];
GetClientName( id, Name, sizeof( Name ) - 1 );
PrintToChat( id, "\x05[\x01ResetMyScore\x05]\x01: \x04Dein Score wurde erfolgreich zurückgesetzt!" );
PrintToChatAll( "\x05[\x01ResetMyScore\x05]\x01: \x02% \x01hat seinen Score resettet.", Name );
PrintToConsole( id, "[ResetMyScore]: Dein Score wurde erfolgreich zurückgesetzt!" );
}
return Plugin_Continue;
}
stock SetClientFrags( index, frags )
{
SetEntProp( index, Prop_Data, "m_iFrags", frags );
return 1;
}
stock SetClientDeaths( index, deaths )
{
SetEntProp( index, Prop_Data, "m_iDeaths", deaths );
return 1;
}
it would be nice when someone change the code so that it works with my colours ;D
thx
__________________