Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - GaMMeR

Pages: [1] 2 3
1
Plugins / Final killcam for Openwarfare
« on: December 31, 2019, 03:30:24 PM »
Too many files for upload here, just download and unzip.

2
Plugins / Flags
« on: December 31, 2019, 03:28:51 PM »
Code: [Select]
init()
{
level.maxFlag = int(tableLookup( "mp/flagtable.csv", 0, "maxflag", 1 ));
level.maxPrestige = int(tableLookup( "mp/flagicontable.csv", 0, "maxprestige", 1 )); // Needed to funtion.

FlagId = 0;
FlagName = tableLookup( "mp/flagtable.csv", 0, FlagId, 1 );
assert( isDefined( FlagName ) && FlagName != "" );

while ( isDefined( FlagName ) && FlagName != "" )
{
level.FlagTable[FlagId][1] = tableLookup( "mp/flagtable.csv", 0, FlagId, 1 );
level.FlagTable[FlagId][2] = tableLookup( "mp/flagtable.csv", 0, FlagId, 2 );
level.FlagTable[FlagId][3] = tableLookup( "mp/flagtable.csv", 0, FlagId, 3 );
level.FlagTable[FlagId][7] = tableLookup( "mp/flagtable.csv", 0, FlagId, 7 );

precacheString( tableLookupIString( "mp/flagtable.csv", 0, FlagId, 16 ) );

FlagId++;
FlagName = tableLookup( "mp/flagtable.csv", 0, FlagId, 1 );
}
thread OnConnected();
}
OnConnected()
{
for(;;)
{
level waittill("connected",player);
if( !isdefined( player.pers["isbot"] ) )
player thread ShowFlag();
}
}
ShowFlag()
{
FlagID = 0;
self.flag = (getcaps(self getgeolocation(0)));
wait 0.2;

if( !isdefined(self.flag))
return;

if(self.flag == "ad")
flagId = 0;
else if(self.flag == "ae")
flagId = 1;
else if(self.flag == "af")
flagId = 2;
else if(self.flag == "ag")
flagId = 3;
else if(self.flag == "ai")
flagId = 4;
else if(self.flag == "al")
flagId = 5;
else if(self.flag == "am")
flagId = 6;
else if(self.flag == "an")
flagId = 7;
else if(self.flag == "ao")
flagId = 8;
else if(self.flag == "aq")
flagId = 9;
else if(self.flag == "ar")
flagId = 10;
else if(self.flag == "as")
flagId = 11;
else if(self.flag == "at")
flagId = 12;
else if(self.flag == "au")
flagId = 13;
else if(self.flag == "aw")
flagId = 14;
else if(self.flag == "ax")
flagId = 15;
else if(self.flag == "az")
flagId = 16;
else if(self.flag == "ba")
flagId = 17;
else if(self.flag == "bb")
flagId = 18;
else if(self.flag == "bd")
flagId = 19;
else if(self.flag == "be")
flagId = 20;
else if(self.flag == "bf")
flagId = 21;
else if(self.flag == "bg")
flagId = 22;
else if(self.flag == "bh")
flagId = 23;
else if(self.flag == "bi")
flagId = 24;
else if(self.flag == "bj")
flagId = 25;
else if(self.flag == "bl")
flagId = 26;
else if(self.flag == "bm")
flagId = 27;
else if(self.flag == "bn")
flagId = 28;
else if(self.flag == "bo")
flagId = 29;
else if(self.flag == "br")
flagId = 30;
else if(self.flag == "bs")
flagId = 31;
else if(self.flag == "bt")
flagId = 32;
else if(self.flag == "bv")
flagId = 33;
else if(self.flag == "bw")
flagId = 34;
else if(self.flag == "by")
flagId = 35;
else if(self.flag == "bz")
flagId = 36;
else if(self.flag == "ca")
flagId = 37;
else if(self.flag == "cc")
flagId = 38;
else if(self.flag == "cd")
flagId = 39;
else if(self.flag == "cf")
flagId = 40;
else if(self.flag == "cg")
flagId = 41;
else if(self.flag == "ch")
flagId = 42;
else if(self.flag == "ci")
flagId = 43;
else if(self.flag == "ck")
flagId = 44;
else if(self.flag == "cl")
flagId = 45;
else if(self.flag == "cm")
flagId = 46;
else if(self.flag == "cn")
flagId = 47;
else if(self.flag == "co")
flagId = 48;
else if(self.flag == "cr")
flagId = 49;
else if(self.flag == "cu")
flagId = 50;
else if(self.flag == "cv")
flagId = 51;
else if(self.flag == "cw")
flagId = 52;
else if(self.flag == "cx")
flagId = 53;
else if(self.flag == "cy")
flagId = 54;
else if(self.flag == "cz")
flagId = 55;
else if(self.flag == "de")
flagId = 56;
else if(self.flag == "dj")
flagId = 57;
else if(self.flag == "dk")
flagId = 58;
else if(self.flag == "dm")
flagId = 59;
else if(self.flag == "do")
flagId = 60;
else if(self.flag == "dz")
flagId = 61;
else if(self.flag == "ec")
flagId = 62;
else if(self.flag == "ee")
flagId = 63;
else if(self.flag == "eg")
flagId = 64;
else if(self.flag == "eh")
flagId = 65;
else if(self.flag == "en")
flagId = 66;
else if(self.flag == "er")
flagId = 67;
else if(self.flag == "es")
flagId = 68;
else if(self.flag == "et")
flagId = 69;
else if(self.flag == "eu")
flagId = 70;
else if(self.flag == "fi")
flagId = 71;
else if(self.flag == "fj")
flagId = 72;
else if(self.flag == "fk")
flagId = 73;
else if(self.flag == "fm")
flagId = 74;
else if(self.flag == "fo")
flagId = 75;
else if(self.flag == "fr")
flagId = 76;
else if(self.flag == "ga")
flagId = 77;
else if(self.flag == "gb")
flagId = 78;
else if(self.flag == "gd")
flagId = 79;
else if(self.flag == "ge")
flagId = 80;
else if(self.flag == "gf")
flagId = 81;
else if(self.flag == "gg")
flagId = 82;
else if(self.flag == "gh")
flagId = 83;
else if(self.flag == "gi")
flagId = 84;
else if(self.flag == "gl")
flagId = 85;
else if(self.flag == "gm")
flagId = 86;
else if(self.flag == "gn")
flagId = 87;
else if(self.flag == "gp")
flagId = 88;
else if(self.flag == "gq")
flagId = 89;
else if(self.flag == "gr")
flagId = 90;
else if(self.flag == "gs")
flagId = 91;
else if(self.flag == "gt")
flagId = 92;
else if(self.flag == "gu")
flagId = 93;
else if(self.flag == "gw")
flagId = 94;
    else if(self.flag == "gy")
        flagId = 95;
else if(self.flag == "hk")
flagId = 96;
else if(self.flag == "hm")
flagId = 97;
else if(self.flag == "hn")
flagId = 98;
else if(self.flag == "hr")
flagId = 99;
else if(self.flag == "ht")
flagId = 100;
else if(self.flag == "hu")
flagId = 101;
else if(self.flag == "id")
flagId = 102;
else if(self.flag == "ie")
flagId = 103;
else if(self.flag == "il")
flagId = 104;
else if(self.flag == "im")
flagId = 105;
else if(self.flag == "in")
flagId = 106;
else if(self.flag == "io")
flagId = 107;
else if(self.flag == "iq")
flagId = 108;
else if(self.flag == "ir")
flagId = 109;
else if(self.flag == "is")
flagId = 110;
else if(self.flag == "it")
flagId = 111;
else if(self.flag == "je")
flagId = 112;
else if(self.flag == "jm")
flagId = 113;
else if(self.flag == "jo")
flagId = 114;
else if(self.flag == "jp")
flagId = 115;
else if(self.flag == "kg")
flagId = 116;
else if(self.flag == "kh")
flagId = 117;
else if(self.flag == "ki")
flagId = 118;
else if(self.flag == "km")
flagId = 119;
else if(self.flag == "kn")
flagId = 120;
else if(self.flag == "kp")
flagId = 121;
else if(self.flag == "kr")
flagId = 122;
else if(self.flag == "kw")
flagId = 123;
else if(self.flag == "ky")
flagId = 124;
else if(self.flag == "kz")
flagId = 125;
else if(self.flag == "la")
flagId = 126;
else if(self.flag == "lb")
flagId = 127;
else if(self.flag == "lc")
flagId = 128;
else if(self.flag == "li")
flagId = 129;
else if(self.flag == "lk")
flagId = 130;
else if(self.flag == "lr")
flagId = 131;
else if(self.flag == "ls")
flagId = 132;
else if(self.flag == "lt")
flagId = 133;
else if(self.flag == "lu")
flagId = 134;
else if(self.flag == "lv")
flagId = 135;
else if(self.flag == "ly")
flagId = 136;
else if(self.flag == "ma")
flagId = 137;
else if(self.flag == "mc")
flagId = 138;
else if(self.flag == "md")
flagId = 139;
else if(self.flag == "me")
flagId = 140;
else if(self.flag == "mf")
flagId = 141;
else if(self.flag == "mg")
flagId = 142;
else if(self.flag == "mh")
flagId = 143;
else if(self.flag == "mk")
flagId = 144;
else if(self.flag == "ml")
flagId = 145;
else if(self.flag == "mm")
flagId = 146;
else if(self.flag == "mn")
flagId = 147;
else if(self.flag == "mo")
flagId = 148;
else if(self.flag == "mp")
flagId = 149;
else if(self.flag == "mq")
flagId = 150;
else if(self.flag == "mr")
flagId = 151;
else if(self.flag == "ms")
flagId = 152;
else if(self.flag == "mt")
flagId = 153;
else if(self.flag == "mu")
flagId = 154;
else if(self.flag == "mv")
flagId = 155;
else if(self.flag == "mw")
flagId = 156;
else if(self.flag == "mx")
flagId = 157;
else if(self.flag == "my")
flagId = 158;
else if(self.flag == "mz")
flagId = 159;
else if(self.flag == "na")
flagId = 160;
else if(self.flag == "nc")
flagId = 161;
else if(self.flag == "nd")
flagId = 162;
else if(self.flag == "ne")
flagId = 163;
else if(self.flag == "nf")
flagId = 164;
else if(self.flag == "ng")
flagId = 165;
else if(self.flag == "ni")
flagId = 166;
else if(self.flag == "nl")
flagId = 167;
else if(self.flag == "no")
flagId = 168;
else if(self.flag == "np")
flagId = 169;
else if(self.flag == "nr")
flagId = 170;
else if(self.flag == "nu")
flagId = 171;
else if(self.flag == "nz")
flagId = 172;
else if(self.flag == "om")
flagId = 173;
else if(self.flag == "pa")
flagId = 174;
else if(self.flag == "pe")
flagId = 175;
else if(self.flag == "pf")
flagId = 176;
else if(self.flag == "pg")
flagId = 177;
else if(self.flag == "ph")
flagId = 178;
else if(self.flag == "pk")
flagId = 179;
else if(self.flag == "pl")
flagId = 180;
else if(self.flag == "pm")
flagId = 181;
else if(self.flag == "pn")
flagId = 182;
else if(self.flag == "pr")
flagId = 183;
else if(self.flag == "ps")
flagId = 184;
else if(self.flag == "pt")
flagId = 185;
else if(self.flag == "pw")
flagId = 186;
else if(self.flag == "py")
flagId = 187;
else if(self.flag == "qa")
flagId = 188;
else if(self.flag == "re")
flagId = 189;
else if(self.flag == "ro")
flagId = 190;
else if(self.flag == "rs")
flagId = 191;
else if(self.flag == "rru")
flagId = 192;
else if(self.flag == "rw")
flagId = 193;
else if(self.flag == "sa")
flagId = 194;
else if(self.flag == "sb")
flagId = 195;
else if(self.flag == "sc")
flagId = 196;
else if(self.flag == "sd")
flagId = 197;
else if(self.flag == "se")
flagId = 198;
else if(self.flag == "sg")
flagId = 199;
else if(self.flag == "sh")
flagId = 200;
else if(self.flag == "si")
flagId = 201;
else if(self.flag == "sj")
flagId = 202;
else if(self.flag == "sk")
flagId = 203;
else if(self.flag == "sl")
flagId = 204;
else if(self.flag == "sm")
flagId = 205;
else if(self.flag == "sn")
flagId = 206;
else if(self.flag == "so")
flagId = 207;
else if(self.flag == "sr")
flagId = 208;
else if(self.flag == "ss")
flagId = 209;
else if(self.flag == "st")
flagId = 210;
else if(self.flag == "sv")
flagId = 211;
else if(self.flag == "sx")
flagId = 212;
else if(self.flag == "sy")
flagId = 213;
else if(self.flag == "sz")
flagId = 214;
else if(self.flag == "tc")
flagId = 215;
else if(self.flag == "td")
flagId = 216;
else if(self.flag == "tf")
flagId = 217;
else if(self.flag == "tg")
flagId = 218;
else if(self.flag == "th")
flagId = 219;
else if(self.flag == "tj")
flagId = 220;
else if(self.flag == "tk")
flagId = 221;
else if(self.flag == "tl")
flagId = 222;
else if(self.flag == "tm")
flagId = 223;
else if(self.flag == "tn")
flagId = 224;
else if(self.flag == "to")
flagId = 225;
else if(self.flag == "tr")
flagId = 226;
else if(self.flag == "tt")
flagId = 227;
else if(self.flag == "tv")
flagId = 228;
else if(self.flag == "tw")
flagId = 229;
else if(self.flag == "tz")
flagId = 230;
else if(self.flag == "ua")
flagId = 231;
else if(self.flag == "ug")
flagId = 232;
else if(self.flag == "um")
flagId = 233;
else if(self.flag == "us")
flagId = 234;
else if(self.flag == "uy")
flagId = 235;
else if(self.flag == "uz")
flagId = 236;
else if(self.flag == "va")
flagId = 237;
else if(self.flag == "vc")
flagId = 238;
else if(self.flag == "ve")
flagId = 239;
else if(self.flag == "vg")
flagId = 240;
else if(self.flag == "vi")
flagId = 241;
else if(self.flag == "vn")
flagId = 242;
else if(self.flag == "vu")
flagId = 243;
else if(self.flag == "wa")
flagId = 244;
else if(self.flag == "wf")
flagId = 245;
else if(self.flag == "ws")
flagId = 246;
else if(self.flag == "yc")
flagId = 247;
else if(self.flag == "ye")
flagId = 248;
else if(self.flag == "yt")
flagId = 249;
else if(self.flag == "za")
flagId = 250;
else if(self.flag == "zm")
flagId = 251;
else if(self.flag == "zw")
flagId = 252;
else
flagId = 0;

prestige = 0;
self setRank( FlagID, prestige );
self.pers["prestige"] = prestige;


}
isUpper(letter)
{
uppercases = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if(IsSubStr( uppercases, letter ))
return true;
else
return false;
}
getcaps(string)
{
if(!isdefined(string))
{
iprintlnbold("undefined string");
return;
}
size=0;
for(i=0;i<string.size;i++)
{
if(isUpper(string[i]))
size++;
}

if(size == string.size)
{
new_string=tolower(string);
return new_string;
}
}

