Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-10-24 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
October 24, 2012, 04:24:23 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: 1 ... 5 6 [7] 8 9 ... 22
  Print  
Author Topic: [Russian] Помощь в обновлении/исправлении рас  (Read 20768 times)
Divix
Sr. Member
****
Posts: 280


View Profile Email
« Reply #150 on: January 12, 2012, 12:20:52 PM »

Frenzzy, ну а смысла от ссылки ?) Я уже читал... насчет %c правда пропустил - каюсь, не убивайте...
Я спрашиваю про другое.. почему придумали %i и %d, почему два варианта ?)) Я понял уже, что абсолютно не какой разницы нету, но почему можно и так и так - мне это спать не дает...
Вот насчет %t - знаю, что файл перевода, но видел еще и это "PrintToChat(client, "this is a float: %t", floatVariable); // float" - это тоже фраза перевода ? Или ошибка ?
Logged
Divix
Sr. Member
****
Posts: 280


View Profile Email
« Reply #151 on: January 12, 2012, 12:32:44 PM »

и у хэдкраба hp 7000 и он тоже оружие берет

Даже не знаю, что такое с хп..
Пытаясь в минус зайти без INTERNAL при прокачке скила хп увеличиваются до тысяч... После смены карты все отлично - только так. Есть у кого идеи, предложения или объяснит кто ?)
Насчет оружия - эта проблема не с расой. Напиши sm plugins list и скинь ответ сюда.
« Last Edit: January 12, 2012, 01:18:48 PM by Divix » Logged
Divix
Sr. Member
****
Posts: 280


View Profile Email
« Reply #152 on: January 12, 2012, 01:40:10 PM »

Так... все... с хп окончательно запутался, помогите кто чем может...
В этом коде все отлично:
Code:
#pragma semicolon 1

#include <sourcemod>
#include "W3SIncs/War3Source_Interface"
#include <sdktools>
#include <sdktools_functions>
#include <sdktools_tempents>
#include <sdktools_tempents_stocks>

#include <sdkhooks>

new thisRaceID;

new SKILL_LONGJUMP,SKILL_FANGS,SKILL_FOURLEGS,SKILL_LATCH;

//skill 3
new const FangsInitialDamage=20;
new const FangsTrailingDamage=5;
new Float:FangsChanceArr[]={0.0,0.05,0.1,0.15,0.2};
new FangsTimes[]={0,2,3,4,5};
new BeingFangedBy[66];
new FangsRemaining[66];

//latch
new bool:bRound[66];
new BeingLatchedBy[66];
// Target getting killed
new LatchKilled[66];
new Float:LatchChanceArr[]={0.0,0.14,0.16,0.18,0.20};
new Float:LatchonDamageMin[]={0.0,3.0,4.0,5.0,6.0};
new Float:LatchonDamageMax[]={0.0,7.0,8.0,9.0,10.0};

new String:Fangsstr[]={"npc/roller/mine/rmine_blades_out2.wav"};

public Plugin:myinfo =
{
name = "War3Source Race - Headcrab",
author = "[Oddity]TeacerCreature",
description = "Headcrab race for War3Source.",
version = "1.0.0",
url = "http://warcraft-source.net/"
};

public OnWar3LoadRaceOrItemOrdered(num)
{
if(num==70)
{
thisRaceID=War3_CreateNewRace("Headcrab [HL2]", "headcrab");
SKILL_LONGJUMP=War3_AddRaceSkill(thisRaceID,"Power legs (passive)", "Long jump.",false,4);
SKILL_FOURLEGS=War3_AddRaceSkill(thisRaceID,"Four legs (passive)", "Low gravity.",false,4);
SKILL_FANGS=War3_AddRaceSkill(thisRaceID,"Fangs (attacker)", "Poison damage over time",false,4);
SKILL_LATCH=War3_AddRaceSkill(thisRaceID,"Latch On", "Latch on to killer and respawn",false,4);
War3_CreateRaceEnd(thisRaceID);
}
}

public OnPluginStart()
{
HookEvent("player_jump", Event_PlayerJump);
HookEvent("round_start",RoundStartEvent);
}

public APLRes:AskPluginLoad2Custom(Handle:myself, bool:late, String:error[], err_max)
{
MarkNativeAsOptional("SDKHook");
MarkNativeAsOptional("SDKUnhook");
return APLRes_Success;
}

public OnMapStart()
{
PrecacheModel("models/headcrab.mdl", true);
PrecacheModel("models/headcrabblack.mdl", true);
War3_PrecacheSound(Fangsstr);
}

public RoundStartEvent(Handle:event,const String:name[],bool:dontBroadcast)
{
for(new i=1;i<=MaxClients;i++)
{
if(ValidPlayer(i))
{
bRound[i]=false;
}
}
}

public OnWar3EventSpawn(client)
{
new race = War3_GetRace(client);
if (race == thisRaceID)
{  
//War3_SetMaxHP(client,War3_GetMaxHP(client)-50);
//SetEntityHealth(client, 50);
War3_SetBuff(client,iAdditionalMaxHealth,thisRaceID,-50);
if(GetClientTeam(client) == 3){
SetEntityModel(client, "models/headcrab.mdl");
}
else{
SetEntityModel(client, "models/headcrabblack.mdl");
}
new skill3_fourlegs = War3_GetSkillLevel(client, race, SKILL_FOURLEGS);
new Float:gravity = 1.00;
switch (skill3_fourlegs)
{
case 0:
gravity = 1.00;
case 1:
gravity = 0.90;
case 2:
gravity = 0.80;
case 3:
gravity = 0.70;
case 4:
gravity = 0.60;
}
War3_SetBuff(client,fLowGravitySkill,thisRaceID,gravity);
}
}

public OnSkillLevelChanged(client, race, skill, newskilllevel)
{
    if (client > 0)
    {
        if (race == thisRaceID && skill == 1)
        {
            new Float:gravity = 1.00;
            switch (newskilllevel)
            {
                case 0:
                    gravity = 1.00;
                case 1:
                    gravity = 0.90;
                case 2:
                    gravity = 0.80;
                case 3:
                    gravity = 0.70;
                case 4:
                    gravity = 0.60;
            }
            War3_SetBuff(client,fLowGravitySkill,thisRaceID,gravity);
        }
    }
}

public OnRaceChanged(client,oldrace,newrace)
{
if(newrace != thisRaceID)
{
War3_WeaponRestrictTo(client,thisRaceID,"");
War3_SetBuff(client,fLowGravitySkill,thisRaceID,1.0);
War3_SetBuff(client,bInvisWeaponOverride,thisRaceID,false);
War3_SetBuff(client,iAdditionalMaxHealth,thisRaceID,0);
}
if(newrace == thisRaceID)
{
War3_WeaponRestrictTo(client,thisRaceID,"weapon_knife");
War3_SetBuff(client,bInvisWeaponOverride,thisRaceID,true);
War3_SetBuff(client,iInvisWeaponOverrideAmount,thisRaceID,0);
if(ValidPlayer(client,true))
{
if(GetClientTeam(client) == 3)
{
SetEntityModel(client, "models/headcrab.mdl");
}
else
{
SetEntityModel(client, "models/headcrabblack.mdl");
}
}
}
}

