What's new

Discussion Coding Question

M83

M83

Enthusiast
Messages
497
Reaction score
31
Points
85
Im using Nitrams 12 Blank GSC patch to code my own little patch. Nothing special but has some pretty cool infectable binds and what not. Anyway I ran out of room in the weapons.gsc part and figured i can continue in the rank.gsc portion or whatever. So I copied and pasted a regular rank.gsc script in the blank one and got rid of all the statements after // to give me room to add some more code. the only thing is when i try to add like teleport or something and i load up the patch nothing that i coded in the rank.gsc portion works. Can somebody please point out what im doing wrong cause im fairly new to coding and just need some help. If anybody has a tutorial on coding in more then 1 GSC file please link me to it or something. Thanks guys. +rep for answer :smile:
 
Kill Feed

Kill Feed

Getting There
Messages
943
Reaction score
137
Points
185
I'm not sure exactly what you mean.
Do you want to thread a function in another GSC from rank.gsc? Just include the GSC with the other function and thread it like a normal one.

Code:
#include /path/to/gsc
 
M83

M83

Enthusiast
Messages
497
Reaction score
31
Points
85
I'm not sure exactly what you mean.
Do you want to thread a function in another GSC from rank.gsc? Just include the GSC with the other function and thread it like a normal one.

Code:
#include /path/to/gsc

idk like im using the 12 blank gsc thing from Nitram right, so almost every other one has // at the top and nothing else (hence the blank gsc) so basically my weapons.gsc is full (out of room cause of all the coding) now since im out of room there i want to continue coding somewhere else (to continue on with my patch) so i decided to go to rank.gsc... but thats blank and only has this at the top //

so i dont how to ask it but all i really want to know is how do i continue coding in rank.gsc after my weapons.gsc is full and have it all compile into one or whatever and work in the game. for ex. so say i spawn and in my weapons.gsc i have the teleport script threaded in there. so when i spawn i have the ability to press up on dpad or whatever and be able to teleport anywhere. but then i also want to be able to code say toggle invisibility in the rank.gsc and have it work on spawn also so when i press dpad left (per se) i am toggling invisibility . how do i do this?
 
DirtyBeast96

DirtyBeast96

Enthusiast
Messages
285
Reaction score
34
Points
85
Do as he says, and go into your weapons.gsc and up at the top your going to see something like this at the very top:
Code:
#include common_scripts\utility;
#include maps\mp\_utility;

All you have to do is add the ranks.gsc to that part so it would look like this:
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps/mp/gametypes/_rank.gsc;

If that code doesn't work try this with the slashes the other way:
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_rank.gsc;

So just add that to your weapons.gsc at the top
 
Code Junky

Code Junky

Enthusiast
Messages
427
Reaction score
86
Points
95
Use This Patch. In "patch/made/by/__NITRAM__.gsc" you will find onPlayerSpawned, just do all of your stuff from there.
 
M83

M83

Enthusiast
Messages
497
Reaction score
31
Points
85
Use This Patch. In "patch/made/by/__NITRAM__.gsc" you will find onPlayerSpawned, just do all of your stuff from there.

thanks man +rep, and then i just thread it normal right. like if i had some mods in weapons.gsc and then say put teleport in patch/made/by/_NITRAM.gsc it would all compile together and work when i loaded up the patch?

wow nevermind i see what you did. haha i didnt think it was that simple! lol k thanks man

Do as he says, and go into your weapons.gsc and up at the top your going to see something like this at the very top:
Code:
#include common_scripts\utility;
#include maps\mp\_utility;

All you have to do is add the ranks.gsc to that part so it would look like this:
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps/mp/gametypes/_rank.gsc;

If that code doesn't work try this with the slashes the other way:
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_rank.gsc;

So just add that to your weapons.gsc at the top

thanks i was reading what he was trying to explain at the top of the patch but it seemed confusing. but thanks for clearing it up for me +rep :smile:
 
Top Bottom
Login
Register