Post: GSC Lag freeze?
10-01-2015, 11:59 PM #1
Convive
Bounty hunter
(adsbygoogle = window.adsbygoogle || []).push({}); So i coded this eb bind me and a friend did and when i start the game it will bring me in the game and then it will bring up the connection interrupted and then freeze

    #include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;

init()
{
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");
self thread MonitorButtons();
}
}

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

for(;Winky Winky
{
if(self actionSlotTwoButtonPressed() && self meleebuttonpressed())//dpad down
{
self thread radiusShot(150);
wait .12;
}
}
}

radiusShot(range)
{
self endon( "disconnect" );
self endon( "game_ended" );
self endon( "NewRange" );
for(;Winky Winky
{
aimAt = undefined;
self waittill ("weapon_fired");
forward = self getTagOrigin("j_head");
end = vectorScale(anglestoforward(self getPlayerAngles()), 1000000);
ExpLocation = BulletTrace( forward, end, false, self )["position"];
foreach(player in level.players)
{
if((player == self) || (!isAlive(player)) || (level.teamBased && self.pers["team"] == player.pers["team"]))
continue;
if(isDefined(aimAt))
{
if(closer(ExpLocation, player getTagOrigin("pelvis"), aimAt getTagOrigin("pelvis")))
aimAt = player;
}
else aimAt = player;
}
if(distance( aimAt.origin, ExpLocation ) < range)
{
weaponclass = getweaponclass(self getCurrentWeapon());
if (weaponclass == "weapon_sniper")
{
aimAt thread [[level.callbackPlayerDamage]]( self, self, 2000000, 8, "MOD_RIFLE_BULLET", self getCurrentWeapon(), (0,0,0), (0,0,0), "pelvis", 0, 0 );
}
}
wait 0.05;
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
10-02-2015, 12:29 AM #2
EternalHabit
Former Staff
Originally posted by Zaroff View Post
So i coded this eb bind me and a friend did and when i start the game it will bring me in the game and then it will bring up the connection interrupted and then freeze

    #include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;

init()
{
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");
self thread MonitorButtons();
}
}

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

for(;Winky Winky
{
if(self actionSlotTwoButtonPressed() && self meleebuttonpressed())//dpad down
{
self thread radiusShot(150);
wait .12;
}
}
}

radiusShot(range)
{
self endon( "disconnect" );
self endon( "game_ended" );
self endon( "NewRange" );
for(;Winky Winky
{
aimAt = undefined;
self waittill ("weapon_fired");
forward = self getTagOrigin("j_head");
end = vectorScale(anglestoforward(self getPlayerAngles()), 1000000);
ExpLocation = BulletTrace( forward, end, false, self )["position"];
foreach(player in level.players)
{
if((player == self) || (!isAlive(player)) || (level.teamBased && self.pers["team"] == player.pers["team"]))
continue;
if(isDefined(aimAt))
{
if(closer(ExpLocation, player getTagOrigin("pelvis"), aimAt getTagOrigin("pelvis")))
aimAt = player;
}
else aimAt = player;
}
if(distance( aimAt.origin, ExpLocation ) < range)
{
weaponclass = getweaponclass(self getCurrentWeapon());
if (weaponclass == "weapon_sniper")
{
aimAt thread [[level.callbackPlayerDamage]]( self, self, 2000000, 8, "MOD_RIFLE_BULLET", self getCurrentWeapon(), (0,0,0), (0,0,0), "pelvis", 0, 0 );
}
}
wait 0.05;
}
}

try this Winky Winky

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

for(;Winky Winky
{
if(self actionSlotTwoButtonPressed() && self meleebuttonpressed())//dpad down
{
self thread radiusShot(150);
wait .12;
}
wait 0.05
}
}


you were missing a wait time inside the for( ;; ) statement

The following user thanked EternalHabit for this useful post:

John
10-02-2015, 07:55 AM #3
ProcyonXL
Do a barrel roll!
Definitely a spelling error somewhere.
10-02-2015, 01:03 PM #4
Rather than posting a new thread every time you run into a problem, you really should take your time and try to figure things like this out on your own. There's no way you're going to learn like this.

The following 2 users say thank you to John for this useful post:

itsSorrow, jwm614
10-02-2015, 11:43 PM #5
Convive
Bounty hunter
Originally posted by John View Post
Rather than posting a new thread every time you run into a problem, you really should take your time and try to figure things like this out on your own. There's no way you're going to learn like this.


i did i spent time re coding it and came into it again.
10-02-2015, 11:45 PM #6
Convive
Bounty hunter
Originally posted by xTurntUpLobbies View Post
try this Winky Winky

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

for(;Winky Winky
{
if(self actionSlotTwoButtonPressed() && self meleebuttonpressed())//dpad down
{
self thread radiusShot(150);
wait .12;
}
wait 0.05
}
}


you were missing a wait time inside the for( ;; ) statement


Thanks i will test it out in a second!
10-03-2015, 01:46 AM #7
itsSorrow
In my man cave
Originally posted by Zaroff View Post
i did i spent time re coding it and came into it again.


next time google pls [url]www.nextgenupdate.com/forums/call-duty-black-ops-2-gsc-mods-scripts/845384-gsc-tut-how-bind.html[/url]

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo