ZCMD ?
#6

Ok, I forgot a return 1;
pawn Код:
CMD:revive(playerid, params[])
{
    if(PlayerCuffed[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "You can not do this while cuffed."); return 1; }
    if(Died[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "Cannot use this command while dead."); return 1; }
    if(MedicOnDuty[playerid] == 1 || PlayerInfo[playerid][pAdministrator] >= 1)
    {
        if(!strlen(params))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /revive [playerid/partofname]");
            return 1;
        }
        giveplayerid = ReturnUser(params);
        if(IsPlayerConnected(giveplayerid))
        {
            if(giveplayerid != INVALID_PLAYER_ID)
            {
                if(giveplayerid == playerid)
                {
                    SendClientMessage(playerid, COLOR_GREY, "You can not revive yourself");
                    return 1;
                }
                if(Died[giveplayerid] == 0)
                {
                    SendClientMessage(playerid, COLOR_GREY, "  This player is not Died");
                    return 1;
                }
                if(MedicOnDuty[playerid] == 0)
                {
                    SendClientMessage(playerid, COLOR_GREY, "  You are not a medic on-duty");
                    return 1;
                }
                if (ProxDetectorS(2.5, playerid, giveplayerid))
                {
                    Died[giveplayerid] = 0;
                    TogglePlayerControllable(giveplayerid, 1);
                    ApplyAnimation(giveplayerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
                    TogglePlayerControllable(giveplayerid, 1);
                    PlayerInfo[giveplayerid][pDeath] = 0;
                    SendClientMessage(playerid, COLOR_GRAD2, "  You need to be closer to the player.");
                    if(PlayerInfo[playerid][pSex] == 1)
                    {
                        PlayerPlayerActionMessage(playerid,giveplayerid,20.0,"uses his defibrillator on");
                    }
                    else
                    {
                        PlayerPlayerActionMessage(playerid,giveplayerid,20.0,"uses her defibrillator on");
                    }
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_LIGHTRED, "Playerid is not an active playerid");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command.");
            }
            return 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread
ZCMD ? - by N0FeaR - 08.06.2012, 23:49
Re: ZCMD ? - by SnG.Scot_MisCuDI - 08.06.2012, 23:52
Re: ZCMD ? - by Dubya - 08.06.2012, 23:55
Re: ZCMD ? - by N0FeaR - 08.06.2012, 23:56
Re: ZCMD ? - by N0FeaR - 09.06.2012, 00:02
Re: ZCMD ? - by Dubya - 09.06.2012, 00:05

Forum Jump:


Users browsing this thread: 1 Guest(s)