Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
check how much perks someone has
#1
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:");
        }

(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  How do you guys check for errors when scripting? akillj 6 4,003 06-15-2013, 10:48
Last Post: Yamato
  Help Perks do not work (( x1412 6 4,025 04-06-2013, 18:09
Last Post: x1412
  Do you play runescape? :D check this out xD [BTK]Foxy 1 2,825 04-05-2013, 18:16
Last Post: SuperNovaAO
  Help CPU Check bypass DemoroCZ 1 2,391 03-20-2013, 14:30
Last Post: JariZ
  All Level and Perks Pro Unlocker browneggs 1 2,527 09-24-2012, 09:38
Last Post: d0h!
  [Release] Obtain weapons and perks ddaavvee 10 7,437 09-02-2012, 21:04
Last Post: wise
  Perks Killer_xD 6 3,649 08-13-2012, 15:26
Last Post: Killer_xD
  Flood check Pozzuh 7 3,943 07-10-2012, 16:50
Last Post: JariZ
  [Tutorial] Some perks setup Yamato 9 5,125 07-09-2012, 08:56
Last Post: RaZ
  Perks snippet Arteq 2 2,618 05-25-2012, 19:16
Last Post: Puffiamo

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.