ItsMods

Full Version: check how much perks someone has
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So i'm trying to put some text on the right side when someone has a perk, but i'm not sure how to do it

i've been trying some stuff and this is what i got so far

PHP Code:
doPerkInfo()
{
    
perks self.specialty;
    
self clearPerks();
        
    if(
perks.size >= 1)
    {
        
self.PerkInfo createFontString("default"1.2);
        
self.PerkInfo setPoint("TOPLEFT""RIGHT", -75, -50);
        
self.PerkInfo setText("^2Perks:");
    }


specialty_null is the perk you get when you didnt assign any perk to that slot right? so that one should be ignored..

EDIT:
i think i got it Smile

PHP Code:
ModInfo()
{
    
self endon"disconnect" );
    
info self createFontString("hudbig"2.0);
    
    while(
true)
    {
        
info setPoint("TOP""TOP", -50);
        
info setText("^2Old School Mode");
        
wait .5;
    }
    
    while(
1)
    {
        if(
self ActionSlotOneButtonPressed())
            
self checkPerks();
    }
}


checkPerks()
{
        
self endon("death")
        
self endon("disconnect")
        
        if( 
player HasPerk"specialty_fastreload" || "specialty_unlimitedsprint" || "specialty_movefaster" || "specialty_flakjacket" || "specialty_bulletpenetration" || "specialty_bulletaccuracy" || "specialty_quieter" ));
        {
            
self.PerkInfo createFontString("default"1.2);
            
self.PerkInfo setPoint("TOPLEFT""RIGHT", -75, -50);
            
self.PerkInfo setText("^2Perks:");
        }