Some one explain me what is the work on this read data i want to know
PHP Code:
public plugin_init()
{
register_plugin("", "", "");
register_event("TeamScore", "score_new", "a", "");
}
public score_new()
{
new team[32];
read_data(1, team, 31);
if (v_inprogress == 2)
{
if (team[0] == 67)
{
v_CtScore[0] = read_data(2);
}
else
{
if (team[0] == 84)
{
v_TScore[0] = read_data(2);
}
}
}
else
{
if (v_inprogress == 4)
{
if (team[0] == 67)
{
v_TScore[1] = read_data(2);
}
if (team[0] == 84)
{
v_CtScore[1] = read_data(2);
}
}
}
if (v_inprogress == 2 || v_inprogress == 4)
{
maxround();
}
return 0;
public maxround()
{
if (v_inprogress == 2 && v_TScore[0][0] + v_CtScore[0][0] == 15)
{
half_stop();
}
else
{
if (v_inprogress == 4)
{
if (rounds_played == 30)
{
half_stop();
}
if (v_CtScore[1][0] + v_CtScore[0][0] == 16 || v_TScore[1][0] + v_TScore[0][0] == 16)
{
half_stop();
}
}
}
return 0;
}