Results 1 to 8 of 8

Thread: show shotgun owners

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private First Class
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    37
    Thanked 14 Times in 14 Posts

    show shotgun owners

    hi , i have shotgun limit in my server. and i wanted to show in below of screen who have shotgun.

    i made script like this but i got this error.. i understood my error but i dont know how to fix

    PHP Code:
    pair 'Allies Shotgunner = ' and 'allies_shotgunner' has unmatching types 'localized string' and 'string': (file 'maps/owners/allies.gsc'line 15)
            
    level.ownersnameallies setText(&"Allies Shotgunner = " "allies_shotgunner"); 

    PHP Code:
    Owners()
    {    
        if(
    getcvar("sv_shotgun_owner_allies") == ""setcvar("sv_shotgun_owner_allies""none");
        if(
    getcvar("sv_shotgun_owner_axis") == ""setcvar("sv_shotgun_owner_axis""none");
        
    players getentarray("player""classname");
        for(
    0players.sizei++)
        {
            
    player players[i];

            if (
    player.pers["team"] == "allies")
            {
                
    current self getcurrentweapon();

                if (
    current == "shotgun_mp_allies")
                    
    name self.name;    
                    
    setcvar("sv_shotgun_owner_allies""self.name");
            }

            
            else if (
    player.pers["team"] == "axis")
            {
                
    current self getcurrentweapon();

                if (
    current == "shotgun_mp_axis")
                        
                    
    setcvar("sv_shotgun_owner_axis""self.name");
            }
        }


    PHP Code:
    ownersallies()
    {
         
    maps\mp\gametypes\_weapons::Owners();
        
    allies_shotgunner getcvar("sv_shotgun_owner_allies") ;

        
    level.ownersnameallies newHudElem();  
        
    level.ownersnameallies.250;
        
    level.ownersnameallies.479;
        
    level.ownersnameallies.alignX "left";
        
    level.ownersnameallies.alignY "bottom";
            
    level.ownersnameallies.horzAlign "left";
            
    level.ownersnameallies.vertAlign "top";
        
    level.ownersnameallies.alpha 1.2;
        
    level.ownersnameallies.fontScale 1.1;
            
    level.ownersnameallies setText(&"^5Allies Shotgunner = " "allies_shotgunner");     
             
                    
        

    PHP Code:
    ownersaxis()
    {
        
    maps\mp\gametypes\_weapons::Owners();
        
    axis_shotgunner getcvar("sv_shotgun_owner_axis") ;
        
        
    level.ownersnameaxis newHudElem();  
        
    level.ownersnameaxis.450;
        
    level.ownersnameaxis.479;
        
    level.ownersnameaxis.alignX "left";
        
    level.ownersnameaxis.alignY "bottom";
            
    level.ownersnameaxis.horzAlign "left";
            
    level.ownersnameaxis.vertAlign "top";
        
    level.ownersnameaxis.alpha 1.2;
        
    level.ownersnameaxis.fontScale 1.1;
            
    level.ownersnameaxis setText(&"^5Axis Shotgunner = " "axis_shotgunner" ); 

    Last edited by feanor; 12th June 2016 at 11:17.

  2. The Following User Says Thank You to feanor For This Useful Post:

    kubislav23 (13th June 2016)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •