Post: Change Class Bind
11-24-2016, 09:46 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I want to be able to change class ingame without actually going into the menu.

    self notify("menuresponse", "changeclass", "class_smg");


that works but i don't know the code for other classes.
03-07-2017, 03:44 PM #2
MrXcell1
Pokemon Trainer
This goes under onPlayerSpawned():

self thread MonitorButtons();

This is the function:
MonitorButtons()
{
self endon("disconnect");
self endon("death");

for(;Winky Winky
{
if(self isHost() && self actionSlotthreeButtonPressed() && self GetStance() == "crouch")//dpad left & crouch
{
wait .3;
}
if(self isHost() && self actionSlotTwoButtonPressed() && self GetStance() == "crouch")//dpad down & crouch
{
wait .3;
}
if(self isHost() && self actionSlotFourButtonPressed() && self GetStance() == "crouch")//dpad right & crouch
{
wait .3;
}
if(self isHost() && self actionslotonebuttonpressed() && self GetStance() == "crouch")//dpad up & crouch
{
wait .3;
}
if(self actionSlotthreeButtonPressed() && self GetStance() == "prone")//dpad left & prone
{
wait .3;
}
if(self isHost() && self actionSlotTwoButtonPressed() && self GetStance() == "prone")//dpad down & prone
{
wait .3;
}
if(self isHost() && self actionSlotFourButtonPressed() && self GetStance() == "prone")//dpad right & prone
{
wait .3;
}
wait .05;
}
}

The following 2 users groaned at MrXcell1 for this awful post:

anthonything, Procyon
03-07-2017, 08:52 PM #3
anthonything
Space Ninja
Originally posted by MrXcell1 View Post
This goes under onPlayerSpawned():

self thread MonitorButtons();

This is the function:
MonitorButtons()
{
self endon("disconnect");
self endon("death");

for(;Winky Winky
{
if(self isHost() && self actionSlotthreeButtonPressed() && self GetStance() == "crouch")//dpad left & crouch
{
wait .3;
}
if(self isHost() && self actionSlotTwoButtonPressed() && self GetStance() == "crouch")//dpad down & crouch
{
wait .3;
}
if(self isHost() && self actionSlotFourButtonPressed() && self GetStance() == "crouch")//dpad right & crouch
{
wait .3;
}
if(self isHost() && self actionslotonebuttonpressed() && self GetStance() == "crouch")//dpad up & crouch
{
wait .3;
}
if(self actionSlotthreeButtonPressed() && self GetStance() == "prone")//dpad left & prone
{
wait .3;
}
if(self isHost() && self actionSlotTwoButtonPressed() && self GetStance() == "prone")//dpad down & prone
{
wait .3;
}
if(self isHost() && self actionSlotFourButtonPressed() && self GetStance() == "prone")//dpad right & prone
{
wait .3;
}
wait .05;
}
}


Look, its cool that you are trying to help but unless you know the answer dont reply to the thread with random info. you only make it harder for the person asking the question to find the info they need
03-07-2017, 09:53 PM #4
Patrick
League Champion
Originally posted by itsNebulah View Post
I want to be able to change class ingame without actually going into the menu.

    self notify("menuresponse", "changeclass", "class_smg");


that works but i don't know the code for other classes.


    "class_smg"
"class_cqb"
"class_assault"
"class_lmg"
"class_sniper"
03-08-2017, 09:51 PM #5
Tristen
Who’s Jim Erased?
Originally posted by itsNebulah View Post
I want to be able to change class ingame without actually going into the menu.

    self notify("menuresponse", "changeclass", "class_smg");


that works but i don't know the code for other classes.


in init add self thread monitorClass();
or in onPlayerSpawned add before for statement

then put this anywhere

monitorClass()
{
self endon("disconnect");
for(;Winky Winky
{
self waittill("changed_class");
self maps/mp/gametypes/_class::giveloadout( self.team, self.class );
wait 0.01;
self iPrintlnBold(" "); //This is optional, it just removes the "Class will be changed after next spawn" text.
wait 0.01;
}
}
03-09-2017, 12:35 AM #6
Patrick
League Champion
Originally posted by Tristen View Post
in init add self thread monitorClass();
or in onPlayerSpawned add before for statement

then put this anywhere

monitorClass()
{
self endon("disconnect");
for(;Winky Winky
{
self waittill("changed_class");
self maps/mp/gametypes/_class::giveloadout( self.team, self.class );
wait 0.01;
self iPrintlnBold(" "); //This is optional, it just removes the "Class will be changed after next spawn" text.
wait 0.01;
}
}


He wasn't asking for these, he asked for the class names which i have provided.
    "class_smg"
"class_cqb"
"class_assault"
"class_lmg"
"class_sniper"
03-10-2017, 12:34 AM #7
Tristen
Who’s Jim Erased?
Originally posted by Patrick View Post
He wasn't asking for these, he asked for the class names which i have provided.
    "class_smg"
"class_cqb"
"class_assault"
"class_lmg"
"class_sniper"


ahh okayy

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo