[CMD]Sleeping +HP
#1

Код:
    if(strcmp(cmd, "/sleep", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pLevel] >= 2)
            {
                new TickCount[MAX_PLAYERS];
                if(GetTickCount() - TickCount[playerid] < 20000)
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "Please  wait 20 seconds. To relax again.");
                    return 1;
                }
                TickCount[playerid] = GetTickCount();
                GetPlayerName(playerid, sendername, sizeof(sendername));
                   format(string, sizeof(string),"* %s The bed rest", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                SetPlayerHealth(playerid, 100);
                ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,1,1,1,0);
                format(string, sizeof(string),"* %s The bed rest.", sendername);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, " You must have a Level 2.!");
            }
        }
        return 1;
    }
Reply
#2

So? What's the problem.
Reply
#3

If you want to show someone how to do it, post it at Scripting tutorials, not here.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)