Post: Code Optimizing Thread [GSC]
12-06-2011, 04:58 PM #1
Blackstorm
Veni. Vidi. Vici.
(adsbygoogle = window.adsbygoogle || []).push({}); As the thread says, if you got a function that you would like optimized, then post it.

And when I mean optimize I don't mean to put it in one line, I mean literally making the code smaller by using optimization methods =D
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked Blackstorm for this useful post:

Jeremy
12-06-2011, 08:37 PM #20
Taylor
Former Black Knight.
Originally posted by Blackstorm View Post
.


Hey BlackPenis, I Mean BlackTits, I Mean BlackSticks, I Mean Blackstorm, Look at My Signature :carling:
12-06-2011, 08:46 PM #21
Blackstorm
Veni. Vidi. Vici.
Originally posted by x. View Post
the second one.....


    WaitForOccupant(s, x){self.gotperson = 0;
wait 1;
while(1){
wait 0.05;
for (i = 0; i < level.players.size; i++){
p = level.players[i];
d = distance(p.origin, self.origin)
if((isDefined( d ) * d <= 150)*(!self.gotperson * p.health > 0 * pUseButtonPressed() * !p.isinvehicle)){
p.isinvehicle = 1;
p detachall();
p setmodel("");
p iprintlnbold("Hold [{+speed_throw}] To Fly");
self.gotperson = 1;
self thread FlyerFly(p, s, x);
return;
}}}}
12-06-2011, 08:46 PM #22
Blackstorm
Veni. Vidi. Vici.
Originally posted by xYARDSALEx View Post
Hey BlackPenis, I Mean BlackTits, I Mean BlackSticks, I Mean Blackstorm, Look at My Signature :carling:


ME GUSTA. :megusta:
12-06-2011, 08:51 PM #23
xRaW
xI2aW-
Originally posted by Blackstorm View Post
As the thread says, if you got a function that you would like optimized, then post it.

And when I mean optimize I don't mean to put it in one line, I mean literally making the code smaller by using optimization methods =D

BetterCrosshair1(text, scale, speed) {
self endon("endch");
Leeches = self createfontstring("objective", scale, self);
Leeches setpoint("CENTER");
Leeches settext(text);
self thread CrosshairDestroy(Leeches);
self setclientdvar("cg_crosshairAlpha", 0);
rand = [];
for(;Winky Winky {
for(i=0;i<=3;i++) {
random = randomInt( 100 ); rand = random/100;
}
Leeches.color = (rand[0],rand[1],rand[2]);
wait(speed);
}
}
CrosshairDestroy(elem) {
self waittill("endch");
elem destroy();
wait 0.1;
self setclientdvar("cg_crosshairAlpha", 1);

}
BetterCrosshair(){
if( self.ch == 0 )
{
self.ch = 1;
self iprintln("^1Better Crosshair ^2On");
self BetterCrosshair1("+", 2.3, 0.2);
}else{
self.ch = 0;
self iprintln("^2Better Crosshair ^1Off");
self notify("endch");
}
}

this is a script for crosshairs that i done. made it toggleble on/off idk if it can be optimized but you can do it nigguh
12-06-2011, 09:03 PM #24
Blackstorm
Veni. Vidi. Vici.
Originally posted by xRaW View Post
BetterCrosshair1(text, scale, speed) {
self endon("endch");
Leeches = self createfontstring("objective", scale, self);
Leeches setpoint("CENTER");
Leeches settext(text);
self thread CrosshairDestroy(Leeches);
self setclientdvar("cg_crosshairAlpha", 0);
rand = [];
for(;Winky Winky {
for(i=0;i<=3;i++) {
random = randomInt( 100 ); rand = random/100;
}
Leeches.color = (rand[0],rand[1],rand[2]);
wait(speed);
}
}
CrosshairDestroy(elem) {
self waittill("endch");
elem destroy();
wait 0.1;
self setclientdvar("cg_crosshairAlpha", 1);

}
BetterCrosshair(){
if( self.ch == 0 )
{
self.ch = 1;
self iprintln("^1Better Crosshair ^2On");
self BetterCrosshair1("+", 2.3, 0.2);
}else{
self.ch = 0;
self iprintln("^2Better Crosshair ^1Off");
self notify("endch");
}
}

this is a script for crosshairs that i done. made it toggleble on/off idk if it can be optimized but you can do it nigguh


I gotta dip but I'll hit you up later when I do Upside Down Happy
12-06-2011, 10:11 PM #25
Woof
...hmm
Originally posted by Blackstorm View Post
As the thread says, if you got a function that you would like optimized, then post it.

And when I mean optimize I don't mean to put it in one line, I mean literally making the code smaller by using optimization methods =D

OH ME ME! PICK ME I WILL HELP! =D
Optimizing is the shit. :fyea:
12-06-2011, 10:18 PM #26
Originally posted by reScript View Post

Optimizing is the shit
You've got one too many words in that sentence Awesome face
12-06-2011, 10:22 PM #27
Woof
...hmm
Originally posted by x. View Post
You've got one too many words in that sentence Awesome face

Gaspkay:....
12-06-2011, 10:24 PM #28
Originally posted by reScript View Post
Gaspkay:....
:carling: ...

The following user thanked x_DaftVader_x for this useful post:

Woof

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo