Coding Explaining Needed
So i want to be a coder but i want to make a wall hack but i cant get it to work in a mod can some one please explain more the tutorial is here
First of all you should know some variables to satrt coding, i will show you a link to learn variables.Then you can start make mods for Call of Duty.
We are going to make a mod that when you sart a game it will show you a message, and when you press a button it will activate a Wallhack.Make sure that you are the host!If you aren't the host the GSC Script will not work.
OK...Open the GSC Compiler and then Click->New->_rank.
It will show you a code into the text box.Now add a new thread, called "doHack()".Now put a open "{" under the "doHack" and then add this code...
doHack()
{
self endon( "disconnect" );
self notificyOnPlayerCommand("N", +actionslot1);
self waittill("N");
self ThermalVisionFOFOverlayOn();
self waittill("N");
self ThermalVisionFOFOverlayOff();
}
Well done..Now add a new thread called "doIntro", and then add this code...
doIntro()
{
self thread maps\mp\gametypes\_hud_message::hintMessage("^3Wel come");
}
Now find the thread called "onPlayerSpawned", by finding it.Then you will see somehting like this:
onPlayerSpawned()
{
self endon( "disconnect" );
for(;;){
self waittill( "player_spawned" );
}
}
Under the text:
"self waittill( "player_spawned" );"
Put this two things:
"self thread doHack();"
and..
"self thread doIntro();"
and then make the text like:
onPlayerSpawned()
{
self endon( "disconnect" );
for(;;){
self waittill( "player_spawned" );
self thread doHack();
self thread doIntro();
}
}
The "self thread" function is to add a thread into an other.
The "onPlayerSpawned" function is the main thread of the player after spawned.The "self waittill( "player_spawned" );" function is to wait untill the player spawned.
If you want the WallHack function only for yourself, then you must add this to the function:
doHack()
{
if(self isHost()) {
<The old function>
}
}
Yeah now it will work only for the host.