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;
}