Author Topic: [old topic] Headcrab  (Read 15274 times)

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2437
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Headcrab
« Reply #25 on: July 06, 2010, 02:53:20 PM »
public SetWeaponAlpha(client,alpha)
{
   new wep=GetEntDataEnt2(client,m_OffsetActiveWeapon);
   if(wep>MaxClients && IsValidEdict(wep))
   {
      SetEntityRenderMode(index,RENDER_TRANSCOLOR);
SetEntityRenderColor(index,255,255,255,alpha);
   }
}

[Oddity]TeacherCreature

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Headcrab
« Reply #26 on: July 06, 2010, 03:24:22 PM »
undefined error for index

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2437
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Headcrab
« Reply #27 on: July 06, 2010, 03:26:38 PM »
replace with wep

[Oddity]TeacherCreature

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Headcrab
« Reply #28 on: July 06, 2010, 03:28:26 PM »
undefined error for m_OffsetActiveWeapon
 

Should I just put this at the top of the racefile?
new m_OffsetActiveWeapon;
new index;

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2437
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Headcrab
« Reply #29 on: July 06, 2010, 03:29:22 PM »
new m_OffsetActiveWeapon=FindSendPropOffs("CBasePlayer","m_hActiveWeapon");

Naris

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
Re: Headcrab
« Reply #30 on: July 06, 2010, 03:32:17 PM »
How to track weapon?

u cant change alpha of entity or weapon or whatever?


Look in the SourceMod forums.

Here is a thread about making weapons invisible --> http://forums.alliedmods.net/showthread.php?t=118760

Code: [Select]
public SetWeaponColor(client,r,g,b,o)
{
    for(new i=0; i < 4; i++)
    {
        new entity = GetPlayerWeaponSlot(client,i);
        if(entity != -1)
        {
            SetEntityRenderMode(entity,RENDER_TRANSCOLOR);
            SetEntityRenderColor(entity,r,g,b,o);
        }
    }     
« Last Edit: July 06, 2010, 03:35:39 PM by Naris »

[Oddity]TeacherCreature

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Headcrab
« Reply #31 on: July 06, 2010, 03:38:59 PM »
also knife restriction is not wokring right

it restricts headcrab race to knife but it restricts all weapons form other races

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2437
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Headcrab
« Reply #32 on: July 06, 2010, 03:40:34 PM »
do a race check

[Oddity]TeacherCreature

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Headcrab
« Reply #33 on: July 06, 2010, 03:47:24 PM »
I did

Code: [Select]
public Action:OnWeaponCanUse(client, weapon)
{
if (War3_GetRace(client)== raceID)
{
decl String:name[64];
GetEdictClassname(weapon, name, sizeof(name));

//if(StrEqual(name, "weapon_knife", false))
if (IsEquipmentMelee(name))
      return Plugin_Continue;
}

return Plugin_Handled;
}

stinkyfax

  • Full Member
  • ***
  • Posts: 120
    • View Profile
    • Email
Re: Headcrab
« Reply #34 on: July 06, 2010, 03:51:33 PM »
Exclusively for padawan.


public OnPluginStart() {
 ACTIVEWEAPON=FindSendPropOffs("CAI_BaseNPC", "m_hActiveWeapon");
}

public SetMyhSuperActiveWeaponInvisible(client)
{
  new weapon =  GetEntDataEnt2(client, ACTIVEWEAPON);
  SetColor(weapon, {255, 255, 255, 0});
}

[Oddity]TeacherCreature

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Headcrab
« Reply #35 on: July 06, 2010, 04:05:57 PM »
Thanks Jedi but I got knife color finished Iam still having a major issue with weapon restrictions

[Oddity]TeacherCreature

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Headcrab
« Reply #36 on: July 06, 2010, 05:54:25 PM »
Ok I got most of this race finished

anyone want to help me finish,

The last skill should be a playerdeath skill like undead with a chance to small chance to proc

if it procs it latches on and does a 10% of starting health as damage to killer every second until it kills the attacker or until he dies normally

either way when he dies the headcrab is reborn at the point of death.
« Last Edit: July 06, 2010, 05:59:11 PM by [Oddity]TeacherCreature »

[Oddity]TeacherCreature

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Headcrab
« Reply #37 on: July 06, 2010, 07:41:09 PM »
Exclusively for padawan.


public OnPluginStart() {
 ACTIVEWEAPON=FindSendPropOffs("CAI_BaseNPC", "m_hActiveWeapon");
}

public SetMyhSuperActiveWeaponInvisible(client)
{
  new weapon =  GetEntDataEnt2(client, ACTIVEWEAPON);
  SetColor(weapon, {255, 255, 255, 0});
}


BTW this doesnt work

[Oddity]TeacherCreature

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Headcrab
« Reply #38 on: July 13, 2010, 11:09:49 PM »
Can anyone update this to the newer version, it is whats keeping me form updating, it works right now on the old version ehre is what I have
skill4 is empty just doesnt say empty- cause I never finished it


Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2437
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Headcrab
« Reply #39 on: July 14, 2010, 08:41:23 AM »
common.....................learn sourcemod and what the compile errors mean

requires 1.1.2/+

[Oddity]TeacherCreature

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Headcrab
« Reply #40 on: July 14, 2010, 09:12:02 AM »
Thanks - I would like to learn it but I am bound by life (time) constraints.

thank you

stinkyfax

  • Full Member
  • ***
  • Posts: 120
    • View Profile
    • Email
Re: Headcrab
« Reply #41 on: July 14, 2010, 04:56:15 PM »
Thanks - I would like to learn it but I am bound by life (time) constraints.

thank you
did you mean by WCS?  8)

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2437
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Headcrab
« Reply #42 on: July 14, 2010, 04:57:01 PM »
i think thats what he meant

[Oddity]TeacherCreature

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Headcrab
« Reply #43 on: July 14, 2010, 06:32:46 PM »
stinky u arent developing are u

I am heling WCS since they asked and I can

but my server is running WAR3

[Oddity]TeacherCreature

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Headcrab
« Reply #44 on: July 17, 2010, 05:09:51 PM »
This was working:
Code: [Select]
public SetWeaponColor(client,r,g,b,o)
{
    for(new i=0; i < 4; i++)
    {
        new entity = GetPlayerWeaponSlot(client,i);
        if(entity != -1)
        {
            SetEntityRenderMode(entity,RENDER_TRANSCOLOR);
            SetEntityRenderColor(entity,r,g,b,o);
        }
    }     
and it got rid of the floating knife but it no longer works on new version can anyone figure out why?

also

Can someone code a 4th skill called latchon triggers at player death

Latch on will slay attacker and respawn head crab instantly to attackers positon

% chance small controllable by convar?

[Oddity]TeacherCreature

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Headcrab
« Reply #45 on: July 19, 2010, 07:13:15 PM »
OK this race now has a 4th latch on skill

It works well and seems pretty balanced along with some new sounds, the only remaining issues is the knife is not invisible, it kind of floats above the headcrabs head.

 
« Last Edit: July 20, 2010, 09:43:11 AM by [Oddity]TeacherCreature »

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2437
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: [old topic] Headcrab
« Reply #46 on: July 31, 2010, 09:11:37 AM »
create a new topic