[Q] Incognito's streamer: Add/Remove Player + Update(Ex)
#1

Hello.
I am trying to make a synch/desynch command for my assassin's creed SAMP server. The desynching is working, but the synch doesn't. Does anyone knows how this works?
So the problem is: I'm not able to update a player anymore: After using "Streamer_RemovePlayer" the streaming for that player is permanently (untill relog/restart) stopped. Even after using "Streamer_AddPlayer" and the "Update" and "UpdateEx" the player doesn't get an update for the streaming :S
Here's the script:
pawn Код:
CMD:togsynch(playerid, params[])
{
    new id;
    if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GRAY, "* You're not authorized to use this command.");
    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /togsynch [playerid]");
    id = strval(params);
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "* That player isn't connected to the server!");
    if(PlayerInfo[id][pSynched])
    {
        PlayerInfo[id][pSynched] = false;
        Streamer_RemovePlayer(id);
        SendClientMessage(id, COLOR_RED, "[ANIMUS ERROR] You have been desynched!");
        SendAdmMsg(true, COLOR_YELLOW, false, 666, "* %s(%d) has desynched %s(%d)!", PlayerName[playerid], playerid, PlayerName[id], id);
    }
    else
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(id, X, Y, Z);
        PlayerInfo[id][pSynched] = true;
        Streamer_AddPlayer(id);
        Streamer_UpdateEx(id, X, Y, Z);
        Streamer_Update(id);
        SendClientMessage(id, COLOR_GREEN, "[ANIMUS MESSAGE] You have been synched!");
        SendAdmMsg(true, COLOR_YELLOW, false, 666, "* %s(%d) has synched %s(%d)!", PlayerName[playerid], playerid, PlayerName[id], id);
    }
    return 1;
}
If you can help me: Thanks. Otherwise, if you tried to help me but if it didn't work, still thanks :P

- Kevin
Reply
#2

Yet not fixed, this post is at page 4/5 atm, so I am bumping it if you don't mind :P. I'd rather use this because for the gamemode: If you fail to do a mission I want the desynch function (It's currently in the function for debug testing).

- Kevin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)