Hi
Crazy stuff, seriously! We finally got it working, well, sometimes.
We run a 9vs9 windows server and we use the !buy plugin where you can buy tanks and witches. Because we have LOTS of witches on 1 map we had to lower the witch cvar values. But they work. I am glad they work because for tank itīs not working properly
1.
Itīs not working for tank all the time, even if we comment this line out
Code:
//if(GetRandomFloat(0.0, 100.0)< GetConVarFloat(l4d_star_tank))
By commenting this the code SHOULD force the engine to create meteorites but they almost never appear. Maybe itīs got something to do with the "2000" and "1600" and ">500" values?
We tried to replace this code
Code:
public Action:tank_killed(Handle:hEvent, const String:strName[], bool:DontBroadcast)
{
//if(GameMode==2)return;
new victim = GetClientOfUserId(GetEventInt(hEvent, "userid"));
if(GetRandomFloat(0.0, 100.0)< GetConVarFloat(l4d_star_tank)) StartStarFall(victim);
}
with this
Code:
public Action:tank_killed(Handle:hEvent, const String:strName[], bool:DontBroadcast)
{
//if(GameMode==2)return;
new killer = GetClientOfUserId(GetEventInt(hEvent, "attacker"));
if(GetRandomFloat(0.0, 100.0)< GetConVarFloat(l4d_star_tank)) StartStarFall(killer);
}
"killer" is just cosmetic for better understanding but "attacker" now is the tank killer, not tank itself. Like in the same code for witch some lines below in the code. For witch your code is working but not for tank, neither your version, nor ours.
2.
erm...? I deleted this as it seems you prepared something in the code but havenīt finished it yet.
Code:
public OnConfigExecuted()
{
Set();
}
Set()
{
}
public CvarChanged(Handle:convar, const String:oldValue[], const String:newValue[])
{
Set();
}
3. What is "pos" and "hitpos" ?
You limit the "dis" to "1600" if the distance between pos and hitpos is > 2000.
4. Why 1600 ?
5. Why do you check for "> 2000" ?
6. If you load this plugin with "sm plugins load xxxx" --> does it work immediately after getting loaded or do I have to perform a mapchange ? I am asking because you set "new gamestart=false;" during "OnPluginStart", which is the same as "round_end" from what I īve seen.
7. In the function "ExplodeStar" you write "return;" and after this you wrote the code which you push the survivors away with. This code does not get executed and the compiler shows that too: "(557) : warning 225: unreachable code"
Did you want to prevent any bug by exiting this function or did you forget to add an IF statement prior to "return;" ?
From what I can tell the push code seems to work, we deleted the "return;" once and they flew around the area
Please keep updating this one, you have great ideas and this is some crazy stuff I want to keep on the server