Raised This Month: $51 Target: $400
 12% 

[CSS] Laser Aim


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Plugin ID:
1454
Plugin Version:
1.3
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    12 
    Plugin Description:
    Creates A Beam For every times when a Snipers Rifle in arms
    Old 02-06-2010 , 12:32   [CSS] Laser Aim
    Reply With Quote #1

    Name:
    Laser Aim
    Description:
    Creates A Beam For every times when a Snipers Rifle in arms
    Changelogs:
    Spoiler

    CVars:
    PHP Code:
        // Get plugins version
        
    sm_laser_aim
        
    // Enable/disable plugin
        
    sm_laser_aim_on 1
        
    // Beam/dot color
        
    sm_laser_aim_red 200
        sm_laser_aim_green 0
        sm_laser_aim_blue 0
        sm_laser_aim_alpha 150
        
    // Beam size
        
    sm_laser_aim_width 2
        
    // Dot size
        
    sm_laser_aim_dot_width 2 
    Attached Thumbnails
    Click image for larger version

Name:	de_train0000.jpg
Views:	15150
Size:	83.9 KB
ID:	59173  
    Attached Files
    File Type: sp Get Plugin or Get Source (laser_aim.sp - 10454 views - 4.8 KB)
    __________________

    Last edited by Leonardo; 09-03-2012 at 15:04.
    Leonardo is offline
    usla
    Senior Member
    Join Date: Jul 2009
    Old 02-06-2010 , 16:15   Re: Laser Aim
    Reply With Quote #2

    very nice man
    usla is offline
    bouncer
    Veteran Member
    Join Date: Apr 2009
    Old 02-06-2010 , 21:02   Re: [CSS] Laser Aim
    Reply With Quote #3

    Sweet... is this possible for Insurgency maybe? Would love it!
    __________________


    bouncer is offline
    bouncer
    Veteran Member
    Join Date: Apr 2009
    Old 02-07-2010 , 00:39   Re: [CSS] Laser Aim
    Reply With Quote #4

    Hey I tried modifying your plugin to show lasers for only Marines team at the moment for INS, but with no luck, it compiled and all but it just didn't show any lasers, would you know why?

    Here is the source http://pastebin.com/m76bc3364
    __________________


    bouncer is offline
    Black Haze
    BANNED
    Join Date: Sep 2008
    Location: Hamsterdam
    Old 02-08-2010 , 07:24   Re: [CSS] Laser Aim
    Reply With Quote #5

    Quote:
    Originally Posted by bouncer View Post
    Hey I tried modifying your plugin to show lasers for only Marines team at the moment for INS, but with no luck, it compiled and all but it just didn't show any lasers, would you know why?

    Here is the source http://pastebin.com/m76bc3364
    I can't test this cause I can't stand that lagging piece of sh*t game ;), but get rid of the if statement with all the weapons in it, so everyone has a laser. See if that works in Insurgency first.

    If after you compile that code everyone suddenly has lasers, then you did something wrong with the if statement.

    If noone still has lasers, then this code just won't work for ins and you'll have to rewrite parts.
    Black Haze is offline
    bouncer
    Veteran Member
    Join Date: Apr 2009
    Old 02-08-2010 , 14:54   Re: [CSS] Laser Aim
    Reply With Quote #6

    EDIT:

    K it works on INS, but some small issues...

    The laser's starting point is like 2 feet away from the player's body, and from the player's point of view it looks as if it's coming out of his stomach.
    When the player crouches, the laser doesnt crouch with him, it stays up in air, same thing when he is prone laying down.

    Anyway to fix all these?

    Thanks.
    __________________



    Last edited by bouncer; 02-08-2010 at 15:17.
    bouncer is offline
    usla
    Senior Member
    Join Date: Jul 2009
    Old 02-08-2010 , 17:29   Re: [CSS] Laser Aim
    Reply With Quote #7

    Quote:
    Originally Posted by bouncer View Post
    EDIT:

    K it works on INS, but some small issues...

    The laser's starting point is like 2 feet away from the player's body, and from the player's point of view it looks as if it's coming out of his stomach.
    When the player crouches, the laser doesnt crouch with him, it stays up in air, same thing when he is prone laying down.

    Anyway to fix all these?

    Thanks.
    Yep same issue here it doesn't bothers me to much i like the plugin but a more realistic laser that comes from the actual gun would be nice
    usla is offline
    Leonardo
    Veteran Member
    Join Date: Feb 2010
    Location: 90's
    Old 02-07-2010 , 04:29   Re: [CSS] Laser Aim
    Reply With Quote #8

    maybe weapon names is incorrect?
    in CSS this is weapon_*
    and check, do you need <player team>?
    __________________

    Last edited by Leonardo; 02-13-2010 at 21:07.
    Leonardo is offline
    bouncer
    Veteran Member
    Join Date: Apr 2009
    Old 02-07-2010 , 12:42   Re: [CSS] Laser Aim
    Reply With Quote #9

    I don't believe that it is weapon_ in Insurgency. But the team numbers do switch depending on the map. It goes like this...

    Code:
    public OnMapStart()
    {
        decl String:mapname[64];
        GetCurrentMap(mapname, sizeof(mapname));
        if (strcmp(mapname, "ins_karam") == 0 || strcmp(mapname, "ins_baghdad") == 0)
        {
            INSURGENTS = 1;
            MARINES = 2;
        }
        else
        {
            MARINES = 1;
            INSURGENTS = 2;
        }
    }
    Could you try to develop lasers for INS? So that when players walk around they have a laser sticking out and they can turn on and off the laser through a laser menu such as !lasers and the color of it on that menu?
    __________________


    bouncer is offline
    Leonardo
    Veteran Member
    Join Date: Feb 2010
    Location: 90's
    Old 02-08-2010 , 02:17   Re: [CSS] Laser Aim
    Reply With Quote #10

    Unfortunately, I dont know what is it "Insurgency" ^_^
    but try to use function OnMapSpawn. for checking on every rounds before event round_start.
    and.... maybe not "strcmp", but this: StrContains(string_a ,string_b)>=-1
    and for "menu" should use ConCommands, for example, "+toggleLaser"/"-toggleLaser".
    personal setting must be in arrays... for example: new PlayerSettings[<clientID>][<settingID>][<lengthOfSettingsValue>]


    and can anyone say, whats wrong here?
    Code:
    	g_CvarWeapons = CreateConVar("sm_laser_aim_weapons", "weapon_awp|weapon_scout", "List of weapons", FCVAR_NOTIFY);
    Code:
    	new bool:b_playerNeededWeapon;
    	b_playerNeededWeapon = false;
    	new String:s_neededWeaponList[128];
    	GetConVarString(g_CvarWeapons, s_neededWeaponList, sizeof(s_neededWeaponList));
    	new a_playerWeaponTemp[12][32];
    	str_piece(s_neededWeaponList, a_playerWeaponTemp, sizeof(a_playerWeaponTemp), sizeof(a_playerWeaponTemp[]) - 1, '|');
    	for(new i = 0; i < sizeof(a_playerWeaponTemp); i++)
    	{
    		if (StrEqual(a_playerWeaponTemp[i], s_playerWeapon))
    		{
    			b_playerNeededWeapon = true;
    		}
    	}
    Code:
    stock str_piece(input[], output[][], outputsize, piecelen, token = '|')
    {
     new i = -1, pieces, len = -1 ;
     
     while ( input[++i] != 0 )
     {
      if ( input[i] != token )
      {
       if ( ++len < piecelen )
        output[pieces][len] = input[i] ;
      }
      else
      {
       output[pieces++][++len] = 0 ;
       len = -1 ;
       
       if ( pieces == outputsize )
        return pieces ;
      }
     }
     return pieces + 1;
    }
    __________________

    Last edited by Leonardo; 02-08-2010 at 02:22.
    Leonardo is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 13:15.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode