AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   CSGO Switching Race Give Weapons (https://forums.alliedmods.net/showthread.php?t=288475)

Yevorz 09-30-2016 21:46

CSGO Switching Race Give Weapons
 
Im trying to add a sort of COD effect to WC3 races where you get set weapons on spawn when you choose that race. Will remove buy time once this is actually working but having a few issues...

Tried this many ways and really just comes down to im a noob. I need the give weapons to be specific to a race. I had made 2 races (just for testing) and added in the give weapons part of my script but on spawn you get the weapons for both races despite what race you are. For example one race is supposed to get ak47 and deagle the other a scout and fiveseven when you spawn if you look at ground (doesnt matter what race you are) theres an ak, a deagle, and a fiveseven on the ground (assuming you picked up scout first).

"theres an ak, a deagle, and a fiveseven on the ground" this was after my first attempt but i added in remove weapons on spawn so now you pick up one of the pistols.

Here is my code
Code:

#pragma semicolon 1
 
#include <sourcemod>
#include "W3SIncs/War3Source_Interface"
#include "smlib"

public Plugin:myinfo =
{
    name = "War3Source - Race - Paladin",
    author = "JC",
    description = "An Elite Solider Specializing in Ranged Combat"
};
 
new thisRaceID;

new bool:RaceDisabled=true;
public OnWar3RaceEnabled(newrace)
{
    if(newrace==thisRaceID)
    {
        RaceDisabled=false;
    }
}
public OnWar3RaceDisabled(oldrace)
{
    if(oldrace==thisRaceID)
    {
        RaceDisabled=true;
    }
}
 
// Chance/Info Arrays
 
new Float:LevitationGravity[5] = {1.0, 0.8, 0.65, 0.5, 0.4};
new Float:TrueshotDamagePercent[5] = {1.0, 1.07, 1.14, 1.21, 1.28};
new Float:CrazyDuration[5] = {0.0, 4.0, 6.0, 8.0, 10.0};
new Float:CrazyUntil[MAXPLAYERSCUSTOM];
new bool:bCrazyDot[MAXPLAYERSCUSTOM];
new CrazyBy[MAXPLAYERSCUSTOM];
 
new SKILL_TRUESHOT, SKILL_LOWGRAV, SKILL_CRAZY;
 
 
public OnPluginStart()
{
    LoadTranslations("w3s.race.paladin.phrases");
    CreateTimer(0.5, BloodCrazyDOTLoop, _, TIMER_REPEAT);
    HookEvent("player_spawn", Event_Spawn);
    HookEvent("round_start", Event_Start);
}

public OnWar3LoadRaceOrItemOrdered(num)
{
    if(num == thisRaceID)
    {
 
thisRaceID=War3_CreateNewRaceT("paladin");
SKILL_LOWGRAV = War3_AddRaceSkillT(thisRaceID, "Levitation", false, 4, "0.4");
SKILL_TRUESHOT = War3_AddRaceSkillT(thisRaceID, "TrueshotAura", false, 4);
SKILL_CRAZY = War3_AddRaceSkillT(thisRaceID, "BloodCrazy", false);

 
War3_CreateRaceEnd(thisRaceID);
       
        War3_AddSkillBuff(thisRaceID, SKILL_LOWGRAV, fLowGravitySkill, LevitationGravity);
      }
}
 
public OnMapStart()
{
   
}
public OnWar3EventSpawn(client)
{
    if(RaceDisabled)
    {
        return;
    }
   
    bCrazyDot[client] = false;
}
 
public OnRaceChanged(client,oldrace,newrace)
{
if(newrace!=thisRaceID)
{
War3_SetBuff(client,fMaxSpeed,thisRaceID,1.0);
War3_SetBuff(client,fBashChance,thisRaceID,1.0);
//War3_SetMaxHP(client,100);
War3_SetBuff(client,iAdditionalMaxHealth,thisRaceID,0);
War3_SetCSArmor(client,0);
War3_SetCSArmorHasHelmet(client,false);
}
}
public OnSkillLevelChanged(client,race,skill,newskilllevel)
{
}
public OnW3TakeDmgBulletPre(victim, attacker, Float:damage)
{
    if(RaceDisabled)
    {
        return;
    }

    if(attacker != victim)
    {
        // Trueshot
        if(ValidPlayer(attacker) && War3_GetRace(attacker) == thisRaceID)
        {
            // Don't increase friendly fire damage
            if(ValidPlayer(victim) && GetClientTeam(victim) == GetClientTeam(attacker))
            {
                return;
            }
           
            new iTrueshotLevel = War3_GetSkillLevel(attacker, thisRaceID, SKILL_TRUESHOT);
            if(iTrueshotLevel > 0 && !Hexed(attacker, false) && !W3HasImmunity(victim, Immunity_Skills))
            {
                War3_DamageModPercent(TrueshotDamagePercent[iTrueshotLevel]);
                W3FlashScreen(victim, RGBA_COLOR_RED);
            }
        }
    }
}
public Action:BloodCrazyDOTLoop(Handle:h,any:data)
{
    if(RaceDisabled)
    {
        return;
    }

    new attacker;
    for(new i=1; i <= MaxClients; i++)
    {
        if(!ValidPlayer(i, true) || !bCrazyDot[i])
        {
            continue;
        }
   
        attacker = CrazyBy[i];
        if(ValidPlayer(attacker))
        {
            if(War3_GetGame() == Game_TF)
            {
                War3_DealDamage(i, 1, attacker, _, "bleed_kill");
            }
            else
            {
                if(War3_GetGame() == Game_CS && GetClientHealth(i) > 1)
                {
                    War3_DecreaseHP(i, 1);
                }
                else
                {
                    War3_DealDamage(i, 1, attacker, _, "bloodcrazy");
                }
            }
            War3_ShowHealthLostParticle(i);
        }
       
        if(GetGameTime() > CrazyUntil[i])
        {
            bCrazyDot[i] = false;
        }
    }
}

public OnW3EnemyTakeDmgBulletPre(victim,attacker,Float:damage)
{
    if(RaceDisabled)
    {
        return;
    }

    if(!W3IsOwnerSentry(attacker) && War3_GetRace(attacker) == thisRaceID && !Hexed(attacker, false) && !W3HasImmunity(victim,Immunity_Skills))
    {
        new skilllevel = War3_GetSkillLevel(attacker, thisRaceID, SKILL_CRAZY);
        if(skilllevel > 0)
        {
            bCrazyDot[victim] = true;
            CrazyBy[victim] = attacker;
            CrazyUntil[victim] = GetGameTime() + CrazyDuration[skilllevel];
        }
    }
}
public Action:Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new i = GetClientOfUserId(GetEventInt(event, "userid"));
    RemoveWeapons(i);
   
 }

public Action:Event_Start(Handle:event, const String:name[], bool:dontBroadcast)
{
    new i = GetClientOfUserId(GetEventInt(event, "userid"));
    RemoveWeapons(i);

}
RemoveWeapons(client)
{
    Client_RemoveAllWeapons(client, "weapon_knife", true); // Removes all the weapons ; Add a weapon name into the "" to exclude that weapon.
    {
        Client_GiveWeaponAndAmmo(client, "weapon_ssg08", true, 90);
        Client_GiveWeaponAndAmmo(client, "weapon_fiveseven", true, 90);
        }
}

Recap: need remove and give weapons commands to be specific to race.

As I stated I've tried this so many different ways to get it to work and feel its just a simple command string I dont know. :oops:

Thanks for the help guys.

See Latest Post For Updates

Yevorz 10-01-2016 19:43

Re: CSGO Give weapons WC3 (specify race)
 
I tried to use this function

if(race==thisRaceID && War3_GetRace(client)==thisRaceID)

but i got the error

// War3Source_000_Paladin.SP(184) : error 010: invalid function or declaration

I found that function on the "scout" race which is a common race so not sure why it didnt work. gonna keep on testing tho till i get some help

thecount 10-01-2016 22:05

Re: CSGO Give weapons WC3 (specify race)
 
Quote:

Originally Posted by Yevorz (Post 2458439)
I found that function on the "scout" race which is a common race so not sure why it didnt work

If it works in one file but not in the other, you may be missing an include.

Yevorz 10-02-2016 00:18

Re: CSGO Give weapons WC3 (specify race)
 
No, Ive checked they're all there.
I tried the if(race==thisraceid) again in this.

Code:

public Action:Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new i = GetClientOfUserId(GetEventInt(event, "userid"));
    RemoveWeapons(i);
   
 }

public Action:Event_Start(Handle:event, const String:name[], bool:dontBroadcast)
{
    new i = GetClientOfUserId(GetEventInt(event, "userid"));
    RemoveWeapons(i);

}
RemoveWeapons(client, race)
{
    Client_RemoveAllWeapons(client, "weapon_knife", true); // Removes all the weapons ; Add a weapon name into the "" to exclude that weapon.
    {
            if(race==thisRaceID)
            {
        Client_GiveWeaponAndAmmo(client, "weapon_ssg08", true, 90);
        Client_GiveWeaponAndAmmo(client, "weapon_fiveseven", true, 90);
        }
}
}

But I get error

// War3Source_000_Paladin.SP(190) : error 092: number of arguments does not match definition
// War3Source_000_Paladin.SP(197) : error 092: number of arguments does not match definition
(lines highlighted red)

blacklagoon 10-02-2016 04:49

Re: CSGO Give weapons WC3 (specify race)
 
It's because you defined RemoveWeapons(client, race) with 2 args and you call it with just RemoveWeapons(i);

Yevorz 10-02-2016 10:55

Re: CSGO Give weapons WC3 (specify race)
 
Quote:

Originally Posted by blacklagoon (Post 2458522)
It's because you defined RemoveWeapons(client, race) with 2 args and you call it with just RemoveWeapons(i);

Yeah I figured but wasn't sure how to fix it..
what would I call it? I had it working last night but i was so tired i wrote over it accidentally while testing multiple different ways on different save files... :(

cant for the life of me remember what it was I had done either. I tried to use a slightly different method

if(War3_GetRace(client)==thisRaceID)

instead so it didnt use race but it wasnt working but had no errors. I tried to implement a timer thinking that would help but couldn't get it to work that way either

Yevorz 10-04-2016 13:29

Re: CSGO Give weapons WC3 (specify race)
 
Okay I got this somewhat working sure none of yall care lol but anyway

I have a small problem when switching races. When you switch races force drops and gives you new weapons just like when you spawn. Although every race spawns with right guns but not so much for switching races..

These are the races (again these are not real just test subjects)

Brute
Code:

#pragma semicolon 1
 
#include <sourcemod>
#include "W3SIncs/War3Source_Interface"
#include "smlib"

public Plugin:myinfo =
{
    name = "War3Source - Race - Brute Bruce",
    author = "JC",
    description = "A Brute Man Bruce Is"
};
 
new thisRaceID;

new bool:RaceDisabled=true;
public OnWar3RaceEnabled(newrace)
{
    if(newrace==thisRaceID)
    {
        RaceDisabled=false;
    }
}
public OnWar3RaceDisabled(oldrace)
{
    if(oldrace==thisRaceID)
    {
        RaceDisabled=true;
    }
}
 
// Chance/Info Arrays
 
new Float:BashChance[5]={0.0,0.09,0.15,0.25,0.35};
 
new Float:UnholyAura[5] = {1.25, 1.45, 1.75, 1.95, 2.10};
new DevotionAura[5]={0,25,50,75,100};
 
new SKILL_BASH, SKILL_SPEED, SKILL_HEALTH;
 
 
public OnPluginStart()
{
    LoadTranslations("w3s.race.brute.phrases");
    HookEvent("player_spawn", Event_Spawn);
}

public OnWar3LoadRaceOrItemOrdered(num)
{
    if(num == thisRaceID)
    {
 
thisRaceID=War3_CreateNewRaceT("brute");
SKILL_HEALTH=War3_AddRaceSkillT(thisRaceID,"DevotionAura",false,4,"25/50/75/100");
SKILL_SPEED = War3_AddRaceSkillT(thisRaceID, "UnholyAura", false, 4, "20%");
SKILL_BASH = War3_AddRaceSkillT(thisRaceID, "BashChance", false,4,"9/15/25/35%","0.2");
 
War3_CreateRaceEnd(thisRaceID);
       
        War3_AddSkillBuff(thisRaceID, SKILL_HEALTH, iAdditionalMaxHealth, DevotionAura);
        War3_AddSkillBuff(thisRaceID, SKILL_SPEED, fMaxSpeed, UnholyAura);
        War3_AddSkillBuff(thisRaceID, SKILL_BASH, fBashChance, BashChance);
    }
}
 
public OnMapStart()
{
   
}
 
public OnRaceChanged(client,oldrace,newrace)
{
 if(oldrace==thisRaceID)
{
  Client_RemoveAllWeapons(client, "weapon_knife", true);
  }
  if(newrace!=thisRaceID)
  {
    Client_GiveWeaponAndAmmo(client, "weapon_deagle", true, 90); // Change weapon_glock to the weapon you want. 90 is the amount of ammo given.
    Client_GiveWeaponAndAmmo(client, "weapon_ak47", true, 90);
       
War3_SetBuff(client,fMaxSpeed,thisRaceID,1.0);
War3_SetBuff(client,fBashChance,thisRaceID,1.0);
//War3_SetMaxHP(client,100);
War3_SetBuff(client,iAdditionalMaxHealth,thisRaceID,0);
War3_SetCSArmor(client,100);
War3_SetCSArmorHasHelmet(client,true);
}
}
public OnSkillLevelChanged(client,race,skill,newskilllevel)
{
}

public Action:Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new i = GetClientOfUserId(GetEventInt(event, "userid"));
    GiveWeapons(i);
}

GiveWeapons(client)
{
    if(War3_GetRace(client)==thisRaceID)
    {
        Client_GiveWeaponAndAmmo(client, "weapon_deagle", true, 90); // Change weapon_glock to the weapon you want. 90 is the amount of ammo given.
        Client_GiveWeaponAndAmmo(client, "weapon_ak47", true, 90);
        }
 }

assassin
Code:

#pragma semicolon 1
 
#include <sourcemod>
#include "W3SIncs/War3Source_Interface"
#include "smlib"

public Plugin:myinfo =
{
    name = "War3Source - Race - Assassin",
    author = "JC",
    description = "Silence Is Key"
};

new thisRaceID;

new bool:RaceDisabled=true;
public OnWar3RaceEnabled(newrace)
{
    if(newrace==thisRaceID)
    {
        RaceDisabled=false;
    }
}
public OnWar3RaceDisabled(oldrace)
{
    if(oldrace==thisRaceID)
    {
        RaceDisabled=true;
    }
}
 
// Chance/Info Arrays
 
new Float:InvisibilityAlphaTF[5]={1.0,0.74,0.58,0.46,0.30};


new Float:InvisibilityAlphaCS[5]={1.0,0.80,0.70,0.60,0.50};

new Float:ThornsReturnDamage[5] = {0.0, 0.10, 0.14, 0.18, 0.22};

new Float:fEvadeChance[5] = {0.0, 0.11, 0.13, 0.19, 0.21};

SKILL_INVIS, SKILL_THORNS, SKILL_EVADE;


public OnPluginStart()
{
    LoadTranslations("w3s.race.assassin.phrases");
    HookEvent("player_spawn", Event_Spawn);
}

public OnWar3LoadRaceOrItemOrdered(num)
{
    if(num == thisRaceID)
    {
 
thisRaceID=War3_CreateNewRaceT("assassin");
SKILL_INVIS=War3_AddRaceSkillT(thisRaceID,"Invisibility",false,4,"50% (CS), 30% (TF)");
SKILL_THORNS=War3_AddRaceSkillT(thisRaceID, "ThornsAura", false, 4);
SKILL_EVADE=War3_AddRaceSkillT(thisRaceID, "Evasion", false, 4);

War3_CreateRaceEnd(thisRaceID);

        War3_AddSkillBuff(thisRaceID, SKILL_INVIS, fInvisibilitySkill, GameTF() ? InvisibilityAlphaTF : InvisibilityAlphaCS);
        War3_AddSkillBuff(thisRaceID, SKILL_EVADE, fDodgeChance, fEvadeChance);
    }
}
 
public OnMapStart()
{
   
}
 
