Just by glancing through it, there are several problems.
I didn't try to compile but this is going to need work before that.
Bad:
Code:
new MoneyOffset = FindSendPropOffs("CCSPlayer", "m_iAccount");
Code:
public Action:OnBombPu(Handle:event, any:client)
See the event callback definition in events.inc
Code:
public Action:OnDefuseAttempt(Handle:event, any:client)
{
new cash = GetConVarInt(defat);
new playercash = GetEntDataEnt(client, MoneyOffset);
if(GetConVarInt(Switch))
{
SetEntData(client, MoneyOffset, playercash + cash, 4, true)
PrintHintText(client, "[SM] You have received a %d cash bonus for attempting to defuse the bomb!", cash)
defatt++
}
}
Give cash every time they start defusing? Exploited very easily.
Code:
new defatt = 0;
new platt = 0;
wat?
Code:
public Action:OnPlayerSpawn(Handle:event, any:client)
{
defatt = 0;
platt = 0;
}
Reset global vars for every spawn?
Code:
if(GetConVarInt(Switch) && )
:X
Code:
public Action:OnBombDefuse(Handle:event, any:client)
{
new cash = GetConVarInt(defuse);
new playercash = GetEntDataEnt(client, MoneyOffset);
if(GetConVarInt(Switch))
{
if(GetClientTeam( client ) == CS_TEAM_CT && IsPlayerAlive(client))
{
SetEntData(Client, MoneyOffset, playercash + cash, 4, true)
PrintHintText(client, "[SM] Your team has received a %d cash bonus for defusing the bomb!", cash)
}
else if(GetClienTeam( client ) == CS_TEAM_T)
{
SetEntData(Client, MoneyOffset, playercash - cash, 4, true)
PrintHintText(client, "[SM] Your team has lost %d cash for not stoping the CT's!", cash)
}
}
}
When is the defuser ever gunna be T? Or dead? Also bolded a typo in there.
This is no where near compiling
Also, these most likely are not all the errors in the plugin, I found these by glancing around.
__________________