Hello people, how are you doing, I am having this error when compiling this code, what I leave here is only part of that code, not all of it. It shows me the following message "function "PlayerActivate" should return an explicit value". I want to emphasize that I don't know programming, I'm just trying to adjust and group codes to do something that works for me, I would like to know if it is possible, could you help me with this?
PHP Code:
public void OnPluginStart()
{
HookEvent("player_activate", PlayerActivate, EventHookMode_Post);
}
public Action PlayerActivate(Event event, const char[] name, bool dontBroadcast)
{
int userid = event.GetInt("userid");
int client = GetClientOfUserId(userid);
if (client > 0 && client <= MaxClients && !IsFakeClient(client) && GetClientTeam(client) == 2)
{
SetConVarInt(FindConVar("sb_move"), 1);
}
else {}
}