Raised This Month: $ Target: $400
 0% 

plugin only works for ct team when wanted for both


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vivalavida
Senior Member
Join Date: Jan 2009
Location: Fairfield County, CT
Old 03-15-2009 , 20:03   plugin only works for ct team when wanted for both
Reply With Quote #1

hey guys im having trouble with a code, it only gives the plugin to someone on the ct team, when i want it on the t team as well. heres a snip

get_players_distance(origin,players,num,"aeij ",id,"CT")
}
else
{
get_players_distance(origin,players,num,"aeij ",id,"TERRORIST")
}
if(num)
__________________
ew its sticky!
vivalavida is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 03-15-2009 , 20:07   Re: plugin only works for ct team when wanted for both
Reply With Quote #2

get_players_distance is a stock?
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
vivalavida
Senior Member
Join Date: Jan 2009
Location: Fairfield County, CT
Old 03-15-2009 , 20:10   Re: plugin only works for ct team when wanted for both
Reply With Quote #3

i have completely no idea lol. i had the plugin custom made and they guy who made it hasnt been online so i have no way of contacting him.
__________________
ew its sticky!
vivalavida is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-15-2009 , 20:11   Re: plugin only works for ct team when wanted for both
Reply With Quote #4

Try

PHP Code:
get_players_distanceorigin players num "aij" id 
Quote:
Originally Posted by AntiBots View Post
get_players_distance is a stock?
It's in the chr_engine include.

Code:
get_players_distance(const Float:origin[3],players[32], &num,flags[]="",index=0,team[]="")
/*
*
*  Returns indexes of players in order according
*  to how close they are to "origin". Indexes are
*  stored in "players[32]" and the number of
*  indexes returned is stored in num. team[] is
*  used only if flag 'e' is passed.
*
*  Flags:
*  "a" - Don't return dead players
*  "b" - Don't return alive players
*  "c" - Skip bots
*  "d" - Skip real players
*  "e" - Match with passed team
*  "h" - Skip HLTV
*  "i" - Is in Viewcone
*  "j" - Is Visible
*
*  If flag 'i' is passed, you must specify into
*  variable "index" who's viewcone to check if
*  the returned players are in.
*
*/
__________________

Last edited by Bugsy; 03-15-2009 at 20:15.
Bugsy is offline
vivalavida
Senior Member
Join Date: Jan 2009
Location: Fairfield County, CT
Old 03-15-2009 , 20:14   Re: plugin only works for ct team when wanted for both
Reply With Quote #5

this is what i found

// Taken from chr_engine.inc
stock get_players_distance(const Float:origin2[3],players[32], &num,const flags[]="",index=0,const team[]="")
{
new bool:flag1, bool:flag2
if(containi(flags,"j")!=-1) flag2 = true
if(containi(flags,"i")!=-1)
{
if(!pev_valid(index))
return 0;
flag1 = true
}

static Float:origin[3]
origin[0] = origin2[0]
origin[1] = origin2[1]
origin[2] = origin2[2]

static players2[32]
new num2
arrayset(players2,0,32)
get_players(players2,num2,flags,team)
static Float:origin3[3]
static Float:distance[32]
for(new i=0;i<32;i++) distance[i]=0.0
num = num2

static Float:hit[3]
new bool:continuea=true
for(new i=0;i<num2;i++)
__________________
ew its sticky!

Last edited by vivalavida; 03-15-2009 at 20:14. Reason: stupid smilies
vivalavida is offline
Old 03-16-2009, 16:20
Dores
This message has been deleted by Dores.
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 09:01.


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