←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

CS:GO
[War3Mod] Problem z klasą, niedziałający s...

  • +
  • -
skorpius - zdjęcie skorpius 25.03.2016

Edytowałem klase tak aby wybuchała po śmierci (działa mi to) oraz by mogła aktywować tego skilla użyciem "IN_ATTACK2" (nie działa mi)

 

Oto kodzik:

 

public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float[3] vel, float[3] angles, int &weapon) {
if (buttons & IN_ATTACK2) {
if (!buttonState[client]) {
buttonState[client] = true;
OnWar3EventDeath(client, weapon, true);
}
} else {
if (buttonState[client]) {
buttonState[client] = false;
OnWar3EventDeath(client, weapon, false);
}
}

return Plugin_Continue;
}
public OnUltimateCommand(client, race, bool:pressed)
{
if(RaceDisabled)
{
return;
}

if(pressed && War3_GetRace(client) == thisRaceID && IsPlayerAlive(client) && !Silenced(client))
{
new ult_level = War3_GetSkillLevel(client, race, SKILL_SUICIDE);
ult_level > 0 ? ForcePlayerSuicide(client) : W3MsgUltNotLeveled(client);
}
}

public OnWar3EventDeath(victim, attacker)
{
if(RaceDisabled)
{
return;
}

new skill = War3_GetSkillLevel(victim, thisRaceID, SKILL_SUICIDE);
if(skill > 0 && !Hexed(victim))
{
decl Float:fVictimPos[3];
GetClientAbsOrigin(victim, fVictimPos);

War3_SuicideBomber(victim, fVictimPos, GameTF() ? SuicideBomberDamageTF[skill] : SuicideBomberDamage[skill], SKILL_SUICIDE, SuicideBomberRadius[skill]);
}
}

 

Kod powstał dzięki

plx211

Wiec powinien być działający.

Myślę że coś źle połączyłem proszę o pomoc.

 

oto link do tematu:

 

http://amxx.pl/topic...ciskiem-myszki/


Użytkownik skorpius edytował ten post 25.03.2016 19:46
Odpowiedz