Answered Bind-be-freezing me ;)

Harry

Software Engineer
Premium Member
Messages
1,258
Reaction score
962
Points
748
Im having issues with making it so when I click:
DPAD: 1-4,
it chooses a class depending on the button I pressed (Using binds)

below is my source code. If anyone can help me, please do (I will give credits to the first person who 'officially' fixes it for me)


Thanks <3
 

Attachments

  • Advanced Warfare.rar
    1.8 KB · Views: 55

Syndicate

Modder
Messages
670
Reaction score
546
Points
483
try using this
self giveWeapon( "gun name" );
self switchToWeapon( "gun name");

and then place it under which ever action slot you want
 

Harry

Software Engineer
Premium Member
Messages
1,258
Reaction score
962
Points
748
try using this
self giveWeapon( "gun name" );
self switchToWeapon( "gun name");

and then place it under which ever action slot you want
Ill have a go, thank you <3
 

Jack

Modder
Messages
80
Reaction score
23
Points
218
try make a function then call the function with the bind for example
GiveWeapon()
{
self giveWeapon("dsr50_mp");
self switchToWeapon("dsr_50mp");
}
then calling the bind like self thread GiveWeapon();
PS I haven't looked at your source so I dont know if you have already tried this.
 

Harry

Software Engineer
Premium Member
Messages
1,258
Reaction score
962
Points
748
if its for BO2, my method should of worked
I tried your method, and only like sometimes and when I switched weapons, it gave me the gun. But it didn't work when I called takeallweapons onplayerspawned.
 

Syndicate

Modder
Messages
670
Reaction score
546
Points
483
erase all the code you tried.
put takeallweapons()
then give yourself a gun.
(is this for aw or BO2, if BO ill mess with your script and get it working
 

Syndicate

Modder
Messages
670
Reaction score
546
Points
483
I tried your method, and only like sometimes and when I switched weapons, it gave me the gun. But it didn't work when I called takeallweapons onplayerspawned.
why take all weapons on player spawn? for that you may need to call using a function, like;

blahblah()
{
self takeallweapons();
}
 

The Dark Side

Former Staff Member
Messages
1,010
Reaction score
783
Points
993
Fixed it <3 :smile: Although saritch isnt a smg just change that to whatever gun you want. :tonguewink:
 

Attachments

  • Un-Broken Source 1.rar
    2 KB · Views: 52

iRnZ

Veteran
Messages
32
Reaction score
18
Points
643
iRnZ Help ! lol
try this
change BG_GivePlayerWeapon function to this
BG_GivePlayerWeapon(weapon)
{
weap = self getCurrentWeapon();
self takeWeapon(weap);
wait 0.01;
Camo = RandomIntRange( 0, 45 );
self giveWeapon(weapon, 0, true ( Camo, 0, 0, 0, 0 ));
self switchToWeapon(weapon);
self giveMaxAmmo(weapon);
}
 
Top