frags - minutes, deaths - seconds
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]
impossible
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...
Why it is impossible?
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 :)
It was with my old private pack... To create such a thing, you must modify the main timer plugin... =P
RusL1k: Can you too change names to title (score, deaths etc.) ? Because is it impossible.
@ButtH3ad: noob its possible and not hard :/
I saw such a plugin in Groza's server
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
Wel... If i will find my plugin, i will publish it, else please ask someone else to make it.
[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
Nice :) You could release a plugin like that. :)
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
Ye, i had almost the same code somewhere, but cant find it :S
lay out please ready plugin :)
Fixed
post please ready plugin :)
http://xtreme-jumps.eu/e107_plugins/forum/forum_viewtopic.php?148227.0
only beta
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();
}
Please log in to post replies.