I don't undestand... I thought many persons would be interested in this plugin. When there is no admin on the server, players who shoot theirs teamates witout killing them are not punished.
I know my code is not entirely mine, for example to create credits files in the logcredits directory (hard for my level

)
But I can assure you I have spent hours and hours to find from where could come bugs, but I failed. When I read the part of the code, everything seems to be clear.
Example: when there is a spawn attack, it is detected, displays the hud message and removes credits. But the player is rarely slayed. I insist on the rarely. Why? I can't understand that! Please look at the following code:
Code:
public client_death(killer,victim,wpnindex,hitplace,TK)
{
//...
killerid = get_user_userid(killer)
//...
if ( get_gametime() - g_SpawnTime[victim] < get_cvar_float("amx_ffm_protectiontime") ){
g_credits[attacker] += -7
g_creditsloss[victim] = 7
set_task(0.5,"delayedkill",killerid)
set_hudmessage(255, 0, 255, 0.05, 0.8, 0, 4.0, 11.0, 0.1, 0.5, 8)
show_hudmessage(0,"%s slayed to have killed an ally at spawn^nand losses 7 credits he has %i remaining!", name, g_credits[attacker])
format(menuBody,120,"-7 credits for %s:^n\d1. Forgive^n\r2. Do not forgive",name)
show_menu(victim,keys,menuBody,40)
Check_credits(attacker)
log_message("[DOD FF MANAGER] %s attacked an ally at spawn and he has %i credits remaining!",name, g_credits[attacker])
return PLUGIN_CONTINUE
}
}
public delayedkill(id){
user_kill(id)
}
(The slay must be delayed, because if it is done at the same time, the server crashes, SidLuke has found it)
If the player wasn't slayed at all, I would say: OK, there is a problem, let's code it differently. But sometimes it works (~10%), and some other it does NOT (~90%)! Why ?!!!!!
And it is the same case for other bugs (the ban of the player, Admin credits menu which works only one time per map, etc.)
I supply you, I just ask you to look at these 10 lines of code and say me if you see the problem, because me I don't