Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnDynamicActorStreamOut doesn't get called in open.mp #469

Open
ReshiramZekrom1 opened this issue Oct 10, 2023 · 1 comment
Open

OnDynamicActorStreamOut doesn't get called in open.mp #469

ReshiramZekrom1 opened this issue Oct 10, 2023 · 1 comment

Comments

@ReshiramZekrom1
Copy link

As title, OnDynamicActorStreamOut doesn't work in open.mp. Tried with 2.9.4 and 2.9.6 versions but with same result. On the contrary, OnDynamicActorStreamIn works fine.


#include <streamer>

#include <izcmd>

main () {}

new dynamicactor;
new actor;

public OnGameModeInit() {

    dynamicactor = CreateDynamicActor(230, 466.1979,-1705.4946,11.0269, 0.0, 1, 100.0, 0, -1, -1, 10);

    actor = CreateActor(230, 466.1979,-1702.4946,11.0269, 0.0);

    CreateVehicle(411, 466.1979,-1698.4946,11.0269, 0.0, -1, -1, 5);

    return 1;
}

COMMAND:teleport(playerid, params[]) {

    SetPlayerPos(playerid, 466.1979,-1703.4946,13.0269);
    return 1;
}

public OnActorStreamIn(actorid, forplayerid) {

    new string[144];
    format(string, sizeof string, "Actor streamed IN: %d || actorvar %d", actorid, actor);
    SendClientMessage(forplayerid, -1, string);

    printf("Actor streamed IN: %d || actorvar %d", actorid, actor);

    return 1;
}

public OnActorStreamOut(actorid, forplayerid) {

    new string[144];
    format(string, sizeof string, "Actor streamed OUT: %d", actorid);
    SendClientMessage(forplayerid, -1, string);

    printf("Actor streamed OUT: %d", actorid);

    return 1;
}

public OnDynamicActorStreamIn(actorid, forplayerid) {

    new string[144];
    format(string, sizeof string, "DYN-Actor streamed IN: %d || dynamicactorvar %d", actorid, dynamicactor);
    SendClientMessage(forplayerid, -1, string);

    printf("DYN-Actor streamed IN: %d || dynamicactorvar %d", actorid, dynamicactor);

    return 1;
}

public OnDynamicActorStreamOut(actorid, forplayerid) {

    new string[144];
    format(string, sizeof string, "DYN-Actor streamed OUT: %d", actorid);
    SendClientMessage(forplayerid, -1, string);

    printf("DYN-Actor streamed OUT: %d", actorid, actorid);

    return 1;
}
@ReshiramZekrom1
Copy link
Author

ReshiramZekrom1 commented Oct 11, 2023

I've noticed that the callback gets called (sometimes) when you teleport in a enough distant position (with SetPlayerPos) but it doesn't if you leave the area either by foot or vehicle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant