mam problem z pewną funkcją na moim Cod Mod.
Logi:
[AMXX] Run time error 10: native error (native "get_user_origin") [AMXX] [0] cod_324178.sma::radar_scan (line 3554)
Public:
public radar_scan()
{
new PlayerCoords[3];
new id;
new Players[32];
new i;
new playerCount = 0;
for (id=1; id<=g_maxplayers; id++)
{
if(!is_user_alive(id) || !radar[id]) continue;
if(get_players(Players, playerCount, "a") &&is_user_alive(id))
{
playerCount++;
}
for (i=1;i<=playerCount;i++)
{
get_user_origin(i, PlayerCoords)
message_begin(MSG_ONE_UNRELIABLE, g_msgHostageAdd, {0,0,0}, id)
write_byte(id)
write_byte(i)
write_coord(PlayerCoords[0])
write_coord(PlayerCoords[1])
write_coord(PlayerCoords[2])
message_end()
message_begin(MSG_ONE_UNRELIABLE, g_msgHostageDel, {0,0,0}, id)
write_byte(i)
message_end()
}
emit_sound(id, CHAN_ITEM, "codek/radar.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
}
}
Dostałem informację że mam przebudować pętlę for (for (i=1;i<=playerCount;i++) ).
Z góry dzięki za pomoc.