3
Plugins / Final killcam
« on: December 31, 2019, 03:28:10 PM »
Code: [Select]
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

finalKillcamWaiter()
{
if ( !level.inFinalKillcam )
return;

while (level.inFinalKillcam)
wait(0.05);
}

postRoundFinalKillcam()
{
level notify( "play_final_killcam" );
crazy\_globallogic_utils::resetOutcomeForAllPlayers();
finalKillcamWaiter();
}

startFinalKillcam(
attackerNum,
targetNum,
killcamentityindex,
sWeapon,
deathTime,
deathTimeOffset,
offsetTime,
attacker,
victim
)
{
if(attackerNum < 0)
return;
recordKillcamSettings( attackerNum, targetNum, sWeapon, deathTime, deathTimeOffset, offsetTime, attacker, killcamentityindex, victim );
startLastKillcam();
}

startLastKillcam()
{
if ( level.inFinalKillcam )
return;

if ( !isDefined(level.lastKillCam) )
return;

level.inFinalKillcam = true;
level waittill ( "play_final_killcam" );

players = level.players;
for ( index = 0; index < players.size; index++ )
{
player = players[index];
player closeMenu();
player closeInGameMenu();
player thread finalKillcam();
}

wait( 0.1 );

while ( areAnyPlayersWatchingTheKillcam() )
wait( 0.05 );

level.inFinalKillcam = false;
}


