05-03-2012, 16:20
Dunno if it was already posted, but maybe it will help someone.
Source: mpcforum
Source: mpcforum
floor66 @mpcforum Wrote:The way you might be doing this in now probably looks something like:
C Code
self maps\mp\perks\_perks::givePerk( "specialty_hardline" ); //or something different than hardline.
I offer my alternative, all sorted with their in-game names:
C Code
givePerk( perk, pro ) { _perk = ""; _proPerk = ""; switch( perk ) { case "marathon": _perk = "marathon"; _proPerk = "fastmantle"; break; case "sleight of hand": _perk = "fastreload"; _proPerk = "quickdraw"; break; case "scavenger": _perk = "scavenger"; _proPerk = "extraammo"; break; case "bling": _perk = "bling"; _proPerk = "secondarybling"; break; case "one man army": _perk = "onemanarmy"; _proPerk = "omaquickchange"; break; case "stopping power": _perk = "bulletdamage"; _proPerk = "armorpiercing"; break; case "lightweight": _perk = "lightweight"; _proPerk = "fastsprintrecovery"; break; case "hardline": _perk = "hardline"; _proPerk = "spygame"; break; case "cold-blooded": _perk = "coldblooded"; _proPerk = "gpsjammer"; break; case "danger close": _perk = "explosivedamage"; _proPerk = "armorpiercing"; break; case "commando": _perk = "extendedmelee"; _proPerk = "falldamage"; break; case "steady aim": _perk = "bulletaccuracy"; _proPerk = "steelnerves"; break; case "scrambler": _perk = "localjammer"; _proPerk = "delaymine"; break; case "ninja": _perk = "heartbreaker"; _proPerk = "quieter"; break; case "sitrep": _perk = "detectexplosive"; _proPerk = "selectivehearing"; break; case "last stand": _perk = "pistoldeath"; _proPerk = "laststandoffhand"; break; } self maps\mp\perks\_perks::givePerk( "specialty_"+ _perk ); if(pro) self maps\mp\perks\_perks::givePerk( "specialty_"+ _proPerk ); }
HOW TO USE IT:
C Code
givePerk( "marathon", true ); //gives marathon pro givePerk( "stopping power", false ); //gives stopping power, -NOT- PRO.