Raised This Month: $ Target: $400
 0% 

change player number


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SoccerjamTR
Member
Join Date: May 2021
Old 01-10-2023 , 10:09   change player number
Reply With Quote #1

there is a offside plugin for soccer mod. I want to increase offside catching player number. Custom player number is 1 and i want to 2 or 3,.. How to make?
PHP Code:
Offside(id)
{
    new 
RestUser 0alive 0teamoff
    
new origin_x[3], PossCancha[MAX_PLAYER 1][3]

    for(new 
1<= MAX_PLAYERx++)
    {        
        if(
is_user_alive(x) && !is_user_bot(x) && !is_user_hltv(x) && is_user_connected(x) && !user_is_keeper[x] && !soy_spec[x])
        {    
            
alive++
            
get_user_origin(xorigin_x)
            
teamoff get_user_team(x)
            
PossCancha[RestUser][0] = x
            PossCancha
[RestUser][1] = origin_x[0]
            
PossCancha[RestUser][2] = teamoff
        
}
        else 
            
RestUser++
    }
    
    if(
alive >= 3)
    {
        new 
pateoteam get_user_team(ballowner)
        new 
auxiliar0auxiliar1auxiliar2finish
        
if(pateoteam == 1)
        {
            do
            {
                
finish 0
                
for(new 1<= alivex++)
                {
                    if(
PossCancha[x][1] > PossCancha[1][1])
                    {
                        
auxiliar0 PossCancha[x][0]
                        
PossCancha[x][0] = PossCancha[1][0]
                        
PossCancha[1][0] = auxiliar0                        
                    
                        auxiliar1 
PossCancha[x][1]
                        
PossCancha[x][1] = PossCancha[1][1]
                        
PossCancha[1][1] = auxiliar1
                        
                        auxiliar2 
PossCancha[x][2]
                        
PossCancha[x][2] = PossCancha[1][2]
                        
PossCancha[1][2] = auxiliar2                        
                    
                        finish 
1
                    
}
                }
            }
            while(
finish)
        }
        else if(
pateoteam == 2)
        {
            do
            {
                
finish 0
                
for(new 1<= alivex++)
                {
                    if(
PossCancha[x][1] < PossCancha[1][1])
                    {
                        
auxiliar0 PossCancha[x][0]
                        
PossCancha[x][0] = PossCancha[1][0]
                        
PossCancha[1][0] = auxiliar0                        
                    
                        auxiliar1 
PossCancha[x][1]
                        
PossCancha[x][1] = PossCancha[1][1]
                        
PossCancha[1][1] = auxiliar1
                        
                        auxiliar2 
PossCancha[x][2]
                        
PossCancha[x][2] = PossCancha[1][2]
                        
PossCancha[1][2] = auxiliar2                        
                    
                        finish 
1
                    
}
                }
            }
            while(
finish)
        }
        
        if(
pateoteam != PossCancha[1][2])
            return 
false;    
            
        if(
id == PossCancha[1][0])
            return 
false;
            
        if((
pateoteam == PossCancha[1][2]) && (pateoteam != PossCancha[2][2]))
        {
            
SentenceOffside(PossCancha[1][0], PossCancha[2][0], PossCancha[1][1], PossCancha[2][1])        
        }
        else if((
pateoteam == PossCancha[1][2]) && (pateoteam == PossCancha[2][2]) && (pateoteam != PossCancha[3][2]))
        {
            
SentenceOffside(PossCancha[1][0], PossCancha[3][0], PossCancha[1][1], PossCancha[3][1])            
        }
        else if((
pateoteam == PossCancha[1][2]) && (pateoteam == PossCancha[2][2]) && (pateoteam == PossCancha[3][2]) && (pateoteam != PossCancha[4][2]))
        {
            
SentenceOffside(PossCancha[1][0], PossCancha[4][0], PossCancha[1][1], PossCancha[4][1])            
        }
        else        
            return 
false;
    }
    else 
        return 
false;
        
    return 
true;
}

public 
SentenceOffside(idoffidhabiloriginofforiginhabil)
{
    
is_offside[idoff] = true
    PrintOffside
(idoffidhabil)    
}
public 
PrintOffside(idoffidhabil)
{    
    new 
name_off1[MAX_PLAYER 1]
    
get_user_name(idoff,name_off1MAX_PLAYER)
    
    if(
idhabil)
        
ColorChat(0,YELLOW,"^x04%s^x01 %L ^x01",name_off1LANG_PLAYER"ADVANCED")
    else
        
ColorChat(0,YELLOW,"^x04%s^x01 %L",name_off1LANG_PLAYER"ADVANCED2")


Last edited by SoccerjamTR; 01-10-2023 at 10:10.
SoccerjamTR 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 07:59.


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