public Event_PlayerJump(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event,"userid"));
    if (client > 0)
    {
        new race = War3_GetRace(client);
        if (race == thisRaceID)
        {
            new skill2_longjump = War3_GetSkillLevel(client, race, SKILL_LONGJUMP);
            new Float:long_push = 1.00;
            switch (skill2_longjump)
            {
                case 0:
                    long_push = 1.10;
                case 1:
                    long_push = 1.15;
                case 2:
                    long_push = 1.20;
                case 3:
                    long_push = 1.25;
                case 4:
                    long_push = 1.30;
            }

            if (skill2_longjump > 0)
            {
                new v_0 = FindSendPropOffs("CBasePlayer","m_vecVelocity[0]");
                new v_1 = FindSendPropOffs("CBasePlayer","m_vecVelocity[1]");
                new v_b = FindSendPropOffs("CBasePlayer","m_vecBaseVelocity");
                new Float:finalvec[3];
                finalvec[0] = GetEntDataFloat(client, v_0) * long_push / 2.0;
                finalvec[1] = GetEntDataFloat(client, v_1) * long_push / 2.0;
                finalvec[2] = long_push * 50.0;
                SetEntDataVector(client, v_b, finalvec, true);
            }
        }
    }
}

public OnW3TakeDmgBullet(victim,attacker,Float:damage)
{
if(ValidPlayer(attacker,true)&&ValidPlayer(victim,true)&&GetClientTeam(victim)!=GetClientTeam(attacker))
{

//ATTACKER IS headcrab
if(War3_GetRace(attacker)==thisRaceID)
{
//fangs poison
new Float:chance_mod=W3ChanceModifier(attacker);
/// CHANCE MOD BY VICTIM
new skill_level = War3_GetSkillLevel(attacker,thisRaceID,SKILL_FANGS);
if(skill_level>0 && FangsRemaining[victim]==0 && GetRandomFloat(0.0,1.0)<=chance_mod*FangsChanceArr[skill_level]&&!Silenced(attacker))
{
if(W3HasImmunity(victim,Immunity_Skills))
{
PrintHintText(victim,"Immunity to Fangs");
PrintHintText(attacker,"Fangs Immunity");
}
else
{
PrintHintText(victim,"You got bitten by enemy with Fangs");
PrintHintText(attacker,"You bit your enemy with Fangs");
BeingFangedBy[victim]=attacker;
FangsRemaining[victim]=FangsTimes[skill_level];
War3_DealDamage(victim,FangsInitialDamage,attacker,DMG_BULLET,"fangs");
W3FlashScreen(victim,RGBA_COLOR_RED);

EmitSoundToAll(Fangsstr,attacker);
EmitSoundToAll(Fangsstr,victim);
CreateTimer(1.0,FangsLoop,victim);
}
}
}
}
}

public OnWar3EventDeath(victim,attacker)
{
if(ValidPlayer(victim)&&ValidPlayer(attacker))
{
new race = War3_GetRace(victim);
decl skilllevel;
if(race==thisRaceID)
{
skilllevel=War3_GetSkillLevel(victim,thisRaceID,SKILL_LATCH);
if(skilllevel>0&&GetRandomFloat(0.0,1.0)<=LatchChanceArr[skilllevel]&&!W3HasImmunity(attacker,Immunity_Ultimates)&&!Silenced(victim))
{
BeingLatchedBy[attacker]=victim;
PrintHintText(attacker,"You are being latched on by headcrab");
PrintHintText(victim,"Latched on to your killer");
EmitSoundToAll(Fangsstr,attacker);
EmitSoundToAll(Fangsstr,victim);
CreateTimer(2.0,LatchDamageLoop,attacker);
bRound[attacker]=true;
}
}
new headcrabperson=BeingLatchedBy[victim];
if(ValidPlayer( headcrabperson ))
{
if(War3_GetRace(headcrabperson)==thisRaceID && !IsPlayerAlive(headcrabperson))
{
War3_ChatMessage( headcrabperson , "Your killer died, you get to respawn");
LatchKilled[headcrabperson]=victim;
CreateTimer(0.2,RespawnPlayer,headcrabperson);
}
BeingLatchedBy[victim]=0;
}
}
}


public Action:LatchDamageLoop(Handle:timer,any:client)
{
if(ValidPlayer(client,true)&&ValidPlayer(BeingLatchedBy[client])&&bRound[client])
{

decl skill;
skill=War3_GetSkillLevel(BeingLatchedBy[client],thisRaceID,SKILL_LATCH);
War3_DealDamage(client,RoundFloat(GetRandomFloat(LatchonDamageMin[skill],LatchonDamageMax[skill])),BeingLatchedBy[client],_,"LatchOn",W3DMGORIGIN_ULTIMATE,W3DMGTYPE_TRUEDMG);
W3FlashScreen(client,RGBA_COLOR_RED, 0.5,0.5);
PrintToConsole(client,"Recieved -%d Latchon dmg",War3_GetWar3DamageDealt());
PrintToConsole(BeingLatchedBy[client],"Dealt -%d Latchon dmg",War3_GetWar3DamageDealt());
CreateTimer(1.0,LatchDamageLoop,client);
}
}

public Action:FangsLoop(Handle:timer,any:victim)
{
if(FangsRemaining[victim]>0 && ValidPlayer(BeingFangedBy[victim]) && ValidPlayer(victim,true))
{
War3_DealDamage(victim,FangsTrailingDamage,BeingFangedBy[victim],_,"Fangs",W3DMGORIGIN_ULTIMATE,W3DMGTYPE_TRUEDMG);
//War3_DealDamage(victim,FangsTrailingDamage,BeingFangedBy[victim],DMG_BULLET,"fangs");
FangsRemaining[victim]--;
W3FlashScreen(victim,RGBA_COLOR_RED, 0.3, 0.4);
CreateTimer(1.0,FangsLoop,victim);
}
}

public Action:RespawnPlayer(Handle:timer,any:client)
{
if(client>0&&!IsPlayerAlive(client)&&ValidPlayer(LatchKilled[client]))
{
War3_SpawnPlayer(client);
new Float:pos[3];
new Float:ang[3];
War3_CachedAngle(LatchKilled[client],ang);
War3_CachedPosition(LatchKilled[client],pos);
TeleportEntity(client,pos,ang,NULL_VECTOR);
}
}

А в этом проблемы:
Code:
#pragma semicolon 1

#include <sourcemod>
#include "W3SIncs/War3Source_Interface"
#include <sdktools>
#include <sdktools_functions>
#include <sdktools_tempents>
#include <sdktools_tempents_stocks>

#include <sdkhooks>

new thisRaceID;

new SKILL_LONGJUMP,SKILL_FANGS,SKILL_FOURLEGS,SKILL_LATCH;

//skill 3
new const FangsInitialDamage=20;
new const FangsTrailingDamage=5;
new Float:FangsChanceArr[]={0.0,0.05,0.1,0.15,0.2};
new FangsTimes[]={0,2,3,4,5};
new BeingFangedBy[66];
new FangsRemaining[66];

//latch
new bool:bRound[66];
new BeingLatchedBy[66];
// Target getting killed
new LatchKilled[66];
new Float:LatchChanceArr[]={0.0,0.14,0.16,0.18,0.20};
new Float:LatchonDamageMin[]={0.0,3.0,4.0,5.0,6.0};
new Float:LatchonDamageMax[]={0.0,7.0,8.0,9.0,10.0};

