Hello. I am just starting my first plugin, and i got to the point where i need some help. What i am trying to do is make everybody on blu team switch to their mellee weapon, then remove all non-mellee weapons. If the following code will do that, then i would like help fixing these errors. If it will not do that, then i would like help coding the first version. I have read all of the documentation that seemed like it would help, but i still can't figure this one out. Thank you for helping out yet another noob
error 100: function prototypes do not match
i got this error for line 16, where i used hookevent.
I have no idea how to fix it.
Any help would be appreciated.
PHP Code:
#include <sourcemod>
#include <tf2_stocks>
#include <sdktools>
public Plugin:myinfo =
{
name = "top secret",
author = "JosephOhSnap",
description = "top secret",
version = "1.0",
url = "http://www.vulgardisplayclan.com"
}
public OnPluginStart()
{
HookEvent("player_spawn", event_PlayerSpawn);
}
public Action:event_PlayerSpawn(Handle:event)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new team = GetClientTeam(client);
if (team == 3)
{
ClientCommand(client, "slot3");
TF2_RemoveWeaponSlot(client, 1);
TF2_RemoveWeaponSlot(client, 2);
}
}