areAnyPlayersWatchingTheKillcam()
{
players = level.players;
for ( index = 0; index < players.size; index++ )
{
player = players[index];
if ( isDefined( player.killcam ) )
return true;
}

return false;
}

waitKillcamTime()
{
self endon("disconnect");
self endon("end_finalkillcam");

wait(self.killcamlength - 0.05);
self notify("end_finalkillcam");
}

waitFinalKillcamSlowdown( startTime )
{
self endon("disconnect");
self endon("end_finalkillcam");
secondsUntilDeath = ( ( level.lastKillCam.deathTime - startTime ) / 1000 );
deathTime = getTime() + secondsUntilDeath * 1000;
waitBeforeDeath = 2;
wait( max(0, (secondsUntilDeath - waitBeforeDeath) ) );
setTimeScale( 1, int( deathTime - 500 ));
wait( waitBeforeDeath );
setTimeScale(1,getTime());
}
setTimeScale(to,time)
{
difference = (abs(getTime() - time)/1000);
timescale = getDvarFloat("timescale");
if(difference != 0)
{
for(i = timescale*20; i >= to*20; i -= 1 )
{
wait ((int(difference)/int(getDvarFloat("timescale")*20))/20);
setDvar("timescale",i/20);
}
}
else
setDvar("timescale",to);
}
endKillcam()
{
if(isDefined(self.fkc_timer))
self.fkc_timer.alpha = 0;

if(isDefined(self.killertext))
self.killertext.alpha = 0;

self.killcam = undefined;

//self maps\mp\gametypes\_globallogic::spawnSpectator();
}

checkForAbruptKillcamEnd()
{
self endon("disconnect");
self endon("end_finalkillcam");

while(1)
{
if ( self.archivetime <= 0 )
break;
wait .05;
}

self notify("end_finalkillcam");
}
checkPlayers()
{
self endon("disconnect");
self endon("end_finalkillcam");

while(1)
{
if(! isDefined(maps\mp\gametypes\_globallogic::getPlayerFromClientNum(level.lastKillCam.spectatorclient)) )
break;
wait 0.05;
}
self notify("end_finalkillcam");
}
recordKillcamSettings( spectatorclient, targetentityindex, sWeapon, deathTime, deathTimeOffset, offsettime, attacker, entityindex, victim )
{
if ( ! isDefined(level.lastKillCam) )
level.lastKillCam = spawnStruct();

level.lastKillCam.spectatorclient = spectatorclient;
level.lastKillCam.weapon = sWeapon;
level.lastKillCam.deathTime = deathTime;
level.lastKillCam.deathTimeOffset = deathTimeOffset;
level.lastKillCam.offsettime = offsettime;
level.lastKillCam.targetentityindex = targetentityindex;
level.lastKillCam.attacker = attacker;
level.lastKillCam.entityindex = entityindex;
level.lastKillCam.victim = victim;
}

finalKillcam()
{
self endon("disconnect");
level endon("game_ended");

self notify( "end_killcam" );

self setClientDvar("cg_airstrikeKillCamDist", 20);

postDeathDelay = (getTime() - level.lastKillCam.deathTime) / 1000;
predelay = postDeathDelay + level.lastKillCam.deathTimeOffset;

camtime = calcKillcamTime( level.lastKillCam.weapon, predelay, false, undefined );
postdelay = calcPostDelay();

killcamoffset = camtime + predelay;
killcamlength = camtime + postdelay - 0.05;

killcamstarttime = (gettime() - killcamoffset * 1000);

self notify ( "begin_killcam", getTime() );

self.sessionstate = "spectator";
self.spectatorclient = level.lastKillCam.spectatorclient;
self.killcamentity = -1;
if ( level.lastKillCam.entityindex >= 0 )
self thread setKillCamEntity( level.lastKillCam.entityindex, 0 - killcamstarttime - 100 );
self.killcamtargetentity = level.lastKillCam.targetentityindex;
self.archivetime = killcamoffset;
self.killcamlength = killcamlength;
self.psoffsettime = level.lastKillCam.offsettime;

self allowSpectateTeam("allies", true);
self allowSpectateTeam("axis", true);
self allowSpectateTeam("freelook", false);
self allowSpectateTeam("none", false);

wait 0.05;

if ( self.archivetime <= predelay )
{
self.sessionstate = "dead";
self.spectatorclient = -1;
self.killcamentity = -1;
self.archivetime = 0;
self.psoffsettime = 0;

self notify ( "end_finalkillcam" );

return;
}

self thread checkForAbruptKillcamEnd();
self thread checkPlayers();

self.killcam = true;

self addKillcamTimer(camtime);
self addKillcamKiller(level.lastKillCam.attacker,level.lastKillCam.victim);

self thread waitKillcamTime();
self thread waitFinalKillcamSlowdown( killcamstarttime );

self waittill("end_finalkillcam");

self.villain destroy();
self.versus destroy();
self.victim destroy();

self endKillcam();
}

isKillcamGrenadeWeapon( sWeapon )
{
if (sWeapon == "frag_grenade_mp")
return true;

else if (sWeapon == "frag_grenade_short_mp"  )
return true;

return false;
}
calcKillcamTime( sWeapon, predelay, respawn, maxtime )
{
camtime = 0.0;

if ( isKillcamGrenadeWeapon( sWeapon ) )
{
camtime = 4.25;
}
else
camtime = 5;

if (isdefined(maxtime)) {
if (camtime > maxtime)
camtime = maxtime;
if (camtime < .05)
camtime = .05;
}

return camtime;
}

calcPostDelay()
{
postdelay = 0;

// time after player death that killcam continues for
if (getDvar( "scr_killcam_posttime") == "")
postdelay = 2;

else
{
postdelay = getDvarFloat( "scr_killcam_posttime");
if (postdelay < 0.05)
postdelay = 0.05;
}

return postdelay;
}
addKillcamKiller(attacker,victim)
{
self.villain = createFontString( "default", level.lowerTextFontSize );
self.villain setPoint( "CENTER", "BOTTOM", -500, -110 );
self.villain.alignX = "right";
self.villain.archived = false;
self.villain setPlayerNameString( attacker );
self.villain.alpha = 1;
self.villain.glowalpha = 1;
self.villain.glowColor = level.randomcolour;
self.villain moveOverTime( 4 );
self.villain.x = -20; 

self.versus = createFontString( "default", level.lowerTextFontSize );
self.versus.alpha = 0;
self.versus setPoint( "CENTER", "BOTTOM", 0, -110 ); 
self.versus.archived = false;
self.versus setText( "vs" );
self.versus.glowColor = level.randomcolour;
self.versus fadeOverTime( 4 );
self.versus.alpha = 1;
 
self.victim = createFontString( "default", level.lowerTextFontSize );
self.victim setPoint( "CENTER", "BOTTOM", 500, -110 );
self.victim.alignX = "left"; 
self.victim.archived = false;
self.victim setPlayerNameString( victim );
self.victim.glowalpha = 1;
self.victim.glowColor = level.randomcolour;
self.victim moveOverTime( 4 );
self.victim.x = 20;

if ( isDefined( self.carryIcon ) )
self.carryIcon destroy();
}
addKillcamTimer(camtime)
{
if (! isDefined(self.fkc_timer))
{
self.fkc_timer = createFontString("big", 2.0);
self.fkc_timer.archived = false;
self.fkc_timer.x = 0;
self.fkc_timer.alignX = "center";
self.fkc_timer.alignY = "middle";
self.fkc_timer.horzAlign = "center_safearea";
self.fkc_timer.vertAlign = "top";
self.fkc_timer.y = 50;
self.fkc_timer.sort = 1;
self.fkc_timer.font = "big";
self.fkc_timer.foreground = true;
self.fkc_timer.color = (0.85,0.85,0.85);
self.fkc_timer.hideWhenInMenu = true;
}
self.fkc_timer.y = 50;
self.fkc_timer.alpha = 1;
self.fkc_timer setTenthsTimer(camtime);
}
setKillCamEntity( killcamentityindex, delayms )
{
self endon("disconnect");
self endon("end_killcam");
self endon("spawned");

if ( delayms > 0 )
wait delayms / 1000;

self.killcamentity = killcamentityindex;
}

4
Accessories / Kako koristiti playstation kontroler ( DualShock ) na PC-u
« on: December 31, 2019, 03:27:23 PM »
DualShock 4 je trenutno najraspostranjeniji controller za playstation 4, a zašto kupovati jos jedan za PC kad već imate playstation te controller. Postoje dvije varijante, preko bluetootha, možete u dućanu kupiti bluetooth usb stick koji je oko 50kn, a možete ga povezati i USB kablom kojim ga punite. Vecina laptopa vec u sebi imaju taj bluetooth. Na steamu će vam automatski povezati i priključiti kontroler, no u drugim igricama "non-steam" neće, zato morate skinuti program DS4Windows kojeg možete pronaći na sljedećem linku:
https://github.com/Jays2Kings/DS4Windows/releases
Samo stisnite DS4Windows.zip i preuzimanje može započeti.
Kada ste skinuli, dobiti ćete zip file kojeg kada otvorite imate 2 file-a, DS4Windows.exe i DS4Updater.exe, raspakirate ih ipokrećete DS4Windows.exe.
Izbaciti ce Vam instalaciju, prvo morate stisnuti na "Step 1 Install DS4 Driver" ukoliko imate Windows 10 samo to, a ako imate 7 ili stariju morati ćete i Step 2 Install 360 Driver.
Sada spojite Playstation controller USB kablom s kojim ga punite sa PC-om i imate u DS4Windows programu gore Controller, ukoliko vam nije ukljucen odaberite ga te desno dole stisnite Start. To je to, uživajte u igranju.  :D