public OnRaceChanged(client,oldrace,newrace)
{
 if(oldrace==thisRaceID)
{
  Client_RemoveAllWeapons(client, "weapon_knife", true);
  }
  if(newrace!=thisRaceID)
  {
    Client_GiveWeaponAndAmmo(client, "weapon_cz75a", true, 90); // Change weapon_glock to the weapon you want. 90 is the amount of ammo given.
    Client_GiveWeaponAndAmmo(client, "weapon_mp9", true, 90);
War3_SetCSArmor(client,100);
War3_SetCSArmorHasHelmet(client,true);
}
}
public OnWar3EventPostHurt(victim, attacker, Float:damage, const String:weapon[32], bool:isWarcraft)
{
    if(RaceDisabled)
    {
        return;
    }

    if(!isWarcraft && ValidPlayer(victim) && victim != attacker && War3_GetRace(victim) == thisRaceID)
    {
        new iThornsLevel = War3_GetSkillLevel(victim, thisRaceID, SKILL_THORNS );
        if(iThornsLevel > 0 && !Hexed(victim, false))
        {
            // Don't return friendly fire damage
            if(ValidPlayer(attacker) && GetClientTeam(victim) == GetClientTeam(attacker))
            {
                return;
            }
           
            if(!W3HasImmunity(attacker, Immunity_Skills))
            {
                new iDamage = RoundToFloor(damage * ThornsReturnDamage[iThornsLevel]);
                if(iDamage > 0)
                {
                    if(iDamage > 40)
                    {
                        iDamage = 40;
                    }

                    if (GAMECSANY)
                    {
                        // Since this is delayed we don't know if the damage actually went through
                        // and just have to assume... Stupid!
                        War3_DealDamageDelayed(attacker, victim, iDamage, "thorns", 0.1, true, SKILL_THORNS);
                        War3_EffectReturnDamage(victim, attacker, iDamage, SKILL_THORNS);
                    }
                    else
                    {
                        if(War3_DealDamage(attacker, iDamage, victim, _, "thorns", _, W3DMGTYPE_PHYSICAL))
                        {
                            War3_EffectReturnDamage(victim, attacker, War3_GetWar3DamageDealt(), SKILL_THORNS);
                        }
                    }
                }
            }
        }
    }

}
public Action:Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new i = GetClientOfUserId(GetEventInt(event, "userid"));
    GiveWeapons(i);
}

GiveWeapons(client)
{
    if(War3_GetRace(client)==thisRaceID)
    {
        Client_GiveWeaponAndAmmo(client, "weapon_cz75a", true, 90); // Change weapon_glock to the weapon you want. 90 is the amount of ammo given.
        Client_GiveWeaponAndAmmo(client, "weapon_mp9", true, 90);
        }
 }

paladin
Code:

#pragma semicolon 1
 
#include <sourcemod>
#include "W3SIncs/War3Source_Interface"
#include "smlib"
#include <sdktools>

public Plugin:myinfo =
{
    name = "War3Source - Race - Paladin",
    author = "JC",
    description = "An Elite Solider Specializing in Ranged Combat"
};
 
new thisRaceID;

new bool:RaceDisabled=true;
public OnWar3RaceEnabled(newrace)
{
    if(newrace==thisRaceID)
    {
        RaceDisabled=false;
    }
}
public OnWar3RaceDisabled(oldrace)
{
    if(oldrace==thisRaceID)
    {
        RaceDisabled=true;
    }
}
 
// Chance/Info Arrays
 
new Float:LevitationGravity[5] = {1.0, 0.8, 0.65, 0.5, 0.4};
new Float:TrueshotDamagePercent[5] = {1.0, 1.07, 1.14, 1.21, 1.28};
new Float:CrazyDuration[5] = {0.0, 4.0, 6.0, 8.0, 10.0};
new Float:CrazyUntil[MAXPLAYERSCUSTOM];
new bool:bCrazyDot[MAXPLAYERSCUSTOM];
new CrazyBy[MAXPLAYERSCUSTOM];
 
new SKILL_TRUESHOT, SKILL_LOWGRAV, SKILL_CRAZY;
 
 
public OnPluginStart()
{
    LoadTranslations("w3s.race.paladin.phrases");
    CreateTimer(0.5, BloodCrazyDOTLoop, _, TIMER_REPEAT);
    HookEvent("player_spawn", Event_Spawn);
}

public OnWar3LoadRaceOrItemOrdered(num)
{
    if(num == thisRaceID)
    {
 
thisRaceID=War3_CreateNewRaceT("paladin");
SKILL_LOWGRAV = War3_AddRaceSkillT(thisRaceID, "Levitation", false, 4, "0.4");
SKILL_TRUESHOT = War3_AddRaceSkillT(thisRaceID, "TrueshotAura", false, 4);
SKILL_CRAZY = War3_AddRaceSkillT(thisRaceID, "BloodCrazy", false);

 
War3_CreateRaceEnd(thisRaceID);
       
        War3_AddSkillBuff(thisRaceID, SKILL_LOWGRAV, fLowGravitySkill, LevitationGravity);
      }
}
 