new String:Fangsstr[]="npc/roller/mine/rmine_blades_out2.wav"; // Не проверенно {}

public Plugin:myinfo =
{
name = "War3Source Race - Headcrab",
author = "[Oddity]TeacerCreature",
description = "Headcrab race for War3Source.",
version = "1.0.0",
url = "http://warcraft-source.net/"
};

public OnWar3LoadRaceOrItemOrdered(num)
{
if(num==70)
{
thisRaceID=War3_CreateNewRaceT("headcrab");
SKILL_LONGJUMP=War3_AddRaceSkillT(thisRaceID,"1",false,4);
SKILL_FOURLEGS=War3_AddRaceSkillT(thisRaceID,"2",false,4);
SKILL_FANGS=War3_AddRaceSkillT(thisRaceID,"3",false,4);
SKILL_LATCH=War3_AddRaceSkillT(thisRaceID,"4",false,4);
War3_CreateRaceEnd(thisRaceID);
}
}

public OnPluginStart()
{
HookEvent("player_jump", Event_PlayerJump);
HookEvent("round_start",RoundStartEvent);
HookEvent("player_footstep", Event_FootStep, EventHookMode_Pre);
LoadTranslations("w3s.race.headcrab.phrases");
}

public Action:Event_FootStep(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if( War3_GetRace( client ) == thisRaceID )
{
SetEntProp(client, Prop_Data, "m_fFlags", 4);
}
}



public OnMapStart()
{
PrecacheModel("models/headcrab.mdl", true);
PrecacheModel("models/headcrabblack.mdl", true);
War3_PrecacheSound(Fangsstr);
}

public RoundStartEvent(Handle:event,const String:name[],bool:dontBroadcast)
{
for(new i=1;i<=MaxClients;i++)
{
if(ValidPlayer(i))
{
bRound[i]=false;
}
}
}

public OnWar3EventSpawn(client)
{
new race = War3_GetRace(client);
if (race == thisRaceID)
{
War3_SetBuff(client,iAdditionalMaxHealth,thisRaceID,-60);
InitPassiveSkills(client);
}
}

public OnSkillLevelChanged(client, race, skill, newskilllevel)
{
    if (client > 0)
    {
        if (race == thisRaceID && skill == 1)
        {
            new Float:gravity = 1.00;
            switch (newskilllevel)
            {
                case 0:
                    gravity = 1.00;
                case 1:
                    gravity = 0.90;
                case 2:
                    gravity = 0.80;
                case 3:
                    gravity = 0.70;
                case 4:
                    gravity = 0.60;
            }
            War3_SetBuff(client,fLowGravitySkill,thisRaceID,gravity);
        }
    }

}

public OnRaceChanged(client,oldrace,newrace)
{
if(newrace!=thisRaceID)
{
War3_WeaponRestrictTo(client,thisRaceID,"");
War3_SetBuff(client,iAdditionalMaxHealth,thisRaceID,0);
W3ResetAllBuffRace(client,thisRaceID);
}
if(newrace==thisRaceID)
{
InitPassiveSkills(client);
}
}

public Event_PlayerJump(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event,"userid"));
    if (client > 0)
    {
        new race = War3_GetRace(client);
        if (race == thisRaceID)
        {
            new skill2_longjump = War3_GetSkillLevel(client, race, SKILL_LONGJUMP);
            new Float:long_push = 1.00;
            switch (skill2_longjump)
            {
                case 0:
                    long_push = 1.10;
                case 1:
                    long_push = 1.15;
                case 2:
                    long_push = 1.20;
                case 3:
                    long_push = 1.25;
                case 4:
                    long_push = 1.30;
            }

            if (skill2_longjump > 0)
            {
                new v_0 = FindSendPropOffs("CBasePlayer","m_vecVelocity[0]");
                new v_1 = FindSendPropOffs("CBasePlayer","m_vecVelocity[1]");
                new v_b = FindSendPropOffs("CBasePlayer","m_vecBaseVelocity");
                new Float:finalvec[3];
                finalvec[0] = GetEntDataFloat(client, v_0) * long_push / 2.0;
                finalvec[1] = GetEntDataFloat(client, v_1) * long_push / 2.0;
                finalvec[2] = long_push * 50.0;
                SetEntDataVector(client, v_b, finalvec, true);
            }
        }
    }
}

public OnW3TakeDmgBullet(victim,attacker,Float:damage)
{
if(ValidPlayer(attacker,true)&&ValidPlayer(victim,true)&&GetClientTeam(victim)!=GetClientTeam(attacker))
{

//ATTACKER IS headcrab
if(War3_GetRace(attacker)==thisRaceID)
{
//fangs poison
new Float:chance_mod=W3ChanceModifier(attacker);
/// CHANCE MOD BY VICTIM
new skill_level = War3_GetSkillLevel(attacker,thisRaceID,SKILL_FANGS);
if(skill_level>0 && FangsRemaining[victim]==0 && GetRandomFloat(0.0,1.0)<=chance_mod*FangsChanceArr[skill_level]&&!Silenced(attacker))
{
if(W3HasImmunity(victim,Immunity_Skills))
{
PrintHintText(victim,"%t","Immunity to Fangs");
PrintHintText(attacker,"%t","Fangs Immunity");
}
else
{
PrintHintText(victim,"%t","You got bitten by enemy with Fangs");
PrintHintText(attacker,"%t","You bit your enemy with Fangs");
BeingFangedBy[victim]=attacker;
FangsRemaining[victim]=FangsTimes[skill_level];
War3_DealDamage(victim,FangsInitialDamage,attacker,DMG_BULLET,"fangs");
W3FlashScreen(victim,RGBA_COLOR_RED);

EmitSoundToAll(Fangsstr,attacker);
EmitSoundToAll(Fangsstr,victim);
CreateTimer(1.0,FangsLoop,victim);
}
}
}
}
}

public OnWar3EventDeath(victim,attacker)
{
if(ValidPlayer(victim)&&ValidPlayer(attacker))
{
new race = War3_GetRace(victim);
decl skilllevel;
if(race==thisRaceID)
{
skilllevel=War3_GetSkillLevel(victim,thisRaceID,SKILL_LATCH);
if(skilllevel>0&&GetRandomFloat(0.0,1.0)<=LatchChanceArr[skilllevel]&&!W3HasImmunity(attacker,Immunity_Ultimates)&&!Silenced(victim))
{
BeingLatchedBy[attacker]=victim;
PrintHintText(attacker,"%t","You are being latched on by headcrab");
PrintHintText(victim,"%t","Latched on to your killer");
EmitSoundToAll(Fangsstr,attacker);
EmitSoundToAll(Fangsstr,victim);
CreateTimer(2.0,LatchDamageLoop,attacker);
bRound[attacker]=true;
}
}
new headcrabperson=BeingLatchedBy[victim];
if(ValidPlayer( headcrabperson ))
{
if(War3_GetRace(headcrabperson)==thisRaceID && !IsPlayerAlive(headcrabperson))
{
War3_ChatMessage( headcrabperson , "%T", "Your killer died, you get to respawn", headcrabperson);
LatchKilled[headcrabperson]=victim;
CreateTimer(0.2,RespawnPlayer,headcrabperson);
}
BeingLatchedBy[victim]=0;
}
}
}


