I have this plugin:
Code:
#include <sourcemod>
#include <colors>
public Plugin:myinfo =
{
name = "[TF2] Modificacion de duelos!",
author = "Luqqas",
description = "Modifica el estilo de los miniduelos",
version = "1.0b",
url = "http://tf2cost.es.tl"
}
public OnPluginStart()
{
HookEvent("duel_status", duel_status, EventHookMode_Pre);
}
public Action:duel_status(Handle:event, const String:name[], bool:dontBroadcast)
{
new Iniciador = GetClientOfUserId( GetEventInt(event, "initiator"));
new Enemigo = GetClientOfUserId( GetEventInt(event, "target") );
decl String:DUELPLAYER[32];
GetClientName(Iniciador, DUELPLAYER, sizeof(DUELPLAYER));
decl String:DUELPLAYER2[32];
GetClientName(Enemigo, DUELPLAYER2, sizeof(DUELPLAYER2));
new Score1 = GetClientOfUserId( GetEventInt(event, "initiator_score") ) ;
new Score2 = GetClientOfUserId( GetEventInt(event, "target_score") ) ;
CPrintToChatAll("{blue}[HG]{default} {green}DUELO!{default} {blue}%s{default} : %s | {blue}%s{default} : %s.", DUELPLAYER, Score1, DUELPLAYER2 , Score2);
return Plugin_Handled;
}
Solved, change
Code:
new Score1 = GetClientOfUserId( GetEventInt(event, "initiator_score") ) ;
new Score2 = GetClientOfUserId( GetEventInt(event, "target_score") ) ;
to
Code:
new Score1 = GetEventInt(event, "initiator_score") ;
new Score2 = GetEventInt(event, "target_score") ;
snip-.
__________________