frags - minutes, deaths - seconds

Started by RusL1k
10/09/2008 07:54
Page 1 of 2
RusL1k10/09/2008 07:54

Help to find a plug-in for kreedz a server : When player finishes map time is replaced with frags/deaths (frags - minutes, deaths - seconds)
screen : [IMG]http://img233.imageshack.us/img233/3231/adadasdsayi3.th.jpg[/IMG]

ButtH3ad10/09/2008 09:25

impossible

cC|SpiNe10/09/2008 09:28

I've seen a plugin where the player completes the map in the best time gets moved to the top of the scoreboard and is listed with deaths 1, and the 2nd best player is 2nd in the scoreboard with deaths at 2 and so on...

RusL1k10/09/2008 11:43

Why it is impossible?

Lt.RAT10/09/2008 13:47

Ask Numb about that plugin, because that plugin - his plugin. And it`s not hard to write such plugin, ~15 lines of code for that :)

NumB10/09/2008 14:20

It was with my old private pack... To create such a thing, you must modify the main timer plugin... =P

ButtH3ad10/09/2008 14:54

RusL1k: Can you too change names to title (score, deaths etc.) ? Because is it impossible.

xPaw mapper10/09/2008 16:30

@ButtH3ad: noob its possible and not hard :/

Grrr10/09/2008 16:31

I saw such a plugin in Groza's server

SchlumPF10/09/2008 17:51

i think butth3ad thoguht rusl1k is asking for chaning strings in the scoreabord like "frags" and not to set the frags = minutes and deaths = seconds

Acidas11/09/2008 14:56

Wel... If i will find my plugin, i will publish it, else please ask someone else to make it.

reinxxx18/09/2008 17:20(edited 18/09/2008 17:31)

[blockquote]public TimerOnScore() {
for(new i=1;i<=get_maxplayers();i++) {
if( is_user_connected( i ) && timer_started[ i-1 ] ) {
new Float:kreedztime, imin
kreedztime = ( get_gametime( ) - timer_time[ i-1 ] )

if((kreedztime / 60.0) >= 1) {
imin = floatround(kreedztime / 60.0,floatround_floor);
kreedztime -= imin * 60
}

new frags = imin
new deaths = floatround(kreedztime,floatround_floor)
new teams = get_user_team(i)

set_user_frags(i,frags)
cs_set_user_deaths(i,deaths)
message_begin(MSG_ALL,gmsgScoreInfo)
write_byte( i )
write_short(frags)
write_short(deaths)
write_short(0)
write_short(teams)
message_end()
}
}
return PLUGIN_HANDLED
}[/blockquote]

add this at the beginning
[blockquote]new gmsgScoreInfo[/blockquote]

and add this to plugin_init
[blockquote]gmsgScoreInfo = get_user_msgid("ScoreInfo")[/blockquote]

works for me :)
this may not work if u dont have your timer float

Acidas19/09/2008 14:40

Nice :) You could release a plugin like that. :)

SchlumPF19/09/2008 15:02

Originally posted by reinxxx
[blockquote]public TimerOnScore() {
for(new i=1;i<=get_maxplayers();i++) {
if( is_user_connected( i ) && timer_started[ i-1 ] ) {
new Float:kreedztime, imin
kreedztime = ( get_gametime( ) - timer_time[ i-1 ] )

if((kreedztime / 60.0) >= 1) {
imin = floatround(kreedztime / 60.0,floatround_floor);
kreedztime -= imin * 60
}

new frags = imin
new deaths = floatround(kreedztime,floatround_floor)
new teams = get_user_team(i)

set_user_frags(i,frags)
cs_set_user_deaths(i,deaths)
message_begin(MSG_ALL,gmsgScoreInfo)
write_byte( i )
write_short(frags)
write_short(deaths)
write_short(0)
write_short(teams)
message_end()
}
}
return PLUGIN_HANDLED
}[/blockquote]

add this at the beginning
[blockquote]new gmsgScoreInfo[/blockquote]

and add this to plugin_init
[blockquote]gmsgScoreInfo = get_user_msgid("ScoreInfo")[/blockquote]

works for me :)
this may not work if u dont have your timer float


i amde sth like this a while ago and i did not need to send the message you send and for float timers...
floatround() :D

Acidas19/09/2008 20:19

Ye, i had almost the same code somewhere, but cant find it :S

RusL1k19/09/2008 23:18

lay out please ready plugin :)

kielorz20/12/2008 16:41(edited 26/12/2008 13:15)

Fixed

slipkn6t18/03/2009 22:32

post please ready plugin :)

kielorz19/03/2009 13:57

http://xtreme-jumps.eu/e107_plugins/forum/forum_viewtopic.php?148227.0

only beta

Reymon21/03/2009 15:07

If you are using my plugin


#include
#include
#include

#define PLUGIN "Score"
#define VERSION "1.0"
#define AUTHOR "ReymonARG"

new g_scoreinfo

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
g_scoreinfo = get_user_msgid("ScoreInfo")
}

public kz_finishclimb(id, Float:tiempo)
{
new lala = floatround(tiempo)
set_pev(id, pev_frags, float(lala / 60) )
fm_set_user_deaths(id, lala % 60 )

}

stock fm_set_user_deaths(id, deaths)
{
set_pdata_int(id, 444, deaths, 5);

message_begin(MSG_BROADCAST, g_scoreinfo );
write_byte(id);
new Float:frags;
pev(id, pev_frags, frags);
write_short(floatround(frags));
write_short(deaths);
write_short(0);
write_short(get_pdata_int(id, 114, 5));
message_end();
}

Page 1 of 2

Please log in to post replies.