public Action:LatchDamageLoop(Handle:timer,any:client)
{
if(ValidPlayer(client,true)&&ValidPlayer(BeingLatchedBy[client])&&bRound[client])
{

decl skill;
skill=War3_GetSkillLevel(BeingLatchedBy[client],thisRaceID,SKILL_LATCH);
War3_DealDamage(client,RoundFloat(GetRandomFloat(LatchonDamageMin[skill],LatchonDamageMax[skill])),BeingLatchedBy[client],_,"LatchOn",W3DMGORIGIN_ULTIMATE,W3DMGTYPE_TRUEDMG);
W3FlashScreen(client,RGBA_COLOR_RED, 0.5,0.5);
PrintToConsole(client,"Recieved -%d Latchon dmg",War3_GetWar3DamageDealt());
PrintToConsole(BeingLatchedBy[client],"Dealt -%d Latchon dmg",War3_GetWar3DamageDealt());
CreateTimer(1.0,LatchDamageLoop,client);
}
}

public Action:FangsLoop(Handle:timer,any:victim)
{
if(FangsRemaining[victim]>0 && ValidPlayer(BeingFangedBy[victim]) && ValidPlayer(victim,true))
{
War3_DealDamage(victim,FangsTrailingDamage,BeingFangedBy[victim],_,"Fangs",W3DMGORIGIN_ULTIMATE,W3DMGTYPE_TRUEDMG);
//War3_DealDamage(victim,FangsTrailingDamage,BeingFangedBy[victim],DMG_BULLET,"fangs");
FangsRemaining[victim]--;
W3FlashScreen(victim,RGBA_COLOR_RED, 0.3, 0.4);
CreateTimer(1.0,FangsLoop,victim);
}
}

public Action:RespawnPlayer(Handle:timer,any:client)
{
if(client>0&&!IsPlayerAlive(client)&&ValidPlayer(LatchKilled[client]))
{
War3_SpawnPlayer(client);
new Float:pos[3];
new Float:ang[3];
War3_CachedAngle(LatchKilled[client],ang);
War3_CachedPosition(LatchKilled[client],pos);
TeleportEntity(client,pos,ang,NULL_VECTOR);
}
}

public InitPassiveSkills(client)
{
if(War3_GetRace(client)==thisRaceID)
{
if(ValidPlayer(client,true))
{
War3_SetBuff(client,bInvisWeaponOverride,thisRaceID,true);
War3_SetBuff(client,iInvisWeaponOverrideAmount,thisRaceID,0);
War3_WeaponRestrictTo(client,thisRaceID,"weapon_knife");
if(GetClientTeam(client) == 3)
{
SetEntityModel(client, "models/headcrab.mdl");
}
else
{
SetEntityModel(client, "models/headcrabblack.mdl");
}

new skill3_fourlegs = War3_GetSkillLevel(client, thisRaceID, SKILL_FOURLEGS);
new Float:gravity = 1.00;
switch (skill3_fourlegs)
{
case 0:
gravity = 1.00;
case 1:
gravity = 0.90;
case 2:
gravity = 0.80;
case 3:
gravity = 0.70;
case 4:
gravity = 0.60;
}
War3_SetBuff(client,fLowGravitySkill,thisRaceID,gravity);
}
}
}
Logged
PblLLAPb
Newbie
*
Posts: 38



View Profile Email
« Reply #153 on: January 12, 2012, 11:24:59 PM »

Вот что получилось
Code:
sm plugins list
 "Admin File Reader" (1.4.1) by AlliedModders LLC
 "Admin Menu" (1.4.1) by AlliedModders LLC
 "Admin Help" (1.4.1) by AlliedModders LLC
 "Advanced c4 Countdown Timer" (1.4.1) by dalto
 "Anti-Flood" (1.4.1) by AlliedModders LLC
 "Basic Chat" (1.4.1) by AlliedModders LLC
 "Basic Ban Commands" (1.4.1) by AlliedModders LLC
 "Basic Comm Control" (1.4.1) by AlliedModders LLC
 "Basic Commands" (1.4.1) by AlliedModders LLC
 "Basic Info Triggers" (1.4.1) by AlliedModders LLC
To see more, type "sm plugins 11"

Logged
Arturius
Moderator
Full Member
*****
Posts: 155



View Profile Email
« Reply #154 on: January 13, 2012, 01:11:52 AM »

Так... все... с хп окончательно запутался, помогите кто чем может...
В этом коде все отлично:
..........
А в этом проблемы:
..........
Откомпилировал второй код и проверил на локальном сервере - с жизнями всё как надо. На респауне 40 хп, как ты и поставил.
Logged
Divix
Sr. Member
****
Posts: 280


View Profile Email
« Reply #155 on: January 13, 2012, 04:22:55 AM »

Так... все... с хп окончательно запутался, помогите кто чем может...
В этом коде все отлично:
..........
А в этом проблемы:
..........
Откомпилировал второй код и проверил на локальном сервере - с жизнями всё как надо. На респауне 40 хп, как ты и поставил.
Надо было уточнить как возникает баг. Баг возникает если вошел новый игрок (именно новый, который не брал за текущею базу данных краба), а потом качнул скилы.

Вот что получилось
Code:
sm plugins list
 "Admin File Reader" (1.4.1) by AlliedModders LLC
 "Admin Menu" (1.4.1) by AlliedModders LLC
 "Admin Help" (1.4.1) by AlliedModders LLC
 "Advanced c4 Countdown Timer" (1.4.1) by dalto
 "Anti-Flood" (1.4.1) by AlliedModders LLC
 "Basic Chat" (1.4.1) by AlliedModders LLC
 "Basic Ban Commands" (1.4.1) by AlliedModders LLC
 "Basic Comm Control" (1.4.1) by AlliedModders LLC
 "Basic Commands" (1.4.1) by AlliedModders LLC
 "Basic Info Triggers" (1.4.1) by AlliedModders LLC
To see more, type "sm plugins 11"


Эм... ввести надо было в консоль сервера или через rcon (rcon_password ТвойРконПароль; rcon sm plugins list)
« Last Edit: January 13, 2012, 04:26:11 AM by Divix » Logged
PblLLAPb
Newbie
*
Posts: 38



View Profile Email
« Reply #156 on: January 13, 2012, 04:46:03 AM »

