Post by wbyokomo on May 7, 2016 15:08:05 GMT
Hello.. this is how to fix team detection for POD Bot and Yest Another POD Bot (YaPB).
In my case i prefer YaPB, why YaPB? because it's better and optimize compare to POD Bot, also less cpu usage.
Disadvantage of using this Bot is they must have a waypoint file that cannot be generate automatically.
You need someone who are better on creating waypoint.
Well this fix is for ZP4.3Fix5a.
On ZP50 just need to change emessage_begin(MSG_BROADCAST, g_msgScoreInfo) to emessage_begin(MSG_ALL, g_msgScoreInfo) in cs_teams_api.sma
Step by step:
1. Search for UpdateFrags(attacker, victim, frags, deaths, scoreboard) and disable ScoreInfo message for victim:
2. Search for public fm_cs_set_user_team_msg(taskid) and send ScoreInfo message for target:
3. Compile your .sma and put in server see the instant team detection even faster than CSBot
In my case i prefer YaPB, why YaPB? because it's better and optimize compare to POD Bot, also less cpu usage.
Disadvantage of using this Bot is they must have a waypoint file that cannot be generate automatically.
You need someone who are better on creating waypoint.
Well this fix is for ZP4.3Fix5a.
On ZP50 just need to change emessage_begin(MSG_BROADCAST, g_msgScoreInfo) to emessage_begin(MSG_ALL, g_msgScoreInfo) in cs_teams_api.sma
Step by step:
1. Search for UpdateFrags(attacker, victim, frags, deaths, scoreboard) and disable ScoreInfo message for victim:
// Update Player Frags and Deaths
UpdateFrags(attacker, victim, frags, deaths, scoreboard)
{
// Set attacker frags
set_pev(attacker, pev_frags, float(pev(attacker, pev_frags) + frags))
// Set victim deaths
fm_cs_set_user_deaths(victim, cs_get_user_deaths(victim) + deaths)
// Update scoreboard with attacker and victim info
if (scoreboard)
{
message_begin(MSG_BROADCAST, g_msgScoreInfo)
write_byte(attacker) // id
write_short(pev(attacker, pev_frags)) // frags
write_short(cs_get_user_deaths(attacker)) // deaths
write_short(0) // class?
write_short(fm_cs_get_user_team(attacker)) // team
message_end()
/*message_begin(MSG_BROADCAST, g_msgScoreInfo)
write_byte(victim) // id
write_short(pev(victim, pev_frags)) // frags
write_short(cs_get_user_deaths(victim)) // deaths
write_short(0) // class?
write_short(fm_cs_get_user_team(victim)) // team
message_end()*/
}
}
2. Search for public fm_cs_set_user_team_msg(taskid) and send ScoreInfo message for target:
// Send User Team Message
public fm_cs_set_user_team_msg(taskid)
{
// Note to self: this next message can now be received by other plugins
// Set the switching team flag
g_switchingteam = true
// Tell everyone my new team
emessage_begin(MSG_ALL, g_msgTeamInfo)
ewrite_byte(ID_TEAM) // player
ewrite_string(CS_TEAM_NAMES[fm_cs_get_user_team(ID_TEAM)]) // team
emessage_end()
// Fix for AMXX/CZ bots which update team paramater from ScoreInfo message
emessage_begin(MSG_ALL, g_msgScoreInfo)
ewrite_byte(ID_TEAM) // id
ewrite_short(pev(ID_TEAM, pev_frags)) // frags
ewrite_short(cs_get_user_deaths(ID_TEAM)) // deaths
ewrite_short(0) // class?
ewrite_short(fm_cs_get_user_team(ID_TEAM)) // team
emessage_end()
// Done switching team
g_switchingteam = false
}
3. Compile your .sma and put in server see the instant team detection even faster than CSBot