Are you looking for a MP or ZM function?Does anyone know how to give the player a random weapon?
also how do you pull the score from the game? I want to make it so when the score goes up 1 the player teleports to a different spot
i think this should help
function giveCustomLoadout()
{
self TakeAllWeapons();
self clearPerks();
self SetPerk( "specialty_fallheight" );
self GiveWeapon( level.weaponBaseMeleeHeld );
self setSpawnWeapon( level.weaponBaseMeleeHeld );
return level.weaponBaseMeleeHeld;
}
so how would i choose the weapon to put in there and is it possible to choose camoi think this should help
PHP:function giveCustomLoadout() { self TakeAllWeapons(); self clearPerks(); self SetPerk( "specialty_fallheight" ); self GiveWeapon( level.weaponBaseMeleeHeld ); self setSpawnWeapon( level.weaponBaseMeleeHeld ); return level.weaponBaseMeleeHeld; }
found in fr.gsc
I don't know much about BO3 GSC but I think its the same way you do on BO2s
so how would i choose the weapon to put in there and is it possible to choose camo
s
so how would i choose the weapon to put in there and is it possible to choose camo
function giveCustomLoadout()
{
self TakeAllWeapons();
self clearPerks();
self SetPerk( "specialty_fallheight" );
level.weaponname = "weaponname here";//example: smg_standard
self GiveWeapon( level.weaponname );
self setSpawnWeapon( level.weaponname );
return level.weaponname;
}
I already answered his question also you don't need to set a perk...do
PHP:function giveCustomLoadout() { self TakeAllWeapons(); self clearPerks(); self SetPerk( "specialty_fallheight" ); level.weaponname = "weaponname here";//example: smg_standard self GiveWeapon( level.weaponname ); self setSpawnWeapon( level.weaponname ); return level.weaponname; }
do
PHP:function giveCustomLoadout() { self TakeAllWeapons(); self clearPerks(); self SetPerk( "specialty_fallheight" ); level.weaponname = "weaponname here";//example: smg_standard self GiveWeapon( level.weaponname ); self setSpawnWeapon( level.weaponname ); return level.weaponname; }
I dont think u would do +fmj+extclupit doesn't work. I put the weapon name as "sniper_double+fmj+extclip" and it gives me no weapon.
Well he did +fmj+extclipI dont think u would do +fmj+extclup
Ok thank you! I will take a look into the weapon system now and update here shortly!
#using scripts\shared\weapons_shared;
#using scripts\shared\array_shared;
function func_giveRandomWeapon()
{
weaponsList_array = strTok("pistol_standard pistol_burst pistol_fullauto shotgun_semiauto ar_standard sniper_fastbolt sniper_powerbolt ar_marksman lmg_heavy "," "); // fill this with random weapons from the game, I tried to search a array whichs stores all weapons from the game but I didn't find one!
for(;;)
{
weaponPick = array::random(weaponsList_array);
weaponPick = getWeapon(weaponPick);
if( self hasWeapon( weaponPick ) )
continue;
else if ( weapons::is_primary_weapon( weaponPick ) )
break;
else if ( weapons::is_side_arm( weaponPick ) )
break;
else
continue;
}
self iprintln(weaponPick.displayName);
self iprintln(weaponPick.name);
self TakeWeapon(self GetCurrentWeapon());
self giveWeapon(weaponPick);
self GiveMaxAmmo(weaponPick);
self SwitchToWeapon(weaponPick);
}