no not really the slap is a lil extra that im not sure yet if i will use it,
but if a terrorists comes close to the guard a bit have to be set and when the terrorist moves away, out of range of the ct the bit has to turn low again.
then when a guard has killed a terrorists I am gonna check first if that terrorist was close to that ct by checking the bit.
for example lets name that bit g_bRebelRange.
If that bit was high the moment the terrorists got killed by the ct then the ct did not freekill him, but if the bit for that terrorist was low and other conditions that check if he rebeled where low too then the ct has +1 freekill,
this is the function that I will add this statement to:
PHP Code:
public Event_DeathMsg()
{
new iKiller = read_data(1);
new iVictim = read_data(2);
new freekill_slay = get_pcvar_num(jb_slay_4freekills)
new max_freekills = get_pcvar_num(jb_max_freekills);
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
clear_bit(g_bIsAlive, iVictim);
if( cs_get_user_team( iVictim ) == CS_TEAM_T )
{
if( IsPlayer( iKiller ) && cs_get_user_team( iKiller ) == CS_TEAM_CT )
{
if( g_bRebel[iVictim] || g_bHasPrimary[ iVictim ]/* || g_bRebelRange [iVictim]*/ )
{
fnColorPrint(0, "Guard^4 %s ^1killed rebel^4 %s ^1!", szKName, szVName);
}
else if( !g_bRebel[iVictim] )
{
if( g_bHasPrimary[ iVictim ] )
return PLUGIN_HANDLED;
g_iFreekill[iKiller]++
if(g_iFreekill[iKiller] == 1)
{
fnColorPrint(iKiller, "^3Warning:^1 Freekilling will not be tolerated. ");
UTIL_ScreenFade(iKiller,{ 255, 100, 61 }, 2.0, 2.0, 85);
}
if(g_iFreekill[iKiller] == 2)
{
UTIL_ScreenFade(iKiller,{ 255, 100, 61 }, 2.5, 2.5, 95);
}
if(g_iFreekill[iKiller] == freekill_slay)
{
fnColorPrint(iKiller, "^3Last warning:^1 Every freekill you make from now on, will result in slay and teamswitch");
UTIL_ScreenFade(iKiller,{ 255, 0, 0 }, 2.5, 2.5, 175);
}
if(g_iFreekill[iKiller] >= max_freekills)
{
create_user_cztutor(0, RED, tutorsound1, 6.5, "Jailbreak - Insurgency: ^nYou have been transfered to prisoners team^nfor freekilling to much!");
set_task(7.0, "tutor_remove_7sec", iKiller);
//formatex(Text,191,"Jailbreak - Insurgency: ^nGuard %s has been transfered to prisoners team^nfor freekilling to much", szKName);
//MakeTutor(0,Text,RED,5.0)
UTIL_ScreenFade(iKiller,{ 255, 0, 0 }, 2.5, 2.5, 255);
cs_set_user_team(iKiller, CS_TEAM_T);
user_kill(iKiller);
}
}
}
}
return PLUGIN_HANDLED;
}
btw the czero tutor does not work, tryed many diffrent ways but it doesnt work for windows servers. havent tested on linux yet