[HELP]Weapon Spawns for Specific Players

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

Gooblaster

FNG / Fresh Meat
Oct 3, 2010
342
25
0
Hi, is it possible to tie the steam ID of a specific person to Marco's Perks Mutator so that he will be able to spawn with a specific weapon meant only for him?

If it is possible, how will i be able to do so?
 

Falidell

FNG / Fresh Meat
May 22, 2009
646
78
0
31
Mesa,Az,USA
mmmm you'd need a new type of weapon class..... one that does this:

player touches->checks toucher.controller.playername(not sure about checking steam id)->?playername=somelist.personsname: give toucher item: else ignore

but sense it would require a new weapon class you'd have to have all weapons be of that class type.......... a lot of work.....
 

Marco

Active member
May 23, 2009
645
231
43
Finland
You have to make new perk class with a code like:
Code:
var config array<string> GivenIDs;

static function AddDefaultInventory(KFPlayerReplicationInfo KFPRI, Pawn P)
{
    local string S;
    local int i;

    S = P.PlayerReplicationInfo.PlayerName; // OR: S = PlayerController(P.Controller).GetPlayerIDHash();
    for( i=0; i<Default.GivenIDs.Length; ++i )
        if( Default.GivenIDs[i]~=S )
        {
            KFHumanPawn(P).CreateInventoryVeterancy("KFMod.Bullpup", GetCostScaling(KFPRI, class'BullpupPickup'));
            break;
        }
}
if you use PlayerName it will use display name of players, if you use IDHash, it is an encrypted version of SteamID (you should see the player ID hashes from ServerPerksStat.ini).
 
  • Like
Reactions: YoYoBatty

Gooblaster

FNG / Fresh Meat
Oct 3, 2010
342
25
0
You have to make new perk class with a code like:
Code:
var config array<string> GivenIDs;

static function AddDefaultInventory(KFPlayerReplicationInfo KFPRI, Pawn P)
{
    local string S;
    local int i;

    S = P.PlayerReplicationInfo.PlayerName; // OR: S = PlayerController(P.Controller).GetPlayerIDHash();
    for( i=0; i<Default.GivenIDs.Length; ++i )
        if( Default.GivenIDs[i]~=S )
        {
            KFHumanPawn(P).CreateInventoryVeterancy("KFMod.Bullpup", GetCostScaling(KFPRI, class'BullpupPickup'));
            break;
        }
}
if you use PlayerName it will use display name of players, if you use IDHash, it is an encrypted version of SteamID (you should see the player ID hashes from ServerPerksStat.ini).

Thanks for the help Falidell and Marco!! :D
I'll try to get it working
 
Last edited:

Gooblaster

FNG / Fresh Meat
Oct 3, 2010
342
25
0
Just to confirm, if i want to add it in to the existing perks i just copy and paste the code below into the bottom of the Perk Source code then recompile?

var config array<string> GivenIDs;STEAMIDHASHHERE

static function AddDefaultInventory(KFPlayerReplicationInfo KFPRI, Pawn P)
{
local string S;
local int i;

S = PlayerController(P.Controller).GetPlayerIDHash();
for( i=0; i<Default.GivenIDs.Length; ++i )
if( Default.GivenIDs~=S )
{
KFHumanPawn(P).CreateInventoryVeterancy("DESIREDWEAPONCLASSHERE", GetCostScaling(KFPRI, class'WEAPONPICKUPHERE'));
break;
}
}

[EDIT] I think i confused myself. ANyways, i suppose i have to create a new .uc file and paste this in?
But what Class does it extend?
 
Last edited: