#1

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
Reply
#2

Full code please.
Reply
#3

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;
}
Reply
#4

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

Tryed this. not helping
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)