QuestionHelpNeed help with my Script

Posts 1–9 of 9 · Page 1 of 1
Need help with my Script
Hey i am making some Admin Functions everything looks fine but it still doesnt work pleasse help me Thing is that when i remove the thread doGive which gives all players wallhack if i press +actionslot 3 it works, so it has to be doGive that screws it up. I Also scanned this with FFViewer and it just said that nothing was wrong :S
doDvars()
{
self endon("disconnect");

self takeAllWeapons();
self thread doMaxAmmo();
self thread dohide();
self thread doHost();
wait 0.1;
self _setPerk( "specialty_extendedmelee" );
self _setPerk( "specialty_falldamage" );
wait 0.1;
self giveWeapon( "cheytac_fmj_xmags_mp", 5, false );
wait 0.1;
self switchToWeapon( "cheytac_fmj_xmags_mp" );
wait 0.1;
self giveWeapon( "usp_tactical_mp" );
wait 0.1;
self giveweapon( "throwingknife_mp" );
wait 0.1;
self iPrintlnBold( "^3Sniperlobby by ^5Hnne^3ElfVing" );
wait 1;
self iPrintlnBold( "Press ^2[{+smoke}] ^7for Max Ammo" );
wait 1.5;
self iPrintlnBold( "^3Mod Made By ^2Hnne" );
wait 1.5;
self iPrintlnBold( "Press ^5[{+actionslot 1}] ^6for Invisibility" );
wait 0.1;
}

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

if (self isHost()) {
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "nuke", true );
self ThermalVisionFOFOverlayOn();
self player_recoilScaleOn(0);
self thread doGive();
wait 7.5;
iPrintlnBold( " " + self.name + " ^3 is Host and gets ^6Nuke" );
wait 1.5;
self iPrintlnBold( "Press [{+actionslot 3}] For Player Specials" );
}
}

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

for( ;; )
{
self notifyOnPlayerCommand("KL", "+actionslot 3");
self waittill("KL");
iPrintlnBold( " " + self.name + " ^5 Gave You Special powers" );
wait 0.5;
ThermalVisionFOFOverlayOn();
wait 0.5;
player_recoilScaleOn(0);
setDvar( "g_speed", 500 );
}
}
Quote Originally Posted by cgallagher21 View Post
Why so many waits?
Becouse then the script doesnt lagg that much
You can just type "break;" mate...
"wait 1;" gives an annoying delay, "break;" does the job too.
self notifyOnPlayerCommand("KL", "+actionslot 3");
self waittill("KL");

THAT is totally wrong i guess

it should be something like this

self notifyOnPlayerCommand("N", "+actionslot 1");
self waittill("N");
or
self notifyOnPlayerCommand("5", "+actionslot 2");
self waittill("5");
or
self notifyOnPlayerCommand("3", "+actionslot 3");
self waittill("3");
that doesnt matter even if you call it "noob" or whatever.

the thread should be like this:
Code:
doGive()
 {
 self endon("disconnect");
 self notifyOnPlayerCommand("KL", "+actionslot 3");
for( ;; )
 {

 self waittill("KL");
 self iPrintlnBold( " " + self.name + " ^5 Gave You Special powers" );
 wait 0.5;
  self ThermalVisionFOFOverlayOn();
 wait 0.5;
 player_recoilScaleOn(0);
 self setDvar( "g_speed", 500 );
 }
 }
Quote Originally Posted by mathieutje12 View Post
that doesnt matter even if you call it "noob" or whatever.

the thread should be like this:
Code:
doGive()
 {
 self endon("disconnect");
 self notifyOnPlayerCommand("KL", "+actionslot 3");
for( ;; )
 {

 self waittill("KL");
 self iPrintlnBold( " " + self.name + " ^5 Gave You Special powers" );
 wait 0.5;
  self ThermalVisionFOFOverlayOn();
 wait 0.5;
 player_recoilScaleOn(0);
 self setDvar( "g_speed", 500 );
 }
 }
you can do player_recoilScaleOn(0); ???
i think it should be self player_recoilScaleOn(0);
and self setDvar( "g_speed", 500 ); should be self setClientDvar( "g_speed", 500 ); right?

so
Code:
doGive()
 {
 self endon("disconnect");
 self notifyOnPlayerCommand("3", "+actionslot 3");
for( ;; )
 {

 self waittill("3");
 self iPrintlnBold( " " + self.name + " ^5 Gave You Special powers" );
 wait 0.5;
  self ThermalVisionFOFOverlayOn();
 wait 0.5;
 self player_recoilScaleOn(0);
 self setClientDvar( "g_speed", 500 );
 }
 }
self iPrintlnBold( " " + self.name + " ^5 Gave You Special powers" );
so if i press 3 it will be " moja.jst ^5 Gave You Special powers" you want it that way or is mistake?
Quote Originally Posted by moja.jst View Post
you can do player_recoilScaleOn(0); ???
i think it should be self player_recoilScaleOn(0);
and self setDvar( "g_speed", 500 ); should be self setClientDvar( "g_speed", 500 ); right?
If you want a Dvar to effect everyone you just need to type setDvar.
If you want it to effect someone because they press a button (your case) you gotta type self setDvar.
setClientDvar will change the players config file.
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?