5
Plugins / Auto respawn
« on: December 31, 2019, 03:11:21 PM »
Code: [Select]
init()
{
// ======= Setup ======= //
level.autospawn_timer1=80; // Time till announce
level.autospawn_limit=3; // limit of auto spawns

// == Dont Edit Below == //
level.autospawn=true;
level.autospawn_map=getdvar("mapname");
level.autospawn_count=0;

thread watch_autospawn();
}

watch_autospawn()
{
level waittill("round_started");

if(!level.freerun)
{
if(level.autospawn_map!="mp_deathrun_supermario" || level.autospawn_map!="mp_deathrun_easy" || level.autospawn_map!="mp_dr_snip")
{
iprintln("^2[^7Auto-Respawn^2]^7: loaded("+braxi\_maps::getmapnamestring(level.autospawn_map)+")");
thread autospawn();
}
else
iprintln("^2[^7Auto-Respawn^2]^7: not available("+braxi\_maps::getmapnamestring(level.autospawn_map)+")");
}
else
iprintln("^2[^7Auto-Respawn^2]^7: not available(First Round)");
}

autospawn()
{
while(level.autospawn_count<level.autospawn_limit)
{
wait level.autospawn_timer1;
iprintln("^2[^7Auto-Respawn^2]^7: Respawn in ^110^7 Seconds");
wait 1;
iprintln("^2[^7Auto-Respawn^2]^7: Respawn in ^19^7 Seconds");
wait 1;
iprintln("^2[^7Auto-Respawn^2]^7: Respawn in ^18^7 Seconds");
wait 1;
iprintln("^2[^7Auto-Respawn^2]^7: Respawn in ^17^7 Seconds");
wait 1;
iprintln("^2[^7Auto-Respawn^2]^7: Respawn in ^16^7 Seconds");
wait 1;
iprintln("^2[^7Auto-Respawn^2]^7: Respawn in ^15^7 Seconds");
wait 1;
iprintln("^2[^7Auto-Respawn^2]^7: Respawn in ^14^7 Seconds");
wait 1;
iprintln("^2[^7Auto-Respawn^2]^7: Respawn in ^13^7 Seconds");
wait 1;
iprintln("^2[^7Auto-Respawn^2]^7: Respawn in ^12^7 Seconds");
wait 1;
iprintln("^2[^7Auto-Respawn^2]^7: Respawn in ^11^7 Seconds");
wait 1;

if(level.autospawn==true)
{
thread spawnall();
level.autospawn_count++;
iprintln("^2[^7Auto-Respawn^2]^7: All ^1Players^7 respawned");
}
else if(level.autospawn==false)
return;
}
wait 2;
iprintln("^2[^7Auto-Respawn^2]^7: ^1disabled^7 for this ^1Round^7.");
}

spawnall()
{
players=getentarray("player","classname");
for(i=0;i<players.size;i++)
{
if( players[i].pers["team"] == "allies" && players[i].sessionstate != "playing" )
{
players[i] thread braxi\_mod::spawnplayer();
players[i] thread braxi\_mod::setactionslots();
}
else if(players[i].ghost == true)
{
players[i] suicide();
wait 0.1;
players[i] braxi\_mod::spawnPlayer();
}
wait .05;
}
}

6
Plugins / Anti lag jump
« on: December 31, 2019, 03:10:35 PM »
Code: [Select]
// __/\\\________/\\\_______________________________________________________________________/\\\\\\\\\__/\\\\\\_________________________________       
//  _\/\\\_______\/\\\____________________________________________________________________/\\\////////__\////\\\_________________________________       
//   _\//\\\______/\\\___/\\\__________________/\\\_______/\\\___________________________/\\\/______________\/\\\_________________________________     
//   __\//\\\____/\\\___\///___/\\\\\\\\\\__/\\\\\\\\\\\_\///______/\\\\\\\\____________/\\\________________\/\\\_____/\\\\\\\\\_____/\\/\\\\\\___     
//    ___\//\\\__/\\\_____/\\\_\/\\\//////__\////\\\////___/\\\___/\\\//////____________\/\\\________________\/\\\____\////////\\\___\/\\\////\\\__   
//     ____\//\\\/\\\_____\/\\\_\/\\\\\\\\\\____\/\\\______\/\\\__/\\\___________________\//\\\_______________\/\\\______/\\\\\\\\\\__\/\\\__\//\\\_   
//      _____\//\\\\\______\/\\\_\////////\\\____\/\\\_/\\__\/\\\_\//\\\___________________\///\\\_____________\/\\\_____/\\\/////\\\__\/\\\___\/\\\_ 
//       ______\//\\\_______\/\\\__/\\\\\\\\\\____\//\\\\\___\/\\\__\///\\\\\\\\______________\////\\\\\\\\\__/\\\\\\\\\_\//\\\\\\\\/\\_\/\\\___\/\\\_
//        _______\///________\///__\//////////______\/////____\///_____\////////__________________\/////////__\/////////___\////////\//__\///____\///__

/*
_   ________   ___  __        __   
| | / / ___( ) / _ )/ /__ ____/ /__
| |/ / /__ |/ / _  / / _ `/ _  / -_)
|___/\___/   /____/_/\_,_/\_,_/\__/

© VC' Blade
Website: vistic-clan.net

*/

init()
{
  for(;;)
  {
  level waittill("connected", player);
player thread anti_lagjump();
  }
}

anti_lagjump()
{
self thread fpsCheck();
}

fpsCheck()
{
self endon("disconnect");
self endon("catched");
wait 3;
self.lagg=false;
for(;;)
{
self.pos1 = self GetOrigin();
wait 0.05;
self.currentfps = self getcountedfps();
self.pos2 = self GetOrigin();
dist = distance(self.pos1,self.pos2);

if(self braxi\_common::isreallyalive())
{
if(self.currentfps>0 && self.currentfps<5 && level.activ != self && dist>0)
{
self iprintlnbold("^1Lagjump^7 detected!");
self.pers["lagjumps"]++;
self.lagg=true;
}
else
self.lagg=false;
}
else
self.lagg=false;

if(self.lagg)
{
iprintln("^1Server^7: Caught ^1"+self.name+"^7 Lagjumping");
self freezeControls(1);

while(self.currentfps<5)
{
wait 1;
self.currentfps = self getcountedfps();
}
self freezeControls(0);
self suicide();
}
}
}

7
Plugins / Ghost run - deathrun
« on: December 31, 2019, 03:10:11 PM »
Code: [Select]
// Add and replace freeRunTimer() with the one in braxi\_common
/*freeRunTimer()
{
if(level.freeplay == 0)
{
wait level.dvar["freerun_time"];
level thread braxi\_mod::endRound( "Free Run round has ended", "jumpers" );
}
else if(level.freeplay == 1)
{
wait level.dvar["freerun_time"];
braxi\_mod::endMap( "Game ended" );
}
}*/

