Shark kill clientmessage
#1

Heey guys
If i die by a shark the clientmessage is spamming.
How can i dont let it spam?
Код:
public OnPlayerUpdate(playerid)
{
	new Float:x,Float:y,Float:z;
	GetVehiclePos(link, x, y, z);
	new Float:health;
    GetPlayerHealth(playerid,health);
	if(IsPlayerInRangeOfPoint(playerid, 9.3, x, y, z)) {
	{
	SetPlayerHealth(playerid, 0);
	sharkkill[playerid]=1;
	}
	if(sharkkill[playerid]==1)
	{
	SendClientMessage(playerid,COLOR_RED,"You are killed by a Shark!");
	sharkkill[playerid]=0;
	}
	}
	return 1;
}
Thanks admigo
Reply
#2

Код:
OnPlayerSpawn(playerid)
{
sharkkill[playerid]=0;
return1;
}
try it, but anyway put sharkkill[playerid]=0; on spawn
Reply
#3

Dont work:S
Reply
#4

pawn Код:
public OnPlayerUpdate(playerid)
{
    new Float:x,Float:y,Float:z;
    GetVehiclePos(link, x, y, z);
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(IsPlayerInRangeOfPoint(playerid, 9.3, x, y, z))
    {
        if(!sharkkill[playerid]) {
            SetPlayerHealth(playerid, 0);
            sharkkill[playerid]=1;
            SendClientMessage(playerid,COLOR_RED,"You are killed by a Shark!");
        }
    }else(
        sharkkill[playerid]=0;
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)