Raised This Month: $ Target: $400
 0% 

1v1, 1v2, 1v3 1v4 1v5 Players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-30-2013 , 09:42   Re: 1v1, 1v2, 1v3 1v4 1v5 Players
Reply With Quote #3

Well, its secure to assign a string directly using a value instead of using copy() ?

Anyway i need like this:

PHP Code:
stock isVsAlone(id)
{
    new 
iPlayers[32],iAlive[CsTeams];
    
get_players(iPlayers,iAlive[CS_TEAM_T],"aeh","TERRORIST");
    
get_players(iPlayers,iAlive[CS_TEAM_CT],"aeh","CT");
    
    if((
cs_get_user_team(id) == CS_TEAM_T) && is_user_alive(id) && (iAlive[CS_TEAM_T] == 1)) return iAlive[CS_TEAM_CT];
    
    else if((
cs_get_user_team(id) == CS_TEAM_CT) && is_user_alive(id) && (iAlive[CS_TEAM_CT] == 1)) return iAlive[CS_TEAM_T];

    return 
0;

EDIT: Sorry, i understand better now, thanks and i changed >>

PHP Code:
GetAliveEnemiesid )
{
    if( !
is_user_aliveid ) )
    {
        return -
1
    
}
    
    new 
Players32 ], iNum
    get_players
PlayersiNum"ae", ( get_user_teamid ) == ) ? "CT" "TERRORIST" )
    
    return 
iNum

solved.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 07-30-2013 at 10:13. Reason: new szOpposingTeam[ 12 ] :(
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
 



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 15:52.


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