SA-MP Forums Archive
Dead - 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: Dead (/showthread.php?tid=514057)



Dead - Ananisiki - 19.05.2014

Hi
I have wave command but when i try wave to a bot, it says i wave to its corpse but he is not dead?
How i can do so he alive
I try place Dead[playerid] = 0; in onplayerconnect but it no work, and yes i have register system, can it be cuz this


Re: Dead - Rittik - 19.05.2014

Full code please.


Re: Dead - Ananisiki - 19.05.2014

pawn Код:
CMD:wave(playerid, params[])
{
        if(pID == playerid) return SendClientMessage(playerid, COLOR_RED, "You Cannot Wave At Yourself.");
        new Float:x, Float:y, Float:z;
        GetPlayerPos(pID, x ,y, z);
        if(IsPlayerInRangeOfPoint(playerid, 18.0, x, y, z))
        {
            if(IsPlayerCop(pID) && GetPVarInt(pID, "Dead") == 0) format(string, sizeof string, "* %s (%d) Waves At Officer %s (%d).", PlayerName(playerid), playerid, PlayerName(pID), pID);
            else if(IsPlayerCop(pID) && GetPVarInt(pID, "Dead") == 1) format(string, sizeof string, "* %s (%d) Waves At Officer %s (%d)'s Corpse.", PlayerName(playerid), playerid, PlayerName(pID), pID);
            else if(!IsPlayerCop(pID) && GetPVarInt(pID, "Dead") == 0) format(string, sizeof string, "* %s (%d) Waves At %s (%d).", PlayerName(playerid), playerid, PlayerName(pID), pID);
            else if(!IsPlayerCop(pID) && GetPVarInt(pID, "Dead") == 1) format(string, sizeof string, "* %s (%d) Waves At %s (%d)'s Corpse.", PlayerName(playerid), playerid, PlayerName(pID), pID);
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                new Float:sendX, Float:sendY, Float:sendZ;
                GetPlayerPos(i, sendX, sendY, sendZ);
                if(IsPlayerInRangeOfPoint(playerid, 80.0, sendX, sendY, sendZ)) SendClientMessage(i, GetPlayerCnRColor(playerid), string);
            }
            ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.2, 0, 0, 0, 0, 0, 0);
            WaveEnabled[playerid] = 0;
            SetTimerEx("WaveEnable", 5000, false, "i", playerid);
        }
        return 1;
}



Re: Dead - Madd92 - 19.05.2014

You could just use IsPlayerNPC(playerid) to solve this problem.


Re: Dead - Ananisiki - 21.05.2014

Tryed this. not helping