Raised This Month: $ Target: $400
 0% 

distance between 2 players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 05-06-2012 , 15:54   Re: distance between 2 players
Reply With Quote #9

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(iVictimszVNamecharsmax(szVName)); 
 
get_user_name(iKillerszKNamecharsmax(szKName));
 
clear_bit(g_bIsAliveiVictim);
 
 if( 
cs_get_user_teamiVictim ) == CS_TEAM_T 
 {  
  if( 
IsPlayeriKiller ) && cs_get_user_teamiKiller ) == CS_TEAM_CT 
  { 
   if( 
g_bRebel[iVictim] || g_bHasPrimaryiVictim ]/* || g_bRebelRange [iVictim]*/ 
   { 
    
fnColorPrint(0"Guard^4 %s ^1killed rebel^4 %s ^1!"szKNameszVName); 
   }
   else if( !
g_bRebel[iVictim] ) 
   {
    if( 
g_bHasPrimaryiVictim ] ) 
     return 
PLUGIN_HANDLED;
    
g_iFreekill[iKiller]++
 
    if(
g_iFreekill[iKiller] == 1)
    {
     
fnColorPrint(iKiller"^3Warning:^1 Freekilling will not be tolerated. ");
     
UTIL_ScreenFade(iKiller,{ 25510061 }, 2.02.085);
    }
    if(
g_iFreekill[iKiller] == 2)
    {
     
UTIL_ScreenFade(iKiller,{ 25510061 }, 2.52.595);
    }
    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,{ 2550}, 2.52.5175);
    }
    if(
g_iFreekill[iKiller] >= max_freekills)
    {
     
create_user_cztutor(0REDtutorsound16.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,{ 2550}, 2.52.5255);
     
cs_set_user_team(iKillerCS_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
striker07 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode