12.11.2011, 16:34
(
Последний раз редактировалось Kwarde; 13.11.2011 в 13:01.
)
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:
If you can help me: Thanks. Otherwise, if you tried to help me but if it didn't work, still thanks :P
- Kevin
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;
}
- Kevin