public OnMapStart()
{
   
}
public OnWar3EventSpawn(client)
{
    if(RaceDisabled)
    {
        return;
    }   
   
    bCrazyDot[client] = false;
}
 
public OnRaceChanged(client,oldrace,newrace)
{
 if(oldrace==thisRaceID)
{
  Client_RemoveAllWeapons(client, "weapon_knife", true);
  }
  if(newrace!=thisRaceID)
  {
    Client_GiveWeaponAndAmmo(client, "weapon_fiveseven", true, 90); // Change weapon_glock to the weapon you want. 90 is the amount of ammo given.
    Client_GiveWeaponAndAmmo(client, "weapon_SSG08", true, 90);
//War3_SetMaxHP(client,100);
War3_SetCSArmor(client,100);
War3_SetCSArmorHasHelmet(client,true);
}
}
public OnSkillLevelChanged(client,race,skill,newskilllevel)
{
}
public OnW3TakeDmgBulletPre(victim, attacker, Float:damage)
{
    if(RaceDisabled)
    {
        return;
    }

    if(attacker != victim)
    {
        // Trueshot
        if(ValidPlayer(attacker) && War3_GetRace(attacker) == thisRaceID)
        {
            // Don't increase friendly fire damage
            if(ValidPlayer(victim) && GetClientTeam(victim) == GetClientTeam(attacker))
            {
                return;
            }
           
            new iTrueshotLevel = War3_GetSkillLevel(attacker, thisRaceID, SKILL_TRUESHOT);
            if(iTrueshotLevel > 0 && !Hexed(attacker, false) && !W3HasImmunity(victim, Immunity_Skills))
            {
                War3_DamageModPercent(TrueshotDamagePercent[iTrueshotLevel]);
                W3FlashScreen(victim, RGBA_COLOR_RED);
            }
        }
    }
}
public Action:BloodCrazyDOTLoop(Handle:h,any:data)
{
    if(RaceDisabled)
    {
        return;
    }

    new attacker;
    for(new i=1; i <= MaxClients; i++)
    {
        if(!ValidPlayer(i, true) || !bCrazyDot[i])
        {
            continue;
        }
   
        attacker = CrazyBy[i];
        if(ValidPlayer(attacker))
        {
            if(War3_GetGame() == Game_TF)
            {
                War3_DealDamage(i, 1, attacker, _, "bleed_kill");
            }
            else
            {
                if(War3_GetGame() == Game_CS && GetClientHealth(i) > 1)
                {
                    War3_DecreaseHP(i, 1);
                }
                else
                {
                    War3_DealDamage(i, 1, attacker, _, "bloodcrazy");
                }
            }
            War3_ShowHealthLostParticle(i);
        }
       
        if(GetGameTime() > CrazyUntil[i])
        {
            bCrazyDot[i] = false;
        }
    }
}

public OnW3EnemyTakeDmgBulletPre(victim,attacker,Float:damage)
{
    if(RaceDisabled)
    {
        return;
    }

    if(!W3IsOwnerSentry(attacker) && War3_GetRace(attacker) == thisRaceID && !Hexed(attacker, false) && !W3HasImmunity(victim,Immunity_Skills))
    {
        new skilllevel = War3_GetSkillLevel(attacker, thisRaceID, SKILL_CRAZY);
        if(skilllevel > 0)
        {
            bCrazyDot[victim] = true;
            CrazyBy[victim] = attacker;
            CrazyUntil[victim] = GetGameTime() + CrazyDuration[skilllevel];
        }
    }
}
public Action:Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new i = GetClientOfUserId(GetEventInt(event, "userid"));
    GiveWeapons(i);
}

GiveWeapons(client)
{
    if(War3_GetRace(client)==thisRaceID)
    {
        Client_GiveWeaponAndAmmo(client, "weapon_fiveseven", true, 90); // Change weapon_glock to the weapon you want. 90 is the amount of ammo given.
        Client_GiveWeaponAndAmmo(client, "weapon_SSG08", true, 90);
        }
 }

When races are switched you get the bruce weapons (ak47,deagle) for paladin and assassin but for bruce race you get the paladin weapons (scout,fiveseven). Theres no mix up on scripts I believe they say the right weapons, so whats the deal???


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

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