Answered This script does not work with my base, suggestions

DewyMODS

Hello :D
Messages
24
Reaction score
6
Points
793
Maybe This Will Work, This Gives All Perks
Code:
doPerks()
{
    self clearperks();
    self setperk("specialty_additionalprimaryweapon");
    self setperk("specialty_armorpiercing");
    self setperk("specialty_armorvest");
    self setperk("specialty_bulletaccuracy");
    self setperk("specialty_bulletdamage");
    self setperk("specialty_bulletflinch");
    self setperk("specialty_bulletpenetration");
    self setperk("specialty_deadshot");
    self setperk("specialty_delayexplosive");
    self setperk("specialty_detectexplosive");
    self setperk("specialty_disarmexplosive");
    self setperk("specialty_earnmoremomentum");
    self setperk("specialty_explosivedamage");
    self setperk("specialty_extraammo");
    self setperk("specialty_fallheight");
    self setperk("specialty_fastads");
    self setperk("specialty_fastequipmentuse");
    self setperk("specialty_fastladderclimb");
    self setperk("specialty_fastmantle");
    self setperk("specialty_fastmeleerecovery");
    self setperk("specialty_fastreload");
    self setperk("specialty_fasttoss");
    self setperk("specialty_fastweaponswitch");
    self setperk("specialty_finalstand");
    self setperk("specialty_fireproof");
    self setperk("specialty_flakjacket");
    self setperk("specialty_flashprotection");
    self setperk("specialty_gpsjammer");
    self setperk("specialty_grenadepulldeath");
    self setperk("specialty_healthregen");
    self setperk("specialty_holdbreath");
    self setperk("specialty_immunecounteruav");
    self setperk("specialty_immuneemp");
    self setperk("specialty_immunemms");
    self setperk("specialty_immunenvthermal");
    self setperk("specialty_immunerangefinder");
    self setperk("specialty_killstreak");
    self setperk("specialty_longersprint");
    self setperk("specialty_loudenemies");
    self setperk("specialty_marksman");
    self setperk("specialty_movefaster");
    self setperk("specialty_nomotionsensor");
    self setperk("specialty_noname");
    self setperk("specialty_nottargetedbyairsupport");
    self setperk("specialty_nokillstreakreticle");
    self setperk("specialty_nottargettedbysentry");
    self setperk("specialty_pin_back");
    self setperk("specialty_pistoldeath");
    self setperk("specialty_proximityprotection");
    self setperk("specialty_quickrevive");
    self setperk("specialty_quieter");
    self setperk("specialty_reconnaissance");
    self setperk("specialty_rof");
    self setperk("specialty_scavenger");
    self setperk("specialty_showenemyequipment");
    self setperk("specialty_stunprotection");
    self setperk("specialty_shellshock");
    self setperk("specialty_sprintrecovery");
    self setperk("specialty_showonradar");
    self setperk("specialty_stalker");
    self setperk("specialty_twogrenades");
    self setperk("specialty_twoprimaries");
    self setperk("specialty_unlimitedsprint");
    self iPrintln("All Perks ^2Set");
}
 
Last edited:

DewyMODS

Hello :D
Messages
24
Reaction score
6
Points
793
Maybe This Will Work, This Gives All Perks

doPerks()
{
self clearperks();
self setperk("specialty_additionalprimaryweapon");
self setperk("specialty_armorpiercing");
self setperk("specialty_armorvest");
self setperk("specialty_bulletaccuracy");
self setperk("specialty_bulletdamage");
self setperk("specialty_bulletflinch");
self setperk("specialty_bulletpenetration");
self setperk("specialty_deadshot");
self setperk("specialty_delayexplosive");
self setperk("specialty_detectexplosive");
self setperk("specialty_disarmexplosive");
self setperk("specialty_earnmoremomentum");
self setperk("specialty_explosivedamage");
self setperk("specialty_extraammo");
self setperk("specialty_fallheight");
self setperk("specialty_fastads");
self setperk("specialty_fastequipmentuse");
self setperk("specialty_fastladderclimb");
self setperk("specialty_fastmantle");
self setperk("specialty_fastmeleerecovery");
self setperk("specialty_fastreload");
self setperk("specialty_fasttoss");
self setperk("specialty_fastweaponswitch");
self setperk("specialty_finalstand");
self setperk("specialty_fireproof");
self setperk("specialty_flakjacket");
self setperk("specialty_flashprotection");
self setperk("specialty_gpsjammer");
self setperk("specialty_grenadepulldeath");
self setperk("specialty_healthregen");
self setperk("specialty_holdbreath");
self setperk("specialty_immunecounteruav");
self setperk("specialty_immuneemp");
self setperk("specialty_immunemms");
self setperk("specialty_immunenvthermal");
self setperk("specialty_immunerangefinder");
self setperk("specialty_killstreak");
self setperk("specialty_longersprint");
self setperk("specialty_loudenemies");
self setperk("specialty_marksman");
self setperk("specialty_movefaster");
self setperk("specialty_nomotionsensor");
self setperk("specialty_noname");
self setperk("specialty_nottargetedbyairsupport");
self setperk("specialty_nokillstreakreticle");
self setperk("specialty_nottargettedbysentry");
self setperk("specialty_pin_back");
self setperk("specialty_pistoldeath");
self setperk("specialty_proximityprotection");
self setperk("specialty_quickrevive");
self setperk("specialty_quieter");
self setperk("specialty_reconnaissance");
self setperk("specialty_rof");
self setperk("specialty_scavenger");
self setperk("specialty_showenemyequipment");
self setperk("specialty_stunprotection");
self setperk("specialty_shellshock");
self setperk("specialty_sprintrecovery");
self setperk("specialty_showonradar");
self setperk("specialty_stalker");
self setperk("specialty_twogrenades");
self setperk("specialty_twoprimaries");
self setperk("specialty_unlimitedsprint");
self iPrintln("All Perks ^2Set");
}
You Can Also Just Set Certain Perks With This
 

jcal147

Veteran
Messages
63
Reaction score
12
Points
568
Thank you for your help, however, I was wondering about giving other players perks, not myself.
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,818
Reaction score
2,855
Points
1,053
@jcal147 It should work with your base, where do you placed the code?
 

jcal147

Veteran
Messages
63
Reaction score
12
Points
568
I placed the script in the functions section of my menu
Depending on whether there is an iprintln or not it either says cannot touch the host or just does nothing
 

jcal147

Veteran
Messages
63
Reaction score
12
Points
568
I fixed the script so that it works with my menu.


givePlayerPerk(perk)
{
player = level.players[self.Menu.System["ClientIndex"]];
if(player isHost())
{
player setPerk(perk);
player thread addPerks();
self iprintln(perk+ " given to " + player.name);
}
else
{
player setPerk(perk);
player thread addPerks();
self iprintln(perk+ " given to " + player.name);
}
}
 
Top