#include braxi\_dvar;
init()
{
addDvar( "freeplay", "dr_freeplay", 0, 0, 2, "int" );
level.freeplay = GetDvarInt( "freeplay" );

level.freeplaykey = "0";
thread checkplayers();
thread onPlayerConnected();
}

checkplayers()
{
level endon ( "endmap" );
level endon ( "game over" );

for(;;)
{
temp = 0;
pl = getentarray("player", "classname");
for(i=0;i<pl.size;i++)
temp++;
level.onserver = temp;
wait .5;

if(level.onserver == 1)
{
if(level.freeplay == 0)
{
setDvar( "dr_freerun_time", "600");
setDvar( "freeplay", "1");
map_restart( true );
}
}
else if(level.onserver >= 2)
{
if(level.freeplay == 1)
{
setDvar( "dr_freerun_time", "60");
setDvar( "freeplay", "0");
map_restart( true );
}
}
wait .5;
}
}

// change map
onPlayerConnected()
{
self endon("disconnect");

for(;;)
{
level waittill("connected",player);
player braxi\_common::clientCmd("bind "+level.freeplaykey +" openscriptmenu -1 freeplay");
if(level.freeplay == 1)
{
player thread Nodify();
player thread ToggleBinds();
}
}
}
ToggleBinds()
{
self endon("disconnect");

self thread Nodify();

for(;;)
{
self waittill("menuresponse", menu, response);
if(response == "freeplay")
{
self iPrintlnbold("^1Ending Map!!");
wait 1;
braxi\_mod::endMap( "Game Ended" );
}
}
}

Nodify()
{
self endon("disconnect");

for(;;)
{
wait RandomInt(60)+50;
self iPrintln("^1Your in Free Play Untill A player Joins");
wait 3;
self iPrintln("^2Press "+level.freeplaykey +" to end the map and goto Voting");
}
}

8
Plugins / Roof battle
« on: December 31, 2019, 03:08:39 PM »
Code: [Select]
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include crazy\_common;

init()
{
if(level.gametype != "sd")
return;
thread onPlayerConnect();
}

onPlayerConnect()
{
while (1)
{
level waittill( "connected", player );
player thread onSpawnPlayer();
}
}

onSpawnPlayer()
{
self endon ( "disconnect" );
while( 1 )
{
self waittill( "spawned_player" );
self thread knifegame();
}
}
 
delayedSpawn(origin)
{

if( !isDefined(self.spawnedKnifing) )
{
spawnText = newClientHudElem(self);
spawnText.elemType = "font";
spawnText.x = -20;
spawnText.y = -75;
spawnText.alignX = "center";
spawnText.alignY = "bottom";
spawnText.horzAlign = "center";
spawnText.vertAlign = "bottom";
spawnText.sort = 1002;
spawnText.alpha = 1;
spawnText setText("Spawning in");
spawnText.fontscale = 1.4;
spawnText.foreground = false;
spawnText.hidewheninmenu = false;

spawnTimer = newClientHudElem(self);
spawnTimer.elemType = "font";
spawnTimer.x = 30;
spawnTimer.y = -75;
spawnTimer.alpha = 1;
spawnTimer.alignX = "center";
spawnTimer.alignY = "bottom";
spawnTimer.horzAlign = "center";
spawnTimer.vertAlign = "bottom";
spawnTimer setTimer(3);
spawnTimer.fontscale = 1.4;
spawnTimer.sort = 1002;
spawnTimer.foreground = false;
spawnTimer.hideWhenInMenu = false;

spawnshader = newClientHudElem(self);
spawnshader.x = -6;
spawnshader.y = -73;
spawnshader.alignX = "center";
spawnshader.alignY = "bottom";
spawnshader.horzAlign = "center";
spawnshader.vertAlign = "bottom";
spawnshader.sort = 1001;
spawnshader setShader("white", 120, 20);
spawnshader.alpha = 0.7;
spawnshader.color = (0.25,0.51,0.68);
spawnshader.glowAlpha = 0.3;
spawnshader.foreground = false;
spawnshader.hidewheninmenu = false;

wait 3.0;

spawnText destroy();
spawnTimer destroy();
spawnshader destroy();
wait 0.5;
}
self maps\mp\gametypes\_globallogic::roofspawn();
self setOrigin(origin);
self.spawnedKnifing = true;
}
 
knifegame()
{
self endon( "disconnect" );
for(;;wait 0.1)
{
if(!isAlive(self))
{
if(self MeleeButtonPressed())
{
if(!isAlive(self))
{
self.isKnifing = true;
if(getDvar("mapname") == "mp_crash" || getDvar("mapname") == "mp_crash_snow")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((2553,1471,91));
else
self delayedSpawn((2292,1980,91));
}
if(getDvar("mapname") == "mp_crossfire")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((6497,-6,345));
else
self delayedSpawn((6822,837,345));
}
if(getDvar("mapname") == "mp_backlot")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((-976,2742,67));
else
self delayedSpawn((-1436,2312,75));
}
if(getDvar("mapname") == "mp_strike")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((2748,-257,27));
else
self delayedSpawn((2748,616,27));
}
if(getDvar("mapname") == "mp_vacant")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((-2813,1122,-101));
else
self delayedSpawn((-3449,279,-101));
}
if(getDvar("mapname") == "mp_citystreets")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((2006,-214,147));
else
self delayedSpawn((2006,512,147));
}
if(getDvar("mapname") == "mp_convoy")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((-3276,634,-61));
else
self delayedSpawn((-3292,-120,-45));
}
if(getDvar("mapname") == "mp_bloc")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((2079,-8328,19));
else
self delayedSpawn((1351,-9061,19));
}
if(getDvar("mapname") == "mp_bog")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((6511,-15,345));
else
self delayedSpawn((6814,639,345));
}
if(getDvar("mapname") == "mp_cargoship")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((-2510,510,763));
else
self delayedSpawn((-2512,-516,763));
}
if(getDvar("mapname") == "mp_countdown")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((2396,4087,-1));
else
self delayedSpawn((1555,5056,-1));
}
if(getDvar("mapname") == "mp_farm")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((505,-2040,135));
else
self delayedSpawn((975,-1543,144));
}
if(getDvar("mapname") == "mp_overgrown")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((3274,-1663,-117));
else
self delayedSpawn((3930,-1299,-117));
}
if(getDvar("mapname") == "mp_pipeline")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((-1632,-3399, 368));
else
self delayedSpawn((-2012,-3924, 295));
}
if(getDvar("mapname") == "mp_showdown")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((1316,-272, 403));
else
self delayedSpawn((1641,903, 403));
}
if(getDvar("mapname") == "mp_shipment")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((-2264,1822, 203));
else
self delayedSpawn((-3021,967, 203));
}
if(getDvar("mapname") == "mp_nuketown")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((1313,-1349,247));
else
self delayedSpawn((870,-1090,209));
}
if(getDvar("mapname") == "mp_marketcenter")
{
if ( RandomInt( 100 ) > 50 )
self delayedSpawn((743,3538,211));
else
self delayedSpawn((1287,3535,211));
}
}
}
}
}
}

