Sync a player with command?
#1

Hi guys, I want to know how to do a Sync command pls help me.
Thanks
Reply
#2

I'm not sure what you're requesting exactly, but clearing all the animations and unfreezing (freezing him before) a player might sync the player back! Atleast, this is what I do when I'm desynced.
Reply
#3

Clear all anims and toggleplayercontrollable on and off.
Reply
#4

I did this but not working...

Код:
		ClearAnimations(playerid);
		TogglePlayerControllable(playerid,0);
		TogglePlayerControllable(playerid,1);
Reply
#5

First of all, explain us how you do define the word "sync". You cannot use the above functions and solve SA:MP's sync problem. Players cannot be synced as you want and nobody can do anything about it. If you mean about desynced players that they don't see others players being updated, then what I told you on my first post is what you need!
Reply
#6

Top:
Код:
new PublicSync, Float:PublicArray[3];
Make command:
Код:
CMD:sync(playerid)
{
GetPlayerPos(playerid, PublicArray[0], PublicArray[1], PublicArray[2]);
PublicSync[playerid] = 1;
SpawnPlayer(playerid);
}
In OnPlayerSpawn(playerid):
Код:
if(PublicSync[playerid])
{
PublicSync[playerid] = 0;
SetPlayerPos(playerid, PublicArray[0], PublicArray[1], PublicArray[2]);
}
Something like this. You can add Weapon recovery and other stuff like skin etc.
Reply
#7

I mean when the player can't run fast anymore he should type an command, and he can run fast again.
Reply
#8

It's all about stamina? Heh, users above and I understood something completely different.
I've read somewhere that setting player's coordinates, it will refill the stamina.
Reply
#9

I got this Errors

Код:
(17875) : error 028: invalid subscript (not an array or too many subscripts): "PublicSync"
(17875) : warning 215: expression has no effect
(17875) : error 001: expected token: ";", but found "]"
(17875) : error 029: invalid expression, assumed zero
(17875) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
On this Line:

Код:
if(PublicSync[playerid])
Reply
#10

There's a difference, a huge difference, between stamina and being synced, I've practically no idea how you can do this, so sorry.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)