SA-MP Forums Archive
Admin Command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Admin Command (/showthread.php?tid=518506)



Admin Command - Seaf - 10.06.2014

I Need Comman for revive people like one on my server died by hack i wann revive him by useing /revive ?


Re: Admin Command - benjaminjones - 10.06.2014

pawn Код:
CMD:revive(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        new string[128], giveplayerid;
        if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /revive [playerid]");

        if(IsPlayerConnected(giveplayerid))
        {
            if(GetPVarInt(giveplayerid, "Injured") == 1)
            {
                format(string, sizeof(string), " You have revived %s.", GetPlayerNameEx(giveplayerid));
                SendClientMessageEx(playerid, COLOR_WHITE, string);
                SendClientMessageEx(giveplayerid, COLOR_WHITE, "You have been revived by an Admin.");

                KillEMSQueue(giveplayerid);
                ClearAnimations(giveplayerid);
                SetPlayerHealth(giveplayerid, 100);
            }
            else
            {
                SendClientMessageEx(playerid, COLOR_GRAD2, "That player is not injured!");
            }
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
    }
    return 1;
}



Re: Admin Command - Seaf - 10.06.2014

Quote:
Originally Posted by benjaminjones
Посмотреть сообщение
pawn Код:
CMD:revive(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        new string[128], giveplayerid;
        if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /revive [playerid]");

        if(IsPlayerConnected(giveplayerid))
        {
            if(GetPVarInt(giveplayerid, "Injured") == 1)
            {
                format(string, sizeof(string), " You have revived %s.", GetPlayerNameEx(giveplayerid));
                SendClientMessageEx(playerid, COLOR_WHITE, string);
                SendClientMessageEx(giveplayerid, COLOR_WHITE, "You have been revived by an Admin.");

                KillEMSQueue(giveplayerid);
                ClearAnimations(giveplayerid);
                SetPlayerHealth(giveplayerid, 100);
            }
            else
            {
                SendClientMessageEx(playerid, COLOR_GRAD2, "That player is not injured!");
            }
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
    }
    return 1;
}
Thanks So Much +Rep


Re: Admin Command - Seaf - 10.06.2014

C:\Users\Evil-Pro\Downloads\samp03z_svr_R1_win32\filterscripts\R evive.pwn(32) : warning 203: symbol is never used: "revive"
C:\Users\Evil-Pro\Downloads\samp03z_svr_R1_win32\filterscripts\R evive.pwn(32) : error 013: no entry point (no public functions) ((why))


Re: Admin Command - Sledgehammer - 10.06.2014

What is line 32?