SA-MP Forums Archive
[CMD]Sleeping +HP - 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: [CMD]Sleeping +HP (/showthread.php?tid=297521)



[CMD]Sleeping +HP - nooion345 - 16.11.2011

Код:
    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;
    }



Re: [CMD]Sleeping +HP - Kingunit - 16.11.2011

So? What's the problem.


Re: [CMD]Sleeping +HP - KosmasRego - 16.11.2011

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