#include #include #pragma semicolon 1 #define PLUGIN_VERSION "1.0" public Plugin:myinfo = { name = "ForlixSoScore ForwardSample", author = "Forlix (Dominik Friedrichs)", description = "ForlixSoScore ForwardSample", version = PLUGIN_VERSION, url = "http://forlix.org/" }; public ForlixSoScore_OnBallShot(shooter, team) { decl String:str_team[32]; decl String:str_shooter[32]; if(!shooter || !GetClientName(shooter, str_shooter, sizeof(str_shooter))) { str_shooter = "N/A"; str_team = "N/A"; } else GetTeamName(team, str_team, sizeof(str_team)); PrintToChatAll("%s (%s) shot the ball", str_shooter, str_team); return; } public ForlixSoScore_OnGoalScored(winning_team, loosing_team, shooter, assistant, bool:owngoal) { decl String:str_winning_team[32]; decl String:str_loosing_team[32]; decl String:str_shooter[32]; decl String:str_assistant[32]; // teams are guaranteed to be provided, no need to check GetTeamName(winning_team, str_winning_team, sizeof(str_winning_team)); GetTeamName(loosing_team, str_loosing_team, sizeof(str_loosing_team)); if(!shooter || !GetClientName(shooter, str_shooter, sizeof(str_shooter))) str_shooter = "N/A"; if(!assistant || !GetClientName(assistant, str_assistant, sizeof(str_assistant))) str_assistant = "N/A"; PrintHintTextToAll("ForlixSoScore ForwardSample\n\nTeam %s won, team %s lost!\nShooter: %s, Assistant: %s\nOwngoal? %s", str_winning_team, str_loosing_team, str_shooter, str_assistant, owngoal? "yup!" : "nope."); return; }