SA-MP Forums Archive
Clear animations - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Clear animations (/showthread.php?tid=327545)



Clear animations - Dripac - 21.03.2012

ClearAnimations(playerid);

Why doesn't this cleae the new Handcuff Animation from 0.3e?


Re: Clear animations - T0pAz - 21.03.2012

Because it's a special action, not an animation. Use this instead.
pawn Код:
SetPlayerSpecialAction(playerid, 0);



Re: Clear animations - Dripac - 21.03.2012

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
Because it's a special action, not an animation. Use this instead.
pawn Код:
SetPlayerSpecialAction(playerid, 0);
Thank you ^^

but one more problem

pawn Код:
if(strcmp(cmd, "/afk", true) == 0)
    {
        new str[64], plname[MAX_PLAYER_NAME];
        new reason[64], strtext[64];
        if(IsPlayerAFK[playerid] == 1) return SendClientMessage(playerid, COLOR_CRVENA, "Du bist bereits in den AFK-Modus");
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: /afk [grund]");
            return 1;
        }
        else
        {
            IsPlayerAFK[playerid] = 1;
            TogglePlayerControllable(playerid, false);
            GetPlayerName(playerid, plname, MAX_PLAYER_NAME);
            format(str, sizeof(str), "%s ist in den AFK-Modus gegangen", plname);
            SendClientMessageToAll(COLOR_ZELENA, str);
            format(strtext, sizeof(strtext), ""ZUTA"AFK\nGrund: %s", reason);
            AFK_Label[playerid] = Create3DTextLabel(strtext,COLOR_WHITE,30.0,40.0,50.0,40.0,0);
            Attach3DTextLabelToPlayer(AFK_Label[playerid], playerid, 0.0, 0.0, 0.3);
            SendClientMessage(playerid, COLOR_PLAVA, "Du bist nun in den AFK-Modus, verwende /back wenn du wieder spielen kannst.");
            return 1;
        }
    }
It doesn't show the reason in 3D text, only AFK, Grund:


Re: Clear animations - Baboon - 21.03.2012

Quote:
Originally Posted by Dripac
Посмотреть сообщение
Thank you ^^

but one more problem

pawn Код:
if(strcmp(cmd, "/afk", true) == 0)
    {
        new str[64], plname[MAX_PLAYER_NAME];
        new reason[64], strtext[64];
        if(IsPlayerAFK[playerid] == 1) return SendClientMessage(playerid, COLOR_CRVENA, "Du bist bereits in den AFK-Modus");
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: /afk [grund]");
            return 1;
        }
        else
        {
            IsPlayerAFK[playerid] = 1;
            TogglePlayerControllable(playerid, false);
            GetPlayerName(playerid, plname, MAX_PLAYER_NAME);
            format(str, sizeof(str), "%s ist in den AFK-Modus gegangen", plname);
            SendClientMessageToAll(COLOR_ZELENA, str);
            format(strtext, sizeof(strtext), ""ZUTA"AFK\nGrund: %s", reason);
            AFK_Label[playerid] = Create3DTextLabel(strtext,COLOR_WHITE,30.0,40.0,50.0,40.0,0);
            Attach3DTextLabelToPlayer(AFK_Label[playerid], playerid, 0.0, 0.0, 0.3);
            SendClientMessage(playerid, COLOR_PLAVA, "Du bist nun in den AFK-Modus, verwende /back wenn du wieder spielen kannst.");
            return 1;
        }
    }
It doesn't show the reason in 3D text, only AFK, Grund:
There is no format for the string reason...


Re: Clear animations - T0pAz - 21.03.2012

pawn Код:
if(strcmp(cmd, "/afk", true) == 0)
    {
        new str[64], plname[MAX_PLAYER_NAME];
        new reason[64], strtext[64];
        if(IsPlayerAFK[playerid] == 1) return SendClientMessage(playerid, COLOR_CRVENA, "Du bist bereits in den AFK-Modus");
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: /afk [grund]");
            return 1;
        }
        else
        {
            format(reason, 64, "%s", tmp);
            IsPlayerAFK[playerid] = 1;
            TogglePlayerControllable(playerid, false);
            GetPlayerName(playerid, plname, MAX_PLAYER_NAME);
            format(str, sizeof(str), "%s ist in den AFK-Modus gegangen", plname);
            SendClientMessageToAll(COLOR_ZELENA, str);
            format(strtext, sizeof(strtext), ""ZUTA"AFK\nGrund: %s", reason);
            AFK_Label[playerid] = Create3DTextLabel(strtext,COLOR_WHITE,30.0,40.0,50.0,40.0,0);
            Attach3DTextLabelToPlayer(AFK_Label[playerid], playerid, 0.0, 0.0, 0.3);
            SendClientMessage(playerid, COLOR_PLAVA, "Du bist nun in den AFK-Modus, verwende /back wenn du wieder spielen kannst.");
            return 1;
        }
    }



Re: Clear animations - Dripac - 21.03.2012

Thank you, +rep


Re: Clear animations - T0pAz - 21.03.2012

Quote:
Originally Posted by Dripac
Посмотреть сообщение
Thank you, +rep
How many times will you rep me


Re: Clear animations - Dripac - 21.03.2012

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
How many times will you rep me
You help a lot, you deserve it