Hi. I have a hidenseek server
Some of you knows the mod, and you know if you are TERRORIST, when round ends, and you are alive, you gain 1 frag for winning the round.
Now, i have created a mini frag based life system. When you reach 6 frags you gain 1 life by a DeathMsg event. So i want if it's possible to make an event for round ands, if I have 5 frags when the round ends to gain the life when the servers get me the frag for winning the round.
My code for that seems to be like this, but it doesn't work... like the event doesn't happens.
NOTE: The server gives me the frag when round starts/new round
You can find the hidenseeek plugin
here
PHP Code:
public plugin_init(){
register_logevent("GiveALife", 2, "1=Round_End")
}
public GiveALife() {
new id = read_data(1) // Read id data !
new frags = get_user_frags(id)
if(is_user_connected(id) && !is_user_bot(id) && is_user_alive(id) && frags == get_pcvar_num(plrfrags) ) {
g_Life[id]++;
client_cmd( id, "spk woop" );
ColorChat(id, RED, "%s You gained^x04 1 life^x01 becouse you reached[^x03 %d^x01 ]^x04 frags^x01!", LIFETAG, get_pcvar_num(plrfrags) )
}
}
}
If someone wantts to help me with this, and he don't understand what I want to do, or for more lines from the entired code, just ask.
Sorry for my bad english