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 = 0, alive = 0, teamoff
new origin_x[3], PossCancha[MAX_PLAYER + 1][3]
for(new x = 1; x <= MAX_PLAYER; x++)
{
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(x, origin_x)
teamoff = get_user_team(x)
PossCancha[x - RestUser][0] = x
PossCancha[x - RestUser][1] = origin_x[0]
PossCancha[x - RestUser][2] = teamoff
}
else
RestUser++
}
if(alive >= 3)
{
new pateoteam = get_user_team(ballowner)
new auxiliar0, auxiliar1, auxiliar2, finish
if(pateoteam == 1)
{
do
{
finish = 0
for(new x = 1; x <= alive; x++)
{
if(PossCancha[x][1] > PossCancha[x + 1][1])
{
auxiliar0 = PossCancha[x][0]
PossCancha[x][0] = PossCancha[x + 1][0]
PossCancha[x + 1][0] = auxiliar0
auxiliar1 = PossCancha[x][1]
PossCancha[x][1] = PossCancha[x + 1][1]
PossCancha[x + 1][1] = auxiliar1
auxiliar2 = PossCancha[x][2]
PossCancha[x][2] = PossCancha[x + 1][2]
PossCancha[x + 1][2] = auxiliar2
finish = 1
}
}
}
while(finish)
}
else if(pateoteam == 2)
{
do
{
finish = 0
for(new x = 1; x <= alive; x++)
{
if(PossCancha[x][1] < PossCancha[x + 1][1])
{
auxiliar0 = PossCancha[x][0]
PossCancha[x][0] = PossCancha[x + 1][0]
PossCancha[x + 1][0] = auxiliar0
auxiliar1 = PossCancha[x][1]
PossCancha[x][1] = PossCancha[x + 1][1]
PossCancha[x + 1][1] = auxiliar1
auxiliar2 = PossCancha[x][2]
PossCancha[x][2] = PossCancha[x + 1][2]
PossCancha[x + 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(idoff, idhabil, originoff, originhabil)
{
is_offside[idoff] = true
PrintOffside(idoff, idhabil)
}
public PrintOffside(idoff, idhabil)
{
new name_off1[MAX_PLAYER + 1]
get_user_name(idoff,name_off1, MAX_PLAYER)
if(idhabil)
ColorChat(0,YELLOW,"^x04%s^x01 %L ^x01",name_off1, LANG_PLAYER, "ADVANCED")
else
ColorChat(0,YELLOW,"^x04%s^x01 %L",name_off1, LANG_PLAYER, "ADVANCED2")
}