mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-19 20:52:54 +00:00
Added small_scripts
This commit is contained in:
parent
899431bed2
commit
d9cc0ae2ce
7
small_scripts/README.md
Normal file
7
small_scripts/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Small scripts
|
||||
|
||||
Simple drag and drop scripts
|
||||
|
||||
## display_player_stats.gsc
|
||||
|
||||
Display the player's killstreak, total kills and deaths on top of the screen
|
46
small_scripts/display_player_stats.gsc
Normal file
46
small_scripts/display_player_stats.gsc
Normal file
@ -0,0 +1,46 @@
|
||||
#include maps\mp\gametypes\_hud_util;
|
||||
|
||||
|
||||
init()
|
||||
{
|
||||
level thread OnPlayerConnected();
|
||||
}
|
||||
|
||||
OnPlayerConnected()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill("connected", player);
|
||||
|
||||
if (isDefined(self.pers["isBot"]))
|
||||
{
|
||||
if (self.pers["isBot"])
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
player thread DisplayPlayerKillstreak();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DisplayPlayerKillstreak()
|
||||
{
|
||||
self endon ("disconnect");
|
||||
level endon("game_ended");
|
||||
|
||||
self.hudkillstreak = createFontString( "Objective", 0.65 );
|
||||
self.hudkillstreak setPoint( "CENTER", "TOP", "CENTER", 10 );
|
||||
|
||||
while(true)
|
||||
{
|
||||
if(self.playerstreak != self.pers["cur_kill_streak"])
|
||||
{
|
||||
self.playerstreak = self.pers["cur_kill_streak"];
|
||||
self.hudkillstreak setText("^1KILLSTREAK: " + self.pers["cur_kill_streak"] + " | KILLS: " + self.pers["kills"] + " | DEATHS: " + self.pers["deaths"]);
|
||||
}
|
||||
|
||||
wait 0.01;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user