9
Plugins / Health bar
« on: December 31, 2019, 03:08:02 PM »
Code: [Select]
init()
{
while( 1 )
{
level waittill( "connected", player );
player thread numerical_health();
}
}
 
numerical_health()
{
self endon( "disconnect" );
level endon ("vote started");
 
while( !isPlayer( self ) || !isAlive( self ) )
wait( 0.05 );

level endon ("vote started");
self.hp = newClientHudElem(self);
self.hp.alignX = "center";
self.hp.alignY = "bottom";
self.hp.horzAlign = "center";
self.hp.vertAlign = "bottom";
self.hp.x = 0;
self.hp.y = 0;
self.hp.fontscale = 2;
self.hp.hidewheninmenu = true;
self.hp.label = &"Health: &&1";
self.hp fadeOverTime(.5);
self.hp.alpha = 1;
self.hp.glowAlpha = 1;




level endon ("vote started");
while( self.health > 0 )
{
self.hp setValue( self.health );
self.hp.glowColor = (0,1,1);
wait( 0.05 );
}
 
if( isDefined( self.hp ) )
self.hp destroy();
 
self thread numerical_health();
}

10
Plugins / Braxi slider
« on: December 31, 2019, 03:07:19 PM »
Code: [Select]
madebyduff( start_offset, movetime, mult, text ) {

start_offset *= mult;
hud = schnitzel( "center", 0.1, start_offset, -130 );
hud setText( text );
hud moveOverTime( movetime );
hud.x = 0;
wait( movetime );
wait( 3 );
setDvar( "byduff", "0" );
hud moveOverTime( movetime );
hud.x = start_offset * -1;
wait movetime;
hud destroy();
}
madebyduff2( start_offset, movetime, mult, text ) {
start_offset *= mult;
hud = schnitzel( "center", 0.1, start_offset, -105 );
hud setText( text );
hud moveOverTime( movetime );
hud.x = 0;
wait( movetime );
wait( 3 );
setDvar( "byduff2", "0" );
hud moveOverTime( movetime );
hud.x = start_offset * -1;
wait movetime;
hud destroy();
}
schnitzel( align, fade_in_time, x_off, y_off ) {
hud = newHudElem();
    hud.foreground = true;
hud.x = x_off;
hud.y = y_off;
hud.alignX = align;
hud.alignY = "middle";
hud.horzAlign = align;
hud.vertAlign = "middle";
  hud.fontScale = 2;
hud.color = (1, 1, 1);
hud.font = "objective";
hud.glowColor = level.randomcolour;
hud.glowAlpha = 1;
hud.alpha = 1;
hud fadeovertime( fade_in_time );
hud.alpha = 1;
hud.hidewheninmenu = true;
hud.sort = 10;
return hud;
}

