How do I make it so credits are given every 5 minutes of game time rather than for every kill. I am using the jail_awards plugin and I will post the script below. Just need to know which part to edit and what to put in (I literally started today and can edit things using a template)
I believe it is using SDKhooks!
If not, if it possible to make it so only if a T kills a CT that a credit is given and if a CT kills a T nothing is given.
I think the code for the credit giving at the moment is:
Code:
public Action:PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
new client = GetClientOfUserId(GetEventInt(event, "userid"));
CreateTimer(2.0, MensajesMuerte, client);
if (!attacker)
return;
if (attacker == client)
return;
g_iCredits[attacker] += GetConVarInt(cvarCreditsKill);
if (g_iCredits[attacker] < GetConVarInt(cvarCreditsMax))
{
PrintToChat(attacker, "\x04[SM_JailAwards] \x05Your credits: %i (+%i)", g_iCredits[attacker],GetConVarInt(cvarCreditsKill));
}
else
{
g_iCredits[attacker] = GetConVarInt(cvarCreditsMax);
PrintToChat(attacker, "\x04[SM_JailAwards] \x05Your credits: %i (Maximum allowed)", g_iCredits[attacker]);
}
}
Thank you!!