Вот
Code:
  01 "Admin File Reader" (1.4.1) by AlliedModders LLC
  02 "Admin Help" (1.4.1) by AlliedModders LLC
  03 "Admin Menu" (1.4.1) by AlliedModders LLC
  04 "Advanced c4 Countdown Timer" (1.4.1) by dalto
  05 "Anti-Flood" (1.4.1) by AlliedModders LLC
  06 "Basic Ban Commands" (1.4.1) by AlliedModders LLC
  07 "Basic Chat" (1.4.1) by AlliedModders LLC
  08 "Basic Comm Control" (1.4.1) by AlliedModders LLC
  09 "Basic Commands" (1.4.1) by AlliedModders LLC
  10 "Basic Info Triggers" (1.4.1) by AlliedModders LLC
  11 "Basic Votes" (1.4.1) by AlliedModders LLC
  12 "Client Preferences" (1.4.1) by AlliedModders LLC
  13 "Fun Commands" (1.4.1) by AlliedModders LLC
  14 "Fun Votes" (1.4.1) by AlliedModders LLC
  15 "MapChooser" (1.4.1) by AlliedModders LLC
  16 "Nextmap" (1.4.1) by AlliedModders LLC
  17 "Map Nominations" (1.4.1) by AlliedModders LLC
  18 "Player Commands" (1.4.1) by AlliedModders LLC
  19 "Quake Sounds" (1.8) by dalto
  20 "Reserved Slots" (1.4.1) by AlliedModders LLC
  21 "Resetscore" (1.1) by tuty
  22 "Rock The Vote" (1.4.1) by AlliedModders LLC
  23 "Round End Sound" (2.2b) by FrozDark
  24 "SourceMod Anti-Cheat" (0.7.5.5) by GoD-Tony, psychonic
  25 "SMAC Aimbot Detector" (0.7.5.1) by GoD-Tony
  26 "SMAC AutoTrigger Detector" (0.7.5.1) by GoD-Tony
  27 "SMAC Client Protection" (0.7.5.1) by GoD-Tony, psychonic, Kigen
  28 "SMAC Command Monitor" (0.7.5.1) by GoD-Tony, psychonic, Kigen
  29 "SMAC ConVar Checker" (0.7.5.1) by GoD-Tony, psychonic, Kigen
  30 "SMAC Eye Angle Test" (0.7.5.1) by GoD-Tony, psychonic
  31 "SMAC Rcon Locker" (0.7.5.1) by GoD-Tony, Kigen
  32 "SMAC Anti-Speedhack" (0.7.5.5) by GoD-Tony
  33 "SMAC Spinhack Detector" (0.7.5.1) by GoD-Tony
  34 "SMAC Anti-Wallhack" (0.7.5.5) by GoD-Tony, psychonic, Kigen
  35 "Sound Commands" (1.4.1) by AlliedModders LLC
  36 <Error> "TeamSwitch" (1.4) by MistaGee (Modify by Snake 60)
  37 "W3S Addon - Shop Items Drop" (1.9) by Frenzzy
  38 "W3S Engine Database Connect" (1.0) by Ownz (DarkEnergy)
  39 "Engine Hint Display" (1.0) by Ownz
  40 "Engine Log Error" (1.0) by Ownz
  41 "Engine Obj test" (1.0) by Ownz
  42 Disabled: "SH Hero Dracula" (1.0.0.0) by Ownz
  43 Disabled: "SH - Hero - Al Qaeda" (1.0.0.0) by Ownz,DarkEnergy
  44 Disabled: "SH hero flash" (1.0.0.0) by Ownz
  45 Disabled: "SH hero Human Torch" (1.0.0.0) by Ownz
  46 Disabled: "SH hero Captain America" (1.0.0.0) by GGHH3322
  47 Disabled: "SH hero Cyclops" (1.0.0.0) by Ownz
  48 Disabled: "SH hero Hulk" (1.0.0.0) by Ownz
  49 Disabled: "SH hero Sylar" (1.0.0.0) by GGHH3322
  50 Disabled: "SH hero invisible man" (1.0.0.0) by GGHH3322
  51 Disabled: "SH hero Sandman" (1.0.0.0) by GGHH3322
  52 Disabled: "SH Hero BatGirl" (1.0.0.0) by Ownz & Anthony
  53 Disabled: "SH Hero Naruto" (1.0.0.0) by GGHH3322
  54 Disabled: "SH Hero Mystique" (1.0.0.0) by GGHH3322
  55 Disabled: "SH Hero Nightcrawler" (1.0.0.0) by GGHH3322
  56 Disabled: "SH Engine Command Hooks" (1.0) by Ownz (DarkEnergy)
  57 Disabled: "SH Engine Database save xp" (1.0) by Ownz
  58 Disabled: "SH Engine Hero Class" (1.0) by Ownz
  59 Disabled: "SH chooserace" (1.0) by Ownz
  60 Disabled: "SH Menus" (1.0) by Ownz
  61 Disabled: "SH war3menu" (1.0) by Ownz (DarkEnergy)
  62 Disabled: "SH Engine player class" (1.0) by Ownz
  63 Disabled: "SH Engine XP Gold" (1.0) by Ownz
  64 "SuperHero Source" (0.2.2) by PimpinJuice and Ownz (DarkEnergy)
  65 "War3Source" (1.2.3.6) by PimpinJuice and Ownz (DarkEnergy)
  66 "Race - Undead Scourge" (1.0) by PimpinJuice, Necavi
  67 "Race - Human Alliance" (1.0) by PimpinJuice, necavi
  68 "Race - Orcish Horde" (1.0.0.0) by PimpinJuice
  69 "Race - Night Elf" (1.0.0.0) by PimpinJuice
  70 "Race - Blood Mage" (1.0.0.0) by PimpinJuice & Ownz (DarkEnergy)
  71 "Race - Shadow Hunter" (1.0.0.0) by PimpinJuice & Ownz (DarkEnergy)
  72 "Race - Warden" (1.0.0.0) by PimpinJuice & Ownz (DarkEnergy)
  73 "Race - Crypt Lord" (1.0.0.0) by PimpinJuice & Ownz (DarkEnergy)
  74 "Race - Corrupted Disciple" (1.0) by PimpJuice and Ownz (DarkEnergy)
  75 "Race - Soul Reaper" (1.0) by Ownz (DarkEnergy)
  76 "Race - Blood Hunter" (1.0) by Ownz (DarkEnergy)
  77 "Race - Lifestealer" (1.0) by Stinkyfax and Ownz (DarkEnergy)
  78 "Race - Succubus Hunter" (2.0.6) by DisturbeD
  79 "Race - Chronos" (1.0.0.0) by Ownz (DarkEnergy)
  80 "Race - Lich" (1.0.0.0) by [Oddity]TeacherCreature
  81 "Race - Sacred Warrior" (1.1) by Glider / modified by Ownz (DarkEnergy)
  82 "Race - Hammerstorm" (1.2) by Glider
  83 "Race - Scout" (1.0.0.0) by Ownz
  84 "Race - Dark Elf" (1.0.0.0) by Smilax & Glider helped a lot :D
  85 Disabled: "Race - Dragonborn" (2.0.0.0) by Smilax
  86 Disabled: "Race - Fluttershy" (0) by OwnageOwnz - RainbowDash
  87 "Race - Rarity" (1.0) by OWNAGE
  88 "Race - Rainbow Dash" (1.0) by OWNAGE
  89 "War3Source Race - Luna Moonfang" (1.0) by Jareth&DonRevan
  90 "War3Source Race - Drunken Beggar" (1.0) by M.A.C.A.B.R.A
  91 "War3Source Race - Witch Doctor" (1.9) by TeachCreature and Lucky
  92 "War3Source Race - Ghoul" (1.0.6.3) by Cereal Killer
  93 "War3Source Race - Rapscallion" (1.0.0) by VoidLess
  94 "W3S Addon - Ammo Control" (1.0) by Frenzzy
  95 "Team Bets(Gold)" (1.0) by GrimReaper - Original by ferret - heavily altered by Necavi
  96 "W3S - Addon - Display Particles on Level Up" (1.2) by Glider & xDr.HaaaaaaaXx
  97 "W3S - Addon - No Spy Suicide" (1.0) by ownz - DarkEnergy
  98 Disabled: "W3S - Addon - Additional Medic XP/Gold" (1.2) by Glider
  99 "W3S Addon - Use Your Damn Gold" (1.0) by Ownz
  100 "War3Source Race - Banshee" (1.0.6.3) by Cereal Killer and Lucky
  101 "War3Source Race - Pandaren Brewmaster" (alpha) by Lucky
  102 "War3Source Race - Aura Master" (1.0.0.0) by xDr.HaaaaaaaXx
  103 "War3Source Race - Mr Electric" (1.0.0.0) by xDr.HaaaaaaaXx
  104 "War3Source Race - Ninja" (1.0.0.0) by Cereal Killer + Ownz
  105 "War3Source Race - Panorama" (1.0.0.1) by xDr.HaaaaaaaXx -ZERO <ibis>
  106 "War3Source Race - Spider Man" (1.0.0.0) by xDr.HaaaaaaaXx
  107 "War3Source Race - Risen" (1.0.0.0) by xDr.HaaaaaaaXx
  108 "War3Source Race - Vagabond" (1.0.0.0) by xDr.HaaaaaaaXx
  109 "War3Source Race - Zeus" (1.0) by xDr.HaaaaaaaXx
  110 "War3Source Race - Sniper" (1.0.0.0) by xDr.HaaaaaaaXx
  111 "War3Source Admin Console" (1.0) by Ownz (DarkEnergy)
  112 "War3Source war3admin" (1.0) by Ownz (DarkEnergy)
  113 "W3S Engine Aura" (1.0) by Ownz (DarkEnergy)
  114 "W3S Engine Buff Tracker (Buff helper)" (1.0) by Ownz (DarkEnergy)
  115 "War3Source Buff MAXHP" (1.0) by Ownz (DarkEnergy)
  116 "War3Source Buff Speed" (1.0) by Ownz (DarkEnergy)
  117 "War3Source Buff System" (1.0) by Ownz (DarkEnergy)
  118 "W3S Engine Command Hooks" (1.0) by Ownz (DarkEnergy)
  119 "W3S Engine Cooldown Manager" (1.0) by Ownz (DarkEnergy)
  120 "W3S Engine Damage" (1.0) by Ownz (DarkEnergy)
  121 "W3S Engine Database save xp" (1.0) by Ownz (DarkEnergy)
  122 "W3S Engine Database top100" (1.0) by Ownz (DarkEnergy)
  123 "War3Source Events" (1.0) by Ownz (DarkEnergy)
  124 "War3Source help menu" (1.0) by Ownz (DarkEnergy)
  125 "W3S Engine Item Class" (1.0) by Ownz (DarkEnergy)
  126 "W3S Engine Item Class 2" (1.0) by Ownz (DarkEnergy)
  127 "W3S Engine Item2 Database" (1.0) by Ownz (DarkEnergy)
  128 "W3S Engine Item Ownership" (1.0) by Ownz (DarkEnergy)
  129 "W3S Engine Item2 Ownership" (1.0) by Ownz (DarkEnergy)
  130 Disabled: "W3S Engine Left4Dead" (1.0) by Glider
  131 "War3Source Menus changerace" (1.0) by Ownz (DarkEnergy)
  132 "War3Source Menus itemsinfo" (1.0) by Ownz (DarkEnergy)
  133 "War3Source Menus itemsinfo" (1.0) by Ownz (DarkEnergy)
  134 "War3Source Menus playerinfo raceinfo" (1.0) by Ownz (DarkEnergy)
  135 "War3Source Menus Shopmenus" (1.0) by Ownz (DarkEnergy)
  136 "War3Source Menus Shopmenus 2" (1.0) by Ownz (DarkEnergy)
  137 "War3Source Menu spendskills" (1.0) by Ownz (DarkEnergy)
  138 "War3Source war3menu" (1.0) by Ownz (DarkEnergy)
  139 "W3S Engine player class" (1.0) by Ownz (DarkEnergy)
  140 "W3S Engine Player Collisions" (1.0) by Ownz (DarkEnergy)
  141 "W3S Engine Death Weapons" (1.0) by Ownz (DarkEnergy)
  142 "W3S Engine LevelBank" (1.0) by Ownz (DarkEnergy)
  143 "W3S Engine Player Trace" (1.0) by Ownz (DarkEnergy)
  144 "W3S Engine Race Class" (1.0) by Ownz (DarkEnergy)
  145 "War3Source - Race Restrictions" (1.0) by Ownz (DarkEnergy)
  146 "W3S Engine HP Regen" (1.0) by Ownz (DarkEnergy)
  147 "W3S Engine Statistics" (1.0) by Ownz (DarkEnergy)
  148 "W3S Engine Stats sockets 2" (1.0) by Ownz (DarkEnergy)
  149 "W3S Engine System Check" (1.0) by Ownz (DarkEnergy)
  150 "W3S Engine Trie Key Value" (1.0) by Ownz (DarkEnergy)
  151 "W3S Engine Weapons" (1.0) by Ownz (DarkEnergy)
  152 "W3S Engine XP Gold" (1.0) by Ownz (DarkEnergy)
  153 "W3S Engine XP Gold CS" (1.0) by Ownz (DarkEnergy)
  154 Disabled: "W3S Engine XP Gold L4D" (1.0) by Glider
  155 Disabled: "W3S Engine XP Gold TF" (1.0) by Ownz (DarkEnergy)
  156 "War3 Engine ESCompatLayer" (1.0.0.0) by Anthony & Ownz
  157 "War3Source Extension Wrapper" (1.0) by Ownz
  158 "War3Source Race - Pistoleer" (1.0) by Invalid
  159 "W3S - Shopitems" (1.0.0.0) by PimpinJuice
  160 "W3S - Shopitems2" (1.0.0.0) by Ownz
  161 "War3Source Shopitem - AntiWard" (1.0) by [I]Loki
  162 "War3Source Shopitem - Bunny Hopping" (1.2) by Frenzzy
  163 "War3Source Shop - Helm" (1.0) by Ownz (DarkEnergy)
  164 "War3Source Shopitem - Long Jump" (1.3) by Frenzzy
  165 "War3Source Shop - Shield" (1.0) by Vulpone&Revan
  166 "War3Source SHSource switch" (1.0) by Ownz
  167 "War3Source Race - Tremble" (1.1.0) by Revan
  168 "War3Source Race - Unholy Entity" (1.0.0.0) by xDr.HaaaaaaaXx
  169 "War3Source - Ward Behavior Definitions" (1.0) by Invalid
  170 "WCX Bash" (0.1) by necavi
  171 "WCX - Crit/Damage Engine" (0.1) by necavi
  172 "WCX RPG Text Display" (0.1) by necavi
  173 "WCX - Dodge Engine" (0.1) by necavi, Anthony Iacono
  174 "WCX - Fake NPC" (0.5) by DonRevan
  175 "WCX Progressbar" (0.0.5) by gothroach
  176 "WCX - Skills Engine" (0.1) by necavi, Anthony Iacono
  177 "WCX - Vampire" (0.1) by necavi, Anthony Iacono
  178 "WCX - Wards" (0.1) by Invalid, necavi, PimpinJuice
  179 "War3Source Race - Headcrab" (1.0.0) by [Oddity]TeacerCreature
