Anti-cheat
Hello i made a code that checks if the player has 8 headshots and then ends the game (that is just for easy debug) i will change it later, but i get the error unknown function.
this is in the _events.gsc, as you can see i dont know much about self. and decimals increase in c++.
The error will be in
i guess.
Code:
headShot( killId )
{
{
self.modifiers["headshot"] = true;
self thread maps\mp\gametypes\_hud_message::SplashNotifyDelayed( "headshot", maps\mp\gametypes\_rank::getScoreInfoValue( "headshot" ) );
self thread maps\mp\gametypes\_rank::giveRankXP( "headshot" );
self thread giveAdrenaline( "headshot" );
self thread maps\mp\_matchdata::logKillEvent( killId, "headshot" );
self.headshots += 1;
self sayall("lala");
}
{
while(1)
if (self.headshots == 8)
{
level thread maps\mp\gametypes\_gamelogic::forceEnd();
}
wait 1;
}
}
The error will be in
Code:
self.headshots += 1;



. I want everytime you get a headshot a counter counts + 1 and if that value is 8(from the counter) then end the game..