mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-19 12:42:54 +00:00
Added anti_hardscope
This commit is contained in:
parent
7997a0446e
commit
6b9bc23449
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
Simple drag and drop scripts
|
Simple drag and drop scripts
|
||||||
|
|
||||||
|
## anti_hardscope.gsc
|
||||||
|
|
||||||
|
Prevent players from hardscoping
|
||||||
|
|
||||||
## change_team_names.gsc
|
## change_team_names.gsc
|
||||||
|
|
||||||
Change the team names to custom names depending on the game mode
|
Change the team names to custom names depending on the game mode
|
||||||
|
66
small_scripts/anti_hardscope.gsc
Normal file
66
small_scripts/anti_hardscope.gsc
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
//#include maps\mp\bots\_bot_utility; // Uncomment if using Bot Warfare
|
||||||
|
|
||||||
|
Init()
|
||||||
|
{
|
||||||
|
thread OnPlayerConnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
OnPlayerConnect()
|
||||||
|
{
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
level waittill("connected", player);
|
||||||
|
|
||||||
|
// Uncomment if using Bot Warfare
|
||||||
|
/*if (!self IsBot())
|
||||||
|
{
|
||||||
|
player thread OnPlayerSpawned();
|
||||||
|
}*/
|
||||||
|
|
||||||
|
player thread OnPlayerSpawned(); // Remove/comment if using Bot Warfare
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
OnPlayerSpawned()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
self waittill("spawned_player");
|
||||||
|
|
||||||
|
self.pers["allow_ads"] = true;
|
||||||
|
|
||||||
|
self thread AntiHardscope();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AntiHardscope()
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (self PlayerAds() >= 0.75)
|
||||||
|
{
|
||||||
|
wait 0.65;
|
||||||
|
|
||||||
|
if (self PlayerAds() >= 0.75)
|
||||||
|
{
|
||||||
|
self IPrintLn("^1Hardscoping is not allowed");
|
||||||
|
self AllowAds(false);
|
||||||
|
self.pers["allow_ads"] = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (self PlayerAds() < 0.75 && self.pers["allow_ads"] == false && self AdsButtonPressed() == false)
|
||||||
|
{
|
||||||
|
self.pers["allow_ads"] = true;
|
||||||
|
self AllowAds(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
wait 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IsBot()
|
||||||
|
{
|
||||||
|
//return IsDefined(self.pers["isBot"]) && self.pers["isBot"]; // Uncomment if using Bot Warfare
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user