L
Logged
alex0310
Full Member
***
Posts: 170



View Profile
« Reply #157 on: January 13, 2012, 10:07:04 AM »

Парни, что за версия у вас?.. а то я было собрался с 1.2.3.3 переходить на более поздние и чувствую наверно рановато... надо ждать Final version)))
Logged
Divix
Sr. Member
****
Posts: 280


View Profile Email
« Reply #158 on: January 13, 2012, 03:21:30 PM »

Парни, что за версия у вас?.. а то я было собрался с 1.2.3.3 переходить на более поздние и чувствую наверно рановато... надо ждать Final version)))

Лучше вообще не когда не переходить на новую версию, а обновлять только нужные файлы.
Logged
PblLLAPb
Newbie
*
Posts: 38



View Profile Email
« Reply #159 on: January 14, 2012, 12:14:20 AM »

Что с расами делать Huh помогите
Logged
Divix
Sr. Member
****
Posts: 280


View Profile Email
« Reply #160 on: January 14, 2012, 01:53:25 AM »

Что с расами делать Huh помогите

Дело не в плагине (по крайне мере .smx). В логах что нибудь есть ?
Честно - так не скажешь, надо просто проверять все файлы. У меня была как то такая ошибка, но не помню из-за чего и как исправил...
Logged
Arturius
Moderator
Full Member
*****
Posts: 155



