Clear animations
#1

ClearAnimations(playerid);

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

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

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:
Reply
#4

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...
Reply
#5

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;
        }
    }
Reply
#6

Thank you, +rep
Reply
#7

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)