Pues estaba viendo un plugin Bonus de Vida por Cada HeadShot (Que diseño Geoslide) y le quiero agregar que mande un mensaje al jugador que diga "HEADSHOT". y que sea solo para Ct's
Aqui el plugin:
PHP Code:
#include <amxmodx>
#include <fun>
public plugin_init( )
{
new const PLUGININFO[ ][ ] = { "HP ON KILL", "X", "Geoslide" }
register_plugin( PLUGININFO[ 0 ], PLUGININFO[ 1 ], PLUGININFO[ 2 ] )
register_event( "DeathMsg", "Death_MSG", "a" )
}
public Death_MSG( )
{
new hs;hs = read_data( 3 )
new at;at = read_data( 1 )
if( hs )
set_user_health( at, get_user_health( at ) + 10 )
}
Cuando le agrego en el if el:
PHP Code:
client_print(id, print_chat, "HeadShot: +10 HP")
Me salta error :S y al final quiero que todo quede asi:
PHP Code:
#include <amxmodx>
#include <fun>
public plugin_init( )
{
new const PLUGININFO[ ][ ] = { "HP ON KILL", "X", "Geoslide" }
register_plugin( PLUGININFO[ 0 ], PLUGININFO[ 1 ], PLUGININFO[ 2 ] )
register_event( "DeathMsg", "Death_MSG", "a" )
}
public Death_MSG( )
{
new hs;hs = read_data( 3 )
new at;at = read_data( 1 )
if( hs && (team==CS_TEAM_CT) )
{
set_user_health( at, get_user_health( at ) + 10 )
client_print(id, prin_chat, "HEADSHOT")
}
}