Raised This Month: $ Target: $400
 0% 

Need some help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
<FiH> zero
Member
Join Date: Oct 2009
Old 03-24-2013 , 23:15   Need some help
Reply With Quote #1

So the war3source.com website is EXTREMELY INACTIVE. So I am going to come here for help. I have compiled a bunch of old aces successfully because I want to use them for my w3s CS:GO server. I am having difficultly installing them. Does anyone know the proper steps to installing a race?

Thanks

source:
Code:
/**
* File: War3Source_Agent.sp
* Description: The Agent race for SourceCraft.
* Author(s): xDr.HaaaaaaaXx
*/

#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdktools_stocks>
#include <sdktools_functions>
#include <haaaxfunctions>

#include "W3SIncs/War3Source_Interface"

// War3Source stuff
new thisRaceID, SKILL_SPEED, SKILL_VISIB, SKILL_MOLE, ULT_AWP;

new Float:DamageMultiplier[5] = { 0.0, 0.16, 0.19, 0.21, 0.24 };
new Float:MoleChance[5] = { 0.0, 0.04, 0.07, 0.11, 0.15 };
new Float:AgentSpeed[5] = { 1.0, 1.1, 1.2, 1.3, 1.4 };
new Float:UltDuration[5] = { 0.0, 10.0, 15.0, 20.0, 25.0 };

new String:Spawn[] = "doors/heavy_metal_stop1.wav";
new String:sOldModel[MAXPLAYERS][256];

new OriginOffset;

new HaloSprite, BeamSprite, GlowSprite;

public Plugin:myinfo = 
{
    name = "War3Source Race - Agent",
    author = "xDr.HaaaaaaaXx",
    description = "The Agent race for War3Source.",
    version = "1.0.0.0",
    url = ""
};

public OnPluginStart()
{
    OriginOffset = FindSendPropOffs( "CBaseEntity", "m_vecOrigin" );
}

public OnMapStart()
{
    HaloSprite = PrecacheModel( "materials/sprites/halo01.vmt" );
    BeamSprite = PrecacheModel( "sprites/tp_beam001.vmt" );
    GlowSprite = PrecacheModel( "materials/sprites/640_pain.vmt" );
    War3_PrecacheSound( Spawn );
}

public OnWar3PluginReady()
{
    thisRaceID = War3_CreateNewRace( "Agent", "agent" );
    
    SKILL_SPEED = War3_AddRaceSkill( thisRaceID, "High Speed", "Run Fast", false );    
    SKILL_VISIB = War3_AddRaceSkill( thisRaceID, "Shades of Visibility", "Invisible players apear when hit", false );    
    SKILL_MOLE = War3_AddRaceSkill( thisRaceID, "Double Agent", "Disguies your self as an enemy Spy", false );
    ULT_AWP = War3_AddRaceSkill( thisRaceID, "Ultimate Artillery", "Switch From M4a1 to Awp!", true );

    War3_CreateRaceEnd( thisRaceID );
}

public InitPassiveSkills( client )
{
    if( War3_GetRace( client ) == thisRaceID )
    {
        War3_SetBuff( client, fMaxSpeed, thisRaceID, AgentSpeed[War3_GetSkillLevel( client, thisRaceID, SKILL_SPEED )] );
    }
}

public OnRaceChanged( client, oldrace, newrace )
{
    if( newrace != thisRaceID )
    {
        W3ResetAllBuffRace( client, thisRaceID );
    }
    else
    {
        if( IsPlayerAlive( client ) )
        {
            InitPassiveSkills( client );
            StripWeaponFromClient( client );
            GivePlayerItem( client, "weapon_m4a1" );
            GivePlayerItem( client, "weapon_deagle" );
            GivePlayerItem( client, "weapon_knife" );
        }
    }
}

public OnSkillLevelChanged( client, race, skill, newskilllevel )
{
    InitPassiveSkills( client );
}

public OnWar3EventSpawn( client )
{
    new race = War3_GetRace( client );
    if( race == thisRaceID )
    {
        InitPassiveSkills( client );
        new skill_level = War3_GetSkillLevel( client, thisRaceID, SKILL_MOLE );
        if( GetRandomFloat( 0.0, 1.0 ) <= MoleChance[skill_level])
        {
            StartMole( client );
        }
        EmitSoundToAll( Spawn, client );
        StripWeaponFromClient( client );
        GivePlayerItem( client, "weapon_m4a1" );
        GivePlayerItem( client, "weapon_deagle" );
        GivePlayerItem( client, "weapon_knife" );
    }
}

public OnWar3EventDeath( victim, attacker )
{
    W3ResetAllBuffRace( victim, thisRaceID );
}

public OnWar3EventPostHurt( victim, attacker, damage )
{
    if( W3GetDamageIsBullet() && ValidPlayer( victim, true ) && ValidPlayer( attacker, true ) && GetClientTeam( victim ) != GetClientTeam( attacker ) )
    {
        if( War3_GetRace( attacker ) == thisRaceID )
        {
            new skill_dmg = War3_GetSkillLevel( attacker, thisRaceID, SKILL_VISIB );
            if( !Hexed( attacker, false ) && skill_dmg > 0 && GetRandomFloat( 0.0, 1.0 ) <= 0.15 )
            {
                new String:wpnstr[32];
                GetClientWeapon( attacker, wpnstr, 32 );
                if( !StrEqual( wpnstr, "weapon_knife" ) )
                {
                    War3_DealDamage( victim, RoundToFloor( damage * DamageMultiplier[skill_dmg] ), attacker, DMG_BULLET, "agent_crit" );
                    W3ResetBuffRace( victim, fInvisibilitySkill, War3_GetRace( victim ) );
                
                    W3PrintSkillDmgHintConsole( victim, attacker, War3_GetWar3DamageDealt(), SKILL_VISIB);
                    
                    W3FlashScreen( victim, RGBA_COLOR_RED );
                    
                    new Float:victim_pos[3];
                    new Float:attacker_pos[3];
                    
                    GetClientAbsOrigin( victim, victim_pos );
                    GetClientAbsOrigin( attacker, attacker_pos );
                    
                    victim_pos[2] += 40;
                    attacker_pos[2] += 40;
                    
                    TE_SetupBeamPoints( attacker_pos, victim_pos, BeamSprite, HaloSprite, 0, 0, 3.0, 6.0, 12.0, 0, 0.0, { 155, 155, 155, 255 }, 0 );
                    TE_SendToAll();
                }
            }
        }
    }
}

public OnUltimateCommand( client, race, bool:pressed )
{
    if( race == thisRaceID && pressed && ValidPlayer( client, true ) )
    {
        new ult_level = War3_GetSkillLevel( client, race, ULT_AWP );
        if( ult_level > 0 )
        {
            if( War3_SkillNotInCooldown( client, thisRaceID, ULT_AWP, true ) )
            {
                StripWeaponFromClient( client );
                GivePlayerItem( client, "weapon_awp" );
                GivePlayerItem( client, "weapon_deagle" );
                GivePlayerItem( client, "weapon_knife" );
                
                new Float:pos[3];
                
                GetClientAbsOrigin( client, pos );
                
                pos[2] += 50;
                
                TE_SetupGlowSprite( pos, GlowSprite, 2.0, 2.0, 255 );
                TE_SendToAll();
                
                CreateTimer( UltDuration[ult_level], GiveWeapon, client );
                
                War3_CooldownMGR( client, UltDuration[ult_level] + 5.0, thisRaceID, ULT_AWP, true,true );
            }
        }
        else
        {
            PrintHintText( client, "Level Your Ultimate First" );
        }
    }
}

public Action:GiveWeapon( Handle:timer, any:client )
{
    if( ValidPlayer( client, true ) )
    {
        StripWeaponFromClient( client );
        GivePlayerItem( client, "weapon_m4a1" );
        GivePlayerItem( client, "weapon_deagle" );
        GivePlayerItem( client, "weapon_knife" );
    }
}

public StartMole( client )
{
    new Float:mole_time = 5.0;
    W3MsgMoleIn( client, mole_time );
    CreateTimer( 0.2 + mole_time, DoMole, client );
}

