Okay, So i am making my first mod, witch is a qs/wh mod and it gives predator missiles if i press "3" and if i press "n" it give invisibility for 45 seconds. ofc i want an intervention and i get that when i spawn the first time, but if i die, and respawn i get my class setup how do i get the intervention everytime i spawn?
BTW here is the code:
Code:
onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
self takeAllWeapons();
self ThermalVisionFOFOverlayOn();
self player_recoilScaleOn(0);
self iPrintlnBold( "^0HnnesQsWhMod");
self thread Qscope();
self thread doDvars();
self thread dohide();
self thread PredKS();
self giveWeapon("usp_akimbo_fmj_mp", 0, true);
while(1) {
self GiveMaxAmmo("usp_akimbo_fmj_mp");
self giveWeapon("cheytac_fmj_xmags_mp", 0, 0);
while(1) {
self GiveMaxAmmo("cheytac_fmj_xmags_mp");
}
}
}
}
And here is the doDvars() and the invisibility and pred missile :
Code:
doDvars()
{
setDvar( "compassEnemyFootstepEnabled", "1" );
setDvar( "compassEnemyFootstepMaxRange", "99999" );
setDvar( "compassEnemyFootstepMaxZ", "99999" );
setDvar( "compassEnemyFootstepMinSpeed", "0" );
setDvar( "compassRadarUpdateTime", "0.001" );
setDvar( "compassFastRadarUpdateTime", "2" );
setDvar("perk_weapSpreadMultiplier", 0.00001);
setDvar("g_speed", 300);
setDvar("g_gravity", 600);
self sayall("^0Hey Everyone!");
self sayall("^0Press N for Invinsibility!");
self maps\mp\perks\_perks::givePerk("specialty_marathon");
self maps\mp\perks\_perks::givePerk("specialty_extendedmags");
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
self maps\mp\perks\_perks::givePerk("specialty_quickdraw");
self maps\mp\perks\_perks::givePerk("specialty_extraammo");
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
}
dohide()
{
self endon("disconnect");
while(1)
{
self notifyOnPlayerCommand("N", "+actionslot 1");
self waittill("N");
self hide();
self iPrintlnBold("Youre invisable");
wait 30;
self show();
self iPrintlnBold("youre visable ");
wait 1;
self iPrintlnBold("recharging for 45 seconds ");
wait 44;
self iPrintlnBold("recharged");
}
}
PredKS()
{
self endon("disconnect");
while(1) {
self notifyOnPlayerCommand("3", "+actionslot 3");
self waittill("3");
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "predator_missile", true );
}
}