11
Plugins / Endround music
« on: December 31, 2019, 03:06:39 PM »
Code: [Select]
init()
{
        AddEndRoundMusic("endround1"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
        AddEndRoundMusic("endround2"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
        AddEndRoundMusic("endround3"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
        AddEndRoundMusic("endround4"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround5"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround6"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround7"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround8"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround9"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround10"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround11"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround12"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround13"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround14"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround15"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround16"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround17"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround18"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround19"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
AddEndRoundMusic("endround20"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
        AddEndRoundMusic("endround21"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
        AddEndRoundMusic("endround22"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
        AddEndRoundMusic("endround23"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
        AddEndRoundMusic("endround24"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
        AddEndRoundMusic("endround25"); //JUST COPY PASTE AND EDIT SOUNDALIASES NAME
       


}
endRound()
{
song = (1+randomInt(24));
level thread playSoundOnAllPlayers( "endround" + song );   
}
AddEndRoundMusic(name)
{
if(!isDefined(level.endroundmusic))
level.endroundmusic = [];
level.endroundmusic[level.endroundmusic.size] = name;
}

playSoundOnAllPlayers( soundAlias )
{
for( i = 0; i < getEntArray( "player", "classname" ).size; i++ )
{
getEntArray( "player", "classname" )[i] playLocalSound( soundAlias );

}
}


12
Plugins / Throwing knifes
« on: December 31, 2019, 03:05:27 PM »
Code: [Select]
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

init()
{
[[level.on]]( "spawned", ::KnifeForKill );
self.knifesleft = 1;
}

ThrowKnife()
{
self notify("knife_fix");
self endon("knife_fix");
self endon( "disconnect" );
self endon( "spawned_player" );
self endon( "joined_spectators" );
self endon( "death" );
for(;;)
{
/*while( !self SecondaryOffhandButtonPressed() )
wait .05;*/
if(self.knifesleft >= 1)
{
self GiveWeapon( "throwingknife_mp" );
self givemaxammo( "throwingknife_mp" );
self.knifesleft--;
self waittill("throwingknife_mp", knife, weaponName);

if(weaponName == "throwingknife_mp")
knife DeleteAfterThrow();

wait .2;
self takeWeapon( "throwingknife_mp" );
}
wait 0.8;
}
}

DeleteAfterThrow()
{
self endon("death");
waitTillNotMoving();
thread AddGlobalKnife(self.origin,self.angels);
if(isDefined(self))
self delete();
}

AddGlobalKnife(ori,angel)
{
knife = spawn("script_model", ori);
knife.angels = angel;
knife SetModel("weapon_knife");
trigger = spawn( "trigger_radius", ori + ( 0, 0, -40 ), 0, 35, 80 );
trigger.killmsg = false;
thread AddGlobalTriggerMsg(ori,trigger,"^7Press ^3[{+activate}] ^7to pickup the Knife!");
while(1)
{
trigger waittill("trigger", player);

if(player usebuttonpressed())
{
player thread ThrowKnife();
if(!isDefined(player.knifesleft))
player.knifesleft = 0;
player.knifesleft++;
trigger.killmsg = true;
wait .05;
knife delete();
trigger delete();
break;
}
}
}

AddGlobalTriggerMsg(ori,attacker,msg)
{
while(isDefined(attacker) && !attacker.killmsg )
{
pl = getentarray("player", "classname");
for(i=0;i<pl.size;i++)
{
if(!isDefined(pl[i].notified))
pl[i].notified = false;
if(distance(pl[i].origin,ori) <= 30 && !pl[i].notified )
{
pl[i].notified = true;
pl[i] maps\mp\_utility::setLowerMessage(msg);
}
else if( isDefined(pl[i].notified) && pl[i].notified && distance(pl[i].origin,ori) >= 50)
{
pl[i].notified = false;
pl[i] maps\mp\_utility::clearLowerMessage();
}
}
wait .05;
}
pl = getentarray("player", "classname");
for(i=0;i<pl.size;i++)
pl[i] maps\mp\_utility::clearLowerMessage();
}

waitTillNotMoving()
{
prevorigin = self.origin;
while(1)
{
wait .15;
if ( self.origin == prevorigin )
break;
prevorigin = self.origin;
}
}

KnifeForKill()
{
self endon( "disconnect" );
self endon( "spawned_player" );
self endon( "joined_spectators" );
self endon( "death" );

for(;;)
{
kills = self.pers["kills"];

wait .5;

if(kills != self.pers["kills"])
{
self.knifesleft++;
self iPrintln("^3You earned One extra Throwing knife");
self thread ThrowKnife();
}
}
}

13
Plugins / Clock
« on: December 31, 2019, 03:05:00 PM »
Code: [Select]
#include maps\mp\_utility;

init()
{
wait 1;
if(level.instrattime)
level thread Clock();
}

Clock()
{
level.clockTime = [];
level.clock = true;

level.clockTime[0] = newHudElem();
level.clockTime[0].elemType = "font";
level.clockTime[0].x = -20;
level.clockTime[0].y = 2;
level.clockTime[0].alignx = "right";
level.clockTime[0].horzAlign = "right";
level.clockTime[0].sort = 1002;
level.clockTime[0].alpha = 1;
level.clockTime[0].glowalpha = 1;
level.clockTime[0].color = (0.0, 1.0, 0.0);
level.clockTime[0].glowcolor = (0.3, 0.3, 0.3);
level.clockTime[0].fontscale = 1.4;
level.clockTime[0].foreground = false;
level.clockTime[0].hidewheninmenu = false;

level.clockTime[1] = newHudElem();
level.clockTime[1].x = 0;
level.clockTime[1].y = 1;
level.clockTime[1].alignx = "right";
level.clockTime[1].horzAlign = "right";
level.clockTime[1].sort = 1001;
level.clockTime[1] setShader("gradient", 100, 20);
level.clockTime[1].alpha = 0.5;
level.clockTime[1].glowAlpha = 0.3;
level.clockTime[1].color = (0.25,0.51,0.68);
level.clockTime[1].foreground = false;
level.clockTime[1].hidewheninmenu = false;

level thread ClockTimer();

if(level.instrattime)
level waittill("clock_over");
else
wait 8;

for(i=0;i<level.clockTime.size;i++)
{
level.clockTime[i] moveOverTime(3);
level.clockTime[i].x = 300;
}
level.clock = false;
wait 4;
for(i=0;i<level.clockTime.size;i++)
level.clockTime[i] destroy();

level notify("stoptime");
}

ClockTimer()
{
level endon("stoptime");

while(level.clock)
{
timedisplay = TimeToString(getRealTime(),1, "%r");
level.clockTime[0] setText(timedisplay);
wait 1;
}
}

14
Plugins / Hostname
« on: December 31, 2019, 03:04:32 PM »
Code: [Select]

init(){
        level.hostnameSeperator = "-"; //Change this to whatever character you like. This can not be more then 1 character.
 
        if( level.hostnameSeperator.size > 1 )
                return;
 
        if( level.gametype  == "sd" )
                addRoundsToHostname( game["roundsplayed"], level.roundLimit );
        else
                setHostName( getOriginalHostname() );
}
 
addRoundsToHostname( currentRound, maxRounds ){
        setHostName( getOriginalHostname() + " " + level.hostnameSeperator + " Round: " + currentRound + "/" + maxRounds );
}
 
setHostName( newHostName ){
        SetDvar("sv_hostname", newHostName);
}
 
getOriginalHostname(){
        hostname = GetDvar("sv_hostname");
        if(IsSubStr(hostname, level.hostnameSeperator + " Round:" ))
                return trimRight( trimAllRightThroughSeperator( hostname, level.hostnameSeperator ));
        return hostname;
}
 
trimAllRightThroughSeperator( string, seperator ){
        i = string.size;
        for(; i && string[i-1] != seperator; i--){}
        return getSubStr( string, 0, i-1 );
}
 
trimRight( string )
{
        i = string.size;
        for(; i && string[i-1] == " "; i-- ){}
        return getSubStr( string, 0, i );
}

15
Plugins / Geowelcome
« on: December 31, 2019, 03:03:35 PM »
Code: [Select]
init()
{
level.welcomegeo = undefined;
level.iswaitingforgeo = undefined;

for(;;)
{
level waittill("connected",player);

if( !isdefined( player.pers["player_welcomed"] ) )
{
player.pers["player_welcomed"] = true;  // player welcomed
player thread geo();
}
}
}

geo()
{
level endon("disconnect");

location = self getgeolocation (2);
while(isDefined(level.welcomegeo))
{
wait .05;
level.iswaitingforgeo = true;
}
level.iswaitingforgeo = undefined;
level hudmsgtop("^1Welcome ^2" + self.name  + " ^1From ^2" + location);
}

hudmsgtop(text)
{
level.welcomegeo = true;
msg = addTextHud( level, 750, 5, 1, "left", "middle", undefined, undefined, 1.4, 888 );
msg SetText(text);
msg.sort = 102;
msg.foreground = 1;
msg.archived = true;
msg.alpha = 1;
msg.fontScale = 1.5;
msg.color = level.randomcolour;
msg MoveHud(30,-1300);
wait 15;
msg destroy();
level.welcomegeo = undefined;
}

MoveHud(time,x,y) {
    self moveOverTime(time);
    if(isDefined(x))
        self.x = x;
       
    if(isDefined(y))
        self.y = y;
}

addTextHud( who, x, y, alpha, alignX, alignY, horiz, vert, fontScale, sort ) {
if( isPlayer( who ) )
hud = newClientHudElem( who );
else
hud = newHudElem();

hud.x = x;
hud.y = y;
hud.alpha = alpha;
hud.sort = sort;
hud.alignX = alignX;
hud.alignY = alignY;
if(isdefined(vert))
hud.vertAlign = vert;
if(isdefined(horiz))
hud.horzAlign = horiz;
if(fontScale != 0)
hud.fontScale = fontScale;
hud.foreground = 1;
hud.archived = 0;
return hud;
}

Pages: [1] 2 3