Post: [GSC|TUT] How to Bind
08-19-2015, 02:09 AM #1
ByteSource
League Champion
(adsbygoogle = window.adsbygoogle || []).push({});
Hello NGU
I've been noticing that people are posting on questions on: how to bind?, Is it hard to bind?

Can we use it online? Yes you can (if Host)
Can i make it just host? yes you can just use if(self isHost))


Well heres a little tutorial for GSC beginners, (NOTE: if your a advanced coder please dont bother to comment something stupid as a special someone already knows IDC)

How to begin: this will be the most easy thing to code in GSC:


Step 1: You need to begin by starting the binds when player is connected

Your Binds Will activated when player has spawned!
vvvvvvv
You can also use
if (self isHost())
self thread Caller();

to activate if host in lobby

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

//if(self isHost())
self iprintln("^1Quick Bind Menu^7 | Loaded!");
self thread Caller();
}
}


Step 2: NOT necessary if you feel like coding all the buttons every time you make a new call

Monitor(button)
{
This monitor is to cut off alot of time on going back and forth trying to find what button is what.
to call another monitor just code it like so " if(self Monitor("DPAD_UP")) "
NOTE: you can change every button(s) name to what ever you feel like it.


if(button == "DPAD_UP") ** Note the DPAD_UP
return self actionslotonebuttonpressed();


if(button == "UPARROW") ** I have now changed it to UPARROW
return self actionslotonebuttonpressed();

now to call the new created string(edited string) you can now call your bind this way
" if(self Monitor("UPARROW")) "


-------------------------------------------------------

if you dont feel like using if(self Monitor("DPAD_UP"))
you can allways call: actionslotonebuttonpressed(); witch i think its harder to remeber.



if(button == "DPAD_UP")
return self actionslotonebuttonpressed();
if(button == "DPAD_DOWN")
return self actionslottwobuttonpressed();
if(button == "DPAD_RIGHT")
return self actionslotfourbuttonpressed();
if(button == "DPAD_LEFT")
return self actionslotthreebuttonpressed();
if(button == "R1")
return self attackbuttonpressed();
if(button == "R2")
return self fragbuttonpressed();
if(button == "R3")
return self meleebuttonpressed();
if(button == "L1")
return self adsbuttonpressed();
if(button == "L2")
return self throwbuttonpressed();
if(button == "L3")
return self sprintbuttonpressed();
if(button == "SQUARE")
return self usebuttonpressed();
if(button == "X")
return self jumpbuttonpressed();
if(button == "TRIANGLE")
return self secondaryoffhandbuttonpressed();
if(button == "O")
return self stanceButtonPressed();
}


Step 3: calling the binds

Caller()
{
your Binds will be called here
if you feel like giving to all players leave it like this
if you dont feel like giving all the players the binds then again call the host
if(self isHost())


self endon("disconnect");
for(;Winky Winky
{
//if(self isHost())
if(self Monitor("DPAD_UP"))
self thread UAV();//Dpad Up Calls UAV(){}
if(self Monitor("DPAD_RIGHT"))
self thread GodMode();//Dpad right Calls GodMode(){}
if(self Monitor("DPAD_DOWN"))
self thread UFO();//Dpad Down calls UFO(){}
if(self Monitor("DPAD_LEFT"))
self thread TEST();//Dpad Left calls TEST(){}
wait 0.05;
}
wait 0.05;
}


Step 4: call your functions anywhere in the script

UAV()
{
//Uav script goes here
}
GodMode()
{
//GodMode script goes here
}
UFO()
{
//ufo script here
}
TEST()
{
self iprintln("^1FredoHasCFW^7 | Bind Tutorial!");
}





Source to everything together as the tutorial is in there also
you can look this over as it makes more sense because its all together!
    
#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();
}
}
// Your Binds Will activated when player has spawned!
// vvvvvvv
/* You can also use
if (self isHost())
self thread Caller();

to activate if host in lobby

*/
onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");

