Raised This Month: $51 Target: $400
 12% 

hi need code..


Post New Thread Reply   
 
Thread Tools Display Modes
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 03-29-2012 , 14:22   Re: hi need code..
Reply With Quote #11

PHP Code:
if( cs_get_user_team(iKiller) == cs_get_user_team(iVictim) )
{
    
client_print(0print_chat"%s killed his teammate %s with a grenade!"name[0], name[1])
    return 
PLUGIN_HANDLED
}
if(
iKiller == iVictim) {
    
client_print(0print_chat"%s killed himself with a grenade!"name[1])
    return 
PLUGIN_HANDLED;

This will never reach the suicide check.
__________________
Ex1ne is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-29-2012 , 14:24   Re: hi need code..
Reply With Quote #12

Quote:
Originally Posted by Ex1ne View Post
PHP Code:
if( cs_get_user_team(iKiller) == cs_get_user_team(iVictim) )
{
    
client_print(0print_chat"%s killed his teammate %s with a grenade!"name[0], name[1])
    return 
PLUGIN_HANDLED
}
if(
iKiller == iVictim) {
    
client_print(0print_chat"%s killed himself with a grenade!"name[1])
    return 
PLUGIN_HANDLED;

This will never reach the suicide check.
Then tell me which way will.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 03-29-2012 , 15:10   Re: hi need code..
Reply With Quote #13

PHP Code:
if( cs_get_user_team(iKiller) == cs_get_user_team(iVictim) )
{
    
client_print(0print_chat"%s killed his teammate %s with a grenade!"name[0], name[1])
    return 
PLUGIN_HANDLED
}
if(
iKiller == iVictim) {
    
client_print(0print_chat"%s killed himself with a grenade!"name[1])
    return 
PLUGIN_HANDLED;

You are on the same team as you, lol. You are iKiller & iVictim, of course those indexes will have the same team. To properly do this you could either switch places of the checks, or to this:
PHP Code:
if( cs_get_user_team(iKiller) == cs_get_user_team(iVictim) && iKiller != iVictim
__________________

Last edited by Ex1ne; 03-29-2012 at 15:11.
Ex1ne is offline
DarkT1
Member
Join Date: Oct 2011
Old 03-30-2012 , 12:32   Re: hi need code..
Reply With Quote #14

so can u please type code right here the correct
DarkT1 is offline
DarkT1
Member
Join Date: Oct 2011
Old 04-01-2012 , 05:25   Re: hi need code..
Reply With Quote #15

not work at all
DarkT1 is offline
Old 04-03-2012, 05:09
DarkT1
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
Reply



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 17:36.


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