View Profile Email
« Reply #161 on: January 14, 2012, 02:32:29 PM »

Честно говоря, я тоже не помню как справился с подбором рестриктного оружия. Но иногда такое проскакивает, как глюки с хп. Если кому интересно, то все свои глупые вопросы про запреты оружия и прочее, связанное с оружием, я задавал в этой теме: [Russian] смена оружия (и всё что с ним связано)

У меня тоже есть задачка по расе Blood Mage. Игроки столкнулись с проблемой, когда умирают ослеплённые SKILL_BANISH, то экран остаётся тёмным до начала следующего раунда. У кого-то ещё возникали такие проблемы?
Logged
Divix
Sr. Member
****
Posts: 280


View Profile Email
« Reply #162 on: January 14, 2012, 04:11:18 PM »

У меня тоже есть задачка по расе Blood Mage. Игроки столкнулись с проблемой, когда умирают ослеплённые SKILL_BANISH, то экран остаётся тёмным до начала следующего раунда. У кого-то ещё возникали такие проблемы?

А добавить таймер Unbanish при смерти игрока не помогает ? Вообще, как говорил Ownz выше: "если проблема в основном коде, то лучше сказать ему".
Logged
PblLLAPb
Newbie
*
Posts: 38



View Profile Email
« Reply #163 on: January 14, 2012, 11:27:23 PM »

у меня у 3 -х рас проблема у рапскалиона не работает клинок у вагабонда и снайпера они могут любое оружие купить а насчёт краба может кто нибудь свой файл .smx скинет буду благодарен
Logged
Arturius
Moderator
Full Member
*****
Posts: 155



View Profile Email
« Reply #164 on: January 15, 2012, 02:15:25 AM »

А добавить таймер Unbanish при смерти игрока не помогает ?
Мне приходила в голову такая мысль, только без таймера, ибо он там уже не нужен. Но ты прав, лучше пусть сам автор расы внесёт исправления.

у меня у 3 -х рас проблема у рапскалиона не работает клинок у вагабонда и снайпера они могут любое оружие купить а насчёт краба может кто нибудь свой файл .smx скинет буду благодарен
Ещё вопрос. Вагабонд и Снайпер могут купить оружие, но оно у них выкидывается или нет?
Logged
Divix
Sr. Member
****
Posts: 280


View Profile Email
« Reply #165 on: January 15, 2012, 04:15:54 AM »

Рапскалиона как будет время посмотрю.

Arturius, просто в коде таймер есть уже.
Logged
Han
Full Member
***
Posts: 134



View Profile WWW
« Reply #166 on: January 16, 2012, 12:16:00 PM »

Нужны звуки на следующие расы:
1)roguewizard
2)spellbreaker
3)stealth

Есть расы у которых в исходнике написано:
War3_PrecacheSound(Sound1);
   War3_PrecacheSound(Sound2);
   War3_PrecacheSound(Sound3);
   War3_PrecacheSound(ww_on);
   War3_PrecacheSound(ww_off);
Такие звуки тоже есть и надо поставить?
Logged

Arturius
Moderator
Full Member
*****
Posts: 155



View Profile Email
« Reply #167 on: January 16, 2012, 01:16:25 PM »

на первые три расы ищи звуки здесь - http://193.110.122.196/csmaps/sound/war3source/

Если в исходнике написано War3_PrecacheSound(Sound1), то посмотри выше, чему равна переменная Sound1.
Logged
Han
Full Member
***
Posts: 134



View Profile WWW
« Reply #168 on: January 17, 2012, 07:25:24 AM »

Дал сылку, но не скачать от туда,он проигрывает.
Logged

Arturius
Moderator
Full Member
*****
Posts: 155



View Profile Email
« Reply #169 on: January 17, 2012, 08:55:45 AM »

ПКМ -> Сохранить ссылку как... или Сохранить объект как...
« Last Edit: January 17, 2012, 08:58:07 AM by Arturius » Logged
salavat
Jr. Member
**
Posts: 84



View Profile Email
« Reply #170 on: January 17, 2012, 11:09:39 AM »

помогите плиз с ошибкой




Code:
/**
* File: War3Source_Lurker.sp
* Description: The Lurker race for SourceCraft.
* Author(s): xDr.HaaaaaaaXx
*/

#pragma semicolon 1
#include <sourcemod>
#include <sdktools_tempents>
#include <sdktools_functions>
#include <sdktools_entinput>

#include "W3SIncs/War3Source_Interface"

// War3Source stuff
new thisRaceID, SKILL_INVIS, SKILL_SPEED, SKILL_SLOW, SKILL_DMG;

// Chance/Data Arrays
new Float:LurkerDamageMultiplier[5] = { 0.0, 1.6, 1.9, 2.1, 2.4 };
new Float:LurkerSlowSpeed[5] = { 1.0, 0.70, 0.65, 0.60, 0.55 };
new Float:LurkerSlowTime[5] = { 0.0, 2.0, 3.0, 4.0, 5.0 };
new Float:LurkerSpeed[5] = { 1.0, 1.2, 1.24, 1.28, 1.32 };
new Float:LurkerInvis[5] = { 1.0, 0.75, 0.5, 0.25, 0.01 };
new LurkerHealth[5] = { 100, 75, 50, 25, 1 };

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

public OnWar3PluginReady()
{
thisRaceID = War3_CreateNewRace( "Lurker", "lurker" );

SKILL_INVIS = War3_AddRaceSkill( thisRaceID, "Stealth", "Invisible but lose hp", false );
SKILL_SPEED = War3_AddRaceSkill( thisRaceID, "Training", "More speed", false );
SKILL_SLOW = War3_AddRaceSkill( thisRaceID, "Exact Shoting", "Slow enemys", false );
SKILL_DMG = War3_AddRaceSkill( thisRaceID, "Precision", "Extra damage", false );

War3_CreateRaceEnd( thisRaceID );
}

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

