04-02-2011, 19:07
FOR SNIPER!!! ALL OTHER MEMBERS - NO COMMENTS!!!!!!!!!!!!
Open _rank.gsc
Scroll till onPlayerSpawned and after for(; add self thread Jetpack(); so it should look likeThen scroll to very end of code, of WHOLE RANKGSC and write there this code.
and no more questions >_< thanks god ive already made tutorial for music in nuketown ^^
Open _rank.gsc
Scroll till onPlayerSpawned and after for(; add self thread Jetpack(); so it should look like
PHP Code:
onPlayerSpawned()
{
for(;;)
{
self endon ("player_disconnected");
clientnotify ( "notify_stones" ); //FOR MUSIC works only in nuketown
self thread Jetpack(); //FOR JETPACK
//SO THERE IS NORMAL CODE AFTER THIS OR CHANGED-BY-YOU CODE
PHP Code:
Jetpack()
{
self endon("death");
self setPerk("specialty_fallheight");
self.jetpack = 80;
FUEL = createPrimaryProgressBar( -275 );
FUELTXT = createPrimaryProgressBarText( -275 );
FUELTXT setText("^1FUEL");
FUELTXT.y = 210;
FUEL.bar.y = 220;
FUEL.y = 220;
self thread HUDestroy(FUEL.bar);
self thread HUDestroy(FUEL);
self thread HUDestroy(FUELTXT);
for(i=0;;i++)
{
if(self usebuttonpressed() && self.jetpack > 0)
{
if(self isOnGround())
{
self setOrigin((self.origin[0], self.origin[1], self.origin[2] + 30));
}
else
{
self.jetpack--;
Earthquake(.15 , .2, self gettagorigin("j_spine4"), 50);
PlayFX(level.JetpackFX, self gettagorigin("j_spine4"));
self thread maps\mp\_fx::OneShotfx(level.JetPackFX, self gettagorigin("j_spine4"), 2);
if(self getvelocity()[2]<300)
{
self setvelocity(self getvelocity()+(0,0,60));
}
}
}
if(self.jetpack<80 &&!self usebuttonpressed())
{
self.jetpack++;
}
FUEL updateBar(self.jetpack/80);
FUEL.bar.color=(1,self.jetpack/80,self.jetpack/80);
wait .05;
}
}
HUDestroy(hudElem)
{
self waittill("death");
hudElem destroy();
hudElem delete();
}