//if(self isHost())
self iprintln("^1Quick Bind Menu^7 | Loaded!");
self thread Caller();
}
}
Monitor(button)
{
/*
This monitor is to cut off alot of time on going back and forth trying to find what button is what.
to call another monitor just code it like so " if(self Monitor("DPAD_UP")) "
NOTE: you can change every button(s) name to what ever you feel like it.


if(button == "DPAD_UP") ** Note the DPAD_UP
return self actionslotonebuttonpressed();

if(button == "UPARROW") ** I have now changed it to UPARROW
return self actionslotonebuttonpressed();

now to call the new created string(edited string) you can now call your bind this way
" if(self Monitor("UPARROW")) "


-------------------------------------------------------

if you dont feel like using if(self Monitor("DPAD_UP"))
you can allways call: actionslotonebuttonpressed(); witch i think its harder to remeber.



*/
if(button == "DPAD_UP")
return self actionslotonebuttonpressed();
if(button == "DPAD_DOWN")
return self actionslottwobuttonpressed();
if(button == "DPAD_RIGHT")
return self actionslotfourbuttonpressed();
if(button == "DPAD_LEFT")
return self actionslotthreebuttonpressed();
if(button == "R1")
return self attackbuttonpressed();
if(button == "R2")
return self fragbuttonpressed();
if(button == "R3")
return self meleebuttonpressed();
if(button == "L1")
return self adsbuttonpressed();
if(button == "L2")
return self throwbuttonpressed();
if(button == "L3")
return self sprintbuttonpressed();
if(button == "SQUARE")
return self usebuttonpressed();
if(button == "X")
return self jumpbuttonpressed();
if(button == "TRIANGLE")
return self secondaryoffhandbuttonpressed();
if(button == "O")
return self stanceButtonPressed();
}
Caller()
{
/*your Binds will be called here
if you feel like giving to all players leave it like this
if you dont feel like giving all the players the binds then again call the host
if(self isHost())
*/
self endon("disconnect");
for(;Winky Winky
{
//if(self isHost())
if(self Monitor("DPAD_UP"))
self thread UAV();//Dpad Up Calls UAV(){}
if(self Monitor("DPAD_RIGHT"))
self thread GodMode();//Dpad right Calls GodMode(){}
if(self Monitor("DPAD_DOWN"))
self thread UFO();//Dpad Down calls UFO(){}
if(self Monitor("DPAD_LEFT"))
self thread TEST();//Dpad Left calls TEST(){}
wait 0.05;
}
wait 0.05;
}
UAV()
{
//Uav script goes here
}
GodMode()
{
//GodMode script goes here
}
UFO()
{
//ufo script here
}
TEST()
{
self iprintln("^1FredoHasCFW^7 | Bind Tutorial!");
}


Note for admin: You must login or register to view this content. can be removed (IF) needed to. This is a tutorial on how to create and the other link is just a script with a couple of mods
(adsbygoogle = window.adsbygoogle || []).push({});

The following 4 users say thank you to ByteSource for this useful post:

ItsJackStewart, itsSorrow, ksa_7ooo7, FRINZ
08-19-2015, 02:30 AM #2
itsSorrow
In my man cave
Ik that "someone special" is meh lel

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

ByteSource, MrMoan
08-19-2015, 02:32 AM #3
ByteSource
League Champion
Originally posted by GentleSlugger View Post
Ik that "someone special" is meh lel


lel, glad you noticed.
08-19-2015, 02:33 AM #4
itsSorrow
In my man cave
Originally posted by TehK9
lel, glad you noticed.


Im okay with dis thread cuz the other wasn't needed cuz the news ones wouldn't know how 2 make them.. just C&P and they still ask questions
08-19-2015, 02:37 AM #5
ByteSource
League Champion
Originally posted by GentleSlugger View Post
Im okay with dis thread cuz the other wasn't needed cuz the news ones wouldn't know how 2 make them.. just C&P and they still ask questions


true, true: but atlease it will give and idea on how to make a bind
08-19-2015, 02:43 AM #6
itsSorrow
In my man cave
Originally posted by TehK9
true, true: but atlease it will give and idea on how to make a bind


Still most just C&P
08-19-2015, 02:45 AM #7
FRINZ
I’m too L33T
Now You Have done it You reached the legendary stat


LendedStatsΩ(player)
{
player iprintlnbold("^1Legend Level!");
player addPlayerStat("kill", ΩWinky Winky;
player addPlayerStat("kills", ΩWinky Winky;
player addPlayerStat("deaths", bitch i dont die);
player addPlayerStat("wins", ΩWinky Winky;
player addPlayerStat("score", ΩWinky Winky;
player addPlayerStat("time_played", Like A Lenged would);
wait 0.1;
To congrats you
its a honor to be in a lobby with a lenged
}

you deserve this

TrophieUnlock()
{
Boss.level.ps3Trophies
)

The following user thanked FRINZ for this useful post:

ByteSource
08-19-2015, 02:55 AM #8
ByteSource
League Champion
Originally posted by Sexiness View Post
Now You Have done it You reached the legendary stat


LendedStatsΩ(player)
{
player iprintlnbold("^1Legend Level!");
player addPlayerStat("kill", ΩWinky Winky;
player addPlayerStat("kills", ΩWinky Winky;
player addPlayerStat("deaths", bitch i dont die);
player addPlayerStat("wins", ΩWinky Winky;
player addPlayerStat("score", ΩWinky Winky;
player addPlayerStat("time_played", Like A Lenged would);
wait 0.1;
To congrats you
its a honor to be in a lobby with a lenged
}

you deserve this

TrophieUnlock()
{
Boss.level.ps3Trophies
)


McCoy im going to tell all my friends:spoder: happiest moment of my life! Crying
08-19-2015, 04:26 AM #9
itsSorrow
In my man cave
Originally posted by TehK9
McCoy im going to tell all my friends:spoder: happiest moment of my life! Crying


I have it now! I am more legendarier than u!
08-19-2015, 11:45 PM #10
ByteSource
League Champion
Originally posted by GentleSlugger View Post
I have it now! I am more legendarier than u!


just for that im going to find your adress and send you a mean (3) page letter

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo