SA-MP Forums Archive
[FilterScript] Simple Sync Filterscript - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Simple Sync Filterscript (/showthread.php?tid=405700)



Simple Sync Filterscript - Ped_Dep1 - 07.01.2013

Hello. I've made a simple /sync filterscript.
What does it do?

It's good if you're bugged, type /sync and you'll be unbugged.
It's good if you're being car rammed, type /sync and you won't be.
You can't stop any animation? Use /sync. It will clear your animations.
You stuck? Use /sync.


Warning: If the player is frozen (admin freeze) he can evade his punishment.

Install: Just move sync.pwn and sync.amx to your filterscripts folder.
Then write sync in your server.cfg document - here



Free download:
solidfiles
link_2

pastebin


Re: Simple Sync Filterscript - Konstantinos - 07.01.2013

A source code link would be nice, if you could also upload it to pastebin, I'd appreciate it.


Re: Simple Sync Filterscript - x96664 - 07.01.2013

Pastebin please!


Re: Simple Sync Filterscript - Ped_Dep1 - 08.01.2013

link updated!


Re: Simple Sync Filterscript - Konstantinos - 11.01.2013

Thanks! I had a look at the code and I saw this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/sync", cmdtext, true, 10) == 0)
    {
        new Float:X;
        new Float:Y;
        new Float:Z;
        TogglePlayerControllable(playerid,1);
        GetPlayerPos(playerid,X,Y,Z);
        SetPlayerPos(playerid,X,Y,Z+2);
        ClearAnimations(playerid);
        PlayerPlaySound(playerid, 1137, X, Y, Z);
        SendClientMessage(playerid,0x00FFFFFF,"You are synced.");
        return 1;
    }
    return 0;
}
I'm not able to test it to a local host because I will never be desynced, but it happens when I lag in servers with a lot of people. So, it basically unfreeze a player, set his position 2 meters higher and clear the animations will make the player be synced again? If it does, nice.

Note; the lenght of the command "/sync" is 5, not 10.