War3_SetBuff( client, fInvisibilitySkill, thisRaceID, LurkerInvis[War3_GetSkillLevel( client, thisRaceID, SKILL_INVIS )] );
War3_SetBuff( client, bDoNotInvisWeapon, thisRaceID, true );

SetEntityHealth( client, LurkerHealth[War3_GetSkillLevel( client, thisRaceID, SKILL_INVIS )] );
War3_SetMaxHP( client, LurkerHealth[War3_GetSkillLevel( client, thisRaceID, SKILL_INVIS )] );
}
}

public OnRaceChanged( client, newrace )
{
if( newrace != thisRaceID )
{
War3_WeaponRestrictTo( client, thisRaceID, "" );
W3ResetAllBuffRace( client, thisRaceID );
}
else
{
War3_WeaponRestrictTo( client, thisRaceID, "weapon_knife,weapon_usp" );
if( IsPlayerAlive( client ) )
{
GivePlayerItem( client, "weapon_usp" );
InitPassiveSkills( client );
}
}
}

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

public OnWar3EventSpawn( client )
{
new race = War3_GetRace( client );
if( race == thisRaceID )
{
GivePlayerItem( client, "weapon_usp" );
InitPassiveSkills( client );
}
War3_SetBuff( client, fSlow, thisRaceID, 1.0 );
}

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_level_dmg = War3_GetSkillLevel( attacker, thisRaceID, SKILL_DMG );
if( !Hexed( attacker, false ) && GetRandomFloat( 0.0, 1.0 ) <= 0.15 && skill_level_dmg > 0 )
{
new String:wpnstr[32];
GetClientWeapon( attacker, wpnstr, 32 );
if( StrEqual( wpnstr, "weapon_usp" ) )
{
if( !W3HasImmunity( victim, Immunity_Skills ) )
{
War3_DealDamage( victim, RoundToFloor( damage * LurkerDamageMultiplier[War3_GetSkillLevel( attacker, thisRaceID, SKILL_DMG )] / 2 ), attacker, DMG_BULLET, "lurker_crit" );
W3FlashScreen( victim, RGBA_COLOR_RED );

W3PrintSkillDmgHintConsole( victim, attacker, War3_GetWar3DamageDealt(),SKILL_DMG );
}
}
}

new skill_level_slow = War3_GetSkillLevel( attacker, thisRaceID, SKILL_SLOW );
if( !Hexed( attacker, false ) && GetRandomFloat( 0.0, 1.0 ) <= 0.30 && skill_level_slow > 0 )
{
new String:wpnstr[32];
GetClientWeapon( attacker, wpnstr, 32 );
if( StrEqual( wpnstr, "weapon_usp" ) )
{
if( !W3HasImmunity( victim, Immunity_Skills ) )
{
War3_SetBuff( victim, fSlow, thisRaceID, LurkerSlowSpeed[War3_GetSkillLevel( attacker, thisRaceID, SKILL_SLOW )] );

CreateTimer( LurkerSlowTime[War3_GetSkillLevel( attacker, thisRaceID, SKILL_SLOW )], ResetSlow, victim );

W3FlashScreen( victim, RGBA_COLOR_BLUE );
}
}
}
}
}
}

public Action:ResetSlow( Handle:timer, any:client )
{
if( ValidPlayer( client, true ) )
{
War3_SetBuff( client, fSlow, thisRaceID, 1.0 );
}
}
« Last Edit: January 17, 2012, 11:11:33 AM by salavat » Logged

alex0310
Full Member
***
Posts: 170



View Profile
« Reply #171 on: January 17, 2012, 11:26:43 AM »

помогите плиз с ошибкой




Читай форум внимательней об этой ошибке все уже много, много раз писали...
Читать здесь
Logged
Calipso091
Newbie
*
Posts: 19



View Profile WWW Email
« Reply #172 on: January 17, 2012, 02:47:09 PM »

Доброго времени Суток,подмогите немножко...на что надо заменить ошибку
Logged

Schmarotzer
Full Member
***
Posts: 189


Ich schmarotze dich!

258631507
View Profile WWW
« Reply #173 on: January 17, 2012, 10:02:44 PM »

Доброго времени Суток,подмогите немножко...на что надо заменить ошибку
Добавь это в конец расы
Code:
stock War3_GetRandomPlayer( const String:type[] = "#a", bool:check_alive = false, bool:check_immunity = false )
{
new targettable[MaxClients];
new target = 0;
new bool:all;
new x = 0;
new team;
if( StrEqual( type, "#t" ) )
{
team = TEAM_T;
all = false;
}
else if( StrEqual( type, "#ct" ) )
{
team = TEAM_CT;
all = false;
}
else if( StrEqual( type, "#a" ) )
{
team = 0;
all = true;
}
for( new i = 1; i <= MaxClients; i++ )
{
if( i > 0 && i <= MaxClients && IsClientConnected( i ) && IsClientInGame( i ) )
{
if( check_alive && !IsPlayerAlive( i ) )
continue;
if( check_immunity && W3HasImmunity( i, Immunity_Ultimates ) )
continue;
if( !all && GetClientTeam( i ) != team )
continue;
targettable[x] = i;
x++;
}
}
for( new y = 0; y <= x; y++ )
{
if( target == 0 )
{
target = targettable[GetRandomInt( 0, x - 1 )];
}
else if( target != 0 && target > 0 )
{
return target;
}
}
return 0;
}
Или проверь наличие этого в haaaxfunctions.inc
Logged

Welcome to my server
Calipso091
Newbie
*
Posts: 19



View Profile WWW Email
« Reply #174 on: January 18, 2012, 01:51:02 AM »

Доброго времени Суток,подмогите немножко...на что надо заменить ошибку
Добавь это в конец расы
Code:
stock War3_GetRandomPlayer( const String:type[] = "#a", bool:check_alive = false, bool:check_immunity = false )
{
new targettable[MaxClients];
new target = 0;
new bool:all;
new x = 0;
new team;
if( StrEqual( type, "#t" ) )
{
team = TEAM_T;
all = false;
}
else if( StrEqual( type, "#ct" ) )
{
team = TEAM_CT;
all = false;
}
else if( StrEqual( type, "#a" ) )
{
team = 0;
all = true;
}
for( new i = 1; i <= MaxClients; i++ )
{
if( i > 0 && i <= MaxClients && IsClientConnected( i ) && IsClientInGame( i ) )
{
if( check_alive && !IsPlayerAlive( i ) )
continue;
if( check_immunity && W3HasImmunity( i, Immunity_Ultimates ) )
continue;
if( !all && GetClientTeam( i ) != team )
continue;
targettable[x] = i;
x++;
}
}
for( new y = 0; y <= x; y++ )
{
if( target == 0 )
{
target = targettable[GetRandomInt( 0, x - 1 )];
}
else if( target != 0 && target > 0 )
{
return target;
}
}
return 0;
}
Или проверь наличие этого в haaaxfunctions.inc
Все пошло норм =)) Спасибо
Logged

Pages: 1 ... 5 6 [7] 8 9 ... 22
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!