#include < sourcemod >
#include < cstrike >
public Plugin myinfo =
{
name = "Revive",
author = "Anil Can",
description = "Ölü oyuncuları canlandırma",
version = "1.0",
url = "https://forum.webdiyo.com/newthread.php?fid=99"
}
public void OnPluginStart( )
{
RegAdminCmd( "sm_rev", Admn_Revive, ADMFLAG_SLAY, "Ölü oyuncuları revlemeniz sağlar" );
LoadTranslations( "respawn.phrases" );
LoadTranslations( "common.phrases" );
}
public Action Admn_Revive( int client, int args )
{
if( args < 1 )
{
ReplyToCommand( client, "<sm_rev> nick " );
return Plugin_Handled;
}
char arg[ 32 ], target_name[ MAX_NAME_LENGTH ], name[ MAX_NAME_LENGTH ];
int target_list[ MAXPLAYERS ], target_count;
bool tn_is_ml;
GetCmdArg( 1, arg, sizeof( arg ) );
if( ( target_count = ProcessTargetString( arg,
client,
target_list,
MAXPLAYERS,
COMMAND_FILTER_DEAD,
target_name,
sizeof( target_name ),
tn_is_ml ) ) <= 0 )
{
ReplyToTargetError( client, target_count );
return Plugin_Handled;
}
for( int i = 0; i < target_count; i++ )
{
CS_RespawnPlayer( target_list[ i ] );
}
GetClientName( client, name, sizeof( name ) );
if( tn_is_ml )
{
PrintToChatAll( "%t", "Revive", target_name, client );
}
else
{
PrintToChatAll( "%s %N yetkili tarafından canlandırıldı." );
}
return Plugin_Handled;
}