Quote:
Originally Posted by TheSpyHunter
sm_sidewinder_enable @me 1/2/4
|
I already said no, that's NOT how it's called.
Quote:
Originally Posted by naris
There are native functions that plugins can call.. However, there aren't any convars or commands for doing so.
|
You have to call the Native Functions defined in the specified include file from a plugin.
Here is an
example function to set the flags for a given client:
PHP Code:
#include "sidewinder"
SetupSidewinder(client, level, bool:seeker)
{
new SidewinderClientFlags:flags, crit_chance, track_chance;
if (seeker)
{
track_chance = 100;
flags = TrackingSentryRockets | TrackingRockets | TrackingArrows |
TrackingFlares | TrackingPipes | TrackingSyringe;
}
else
{
track_chance = 0;
if (level <= 0)
{
flags = NormalSentryRockets | NormalRockets | NormalArrows |
NormalFlares | NormalPipes | NormalSyringe;
}
else
{
flags = CritSentryRockets | CritTrackerSentryRockets | CritTrackerRockets |
CritTrackerArrows | CritTrackerFlares | CritTrackerPipes | CritTrackerSyringe;
}
}
switch (level)
{
case 1: crit_chance = 5;
case 2: crit_chance = 10;
case 3: crit_chance = 25;
case 4: crit_chance = 50;
default: crit_chance = 0;
}
SidewinderFlags(client, flags, false);
SidewinderTrackChance(client, track_chance);
SidewinderSentryCritChance(client, crit_chance);
}