Raised This Month: $ Target: $400
 0% 

Traceline help-.-'


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 09-08-2007 , 12:00   Traceline help-.-'
Reply With Quote #1

Traceline this dont work enyone know why?
want players whit same numbers unable to hit each other.
so same number count as miss dont wanna use add hp or enything like that.
gonna use this in my plugin so +karma if you help me =)

PHP Code:
public traceline(Float:v1[3], Float:v2[3], noMonsterspentToSkip){
 new 
iAttacker pentToSkip;
 new 
iVictim get_tr(TR_pHit);
 
 if (
iVictim >= && iVictim <= g_MaxPlayers && iAttacker >= && iAttacker <= g_MaxPlayers){
  if (
PlayersTeam[iVictim] == PlayersTeam[iVictim]){
   
set_tr(TR_flFraction1.0);
   return 
FMRES_SUPERCEDE;
  }
 } 
 return 
FMRES_IGNORED;

__________________
If one of my plugins become broken, contact me by mail. [email protected]

Last edited by fxfighter; 09-08-2007 at 12:02.
fxfighter is offline
Send a message via MSN to fxfighter
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-08-2007 , 12:24   Re: Traceline help-.-'
Reply With Quote #2

Try something like :

Code:
new g_iMaxPlayers; public plugin_init() {     register_forward( FM_TraceLine, "fw_traceline", 1 );         g_iMaxPlayers = get_maxplayers(); } public fw_traceline( Float:start[3], Float:end[3], noMonsters, id, trace ) {     if( !is_user_connected( id ) || !is_user_alive( id ) )         return FMRES_IGNORED;         static iVictim;     iVictim = get_tr2( trace, TR_pHit );         if( !( 1 <= iVictim <= g_iMaxPlayers ) )         return FMRES_IGNORED;             if( PlayersTeam[ id ] == PlayersTeam[ iVictim ] )     {         set_tr2( trace, TR_flFraction, 1.0 );         return FMRES_SUPERCEDE;     }     return FMRES_IGNORED; }


Notes:

- PlayersTeam[ iVictim ] == PlayersTeam[ iVictim ] <== can't work with that. :p
__________________

Last edited by Arkshine; 09-08-2007 at 12:27.
Arkshine is offline
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 09-08-2007 , 12:30   Re: Traceline help-.-'
Reply With Quote #3

THx it works +karma but i cant.
i gave you like yesterday-.-
so i give you so fast as i can
i will write it down

Quote:
you most spread some reputation around
before giving it to arkshine agin
__________________
If one of my plugins become broken, contact me by mail. [email protected]

Last edited by fxfighter; 09-08-2007 at 12:40.
fxfighter is offline
Send a message via MSN to fxfighter
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-08-2007 , 12:47   Re: Traceline help-.-'
Reply With Quote #4

Quote:
Originally Posted by arkshine View Post
Notes:

- PlayersTeam[ iVictim ] == PlayersTeam[ iVictim ] <== can't work with that. :p
Yeah, lol >.>
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
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 16:08.


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