public Action:DoMole( Handle:timer, any:client )
{
    if( ValidPlayer( client, true ) )
    {
        new team = GetClientTeam( client );
        new searchteam = ( team == 2 )?3:2;
        
        new Float:emptyspawnlist[100][3];
        new availablelocs = 0;
        
        new Float:playerloc[3];
        new Float:spawnloc[3];
        new ent = -1;
        while( ( ent = FindEntityByClassname( ent, ( searchteam == 2 )?"info_player_terrorist":"info_player_counterterrorist" ) ) != -1 )
        {
            if( !IsValidEdict( ent ) ) continue;
            GetEntDataVector( ent, OriginOffset, spawnloc );
            
            new bool:is_conflict = false;
            for( new i = 1; i <= MaxClients; i++ )
            {
                if( ValidPlayer( i, true ) )
                {
                    GetClientAbsOrigin( i, playerloc );
                    if( GetVectorDistance( spawnloc, playerloc ) < 60.0 )
                    {
                        is_conflict = true;
                        break;
                    }                
                }
            }
            if( !is_conflict )
            {
                emptyspawnlist[availablelocs][0] = spawnloc[0];
                emptyspawnlist[availablelocs][1] = spawnloc[1];
                emptyspawnlist[availablelocs][2] = spawnloc[2];
                availablelocs++;
            }
        }
        if( availablelocs == 0 )
        {
            War3_ChatMessage( client, "%T", "No suitable location found, can not mole!", client );
            return;
        }
        GetClientModel( client, sOldModel[client], 256 );
        SetEntityModel( client, ( searchteam == 2 )?"models/player/t_leet.mdl":"models/player/ct_urban.mdl" );
        TeleportEntity( client, emptyspawnlist[GetRandomInt( 0, availablelocs - 1 )], NULL_VECTOR, NULL_VECTOR );
        W3MsgMoled( client );
        War3_ShakeScreen( client, 1.0, 20.0, 12.0 );
        CreateTimer( 10.0, ResetModel, client );
    }
    return;
}

public Action:ResetModel( Handle:timer, any:client )
{
    if( ValidPlayer( client, true ) )
    {
        SetEntityModel( client, sOldModel[client] );
        W3MsgNoLongerDisguised( client );
    }
}

Last edited by <FiH> zero; 04-01-2013 at 17:36.
<FiH> zero is offline
Sreaper
髪を用心
Join Date: Nov 2009
Old 03-24-2013 , 23:33   Re: Need some help
Reply With Quote #2

Yes, some good tutorials can be found on this page.

Last edited by Sreaper; 03-24-2013 at 23:36.
Sreaper is offline
<FiH> zero
Member
Join Date: Oct 2009
Old 03-28-2013 , 15:31   Re: Need some help
Reply With Quote #3

I added a race into the server and it didn't show up. It didn't break my server either.
<FiH> zero is offline
Dr_Knuckles
AlliedModders Donor
Join Date: Mar 2005
Location: SW Florida
Old 03-28-2013 , 16:10   Re: Need some help
Reply With Quote #4

Sometimes I try out a new race and end up with people running around as error messages, it's really bizarre.

After you put the race plugin in your plugins folder did you check to see if the plugin was running?
__________________
Dr_Knuckles is offline
<FiH> zero
Member
Join Date: Oct 2009
Old 03-28-2013 , 21:38   Re: Need some help
Reply With Quote #5

I am not getting errors, but I can't find the race on the changerace list. How do I check if it is running?
<FiH> zero is offline
Dr_Knuckles
AlliedModders Donor
Join Date: Mar 2005
Location: SW Florida
Old 03-29-2013 , 15:51   Re: Need some help
Reply With Quote #6

Check your plugin list. If you have access to the server console type:

sm plugins list

and see if that race's plugin is running. It's probably a bad load. If you don't have access to the server console use rcon.
__________________
Dr_Knuckles is offline
<FiH> zero
Member
Join Date: Oct 2009
Old 03-30-2013 , 16:57   Re: Need some help
Reply With Quote #7

You seem to be correct:

Code:
56 <Failed> "War3Source Race - Agent" (1.0.0.0) by xDr.HaaaaaaaXx
What do I do about this?

Last edited by <FiH> zero; 03-30-2013 at 16:57.
<FiH> zero is offline
Dr_Knuckles
AlliedModders Donor
Join Date: Mar 2005
Location: SW Florida
Old 03-31-2013 , 00:04   Re: Need some help
Reply With Quote #8

What version of sourcemod did you compile with, also which version are you using?
__________________
Dr_Knuckles is offline
<FiH> zero
Member
Join Date: Oct 2009
Old 03-31-2013 , 03:20   Re: Need some help
Reply With Quote #9

sm 1.5, using the 1.5.

It is a extension error for tf2, but i run a cs:go server. how do i fix this?
<FiH> zero is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-31-2013 , 06:27   Re: Need some help
Reply With Quote #10

You either get the plugin recoded or you don't run that plugin
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 03-31-2013 at 08:57. Reason: spelling
YamiKaitou 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 01:40.


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