←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

Śmieszny błąd tag mismatch

Zablokowany

Skull3D - zdjęcie Skull3D 15.08.2011

No więc w czym tu problem?

public forward_touch(toucher, touched, entity,id)
{
if(!is_user_alive(toucher) || !is_user_alive(touched))
return;

if(!get_pcvar_num(amx_headsplash))
return;

if(falling_speed[touched])
return;

if(get_user_team(toucher) == get_user_team(touched) && !get_cvar_num("mp_friendlyfire"))
return;

new touched_origin[3], toucher_origin[3];
get_user_origin(touched, touched_origin);
get_user_origin(toucher, toucher_origin);

new Float:toucher_minsize[3], Float:touched_minsize[3];
pev(toucher,pev_mins,toucher_minsize);
pev(touched,pev_mins,touched_minsize);

new toucher_movetype = pev(toucher, pev_movetype);
new touched_movetype = pev(touched, pev_movetype);

if(touched_minsize[2] != -18.0)
{
if(!(toucher_origin[2] == touched_origin[2]+72 && toucher_minsize[2] != -18.0) && !(toucher_origin[2] == touched_origin[2]+54 && toucher_minsize[2] == -18.0))
{
return;
}
}
else
{
if(!(toucher_origin[2] == touched_origin[2]+68 && toucher_minsize[2] != -18.0) && !(toucher_origin[2] == touched_origin[2]+50 && toucher_minsize[2] == -18.0))
{
return;
}
}

if(toucher_movetype == MOVETYPE_FLY || touched_movetype == MOVETYPE_FLY)
return;

if(falling_speed[toucher] >= MINIMUM_FALL_SPEED)
{
new Float:damage = ((falling_speed[toucher] - MINIMUM_FALL_SPEED + 30) * (falling_speed[toucher] - MINIMUM_FALL_SPEED + 30)) / 1300;
if(damage > MAXIMUM_DAMAGE_FROM_JUMP)
damage = MAXIMUM_DAMAGE_FROM_JUMP;
damage_player(touched, toucher, damage);
damage_after[toucher][touched] = 0.0;
}

if(is_user_alive(touched) && damage_after[toucher][touched] <= get_gametime())
{
damage_after[toucher][touched] = get_gametime() + DELAY;
damage_player(touched, toucher, DAMAGE);
}
}


Linia 240:
damage_after[toucher][touched] = 0.0; 

Linia 245:
damage_after[toucher][touched] = get_gametime() + DELAY;
Odpowiedz

  • +
  • -
Goliath - zdjęcie Goliath 15.08.2011

Tablica damage_after powinna mieć zmienne typu float, a nie int. Jej deklaracja powinna wyglądać tak:
new Float:damage_after[X][Y];
Odpowiedz

Skull3D - zdjęcie Skull3D 15.08.2011

A nie może być tak?

new Float:
falling_speed[33],
damage_after[33][33];


@Czekam tylko na odpowiedź Goliath'a
Użytkownik Skull3D edytował ten post 15.08.2011 11:06
Odpowiedz

  • +
  • -
Goliath - zdjęcie Goliath 15.08.2011

Nie.
new Float:falling_speed[33],
Float:damage_after[33][33];
Odpowiedz

Skull3D - zdjęcie Skull3D 15.08.2011

Aha, dzięki okazałem +
Do zamknięcia.
Odpowiedz

Adminek AMXX.PL - zdjęcie Adminek AMXX.PL 15.08.2011

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: Do zamknięcia.

Jeśli się z tym nie zgadzasz, Dołączona grafika raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.


Z pozdrowieniami,
Zespół AMXX.PL
Odpowiedz
Zablokowany