Post: Script Freezing on me. Help!
10-05-2015, 01:17 AM #1
Alccx
Keeper
(adsbygoogle = window.adsbygoogle || []).push({}); I tried to make a gsc script where if you press right on the d-pad, It would save your current location and next time you spawn in from dying it would teleport you to that saved position.
but it keeps on freezing my console every time I spawn in.

    #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 monitorST();

if(self.st == true)
{
wait 1;
self setOrigin(sto);
}
}
}

monitorST()
{
self endon("disconnect");
self endon("death");
self.buttonReleased = true;
for(;Winky Winky
{
wait 0.01;
if(self actionslotfourbuttonpressed() == false)
{
self.buttonReleased = true;
}
else if(self actionslotfourbuttonpressed() == true && self.buttonReleased == true)
{
self thread SpawnTele();
self.buttonReleased = false;
}
}
}

SpawnTele()
{
sto = self.origin;
self iprintln("Spawn Tele set to " + sto);
}


Please help me! Thanks! Smile
Last edited by Alccx ; 10-05-2015 at 01:18 AM. Reason: Typo correction
10-05-2015, 01:45 AM #2
Chris
Former Staff
Originally posted by Alccx View Post
I tried to make a gsc script where if you press right on the d-pad, It would save your current location and next time you spawn in from dying it would teleport you to that saved position.
but it keeps on freezing my console every time I spawn in.

    #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 monitorST();

if(self.st == true)
{
wait 1;
self setOrigin(sto);
}
}
}

monitorST()
{
self endon("disconnect");
self endon("death");
self.buttonReleased = true;
for(;Winky Winky
{
wait 0.01;
if(self actionslotfourbuttonpressed() == false)
{
self.buttonReleased = true;
}
else if(self actionslotfourbuttonpressed() == true && self.buttonReleased == true)
{
self thread SpawnTele();
self.buttonReleased = false;
}
}
}

SpawnTele()
{
sto = self.origin;
self iprintln("Spawn Tele set to " + sto);
}


Please help me! Thanks! Smile


Thread moved to Black Ops 2 GSC Mods and Scripts Questions section.
10-05-2015, 09:16 PM #3
anthonything
Space Ninja
sto is a localized variable, meaning it is being set in two different contexts as different memory pointers. Try switching it to self.sto.
10-05-2015, 11:03 PM #4
oCmKs_4_LiFe
< ^ > < ^ >
So Just Like My Tactical Insertion Script? Smile
10-08-2015, 10:29 PM #5
itsSorrow
In my man cave
Originally posted by LiFe View Post
So Just Like My Tactical Insertion Script? Smile


What u mean? You mean save and load Facepalm
10-08-2015, 10:35 PM #6
oCmKs_4_LiFe
< ^ > < ^ >
Originally posted by GentleSlugger View Post
What u mean? You mean save and load Facepalm


no u skid. if u watched my videos u would see. i dont even know why ur here ur 13 and act like u know it all but in reality your just a copy paster kid so hop off my dick stop quoting me u scrub. lel

The following user thanked oCmKs_4_LiFe for this useful post:

FRINZ
10-08-2015, 11:03 PM #7
FRINZ
I’m too L33T
Originally posted by LiFe View Post
no u skid. if u watched my videos u would see. i dont even know why ur here ur 13 and act like u know it all but in reality your just a copy paster kid so hop off my dick stop quoting me u scrub. lel


this sctually made the min i read it c: Geo
10-08-2015, 11:14 PM #8
itsSorrow
In my man cave
Originally posted by LiFe View Post
no u skid. if u watched my videos u would see. i dont even know why ur here ur 13 and act like u know it all but in reality your just a copy paster kid so hop off my dick stop quoting me u scrub. lel


Your videos are absolute shit. Who the fuck cares if you are at a nightclub? No One. I don't act like I know all anymore you would know that but your to busy being a fuck boy.
10-08-2015, 11:29 PM #9
oCmKs_4_LiFe
< ^ > < ^ >
Originally posted by GentleSlugger View Post
Your videos are absolute shit. Who the fuck cares if you are at a nightclub? No One. I don't act like I know all anymore you would know that but your to busy being a fuck boy.


kid every post on here u have a comment on talking utter nonsense. please go to bed now u have school in the morning. u cant code gsc so why are u here? to troll people? yeah GTFO randy.
10-08-2015, 11:35 PM #10
itsSorrow
In my man cave
Originally posted by LiFe View Post
kid every post on here u have a comment on talking utter nonsense. please go to bed now u have school in the morning. u cant code gsc so why are u here? to troll people? yeah GTFO randy.


Lmfao maybe where you are from its time to sleep but its not even 9 pm for me. I actually can code gsc fyi theres a lot of people here who cannot fucking code.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo