Raised This Month: $51 Target: $400
 12% 

Problems with 'duels_status'


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 07-09-2011 , 18:21   Problems with 'duels_status'
Reply With Quote #1

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-.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.

Last edited by lucas_7_94; 07-09-2011 at 18:36.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-09-2011 , 18:39   Re: Problems with 'duels_status'
Reply With Quote #2

I almost post same answer

*edit
You have still %s instead %i on those scores
Code:
    CPrintToChatAll("{blue}[HG]{default} {green}DUELO!{default} {blue}%s{default} : %s | {blue}%s{default} : %s.", DUELPLAYER, Score1, DUELPLAYER2 , Score2);

Last edited by Bacardi; 07-09-2011 at 18:42.
Bacardi is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode